Index: /NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/cfgs/SHARED/namelist_ice_ref
===================================================================
--- /NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/cfgs/SHARED/namelist_ice_ref	(revision 11510)
+++ /NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/cfgs/SHARED/namelist_ice_ref	(revision 11511)
@@ -232,7 +232,8 @@
 &namdia         !   Diagnostics
 !------------------------------------------------------------------------------
-   ln_icediachk     = .false.         !  check online the heat, mass & salt budgets (T) or not (F)
-      rn_icechk     =  1.             !     1. <=> 1mm of ice spuriously gained/lost during 1   year  (at any gridcell)
-                                      !                           --                        100 years (over the entire ice cover)
+   ln_icediachk     = .false.         !  check online the heat, mass & salt budgets at each time step
+      !                               !     rate of ice spuriously gained/lost. For ex., rn_icechk=1. <=> 1mm/year, rn_icechk=0.01 <=> 1mm/100years                                   
+      rn_icechk_cel =  1.             !     check at any gridcell           => stops the code if violated (and writes a file)
+      rn_icechk_glo =  0.01           !     check over the entire ice cover => only prints warnings
    ln_icediahsb     = .false.         !  output the heat, mass & salt budgets (T) or not (F)
    ln_icectl        = .false.         !  ice points output for debug (T or F)
Index: /NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/ice.F90
===================================================================
--- /NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/ice.F90	(revision 11510)
+++ /NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/ice.F90	(revision 11511)
@@ -196,6 +196,6 @@
    !                                     !!** ice-diagnostics namelist (namdia) **
    LOGICAL , PUBLIC ::   ln_icediachk     !: flag for ice diag (T) or not (F)
-   REAL(wp), PUBLIC ::   rn_icechk        !: 1. <=> 1mm of ice spuriously gained/lost during 1   year  (at any gridcell)
-                                          !                           --                     100 years (globally)
+   REAL(wp), PUBLIC ::   rn_icechk_cel    !: rate of ice spuriously gained/lost (at any gridcell)
+   REAL(wp), PUBLIC ::   rn_icechk_glo    !: rate of ice spuriously gained/lost (globally)
    LOGICAL , PUBLIC ::   ln_icediahsb     !: flag for ice diag (T) or not (F)
    LOGICAL , PUBLIC ::   ln_icectl        !: flag for sea-ice points output (T) or not (F)
Index: /NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/icectl.F90
===================================================================
--- /NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/icectl.F90	(revision 11510)
+++ /NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/icectl.F90	(revision 11511)
@@ -46,10 +46,7 @@
    ! thresold values for conservation
    !    these values are changed by the namelist parameter rn_icechk, so that threshold = zchk * rn_icechk
-   REAL(wp), PARAMETER ::   zchk_m   = 1.e-5   ! kg/m2/s <=> 1mm of ice per 1   year  spuriously gained/lost
-   REAL(wp), PARAMETER ::   zchk2D_m = 1.e-7   !                   --       100 years          --
-   REAL(wp), PARAMETER ::   zchk_s   = 1.e-4   ! g/m2/s  <=> 1mm of ice per 1   year  spuriously gained/lost (considering s=10g/kg)
-   REAL(wp), PARAMETER ::   zchk2D_s = 1.e-6   !                   --       100 years          --
-   REAL(wp), PARAMETER ::   zchk_t   = 3.      ! W/m2    <=> 1mm of ice per 1   year  spuriously gained/lost (considering Lf=3e5J/kg)
-   REAL(wp), PARAMETER ::   zchk2D_t = 0.03    !                   --       100 years          --
+   REAL(wp), PARAMETER ::   zchk_m   = 1.e-5   ! kg/m2/s <=> 1mm of ice per year  spuriously gained/lost
+   REAL(wp), PARAMETER ::   zchk_s   = 1.e-4   ! g/m2/s  <=> 1mm of ice per year  spuriously gained/lost (considering s=10g/kg)
+   REAL(wp), PARAMETER ::   zchk_t   = 3.      ! W/m2    <=> 1mm of ice per year  spuriously gained/lost (considering Lf=3e5J/kg)
    
    !! * Substitutions
@@ -144,9 +141,9 @@
          IF( lwp ) THEN
             ! check conservation issues
-            IF( ABS(zdiag_mass) > zchk_m * rn_icechk * zarea ) &
+            IF( ABS(zdiag_mass) > zchk_m * rn_icechk_glo * zarea ) &
                &                   WRITE(numout,*)   cd_routine,' : violation mass cons. [kg] = ',zdiag_mass * rdt_ice
-            IF( ABS(zdiag_salt) > zchk_s * rn_icechk * zarea ) &
+            IF( ABS(zdiag_salt) > zchk_s * rn_icechk_glo * zarea ) &
                &                   WRITE(numout,*)   cd_routine,' : violation salt cons. [g]  = ',zdiag_salt * rdt_ice
-            IF( ABS(zdiag_heat) > zchk_t * rn_icechk * zarea ) &
+            IF( ABS(zdiag_heat) > zchk_t * rn_icechk_glo * zarea ) &
                &                   WRITE(numout,*)   cd_routine,' : violation heat cons. [J]  = ',zdiag_heat * rdt_ice
             ! check negative values
@@ -160,5 +157,5 @@
                &                   WRITE(numout,*)   cd_routine,' : violation a_i > amax      = ',zdiag_amax
             ! check if advection scheme is conservative
