New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 11511 – NEMO

Changeset 11511


Ignore:
Timestamp:
2019-09-06T19:41:44+02:00 (5 years ago)
Author:
clem
Message:

improve conservation checks

Location:
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/cfgs/SHARED/namelist_ice_ref

    r11501 r11511  
    232232&namdia         !   Diagnostics 
    233233!------------------------------------------------------------------------------ 
    234    ln_icediachk     = .false.         !  check online the heat, mass & salt budgets (T) or not (F) 
    235       rn_icechk     =  1.             !     1. <=> 1mm of ice spuriously gained/lost during 1   year  (at any gridcell) 
    236                                       !                           --                        100 years (over the entire ice cover) 
     234   ln_icediachk     = .false.         !  check online the heat, mass & salt budgets at each time step 
     235      !                               !     rate of ice spuriously gained/lost. For ex., rn_icechk=1. <=> 1mm/year, rn_icechk=0.01 <=> 1mm/100years                                    
     236      rn_icechk_cel =  1.             !     check at any gridcell           => stops the code if violated (and writes a file) 
     237      rn_icechk_glo =  0.01           !     check over the entire ice cover => only prints warnings 
    237238   ln_icediahsb     = .false.         !  output the heat, mass & salt budgets (T) or not (F) 
    238239   ln_icectl        = .false.         !  ice points output for debug (T or F) 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/ice.F90

    r11501 r11511  
    196196   !                                     !!** ice-diagnostics namelist (namdia) ** 
    197197   LOGICAL , PUBLIC ::   ln_icediachk     !: flag for ice diag (T) or not (F) 
    198    REAL(wp), PUBLIC ::   rn_icechk        !: 1. <=> 1mm of ice spuriously gained/lost during 1   year (at any gridcell) 
    199                                           !                           --                     100 years (globally) 
     198   REAL(wp), PUBLIC ::   rn_icechk_cel    !: rate of ice spuriously gained/lost (at any gridcell) 
     199   REAL(wp), PUBLIC ::   rn_icechk_glo    !: rate of ice spuriously gained/lost (globally) 
    200200   LOGICAL , PUBLIC ::   ln_icediahsb     !: flag for ice diag (T) or not (F) 
    201201   LOGICAL , PUBLIC ::   ln_icectl        !: flag for sea-ice points output (T) or not (F) 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/icectl.F90

    r11501 r11511  
    4646   ! thresold values for conservation 
    4747   !    these values are changed by the namelist parameter rn_icechk, so that threshold = zchk * rn_icechk 
    48    REAL(wp), PARAMETER ::   zchk_m   = 1.e-5   ! kg/m2/s <=> 1mm of ice per 1   year  spuriously gained/lost 
    49    REAL(wp), PARAMETER ::   zchk2D_m = 1.e-7   !                   --       100 years          -- 
    50    REAL(wp), PARAMETER ::   zchk_s   = 1.e-4   ! g/m2/s  <=> 1mm of ice per 1   year  spuriously gained/lost (considering s=10g/kg) 
    51    REAL(wp), PARAMETER ::   zchk2D_s = 1.e-6   !                   --       100 years          -- 
    52    REAL(wp), PARAMETER ::   zchk_t   = 3.      ! W/m2    <=> 1mm of ice per 1   year  spuriously gained/lost (considering Lf=3e5J/kg) 
    53    REAL(wp), PARAMETER ::   zchk2D_t = 0.03    !                   --       100 years          -- 
     48   REAL(wp), PARAMETER ::   zchk_m   = 1.e-5   ! kg/m2/s <=> 1mm of ice per year  spuriously gained/lost 
     49   REAL(wp), PARAMETER ::   zchk_s   = 1.e-4   ! g/m2/s  <=> 1mm of ice per year  spuriously gained/lost (considering s=10g/kg) 
     50   REAL(wp), PARAMETER ::   zchk_t   = 3.      ! W/m2    <=> 1mm of ice per year  spuriously gained/lost (considering Lf=3e5J/kg) 
    5451    
    5552   !! * Substitutions 
     
    144141         IF( lwp ) THEN 
    145142            ! check conservation issues 
    146             IF( ABS(zdiag_mass) > zchk_m * rn_icechk * zarea ) & 
     143            IF( ABS(zdiag_mass) > zchk_m * rn_icechk_glo * zarea ) & 
    147144               &                   WRITE(numout,*)   cd_routine,' : violation mass cons. [kg] = ',zdiag_mass * rdt_ice 
    148             IF( ABS(zdiag_salt) > zchk_s * rn_icechk * zarea ) & 
     145            IF( ABS(zdiag_salt) > zchk_s * rn_icechk_glo * zarea ) & 
    149146               &                   WRITE(numout,*)   cd_routine,' : violation salt cons. [g]  = ',zdiag_salt * rdt_ice 
    150             IF( ABS(zdiag_heat) > zchk_t * rn_icechk * zarea ) & 
     147            IF( ABS(zdiag_heat) > zchk_t * rn_icechk_glo * zarea ) & 
    151148               &                   WRITE(numout,*)   cd_routine,' : violation heat cons. [J]  = ',zdiag_heat * rdt_ice 
    152149            ! check negative values 
     
    160157               &                   WRITE(numout,*)   cd_routine,' : violation a_i > amax      = ',zdiag_amax 
    161158            ! check if advection scheme is conservative 
    162             IF( ABS(zvtrp) > zchk_m*rn_icechk*zarea .AND. cd_routine == 'icedyn_adv' ) & 
     159            IF( ABS(zvtrp) > zchk_m * rn_icechk_glo * zarea .AND. cd_routine == 'icedyn_adv' ) & 
    163160               &                   WRITE(numout,*)   cd_routine,' : violation adv scheme [kg] = ',zvtrp * rdt_ice 
    164161         ENDIF 
     
    202199 
    203200      IF( lwp ) THEN 
    204          IF( ABS(zdiag_mass) > zchk_m * rn_icechk * zarea ) & 
     201         IF( ABS(zdiag_mass) > zchk_m * rn_icechk_glo * zarea ) & 
    205202            &                   WRITE(numout,*) cd_routine,' : violation mass cons. [kg] = ',zdiag_mass * rdt_ice 
    206          IF( ABS(zdiag_salt) > zchk_s * rn_icechk * zarea ) & 
     203         IF( ABS(zdiag_salt) > zchk_s * rn_icechk_glo * zarea ) & 
    207204            &                   WRITE(numout,*) cd_routine,' : violation salt cons. [g]  = ',zdiag_salt * rdt_ice 
    208          !!IF( ABS(zdiag_heat) > zchk_t * rn_icechk * zarea ) WRITE(numout,*) cd_routine,' : violation heat cons. [J]  = ',zdiag_heat * rdt_ice 
     205         !!IF( ABS(zdiag_heat) > zchk_t * rn_icechk_glo * zarea ) WRITE(numout,*) cd_routine,' : violation heat cons. [J]  = ',zdiag_heat * rdt_ice 
    209206      ENDIF 
    210207      ! 
     
    256253            &             wfx_snw_sni + wfx_snw_sum + wfx_snw_dyn + wfx_snw_sub + wfx_ice_sub + wfx_spr )           & 
    257254            &         - pdiag_fv 
    258          IF( MAXVAL( ABS(zdiag_mass) ) > zchk2D_m * rn_icechk )   ll_stop_m = .TRUE. 
     255         IF( MAXVAL( ABS(zdiag_mass) ) > zchk_m * rn_icechk_cel )   ll_stop_m = .TRUE. 
    259256         ! 
    260257         ! -- salt diag -- ! 
     
    262259            &         + ( sfx_bri + sfx_bog + sfx_bom + sfx_sum + sfx_sni + sfx_opw + sfx_res + sfx_dyn + sfx_sub + sfx_lam ) & 
    263260            &         - pdiag_fs 
    264          IF( MAXVAL( ABS(zdiag_salt) ) > zchk2D_s * rn_icechk )   ll_stop_s = .TRUE. 
     261         IF( MAXVAL( ABS(zdiag_salt) ) > zchk_s * rn_icechk_cel )   ll_stop_s = .TRUE. 
    265262         ! 
    266263         ! -- heat diag -- ! 
     
    269266            &            - hfx_thd - hfx_dyn - hfx_res - hfx_sub - hfx_spr )                                        & 
    270267            &         - pdiag_ft 
    271          IF( MAXVAL( ABS(zdiag_heat) ) > zchk2D_t * rn_icechk )   ll_stop_t = .TRUE. 
     268         IF( MAXVAL( ABS(zdiag_heat) ) > zchk_t * rn_icechk_cel )   ll_stop_t = .TRUE. 
    272269         ! 
    273270         ! -- other diags -- ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/icedia.F90

    r11501 r11511  
    175175      INTEGER            ::   ios, ierror   ! local integer 
    176176      !! 
    177       NAMELIST/namdia/ ln_icediachk, rn_icechk, ln_icediahsb, ln_icectl, iiceprt, jiceprt   
     177      NAMELIST/namdia/ ln_icediachk, rn_icechk_cel, rn_icechk_glo, ln_icediahsb, ln_icectl, iiceprt, jiceprt   
    178178      !!---------------------------------------------------------------------- 
    179179      ! 
     
    191191         WRITE(numout,*) ' ~~~~~~~~~~~' 
    192192         WRITE(numout,*) '   Namelist namdia:' 
    193          WRITE(numout,*) '      Diagnose online heat/mass/salt conservation ln_icediachk = ', ln_icediachk 
    194          WRITE(numout,*) '         threshold for conservation               rn_icechk    = ', rn_icechk 
    195          WRITE(numout,*) '      Output          heat/mass/salt budget       ln_icediahsb = ', ln_icediahsb 
    196          WRITE(numout,*) '      control prints for a given grid point       ln_icectl    = ', ln_icectl 
    197          WRITE(numout,*) '         chosen grid point position          (iiceprt,jiceprt) = (', iiceprt,',', jiceprt,')' 
     193         WRITE(numout,*) '      Diagnose online heat/mass/salt conservation ln_icediachk  = ', ln_icediachk 
     194         WRITE(numout,*) '         threshold for conservation (gridcell)    rn_icechk_cel = ', rn_icechk_cel 
     195         WRITE(numout,*) '         threshold for conservation (global)      rn_icechk_glo = ', rn_icechk_glo 
     196         WRITE(numout,*) '      Output          heat/mass/salt budget       ln_icediahsb  = ', ln_icediahsb 
     197         WRITE(numout,*) '      control prints for a given grid point       ln_icectl     = ', ln_icectl 
     198         WRITE(numout,*) '         chosen grid point position          (iiceprt,jiceprt)  = (', iiceprt,',', jiceprt,')' 
    198199      ENDIF 
    199200      !       
Note: See TracChangeset for help on using the changeset viewer.