Index: NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/ICE/icethd_pnd.F90
===================================================================
--- NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/ICE/icethd_pnd.F90	(revision 12830)
+++ NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/ICE/icethd_pnd.F90	(revision 12831)
@@ -35,6 +35,6 @@
    !                                   ! associated indices:
    INTEGER, PARAMETER ::   np_pndNO  = 0   ! No pond scheme
-   INTEGER, PARAMETER ::   np_pndCST = 1   ! Constant pond scheme
-   INTEGER, PARAMETER ::   np_pndH12 = 2   ! Evolutive pond scheme (Holland et al. 2012)
+   INTEGER, PARAMETER ::   np_pndCST = 1   ! Constant ice pond scheme
+   INTEGER, PARAMETER ::   np_pndLEV = 2   ! Level ice pond scheme
 
    !! * Substitutions
@@ -51,7 +51,6 @@
       !!               ***  ROUTINE ice_thd_pnd   ***
       !!               
-      !! ** Purpose :   change melt pond fraction
+      !! ** Purpose :   change melt pond fraction and thickness
       !!                
-      !! ** Method  :   brut force
       !!-------------------------------------------------------------------
       !
@@ -60,5 +59,5 @@
       CASE (np_pndCST)   ;   CALL pnd_CST    !==  Constant melt ponds  ==!
          !
-      CASE (np_pndH12)   ;   CALL pnd_H12    !==  Holland et al 2012 melt ponds  ==!
+      CASE (np_pndLEV)   ;   CALL pnd_LEV    !==  Level ice melt ponds  ==!
          !
       END SELECT
@@ -102,7 +101,7 @@
 
 
-   SUBROUTINE pnd_H12
-      !!-------------------------------------------------------------------
-      !!                ***  ROUTINE pnd_H12  ***
+   SUBROUTINE pnd_LEV
+      !!-------------------------------------------------------------------
+      !!                ***  ROUTINE pnd_LEV  ***
       !!
       !! ** Purpose : Compute melt pond evolution
@@ -196,5 +195,5 @@
             !--- available meltwater for melt ponding ---!
             zdum    = -( dh_i_sum(ji)*rhoi + dh_s_mlt(ji)*rhos ) * z1_rhow * a_i_1d(ji)
-            zfr_mlt = rn_apnd_min + ( rn_apnd_max - rn_apnd_min ) * at_i_1d(ji) !  = ( 1 - r ) in H12 = fraction of melt water that is not flushed
+            zfr_mlt = rn_apnd_min + ( rn_apnd_max - rn_apnd_min ) * at_i_1d(ji) !  = ( 1 - r ) = fraction of melt water that is not flushed
             zdv_mlt = MAX( 0._wp, zfr_mlt * zdum ) ! max for roundoff errors? 
             !
@@ -261,28 +260,25 @@
             ! Pond flushing !
             !---------------!
-            IF( ln_pnd_flush ) THEN
-               ! height of top of the pond above sea-level
-               zhp = ( h_i_1d(ji) * ( rau0 - rhoi ) + h_ip_1d(ji) * ( rau0 - rhow * a_ip_1d(ji) / a_i_1d(ji) ) ) * r1_rau0
-
-               ! Calculate the permeability of the ice (Assur 1958, see Flocco 2010)
-               DO jk = 1, nlay_i
-                  zsbr = - 1.2_wp                                  &
-                     &   - 21.8_wp    * ( t_i_1d(ji,jk) - rt0 )    &
-                     &   - 0.919_wp   * ( t_i_1d(ji,jk) - rt0 )**2 &
-                     &   - 0.0178_wp  * ( t_i_1d(ji,jk) - rt0 )**3
-                  ztmp(jk) = sz_i_1d(ji,jk) / zsbr
-               END DO
-               zperm = MAX( 0._wp, 3.e-08_wp * MINVAL(ztmp)**3 )
-
-               ! Do the drainage using Darcy's law
-               zdv_flush   = -zperm * rau0 * grav * zhp * rdt_ice / (zvisc * h_i_1d(ji)) * a_ip_1d(ji)
-               zdv_flush   = MAX( zdv_flush, -v_ip_1d(ji) )
-               v_ip_1d(ji) = v_ip_1d(ji) + zdv_flush
-               
-               !--- Set new pond area and depth ---! assuming linear relation between h_ip and a_ip_frac
-               a_ip_1d(ji)      = MIN( a_i_1d(ji), SQRT( v_ip_1d(ji) * z1_aspect * a_i_1d(ji) ) ) ! make sure a_ip < a_i
-               h_ip_1d(ji)      = zaspect * a_ip_1d(ji) / a_i_1d(ji)
-
-            ENDIF
+            ! height of top of the pond above sea-level
+            zhp = ( h_i_1d(ji) * ( rau0 - rhoi ) + h_ip_1d(ji) * ( rau0 - rhow * a_ip_1d(ji) / a_i_1d(ji) ) ) * r1_rau0
+            
+            ! Calculate the permeability of the ice (Assur 1958, see Flocco 2010)
+            DO jk = 1, nlay_i
+               zsbr = - 1.2_wp                                  &
+                  &   - 21.8_wp    * ( t_i_1d(ji,jk) - rt0 )    &
+                  &   - 0.919_wp   * ( t_i_1d(ji,jk) - rt0 )**2 &
+                  &   - 0.0178_wp  * ( t_i_1d(ji,jk) - rt0 )**3
+               ztmp(jk) = sz_i_1d(ji,jk) / zsbr
+            END DO
+            zperm = MAX( 0._wp, 3.e-08_wp * MINVAL(ztmp)**3 )
+            
+            ! Do the drainage using Darcy's law
+            zdv_flush   = -zperm * rau0 * grav * zhp * rdt_ice / (zvisc * h_i_1d(ji)) * a_ip_1d(ji)
+            zdv_flush   = MAX( zdv_flush, -v_ip_1d(ji) )
+            v_ip_1d(ji) = v_ip_1d(ji) + zdv_flush
+            
+            !--- Set new pond area and depth ---! assuming linear relation between h_ip and a_ip_frac
+            a_ip_1d(ji)      = MIN( a_i_1d(ji), SQRT( v_ip_1d(ji) * z1_aspect * a_i_1d(ji) ) ) ! make sure a_ip < a_i
+            h_ip_1d(ji)      = zaspect * a_ip_1d(ji) / a_i_1d(ji)
 
             !--- Corrections and lid thickness ---!