-            IF( ABS(zvtrp) > zchk_m*rn_icechk*zarea .AND. cd_routine == 'icedyn_adv' ) &
+            IF( ABS(zvtrp) > zchk_m * rn_icechk_glo * zarea .AND. cd_routine == 'icedyn_adv' ) &
                &                   WRITE(numout,*)   cd_routine,' : violation adv scheme [kg] = ',zvtrp * rdt_ice
          ENDIF
@@ -202,9 +199,9 @@
 
       IF( lwp ) THEN
-         IF( ABS(zdiag_mass) > zchk_m * rn_icechk * zarea ) &
+         IF( ABS(zdiag_mass) > zchk_m * rn_icechk_glo * zarea ) &
             &                   WRITE(numout,*) cd_routine,' : violation mass cons. [kg] = ',zdiag_mass * rdt_ice
-         IF( ABS(zdiag_salt) > zchk_s * rn_icechk * zarea ) &
+         IF( ABS(zdiag_salt) > zchk_s * rn_icechk_glo * zarea ) &
             &                   WRITE(numout,*) cd_routine,' : violation salt cons. [g]  = ',zdiag_salt * rdt_ice
-         !!IF( ABS(zdiag_heat) > zchk_t * rn_icechk * zarea ) WRITE(numout,*) cd_routine,' : violation heat cons. [J]  = ',zdiag_heat * rdt_ice
+         !!IF( ABS(zdiag_heat) > zchk_t * rn_icechk_glo * zarea ) WRITE(numout,*) cd_routine,' : violation heat cons. [J]  = ',zdiag_heat * rdt_ice
       ENDIF
       !
@@ -256,5 +253,5 @@
             &             wfx_snw_sni + wfx_snw_sum + wfx_snw_dyn + wfx_snw_sub + wfx_ice_sub + wfx_spr )           &
             &         - pdiag_fv
-         IF( MAXVAL( ABS(zdiag_mass) ) > zchk2D_m * rn_icechk )   ll_stop_m = .TRUE.
+         IF( MAXVAL( ABS(zdiag_mass) ) > zchk_m * rn_icechk_cel )   ll_stop_m = .TRUE.
          !
          ! -- salt diag -- !
@@ -262,5 +259,5 @@
             &         + ( sfx_bri + sfx_bog + sfx_bom + sfx_sum + sfx_sni + sfx_opw + sfx_res + sfx_dyn + sfx_sub + sfx_lam ) &
             &         - pdiag_fs
-         IF( MAXVAL( ABS(zdiag_salt) ) > zchk2D_s * rn_icechk )   ll_stop_s = .TRUE.
+         IF( MAXVAL( ABS(zdiag_salt) ) > zchk_s * rn_icechk_cel )   ll_stop_s = .TRUE.
          !
          ! -- heat diag -- !
@@ -269,5 +266,5 @@
             &            - hfx_thd - hfx_dyn - hfx_res - hfx_sub - hfx_spr )                                        &
             &         - pdiag_ft
-         IF( MAXVAL( ABS(zdiag_heat) ) > zchk2D_t * rn_icechk )   ll_stop_t = .TRUE.
+         IF( MAXVAL( ABS(zdiag_heat) ) > zchk_t * rn_icechk_cel )   ll_stop_t = .TRUE.
          !
          ! -- other diags -- !
Index: /NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/icedia.F90
===================================================================
--- /NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/icedia.F90	(revision 11510)
+++ /NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/icedia.F90	(revision 11511)
@@ -175,5 +175,5 @@
       INTEGER            ::   ios, ierror   ! local integer
       !!
-      NAMELIST/namdia/ ln_icediachk, rn_icechk, ln_icediahsb, ln_icectl, iiceprt, jiceprt  
+      NAMELIST/namdia/ ln_icediachk, rn_icechk_cel, rn_icechk_glo, ln_icediahsb, ln_icectl, iiceprt, jiceprt  
       !!----------------------------------------------------------------------
       !
@@ -191,9 +191,10 @@
          WRITE(numout,*) ' ~~~~~~~~~~~'
          WRITE(numout,*) '   Namelist namdia:'
-         WRITE(numout,*) '      Diagnose online heat/mass/salt conservation ln_icediachk = ', ln_icediachk
-         WRITE(numout,*) '         threshold for conservation               rn_icechk    = ', rn_icechk
-         WRITE(numout,*) '      Output          heat/mass/salt budget       ln_icediahsb = ', ln_icediahsb
-         WRITE(numout,*) '      control prints for a given grid point       ln_icectl    = ', ln_icectl
-         WRITE(numout,*) '         chosen grid point position          (iiceprt,jiceprt) = (', iiceprt,',', jiceprt,')'
+         WRITE(numout,*) '      Diagnose online heat/mass/salt conservation ln_icediachk  = ', ln_icediachk
+         WRITE(numout,*) '         threshold for conservation (gridcell)    rn_icechk_cel = ', rn_icechk_cel
+         WRITE(numout,*) '         threshold for conservation (global)      rn_icechk_glo = ', rn_icechk_glo
+         WRITE(numout,*) '      Output          heat/mass/salt budget       ln_icediahsb  = ', ln_icediahsb
+         WRITE(numout,*) '      control prints for a given grid point       ln_icectl     = ', ln_icectl
+         WRITE(numout,*) '         chosen grid point position          (iiceprt,jiceprt)  = (', iiceprt,',', jiceprt,')'
       ENDIF
       !      
