- Timestamp:
- Feb 29, 2024, 3:45:42 PM (9 months ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/changelog.txt
r3234 r3245 4527 4527 Minor fix in topmons_setup: handle case when mount is "resolved" for high 4528 4528 resolution runs. 4529 4530 == 29/02/2024 == LL 4531 Fixing bugs in soilwater (array size and indexes in loop) 4532 -
trunk/LMDZ.MARS/libf/phymars/soilwater.F90
r3230 r3245 19 19 ! suburface and the atmosphere. 20 20 ! 21 ! Water vapor and nsoiladsorbed water are treated as two separate subsurface tracers that are connected21 ! Water vapor and adsorbed water are treated as two separate subsurface tracers that are connected 22 22 ! by adsorption / desorption coefficients, including an adsorption / desorption kinetic factor. 23 23 ! … … 73 73 logical, intent(in) :: exchange(ngrid) ! logical :: array describing whether there is exchange with the atmosphere at the current timestep 74 74 75 real, intent(in) :: qsat_surf(ngrid) ! Saturation vapor pressure at the current surface temperature (formerly qsat)75 real, intent(in) :: qsat_surf(ngrid) ! Saturation mixing ratio at the surface at the current surface temperature (formerly qsat) 76 76 real, intent(in) :: pq(ngrid, nlayer, nq) ! Tracer atmospheric mixing ratio 77 77 real, intent(in) :: pa(ngrid, nlayer) ! Coefficients za … … 79 79 real, intent(in) :: pc(ngrid, nlayer) ! Coefficients zc 80 80 real, intent(in) :: pd(ngrid, nlayer) ! Coefficients zd 81 real, intent(in) :: pdqsdifpot(ngrid , nq)! Potential pdqsdif (without subsurface - atmosphere exchange)81 real, intent(in) :: pdqsdifpot(ngrid) ! Potential pdqsdif (without subsurface - atmosphere exchange) 82 82 83 83 real, intent(in) :: pplev(ngrid, nlayer+1) ! Atmospheric pressure levels … … 87 87 ! Variables modified : 88 88 ! ---------------------------------------------------------------------- 89 real, intent(inout) :: pqsoil(ngrid, nsoil, 3*nq) ! Subsurface tracers (water vapor and ice)90 real, intent(in) :: pqsurf(ngrid) ! Water ice on the surface91 ! (in kg.m - 3 : m - 3 of pore air for water vapor and m - 3 of regolith for water ice and adsorbed water)89 real, intent(inout) :: pqsoil(ngrid, nsoil, nqsoil) ! Subsurface tracers (water vapor and ice) 90 real, intent(in) :: pqsurf(ngrid) ! Water ice on the surface 91 ! (in kg.m - 3 : m - 3 of pore air for water vapor and m - 3 of regolith for water ice and adsorbed water) 92 92 ! Outputs : 93 93 ! ---------------------------------------------------------------------- … … 404 404 ! elseif (choice_ads.eq.2) then ! par rapport \E0 valeur experimentale de reference 405 405 ! ! Kd(ig, ik) = Kd_ref * exp(-enthalpy_ads / 8.314 * 406 ! ! & (1. / ptsoil(ig, nsoil - 4) - 1. / Tref))406 ! ! & SSI_1D/ice_lat55_fb/ (1. / ptsoil(ig, nsoil - 4) - 1. / Tref)) 407 407 ! ! Ka(ig, ik) = rho_soil(ig, ik) * Ka_ref * 408 408 ! ! & sqrt(ptsoil(ig, nsoil - 4) / Tref) / nref! … … 1079 1079 if ( (.not.exchange(ig)) & 1080 1080 .and. ( (-zdqsdifrego(ig) * ptimestep) & 1081 .gt.( pqsurf(ig) + pdqsdifpot(ig , igcm_h2o_ice) * ptimestep) ) &1082 .and.( (pqsurf(ig) + pdqsdifpot(ig , igcm_h2o_ice) * ptimestep).gt.0. ) ) then1081 .gt.( pqsurf(ig) + pdqsdifpot(ig) * ptimestep) ) & 1082 .and.( (pqsurf(ig) + pdqsdifpot(ig) * ptimestep).gt.0. ) ) then 1083 1083 1084 1084 ! calculate a new flux from the subsurface 1085 zdqsdifrego(ig) = -( pqsurf(ig) + pdqsdifpot(ig , igcm_h2o_ice) * ptimestep ) / ptimestep1085 zdqsdifrego(ig) = -( pqsurf(ig) + pdqsdifpot(ig) * ptimestep ) / ptimestep 1086 1086 1087 1087 ! ! check case where there is CO2 ice on the surface but qsurf = 0 … … 1089 1089 ! zdqsdifrego(ig) = 0.D0 1090 1090 ! endif 1091 1091 do ik = 1, nsoil 1092 1092 1093 1093 ! calculate A and B coefficients ! modified 2020 … … 1104 1104 1105 1105 ! initialize all flags for the loop 1106 do ik = 1, nsoil1106 1107 1107 1108 1108 ! initialize the ice
Note: See TracChangeset
for help on using the changeset viewer.