Index: LMDZ6/trunk/libf/phylmd/clesphys_mod_h.f90
===================================================================
--- LMDZ6/trunk/libf/phylmd/clesphys_mod_h.f90	(revision 6050)
+++ LMDZ6/trunk/libf/phylmd/clesphys_mod_h.f90	(revision 6053)
@@ -43,5 +43,5 @@
           , ip_ebil_phy                                                &
           , iflag_gusts, iflag_z0_oce                                  &
-          , ok_lic_melt, ok_lic_cond, aer_type                         &
+          , ok_lic_melt, ok_lic_cond, chasno_tun, forc_ts_melt, aer_type &
           , iflag_rrtm, ok_strato, ok_hines, ok_qch4                   &
           , iflag_ice_thermo, ok_ice_supersat                          &
@@ -68,4 +68,5 @@
   INTEGER iflag_physiq
   REAL tau_thermals
+  REAL chasno_tun
 
   !FC
@@ -86,4 +87,6 @@
   !OM Fonte calotte dans bilan eau
   LOGICAL ok_lic_melt
+  ! impose surface temperature during snow melting
+  LOGICAL forc_ts_melt
   !OB Depot de vapeur d eau sur la calotte pour le bilan eau
   LOGICAL ok_lic_cond
@@ -204,5 +207,5 @@
   !$OMP      , ip_ebil_phy                                                &
   !$OMP      , iflag_gusts, iflag_z0_oce                                  &
-  !$OMP      , ok_lic_melt, ok_lic_cond, aer_type                         &
+  !$OMP      , ok_lic_melt, ok_lic_cond, chasno_tun, forc_ts_melt, aer_type  &
   !$OMP      , iflag_rrtm, ok_strato, ok_hines, ok_qch4                    &
   !$OMP      , iflag_ice_thermo, ok_ice_supersat                            &
Index: LMDZ6/trunk/libf/phylmd/conf_phys_m.f90
===================================================================
--- LMDZ6/trunk/libf/phylmd/conf_phys_m.f90	(revision 6050)
+++ LMDZ6/trunk/libf/phylmd/conf_phys_m.f90	(revision 6053)
@@ -176,4 +176,6 @@
     REAL,SAVE :: inertie_sol_omp,inertie_sno_omp,inertie_sic_omp
     REAL,SAVE :: inertie_lic_omp
+    REAL,SAVE :: chasno_tun_omp
+    LOGICAL,SAVE :: forc_ts_melt_omp
     REAL,SAVE :: qsol0_omp
     REAL,SAVE :: evap0_omp
@@ -1623,4 +1625,12 @@
 
 
+    !Config Key = forc_ts_melt
+    !Config Desc = force surface temperature when snow melts
+    !Config Def  = .TRUE.
+    !Config Help = set to .FALSE. to avoid unrealistically forcing ts=273.15 during snow melt
+    forc_ts_melt = .TRUE.
+    CALL getin('forc_ts_melt', forc_ts_melt)
+    
+
     !Config Key = ok_lic_cond
     !Config Desc = Prise en compte depot de vapeur d'eau sur la calotte dans le bilan d'eau
@@ -2060,5 +2070,8 @@
     z0min_omp = 0.000015
     CALL getin('z0min',z0min_omp)
-
+ 
+    ! PARAMETERS FOR SNOW AND ICE MELTING
+    chasno_tun_omp=0.15
+    CALL getin('chasno_tun',chasno_tun_omp)
 
     ! PARAMETERS FOR CONVECTIVE INHIBITION BY TROPOS. DRYNESS
@@ -2640,4 +2653,5 @@
     cvl_sig2feed = cvl_sig2feed_omp
     cvl_corr = cvl_corr_omp
+    forc_ts_melt = forc_ts_melt_omp
     ok_lic_melt = ok_lic_melt_omp
     ok_lic_cond = ok_lic_cond_omp
@@ -2658,4 +2672,5 @@
     ratio_z0hz0m_landice=ratio_z0hz0m_landice_omp
 
+    chasno_tun=chasno_tun_omp
     f_rugoro=f_rugoro_omp
 
@@ -2882,4 +2897,5 @@
     WRITE(lunout,*) ' ok_lic_melt=', ok_lic_melt
     WRITE(lunout,*) ' ok_lic_cond=', ok_lic_cond
+    WRITE(lunout,*) ' forc_ts_melt=', forc_ts_melt
     WRITE(lunout,*) ' iflag_cycle_diurne=',iflag_cycle_diurne
     WRITE(lunout,*) ' soil_model=',soil_model
@@ -2978,4 +2994,5 @@
     WRITE(lunout,*) ' iflag_sic = ', iflag_sic
     WRITE(lunout,*) ' iflag_inertie = ', iflag_inertie
