Index: NEMO/branches/2020/dev_r13541_TOP-01_rlod_Antarctic_ice_Sheet_Fe_Source/src/ICE/iceitd.F90
===================================================================
--- NEMO/branches/2020/dev_r13541_TOP-01_rlod_Antarctic_ice_Sheet_Fe_Source/src/ICE/iceitd.F90	(revision 13886)
+++ NEMO/branches/2020/dev_r13541_TOP-01_rlod_Antarctic_ice_Sheet_Fe_Source/src/ICE/iceitd.F90	(revision 14015)
@@ -29,4 +29,5 @@
    USE lib_fortran    ! fortran utilities (glob_sum + no signed zero)
    USE prtctl         ! Print control
+   USE timing         ! Timing
 
    IMPLICIT NONE
@@ -87,4 +88,5 @@
       REAL(wp), DIMENSION(jpij,0:jpl) ::   zhbnew          ! new boundaries of ice categories
       !!------------------------------------------------------------------
+      IF( ln_timing )   CALL timing_start('iceitd_rem')
 
       IF( kt == nit000 .AND. lwp )   WRITE(numout,*) '-- ice_itd_rem: remapping ice thickness distribution' 
@@ -315,5 +317,5 @@
             IF ( a_i_1d(ji) > epsi10 .AND. h_i_1d(ji) < rn_himin ) THEN
                a_i_1d(ji) = a_i_1d(ji) * h_i_1d(ji) / rn_himin 
-               IF( ln_pnd_LEV )   a_ip_1d(ji) = a_ip_1d(ji) * h_i_1d(ji) / rn_himin
+               IF( ln_pnd_LEV .OR. ln_pnd_TOPO )   a_ip_1d(ji) = a_ip_1d(ji) * h_i_1d(ji) / rn_himin
                h_i_1d(ji) = rn_himin
             ENDIF
@@ -328,4 +330,5 @@
       IF( ln_icediachk )   CALL ice_cons_hsm(1, 'iceitd_rem', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft)
       IF( ln_icediachk )   CALL ice_cons2D  (1, 'iceitd_rem',  diag_v,  diag_s,  diag_t,  diag_fv,  diag_fs,  diag_ft)
+      IF( ln_timing    )   CALL timing_stop ('iceitd_rem')
       !
    END SUBROUTINE ice_itd_rem
@@ -486,15 +489,15 @@
                zaTsfn(ji,jl2)  = zaTsfn(ji,jl2) + ztrans
                !  
-               IF ( ln_pnd_LEV ) THEN
+               IF ( ln_pnd_LEV .OR. ln_pnd_TOPO ) THEN
                   ztrans          = a_ip_2d(ji,jl1) * zworka(ji)     ! Pond fraction
                   a_ip_2d(ji,jl1) = a_ip_2d(ji,jl1) - ztrans
                   a_ip_2d(ji,jl2) = a_ip_2d(ji,jl2) + ztrans
                   !                                              
-                  ztrans          = v_ip_2d(ji,jl1) * zworka(ji)     ! Pond volume (also proportional to da/a)
+                  ztrans          = v_ip_2d(ji,jl1) * zworkv(ji)     ! Pond volume
                   v_ip_2d(ji,jl1) = v_ip_2d(ji,jl1) - ztrans
                   v_ip_2d(ji,jl2) = v_ip_2d(ji,jl2) + ztrans
                   !
                   IF ( ln_pnd_lids ) THEN                            ! Pond lid volume
-                     ztrans          = v_il_2d(ji,jl1) * zworka(ji)
+                     ztrans          = v_il_2d(ji,jl1) * zworkv(ji)
                      v_il_2d(ji,jl1) = v_il_2d(ji,jl1) - ztrans
                      v_il_2d(ji,jl2) = v_il_2d(ji,jl2) + ztrans
@@ -606,4 +609,5 @@
       REAL(wp), DIMENSION(jpij,jpl-1) ::   zdaice, zdvice   ! ice area and volume transferred
       !!------------------------------------------------------------------
+      IF( ln_timing )   CALL timing_start('iceitd_reb')
       !
       IF( kt == nit000 .AND. lwp )   WRITE(numout,*) '-- ice_itd_reb: rebining ice thickness distribution' 
@@ -635,13 +639,10 @@
                jdonor(ji,jl)  = jl 
                ! how much of a_i you send in cat sup is somewhat arbitrary
-               !!clem: these do not work properly after a restart (I do not know why) => not sure it is still true
-               !!          zdaice(ji,jl)  = a_i_1d(ji) * ( h_i_1d(ji) - hi_max(jl) + epsi10 ) / h_i_1d(ji)  
-               !!          zdvice(ji,jl)  = v_i_1d(ji) - ( a_i_1d(ji) - zdaice(ji,jl) ) * ( hi_max(jl) - epsi10 )
-               !!clem: these do not work properly after a restart (I do not know why) => not sure it is still true
-               !!          zdaice(ji,jl)  = a_i_1d(ji)
-               !!          zdvice(ji,jl)  = v_i_1d(ji)
-               !!clem: these are from UCL and work ok
-               zdaice(ji,jl)  = a_i_1d(ji) * 0.5_wp
-               zdvice(ji,jl)  = v_i_1d(ji) - zdaice(ji,jl) * ( hi_max(jl) + hi_max(jl-1) ) * 0.5_wp
+               ! these are from CICE => transfer everything
+               !!zdaice(ji,jl)  = a_i_1d(ji)
+               !!zdvice(ji,jl)  = v_i_1d(ji)
+               ! these are from LLN => transfer only half of the category
+               zdaice(ji,jl)  =                       0.5_wp  * a_i_1d(ji)
+               zdvice(ji,jl)  = v_i_1d(ji) - (1._wp - 0.5_wp) * a_i_1d(ji) * hi_mean(jl)
             END DO
             !
@@ -686,4 +687,5 @@
       IF( ln_icediachk )   CALL ice_cons_hsm(1, 'iceitd_reb', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft)
       IF( ln_icediachk )   CALL ice_cons2D  (1, 'iceitd_reb',  diag_v,  diag_s,  diag_t,  diag_fv,  diag_fs,  diag_ft)
+      IF( ln_timing    )   CALL timing_stop ('iceitd_reb')
       !
    END SUBROUTINE ice_itd_reb
