Index: trunk/LMDZ.COMMON/libf/evolution/tendencies.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/tendencies.F90	(revision 4170)
+++ trunk/LMDZ.COMMON/libf/evolution/tendencies.F90	(revision 4180)
@@ -18,5 +18,5 @@
 ! DEPENDENCIES
 ! ------------
-use numerics, only: dp, di, k4, minieps, tol
+use numerics, only: dp, di, k4, eps
 
 ! DECLARATION
@@ -62,8 +62,8 @@
 
 ! If the difference is too small, then there is no evolution
-where (abs(d_ice) < minieps) d_ice = 0._dp
+where (abs(d_ice) < eps) d_ice = 0._dp
 
 ! If the tendency is negative but there is no ice reservoir for the PEM
-where (d_ice(:,:) < 0._dp .and. abs(perice(:,:)) < minieps) d_ice(:,:) = 0._dp
+where (d_ice(:,:) < 0._dp .and. abs(perice(:,:)) < eps) d_ice(:,:) = 0._dp
 
 END SUBROUTINE compute_tendice
@@ -170,10 +170,10 @@
 ! ARGUMENTS
 ! ---------
-real(dp), dimension(:,:),     intent(in) :: h2oice_depth_old ! Old H2O ice depth
-real(dp), dimension(:,:),     intent(in) :: h2oice_depth_new ! New H2O ice depth
-real(dp), dimension(:,:),     intent(in) :: tsurf            ! Surface temperature
-real(dp), dimension(:,:,:,:), intent(in) :: tsoil_ts_old     ! Old soil temperature time series
-real(dp), dimension(:,:,:,:), intent(in) :: tsoil_ts_new     ! New soil temperature time series
-real(dp), dimension(:,:),     intent(inout) :: flux_ssice_avg       ! Tendency of sub-surface ice
+real(dp), dimension(:,:),     intent(in)    :: h2oice_depth_old ! Old H2O ice depth
+real(dp), dimension(:,:),     intent(in)    :: h2oice_depth_new ! New H2O ice depth
+real(dp), dimension(:,:),     intent(in)    :: tsurf            ! Surface temperature
+real(dp), dimension(:,:,:,:), intent(in)    :: tsoil_ts_old     ! Old soil temperature time series
+real(dp), dimension(:,:,:,:), intent(in)    :: tsoil_ts_new     ! New soil temperature time series
+real(dp), dimension(:,:),     intent(inout) :: flux_ssice_avg   ! Tendency of sub-surface ice
 
 ! LOCAL VARIABLES
@@ -190,7 +190,7 @@
     do islope = 1,nslope
         ! Higher resistance due to growing lag layer (higher depth)
-        Rz_old = h2oice_depth_old(i,islope)*zcdv/coef_ssdif_PCM(i,islope) ! Old resistance from PCM
-        Rz_new = h2oice_depth_new(i,islope)*zcdv/coef_ssdif_PCM(i,islope) ! New resistance based on new depth
-        R_dec = Rz_old/Rz_new ! Decrease because of resistance
+        Rz_old = h2oice_depth_old(i,islope)*zcdv/max(abs(coef_ssdif_PCM(i,islope)),eps) ! Old resistance from PCM
+        Rz_new = h2oice_depth_new(i,islope)*zcdv/max(abs(coef_ssdif_PCM(i,islope)),eps) ! New resistance based on new depth
+        R_dec = Rz_old/max(Rz_new,eps) ! Decrease because of resistance
 
         ! The maxmimum of the daily averages over one year for the saturation vapor pressure at the ice table location
@@ -203,5 +203,5 @@
 
         ! Lower humidity due to growing lag layer (higher depth)
-        if (abs(psv_max_old) < tol) then
+        if (abs(psv_max_old) < eps) then
             hum_dec = 1._dp
         else