+    WRITE(lunout,*) ' chasno_tun = ', chasno_tun
     WRITE(lunout,*) ' inertie_sol = ', inertie_sol
     WRITE(lunout,*) ' inertie_sic = ', inertie_sic
Index: LMDZ6/trunk/libf/phylmd/ocean_forced_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/ocean_forced_mod.F90	(revision 6050)
+++ LMDZ6/trunk/libf/phylmd/ocean_forced_mod.F90	(revision 6053)
@@ -299,14 +299,11 @@
        AcoefH, AcoefQ, BcoefH, BcoefQ, &
        AcoefU, AcoefV, BcoefU, BcoefV, &
-!GG       ps, u1, v1, gustiness, &
        ps, u1, v1, gustiness, pctsrf, &
-!GG
        radsol, snow, qsol, agesno, tsoil, &
        qsurf, alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, &
-!GG       tsurf_new, dflux_s, dflux_l, rhoa)
+       icesub, icemelt, &
        tsurf_new, dflux_s, dflux_l, rhoa, swnet, hice, tice, bilg_cumul, &
        fcds, fcdi, dh_basal_growth, dh_basal_melt, dh_top_melt, dh_snow2sic, &
        dtice_melt, dtice_snow2sic &
-!GG
 #ifdef ISO
        ,xtprecip_rain, xtprecip_snow, xtspechum,Roce, &
@@ -413,5 +410,6 @@
     REAL, DIMENSION(knon), INTENT(OUT)            :: flux_u1, flux_v1
     REAL, DIMENSION(knon), INTENT(OUT)            :: tsurf_new
-    REAL, DIMENSION(knon), INTENT(OUT)            :: dflux_s, dflux_l      
+    REAL, DIMENSION(knon), INTENT(OUT)            :: dflux_s, dflux_l     
+    REAL, DIMENSION(knon), INTENT(OUT)            :: icesub, icemelt 
 #ifdef ISO     
     REAL, DIMENSION(ntiso,knon), INTENT(OUT)      :: xtevap
@@ -424,5 +422,5 @@
     REAL                        :: zfra
     REAL, PARAMETER             :: t_grnd=271.35
-    REAL, DIMENSION(knon)       :: cal, beta, dif_grnd, capsol, icesub
+    REAL, DIMENSION(knon)       :: cal, beta, dif_grnd, capsol
     REAL, DIMENSION(knon)       :: alb_neig, tsurf_tmp
     REAL, DIMENSION(knon)       :: soilcap, soilflux
