Ignore:
Timestamp:
Apr 25, 2025, 6:26:55 PM (3 months ago)
Author:
jbclement
Message:

1D Mars PCM:

  • The value for atmospheric water profile is now imposed as a uniform mixing ratio and not.
  • When atmospheric water profile is monitored, ice value is not put to 0 anymore.
  • The user can now prescribe a non-uniform atmospheric water profile with a file "profile_def_h2o_vap".

JBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90

    r3734 r3737  
    8181real, dimension(1)      :: latitude, longitude, cell_area
    8282
    83 ! RV & JBC: Use of starting files for 1D
     83! Use of starting files for 1D
    8484logical :: startfiles_1D, therestart1D, therestartfi, there
    8585
    86 ! JN & JBC: Force atmospheric water profiles
     86! Force atmospheric water profiles
    8787real                            :: atm_wat_profile, atm_wat_tau
    88 real, dimension(:), allocatable :: zqsat ! useful for (atm_wat_profile=2)
     88real, dimension(nlayer)         :: q_def_h2o_vap
     89real, dimension(:), allocatable :: zqsat
    8990!=======================================================================
    9091
     
    149150call init_testphys1d('start1D.txt','startfi.nc',therestart1D,therestartfi,ngrid,nlayer,odpref,nq,q, &
    150151                     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)
    152153
    153154! Write a "startfi" file
     
    196197
    197198    ! Modify atmospheric water if asked
    198     ! Added "atm_wat_profile" flag (JN + JBC)
    199     ! ---------------------------------------
     199    ! Added "atm_wat_profile" flag
     200    ! ----------------------------
    200201    if (water) then
    201202        call watersat(nlayer,temp,play,zqsat)
    202         if (0. <= atm_wat_profile) then ! If atmospheric water is monitored
     203        if (0. <= atm_wat_profile .and. atm_wat_profile <= 1.) then ! If atmospheric water is monitored with a uniform value
    203204            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)
    209214            endif
    210215        endif
Note: See TracChangeset for help on using the changeset viewer.