Index: /NEMO/branches/2020/SI3_martin_ponds/cfgs/SHARED/namelist_ice_ref
===================================================================
--- /NEMO/branches/2020/SI3_martin_ponds/cfgs/SHARED/namelist_ice_ref	(revision 13961)
+++ /NEMO/branches/2020/SI3_martin_ponds/cfgs/SHARED/namelist_ice_ref	(revision 13962)
@@ -62,4 +62,10 @@
       rn_lf_relax   =   1.e-5         !        relaxation time scale to reach static friction [s-1]
       rn_lf_tensile =   0.05          !        isotropic tensile strength [0-0.5??]
+
+   cn_dir           = './'      !  root directory for the grounded icebergs mask data location
+   !___________!________________!___________________!___________!_____________!________!___________!__________!__________!_______________!
+   !           !  file name     ! frequency (hours) ! variable  ! time interp.!  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+   !           !                !  (if <0  months)  !   name    !   (logical) !  (T/F) ! 'monthly' ! filename ! pairing  !    filename   !
+   sn_icbmsk       = 'NOT USED' ,       -12.        , 'icb_mask',   .false.   , .true. , 'yearly'  , ''       , ''       , ''
 /
 !------------------------------------------------------------------------------
Index: /NEMO/branches/2020/SI3_martin_ponds/src/ICE/ice.F90
===================================================================
--- /NEMO/branches/2020/SI3_martin_ponds/src/ICE/ice.F90	(revision 13961)
+++ /NEMO/branches/2020/SI3_martin_ponds/src/ICE/ice.F90	(revision 13962)
@@ -343,4 +343,5 @@
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)     ::   om_i          !: mean ice age over all categories                        (s)
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)     ::   tau_icebfr    !: ice friction on ocean bottom (landfast param activated)
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)     ::   icb_mask      !: mask of grounded icebergs if landfast [0-1]
 
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) ::   t_s           !: Snow temperatures     [K]
@@ -476,5 +477,5 @@
          &      et_i (jpi,jpj) , et_s (jpi,jpj) , tm_i(jpi,jpj) , tm_s(jpi,jpj) ,  &
          &      sm_i (jpi,jpj) , tm_su(jpi,jpj) , hm_i(jpi,jpj) , hm_s(jpi,jpj) ,  &
-         &      om_i (jpi,jpj) , bvm_i(jpi,jpj) , tau_icebfr(jpi,jpj)            , STAT=ierr(ii) )
+         &      om_i (jpi,jpj) , bvm_i(jpi,jpj) , tau_icebfr(jpi,jpj), icb_mask(jpi,jpj), STAT=ierr(ii) )
 
       ii = ii + 1
Index: /NEMO/branches/2020/SI3_martin_ponds/src/ICE/icedyn.F90
===================================================================
--- /NEMO/branches/2020/SI3_martin_ponds/src/ICE/icedyn.F90	(revision 13961)
+++ /NEMO/branches/2020/SI3_martin_ponds/src/ICE/icedyn.F90	(revision 13962)
@@ -29,4 +29,5 @@
    USE lbclnk         ! lateral boundary conditions (or mpp links)
    USE timing         ! Timing
+   USE fldread        ! read input fields
 
    IMPLICIT NONE
@@ -51,4 +52,6 @@
    REAL(wp) ::   rn_vice          !    prescribed v-vel (case np_dynADV1D & np_dynADV2D)
    
+   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_icbmsk   ! structure of input grounded icebergs mask (file informations, fields read)
+
    !! * Substitutions
 #  include "do_loop_substitute.h90"
@@ -81,5 +84,5 @@
       !
       ! controls
-      IF( ln_timing )   CALL timing_start('icedyn')
+      IF( ln_timing )   CALL timing_start('ice_dyn')
       !
       IF( kt == nit000 .AND. lwp ) THEN
@@ -106,4 +109,8 @@
       END WHERE
       !
+      IF( ln_landfast_L16 ) THEN
+         CALL fld_read( kt, 1, sf_icbmsk )
+         icb_mask(:,:) = sf_icbmsk(1)%fnow(:,:,1)
+      ENDIF
       !
       SELECT CASE( nice_dyn )          !-- Set which dynamics is running
@@ -172,5 +179,5 @@
       !
       ! controls
-      IF( ln_timing )   CALL timing_stop ('icedyn')
+      IF( ln_timing )   CALL timing_stop ('ice_dyn')
       !
    END SUBROUTINE ice_dyn
@@ -216,9 +223,13 @@
       !! ** input   :   Namelist namdyn
       !!-------------------------------------------------------------------