@@ -678,5 +676,5 @@
     CALL simplehydrol( knon, is_sic, knindex, dtime, &
          tsurf_tmp, precip_rain, precip_snow, &
-         snow, qsol, tsurf_new, evap, icesub &
+         snow, qsol, tsurf_new, evap, icesub, icemelt &
 #ifdef ISO    
      &  ,fq_fonte_diag,fqfonte_diag,snow_evap_diag,fqcalving_diag   &
Index: LMDZ6/trunk/libf/phylmd/pbl_surface_main_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/pbl_surface_main_mod.F90	(revision 6050)
+++ LMDZ6/trunk/libf/phylmd/pbl_surface_main_mod.F90	(revision 6053)
@@ -584,5 +584,5 @@
        beta, &
        alb_dir_m,    alb_dif_m,  zxsens,   zxevap,  zxsnowerosion,      &
-       icesub_lic, alb3_lic,  runoff,    snowhgt,   qsnow,     to_ice,    sissnow,  &
+       icesub_ice, icemelt_ice, alb3_lic,  runoff,    snowhgt,   qsnow,     to_ice,    sissnow,  &
        zxtsol,    zxfluxlat, zt2m,     qsat2m, zn2mout,                 &
        d_t,       d_q,    d_qbs,    d_u,      d_v, d_t_diss,            &
@@ -791,5 +791,6 @@
     REAL, DIMENSION(klon),        INTENT(OUT)       :: zxevap     ! water vapour flux at surface, positiv upwards
     REAL, DIMENSION(klon),        INTENT(OUT)       :: zxsnowerosion     ! blowing snow flux at surface
-    REAL, DIMENSION(klon),        INTENT(OUT)       :: icesub_lic ! ice (no snow!) sublimation over ice sheet 
+    REAL, DIMENSION(klon),        INTENT(OUT)       :: icesub_ice ! ice (no snow!) sublimation flux over iced surfaces [kg/m2/s]
+    REAL, DIMENSION(klon),        INTENT(OUT)       :: icemelt_ice ! ice (no snow!) meltin flux over iced surfaces [kg/m2/s]
     REAL, DIMENSION(klon),        INTENT(OUT)       :: zxtsol     ! temperature at surface, mean for each grid point
     REAL, DIMENSION(klon,klev),   INTENT(OUT)       :: d_t_w      !   !
@@ -1012,5 +1013,5 @@
        cdragh,    cdragm,   zu1,    zv1,              &
        alb_dir_m,    alb_dif_m,  zxsens,   zxevap,  zxsnowerosion,      &
-       icesub_lic, alb3_lic,  runoff,    snowhgt,   qsnow,     to_ice,    sissnow,  &
+       icesub_ice, icemelt_ice, alb3_lic,  runoff,    snowhgt,   qsnow,     to_ice,    sissnow,  &
        zxtsol,    zxfluxlat, zt2m,     qsat2m, zn2mout,                 &
        d_t,       d_q,    d_qbs,    d_u,      d_v, d_t_diss,            &
@@ -1081,5 +1082,5 @@
        cdragh,    cdragm,                             &
        beta, &
-       icesub_lic, alb3_lic,  runoff,    snowhgt,   qsnow,     to_ice,    sissnow,  &
+       icesub_ice, icemelt_ice, alb3_lic,  runoff,    snowhgt,   qsnow,     to_ice,    sissnow,  &
        qsat2m,                 &
        d_t,       d_q,    d_qbs,    d_u,      d_v, d_t_diss,            &
Index: LMDZ6/trunk/libf/phylmd/pbl_surface_subsrf_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/pbl_surface_subsrf_mod.F90	(revision 6050)
+++ LMDZ6/trunk/libf/phylmd/pbl_surface_subsrf_mod.F90	(revision 6053)
@@ -54,5 +54,5 @@
        cdragh,    cdragm,                             &
        beta, &
-       icesub_lic, alb3_lic,  runoff,    snowhgt,   qsnow,     to_ice,    sissnow,  &
+       icesub_ice, icemelt_ice, alb3_lic,  runoff,    snowhgt,   qsnow,     to_ice,    sissnow,  &
        qsat2m,                 &
        d_t,       d_q,    d_qbs,    d_u,      d_v, d_t_diss,            &
@@ -277,5 +277,6 @@
     REAL, DIMENSION(klon),        INTENT(INOUT)       :: cdragm     ! drag coefficient for wind
     REAL, DIMENSION(klon),        INTENT(INOUT)       :: alb3_lic
-    REAL, DIMENSION(klon),        INTENT(INOUT)       :: icesub_lic ! ice (no snow!) sublimation over ice sheet 
+    REAL, DIMENSION(klon),        INTENT(INOUT)       :: icesub_ice ! ice (no snow!) sublimation flux over ice sheet and sea ice 
+    REAL, DIMENSION(klon),        INTENT(INOUT)       :: icemelt_ice ! ice (no snow!) melting flux over ice sheet and sea ice 
     REAL, DIMENSION(klon,klev),   INTENT(INOUT)       :: d_t_w      !   !
     REAL, DIMENSION(klon,klev),   INTENT(INOUT)       :: d_q_w      !      !  Tendances dans les poches
@@ -529,5 +530,5 @@
     REAL, DIMENSION(knon)              :: AcoefQBS, BcoefQBS
     REAL, DIMENSION(knon)              :: ypsref
-    REAL, DIMENSION(knon)              :: yevap, yevap_pot, ytsurf_new, yalb3_new, yicesub_lic
+    REAL, DIMENSION(knon)              :: yevap, yevap_pot, ytsurf_new, yalb3_new, yicesub, yicemelt
     REAL, DIMENSION(knon,nsw)          :: yalb_dir_new, yalb_dif_new
     REAL, DIMENSION(knon,klev)         :: y_d_t, y_d_q, y_d_t_diss, y_d_qbs
@@ -1637,5 +1638,5 @@
                   ypsref, yu1, yv1, ygustiness, yrugoro, pctsrf, &
                   ysnow, yqsurf, yqsol,yqbs1, yagesno, &
-                  ytsoil, yz0m, yz0h, SFRWL, yalb_dir_new, yalb_dif_new, yevap, yicesub_lic, yfluxsens,yfluxlat, &
+                  ytsoil, yz0m, yz0h, SFRWL, yalb_dir_new, yalb_dif_new, yevap, yicesub, yicemelt, yfluxsens,yfluxlat, &
                   yfluxbs, ytsurf_new, y_dflux_t, y_dflux_q, &
                   yzmea, yzsig, ycldt, &
@@ -1657,5 +1658,6 @@
                 sissnow(i)   = ysissnow(j)
                 runoff(i)    = yrunoff(j)
-                icesub_lic(i) = yicesub_lic(j)*ypct(j)
+                icesub_ice(i) = icesub_ice(i) + yicesub(j)*ypct(j)
+                icemelt_ice(i) = icemelt_ice(i) + yicemelt(j)*ypct(j)
              ENDDO
              ! Martin
@@ -1783,5 +1785,5 @@
                ypsref, yu1, yv1, ygustiness, pctsrf, &
                ysnow, yqsurf, yqsol, yagesno, ytsoil, &
-               yz0m, yz0h, SFRWL, yalb_dir_new, yalb_dif_new, yevap, yfluxsens,yfluxlat,&
+               yz0m, yz0h, SFRWL, yalb_dir_new, yalb_dif_new, yevap, yicesub, yicemelt, yfluxsens,yfluxlat,&
                ytsurf_new, y_dflux_t, y_dflux_q, &
                y_flux_u1, y_flux_v1, &
@@ -1794,5 +1796,10 @@
 #endif               
          &      )