@@ -304,5 +300,5 @@
       END DO
       !
-   END SUBROUTINE pnd_H12
+   END SUBROUTINE pnd_LEV
 
 
@@ -321,7 +317,7 @@
       INTEGER  ::   ios, ioptio   ! Local integer
       !!
-      NAMELIST/namthd_pnd/  ln_pnd, ln_pnd_H12, ln_pnd_lids, ln_pnd_flush, rn_apnd_min, rn_apnd_max, &
-         &                          ln_pnd_CST, rn_apnd, rn_hpnd, &
-         &                          ln_pnd_alb
+      NAMELIST/namthd_pnd/  ln_pnd, ln_pnd_LEV , rn_apnd_min, rn_apnd_max, &
+         &                          ln_pnd_CST , rn_apnd, rn_hpnd,         &
+         &                          ln_pnd_lids, ln_pnd_alb
       !!-------------------------------------------------------------------
       !
@@ -340,12 +336,11 @@
          WRITE(numout,*) '   Namelist namicethd_pnd:'
          WRITE(numout,*) '      Melt ponds activated or not                                 ln_pnd       = ', ln_pnd
-         WRITE(numout,*) '         Evolutive  melt pond fraction and depth                  ln_pnd_H12   = ', ln_pnd_H12
-         WRITE(numout,*) '            Melt ponds can have frozen lids                       ln_pnd_lids  = ', ln_pnd_lids
-         WRITE(numout,*) '            Allow ponds to flush thru the ice                     ln_pnd_flush = ', ln_pnd_flush
+         WRITE(numout,*) '         Level ice melt pond scheme                               ln_pnd_LEV   = ', ln_pnd_LEV
          WRITE(numout,*) '            Minimum ice fraction that contributes to melt ponds   rn_apnd_min  = ', rn_apnd_min
          WRITE(numout,*) '            Maximum ice fraction that contributes to melt ponds   rn_apnd_max  = ', rn_apnd_max
-         WRITE(numout,*) '         Prescribed melt pond fraction and depth                  ln_pnd_CST   = ', ln_pnd_CST
+         WRITE(numout,*) '         Constant ice melt pond scheme                            ln_pnd_CST   = ', ln_pnd_CST
          WRITE(numout,*) '            Prescribed pond fraction                              rn_apnd      = ', rn_apnd
          WRITE(numout,*) '            Prescribed pond depth                                 rn_hpnd      = ', rn_hpnd
+         WRITE(numout,*) '         Frozen lids on top of melt ponds                         ln_pnd_lids  = ', ln_pnd_lids
          WRITE(numout,*) '         Melt ponds affect albedo or not                          ln_pnd_alb   = ', ln_pnd_alb
       ENDIF
@@ -355,11 +350,14 @@
       IF( .NOT.ln_pnd ) THEN   ;   ioptio = ioptio + 1   ;   nice_pnd = np_pndNO     ;   ENDIF
       IF( ln_pnd_CST  ) THEN   ;   ioptio = ioptio + 1   ;   nice_pnd = np_pndCST    ;   ENDIF
-      IF( ln_pnd_H12  ) THEN   ;   ioptio = ioptio + 1   ;   nice_pnd = np_pndH12    ;   ENDIF
+      IF( ln_pnd_LEV  ) THEN   ;   ioptio = ioptio + 1   ;   nice_pnd = np_pndLEV    ;   ENDIF
       IF( ioptio /= 1 )   &
-         & CALL ctl_stop( 'ice_thd_pnd_init: choose either none (ln_pnd=F) or only one pond scheme (ln_pnd_H12 or ln_pnd_CST)' )
+         & CALL ctl_stop( 'ice_thd_pnd_init: choose either none (ln_pnd=F) or only one pond scheme (ln_pnd_LEV or ln_pnd_CST)' )
       !
       SELECT CASE( nice_pnd )
       CASE( np_pndNO )         
-         IF( ln_pnd_alb ) THEN ; ln_pnd_alb = .FALSE. ; CALL ctl_warn( 'ln_pnd_alb=false when no ponds' ) ; ENDIF
+         IF( ln_pnd_alb  ) THEN ; ln_pnd_alb  = .FALSE. ; CALL ctl_warn( 'ln_pnd_alb=false when no ponds' )  ; ENDIF
+         IF( ln_pnd_lids ) THEN ; ln_pnd_lids = .FALSE. ; CALL ctl_warn( 'ln_pnd_lids=false when no ponds' ) ; ENDIF
+      CASE( np_pndCST )         
+         IF( ln_pnd_lids ) THEN ; ln_pnd_lids = .FALSE. ; CALL ctl_warn( 'ln_pnd_lids=false when constant ponds' ) ; ENDIF
       END SELECT
       !
