In preparation for future human habitats on Mars, it is important to understand the Martian radiation environment. Mars does not have an intrinsic magnetic field and Galactic cosmic ray (GCR) particles may directly propagate through and interact with its atmosphere before reaching the surface and subsurface of Mars. However, Mars has many high mountains and low-altitude craters where the atmospheric thickness can be more than 10 times different from one another. We thus consider the influence of the atmospheric depths on the Martian radiation levels including the absorbed dose, dose equivalent and body effective dose rates induced by GCRs at varying heights above and below the Martian surface. The state-of-the-art Atmospheric Radiation Interaction Simulator (AtRIS) based on GEometry And Tracking (GEANT4) Monte Carlo method has been employed for simulating particle interactions with the Martian atmosphere and terrain. We find that higher surface pressures can effectively reduce the heavy ion contribution to the radiation, especially the biologically weighted radiation quantity. However, enhanced shielding (both by the atmosphere and the subsurface material) can considerably enhance the production of secondary neutrons which contribute significantly to the effective dose. In fact, both neutron flux and effective dose peak at around 30 cm below the surface. This is a critical concern when using the Martian surface material to mitigate radiation risks. Based on the calculated effective dose, we finally estimate some optimized shielding depths, under different surface pressures (corresponding to different altitudes) and various heliospheric modulation conditions. This may serve for designing future Martian habitats.