-          
+
+             DO j = 1, knon
+                i = ni(j)
+                icesub_ice(i) = icesub_ice(i) + yicesub(j)*ypct(j)
+                icemelt_ice(i) = icemelt_ice(i) + yicemelt(j)*ypct(j)
+             ENDDO
 ! Special DICE MPL 05082013 puis BOMEX MPL 20150410
        IF (ok_prescr_ust) THEN
Index: LMDZ6/trunk/libf/phylmd/pbl_surface_uncompress_pre_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/pbl_surface_uncompress_pre_mod.F90	(revision 6050)
+++ LMDZ6/trunk/libf/phylmd/pbl_surface_uncompress_pre_mod.F90	(revision 6053)
@@ -48,5 +48,5 @@
        cdragh,    cdragm,   zu1,    zv1,              &
        alb_dir_m,    alb_dif_m,  zxsens,   zxevap,  zxsnowerosion,      &
-       icesub_lic, alb3_lic,  runoff,    snowhgt,   qsnow,     to_ice,    sissnow,  &
+       icesub_ice, icemelt_ice, alb3_lic,  runoff,    snowhgt,   qsnow,     to_ice,    sissnow,  &
        zxtsol,    zxfluxlat, zt2m,     qsat2m, zn2mout,                 &
        d_t,       d_q,    d_qbs,    d_u,      d_v, d_t_diss,            &
@@ -238,5 +238,6 @@
     REAL, DIMENSION(klon),        INTENT(OUT)       :: zxevap     ! water vapour flux at surface, positiv upwards
     REAL, DIMENSION(klon),        INTENT(OUT)       :: zxsnowerosion     ! blowing snow flux at surface
-    REAL, DIMENSION(klon),        INTENT(OUT)       :: icesub_lic ! ice (no snow!) sublimation over ice sheet 
+    REAL, DIMENSION(klon),        INTENT(OUT)       :: icesub_ice ! ice (no snow!) sublimation flux over iced surfaces [kg/m2/s]
+    REAL, DIMENSION(klon),        INTENT(OUT)       :: icemelt_ice ! ice (no snow!) melting flux over iced surfaces [kg/m2/s]
     REAL, DIMENSION(klon),        INTENT(OUT)       :: zxtsol     ! temperature at surface, mean for each grid point
     REAL, DIMENSION(klon,klev),   INTENT(OUT)       :: d_t_w      !   !
@@ -559,5 +560,5 @@
  zxfluxt(:,:)=0. ; zxfluxq(:,:)=0.; zxfluxqbs(:,:)=0.
  qsnow(:)=0. ; snowhgt(:)=0. ; to_ice(:)=0. ; sissnow(:)=0.
- runoff(:)=0. ; icesub_lic(:)=0.
+ runoff(:)=0. ; icesub_ice(:)=0. ; icemelt_ice(:)=0.
  l_mixmin(:,:,:)=0.
  l_mix(:,:,:) = 0.
Index: LMDZ6/trunk/libf/phylmd/phys_local_var_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/phys_local_var_mod.F90	(revision 6050)
+++ LMDZ6/trunk/libf/phylmd/phys_local_var_mod.F90	(revision 6053)
@@ -414,6 +414,6 @@
       REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: dthmin, evap, snowerosion, fder, plcl, plfc, prw, prlw, prsw, prbsw, water_budget
 !$OMP THREADPRIVATE(dthmin, evap, snowerosion, fder, plcl, plfc, prw, prlw, prsw, prbsw, water_budget)
