Index: trunk/LMDZ.COMMON/libf/evolution/tendencies.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/tendencies.F90	(revision 4135)
+++ trunk/LMDZ.COMMON/libf/evolution/tendencies.F90	(revision 4140)
@@ -28,5 +28,5 @@
 
 !=======================================================================
-SUBROUTINE compute_tendice(min_ice,is_perice,d_ice)
+SUBROUTINE compute_tendice(min_perice,min_frost,perice,d_ice)
 !-----------------------------------------------------------------------
 ! NAME
@@ -51,12 +51,13 @@
 ! ARGUMENTS
 ! ---------
-real(dp),    dimension(:,:,:), intent(in)  :: min_ice
-logical(k4), dimension(:,:),   intent(in)  :: is_perice
-real(dp),    dimension(:,:),   intent(out) :: d_ice
+real(dp), dimension(:,:,:), intent(in)  :: min_perice
+real(dp), dimension(:,:,:), intent(in)  :: min_frost
+real(dp), dimension(:,:),   intent(in)  :: perice
+real(dp), dimension(:,:),   intent(out) :: d_ice
 
 ! CODE
 ! ----
 ! We compute the difference to get the tendency
-d_ice(:,:) = min_ice(:,:,2) - min_ice(:,:,1)
+d_ice(:,:) = min_perice(:,:,2) + min_frost(:,:,2) - (min_perice(:,:,1) + min_frost(:,:,1))
 
 ! If the difference is too small, then there is no evolution
@@ -64,5 +65,5 @@
 
 ! If the tendency is negative but there is no ice reservoir for the PEM
-where (abs(d_ice) < 0._dp .and. .not. is_perice) d_ice = 0._dp
+where (d_ice < 0._dp .and. abs(perice) < minieps) d_ice = 0._dp
 
 END SUBROUTINE compute_tendice
