Changeset 3733 for trunk/LMDZ.MARS


Ignore:
Timestamp:
Apr 22, 2025, 6:08:46 PM (8 weeks ago)
Author:
jbclement
Message:

Mars PCM:
Fixing a sanity check for the prescribtion of the atmospheric water profile in 1D and making comments more explicit.
JBC

Location:
trunk/LMDZ.MARS
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/changelog.txt

    r3727 r3733  
    48024802Code tidying: put routines in modules, remove useless "return" statements and
    48034803remove obsolete and unused scopyi.F
     4804
     4805== 22/04/2025 == JBC
     4806Fixing a sanity check for the prescribtion of the atmospheric water profile in 1D and making comments more explicit.
  • trunk/LMDZ.MARS/deftank/run.def.1d

    r3385 r3733  
    4949# 0 == Northward, 90 == Eastward, 180 == Southward, 270 == Westward
    5050slope_orientation=0.
     51## Atmospheric water profile
     52# Prescribed uniform column value (kg.m-2). In particular: -1 == free atmospheric water vapor profile; 0 == dry atmospheric water vapor profile
     53atm_wat_profile=-1.
     54# Relaxation time (s). In particular: if <0 then no time relaxation i.e. forcing
     55atm_wat_tau=-1.
    5156
    5257# hybrid vertical coordinate ? (.true. for hybrid and .false. for sigma levels)
  • trunk/LMDZ.MARS/libf/phymars/dyn1d/init_testphys1d_mod.F90

    r3726 r3733  
    779779! ---------------------------------------------------
    780780! Adding an option to force atmospheric water values JN
    781 atm_wat_profile = -1. ! Default: free atm wat profile
     781atm_wat_profile = -1. ! Default: free atmospheric water profile
    782782if (water) then
    783     write(*,*)'Force atmospheric water vapor profile?'
     783    write(*,*)'Force atmospheric water vapor profile (uniform column value in kg.m-2)?'
    784784    call getin('atm_wat_profile',atm_wat_profile)
    785785    write(*,*) 'atm_wat_profile = ', atm_wat_profile
     
    789789    else if (abs(atm_wat_profile) < 1.e-15) then ! if == 0.
    790790        write(*,*) 'Dry atmospheric water vapor profile'
    791     else if (0. < atm_wat_profile .and. atm_wat_profile <= 1.) then
     791    else if (0. < atm_wat_profile) then
    792792        write(*,*) 'Prescribed atmospheric water vapor profile'
    793         write(*,*) 'Unless it reaches saturation (maximal value)'
    794     else if (atm_wat_profile .eq. 2) then
    795         write(*,*) 'Prescribed atmospheric water vapor profile'
    796         write(*,*) 'like present day northern midlatitude'
    797793        write(*,*) 'Unless it reaches saturation (maximal value)'
    798794    else
     
    806802atm_wat_tau = -1. ! Default: no time relaxation
    807803if (water) then
    808     write(*,*) 'Relax atmospheric water vapor profile?'
     804    write(*,*) 'Relax atmospheric water vapor profile with time constant (s)?'
    809805    call getin('atm_wat_tau',atm_wat_tau)
    810806    write(*,*) 'atm_wat_tau = ', atm_wat_tau
    811807    if (atm_wat_tau < 0.) then
    812         write(*,*) 'Atmospheric water vapor profile is not relaxed.'
     808        write(*,*) 'Atmospheric water vapor profile is not relaxed (forcing).'
    813809    else
    814         if (0. <= atm_wat_profile .and. atm_wat_profile <= 1.) then
     810        if (0. <= atm_wat_profile) then
    815811            write(*,*) 'Relaxed atmospheric water vapor profile towards ', atm_wat_profile
    816812            write(*,*) 'Unless it reaches saturation (maximal value)'
     
    821817    endif
    822818endif
     819print*, 'looooooooooool', q(1,1,igcm_h2o_vap)
    823820
    824821END SUBROUTINE init_testphys1d
  • trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90

    r3726 r3733  
    150150                     time,psurf,u,v,temp,ndt,ptif,pks,dttestphys,zqsat,dq,dqdyn,day0,day,gru,grv,w, &
    151151                     play,plev,latitude,longitude,cell_area,atm_wat_profile,atm_wat_tau)
    152 
     152print*, 'yooooooooooooooooooo', q(1,1,igcm_h2o_vap)
    153153! Write a "startfi" file
    154154! ----------------------
     
    163163                  totcloudfrac,wstar,watercap,perennial_co2ice)
    164164endif !(.not. therestartfi)
     165print*, 'yooooooooooooooooooo', q(1,1,igcm_h2o_vap)
    165166
    166167!=======================================================================
     
    200201    if (water) then
    201202        call watersat(nlayer,temp,play,zqsat)
    202         if (0. <= atm_wat_profile .and. atm_wat_profile <= 1.) then
    203         ! If atmospheric water is monitored
    204             if (atm_wat_tau < 0.) then ! Prescribed atm_wat_profile: wet if >0, dry if =0
     203        if (0. <= atm_wat_profile) then ! If atmospheric water is monitored
     204            if (atm_wat_tau < 0.) then ! Case for prescribed atm_wat_profile: wet if >0, dry if =0
    205205                q(1,:,igcm_h2o_vap) = min(zqsat,atm_wat_profile*g/psurf)
    206206                q(1,:,igcm_h2o_ice) = 0. ! reset h2o ice
    207             else ! Relaxation towards the value atm_wat_profile with relaxation time atm_wat_tau
     207            else !  Case for relaxation towards the value atm_wat_profile with relaxation time atm_wat_tau
    208208                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)
    209209                q(1,:,igcm_h2o_ice) = 0. ! reset h2o ice
Note: See TracChangeset for help on using the changeset viewer.