-      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: icesub_lic
-!$OMP THREADPRIVATE(icesub_lic)
+      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: icesub_ice, icemelt_ice
+!$OMP THREADPRIVATE(icesub_ice, icemelt_ice)
       REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zustar, zu10m, zv10m, rh2m
 !$OMP THREADPRIVATE(zustar, zu10m, zv10m, rh2m)
@@ -1095,5 +1095,5 @@
       ALLOCATE(cldm(klon), cldq(klon), cldt(klon), qsat2m(klon))
       ALLOCATE(JrNt(klon))
-      ALLOCATE(dthmin(klon), evap(klon), snowerosion(klon), fder(klon), plcl(klon), plfc(klon), icesub_lic(klon))
+      ALLOCATE(dthmin(klon), evap(klon), snowerosion(klon), fder(klon), plcl(klon), plfc(klon), icesub_ice(klon), icemelt_ice(klon))
       ALLOCATE(prw(klon), prlw(klon), prsw(klon), prbsw(klon), water_budget(klon), zustar(klon), zu10m(klon), zv10m(klon), rh2m(klon))
       ALLOCATE(s_lcl(klon))
@@ -1564,5 +1564,5 @@
       DEALLOCATE(cldm, cldq, cldt, qsat2m)
       DEALLOCATE(JrNt)
-      DEALLOCATE(dthmin, evap, snowerosion, icesub_lic, fder, plcl, plfc)
+      DEALLOCATE(dthmin, evap, snowerosion, icesub_ice, icemelt_ice, fder, plcl, plfc)
       DEALLOCATE(prw, prlw, prsw, prbsw, water_budget, zustar, zu10m, zv10m, rh2m, s_lcl)
       DEALLOCATE(s_pblh, s_pblt, s_therm)
Index: LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90	(revision 6050)
+++ LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90	(revision 6053)
@@ -384,6 +384,8 @@
   TYPE(ctrl_out), SAVE :: o_snowerosion = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    'snowerosion', 'blowing snow flux', 'kg/(s*m2)', (/ ('', i=1, 10) /))
-  TYPE(ctrl_out), SAVE :: o_icesub_lic = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
-   'icesub_lic', 'sublimation of ice over landice tiles, mesh-averaged', 'kg/(s*m2)', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_icesub_ice = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+   'icesub_ice', 'sublimation flux of ice over iced surfaces, mesh-averaged', 'kg/(s*m2)', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_icemelt_ice = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+   'icemelt_ice', 'melting flux of ice over iced surfaces, mesh-averaged', 'kg/(s*m2)', (/ ('', i=1, 10) /))
   TYPE(ctrl_out), SAVE :: o_ustart_lic = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 
     'ustart_lic', 'threshold velocity', 'm/s', (/ ('', i=1, 10) /))
Index: LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90	(revision 6050)
+++ LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90	(revision 6053)
@@ -51,5 +51,5 @@
          o_precip, o_rain_fall, o_rain_con, o_ndayrain, o_plul, o_pluc, o_plun, &
          o_snow, o_msnow, o_fsnow, o_evap, o_snowerosion, o_ustart_lic, o_qsalt_lic, o_rhosnow_lic, o_bsfall, &
-         o_icesub_lic, & 
+         o_icesub_ice, o_icemelt_ice, & 
          o_ep,o_epmax_diag, & ! epmax_cape
          o_tops, o_tops0, o_topl, o_topl0, &
@@ -360,5 +360,5 @@
     USE phys_local_var_mod, ONLY: zxfluxlat, slp, ptstar, pt0, zxtsol, zt2m, &
          zn2mout, t2m_min_mon, t2m_max_mon, evap, &
-         snowerosion, icesub_lic, zxustartlic, zxrhoslic, zxqsaltlic, &
+         snowerosion, icesub_ice, icemelt_ice, zxustartlic, zxrhoslic, zxqsaltlic, &
          l_mixmin,l_mix, pbl_eps, tke_shear, tke_buoy, tke_trans, &
          zu10m, zv10m, zq2m, zustar, zxqsurf, &
@@ -980,5 +980,6 @@
        CALL histwrite_phy(o_fsnow, zfra_o)
        CALL histwrite_phy(o_evap, evap)
-       CALL histwrite_phy(o_icesub_lic, icesub_lic)
+       CALL histwrite_phy(o_icesub_ice, icesub_ice)
+       CALL histwrite_phy(o_icemelt_ice, icemelt_ice)
 
        IF (ok_bs) THEN
Index: LMDZ6/trunk/libf/phylmd/physiq_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/physiq_mod.F90	(revision 6050)
+++ LMDZ6/trunk/libf/phylmd/physiq_mod.F90	(revision 6053)
@@ -275,5 +275,5 @@
          cldh, cldl,cldm, cldq, cldt,      &
          JrNt,                             &
