Index: trunk/LMDZ.MARS/changelog.txt
===================================================================
--- trunk/LMDZ.MARS/changelog.txt	(revision 3732)
+++ trunk/LMDZ.MARS/changelog.txt	(revision 3733)
@@ -4802,2 +4802,5 @@
 Code tidying: put routines in modules, remove useless "return" statements and
 remove obsolete and unused scopyi.F
+
+== 22/04/2025 == JBC
+Fixing a sanity check for the prescribtion of the atmospheric water profile in 1D and making comments more explicit.
Index: trunk/LMDZ.MARS/deftank/run.def.1d
===================================================================
--- trunk/LMDZ.MARS/deftank/run.def.1d	(revision 3732)
+++ trunk/LMDZ.MARS/deftank/run.def.1d	(revision 3733)
@@ -49,4 +49,9 @@
 # 0 == Northward, 90 == Eastward, 180 == Southward, 270 == Westward
 slope_orientation=0.
+## Atmospheric water profile
+# Prescribed uniform column value (kg.m-2). In particular: -1 == free atmospheric water vapor profile; 0 == dry atmospheric water vapor profile
+atm_wat_profile=-1.
+# Relaxation time (s). In particular: if <0 then no time relaxation i.e. forcing
+atm_wat_tau=-1.
 
 # hybrid vertical coordinate ? (.true. for hybrid and .false. for sigma levels)
Index: trunk/LMDZ.MARS/libf/phymars/dyn1d/init_testphys1d_mod.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/dyn1d/init_testphys1d_mod.F90	(revision 3732)
+++ trunk/LMDZ.MARS/libf/phymars/dyn1d/init_testphys1d_mod.F90	(revision 3733)
@@ -779,7 +779,7 @@
 ! ---------------------------------------------------
 ! Adding an option to force atmospheric water values JN
-atm_wat_profile = -1. ! Default: free atm wat profile
+atm_wat_profile = -1. ! Default: free atmospheric water profile
 if (water) then
-    write(*,*)'Force atmospheric water vapor profile?'
+    write(*,*)'Force atmospheric water vapor profile (uniform column value in kg.m-2)?'
     call getin('atm_wat_profile',atm_wat_profile)
     write(*,*) 'atm_wat_profile = ', atm_wat_profile
@@ -789,10 +789,6 @@
     else if (abs(atm_wat_profile) < 1.e-15) then ! if == 0.
         write(*,*) 'Dry atmospheric water vapor profile'
-    else if (0. < atm_wat_profile .and. atm_wat_profile <= 1.) then
+    else if (0. < atm_wat_profile) then
         write(*,*) 'Prescribed atmospheric water vapor profile'
-        write(*,*) 'Unless it reaches saturation (maximal value)'
-    else if (atm_wat_profile .eq. 2) then
-        write(*,*) 'Prescribed atmospheric water vapor profile'
-        write(*,*) 'like present day northern midlatitude'
         write(*,*) 'Unless it reaches saturation (maximal value)'
     else
@@ -806,11 +802,11 @@
 atm_wat_tau = -1. ! Default: no time relaxation
 if (water) then
-    write(*,*) 'Relax atmospheric water vapor profile?'
+    write(*,*) 'Relax atmospheric water vapor profile with time constant (s)?'
     call getin('atm_wat_tau',atm_wat_tau)
     write(*,*) 'atm_wat_tau = ', atm_wat_tau
     if (atm_wat_tau < 0.) then
-        write(*,*) 'Atmospheric water vapor profile is not relaxed.'
+        write(*,*) 'Atmospheric water vapor profile is not relaxed (forcing).'
     else
-        if (0. <= atm_wat_profile .and. atm_wat_profile <= 1.) then
+        if (0. <= atm_wat_profile) then
             write(*,*) 'Relaxed atmospheric water vapor profile towards ', atm_wat_profile
             write(*,*) 'Unless it reaches saturation (maximal value)'
@@ -821,4 +817,5 @@
     endif
 endif
+print*, 'looooooooooool', q(1,1,igcm_h2o_vap)
 
 END SUBROUTINE init_testphys1d
Index: trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90	(revision 3732)
+++ trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90	(revision 3733)
@@ -150,5 +150,5 @@
                      time,psurf,u,v,temp,ndt,ptif,pks,dttestphys,zqsat,dq,dqdyn,day0,day,gru,grv,w, &
                      play,plev,latitude,longitude,cell_area,atm_wat_profile,atm_wat_tau)
-
+print*, 'yooooooooooooooooooo', q(1,1,igcm_h2o_vap)
 ! Write a "startfi" file
 ! ----------------------
@@ -163,4 +163,5 @@
                   totcloudfrac,wstar,watercap,perennial_co2ice)
 endif !(.not. therestartfi)
+print*, 'yooooooooooooooooooo', q(1,1,igcm_h2o_vap)
 
 !=======================================================================
@@ -200,10 +201,9 @@
     if (water) then
         call watersat(nlayer,temp,play,zqsat)
-        if (0. <= atm_wat_profile .and. atm_wat_profile <= 1.) then
-        ! If atmospheric water is monitored
-            if (atm_wat_tau < 0.) then ! Prescribed atm_wat_profile: wet if >0, dry if =0
+        if (0. <= atm_wat_profile) then ! If atmospheric water is monitored
+            if (atm_wat_tau < 0.) then ! Case for prescribed atm_wat_profile: wet if >0, dry if =0
                 q(1,:,igcm_h2o_vap) = min(zqsat,atm_wat_profile*g/psurf)
                 q(1,:,igcm_h2o_ice) = 0. ! reset h2o ice
-            else ! Relaxation towards the value atm_wat_profile with relaxation time atm_wat_tau
+            else !  Case for relaxation towards the value atm_wat_profile with relaxation time atm_wat_tau
                 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)
                 q(1,:,igcm_h2o_ice) = 0. ! reset h2o ice