-      INTEGER ::   ios, ioptio   ! Local integer output status for namelist read
+      INTEGER ::   ios, ioptio, ierror   ! Local integer output status for namelist read
+      !
+      CHARACTER(len=256) ::   cn_dir     ! Root directory for location of ice files
+      TYPE(FLD_N)        ::   sn_icbmsk  ! informations about the grounded icebergs field to be read
       !!
       NAMELIST/namdyn/ ln_dynALL, ln_dynRHGADV, ln_dynADV1D, ln_dynADV2D, rn_uice, rn_vice,  &
          &             rn_ishlat ,                                                           &
-         &             ln_landfast_L16, rn_lf_depfra, rn_lf_bfr, rn_lf_relax, rn_lf_tensile
+         &             ln_landfast_L16, rn_lf_depfra, rn_lf_bfr, rn_lf_relax, rn_lf_tensile, &
+         &             sn_icbmsk, cn_dir
       !!-------------------------------------------------------------------
       !
@@ -269,4 +280,21 @@
       IF( .NOT.ln_landfast_L16 )   tau_icebfr(:,:) = 0._wp
       !
+      !                                      !--- allocate and fill structure for grounded icebergs mask
+      IF( ln_landfast_L16 ) THEN
+         ALLOCATE( sf_icbmsk(1), STAT=ierror )
+         IF( ierror > 0 ) THEN
+            CALL ctl_stop( 'ice_dyn_init: unable to allocate sf_icbmsk structure' ) ; RETURN
+         ENDIF
+         !
+         CALL fld_fill( sf_icbmsk, (/ sn_icbmsk /), cn_dir, 'ice_dyn_init',   &
+            &                                               'landfast ice is a function of read grounded icebergs', 'icedyn' )
+         !
+         ALLOCATE( sf_icbmsk(1)%fnow(jpi,jpj,1) )
+         IF( sf_icbmsk(1)%ln_tint )   ALLOCATE( sf_icbmsk(1)%fdta(jpi,jpj,1,2) )
+         IF( TRIM(sf_icbmsk(1)%clrootname) == 'NOT USED' ) sf_icbmsk(1)%fnow(:,:,1) = 0._wp   ! not used field  (set to 0)         
+      ELSE
+         icb_mask(:,:) = 0._wp
+      ENDIF
+      !                                      !--- other init 
       CALL ice_dyn_rdgrft_init          ! set ice ridging/rafting parameters
       CALL ice_dyn_rhg_init             ! set ice rheology parameters
Index: /NEMO/branches/2020/SI3_martin_ponds/src/ICE/icedyn_rhg_evp.F90
===================================================================
--- /NEMO/branches/2020/SI3_martin_ponds/src/ICE/icedyn_rhg_evp.F90	(revision 13961)
+++ /NEMO/branches/2020/SI3_martin_ponds/src/ICE/icedyn_rhg_evp.F90	(revision 13962)
@@ -326,11 +326,11 @@
             zvV = 0.5_wp * ( vt_i(ji,jj) * e1e2t(ji,jj) + vt_i(ji,jj+1) * e1e2t(ji,jj+1) ) * r1_e1e2v(ji,jj) * vmask(ji,jj,1)
             ! ice-bottom stress at U points
-            zvCr = zaU(ji,jj) * rn_lf_depfra * hu(ji,jj,Kmm)
+            zvCr = zaU(ji,jj) * rn_lf_depfra * hu(ji,jj,Kmm) * ( 1._wp - icb_mask(ji,jj) ) ! if grounded icebergs are read: ocean depth = 0
             ztaux_base(ji,jj) = - rn_lf_bfr * MAX( 0._wp, zvU - zvCr ) * EXP( -rn_crhg * ( 1._wp - zaU(ji,jj) ) )
             ! ice-bottom stress at V points
-            zvCr = zaV(ji,jj) * rn_lf_depfra * hv(ji,jj,Kmm)
+            zvCr = zaV(ji,jj) * rn_lf_depfra * hv(ji,jj,Kmm) * ( 1._wp - icb_mask(ji,jj) ) ! if grounded icebergs are read: ocean depth = 0
             ztauy_base(ji,jj) = - rn_lf_bfr * MAX( 0._wp, zvV - zvCr ) * EXP( -rn_crhg * ( 1._wp - zaV(ji,jj) ) )
             ! ice_bottom stress at T points
-            zvCr = at_i(ji,jj) * rn_lf_depfra * ht(ji,jj)
+            zvCr = at_i(ji,jj) * rn_lf_depfra * ht(ji,jj) * ( 1._wp - icb_mask(ji,jj) )    ! if grounded icebergs are read: ocean depth = 0
             tau_icebfr(ji,jj) = - rn_lf_bfr * MAX( 0._wp, vt_i(ji,jj) - zvCr ) * EXP( -rn_crhg * ( 1._wp - at_i(ji,jj) ) )
          END_2D