-         dthmin, evap, snowerosion, icesub_lic, fder, plcl, plfc,   &
+         dthmin, evap, snowerosion, icesub_ice, icemelt_ice, fder, plcl, plfc,   &
          prw, prlw, prsw, prbsw, water_budget,         &
          s_lcl, s_pblh, s_pblt, s_therm,   &
@@ -2950,5 +2950,5 @@
             cdragh,    cdragm,  u1,    v1,            &
             beta_aridity, &
-            albsol_dir,   albsol_dif,   sens,    evap, snowerosion, icesub_lic, &
+            albsol_dir,   albsol_dif,   sens,    evap, snowerosion, icesub_ice, icemelt_ice, &
             albsol3_lic,runoff,   snowhgt,   qsnow, to_ice, sissnow, &
             zxtsol,    zxfluxlat, zt2m,    qsat2m,  zn2mout, &
Index: LMDZ6/trunk/libf/phylmd/simplehydrol_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/simplehydrol_mod.F90	(revision 6050)
+++ LMDZ6/trunk/libf/phylmd/simplehydrol_mod.F90	(revision 6053)
@@ -224,5 +224,5 @@
    SUBROUTINE simplehydrol(knon, nisurf, knindex, dtime, &
                            tsurf, precip_rain, precip_snow, &
-                           snow, qsol, tsurf_new, evap, ice_sub &
+                           snow, qsol, tsurf_new, evap, ice_sub, ice_melt &
 #ifdef ISO
                            , fq_fonte_diag, fqfonte_diag, snow_sub_diag, fqcalving_diag &
@@ -280,5 +280,7 @@
 !-----------------
 
-      REAL, DIMENSION(knon), INTENT(OUT)   :: ice_sub ! sublimation flux from ice over landice surfaces [kg/m2/s]
+      REAL, DIMENSION(knon), INTENT(OUT)   :: ice_sub ! sublimation flux from ice over iced surfaces [kg/m2/s]
+      REAL, DIMENSION(knon), INTENT(OUT)   :: ice_melt ! melting flux from ice over iced surfaces [kg/m2/s]
+
 #ifdef ISO
       ! diagnostics for isotopes
@@ -298,8 +300,7 @@
       INTEGER               :: i, j
       REAL                  :: fq_fonte ! quantify of snow that is melted [kg/m2]
-      REAL                  :: coeff_rel
+      REAL                  :: coeff_rel, chasno
       REAL, PARAMETER       :: snow_max = 3000. ! maximum snow amount over ice sheets [kg/m2]
       REAL, PARAMETER       :: max_eau_sol = 150.0 ! maximum water amount in the soil [kg/m2]
-      REAL, PARAMETER       :: chasno = 3.334E+05/(2.3867E+06*0.15) ! Latent heat of ice melting / (cp water) / tuning param=0.15
       REAL, DIMENSION(knon) :: ffonte    ! flux of energy associated with snow melting [W/m2]
       REAL, DIMENSION(knon) :: fqcalving ! flux of water associated with calving [kg/m2]
@@ -319,4 +320,5 @@
       coeff_rel = dtime/(tau_calv*rday)
       bil_eau_s(:) = 0.
+      chasno = 3.334E+05/(2.3867E+06*chasno_tun)
 
 ! Snow increment snow due to precipitation and sublimation
@@ -346,7 +348,7 @@
       END IF
 
-!---diagnostics of sublimation/condensation of ice over landice surfaces (when all the snow above has been sublimated)
-!---in principle it should be 0 when ok_lic_cond that is when surface water condensation over landice was not allowed
-      IF (nisurf == is_lic) THEN
+!---diagnostics of sublimation/condensation of ice over ice surfaces (when all the snow above has been sublimated)
+!---in principle it should be 0 when ok_lic_cond that is when surface water condensation over ice was not allowed
+      IF (nisurf .EQ. is_lic .OR. nisurf .EQ. is_sic) THEN
          DO i = 1, knon
             ice_sub(i) = evap(i) - snow_sub(i)
@@ -365,5 +367,5 @@
 
 ! Snow melting and calving (we remove the excess of snow wrt snowmax over ice sheets)
-! + update surface temperature
+! + update of surface temperature
 !****************************************************************************************
 
@@ -371,4 +373,5 @@
       fqcalving(:) = 0.0
       fqfonte(:) = 0.0
+      ice_melt(:) = 0.0
 
       ! snow melting
@@ -398,35 +401,23 @@
 
             ! snow/ice melting over ice surfaces
-            IF (nisurf == is_sic .OR. nisurf == is_lic) THEN
-               ! pay attention, melting over sea ice and landice
-               ! is not bounded by the amount of available snow (no MIN)
-               ! so when snow has been completely melted, the ice below melts
+            IF ((nisurf == is_sic .OR. nisurf == is_lic) .AND. ok_lic_melt .AND. snow(i) .GT. 0.) THEN
+               ! when snow has been completely melted, the ice below can melt
                ! which is an infinite source of water for the model
-               ! BUT:
-               ! when snow has been fully melted, the flux due to ice melting should be explicitly computed
-               ! why are we adding the flux to that previously computed (double counting).
-               ! why ffonte and tsurf_new updates are not in ok_lic_melt?
-               ! why over lic and sic we impose tsurf=RTT and not over lands when snow remains?
-               ! now by default, ok_lic_melt = false which means ffonte and fqfonte are not consistent
-               ! moreover, imposing tsurf_new=RTT means that the update in tsurf is not consistent
-               ! with the quantity of melting snow.
-               !
-               ! Suggestion:
-               ! -  compute separately fq_fonte over lic/sic only if ok_lic_melt (lower-bound by 0 and not snow)
-               ! - add an output variable ice_melt = max(0,fq_fonte - snow)/dtime to quantify the melt of ice (net water source)
-               !   and update snow with the melt of snow only i.e. fq_fonte - ice_melt
-               ! - remove the tsurf_new = RTT over lic and sic but implies a loss of convergence 
-
                fq_fonte = MAX((tsurf_new(i) - RTT)/chasno, 0.0)
                ffonte(i) = ffonte(i) + fq_fonte*RLMLT/dtime
-
-               IF (ok_lic_melt) THEN
-                  fqfonte(i) = fqfonte(i) + fq_fonte/dtime
-                  bil_eau_s(i) = bil_eau_s(i) + fq_fonte
-               END IF
+               fqfonte(i) = fqfonte(i) + fq_fonte/dtime
+               bil_eau_s(i) = bil_eau_s(i) + fq_fonte
+               tsurf_new(i) = tsurf_new(i) - fq_fonte*chasno
+               ice_melt(i) = fq_fonte/dtime
+            END IF
+
+            ! surface temperature tendency associated with snow and icemelting
+            IF (forc_ts_melt) THEN
                tsurf_new(i) = RTT
-            END IF
+            ENDIF
+      
             d_ts(i) = tsurf_new(i) - tsurf(i)
-         END IF
+         
+       END IF
 
          ! so called 'calving', if there is an excess of snow wrt snowmax
Index: LMDZ6/trunk/libf/phylmd/surf_land_bucket_hetero_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/surf_land_bucket_hetero_mod.F90	(revision 6050)
+++ LMDZ6/trunk/libf/phylmd/surf_land_bucket_hetero_mod.F90	(revision 6053)
@@ -108,5 +108,5 @@
     REAL, DIMENSION(knon) :: soilcap, soilflux
     REAL, DIMENSION(knon) :: cal, beta, dif_grnd, capsol
-    REAL, DIMENSION(knon) :: alb_neig, alb_lim, icesub
+    REAL, DIMENSION(knon) :: alb_neig, alb_lim, icesub, icemelt
     REAL, DIMENSION(knon) :: zfra
     REAL, DIMENSION(knon) :: radsol
@@ -239,5 +239,5 @@
       CALL simplehydrol( knon, is_ter, knindex, dtime, &
            tsurf, precip_rain, precip_snow, &
-           snow, qsol, tsurf_new, evap, icesub &
+           snow, qsol, tsurf_new, evap, icesub, icemelt &
 #ifdef ISO    
      & ,fq_fonte_diag,fqfonte_diag,snow_evap_diag,fqcalving_diag   &
@@ -363,5 +363,5 @@
         CALL simplehydrol( knon, is_ter, knindex, dtime, &
              tsurf_tersrf(:,j), precip_rain, precip_snow, &
-             snow, qsol, tsurf_new_tersrf(:,j), evap_tersrf(:,j), icesub &
+             snow, qsol, tsurf_new_tersrf(:,j), evap_tersrf(:,j), icesub, icemelt &
 #ifdef ISO    
      & ,fq_fonte_diag,fqfonte_diag,snow_evap_diag,fqcalving_diag   &
Index: LMDZ6/trunk/libf/phylmd/surf_land_bucket_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/surf_land_bucket_mod.F90	(revision 6050)
+++ LMDZ6/trunk/libf/phylmd/surf_land_bucket_mod.F90	(revision 6053)
@@ -108,5 +108,5 @@
     REAL, DIMENSION(knon) :: soilcap, soilflux
     REAL, DIMENSION(knon) :: cal, beta, dif_grnd, capsol
-    REAL, DIMENSION(knon) :: alb_neig, alb_lim, icesub
+    REAL, DIMENSION(knon) :: alb_neig, alb_lim, icesub, icemelt
     REAL, DIMENSION(knon) :: zfra
     REAL, DIMENSION(knon) :: radsol       ! total net radiance at surface
@@ -250,5 +250,5 @@
     CALL simplehydrol( knon, is_ter, knindex, dtime, &
          tsurf, precip_rain, precip_snow, &
-         snow, qsol, tsurf_new, evap, icesub &
+         snow, qsol, tsurf_new, evap, icesub, icemelt &
 #ifdef ISO    
      & ,fq_fonte_diag,fqfonte_diag,snow_evap_diag,fqcalving_diag   &
Index: LMDZ6/trunk/libf/phylmd/surf_landice_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/surf_landice_mod.F90	(revision 6050)
+++ LMDZ6/trunk/libf/phylmd/surf_landice_mod.F90	(revision 6053)
@@ -57,5 +57,5 @@
        ps, u1, v1, gustiness, rugoro, pctsrf, &
        snow, qsurf, qsol, qbs1, agesno, &
-       tsoil, z0m, z0h, SFRWL, alb_dir, alb_dif, evap, icesub_lic, fluxsens, fluxlat, fluxbs, &
+       tsoil, z0m, z0h, SFRWL, alb_dir, alb_dif, evap, icesub, icemelt, fluxsens, fluxlat, fluxbs, &
        tsurf_new, dflux_s, dflux_l, &
        alt, slope, cloudf, &
@@ -161,5 +161,5 @@
     REAL, DIMENSION(knon,nsw), INTENT(OUT)        :: alb_dir,alb_dif
 !albedo SB <<<
-    REAL, DIMENSION(knon), INTENT(OUT)            :: evap, fluxsens, fluxlat, icesub_lic
+    REAL, DIMENSION(knon), INTENT(OUT)            :: evap, fluxsens, fluxlat, icesub, icemelt
     REAL, DIMENSION(knon), INTENT(OUT)            :: fluxbs
     REAL, DIMENSION(knon), INTENT(OUT)            :: tsurf_new
@@ -644,5 +644,5 @@
     CALL simplehydrol(knon, is_lic, knindex, dtime, &
          tsurf, precip_rain, precip_totsnow, &
-         snow, qsol, tsurf_new, evap_totsnow, icesub_lic &
+         snow, qsol, tsurf_new, evap_totsnow, icesub, icemelt &
 #ifdef ISO    
      &  ,fq_fonte_diag,fqfonte_diag,snow_evap_diag,fqcalving_diag     &
Index: LMDZ6/trunk/libf/phylmd/surf_seaice_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/surf_seaice_mod.F90	(revision 6050)
+++ LMDZ6/trunk/libf/phylmd/surf_seaice_mod.F90	(revision 6053)
@@ -19,5 +19,5 @@
        ps, u1, v1, gustiness, pctsrf, &
        snow, qsurf, qsol, agesno, tsoil, &
-       z0m, z0h, SFRWL, alb_dir_new, alb_dif_new, evap, fluxsens, fluxlat, &  
+       z0m, z0h, SFRWL, alb_dir_new, alb_dif_new, evap, icesub, icemelt, fluxsens, fluxlat, &  
        tsurf_new, dflux_s, dflux_l, &
 !GG       flux_u1, flux_v1)
@@ -105,4 +105,5 @@
 !albedo SB <<<
     REAL, DIMENSION(knon), INTENT(OUT)       :: evap, fluxsens, fluxlat
+    REAL, DIMENSION(knon), INTENT(OUT)       :: icesub, icemelt ! sublimation and melting fluxes of ice over iced surfaces [kg/m2/s]
     REAL, DIMENSION(knon), INTENT(OUT)       :: tsurf_new
     REAL, DIMENSION(knon), INTENT(OUT)       :: dflux_s, dflux_l      
@@ -184,10 +185,8 @@
             AcoefH, AcoefQ, BcoefH, BcoefQ, &
             AcoefU, AcoefV, BcoefU, BcoefV, &
-!GG            ps, u1, v1, gustiness, &
             ps, u1, v1, gustiness,pctsrf, &
-!GG
             radsol, snow, qsol, agesno, tsoil, &
             qsurf, alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, &
-!GG            tsurf_new, dflux_s, dflux_l, rhoa)
+            icesub, icemelt, &
             tsurf_new, dflux_s, dflux_l,rhoa,swnet,hice, tice, bilg_cumul, &
             fcds, fcdi, dh_basal_growth, dh_basal_melt, dh_top_melt, dh_snow2sic, &
