Index: /trunk/LMDZ.MARS/README
===================================================================
--- /trunk/LMDZ.MARS/README	(revision 2178)
+++ /trunk/LMDZ.MARS/README	(revision 2179)
@@ -2783,2 +2783,5 @@
 Atmospheric composition is changed at a selected grid point, and horizontal and vertical
 gradients are preserved.
+
+== 14/11/2019 == MV
+Add the sublimation/condensation latent heat release from the surface water ice in vdifc_mod.F. It can be activated or deactivated with the new flag "latentheat" (for now latentheat=false by default).
Index: /trunk/LMDZ.MARS/libf/phymars/callkeys.h
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/callkeys.h	(revision 2178)
+++ /trunk/LMDZ.MARS/libf/phymars/callkeys.h	(revision 2179)
@@ -15,5 +15,5 @@
      &   ,calltherm,callrichsl,callslope,tituscap,callyamada4,co2clouds &
      &   ,co2useh2o,meteo_flux,CLFvaryingCO2,spantCO2,CLFvarying        &
-     &   ,satindexco2,rdstorm,calllott_nonoro
+     &   ,satindexco2,rdstorm,calllott_nonoro,latentheat
      
       COMMON/callkeys_i/iradia,iaervar,iddist,ilwd,ilwb,ilwn,ncouche    &
@@ -66,4 +66,5 @@
       logical active,doubleq,submicron,lifting,callddevil,scavenging
       logical rdstorm ! rocket dust storm parametrization
+      logical latentheat ! latent heat release from ground water ice sublimation/condensation
       logical sedimentation
       logical activice,tifeedback,supersat,caps
Index: /trunk/LMDZ.MARS/libf/phymars/conf_phys.F
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/conf_phys.F	(revision 2178)
+++ /trunk/LMDZ.MARS/libf/phymars/conf_phys.F	(revision 2179)
@@ -288,6 +288,5 @@
 
 ! rocket dust storm injection scheme
-         write(*,*)"call rocket dust storm and slope lifting", 
-     &              " parametrization"
+         write(*,*)"call rocket dust storm parametrization"
          rdstorm=.false. ! default value
          call getin("rdstorm",rdstorm)
@@ -297,4 +296,11 @@
         call getin("coeff_detrainment",coeff_detrainment)
         write(*,*)" coeff_detrainment = ",coeff_detrainment
+
+! latent heat release from ground water ice sublimation/condensation
+         write(*,*)"latent heat release during sublimation", 
+     &              " /condensation of ground water ice"
+         latentheat=.false. ! default value
+         call getin("latentheat",latentheat)
+         write(*,*)" latentheat = ",latentheat
 
          write(*,*)"rad.transfer is computed every iradia",
Index: /trunk/LMDZ.MARS/libf/phymars/vdifc_mod.F
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/vdifc_mod.F	(revision 2178)
+++ /trunk/LMDZ.MARS/libf/phymars/vdifc_mod.F	(revision 2179)
@@ -122,10 +122,13 @@
       REAL,SAVE :: acond,bcond
       
-c     For latent heat release from ground ice sublimation    
+c     For latent heat release from ground water ice sublimation    
+      REAL tsrf_lh(ngrid) ! temporary surface temperature
+      REAL lh ! latent heat, formulation given in the Technical Document: 
+              ! "Modeling water ice sublimation under Phoenix-like conditions", Montmessin et al. 2004  
 !      REAL tsrf_lw(ngrid)
 !      REAL alpha
-      REAL T1,T2
-      SAVE T1,T2
-      DATA T1,T2/-604.3,1080.7/ ! zeros of latent heat equation for ice
+!      REAL T1,T2
+!      SAVE T1,T2
+!      DATA T1,T2/-604.3,1080.7/ ! zeros of latent heat equation for ice
 
 c    Tracers :
@@ -863,4 +866,12 @@
 !
 !              pdtsrf(ig) = (tsrf_lw(ig)-ptsrf(ig))/ptimestep
+c             Take into account the H2O latent heat impact on the surface temperature
+              if (latentheat) then
+                tsrf_lh(ig) = ptsrf(ig) + pdtsrf(ig) *ptimestep
+                lh=(2834.3-0.28*(tsrf_lh(ig)-To)-
+     &              0.004*(tsrf_lh(ig)-To)*(tsrf_lh(ig)-To))*1.e+3
+                pdtsrf(ig)= pdtsrf(ig) + pdqsdif(ig,igcm_h2o_ice)*lh
+     &                    /pcapcal(ig)
+              endif
 
                if(pqsurf(ig,igcm_h2o_ice)
