Changeset 3737 for trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90
- Timestamp:
- Apr 25, 2025, 6:26:55 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90
r3734 r3737 81 81 real, dimension(1) :: latitude, longitude, cell_area 82 82 83 ! RV & JBC:Use of starting files for 1D83 ! Use of starting files for 1D 84 84 logical :: startfiles_1D, therestart1D, therestartfi, there 85 85 86 ! JN & JBC:Force atmospheric water profiles86 ! Force atmospheric water profiles 87 87 real :: atm_wat_profile, atm_wat_tau 88 real, dimension(:), allocatable :: zqsat ! useful for (atm_wat_profile=2) 88 real, dimension(nlayer) :: q_def_h2o_vap 89 real, dimension(:), allocatable :: zqsat 89 90 !======================================================================= 90 91 … … 149 150 call init_testphys1d('start1D.txt','startfi.nc',therestart1D,therestartfi,ngrid,nlayer,odpref,nq,q, & 150 151 time,psurf,u,v,temp,ndt,ptif,pks,dttestphys,zqsat,dq,dqdyn,day0,day,gru,grv,w, & 151 play,plev,latitude,longitude,cell_area,atm_wat_profile,atm_wat_tau )152 play,plev,latitude,longitude,cell_area,atm_wat_profile,atm_wat_tau,q_def_h2o_vap) 152 153 153 154 ! Write a "startfi" file … … 196 197 197 198 ! Modify atmospheric water if asked 198 ! Added "atm_wat_profile" flag (JN + JBC)199 ! ---------------------------- -----------199 ! Added "atm_wat_profile" flag 200 ! ---------------------------- 200 201 if (water) then 201 202 call watersat(nlayer,temp,play,zqsat) 202 if (0. <= atm_wat_profile ) then ! If atmospheric water is monitored203 if (0. <= atm_wat_profile .and. atm_wat_profile <= 1.) then ! If atmospheric water is monitored with a uniform value 203 204 if (atm_wat_tau < 0.) then ! Case for prescribed atm_wat_profile: wet if >0, dry if =0 204 q(1,:,igcm_h2o_vap) = min(zqsat,atm_wat_profile*g/psurf) 205 q(1,:,igcm_h2o_ice) = 0. ! reset h2o ice 206 else ! Case for relaxation towards the value atm_wat_profile with relaxation time atm_wat_tau 207 q(1,:,igcm_h2o_vap) = atm_wat_profile*g/psurf + (q(1,:,igcm_h2o_vap) - atm_wat_profile*g/psurf)*dexp(-dttestphys/atm_wat_tau) 208 q(1,:,igcm_h2o_ice) = 0. ! reset h2o ice 205 q(1,:,igcm_h2o_vap) = min(zqsat,atm_wat_profile) 206 else ! Case for relaxation towards the value atm_wat_profile with relaxation time atm_wat_tau 207 q(1,:,igcm_h2o_vap) = atm_wat_profile + (q(1,:,igcm_h2o_vap) - atm_wat_profile)*dexp(-dttestphys/atm_wat_tau) 208 endif 209 else if (abs(atm_wat_profile + 2.) < 1.e-15) then ! If atmospheric water is monitored with a user-defined water profile (with file "profile_def_h2o_vap") 210 if (atm_wat_tau < 0.) then ! Case for prescribed atm_wat_profile: wet if >0, dry if =0 211 q(1,:,igcm_h2o_vap) = min(zqsat(:),q_def_h2o_vap(:)) 212 else ! Case for relaxation towards the value atm_wat_profile with relaxation time atm_wat_tau 213 q(1,:,igcm_h2o_vap) = q_def_h2o_vap(:) + (q(1,:,igcm_h2o_vap) - q_def_h2o_vap(:))*dexp(-dttestphys/atm_wat_tau) 209 214 endif 210 215 endif
Note: See TracChangeset
for help on using the changeset viewer.