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 13899 for NEMO/branches/2020/tickets_icb_1900/tests – NEMO

Ignore:
Timestamp:
2020-11-27T17:26:33+01:00 (4 years ago)
Author:
mathiot
Message:

ticket #1900: update branch to trunk and add ICB test case

Location:
NEMO/branches/2020/tickets_icb_1900
Files:
21 added
1 deleted
117 edited
2 copied

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/tickets_icb_1900

    • Property svn:externals
      •  

        old new  
        22^/utils/build/makenemo@HEAD   makenemo 
        33^/utils/build/mk@HEAD         mk 
        4 ^/utils/tools/@HEAD           tools 
         4^/utils/tools@HEAD            tools 
        55^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
         
        88 
        99# SETTE 
        10 ^/utils/CI/sette@12931        sette 
         10^/utils/CI/sette@13559        sette 
  • NEMO/branches/2020/tickets_icb_1900/tests/BENCH/EXPREF/namelist_cfg_orca025_like

    r12530 r13899  
    1515&namusr_def    !   User defined :   BENCH configuration: Flat bottom, beta-plane 
    1616!----------------------------------------------------------------------- 
    17    nn_isize   =   1442     ! number of point in i-direction of global(local) domain if >0 (<0)   
    18    nn_jsize   =   1207  !!  1050    ! number of point in j-direction of global(local) domain if >0 (<0)   
     17   nn_isize   =   1440     ! number of point in i-direction of global(local) domain if >0 (<0)   
     18   nn_jsize   =   1206  !!  1049    ! number of point in j-direction of global(local) domain if >0 (<0)   
    1919   nn_ksize   =   75       ! total number of point in k-direction 
    2020   nn_perio   =   4        ! periodicity 
     
    3030&namctl        !   Control prints                                       (default: OFF) 
    3131!----------------------------------------------------------------------- 
    32    nn_print    =    0      !  level of print (0 no extra print) 
    3332   ln_timing   = .false.   !  timing by routine write out in timing.output file 
    3433/ 
     
    7877!!                                                                    !! 
    7978!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    80 !!   namdrg_top    top    friction                                      (ln_OFF =F & ln_isfcav=T) 
    81 !!   namdrg_bot    bottom friction                                      (ln_OFF =F) 
     79!!   namdrg_top    top    friction                                      (ln_drg_OFF =F & ln_isfcav=T) 
     80!!   namdrg_bot    bottom friction                                      (ln_drg_OFF =F) 
    8281!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    8382!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/BENCH/EXPREF/namelist_cfg_orca12_like

    r12530 r13899  
    1515&namusr_def    !   User defined :   BENCH configuration: Flat bottom, beta-plane 
    1616!----------------------------------------------------------------------- 
    17    nn_isize   =   4322     ! number of point in i-direction of global(local) domain if >0 (<0)   
    18    nn_jsize   =   3147     ! number of point in j-direction of global(local) domain if >0 (<0)   
     17   nn_isize   =   4320     ! number of point in i-direction of global(local) domain if >0 (<0)   
     18   nn_jsize   =   3146     ! number of point in j-direction of global(local) domain if >0 (<0)   
    1919   nn_ksize   =   75       ! total number of point in k-direction 
    2020   nn_perio   =   4        ! periodicity 
     
    3030&namctl        !   Control prints                                       (default: OFF) 
    3131!----------------------------------------------------------------------- 
    32    nn_print    =    0      !  level of print (0 no extra print) 
    3332   ln_timing   = .false.   !  timing by routine write out in timing.output file 
    3433/ 
     
    7877!!                                                                    !! 
    7978!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    80 !!   namdrg_top    top    friction                                      (ln_OFF =F & ln_isfcav=T) 
    81 !!   namdrg_bot    bottom friction                                      (ln_OFF =F) 
     79!!   namdrg_top    top    friction                                      (ln_drg_OFF =F & ln_isfcav=T) 
     80!!   namdrg_bot    bottom friction                                      (ln_drg_OFF =F) 
    8281!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    8382!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/BENCH/EXPREF/namelist_cfg_orca1_like

    r12530 r13899  
    1515&namusr_def    !   User defined :   BENCH configuration: Flat bottom, beta-plane 
    1616!----------------------------------------------------------------------- 
    17    nn_isize   =   362      ! number of point in i-direction of global(local) domain if >0 (<0)   
    18    nn_jsize   =   332      ! number of point in j-direction of global(local) domain if >0 (<0)   
     17   nn_isize   =   360      ! number of point in i-direction of global(local) domain if >0 (<0)   
     18   nn_jsize   =   331      ! number of point in j-direction of global(local) domain if >0 (<0)   
    1919   nn_ksize   =   75       ! total number of point in k-direction 
    2020   nn_perio   =   6        ! periodicity 
     
    3030&namctl        !   Control prints                                       (default: OFF) 
    3131!----------------------------------------------------------------------- 
    32    nn_print    =    0      !  level of print (0 no extra print) 
    3332   ln_timing   = .false.   !  timing by routine write out in timing.output file 
    3433/ 
     
    7877!!                                                                    !! 
    7978!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    80 !!   namdrg_top    top    friction                                      (ln_OFF =F & ln_isfcav=T) 
    81 !!   namdrg_bot    bottom friction                                      (ln_OFF =F) 
     79!!   namdrg_top    top    friction                                      (ln_drg_OFF =F & ln_isfcav=T) 
     80!!   namdrg_bot    bottom friction                                      (ln_drg_OFF =F) 
    8281!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    8382!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/BENCH/MY_SRC/usrdef_hgr.F90

    r12740 r13899  
    6161      REAL(wp), DIMENSION(:,:), INTENT(out) ::   pe1e2u, pe1e2v               ! u- & v-surfaces (if reduction in strait)   [m2] 
    6262      ! 
    63       INTEGER  ::   ji, jj   ! dummy loop indices 
     63      INTEGER  ::   ji, jj         ! dummy loop indices 
    6464      REAL(wp) ::   zres, zf0 
    65       REAL(wp) ::   zti, zui, ztj, zvj   ! local scalars 
     65      REAL(wp) ::   zti, ztj       ! local scalars 
    6666      !!------------------------------------------------------------------------------- 
    6767      ! 
     
    7272      IF(lwp) WRITE(numout,*) '          given by rn_dx and rn_dy'  
    7373      ! 
    74       !                           
    7574      ! Position coordinates (in grid points) 
    7675      !                          ========== 
    77       DO_2D_11_11 
     76      DO_2D( 1, 1, 1, 1 ) 
    7877          
    79          zti = REAL( ji - 1 + nimpp - 1, wp )          ;  ztj = REAL( jj - 1 + njmpp - 1, wp ) 
    80          zui = REAL( ji - 1 + nimpp - 1, wp ) + 0.5_wp ;  zvj = REAL( jj - 1 + njmpp - 1, wp ) + 0.5_wp 
     78         zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos 
     79         ztj = REAL( mjg0_oldcmp(jj) - 1, wp )   ! start at j=0 in the global grid without halos 
    8180          
    8281         plamt(ji,jj) = zti 
    83          plamu(ji,jj) = zui 
     82         plamu(ji,jj) = zti + 0.5_wp 
    8483         plamv(ji,jj) = zti 
    85          plamf(ji,jj) = zui 
     84         plamf(ji,jj) = zti + 0.5_wp 
    8685          
    8786         pphit(ji,jj) = ztj 
    88          pphiv(ji,jj) = zvj 
    8987         pphiu(ji,jj) = ztj 
    90          pphif(ji,jj) = zvj 
     88         pphiv(ji,jj) = ztj + 0.5_wp 
     89         pphif(ji,jj) = ztj + 0.5_wp 
    9190 
    9291      END_2D 
     
    109108      kff = 1                       !  indicate not to compute Coriolis parameter afterward 
    110109      ! 
    111       zf0   = 2._wp * omega * SIN( rad * 45 )   ! constant coriolis factor corresponding to 45°N 
     110      zf0 = 2._wp * omega * SIN( rad * 45 )   ! constant coriolis factor corresponding to 45°N 
    112111      pff_f(:,:) = zf0 
    113112      pff_t(:,:) = zf0 
  • NEMO/branches/2020/tickets_icb_1900/tests/BENCH/MY_SRC/usrdef_istate.F90

    r12794 r13899  
    5757      REAL(wp) ::   zfact 
    5858      INTEGER  ::   ji, jj, jk 
     59      INTEGER  ::   igloi, igloj   ! to be removed in the future, see comment bellow 
    5960      !!---------------------------------------------------------------------- 
    6061      ! 
     
    6364      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~   ' 
    6465      ! 
    65       ! define unique value on each point. z2d ranging from 0.05 to -0.05 
    66       DO_2D_11_11 
    67          z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig(ji) + (mjg(jj)-1) * jpiglo, wp ) / REAL( jpiglo * jpjglo, wp ) ) 
     66      ! define unique value on each point of the inner global domain. z2d ranging from 0.05 to -0.05 
     67      ! 
     68      ! WARNING: to keep compatibility with the trunk that was including periodocity into the input data,  
     69      ! we must define z2d as bellow. 
     70      ! Once we decide to forget trunk compatibility, we must simply define z2d as: 
     71!!$      DO_2D( 0, 0, 0, 0 ) 
     72!!$         z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0_oldcmp(ji) + (mjg0_oldcmp(jj)-1) * Ni0glo, wp ) / REAL( Ni0glo * Nj0glo, wp ) ) 
     73!!$      END_2D 
     74      igloi = Ni0glo + 2 * COUNT( (/ jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7 /) ) 
     75      igloj = Nj0glo + 2 * COUNT( (/ jperio == 2 .OR. jperio == 7 /) ) + 1 * COUNT( (/ jperio >= 4 .AND. jperio <= 6 /) ) 
     76      DO_2D( 0, 0, 0, 0 ) 
     77         z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0_oldcmp(ji) + (mjg0_oldcmp(jj)-1) * igloi, wp ) / REAL( igloi * igloj, wp ) ) 
    6878      END_2D 
    6979      ! 
     
    7181      pssh(:,:) = z2d(:,:)                                                ! +/- 0.05 m 
    7282      ! 
    73       DO jk = 1, jpk 
     83      DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
    7484         zfact = REAL(jk-1,wp) / REAL(jpk-1,wp)   ! 0 to 1 to add a basic stratification 
    7585         ! temperature choosen to lead to ~50% ice at the beginning if rn_thres_sst = 0.5 
     
    8090         pu(:,:,jk) = z2d(:,:) *  0.1_wp * umask(:,:,jk)                  ! +/- 0.005  m/s 
    8191         pv(:,:,jk) = z2d(:,:) * 0.01_wp * vmask(:,:,jk)                  ! +/- 0.0005 m/s 
    82       ENDDO 
     92      END_3D 
     93      pts(:,:,jpk,:) = 0._wp 
     94      pu( :,:,jpk  ) = 0._wp 
     95      pv( :,:,jpk  ) = 0._wp 
    8396      ! 
    8497      CALL lbc_lnk('usrdef_istate', pssh, 'T',  1. )            ! apply boundary conditions 
  • NEMO/branches/2020/tickets_icb_1900/tests/BENCH/MY_SRC/usrdef_nam.F90

    r12563 r13899  
    5858      !! 
    5959      NAMELIST/namusr_def/ nn_isize, nn_jsize, nn_ksize, nn_perio 
    60       NAMELIST/nammpp/ jpni, jpnj, ln_nnogather, ln_listonly 
     60      NAMELIST/nammpp/ jpni, jpnj, nn_hls, ln_nnogather, ln_listonly 
    6161      !!----------------------------------------------------------------------      
    6262      ! 
     
    7777902      IF( ios >  0 )   CALL ctl_nam ( ios , 'nammpp in configuration namelist' ) 
    7878 
    79          kpi = ( -nn_isize - 2*nn_hls ) * jpni + 2*nn_hls 
    80          kpj = ( -nn_jsize - 2*nn_hls ) * jpnj + 2*nn_hls 
     79         kpi = -nn_isize * jpni 
     80         kpj = -nn_jsize * jpnj 
    8181      ELSE 
    8282         kpi = nn_isize 
  • NEMO/branches/2020/tickets_icb_1900/tests/BENCH/MY_SRC/usrdef_sbc.F90

    r12740 r13899  
    9999      REAL(wp), DIMENSION(jpi,jpj) ::   z2d   ! 2D workspace 
    100100      INTEGER  ::   ji, jj 
     101      INTEGER  ::   igloi, igloj   ! to be removed in the future, see comment bellow 
    101102      !!--------------------------------------------------------------------- 
    102103#if defined key_si3 
     
    104105      ! 
    105106      ! define unique value on each point. z2d ranging from 0.05 to -0.05 
    106       DO_2D_11_11 
    107          z2d(ji,jj) = 0.1 * ( 0.5 - REAL( nimpp + ji - 1 + ( njmpp + jj - 2 ) * jpiglo, wp ) / REAL( jpiglo * jpjglo, wp ) ) 
     107      ! 
     108      ! WARNING: to keep compatibility with the trunk that was including periodocity into the input data,  
     109      ! we must define z2d as bellow. 
     110      ! Once we decide to forget trunk compatibility, we must simply define z2d as: 
     111!!$      DO_2D( 0, 0, 0, 0 ) 
     112!!$         z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0_oldcmp(ji) + (mjg0_oldcmp(jj)-1) * Ni0glo, wp ) / REAL( Ni0glo * Nj0glo, wp ) ) 
     113!!$      END_2D 
     114      igloi = Ni0glo + 2 * COUNT( (/ jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7 /) ) 
     115      igloj = Nj0glo + 2 * COUNT( (/ jperio == 2 .OR. jperio == 7 /) ) + 1 * COUNT( (/ jperio >= 4 .AND. jperio <= 6 /) ) 
     116      DO_2D( 0, 0, 0, 0 ) 
     117         z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0_oldcmp(ji) + (mjg0_oldcmp(jj)-1) * igloi, wp ) / REAL( igloi * igloj, wp ) ) 
    108118      END_2D 
    109       utau_ice(:,:) = 0.1_wp +  z2d(:,:) 
    110       vtau_ice(:,:) = 0.1_wp +  z2d(:,:) 
     119      utau_ice(:,:) = 0.1_wp + z2d(:,:) 
     120      vtau_ice(:,:) = 0.1_wp + z2d(:,:) 
    111121 
    112122      CALL lbc_lnk_multi( 'usrdef_sbc', utau_ice, 'U', -1., vtau_ice, 'V', -1. ) 
     
    127137      REAL(wp), DIMENSION(:,:,:), INTENT(in)  ::   phi    ! ice thickness 
    128138      !! 
    129       REAL(wp) ::   zfr1, zfr2                 ! local variables 
    130139      REAL(wp), DIMENSION(jpi,jpj) ::   zsnw   ! snw distribution after wind blowing 
    131140      !!--------------------------------------------------------------------- 
     
    162171      qsr_tot (:,:) = at_i_b(:,:) * qsr_oce(:,:) + SUM( a_i_b(:,:,:) * qsr_ice(:,:,:), dim=3 ) 
    163172 
    164       ! --- shortwave radiation transmitted below the surface (W/m2, see Grenfell Maykut 77) --- ! 
    165       zfr1 = ( 0.18 * ( 1.0 - cldf_ice ) + 0.35 * cldf_ice )            ! transmission when hi>10cm 
    166       zfr2 = ( 0.82 * ( 1.0 - cldf_ice ) + 0.65 * cldf_ice )            ! zfr2 such that zfr1 + zfr2 to equal 1 
    167       ! 
    168       WHERE    ( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) <  0.1_wp )       ! linear decrease from hi=0 to 10cm   
    169          qtr_ice_top(:,:,:) = qsr_ice(:,:,:) * ( zfr1 + zfr2 * ( 1._wp - phi(:,:,:) * 10._wp ) ) 
    170       ELSEWHERE( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) >= 0.1_wp )       ! constant (zfr1) when hi>10cm 
    171          qtr_ice_top(:,:,:) = qsr_ice(:,:,:) * zfr1 
    172       ELSEWHERE                                                         ! zero when hs>0 
    173          qtr_ice_top(:,:,:) = 0._wp  
    174       END WHERE 
     173      ! --- shortwave radiation transmitted thru the surface scattering layer (W/m2) --- ! 
     174      qtr_ice_top(:,:,:) = 0._wp 
     175 
    175176#endif 
    176177 
  • NEMO/branches/2020/tickets_icb_1900/tests/BENCH/MY_SRC/usrdef_zgr.F90

    r12377 r13899  
    192192      z2d(:,:) = REAL( jpkm1 , wp )          ! flat bottom 
    193193      ! 
    194       IF( jperio == 3 .OR. jperio ==4 ) THEN   ! add a small island in the upper corners to avoid model instabilities... 
    195          z2d(mi0(       1):mi1(     3),mj0(jpjglo-2):mj1(jpjglo)) = 0. 
    196          z2d(mi0(jpiglo-2):mi1(jpiglo),mj0(jpjglo-2):mj1(jpjglo)) = 0. 
    197       ENDIF 
     194      ! 
     195      ! BENCH should work without these 2 small islands on the 2 poles of the folding... 
     196      !   -> Comment out these lines if instabilities are too large... 
     197      ! 
     198       
     199!!$      IF( jperio == 3 .OR. jperio == 4 ) THEN   ! add a small island in the upper corners to avoid model instabilities... 
     200!!$         z2d(mi0(       nn_hls):mi1(                  nn_hls+2 ),mj0(jpjglo-nn_hls-1):mj1(jpjglo-nn_hls+1)) = 0. 
     201!!$         z2d(mi0(jpiglo-nn_hls):mi1(MIN(jpiglo,jpiglo-nn_hls+2)),mj0(jpjglo-nn_hls-1):mj1(jpjglo-nn_hls+1)) = 0. 
     202!!$         z2d(mi0(jpiglo/2     ):mi1(           jpiglo/2     +2 ),mj0(jpjglo-nn_hls-1):mj1(jpjglo-nn_hls+1)) = 0. 
     203!!$      ENDIF 
     204!!$      ! 
     205!!$      IF( jperio == 5 .OR. jperio == 6 ) THEN   ! add a small island in the upper corners to avoid model instabilities... 
     206!!$         z2d(mi0(       nn_hls):mi1(       nn_hls+1),mj0(jpjglo-nn_hls):mj1(jpjglo-nn_hls+1)) = 0. 
     207!!$         z2d(mi0(jpiglo-nn_hls):mi1(jpiglo-nn_hls+1),mj0(jpjglo-nn_hls):mj1(jpjglo-nn_hls+1)) = 0. 
     208!!$         z2d(mi0(jpiglo/2     ):mi1(jpiglo/2     +1),mj0(jpjglo-nn_hls):mj1(jpjglo-nn_hls+1)) = 0. 
     209!!$      ENDIF 
     210 
    198211      ! 
    199212      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (here jperio=0 ==>> closed) 
  • NEMO/branches/2020/tickets_icb_1900/tests/CANAL/EXPREF/context_nemo.xml

    r12276 r13899  
    1111       <variable id="ref_month" type="int"> 01 </variable> 
    1212       <variable id="ref_day"   type="int"> 01 </variable> 
    13        <variable id="rau0"      type="float" > 1026.0 </variable> 
     13       <variable id="rho0"      type="float" > 1026.0 </variable> 
    1414       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
    1515       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
  • NEMO/branches/2020/tickets_icb_1900/tests/CANAL/EXPREF/file_def_nemo-oce.xml

    r9572 r13899  
    1515     <field field_ref="soce" />  
    1616     <field field_ref="ssh"  /> 
    17      <field field_ref="salgrad"  /> 
    18      <field field_ref="ke_zint"  /> 
     17     <field field_ref="socegrad"  /> 
     18     <field field_ref="eken_int"  /> 
    1919     <field field_ref="relvor"  /> 
    2020     <field field_ref="potvor"  /> 
  • NEMO/branches/2020/tickets_icb_1900/tests/CANAL/EXPREF/namelist_cfg

    r12489 r13899  
    2020&namusr_def    !   User defined :   CANAL configuration: Flat bottom, beta-plane 
    2121!----------------------------------------------------------------------- 
    22    rn_domszx   =   3600.   !  x horizontal size         [km] 
    23    rn_domszy   =   1800.   !  y horizontal size         [km] 
    24    rn_domszz   =   5000.   !  z vertical size            [m] 
    25    rn_dx       =     30.   !  x horizontal resolution   [km] 
    26    rn_dy       =     30.   !  y horizontal resolution   [km] 
    27    rn_dz       =    500.   !  z vertical resolution      [m] 
     22   rn_domszx   =   2000.   !  x horizontal size         [km] 
     23   rn_domszy   =   1000.   !  y horizontal size         [km] 
     24   rn_domszz   =   1000.   !  z vertical size            [m] 
     25   rn_dx       =     10.   !  x horizontal resolution   [km] 
     26   rn_dy       =     10.   !  y horizontal resolution   [km] 
     27   rn_dz       =   1000.   !  z vertical resolution      [m] 
    2828   rn_0xratio  =      0.5  !  x-domain ratio of the 0 
    2929   rn_0yratio  =      0.5  !  y-domain ratio of the 0 
     
    3131   rn_ppgphi0  =    38.5   !  Reference latitude      [degrees] 
    3232   rn_u10      =      0.   !  10m wind speed              [m/s] 
    33      rn_windszx =   4000.   !  longitudinal wind extension   [km] 
    34      rn_windszy =   4000.   !  latitudinal wind extension    [km] 
    35      rn_uofac  =      0.   !  Uoce multiplicative factor (0.:absolute or 1.:relative winds) 
     33     rn_windszx =   90.    !  longitudinal wind extension   [km] 
     34     rn_windszy =   90.    !  latitudinal wind extension    [km] 
     35!!clem     rn_uofac  =     0.    !  Uoce multiplicative factor (0.:absolute or 1.:relative winds) 
    3636   rn_vtxmax   =      1.   !  initial vortex max current  [m/s] 
    3737   rn_uzonal   =      1.   !  initial zonal current       [m/s] 
    38      rn_ujetszx =   4000.   !  longitudinal jet extension   [km] 
    39      rn_ujetszy =   4000.   !  latitudinal jet extension    [km] 
     38     rn_ujetszx =   4000.  !  longitudinal jet extension   [km] 
     39     rn_ujetszy =   400.   !  latitudinal jet extension    [km] 
    4040   nn_botcase  =      0    !  bottom definition (0:flat, 1:bump) 
    41    nn_initcase =      1    !  initial condition case (0:rest, 1:zonal current, 2:current shear, 3: gaussian zonal current, 
    42       !                    !                          4: geostrophic zonal pulse, 5: vortex) 
    43    ln_sshnoise =  .false.  !  add random noise on initial ssh 
    44    rn_lambda   =     50.   ! gaussian lambda 
     41   nn_initcase =      1    !  initial condition case 
     42   !                       !          -1 : stratif at rest 
     43   !                       !           0 : rest 
     44   !                       !           1 : zonal current 
     45   !                       !           2 : current shear 
     46   !                       !           3 : gaussian zonal current 
     47   !                       !           4 : geostrophic zonal pulse 
     48   !                       !           5 : baroclinic vortex 
     49   ln_sshnoise =  .FALSE.  !  add random noise on initial ssh 
     50   rn_lambda   =     50.   !  gaussian lambda 
     51   nn_perio    = 1 
    4552/ 
    4653!----------------------------------------------------------------------- 
     
    5966!----------------------------------------------------------------------- 
    6067   ln_linssh   =  .false.  !  =T  linear free surface  ==>>  model level are fixed in time 
    61    rn_Dt      =   1440.   !  time step for the dynamics (and tracer if nn_acc=0) 
    62    rn_atfp     =   0.05    !  asselin time filter parameter 
     68   rn_Dt      =   1200.    !  time step for the dynamics (and tracer if nn_acc=0) 
     69   rn_atfp     =   0.0     !  asselin time filter parameter 
     70/ 
     71!----------------------------------------------------------------------- 
     72&namcfg        !   parameters of the configuration                      (default: use namusr_def in namelist_cfg) 
     73!----------------------------------------------------------------------- 
     74   ln_write_cfg = .false.   !  (=T) create the domain configuration file 
     75      cn_domcfg_out = "domain_cfg" ! newly created domain configuration filename 
    6376/ 
    6477!!====================================================================== 
     
    108121!!                                                                    !! 
    109122!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    110 !!   namdrg_top    top    friction                                      (ln_OFF =F & ln_isfcav=T) 
    111 !!   namdrg_bot    bottom friction                                      (ln_OFF =F) 
     123!!   namdrg_top    top    friction                                      (ln_drg_OFF =F & ln_isfcav=T) 
     124!!   namdrg_bot    bottom friction                                      (ln_drg_OFF =F) 
    112125!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    113126!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    117130&namdrg        !   top/bottom drag coefficient                          (default: NO selection) 
    118131!----------------------------------------------------------------------- 
    119    ln_OFF     = .true.    !  free-slip       : Cd = 0 
     132   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    120133/ 
    121134!!====================================================================== 
     
    134147!----------------------------------------------------------------------- 
    135148   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    136    !                            !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     149   !                            !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    137150   rn_a0       =  0.28        !  thermal expension coefficient (for simplified equation of state) 
    138151   rn_b0       =  0.          !  saline  expension coefficient (for simplified equation of state) 
     
    148161   ln_traadv_OFF = .false. !  No tracer advection 
    149162   ln_traadv_cen = .false. !  2nd order centered scheme 
    150       nn_cen_h   =  4            !  =2/4, horizontal 2nd order CEN / 4th order CEN 
    151       nn_cen_v   =  4            !  =2/4, vertical   2nd order CEN / 4th order COMPACT 
     163      nn_cen_h   =  2            !  =2/4, horizontal 2nd order CEN / 4th order CEN 
     164      nn_cen_v   =  2            !  =2/4, vertical   2nd order CEN / 4th order COMPACT 
    152165   ln_traadv_fct = .false. !  FCT scheme 
    153       nn_fct_h   =  2            !  =2/4, horizontal 2nd / 4th order 
     166      nn_fct_h   =  4            !  =2/4, horizontal 2nd / 4th order 
    154167      nn_fct_v   =  2            !  =2/4, vertical   2nd / COMPACT 4th order 
    155168   ln_traadv_mus = .false. !  MUSCL scheme 
     
    162175&namtra_ldf    !   lateral diffusion scheme for tracers                 (default: NO selection) 
    163176!----------------------------------------------------------------------- 
    164    ln_traldf_OFF   =  .true.  !  No explicit diffusion 
     177   !                       !  Operator type: 
     178   ln_traldf_OFF   = .true.    !  No explicit diffusion 
     179   ln_traldf_lap   = .false.   !    laplacian operator 
     180   ln_traldf_blp   = .false.   !  bilaplacian operator 
     181   ! 
     182   !                       !  Direction of action: 
     183   ln_traldf_lev   = .false.   !  iso-level 
     184   ln_traldf_hor   = .true.    !  horizontal  (geopotential) 
     185   ln_traldf_iso   = .false.   !  iso-neutral (standard operator) 
     186   ln_traldf_triad = .false.   !  iso-neutral (triad    operator) 
     187   ! 
     188   !                             !  iso-neutral options: 
     189   ln_traldf_msc   = .false.   !  Method of Stabilizing Correction      (both operators) 
     190   rn_slpmax       =  0.01     !  slope limit                           (both operators) 
     191   ln_triad_iso    = .false.   !  pure horizontal mixing in ML              (triad only) 
     192   rn_sw_triad     = 1         !  =1 switching triad ; =0 all 4 triads used (triad only) 
     193   ln_botmix_triad = .false.   !  lateral mixing on bottom                  (triad only) 
     194   ! 
     195   !                       !  Coefficients: 
     196   nn_aht_ijk_t    = 31         !  space/time variation of eddy coefficient: 
     197      !                             !   =-20 (=-30)    read in eddy_diffusivity_2D.nc (..._3D.nc) file 
     198      !                             !   =  0           constant 
     199      !                             !   = 10 F(k)      =ldf_c1d 
     200      !                             !   = 20 F(i,j)    =ldf_c2d 
     201      !                             !   = 21 F(i,j,t)  =Treguier et al. JPO 1997 formulation 
     202      !                             !   = 30 F(i,j,k)  =ldf_c2d * ldf_c1d 
     203      !                             !   = 31 F(i,j,k,t)=F(local velocity and grid-spacing) 
     204      !                        !  time invariant coefficients:  aht0 = 1/2  Ud*Ld   (lap case) 
     205      !                             !                           or   = 1/12 Ud*Ld^3 (blp case) 
     206      rn_Ud        = 0.01           !  lateral diffusive velocity [m/s] (nn_aht_ijk_t= 0, 10, 20, 30) 
     207      rn_Ld        = 200.e+3        !  lateral diffusive length   [m]   (nn_aht_ijk_t= 0, 10) 
    165208/ 
    166209!!====================================================================== 
     
    183226      nn_dynkeg     = 0       ! scheme for grad(KE): =0   C2  ;  =1   Hollingsworth correction 
    184227   ln_dynadv_cen2 = .false. !  flux form - 2nd order centered scheme 
    185    ln_dynadv_ubs = .true.  !  flux form - 3rd order UBS      scheme 
     228   ln_dynadv_ubs  = .true.  !  flux form - 3rd order UBS      scheme 
    186229/ 
    187230!----------------------------------------------------------------------- 
    188231&namdyn_vor    !   Vorticity / Coriolis scheme                          (default: NO selection) 
    189232!----------------------------------------------------------------------- 
    190    ln_dynvor_ene = .true.  !  energy conserving scheme 
    191    ln_dynvor_ens = .false. !  enstrophy conserving scheme 
    192    ln_dynvor_mix = .false. !  mixed scheme 
     233   ln_dynvor_ene = .false.  !  energy conserving scheme 
     234   ln_dynvor_ens = .false.  !  enstrophy conserving scheme 
     235   ln_dynvor_mix = .false.  !  mixed scheme 
    193236   ln_dynvor_een = .false.  !  energy & enstrophy scheme 
     237   ln_dynvor_enT = .false.  !  energy conserving scheme (T-point) 
     238   ln_dynvor_eeT = .true.   !  energy conserving scheme (een using e3t) 
    194239      nn_een_e3f = 0             !  e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1) 
    195240/ 
     
    210255         !                          !                     = 1 Boxcar over   nn_e sub-steps 
    211256         !                          !                     = 2 Boxcar over 2*nn_e  "    " 
    212       ln_bt_auto    = .false.    ! Number of sub-step defined from: 
     257      ln_bt_auto    = .true.    ! Number of sub-step defined from: 
    213258         nn_e      =  24         ! =F : the number of sub-step in rn_Dt seconds 
    214259/ 
     
    222267   !                       !  Direction of action  : 
    223268   ln_dynldf_lev =  .false.    !  iso-level 
    224    ln_dynldf_hor =  .true.    !  horizontal (geopotential) 
     269   ln_dynldf_hor =  .false.    !  horizontal (geopotential) 
    225270   ln_dynldf_iso =  .false.    !  iso-neutral 
    226271   !                       !  Coefficient 
    227    nn_ahm_ijk_t  = 20           !  space/time variation of eddy coef 
     272   nn_ahm_ijk_t  = 31           !  space/time variation of eddy coef 
    228273      !                             !  =-30  read in eddy_viscosity_3D.nc file 
    229274      !                             !  =-20  read in eddy_viscosity_2D.nc file 
     
    271316!!                                                                    !! 
    272317!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    273 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    274318!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    275319!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    276320!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
     321<<<<<<< .working 
    277322!!   namflo       float parameters                                      (default: OFF) 
    278323!!   nam_diadct   transports through some sections                      (default: OFF) 
     324||||||| .merge-left.r13465 
     325!!   namflo       float parameters                                      (default: OFF) 
     326!!   nam_diaharm  Harmonic analysis of tidal constituents               (default: OFF) 
     327!!   nam_diadct   transports through some sections                      (default: OFF) 
     328======= 
     329!!   namflo       float parameters                                      ("key_float") 
     330!!   nam_diaharm  Harmonic analysis of tidal constituents               ("key_diaharm") 
     331!!   namdct       transports through some sections                      ("key_diadct") 
     332!!   nam_diatmb   Top Middle Bottom Output                              (default: OFF) 
     333>>>>>>> .merge-right.r13470 
    279334!!   nam_dia25h   25h Mean Output                                       (default: OFF) 
    280335!!   namnc4       netcdf4 chunking and compression settings             ("key_netcdf4") 
     
    285340!----------------------------------------------------------------------- 
    286341   ln_glo_trd  = .false.   ! (T) global domain averaged diag for T, T^2, KE, and PE 
    287    ln_dyn_trd  = .true.   ! (T) 3D momentum trend output 
     342   ln_dyn_trd  = .true.    ! (T) 3D momentum trend output 
    288343   ln_dyn_mxl  = .false.   ! (T) 2D momentum trends averaged over the mixed layer (not coded yet) 
    289344   ln_vor_trd  = .false.   ! (T) 2D barotropic vorticity trends (not coded yet) 
     
    312367&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
    313368!----------------------------------------------------------------------- 
     369!!   jpni        =   8       !  jpni   number of processors following i (set automatically if < 1) 
     370!!   jpnj        =   1       !  jpnj   number of processors following j (set automatically if < 1) 
    314371/ 
    315372!----------------------------------------------------------------------- 
    316373&namctl        !   Control prints                                       (default: OFF) 
    317374!----------------------------------------------------------------------- 
     375   ln_timing   = .true.   !  timing by routine write out in timing.output file 
     376!!   ln_diacfl   = .true.   !  CFL diagnostics write out in cfl_diagnostics.ascii 
    318377/ 
    319378!----------------------------------------------------------------------- 
  • NEMO/branches/2020/tickets_icb_1900/tests/CANAL/MY_SRC/domvvl.F90

    r12740 r13899  
    99   !!            3.6  !  2014-11  (P. Mathiot) add ice shelf capability 
    1010   !!            4.1  !  2019-08  (A. Coward, D. Storkey) rename dom_vvl_sf_swp -> dom_vvl_sf_update for new timestepping 
     11   !!            4.x  ! 2020-02  (G. Madec, S. Techene) introduce ssh to h0 ratio 
    1112   !!---------------------------------------------------------------------- 
    1213 
    13    !!---------------------------------------------------------------------- 
    14    !!   dom_vvl_init     : define initial vertical scale factors, depths and column thickness 
    15    !!   dom_vvl_sf_nxt   : Compute next vertical scale factors 
    16    !!   dom_vvl_sf_update   : Swap vertical scale factors and update the vertical grid 
    17    !!   dom_vvl_interpol : Interpolate vertical scale factors from one grid point to another 
    18    !!   dom_vvl_rst      : read/write restart file 
    19    !!   dom_vvl_ctl      : Check the vvl options 
    20    !!---------------------------------------------------------------------- 
    2114   USE oce             ! ocean dynamics and tracers 
    2215   USE phycst          ! physical constant 
     
    3629   PRIVATE 
    3730 
    38    PUBLIC  dom_vvl_init       ! called by domain.F90 
    39    PUBLIC  dom_vvl_zgr        ! called by isfcpl.F90 
    40    PUBLIC  dom_vvl_sf_nxt     ! called by step.F90 
    41    PUBLIC  dom_vvl_sf_update  ! called by step.F90 
    42    PUBLIC  dom_vvl_interpol   ! called by dynnxt.F90 
    43  
    4431   !                                                      !!* Namelist nam_vvl 
    4532   LOGICAL , PUBLIC :: ln_vvl_zstar           = .FALSE.    ! zstar  vertical coordinate 
     
    6350   REAL(wp)        , ALLOCATABLE, SAVE, DIMENSION(:,:)   :: frq_rst_hdv                 ! retoring period for low freq. divergence 
    6451 
     52#if defined key_qco 
     53   !!---------------------------------------------------------------------- 
     54   !!   'key_qco'      EMPTY MODULE      Quasi-Eulerian vertical coordonate 
     55   !!---------------------------------------------------------------------- 
     56#else 
     57   !!---------------------------------------------------------------------- 
     58   !!   Default key      Old management of time varying vertical coordinate 
     59   !!---------------------------------------------------------------------- 
     60    
     61   !!---------------------------------------------------------------------- 
     62   !!   dom_vvl_init     : define initial vertical scale factors, depths and column thickness 
     63   !!   dom_vvl_sf_nxt   : Compute next vertical scale factors 
     64   !!   dom_vvl_sf_update   : Swap vertical scale factors and update the vertical grid 
     65   !!   dom_vvl_interpol : Interpolate vertical scale factors from one grid point to another 
     66   !!   dom_vvl_rst      : read/write restart file 
     67   !!   dom_vvl_ctl      : Check the vvl options 
     68   !!---------------------------------------------------------------------- 
     69 
     70   PUBLIC  dom_vvl_init       ! called by domain.F90 
     71   PUBLIC  dom_vvl_zgr        ! called by isfcpl.F90 
     72   PUBLIC  dom_vvl_sf_nxt     ! called by step.F90 
     73   PUBLIC  dom_vvl_sf_update  ! called by step.F90 
     74   PUBLIC  dom_vvl_interpol   ! called by dynnxt.F90 
     75    
    6576   !! * Substitutions 
    6677#  include "do_loop_substitute.h90" 
     
    135146      ! 
    136147   END SUBROUTINE dom_vvl_init 
    137    ! 
     148 
     149 
    138150   SUBROUTINE dom_vvl_zgr(Kbb, Kmm, Kaa) 
    139151      !!---------------------------------------------------------------------- 
     
    190202      gdept(:,:,1,Kbb) = 0.5_wp * e3w(:,:,1,Kbb) 
    191203      gdepw(:,:,1,Kbb) = 0.0_wp 
    192       DO_3D_11_11( 2, jpk ) 
     204      DO_3D( 1, 1, 1, 1, 2, jpk ) 
    193205         !    zcoef = tmask - wmask    ! 0 everywhere tmask = wmask, ie everywhere expect at jk = mikt 
    194206         !                             ! 1 everywhere from mbkt to mikt + 1 or 1 (if no isf) 
     
    238250         ENDIF 
    239251         IF ( ln_vvl_zstar_at_eqtor ) THEN   ! use z-star in vicinity of the Equator 
    240             DO_2D_11_11 
     252            DO_2D( 1, 1, 1, 1 ) 
    241253!!gm  case |gphi| >= 6 degrees is useless   initialized just above by default 
    242254               IF( ABS(gphit(ji,jj)) >= 6.) THEN 
     
    261273            IF( cn_cfg == "orca" .OR. cn_cfg == "ORCA" ) THEN 
    262274               IF( nn_cfg == 3 ) THEN   ! ORCA2: Suppress ztilde in the Foxe Basin for ORCA2 
    263                   ii0 = 103   ;   ii1 = 111        
    264                   ij0 = 128   ;   ij1 = 135   ;    
     275                  ii0 = 103 + nn_hls - 1   ;   ii1 = 111 + nn_hls - 1       
     276                  ij0 = 128 + nn_hls       ;   ij1 = 135 + nn_hls 
    265277                  frq_rst_e3t( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) =  0.0_wp 
    266278                  frq_rst_hdv( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) =  1.e0_wp / rn_Dt 
     
    322334      LOGICAL                ::   ll_do_bclinic         ! local logical 
    323335      REAL(wp), DIMENSION(jpi,jpj)     ::   zht, z_scale, zwu, zwv, zhdiv 
    324       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   ze3t 
     336      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   ze3t 
     337      LOGICAL , DIMENSION(:,:,:), ALLOCATABLE ::   llmsk 
    325338      !!---------------------------------------------------------------------- 
    326339      ! 
     
    407420         zwu(:,:) = 0._wp 
    408421         zwv(:,:) = 0._wp 
    409          DO_3D_10_10( 1, jpkm1 ) 
     422         DO_3D( 1, 0, 1, 0, 1, jpkm1 ) 
    410423            un_td(ji,jj,jk) = rn_ahe3 * umask(ji,jj,jk) * e2_e1u(ji,jj)           & 
    411424               &            * ( tilde_e3t_b(ji,jj,jk) - tilde_e3t_b(ji+1,jj  ,jk) ) 
     
    415428            zwv(ji,jj) = zwv(ji,jj) + vn_td(ji,jj,jk) 
    416429         END_3D 
    417          DO_2D_11_11 
     430         DO_2D( 1, 1, 1, 1 ) 
    418431            un_td(ji,jj,mbku(ji,jj)) = un_td(ji,jj,mbku(ji,jj)) - zwu(ji,jj) 
    419432            vn_td(ji,jj,mbkv(ji,jj)) = vn_td(ji,jj,mbkv(ji,jj)) - zwv(ji,jj) 
    420433         END_2D 
    421          DO_3D_00_00( 1, jpkm1 ) 
     434         DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
    422435            tilde_e3t_a(ji,jj,jk) = tilde_e3t_a(ji,jj,jk) + (   un_td(ji-1,jj  ,jk) - un_td(ji,jj,jk)    & 
    423436               &                                          +     vn_td(ji  ,jj-1,jk) - vn_td(ji,jj,jk)    & 
     
    435448         ! Maximum deformation control 
    436449         ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    437          ze3t(:,:,jpk) = 0._wp 
    438          DO jk = 1, jpkm1 
    439             ze3t(:,:,jk) = tilde_e3t_a(:,:,jk) / e3t_0(:,:,jk) * tmask(:,:,jk) * tmask_i(:,:) 
    440          END DO 
    441          z_tmax = MAXVAL( ze3t(:,:,:) ) 
    442          CALL mpp_max( 'domvvl', z_tmax )                 ! max over the global domain 
    443          z_tmin = MINVAL( ze3t(:,:,:) ) 
    444          CALL mpp_min( 'domvvl', z_tmin )                 ! min over the global domain 
     450         ALLOCATE( ze3t(jpi,jpj,jpk), llmsk(jpi,jpj,jpk) ) 
     451         DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
     452            ze3t(ji,jj,jk) = tilde_e3t_a(ji,jj,jk) / e3t_0(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj) 
     453         END_3D 
     454         ! 
     455         llmsk(   1:Nis1,:,:) = .FALSE.   ! exclude halos from the checked region 
     456         llmsk(Nie1: jpi,:,:) = .FALSE. 
     457         llmsk(:,   1:Njs1,:) = .FALSE. 
     458         llmsk(:,Nje1: jpj,:) = .FALSE. 
     459         ! 
     460         llmsk(Nis0:Nie0,Njs0:Nje0,:) = tmask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp                  ! define only the inner domain 
     461         z_tmax = MAXVAL( ze3t(:,:,:), mask = llmsk )   ;   CALL mpp_max( 'domvvl', z_tmax )   ! max over the global domain 
     462         z_tmin = MINVAL( ze3t(:,:,:), mask = llmsk )   ;   CALL mpp_min( 'domvvl', z_tmin )   ! min over the global domain 
    445463         ! - ML - test: for the moment, stop simulation for too large e3_t variations 
    446464         IF( ( z_tmax >  rn_zdef_max ) .OR. ( z_tmin < - rn_zdef_max ) ) THEN 
    447             IF( lk_mpp ) THEN 
    448                CALL mpp_maxloc( 'domvvl', ze3t, tmask, z_tmax, ijk_max ) 
    449                CALL mpp_minloc( 'domvvl', ze3t, tmask, z_tmin, ijk_min ) 
    450             ELSE 
    451                ijk_max = MAXLOC( ze3t(:,:,:) ) 
    452                ijk_max(1) = ijk_max(1) + nimpp - 1 
    453                ijk_max(2) = ijk_max(2) + njmpp - 1 
    454                ijk_min = MINLOC( ze3t(:,:,:) ) 
    455                ijk_min(1) = ijk_min(1) + nimpp - 1 
    456                ijk_min(2) = ijk_min(2) + njmpp - 1 
    457             ENDIF 
     465            CALL mpp_maxloc( 'domvvl', ze3t, llmsk, z_tmax, ijk_max ) 
     466            CALL mpp_minloc( 'domvvl', ze3t, llmsk, z_tmin, ijk_min ) 
    458467            IF (lwp) THEN 
    459468               WRITE(numout, *) 'MAX( tilde_e3t_a(:,:,:) / e3t_0(:,:,:) ) =', z_tmax 
     
    464473            ENDIF 
    465474         ENDIF 
     475         DEALLOCATE( ze3t, llmsk ) 
    466476         ! - ML - end test 
    467477         ! - ML - Imposing these limits will cause a baroclinicity error which is corrected for below 
     
    647657      gdepw(:,:,1,Kmm) = 0.0_wp 
    648658      gde3w(:,:,1) = gdept(:,:,1,Kmm) - ssh(:,:,Kmm) 
    649       DO_3D_11_11( 2, jpk ) 
     659      DO_3D( 1, 1, 1, 1, 2, jpk ) 
    650660        !    zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk))   ! 0 everywhere tmask = wmask, ie everywhere expect at jk = mikt 
    651661                                                           ! 1 for jk = mikt 
     
    702712         ! 
    703713      CASE( 'U' )                   !* from T- to U-point : hor. surface weighted mean 
    704          DO_3D_10_10( 1, jpk ) 
     714         DO_3D( 1, 0, 1, 0, 1, jpk ) 
    705715            pe3_out(ji,jj,jk) = 0.5_wp * (  umask(ji,jj,jk) * (1.0_wp - zlnwd) + zlnwd ) * r1_e1e2u(ji,jj)   & 
    706716               &                       * (   e1e2t(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3t_0(ji  ,jj,jk) )     & 
     
    711721         ! 
    712722      CASE( 'V' )                   !* from T- to V-point : hor. surface weighted mean 
    713          DO_3D_10_10( 1, jpk ) 
     723         DO_3D( 1, 0, 1, 0, 1, jpk ) 
    714724            pe3_out(ji,jj,jk) = 0.5_wp * ( vmask(ji,jj,jk)  * (1.0_wp - zlnwd) + zlnwd ) * r1_e1e2v(ji,jj)   & 
    715725               &                       * (   e1e2t(ji,jj  ) * ( pe3_in(ji,jj  ,jk) - e3t_0(ji,jj  ,jk) )     & 
     
    720730         ! 
    721731      CASE( 'F' )                   !* from U-point to F-point : hor. surface weighted mean 
    722          DO_3D_10_10( 1, jpk ) 
     732         DO_3D( 1, 0, 1, 0, 1, jpk ) 
    723733            pe3_out(ji,jj,jk) = 0.5_wp * (  umask(ji,jj,jk) * umask(ji,jj+1,jk) * (1.0_wp - zlnwd) + zlnwd ) & 
    724734               &                       *    r1_e1e2f(ji,jj)                                                  & 
     
    793803         IF( ln_rstart ) THEN                   !* Read the restart file 
    794804            CALL rst_read_open                  !  open the restart file if necessary 
    795             CALL iom_get( numror, jpdom_autoglo, 'sshn'   , ssh(:,:,Kmm), ldxios = lrxios    ) 
     805            CALL iom_get( numror, jpdom_auto, 'sshn'   , ssh(:,:,Kmm), ldxios = lrxios    ) 
    796806            ! 
    797807            id1 = iom_varid( numror, 'e3t_b', ldstop = .FALSE. ) 
     
    806816            ! 
    807817            IF( MIN( id1, id2 ) > 0 ) THEN       ! all required arrays exist 
    808                CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) 
    809                CALL iom_get( numror, jpdom_autoglo, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lrxios ) 
     818               CALL iom_get( numror, jpdom_auto, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) 
     819               CALL iom_get( numror, jpdom_auto, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lrxios ) 
    810820               ! needed to restart if land processor not computed  
    811821               IF(lwp) write(numout,*) 'dom_vvl_rst : e3t(:,:,:,Kbb) and e3t(:,:,:,Kmm) found in restart files' 
     
    821831               IF(lwp) write(numout,*) 'e3t_n set equal to e3t_b.' 
    822832               IF(lwp) write(numout,*) 'l_1st_euler is forced to true' 
    823                CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) 
     833               CALL iom_get( numror, jpdom_auto, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) 
    824834               e3t(:,:,:,Kmm) = e3t(:,:,:,Kbb) 
    825835               l_1st_euler = .true. 
     
    828838               IF(lwp) write(numout,*) 'e3t_b set equal to e3t_n.' 
    829839               IF(lwp) write(numout,*) 'l_1st_euler is forced to true' 
    830                CALL iom_get( numror, jpdom_autoglo, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lrxios ) 
     840               CALL iom_get( numror, jpdom_auto, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lrxios ) 
    831841               e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm) 
    832842               l_1st_euler = .true. 
     
    853863               !                          ! ----------------------- ! 
    854864               IF( MIN( id3, id4 ) > 0 ) THEN  ! all required arrays exist 
    855                   CALL iom_get( numror, jpdom_autoglo, 'tilde_e3t_b', tilde_e3t_b(:,:,:), ldxios = lrxios ) 
    856                   CALL iom_get( numror, jpdom_autoglo, 'tilde_e3t_n', tilde_e3t_n(:,:,:), ldxios = lrxios ) 
     865                  CALL iom_get( numror, jpdom_auto, 'tilde_e3t_b', tilde_e3t_b(:,:,:), ldxios = lrxios ) 
     866                  CALL iom_get( numror, jpdom_auto, 'tilde_e3t_n', tilde_e3t_n(:,:,:), ldxios = lrxios ) 
    857867               ELSE                            ! one at least array is missing 
    858868                  tilde_e3t_b(:,:,:) = 0.0_wp 
     
    863873                  !                       ! ------------ ! 
    864874                  IF( id5 > 0 ) THEN  ! required array exists 
    865                      CALL iom_get( numror, jpdom_autoglo, 'hdiv_lf', hdiv_lf(:,:,:), ldxios = lrxios ) 
     875                     CALL iom_get( numror, jpdom_auto, 'hdiv_lf', hdiv_lf(:,:,:), ldxios = lrxios ) 
    866876                  ELSE                ! array is missing 
    867877                     hdiv_lf(:,:,:) = 0.0_wp 
     
    887897                  ssh(:,:,Kbb) = -ssh_ref 
    888898 
    889                   DO_2D_11_11 
     899                  DO_2D( 1, 1, 1, 1 ) 
    890900                     IF( ht_0(ji,jj)-ssh_ref <  rn_wdmin1 ) THEN ! if total depth is less than min depth 
    891901                        ssh(ji,jj,Kbb) = rn_wdmin1 - (ht_0(ji,jj) ) 
     
    903913               e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm) 
    904914 
    905                DO_2D_11_11 
     915               DO_2D( 1, 1, 1, 1 ) 
    906916                  IF ( ht_0(ji,jj) .LE. 0.0 .AND. NINT( ssmask(ji,jj) ) .EQ. 1) THEN 
    907917                     CALL ctl_stop( 'dom_vvl_rst: ht_0 must be positive at potentially wet points' ) 
     
    10301040   END SUBROUTINE dom_vvl_ctl 
    10311041 
     1042#endif 
     1043 
    10321044   !!====================================================================== 
    10331045END MODULE domvvl 
  • NEMO/branches/2020/tickets_icb_1900/tests/CANAL/MY_SRC/stpctl.F90

    r13216 r13899  
    4949      !! 
    5050      !! ** Method  : - Save the time step in numstp 
    51       !!              - Print it each 50 time steps 
    5251      !!              - Stop the run IF problem encountered by setting nstop > 0 
    5352      !!                Problems checked: |ssh| maximum larger than 10 m 
     
    6867      REAL(wp)                        ::   zzz                                   ! local real  
    6968      REAL(wp), DIMENSION(9)          ::   zmax, zmaxlocal 
    70       LOGICAL                         ::   ll_wrtstp, ll_colruns, ll_wrtruns 
     69      LOGICAL                         ::   ll_wrtstp, ll_colruns, ll_wrtruns, ll_0oce 
    7170      LOGICAL, DIMENSION(jpi,jpj,jpk) ::   llmsk 
    7271      CHARACTER(len=20)               ::   clname 
     
    119118      !                                   !==            test of local extrema           ==! 
    120119      !                                   !==  done by all processes at every time step  ==! 
    121       llmsk(:,:,1) = ssmask(:,:) == 1._wp 
     120      ! 
     121      llmsk(   1:Nis1,:,:) = .FALSE.                                              ! exclude halos from the checked region 
     122      llmsk(Nie1: jpi,:,:) = .FALSE. 
     123      llmsk(:,   1:Njs1,:) = .FALSE. 
     124      llmsk(:,Nje1: jpj,:) = .FALSE. 
     125      ! 
     126      llmsk(Nis0:Nie0,Njs0:Nje0,1) = ssmask(Nis0:Nie0,Njs0:Nje0) == 1._wp         ! define only the inner domain 
     127      ! 
     128      ll_0oce = .NOT. ANY( llmsk(:,:,1) )                                         ! no ocean point in the inner domain? 
     129      ! 
    122130      IF( ll_wd ) THEN 
    123131         zmax(1) = MAXVAL( ABS( ssh(:,:,Kmm) + ssh_ref ), mask = llmsk(:,:,1) )   ! ssh max 
     
    125133         zmax(1) = MAXVAL( ABS( ssh(:,:,Kmm)           ), mask = llmsk(:,:,1) )   ! ssh max 
    126134      ENDIF 
    127       llmsk(:,:,:) = umask(:,:,:) == 1._wp 
     135      llmsk(Nis0:Nie0,Njs0:Nje0,:) = umask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp        ! define only the inner domain 
    128136      zmax(2) = MAXVAL(  ABS( uu(:,:,:,Kmm) ), mask = llmsk )                     ! velocity max (zonal only) 
    129       llmsk(:,:,:) = tmask(:,:,:) == 1._wp 
     137      llmsk(Nis0:Nie0,Njs0:Nje0,:) = tmask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp        ! define only the inner domain 
    130138      zmax(3) = MAXVAL( -ts(:,:,:,jp_sal,Kmm), mask = llmsk )                     ! minus salinity max 
    131139      zmax(4) = MAXVAL(  ts(:,:,:,jp_sal,Kmm), mask = llmsk )                     !       salinity max 
     
    143151         zmax(5:8) = 0._wp 
    144152      ENDIF 
    145       zmax(9) = REAL( nstop, wp )                                              ! stop indicator 
     153      zmax(9) = REAL( nstop, wp )                                                 ! stop indicator 
     154      ! 
    146155      !                                   !==               get global extrema             ==! 
    147156      !                                   !==  done by all processes if writting run.stat  ==! 
    148157      IF( ll_colruns ) THEN 
    149158         zmaxlocal(:) = zmax(:) 
    150          CALL mpp_max( "stpctl", zmax )          ! max over the global domain 
     159         CALL mpp_max( "stpctl", zmax )          ! max over the global domain: ok even of ll_0oce = .true.  
    151160         nstop = NINT( zmax(9) )                 ! update nstop indicator (now sheared among all local domains) 
    152       ENDIF 
     161      ELSE 
     162         ! if no ocean point: MAXVAL returns -HUGE => we must overwrite this value to avoid error handling bellow. 
     163         IF( ll_0oce )   zmax(1:4) = (/ 0._wp, 0._wp, -1._wp, 1._wp /)   ! default "valid" values... 
     164      ENDIF 
     165      ! 
     166      zmax(3) = -zmax(3)                         ! move back from max(-zz) to min(zz) : easier to manage!  
     167      zmax(5) = -zmax(5)                         ! move back from max(-zz) to min(zz) : easier to manage! 
     168      IF( ll_colruns ) THEN 
     169         zmaxlocal(3) = -zmaxlocal(3)            ! move back from max(-zz) to min(zz) : easier to manage!  
     170         zmaxlocal(5) = -zmaxlocal(5)            ! move back from max(-zz) to min(zz) : easier to manage! 
     171      ENDIF 
     172      ! 
    153173      !                                   !==              write "run.stat" files              ==! 
    154174      !                                   !==  done only by 1st subdomain at writting timestep  ==! 
    155175      IF( ll_wrtruns ) THEN 
    156          WRITE(numrun,9500) kt, zmax(1), zmax(2), -zmax(3), zmax(4) 
    157          istatus = NF90_PUT_VAR( nrunid, nvarid(1), (/ zmax(1)/), (/kt/), (/1/) ) 
    158          istatus = NF90_PUT_VAR( nrunid, nvarid(2), (/ zmax(2)/), (/kt/), (/1/) ) 
    159          istatus = NF90_PUT_VAR( nrunid, nvarid(3), (/-zmax(3)/), (/kt/), (/1/) ) 
    160          istatus = NF90_PUT_VAR( nrunid, nvarid(4), (/ zmax(4)/), (/kt/), (/1/) ) 
    161          istatus = NF90_PUT_VAR( nrunid, nvarid(5), (/-zmax(5)/), (/kt/), (/1/) ) 
    162          istatus = NF90_PUT_VAR( nrunid, nvarid(6), (/ zmax(6)/), (/kt/), (/1/) ) 
    163          IF( ln_zad_Aimp ) THEN 
    164             istatus = NF90_PUT_VAR( nrunid, nvarid(7), (/ zmax(7)/), (/kt/), (/1/) ) 
    165             istatus = NF90_PUT_VAR( nrunid, nvarid(8), (/ zmax(8)/), (/kt/), (/1/) ) 
    166          ENDIF 
     176         WRITE(numrun,9500) kt, zmax(1), zmax(2), zmax(3), zmax(4) 
     177         DO ji = 1, 6 + 2 * COUNT( (/ln_zad_Aimp/) ) 
     178            istatus = NF90_PUT_VAR( nrunid, nvarid(ji), (/zmax(ji)/), (/kt/), (/1/) ) 
     179         END DO 
    167180         IF( kt == nitend )   istatus = NF90_CLOSE(nrunid) 
    168181      END IF 
     
    170183      !                                   !==  done by all processes at every time step  ==! 
    171184      ! 
    172       IF(   zmax(1) >   20._wp .OR.   &                   ! too large sea surface height ( > 20 m ) 
    173          &  zmax(2) >   10._wp .OR.   &                   ! too large velocity ( > 10 m/s) 
    174 !!$         &  zmax(3) >=   0._wp .OR.   &                   ! negative or zero sea surface salinity 
    175 !!$         &  zmax(4) >= 100._wp .OR.   &                   ! too large sea surface salinity ( > 100 ) 
    176 !!$         &  zmax(4) <    0._wp .OR.   &                   ! too large sea surface salinity (keep this line for sea-ice) 
    177          &  ISNAN( zmax(1) + zmax(2) + zmax(3) ) .OR.   &               ! NaN encounter in the tests 
    178          &  ABS(   zmax(1) + zmax(2) + zmax(3) ) > HUGE(1._wp) ) THEN   ! Infinity encounter in the tests 
     185      IF(  zmax(1) >   20._wp .OR.   &                   ! too large sea surface height ( > 20 m ) 
     186         & zmax(2) >   10._wp .OR.   &                   ! too large velocity ( > 10 m/s) 
     187!!$         & zmax(3) <=   0._wp .OR.   &                   ! negative or zero sea surface salinity 
     188!!$         & zmax(4) >= 100._wp .OR.   &                   ! too large sea surface salinity ( > 100 ) 
     189!!$         & zmax(4) <    0._wp .OR.   &                   ! too large sea surface salinity (keep this line for sea-ice) 
     190         & ISNAN( zmax(1) + zmax(2) + zmax(3) ) .OR.   &               ! NaN encounter in the tests 
     191         & ABS(   zmax(1) + zmax(2) + zmax(3) ) > HUGE(1._wp) ) THEN   ! Infinity encounter in the tests 
    179192         ! 
    180193         iloc(:,:) = 0 
     
    183196            IF( lwm .AND. kt /= nitend )   istatus = NF90_CLOSE(nrunid) 
    184197            ! get global loc on the min/max 
    185             CALL mpp_maxloc( 'stpctl', ABS(ssh(:,:,         Kmm)), ssmask(:,:  ), zzz, iloc(1:2,1) )   ! mpp_maxloc ok if mask = F  
    186             CALL mpp_maxloc( 'stpctl', ABS( uu(:,:,:,       Kmm)),  umask(:,:,:), zzz, iloc(1:3,2) ) 
    187             CALL mpp_minloc( 'stpctl',      ts(:,:,:,jp_sal,Kmm) ,  tmask(:,:,:), zzz, iloc(1:3,3) ) 
    188             CALL mpp_maxloc( 'stpctl',      ts(:,:,:,jp_sal,Kmm) ,  tmask(:,:,:), zzz, iloc(1:3,4) ) 
     198            llmsk(Nis0:Nie0,Njs0:Nje0,1) = ssmask(Nis0:Nie0,Njs0:Nje0 ) == 1._wp         ! define only the inner domain 
     199            CALL mpp_maxloc( 'stpctl', ABS(ssh(:,:,         Kmm)), llmsk(:,:,1), zzz, iloc(1:2,1) )   ! mpp_maxloc ok if mask = F  
     200            llmsk(Nis0:Nie0,Njs0:Nje0,:) = umask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp        ! define only the inner domain 
     201            CALL mpp_maxloc( 'stpctl', ABS( uu(:,:,:,       Kmm)), llmsk(:,:,:), zzz, iloc(1:3,2) ) 
     202            llmsk(Nis0:Nie0,Njs0:Nje0,:) = tmask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp        ! define only the inner domain 
     203            CALL mpp_minloc( 'stpctl',      ts(:,:,:,jp_sal,Kmm) , llmsk(:,:,:), zzz, iloc(1:3,3) ) 
     204            CALL mpp_maxloc( 'stpctl',      ts(:,:,:,jp_sal,Kmm) , llmsk(:,:,:), zzz, iloc(1:3,4) ) 
    189205            ! find which subdomain has the max. 
    190206            iareamin(:) = jpnij+1   ;   iareamax(:) = 0   ;   iareasum(:) = 0 
     
    199215         ELSE                    ! find local min and max locations: 
    200216            ! if we are here, this means that the subdomain contains some oce points -> no need to test the mask used in maxloc 
    201             iloc(1:2,1) = MAXLOC( ABS( ssh(:,:,         Kmm)), mask = ssmask(:,:  ) == 1._wp ) + (/ nimpp - 1, njmpp - 1    /) 
    202             iloc(1:3,2) = MAXLOC( ABS(  uu(:,:,:,       Kmm)), mask =  umask(:,:,:) == 1._wp ) + (/ nimpp - 1, njmpp - 1, 0 /) 
    203             iloc(1:3,3) = MINLOC(       ts(:,:,:,jp_sal,Kmm) , mask =  tmask(:,:,:) == 1._wp ) + (/ nimpp - 1, njmpp - 1, 0 /) 
    204             iloc(1:3,4) = MAXLOC(       ts(:,:,:,jp_sal,Kmm) , mask =  tmask(:,:,:) == 1._wp ) + (/ nimpp - 1, njmpp - 1, 0 /) 
     217            llmsk(Nis0:Nie0,Njs0:Nje0,1) = ssmask(Nis0:Nie0,Njs0:Nje0 ) == 1._wp        ! define only the inner domain 
     218            iloc(1:2,1) = MAXLOC( ABS( ssh(:,:,         Kmm)), mask = llmsk(:,:,1) ) 
     219            llmsk(Nis0:Nie0,Njs0:Nje0,:) = umask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp        ! define only the inner domain 
     220            iloc(1:3,2) = MAXLOC( ABS(  uu(:,:,:,       Kmm)), mask = llmsk(:,:,:) ) 
     221            llmsk(Nis0:Nie0,Njs0:Nje0,:) = tmask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp        ! define only the inner domain 
     222            iloc(1:3,3) = MINLOC(       ts(:,:,:,jp_sal,Kmm) , mask = llmsk(:,:,:) ) 
     223            iloc(1:3,4) = MAXLOC(       ts(:,:,:,jp_sal,Kmm) , mask = llmsk(:,:,:) ) 
     224            DO ji = 1, 4   ! local domain indices ==> global domain indices, excluding halos 
     225               iloc(1:2,ji) = (/ mig0(iloc(1,ji)), mjg0(iloc(2,ji)) /) 
     226            END DO 
    205227            iareamin(:) = narea   ;   iareamax(:) = narea   ;   iareasum(:) = 1         ! this is local information 
    206228         ENDIF 
    207229         ! 
    208230         WRITE(ctmp1,*) ' stp_ctl: |ssh| > 20 m  or  |U| > 10 m/s  or  S <= 0  or  S >= 100  or  NaN encounter in the tests' 
    209          CALL wrt_line( ctmp2, kt, '|ssh| max',  zmax(1), iloc(:,1), iareasum(1), iareamin(1), iareamax(1) ) 
    210          CALL wrt_line( ctmp3, kt, '|U|   max',  zmax(2), iloc(:,2), iareasum(2), iareamin(2), iareamax(2) ) 
    211          CALL wrt_line( ctmp4, kt, 'Sal   min', -zmax(3), iloc(:,3), iareasum(3), iareamin(3), iareamax(3) ) 
    212          CALL wrt_line( ctmp5, kt, 'Sal   max',  zmax(4), iloc(:,4), iareasum(4), iareamin(4), iareamax(4) ) 
     231         CALL wrt_line( ctmp2, kt, '|ssh| max', zmax(1), iloc(:,1), iareasum(1), iareamin(1), iareamax(1) ) 
     232         CALL wrt_line( ctmp3, kt, '|U|   max', zmax(2), iloc(:,2), iareasum(2), iareamin(2), iareamax(2) ) 
     233         CALL wrt_line( ctmp4, kt, 'Sal   min', zmax(3), iloc(:,3), iareasum(3), iareamin(3), iareamax(3) ) 
     234         CALL wrt_line( ctmp5, kt, 'Sal   max', zmax(4), iloc(:,4), iareasum(4), iareamin(4), iareamax(4) ) 
    213235         IF( Agrif_Root() ) THEN 
    214236            WRITE(ctmp6,*) '      ===> output of last computed fields in output.abort* files' 
  • NEMO/branches/2020/tickets_icb_1900/tests/CANAL/MY_SRC/trazdf.F90

    r12740 r13899  
    156156            IF( l_ldfslp ) THEN            ! isoneutral diffusion: add the contribution  
    157157               IF( ln_traldf_msc  ) THEN     ! MSC iso-neutral operator  
    158                   DO_3D_00_00( 2, jpkm1 ) 
     158                  DO_3D( 0, 0, 0, 0, 2, jpkm1 ) 
    159159                     zwt(ji,jj,jk) = zwt(ji,jj,jk) + akz(ji,jj,jk)   
    160160                  END_3D 
    161161               ELSE                          ! standard or triad iso-neutral operator 
    162                   DO_3D_00_00( 2, jpkm1 ) 
     162                  DO_3D( 0, 0, 0, 0, 2, jpkm1 ) 
    163163                     zwt(ji,jj,jk) = zwt(ji,jj,jk) + ah_wslp2(ji,jj,jk) 
    164164                  END_3D 
     
    168168            ! Diagonal, lower (i), upper (s)  (including the bottom boundary condition since avt is masked) 
    169169            IF( ln_zad_Aimp ) THEN         ! Adaptive implicit vertical advection 
    170                DO_3D_00_00( 1, jpkm1 ) 
     170               DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
    171171                  zzwi = - p2dt * zwt(ji,jj,jk  ) / e3w(ji,jj,jk  ,Kmm) 
    172172                  zzws = - p2dt * zwt(ji,jj,jk+1) / e3w(ji,jj,jk+1,Kmm) 
     
    177177               END_3D 
    178178            ELSE 
    179                DO_3D_00_00( 1, jpkm1 ) 
     179               DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
    180180                  zwi(ji,jj,jk) = - p2dt * zwt(ji,jj,jk  ) / e3w(ji,jj,jk,Kmm) 
    181181                  zws(ji,jj,jk) = - p2dt * zwt(ji,jj,jk+1) / e3w(ji,jj,jk+1,Kmm) 
     
    203203            !   used as a work space array: its value is modified. 
    204204            ! 
    205             DO_2D_00_00 
     205            DO_2D( 0, 0, 0, 0 ) 
    206206               zwt(ji,jj,1) = zwd(ji,jj,1) 
    207207            END_2D 
    208             DO_3D_00_00( 2, jpkm1 ) 
     208            DO_3D( 0, 0, 0, 0, 2, jpkm1 ) 
    209209               zwt(ji,jj,jk) = zwd(ji,jj,jk) - zwi(ji,jj,jk) * zws(ji,jj,jk-1) / zwt(ji,jj,jk-1) 
    210210            END_3D 
     
    212212         ENDIF  
    213213         !          
    214          DO_2D_00_00 
     214         DO_2D( 0, 0, 0, 0 ) 
    215215            pt(ji,jj,1,jn,Kaa) = e3t(ji,jj,1,Kbb) * pt(ji,jj,1,jn,Kbb) + p2dt * e3t(ji,jj,1,Kmm) * pt(ji,jj,1,jn,Krhs) 
    216216         END_2D 
    217          DO_3D_00_00( 2, jpkm1 ) 
     217         DO_3D( 0, 0, 0, 0, 2, jpkm1 ) 
    218218            zrhs = e3t(ji,jj,jk,Kbb) * pt(ji,jj,jk,jn,Kbb) + p2dt * e3t(ji,jj,jk,Kmm) * pt(ji,jj,jk,jn,Krhs)   ! zrhs=right hand side 
    219219            pt(ji,jj,jk,jn,Kaa) = zrhs - zwi(ji,jj,jk) / zwt(ji,jj,jk-1) * pt(ji,jj,jk-1,jn,Kaa) 
    220220         END_3D 
    221221         ! 
    222          DO_2D_00_00 
     222         DO_2D( 0, 0, 0, 0 ) 
    223223            pt(ji,jj,jpkm1,jn,Kaa) = pt(ji,jj,jpkm1,jn,Kaa) / zwt(ji,jj,jpkm1) * tmask(ji,jj,jpkm1) 
    224224         END_2D 
    225          DO_3DS_00_00( jpk-2, 1, -1 ) 
     225         DO_3DS( 0, 0, 0, 0, jpk-2, 1, -1 ) 
    226226            pt(ji,jj,jk,jn,Kaa) = ( pt(ji,jj,jk,jn,Kaa) - zws(ji,jj,jk) * pt(ji,jj,jk+1,jn,Kaa) )   & 
    227227               &             / zwt(ji,jj,jk) * tmask(ji,jj,jk) 
  • NEMO/branches/2020/tickets_icb_1900/tests/CANAL/MY_SRC/usrdef_hgr.F90

    r12740 r13899  
    6363      REAL(wp), DIMENSION(:,:), INTENT(out) ::   pe1e2u, pe1e2v               ! u- & v-surfaces (if reduction in strait)   [m2] 
    6464      ! 
    65       INTEGER  ::   ji, jj   ! dummy loop indices 
     65      INTEGER  ::   ji, jj     ! dummy loop indices 
    6666      REAL(wp) ::   zphi0, zlam0, zbeta, zf0 
    67       REAL(wp) ::   zti, zui, ztj, zvj   ! local scalars 
     67      REAL(wp) ::   zti, ztj   ! local scalars 
    6868      !!------------------------------------------------------------------------------- 
    6969      ! 
     
    7777      ! Position coordinates (in kilometers) 
    7878      !                          ========== 
    79       zlam0 = -REAL(NINT(jpiglo*rn_0xratio)-1, wp) * rn_dx 
    80       zphi0 = -REAL(NINT(jpjglo*rn_0yratio)-1, wp) * rn_dy  
     79      zlam0 = -REAL(NINT(Ni0glo*rn_0xratio)-1, wp) * rn_dx 
     80      zphi0 = -REAL(NINT(Nj0glo*rn_0yratio)-1, wp) * rn_dy  
    8181 
    8282#if defined key_agrif 
     
    9090#endif 
    9191          
    92       DO_2D_11_11 
    93          zti = FLOAT( ji - 1 + nimpp - 1 )          ;  ztj = FLOAT( jj - 1 + njmpp - 1 ) 
    94          zui = FLOAT( ji - 1 + nimpp - 1 ) + 0.5_wp ;  zvj = FLOAT( jj - 1 + njmpp - 1 ) + 0.5_wp 
     92      DO_2D( 1, 1, 1, 1 )          
     93         zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos 
     94         ztj = REAL( mjg0_oldcmp(jj) - 1, wp )   ! start at j=0 in the global grid without halos 
    9595          
    96          plamt(ji,jj) = zlam0 + rn_dx * zti 
    97          plamu(ji,jj) = zlam0 + rn_dx * zui 
     96         plamt(ji,jj) = zlam0 + rn_dx *   zti 
     97         plamu(ji,jj) = zlam0 + rn_dx * ( zti + 0.5_wp )  
    9898         plamv(ji,jj) = plamt(ji,jj)  
    9999         plamf(ji,jj) = plamu(ji,jj)  
    100100          
    101          pphit(ji,jj) = zphi0 + rn_dy * ztj 
    102          pphiv(ji,jj) = zphi0 + rn_dy * zvj 
     101         pphit(ji,jj) = zphi0 + rn_dy *   ztj 
     102         pphiv(ji,jj) = zphi0 + rn_dy * ( ztj + 0.5_wp )  
    103103         pphiu(ji,jj) = pphit(ji,jj)  
    104104         pphif(ji,jj) = pphiv(ji,jj)  
  • NEMO/branches/2020/tickets_icb_1900/tests/CANAL/MY_SRC/usrdef_istate.F90

    r12740 r13899  
    6666      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~   ' 
    6767      ! 
    68       IF (ln_sshnoise) CALL RANDOM_NUMBER(zrandom) 
    6968      zjetx = ABS(rn_ujetszx)/2. 
    7069      zjety = ABS(rn_ujetszy)/2. 
    7170      ! 
     71      zf0   = 2._wp * omega * SIN( rad * rn_ppgphi0 ) 
     72      ! 
    7273      SELECT CASE(nn_initcase) 
     74 
     75      CASE(-1)    ! stratif at rest 
     76 
     77         ! sea level: 
     78         pssh(:,:) = 0. 
     79         ! temperature: 
     80         pts(:,:,1,jp_tem) = 25. !!30._wp 
     81         pts(:,:,2:jpk,jp_tem) = 22. !!24._wp 
     82         ! salinity:   
     83         pts(:,:,:,jp_sal) = 35._wp 
     84         ! velocities: 
     85         pu(:,:,:) = 0. 
     86         pv(:,:,:) = 0. 
     87 
    7388      CASE(0)    ! rest 
    7489          
     
    98113            zbeta = 2._wp * omega * COS( rad * rn_ppgphi0 ) / ra 
    99114            WHERE( ABS(gphit) <= zjety ) 
    100                pssh(:,:) = - rn_uzonal / grav * ( ff_t(:,:) * gphit(:,:) * 1.e3 + 0.5 * zbeta * gphit(:,:) * gphit(:,:) * 1.e6 ) 
    101             ELSEWHERE 
    102                pssh(:,:) = - rn_uzonal / grav * ( ff_t(:,:) * SIGN(zjety, gphit(:,:)) * 1.e3   & 
     115               pssh(:,:) = - rn_uzonal / grav * ( zf0 * gphit(:,:) * 1.e3 + 0.5 * zbeta * gphit(:,:) * gphit(:,:) * 1.e6 ) 
     116            ELSEWHERE 
     117               pssh(:,:) = - rn_uzonal / grav * ( zf0 * SIGN(zjety, gphit(:,:)) * 1.e3   & 
    103118                  &                             + 0.5 * zbeta * zjety * zjety * 1.e6 ) 
    104119            END WHERE 
     
    109124         pts(:,:,jpk,jp_sal) = 0. 
    110125         DO jk=1, jpkm1 
    111             pts(:,:,jk,jp_sal) = gphit(:,:) 
     126            WHERE( ABS(gphit) <= zjety ) 
     127!!$            WHERE( ABS(gphit) <= zjety*0.5 .AND. ABS(glamt) <= zjety*0.5 ) ! for a square of salt 
     128               pts(:,:,jk,jp_sal) = 35. 
     129            ELSEWHERE 
     130               pts(:,:,jk,jp_sal) = 30. 
     131            END WHERE                     
    112132         END DO 
    113133         ! velocities: 
     
    134154            WHERE( ABS(gphit) <= zjety ) 
    135155               pssh(:,:) = - SIGN(rn_uzonal, gphit(:,:)) / grav   & 
    136                   &        * ( ff_t(:,:) * gphit(:,:) * 1.e3 + 0.5 * zbeta * gphit(:,:) * gphit(:,:) * 1.e6 ) 
     156                  &        * ( zf0 * gphit(:,:) * 1.e3 + 0.5 * zbeta * gphit(:,:) * gphit(:,:) * 1.e6 ) 
    137157            ELSEWHERE 
    138158               pssh(:,:) = - SIGN(rn_uzonal, gphit(:,:)) / grav   & 
    139                   &        * ( ff_t(:,:) * SIGN(zjety, gphit(:,:)) * 1.e3 + 0.5 * zbeta * zjety * zjety * 1.e6 ) 
     159                  &        * ( zf0 * SIGN(zjety, gphit(:,:)) * 1.e3 + 0.5 * zbeta * zjety * zjety * 1.e6 ) 
    140160            END WHERE 
    141161         END SELECT 
     
    143163         pts(:,:,:,jp_tem) = 10._wp 
    144164         ! salinity:   
    145          pts(:,:,:,jp_sal) = 2. 
    146          DO jk=1, jpkm1 
    147             WHERE( ABS(gphiv) <= zjety ) pts(:,:,jk,jp_sal) = 2. + SIGN(1.,gphiv(:,:)) 
     165         pts(:,:,:,jp_sal) = 30. 
     166         DO jk=1, jpkm1 
     167            WHERE( ABS(gphiv) <= zjety ) pts(:,:,jk,jp_sal) = 30. + SIGN(1.,gphiv(:,:)) 
    148168         END DO 
    149169         ! velocities: 
     
    166186         pssh(:,1) = - ff_t(:,1) / grav * pu(:,1,1) * e2t(:,1) 
    167187         DO jl=1, jpnj 
    168             DO_2D_00_00 
     188            DO_2D( 0, 0, 0, 0 ) 
    169189               pssh(ji,jj) = pssh(ji,jj-1) - ff_t(ji,jj) / grav * pu(ji,jj,1) * e2t(ji,jj) 
    170190            END_2D 
     
    176196         ! salinity:   
    177197         DO jk=1, jpkm1 
    178             pts(:,:,jk,jp_sal) = gphit(:,:) 
     198            pts(:,:,jk,jp_sal) = pssh(:,:) 
    179199         END DO 
    180200         ! velocities: 
     
    183203      CASE(4)    ! geostrophic zonal pulse 
    184204    
    185          DO_2D_11_11 
     205         DO_2D( 1, 1, 1, 1 ) 
    186206            IF ( ABS(glamt(ji,jj)) <= zjetx ) THEN 
    187207               zdu = rn_uzonal 
     
    210230         zf0   = 2._wp * omega * SIN( rad * rn_ppgphi0 ) 
    211231         zumax = rn_vtxmax * SIGN(1._wp, zf0) ! Here Anticyclonic: set zumax=-1 for cyclonic 
    212          zlambda = SQRT(2._wp)*rn_lambda       ! Horizontal scale in meters  
     232         zlambda = SQRT(2._wp)*rn_lambda*1.e3       ! Horizontal scale in meters  
    213233         zn2 = 3.e-3**2 
    214234         zH = 0.5_wp * 5000._wp 
     
    217237         zP0 = rho0 * zf0 * zumax * zlambda * SQRT(EXP(1._wp)/2._wp) 
    218238         ! 
    219          DO_2D_11_11 
     239         DO_2D( 1, 1, 1, 1 ) 
    220240            zx = glamt(ji,jj) * 1.e3 
    221241            zy = gphit(ji,jj) * 1.e3 
     
    248268         ! velocities: 
    249269         za = 2._wp * zP0 / zlambda**2 
    250          DO_2D_00_00 
     270         DO_2D( 0, 0, 0, 0 ) 
    251271            zx = glamu(ji,jj) * 1.e3 
    252272            zy = gphiu(ji,jj) * 1.e3 
     
    263283         END_2D 
    264284         ! 
    265          DO_2D_00_00 
     285         DO_2D( 0, 0, 0, 0 ) 
    266286            zx = glamv(ji,jj) * 1.e3 
    267287            zy = gphiv(ji,jj) * 1.e3 
     
    281301       
    282302      IF (ln_sshnoise) THEN 
     303         CALL RANDOM_SEED() 
    283304         CALL RANDOM_NUMBER(zrandom) 
    284305         pssh(:,:) = pssh(:,:) + ( 0.1  * zrandom(:,:) - 0.05 ) 
  • NEMO/branches/2020/tickets_icb_1900/tests/CANAL/MY_SRC/usrdef_nam.F90

    r12377 r13899  
    1414   !!   usr_def_hgr   : initialize the horizontal mesh  
    1515   !!---------------------------------------------------------------------- 
    16    USE dom_oce  , ONLY: nimpp , njmpp            ! i- & j-indices of the local domain 
     16   USE dom_oce 
    1717   USE par_oce        ! ocean space and time domain 
    1818   USE phycst         ! physical constants 
     
    5050   LOGICAL , PUBLIC ::   ln_sshnoise=.false. ! add random noise on initial ssh 
    5151   REAL(wp), PUBLIC ::   rn_lambda  = 50.    ! gaussian lambda 
     52   INTEGER , PUBLIC ::   nn_perio   =    0   ! periodicity of the channel (0=closed, 1=E-W) 
    5253 
    5354   !!---------------------------------------------------------------------- 
     
    7980      !! 
    8081      NAMELIST/namusr_def/  rn_domszx, rn_domszy, rn_domszz, rn_dx, rn_dy, rn_dz, rn_0xratio, rn_0yratio   & 
    81          &                 , nn_fcase, rn_ppgphi0, rn_vtxmax, rn_uzonal, rn_ujetszx, rn_ujetszy   & 
    82          &                 , rn_u10, rn_windszx, rn_windszy, rn_uofac   & 
    83          &                 , nn_botcase, nn_initcase, ln_sshnoise, rn_lambda 
     82         &                 , nn_fcase, rn_ppgphi0, rn_u10, rn_windszx, rn_windszy & !!, rn_uofac   & 
     83         &                 , rn_vtxmax, rn_uzonal, rn_ujetszx, rn_ujetszy  & 
     84         &                 , nn_botcase, nn_initcase, ln_sshnoise, rn_lambda, nn_perio 
    8485      !!---------------------------------------------------------------------- 
    8586      ! 
     
    106107      kk_cfg = INT( rn_dx ) 
    107108      ! 
    108       ! Global Domain size:  EW_CANAL global domain is  1800 km x 1800 Km x 5000 m 
    109       kpi = NINT( rn_domszx / rn_dx ) + 1 
    110       kpj = NINT( rn_domszy / rn_dy ) + 3 
    111       kpk = NINT( rn_domszz / rn_dz ) + 1 
    112 #if defined key_agrif 
    113       IF( .NOT. Agrif_Root() ) THEN 
    114          kpi  = nbcellsx + 2 + 2*nbghostcells 
    115          kpj  = nbcellsy + 2 + 2*nbghostcells 
     109      IF( Agrif_Root() ) THEN        ! Global Domain size:  EW_CANAL global domain is  1800 km x 1800 Km x 5000 m 
     110         kpi = NINT( rn_domszx / rn_dx ) + 1 
     111         kpj = NINT( rn_domszy / rn_dy ) + 3 
     112      ELSE                           ! Global Domain size: add nbghostcells + 1 "land" point on each side 
     113         kpi  = nbcellsx + nbghostcells_x   + nbghostcells_x   + 2 
     114         kpj  = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 
    116115      ENDIF 
    117 #endif 
     116      kpk = MAX( 2, NINT( rn_domszz / rn_dz ) + 1 ) 
    118117      ! 
    119118      zh  = (kpk-1)*rn_dz 
     
    150149         WRITE(numout,*) '      add random noise on initial ssh   ln_sshnoise= ', ln_sshnoise 
    151150         WRITE(numout,*) '      Gaussian lambda parameter          rn_lambda = ', rn_lambda 
    152          WRITE(numout,*) '   ' 
    153          WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    154          WRITE(numout,*) '      EW_CANAL : closed basin               jperio = ', kperio 
     151         WRITE(numout,*) '      Periodicity of the basin            nn_perio = ', nn_perio 
    155152      ENDIF 
     153      !                             ! Set the lateral boundary condition of the global domain 
     154      kperio = nn_perio                    ! EW_CANAL configuration : closed basin 
    156155      ! 
    157156   END SUBROUTINE usr_def_nam 
  • NEMO/branches/2020/tickets_icb_1900/tests/CANAL/MY_SRC/usrdef_sbc.F90

    r12740 r13899  
    1717   USE sbc_oce         ! Surface boundary condition: ocean fields 
    1818   USE phycst          ! physical constants 
    19    USE usrdef_nam, ONLY : rn_u10, rn_uofac, rn_windszy  
     19   USE usrdef_nam, ONLY : rn_u10, rn_uofac, rn_windszy, rn_windszx  
    2020   ! 
    2121   USE in_out_manager  ! I/O manager 
     
    6969         ! 
    7070         utau(:,:) = 0._wp 
    71          IF( rn_u10 /= 0. .AND. rn_windszy > 0. ) THEN 
    72             WHERE( ABS(gphit) <= rn_windszy/2. ) utau(:,:) = zrhocd * rn_u10 * rn_u10 
    73          ENDIF 
    7471         vtau(:,:) = 0._wp 
    7572         taum(:,:) = 0._wp 
     
    8178         qsr (:,:) = 0._wp 
    8279         !          
     80      ENDIF 
     81 
     82      IF( rn_u10 /= 0. .AND. rn_windszy > 0. ) THEN 
     83         IF( nyear == 1 .AND. nmonth == 1 .AND. nday <= 10 ) THEN 
     84            WHERE( ABS(gphit) <= rn_windszy/2. .AND. ABS(glamt) <= rn_windszx/2. ) utau(:,:) = zrhocd * rn_u10 * rn_u10 
     85         ELSE 
     86            utau(:,:) = 0. 
     87         ENDIF 
    8388      ENDIF 
    8489 
  • NEMO/branches/2020/tickets_icb_1900/tests/CANAL/MY_SRC/usrdef_zgr.F90

    r12740 r13899  
    197197         zmaxlam = MAXVAL(glamt) 
    198198         CALL mpp_max( 'usrdef_zgr', zmaxlam )                 ! max over the global domain 
    199          zscl = rpi / zmaxlam 
    200          z2d(:,:) = 0.5 * ( 1. - COS( glamt(:,:) * zscl ) ) 
    201          z2d(:,:) = REAL(jpkm1 - NINT( 0.75 * REAL(jpkm1,wp) * z2d(:,:) ), wp) 
     199         zscl = 0.5 * rpi / zmaxlam 
     200         z2d(:,:) = COS( glamt(:,:) * zscl ) 
     201         z2d(:,:) = REAL(jpkm1 - NINT( 0.5 * REAL(jpkm1,wp) * z2d(:,:) ), wp) 
    202202      END SELECT 
    203203      ! 
  • NEMO/branches/2020/tickets_icb_1900/tests/CPL_OASIS/EXPREF/context_nemo.xml

    r12663 r13899  
    1111       <variable id="ref_month" type="int"> 01 </variable> 
    1212       <variable id="ref_day"   type="int"> 01 </variable> 
    13        <variable id="rau0"      type="float" > 1026.0 </variable> 
     13       <variable id="rho0"      type="float" > 1026.0 </variable> 
    1414       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
    1515       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
  • NEMO/branches/2020/tickets_icb_1900/tests/CPL_OASIS/EXPREF/file_def_nemo-ice.xml

    r12663 r13899  
    5353       <field field_ref="normstr"          name="normstr" /> 
    5454       <field field_ref="sheastr"          name="sheastr" /> 
    55        <field field_ref="isig1"            name="isig1"   /> 
    56        <field field_ref="isig2"            name="isig2"   /> 
    57        <field field_ref="isig3"            name="isig3"   /> 
     55       <field field_ref="sig1_pnorm"       name="sig1_pnorm"/> 
     56       <field field_ref="sig2_pnorm"       name="sig2_pnorm"/> 
    5857        
    5958       <!-- heat fluxes --> 
  • NEMO/branches/2020/tickets_icb_1900/tests/CPL_OASIS/EXPREF/namelist_cfg

    r12663 r13899  
    254254!!                                                                    !! 
    255255!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    256 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    257 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     256!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     257!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    258258!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    259259!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    448448!!                                                                    !! 
    449449!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    450 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    451450!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    452451!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_ADV1D/EXPREF/context_nemo.xml

    r12276 r13899  
    1111       <variable id="ref_month" type="int"> 01 </variable> 
    1212       <variable id="ref_day"   type="int"> 01 </variable> 
    13        <variable id="rau0"      type="float" > 1026.0 </variable> 
     13       <variable id="rho0"      type="float" > 1026.0 </variable> 
    1414       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
    1515       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_ADV1D/EXPREF/namelist_cfg

    r12489 r13899  
    106106!!                                                                    !! 
    107107!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    108 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    109 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     108!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     109!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    110110!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    111111!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    115115&namdrg        !   top/bottom drag coefficient                          (default: NO selection) 
    116116!----------------------------------------------------------------------- 
    117    ln_OFF     = .true.     !  free-slip       : Cd = 0                   
     117   ln_drg_OFF = .true.     !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    118118/ 
    119119!!====================================================================== 
     
    197197!!                                                                    !! 
    198198!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    199 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    200199!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    201200!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_ADV1D/EXPREF/namelist_cfg_120pts

    r12489 r13899  
    106106!!                                                                    !! 
    107107!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    108 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    109 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     108!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     109!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    110110!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    111111!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    115115&namdrg        !   top/bottom drag coefficient                          (default: NO selection) 
    116116!----------------------------------------------------------------------- 
    117    ln_OFF     = .true.     !  free-slip       : Cd = 0                   
     117   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    118118/ 
    119119!!====================================================================== 
     
    197197!!                                                                    !! 
    198198!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    199 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    200199!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    201200!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_ADV1D/EXPREF/namelist_cfg_240pts

    r12489 r13899  
    106106!!                                                                    !! 
    107107!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    108 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    109 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     108!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     109!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    110110!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    111111!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    115115&namdrg        !   top/bottom drag coefficient                          (default: NO selection) 
    116116!----------------------------------------------------------------------- 
    117    ln_OFF     = .true.     !  free-slip       : Cd = 0                   
     117   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    118118/ 
    119119!!====================================================================== 
     
    197197!!                                                                    !! 
    198198!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    199 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    200199!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    201200!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_ADV1D/EXPREF/namelist_cfg_60pts

    r12489 r13899  
    106106!!                                                                    !! 
    107107!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    108 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    109 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     108!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     109!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    110110!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    111111!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    115115&namdrg        !   top/bottom drag coefficient                          (default: NO selection) 
    116116!----------------------------------------------------------------------- 
    117    ln_OFF     = .true.     !  free-slip       : Cd = 0                   
     117   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    118118/ 
    119119!!====================================================================== 
     
    197197!!                                                                    !! 
    198198!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    199 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    200199!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    201200!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_ADV1D/EXPREF/namelist_ice_cfg

    r10535 r13899  
    8888!------------------------------------------------------------------------------ 
    8989   ln_iceini        = .true.          !  activate ice initialization (T) or not (F) 
    90    ln_iceini_file   = .true.          !  netcdf file provided for initialization (T) or not (F) 
     90   nn_iceini_file   =  1              !  netcdf file provided for initialization 
    9191 
    9292   sn_hti = 'initice_60pts'                 , -12 ,'hti'   ,  .false.  , .true., 'yearly'  , '' , '', '' 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_ADV1D/EXPREF/namelist_ice_cfg_120pts

    r10431 r13899  
    8888!------------------------------------------------------------------------------ 
    8989   ln_iceini        = .true.          !  activate ice initialization (T) or not (F) 
    90    ln_iceini_file   = .true.          !  netcdf file provided for initialization (T) or not (F) 
     90   nn_iceini_file   =  1              !  netcdf file provided for initialization  
    9191 
    9292   sn_hti = 'initice_120pts'                 , -12 ,'hti'   ,  .false.  , .true., 'yearly'  , '' , '', '' 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_ADV1D/EXPREF/namelist_ice_cfg_240pts

    r10431 r13899  
    8888!------------------------------------------------------------------------------ 
    8989   ln_iceini        = .true.          !  activate ice initialization (T) or not (F) 
    90    ln_iceini_file   = .true.          !  netcdf file provided for initialization (T) or not (F) 
     90   nn_iceini_file   =  1              !  netcdf file provided for initialization  
    9191 
    9292   sn_hti = 'initice_240pts'                 , -12 ,'hti'   ,  .false.  , .true., 'yearly'  , '' , '', '' 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_ADV1D/EXPREF/namelist_ice_cfg_60pts

    r10431 r13899  
    8888!------------------------------------------------------------------------------ 
    8989   ln_iceini        = .true.          !  activate ice initialization (T) or not (F) 
    90    ln_iceini_file   = .true.          !  netcdf file provided for initialization (T) or not (F) 
     90   nn_iceini_file   =  1              !  netcdf file provided for initialization  
    9191 
    9292   sn_hti = 'initice_60pts'                 , -12 ,'hti'   ,  .false.  , .true., 'yearly'  , '' , '', '' 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_ADV1D/MY_SRC/usrdef_hgr.F90

    r12740 r13899  
    6464      REAL(wp), DIMENSION(:,:), INTENT(out) ::   pe1e2u, pe1e2v               ! u- & v-surfaces (if reduction in strait)   [m2] 
    6565      ! 
    66       INTEGER  ::   ji, jj   ! dummy loop indices 
     66      INTEGER  ::   ji, jj     ! dummy loop indices 
    6767      REAL(wp) ::   zphi0, zlam0, zbeta, zf0 
    68       REAL(wp) ::   zti, zui, ztj, zvj   ! local scalars 
     68      REAL(wp) ::   zti, ztj   ! local scalars 
    6969      !!------------------------------------------------------------------------------- 
    7070      ! 
     
    7575 
    7676      !                          ========== 
    77       zlam0 = -(jpiglo-1)/2 * 1.e-3 * rn_dx 
    78       zphi0 = -(jpjglo-1)/2 * 1.e-3 * rn_dy 
     77      zlam0 = -REAL( (Ni0glo-2)/2, wp) * 1.e-3 * rn_dx 
     78      zphi0 = -REAL( (Nj0glo-2)/2, wp) * 1.e-3 * rn_dy 
    7979 
    80       DO_2D_11_11 
    81          zti = FLOAT( ji - 1 + nimpp - 1 )          ;  ztj = FLOAT( jj - 1 + njmpp - 1 ) 
    82          zui = FLOAT( ji - 1 + nimpp - 1 ) + 0.5_wp ;  zvj = FLOAT( jj - 1 + njmpp - 1 ) + 0.5_wp 
     80      DO_2D( 1, 1, 1, 1 ) 
     81         zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos 
     82         ztj = REAL( mjg0_oldcmp(jj) - 1, wp )   ! start at j=0 in the global grid without halos 
    8383          
    84          plamt(ji,jj) = zlam0 + rn_dx * 1.e-3 * zti 
    85          plamu(ji,jj) = zlam0 + rn_dx * 1.e-3 * zui 
     84         plamt(ji,jj) = zlam0 + rn_dx * 1.e-3 *   zti 
     85         plamu(ji,jj) = zlam0 + rn_dx * 1.e-3 * ( zti + 0.5_wp ) 
    8686         plamv(ji,jj) = plamt(ji,jj)  
    8787         plamf(ji,jj) = plamu(ji,jj)  
    8888          
    89          pphit(ji,jj) = zphi0 + rn_dy * 1.e-3 * ztj 
    90          pphiv(ji,jj) = zphi0 + rn_dy * 1.e-3 * zvj 
     89         pphit(ji,jj) = zphi0 + rn_dy * 1.e-3 *   ztj 
     90         pphiv(ji,jj) = zphi0 + rn_dy * 1.e-3 * ( ztj + 0.5_wp ) 
    9191         pphiu(ji,jj) = pphit(ji,jj)  
    9292         pphif(ji,jj) = pphiv(ji,jj)  
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_ADV1D/MY_SRC/usrdef_nam.F90

    r12377 r13899  
    1414   !!   usr_def_hgr   : initialize the horizontal mesh  
    1515   !!---------------------------------------------------------------------- 
    16    USE dom_oce  , ONLY: nimpp , njmpp            ! i- & j-indices of the local domain 
    1716   USE par_oce        ! ocean space and time domain 
    1817   USE phycst         ! physical constants 
     
    9190         WRITE(numout,*) '         LX [km]: ', zlx 
    9291         WRITE(numout,*) '         LY [km]: ', zly 
    93          WRITE(numout,*) '         resulting global domain size :        jpiglo = ', kpi 
    94          WRITE(numout,*) '                                               jpjglo = ', kpj 
     92         WRITE(numout,*) '         resulting global domain size :        Ni0glo = ', kpi 
     93         WRITE(numout,*) '                                               Nj0glo = ', kpj 
    9594         WRITE(numout,*) '                                               jpkglo = ', kpk 
    9695         WRITE(numout,*) '         Coriolis:', ln_corio 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_ADV1D/MY_SRC/usrdef_sbc.F90

    r12377 r13899  
    107107      REAL(wp), DIMENSION(:,:,:), INTENT(in)  ::   phi    ! ice thickness 
    108108      !! 
     109      INTEGER  ::   jl 
    109110      REAL(wp) ::   zfr1, zfr2                 ! local variables 
    110111      REAL(wp), DIMENSION(jpi,jpj) ::   zsnw   ! snw distribution after wind blowing 
     112      REAL(wp), DIMENSION(jpi,jpj) ::   ztri 
    111113      !!--------------------------------------------------------------------- 
    112114      ! 
     
    141143 
    142144      ! --- shortwave radiation transmitted below the surface (W/m2, see Grenfell Maykut 77) --- ! 
    143       zfr1 = ( 0.18 * ( 1.0 - cldf_ice ) + 0.35 * cldf_ice )            ! transmission when hi>10cm 
    144       zfr2 = ( 0.82 * ( 1.0 - cldf_ice ) + 0.65 * cldf_ice )            ! zfr2 such that zfr1 + zfr2 to equal 1 
     145      cloud_fra(:,:) = pp_cldf 
     146      ztri(:,:) = 0.18 * ( 1.0 - cloud_fra(:,:) ) + 0.35 * cloud_fra(:,:)  ! surface transmission when hi>10cm 
    145147      ! 
    146       WHERE    ( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) <  0.1_wp )       ! linear decrease from hi=0 to 10cm   
    147          qtr_ice_top(:,:,:) = qsr_ice(:,:,:) * ( zfr1 + zfr2 * ( 1._wp - phi(:,:,:) * 10._wp ) ) 
    148       ELSEWHERE( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) >= 0.1_wp )       ! constant (zfr1) when hi>10cm 
    149          qtr_ice_top(:,:,:) = qsr_ice(:,:,:) * zfr1 
    150       ELSEWHERE                                                         ! zero when hs>0 
    151          qtr_ice_top(:,:,:) = 0._wp  
    152       END WHERE 
    153            
     148      DO jl = 1, jpl 
     149         WHERE    ( phs(:,:,jl) <= 0._wp .AND. phi(:,:,jl) <  0.1_wp )     ! linear decrease from hi=0 to 10cm   
     150            qtr_ice_top(:,:,jl) = qsr_ice(:,:,jl) * ( ztri(:,:) + ( 1._wp - ztri(:,:) ) * ( 1._wp - phi(:,:,jl) * 10._wp ) ) 
     151         ELSEWHERE( phs(:,:,jl) <= 0._wp .AND. phi(:,:,jl) >= 0.1_wp )     ! constant (ztri) when hi>10cm 
     152            qtr_ice_top(:,:,jl) = qsr_ice(:,:,jl) * ztri(:,:) 
     153         ELSEWHERE                                                         ! zero when hs>0 
     154            qtr_ice_top(:,:,jl) = 0._wp 
     155         END WHERE 
     156      ENDDO 
     157          
     158  
    154159   END SUBROUTINE usrdef_sbc_ice_flx 
    155160 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_ADV2D/EXPREF/context_nemo.xml

    r12276 r13899  
    1111       <variable id="ref_month" type="int"> 01 </variable> 
    1212       <variable id="ref_day"   type="int"> 01 </variable> 
    13        <variable id="rau0"      type="float" > 1026.0 </variable> 
     13       <variable id="rho0"      type="float" > 1026.0 </variable> 
    1414       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
    1515       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_ADV2D/EXPREF/file_def_nemo-ice.xml

    r10516 r13899  
    5555        <field field_ref="normstr"          name="normstr" /> 
    5656        <field field_ref="sheastr"          name="sheastr" /> 
    57         <field field_ref="isig1"            name="isig1"   /> 
    58         <field field_ref="isig2"            name="isig2"   /> 
    59         <field field_ref="isig3"            name="isig3"   /> 
     57       <field field_ref="sig1_pnorm"       name="sig1_pnorm"/> 
     58       <field field_ref="sig2_pnorm"       name="sig2_pnorm"/> 
    6059 
    6160        <!-- heat fluxes --> 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_ADV2D/EXPREF/namelist_cfg

    r12489 r13899  
    106106!!                                                                    !! 
    107107!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    108 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    109 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     108!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     109!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    110110!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    111111!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    115115&namdrg        !   top/bottom drag coefficient                          (default: NO selection) 
    116116!----------------------------------------------------------------------- 
    117    ln_OFF     = .true.     !  free-slip       : Cd = 0                   
     117   ln_drg_OFF = .true.     !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    118118/ 
    119119!!====================================================================== 
     
    197197!!                                                                    !! 
    198198!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    199 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    200199!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    201200!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_ADV2D/EXPREF/namelist_ice_cfg

    r10535 r13899  
    8686!------------------------------------------------------------------------------ 
    8787   ln_iceini        = .true.          !  activate ice initialization (T) or not (F) 
    88    ln_iceini_file   = .true.          !  netcdf file provided for initialization (T) or not (F) 
     88   nn_iceini_file   =  1              !  netcdf file provided for initialization  
    8989 
    9090   sn_hti = 'initice'                 , -12 ,'hti'   ,  .false.  , .true., 'yearly'  , '' , '', '' 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_ADV2D/MY_SRC/usrdef_hgr.F90

    r12740 r13899  
    6464      REAL(wp), DIMENSION(:,:), INTENT(out) ::   pe1e2u, pe1e2v               ! u- & v-surfaces (if reduction in strait)   [m2] 
    6565      ! 
    66       INTEGER  ::   ji, jj   ! dummy loop indices 
     66      INTEGER  ::   ji, jj     ! dummy loop indices 
    6767      REAL(wp) ::   zphi0, zlam0, zbeta, zf0 
    68       REAL(wp) ::   zti, zui, ztj, zvj   ! local scalars 
     68      REAL(wp) ::   zti, ztj   ! local scalars 
    6969      !!------------------------------------------------------------------------------- 
    7070      ! 
     
    7676 
    7777      !                          ========== 
    78       zlam0 = -(jpiglo-1)/2 * 1.e-3 * rn_dx 
    79       zphi0 = -(jpjglo-1)/2 * 1.e-3 * rn_dy 
     78      zlam0 = -REAL( (Ni0glo-2)/2, wp) * 1.e-3 * rn_dx 
     79      zphi0 = -REAL( (Nj0glo-2)/2, wp) * 1.e-3 * rn_dy  
    8080 
    8181#if defined key_agrif  
     
    8383!clem         zlam0  = Agrif_Parent(zlam0) + (Agrif_ix())*Agrif_Parent(rn_dx) * 1.e-5 
    8484!clem         zphi0  = Agrif_Parent(zphi0) + (Agrif_iy())*Agrif_Parent(rn_dy) * 1.e-5 
    85          zlam0 = ( 0.5_wp - ( Agrif_parent(jpiglo) - 1 ) / 2 ) * 1.e-3 * Agrif_irhox() * rn_dx  & 
     85         zlam0 = ( 0.5_wp - REAL( (Agrif_parent(Ni0glo) - 2 ) / 2, wp ) ) * 1.e-3 * Agrif_irhox() * rn_dx  & 
    8686            &  + ( Agrif_Ix() + nbghostcells - 1 ) * Agrif_irhox() * rn_dx * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dx * 1.e-3 
    87          zphi0 = ( 0.5_wp - ( Agrif_parent(jpjglo) - 1 ) / 2 ) * 1.e-3 * Agrif_irhoy() * rn_dy  & 
     87         zphi0 = ( 0.5_wp - REAL( (Agrif_parent(Nj0glo) - 2 ) / 2, wp ) ) * 1.e-3 * Agrif_irhoy() * rn_dy  & 
    8888            &  + ( Agrif_Iy() + nbghostcells - 1 ) * Agrif_irhoy() * rn_dy * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dy * 1.e-3 
    8989      ENDIF 
    9090#endif          
    9191 
    92       DO_2D_11_11 
    93          zti = FLOAT( ji - 1 + nimpp - 1 )          ;  ztj = FLOAT( jj - 1 + njmpp - 1 ) 
    94          zui = FLOAT( ji - 1 + nimpp - 1 ) + 0.5_wp ;  zvj = FLOAT( jj - 1 + njmpp - 1 ) + 0.5_wp 
     92      DO_2D( 1, 1, 1, 1 ) 
     93         zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos 
     94         ztj = REAL( mjg0_oldcmp(jj) - 1, wp )   ! start at j=0 in the global grid without halos 
    9595          
    96          plamt(ji,jj) = zlam0 + rn_dx * 1.e-3 * zti 
    97          plamu(ji,jj) = zlam0 + rn_dx * 1.e-3 * zui 
     96         plamt(ji,jj) = zlam0 + rn_dx * 1.e-3 *   zti 
     97         plamu(ji,jj) = zlam0 + rn_dx * 1.e-3 * ( zti + 0.5_wp ) 
    9898         plamv(ji,jj) = plamt(ji,jj)  
    9999         plamf(ji,jj) = plamu(ji,jj)  
    100100          
    101          pphit(ji,jj) = zphi0 + rn_dy * 1.e-3 * ztj 
    102          pphiv(ji,jj) = zphi0 + rn_dy * 1.e-3 * zvj 
     101         pphit(ji,jj) = zphi0 + rn_dy * 1.e-3 *   ztj 
     102         pphiv(ji,jj) = zphi0 + rn_dy * 1.e-3 * ( ztj + 0.5_wp ) 
    103103         pphiu(ji,jj) = pphit(ji,jj)  
    104104         pphif(ji,jj) = pphiv(ji,jj)  
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_ADV2D/MY_SRC/usrdef_nam.F90

    r12740 r13899  
    1414   !!   usr_def_hgr   : initialize the horizontal mesh  
    1515   !!---------------------------------------------------------------------- 
    16    USE dom_oce  , ONLY: nimpp , njmpp, Agrif_Root            ! i- & j-indices of the local domain 
     16   USE dom_oce 
    1717   USE par_oce        ! ocean space and time domain 
    1818   USE phycst         ! physical constants 
     
    8282      kk_cfg = NINT( rn_dx ) 
    8383      ! 
    84       IF( Agrif_Root() ) THEN        ! Global Domain size:  ICE_AGRIF domain is  300 km x 300 Km x 10 m 
     84      IF( Agrif_Root() ) THEN        ! Global Domain size: ICE_AGRIF domain is  300 km x 300 Km x 10 m 
    8585         kpi = NINT( 300.e3 / rn_dx ) - 1 
    8686         kpj = NINT( 300.e3 / rn_dy ) - 1 
    87       ELSE 
    88          kpi = nbcellsx + 2 + 2*nbghostcells 
    89          kpj = nbcellsy + 2 + 2*nbghostcells 
     87      ELSE                           ! Global Domain size: add nbghostcells + 1 "land" point on each side 
     88         kpi  = nbcellsx + nbghostcells_x   + nbghostcells_x   + 2 
     89         kpj  = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 
    9090      ENDIF 
    91       kpk = 1 
     91      kpk = 2 
    9292      ! 
    9393!!      zlx = (kpi-2)*rn_dx*1.e-3 
     
    110110         WRITE(numout,*) '         LX [km]: ', zlx 
    111111         WRITE(numout,*) '         LY [km]: ', zly 
    112          WRITE(numout,*) '         resulting global domain size :        jpiglo = ', kpi 
    113          WRITE(numout,*) '                                               jpjglo = ', kpj 
     112         WRITE(numout,*) '         resulting global domain size :        Ni0glo = ', kpi 
     113         WRITE(numout,*) '                                               Nj0glo = ', kpj 
    114114         WRITE(numout,*) '                                               jpkglo = ', kpk 
    115115         WRITE(numout,*) '         Coriolis:', ln_corio 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_ADV2D/MY_SRC/usrdef_sbc.F90

    r12377 r13899  
    107107      REAL(wp), DIMENSION(:,:,:), INTENT(in) ::   phi    ! ice thickness 
    108108      !! 
     109      INTEGER  ::   jl 
    109110      REAL(wp) ::   zfr1, zfr2                 ! local variables 
    110111      REAL(wp), DIMENSION(jpi,jpj) ::   zsnw   ! snw distribution after wind blowing 
     112      REAL(wp), DIMENSION(jpi,jpj) ::   ztri 
    111113      !!--------------------------------------------------------------------- 
    112114      ! 
     
    141143 
    142144      ! --- shortwave radiation transmitted below the surface (W/m2, see Grenfell Maykut 77) --- ! 
    143       zfr1 = ( 0.18 * ( 1.0 - cldf_ice ) + 0.35 * cldf_ice )            ! transmission when hi>10cm 
    144       zfr2 = ( 0.82 * ( 1.0 - cldf_ice ) + 0.65 * cldf_ice )            ! zfr2 such that zfr1 + zfr2 to equal 1 
     145      cloud_fra(:,:) = pp_cldf 
     146      ztri(:,:) = 0.18 * ( 1.0 - cloud_fra(:,:) ) + 0.35 * cloud_fra(:,:)  ! surface transmission when hi>10cm 
    145147      ! 
    146       WHERE    ( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) <  0.1_wp )       ! linear decrease from hi=0 to 10cm   
    147          qtr_ice_top(:,:,:) = qsr_ice(:,:,:) * ( zfr1 + zfr2 * ( 1._wp - phi(:,:,:) * 10._wp ) ) 
    148       ELSEWHERE( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) >= 0.1_wp )       ! constant (zfr1) when hi>10cm 
    149          qtr_ice_top(:,:,:) = qsr_ice(:,:,:) * zfr1 
    150       ELSEWHERE                                                         ! zero when hs>0 
    151          qtr_ice_top(:,:,:) = 0._wp  
    152       END WHERE 
    153            
     148      DO jl = 1, jpl 
     149         WHERE    ( phs(:,:,jl) <= 0._wp .AND. phi(:,:,jl) <  0.1_wp )     ! linear decrease from hi=0 to 10cm   
     150            qtr_ice_top(:,:,jl) = qsr_ice(:,:,jl) * ( ztri(:,:) + ( 1._wp - ztri(:,:) ) * ( 1._wp - phi(:,:,jl) * 10._wp ) ) 
     151         ELSEWHERE( phs(:,:,jl) <= 0._wp .AND. phi(:,:,jl) >= 0.1_wp )     ! constant (ztri) when hi>10cm 
     152            qtr_ice_top(:,:,jl) = qsr_ice(:,:,jl) * ztri(:,:) 
     153         ELSEWHERE                                                         ! zero when hs>0 
     154            qtr_ice_top(:,:,jl) = 0._wp 
     155         END WHERE 
     156      ENDDO 
     157          
     158  
    154159   END SUBROUTINE usrdef_sbc_ice_flx 
    155160 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_AGRIF/EXPREF/1_namelist_cfg

    r12489 r13899  
    106106!!                                                                    !! 
    107107!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    108 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    109 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     108!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     109!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    110110!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    111111!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    115115&namdrg        !   top/bottom drag coefficient                          (default: NO selection) 
    116116!----------------------------------------------------------------------- 
    117    ln_OFF     = .true.     !  free-slip       : Cd = 0                   
     117   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    118118/ 
    119119!!====================================================================== 
     
    197197!!                                                                    !! 
    198198!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    199 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    200199!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    201200!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_AGRIF/EXPREF/AGRIF_FixedGrids.in

    r9159 r13899  
    111 
    2 34 63 34 63 3 3 3 
     233 62 33 62 3 3 3 
    330 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_AGRIF/EXPREF/context_nemo.xml

    r12377 r13899  
    1111       <variable id="ref_month" type="int"> 01 </variable> 
    1212       <variable id="ref_day"   type="int"> 01 </variable> 
    13        <variable id="rau0"      type="float" > 1026.0 </variable> 
     13       <variable id="rho0"      type="float" > 1026.0 </variable> 
    1414       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
    1515       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_AGRIF/EXPREF/file_def_nemo-ice.xml

    r11159 r13899  
    5353        <field field_ref="normstr"          name="normstr" /> 
    5454        <field field_ref="sheastr"          name="sheastr" /> 
    55         <field field_ref="isig1"            name="isig1"   /> 
    56         <field field_ref="isig2"            name="isig2"   /> 
    57         <field field_ref="isig3"            name="isig3"   /> 
     55       <field field_ref="sig1_pnorm"       name="sig1_pnorm"/> 
     56       <field field_ref="sig2_pnorm"       name="sig2_pnorm"/> 
    5857 
    5958        <!-- heat fluxes --> 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_AGRIF/EXPREF/namelist_cfg

    r12489 r13899  
    106106!!                                                                    !! 
    107107!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    108 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    109 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     108!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     109!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    110110!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    111111!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    115115&namdrg        !   top/bottom drag coefficient                          (default: NO selection) 
    116116!----------------------------------------------------------------------- 
    117    ln_OFF     = .true.     !  free-slip       : Cd = 0                   
     117   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    118118/ 
    119119!!====================================================================== 
     
    197197!!                                                                    !! 
    198198!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    199 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    200199!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    201200!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_AGRIF/EXPREF/namelist_ice_cfg

    r10535 r13899  
    8686!------------------------------------------------------------------------------ 
    8787   ln_iceini        = .true.          !  activate ice initialization (T) or not (F) 
    88    ln_iceini_file   = .true.          !  netcdf file provided for initialization (T) or not (F) 
     88   nn_iceini_file   =  1              !  netcdf file provided for initialization  
    8989 
    9090   sn_hti = 'initice'                 , -12 ,'hti'   ,  .false.  , .true., 'yearly'  , '' , '', '' 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_AGRIF/MY_SRC/usrdef_hgr.F90

    r12740 r13899  
    6464      REAL(wp), DIMENSION(:,:), INTENT(out) ::   pe1e2u, pe1e2v               ! u- & v-surfaces (if reduction in strait)   [m2] 
    6565      ! 
    66       INTEGER  ::   ji, jj   ! dummy loop indices 
     66      INTEGER  ::   ji, jj     ! dummy loop indices 
    6767      REAL(wp) ::   zphi0, zlam0, zbeta, zf0 
    68       REAL(wp) ::   zti, zui, ztj, zvj   ! local scalars 
     68      REAL(wp) ::   zti, ztj   ! local scalars 
    6969      !!------------------------------------------------------------------------------- 
    7070      ! 
     
    7676 
    7777      !                          ========== 
    78       zlam0 = -(jpiglo-1)/2 * 1.e-3 * rn_dx 
    79       zphi0 = -(jpjglo-1)/2 * 1.e-3 * rn_dy 
    80  
    8178#if defined key_agrif  
    82       IF( .NOT. Agrif_Root() ) THEN 
     79      IF( Agrif_Root() ) THEN 
     80#endif 
     81         ! Compatibility WITH old version:  
     82         ! jperio = 7 =>  Ni0glo = jpigo_old_version - 2 
     83         !            =>  jpiglo-1 replaced by Ni0glo+1 
     84         zlam0 = -REAL( (Ni0glo+1)/2, wp) * 1.e-3 * rn_dx 
     85         zphi0 = -REAL( (Nj0glo+1)/2, wp) * 1.e-3 * rn_dy   ! +1 for compatibility with old version --> to be replaced by -1 as before 
     86#if defined key_agrif  
     87      ELSE 
     88         ! ! let lower left longitude and latitude from parent 
    8389!clem         zlam0  = Agrif_Parent(zlam0) + (Agrif_ix())*Agrif_Parent(rn_dx) * 1.e-5 
    8490!clem         zphi0  = Agrif_Parent(zphi0) + (Agrif_iy())*Agrif_Parent(rn_dy) * 1.e-5 
    85          zlam0 = ( 0.5_wp - ( Agrif_parent(jpiglo) - 1 ) / 2 ) * 1.e-3 * Agrif_irhox() * rn_dx  & 
     91         ! Compatibility WITH old version:  
     92         ! jperio = 0 =>  Ni0glo = jpigo_old_version 
     93         !            =>  Agrif_parent(jpiglo)-1 replaced by  Agrif_parent(Ni0glo)-1 
     94         zlam0 = ( 0.5_wp - REAL( ( Agrif_parent(Ni0glo)-1 ) / 2, wp) ) * 1.e-3 * Agrif_irhox() * rn_dx  & 
    8695            &  + ( Agrif_Ix() + nbghostcells - 1 ) * Agrif_irhox() * rn_dx * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dx * 1.e-3 
    87          zphi0 = ( 0.5_wp - ( Agrif_parent(jpjglo) - 1 ) / 2 ) * 1.e-3 * Agrif_irhoy() * rn_dy  & 
     96         zphi0 = ( 0.5_wp - REAL( ( Agrif_parent(Nj0glo)-1 ) / 2, wp) ) * 1.e-3 * Agrif_irhoy() * rn_dy  & 
    8897            &  + ( Agrif_Iy() + nbghostcells - 1 ) * Agrif_irhoy() * rn_dy * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dy * 1.e-3 
    8998      ENDIF 
    9099#endif          
    91100 
    92       DO_2D_11_11 
    93          zti = FLOAT( ji - 1 + nimpp - 1 )          ;  ztj = FLOAT( jj - 1 + njmpp - 1 ) 
    94          zui = FLOAT( ji - 1 + nimpp - 1 ) + 0.5_wp ;  zvj = FLOAT( jj - 1 + njmpp - 1 ) + 0.5_wp 
     101      DO_2D( 1, 1, 1, 1 ) 
     102         zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos 
     103         ztj = REAL( mjg0_oldcmp(jj) - 1, wp )   ! start at j=0 in the global grid without halos 
    95104          
    96          plamt(ji,jj) = zlam0 + rn_dx * 1.e-3 * zti 
    97          plamu(ji,jj) = zlam0 + rn_dx * 1.e-3 * zui 
     105         plamt(ji,jj) = zlam0 + rn_dx * 1.e-3 *   zti 
     106         plamu(ji,jj) = zlam0 + rn_dx * 1.e-3 * ( zti + 0.5_wp ) 
    98107         plamv(ji,jj) = plamt(ji,jj)  
    99108         plamf(ji,jj) = plamu(ji,jj)  
    100109          
    101          pphit(ji,jj) = zphi0 + rn_dy * 1.e-3 * ztj 
    102          pphiv(ji,jj) = zphi0 + rn_dy * 1.e-3 * zvj 
     110         pphit(ji,jj) = zphi0 + rn_dy * 1.e-3 *   ztj 
     111         pphiv(ji,jj) = zphi0 + rn_dy * 1.e-3 * ( ztj + 0.5_wp ) 
    103112         pphiu(ji,jj) = pphit(ji,jj)  
    104113         pphif(ji,jj) = pphiv(ji,jj)  
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_AGRIF/MY_SRC/usrdef_nam.F90

    r12597 r13899  
    1414   !!   usr_def_hgr   : initialize the horizontal mesh  
    1515   !!---------------------------------------------------------------------- 
    16    USE dom_oce  , ONLY: nimpp , njmpp            ! i- & j-indices of the local domain 
     16   USE dom_oce 
    1717   USE par_oce        ! ocean space and time domain 
    1818   USE phycst         ! physical constants 
     
    8585         kpi = NINT( 300.e3 / rn_dx ) - 1 
    8686         kpj = NINT( 300.e3 / rn_dy ) - 1 
    87       ELSE 
    88          kpi = nbcellsx + 2 + 2*nbghostcells 
    89          kpj = nbcellsy + 2 + 2*nbghostcells 
     87         kpi = kpi - 2   ! for compatibility with old version (because kerio=7) --> to be removed 
     88         kpj = kpj - 2   ! for compatibility with old version (because kerio=7) --> to be removed 
     89      ELSE                           ! Global Domain size: add nbghostcells + 1 "land" point on each side 
     90         kpi  = nbcellsx + 2 * ( nbghostcells + 1 ) 
     91         kpj  = nbcellsy + 2 * ( nbghostcells + 1 ) 
     92!!$         kpi  = nbcellsx + nbghostcells_x   + nbghostcells_x   + 2 
     93!!$         kpj  = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 
    9094      ENDIF 
    9195      kpk = 2 
     
    110114         WRITE(numout,*) '         LX [km]: ', zlx 
    111115         WRITE(numout,*) '         LY [km]: ', zly 
    112          WRITE(numout,*) '         resulting global domain size :        jpiglo = ', kpi 
    113          WRITE(numout,*) '                                               jpjglo = ', kpj 
     116         WRITE(numout,*) '         resulting global domain size :        Ni0glo = ', kpi 
     117         WRITE(numout,*) '                                               Nj0glo = ', kpj 
    114118         WRITE(numout,*) '                                               jpkglo = ', kpk 
    115119         WRITE(numout,*) '         Coriolis:', ln_corio 
  • NEMO/branches/2020/tickets_icb_1900/tests/ICE_AGRIF/MY_SRC/usrdef_sbc.F90

    r12377 r13899  
    107107      REAL(wp), DIMENSION(:,:,:), INTENT(in)  ::   phi    ! ice thickness 
    108108      !! 
     109      INTEGER  ::   jl 
    109110      REAL(wp) ::   zfr1, zfr2                 ! local variables 
    110111      REAL(wp), DIMENSION(jpi,jpj) ::   zsnw   ! snw distribution after wind blowing 
     112      REAL(wp), DIMENSION(jpi,jpj) ::   ztri 
    111113      !!--------------------------------------------------------------------- 
    112114      ! 
     
    141143 
    142144      ! --- shortwave radiation transmitted below the surface (W/m2, see Grenfell Maykut 77) --- ! 
    143       zfr1 = ( 0.18 * ( 1.0 - cldf_ice ) + 0.35 * cldf_ice )            ! transmission when hi>10cm 
    144       zfr2 = ( 0.82 * ( 1.0 - cldf_ice ) + 0.65 * cldf_ice )            ! zfr2 such that zfr1 + zfr2 to equal 1 
     145      cloud_fra(:,:) = pp_cldf 
     146      ztri(:,:) = 0.18 * ( 1.0 - cloud_fra(:,:) ) + 0.35 * cloud_fra(:,:)  ! surface transmission when hi>10cm 
    145147      ! 
    146       WHERE    ( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) <  0.1_wp )       ! linear decrease from hi=0 to 10cm   
    147          qtr_ice_top(:,:,:) = qsr_ice(:,:,:) * ( zfr1 + zfr2 * ( 1._wp - phi(:,:,:) * 10._wp ) ) 
    148       ELSEWHERE( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) >= 0.1_wp )       ! constant (zfr1) when hi>10cm 
    149          qtr_ice_top(:,:,:) = qsr_ice(:,:,:) * zfr1 
    150       ELSEWHERE                                                         ! zero when hs>0 
    151          qtr_ice_top(:,:,:) = 0._wp  
    152       END WHERE 
     148      DO jl = 1, jpl 
     149         WHERE    ( phs(:,:,jl) <= 0._wp .AND. phi(:,:,jl) <  0.1_wp )     ! linear decrease from hi=0 to 10cm   
     150            qtr_ice_top(:,:,jl) = qsr_ice(:,:,jl) * ( ztri(:,:) + ( 1._wp - ztri(:,:) ) * ( 1._wp - phi(:,:,jl) * 10._wp ) ) 
     151         ELSEWHERE( phs(:,:,jl) <= 0._wp .AND. phi(:,:,jl) >= 0.1_wp )     ! constant (ztri) when hi>10cm 
     152            qtr_ice_top(:,:,jl) = qsr_ice(:,:,jl) * ztri(:,:) 
     153         ELSEWHERE                                                         ! zero when hs>0 
     154            qtr_ice_top(:,:,jl) = 0._wp 
     155         END WHERE 
     156      ENDDO 
    153157           
    154158   END SUBROUTINE usrdef_sbc_ice_flx 
  • NEMO/branches/2020/tickets_icb_1900/tests/ISOMIP+/EXPREF/namelist_cfg

    r12905 r13899  
    261261!!                                                                    !! 
    262262!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    263 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    264 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     263!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     264!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    265265!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    266266!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    273273/ 
    274274!----------------------------------------------------------------------- 
    275 &namdrg_top    !   TOP friction                                         (ln_OFF =F & ln_isfcav=T) 
     275&namdrg_top    !   TOP friction                                         (ln_drg_OFF =F & ln_isfcav=T) 
    276276!----------------------------------------------------------------------- 
    277277   rn_Cd0      =  2.5e-3   !  drag coefficient [-] 
     
    279279/ 
    280280!----------------------------------------------------------------------- 
    281 &namdrg_bot    !   BOTTOM friction                                      (ln_OFF =F) 
     281&namdrg_bot    !   BOTTOM friction                                      (ln_drg_OFF =F) 
    282282!----------------------------------------------------------------------- 
    283283   rn_Cd0      =  2.5e-3    !  drag coefficient [-] 
     
    311311                                 ! 
    312312   !                     ! S-EOS coefficients (ln_seos=T): 
    313    !                             !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     313   !                             !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    314314   !                     ! L-EOS coefficients (ln_seos=T): 
    315    !                             !  rd(T,S,Z)*rau0 = rau0*(-a0*dT+b0*dS) 
     315   !                             !  rd(T,S,Z)*rho0 = rho0*(-a0*dT+b0*dS) 
    316316   rn_a0       =  3.7330e-5      !  thermal expension coefficient 
    317317   rn_b0       =  7.8430e-4      !  saline  expension coefficient 
     
    461461!!                                                                    !! 
    462462!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    463 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    464463!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    465464!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
     
    478477/ 
    479478!----------------------------------------------------------------------- 
    480 &namptr        !   Poleward Transport Diagnostic                        (default: OFF) 
    481 !----------------------------------------------------------------------- 
    482 / 
    483 !----------------------------------------------------------------------- 
    484479&namhsb        !  Heat and salt budgets                                 (default: OFF) 
    485480!----------------------------------------------------------------------- 
  • NEMO/branches/2020/tickets_icb_1900/tests/ISOMIP+/MY_SRC/dtatsd.F90

    r12905 r13899  
    191191         ENDIF 
    192192         ! 
    193          DO_2D_11_11 
     193         DO_2D( 1, 1, 1, 1 )                  ! vertical interpolation of T & S 
    194194            DO jk = 1, jpk                        ! determines the intepolated T-S profiles at each (i,j) points 
    195195               zl = gdept_0(ji,jj,jk) 
     
    224224         ! 
    225225         IF( ln_zps ) THEN                      ! zps-coordinate (partial steps) interpolation at the last ocean level 
    226             DO_2D_11_11 
     226            DO_2D( 1, 1, 1, 1 ) 
    227227               ik = mbkt(ji,jj)  
    228228               IF( ik > 1 ) THEN 
  • NEMO/branches/2020/tickets_icb_1900/tests/ISOMIP+/MY_SRC/eosbn2.F90

    r12905 r13899  
    182182   !! * Substitutions 
    183183#  include "do_loop_substitute.h90" 
     184#  include "domzgr_substitute.h90" 
    184185   !!---------------------------------------------------------------------- 
    185186   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    243244      CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==! 
    244245         ! 
    245          DO_3D_11_11( 1, jpkm1 ) 
     246         DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
    246247            ! 
    247248            zh  = pdep(ji,jj,jk) * r1_Z0                                  ! depth 
     
    279280      CASE( np_seos )                !==  simplified EOS  ==! 
    280281         ! 
    281          DO_3D_11_11( 1, jpkm1 ) 
     282         DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
    282283            zt  = pts  (ji,jj,jk,jp_tem) - 10._wp 
    283284            zs  = pts  (ji,jj,jk,jp_sal) - 35._wp 
     
    294295      CASE( np_leos )                !==  linear ISOMIP EOS  ==! 
    295296         ! 
    296          DO_3D_11_11( 1, jpkm1 ) 
     297         DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
    297298            zt  = pts  (ji,jj,jk,jp_tem) - (-1._wp) 
    298299            zs  = pts  (ji,jj,jk,jp_sal) - 34.2_wp 
     
    356357            END DO 
    357358            ! 
    358             DO_3D_11_11( 1, jpkm1 ) 
     359            DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
    359360               ! 
    360361               ! compute density (2*nn_sto_eos) times: 
     
    406407         ! Non-stochastic equation of state 
    407408         ELSE 
    408             DO_3D_11_11( 1, jpkm1 ) 
     409            DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
    409410               ! 
    410411               zh  = pdep(ji,jj,jk) * r1_Z0                                  ! depth 
     
    444445      CASE( np_seos )                !==  simplified EOS  ==! 
    445446         ! 
    446          DO_3D_11_11( 1, jpkm1 ) 
     447         DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
    447448            zt  = pts  (ji,jj,jk,jp_tem) - 10._wp 
    448449            zs  = pts  (ji,jj,jk,jp_sal) - 35._wp 
     
    462463      CASE( np_leos )                !==  linear ISOMIP EOS  ==! 
    463464         ! 
    464          DO_3D_11_11( 1, jpkm1 ) 
     465         DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
    465466            zt  = pts  (ji,jj,jk,jp_tem) - (-1._wp) 
    466467            zs  = pts  (ji,jj,jk,jp_sal) - 34.2_wp 
     
    513514      CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==! 
    514515         ! 
    515          DO_2D_11_11 
     516         DO_2D( 1, 1, 1, 1 ) 
    516517            ! 
    517518            zh  = pdep(ji,jj) * r1_Z0                                  ! depth 
     
    548549      CASE( np_seos )                !==  simplified EOS  ==! 
    549550         ! 
    550          DO_2D_11_11 
     551         DO_2D( 1, 1, 1, 1 ) 
    551552            ! 
    552553            zt    = pts  (ji,jj,jp_tem)  - 10._wp 
     
    564565      CASE( np_leos )                !==  ISOMIP EOS  ==! 
    565566         ! 
    566          DO_2D_11_11 
     567         DO_2D( 1, 1, 1, 1 ) 
    567568            ! 
    568569            zt    = pts  (ji,jj,jp_tem)  - (-1._wp) 
     
    611612      CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==! 
    612613         ! 
    613          DO_3D_11_11( 1, jpkm1 ) 
     614         DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
    614615            ! 
    615616            zh  = gdept(ji,jj,jk,Kmm) * r1_Z0                                ! depth 
     
    664665      CASE( np_seos )                  !==  simplified EOS  ==! 
    665666         ! 
    666          DO_3D_11_11( 1, jpkm1 ) 
     667         DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
    667668            zt  = pts (ji,jj,jk,jp_tem) - 10._wp   ! pot. temperature anomaly (t-T0) 
    668669            zs  = pts (ji,jj,jk,jp_sal) - 35._wp   ! abs. salinity anomaly (s-S0) 
     
    680681      CASE( np_leos )                  !==  linear ISOMIP EOS  ==! 
    681682         ! 
    682          DO_3D_11_11( 1, jpkm1 ) 
     683         DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
    683684            zt  = pts (ji,jj,jk,jp_tem) - (-1._wp) 
    684685            zs  = pts (ji,jj,jk,jp_sal) - 34.2_wp   ! abs. salinity anomaly (s-S0) 
     
    734735      CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==! 
    735736         ! 
    736          DO_2D_11_11 
     737         DO_2D( 1, 1, 1, 1 ) 
    737738            ! 
    738739            zh  = pdep(ji,jj) * r1_Z0                                  ! depth 
     
    787788      CASE( np_seos )                  !==  simplified EOS  ==! 
    788789         ! 
    789          DO_2D_11_11 
     790         DO_2D( 1, 1, 1, 1 ) 
    790791            ! 
    791792            zt    = pts  (ji,jj,jp_tem) - 10._wp   ! pot. temperature anomaly (t-T0) 
     
    803804      CASE( np_leos )                  !==  linear ISOMIP EOS  ==! 
    804805         ! 
    805          DO_2D_11_11 
     806         DO_2D( 1, 1, 1, 1 ) 
    806807            ! 
    807808            zt    = pts  (ji,jj,jp_tem) - (-1._wp)   ! pot. temperature anomaly (t-T0) 
     
    965966      IF( ln_timing )   CALL timing_start('bn2') 
    966967      ! 
    967       DO_3D_11_11( 2, jpkm1 ) 
     968      DO_3D( 1, 1, 1, 1, 2, jpkm1 )      ! interior points only (2=< jk =< jpkm1 ); surface and bottom value set to zero one for all in istate.F90 
    968969         zrw =   ( gdepw(ji,jj,jk  ,Kmm) - gdept(ji,jj,jk,Kmm) )   & 
    969970            &  / ( gdept(ji,jj,jk-1,Kmm) - gdept(ji,jj,jk,Kmm) )  
     
    10131014      z1_T0   = 1._wp/40._wp 
    10141015      ! 
    1015       DO_2D_11_11 
     1016      DO_2D( 1, 1, 1, 1 ) 
    10161017         ! 
    10171018         zt  = ctmp   (ji,jj) * z1_T0 
     
    10661067         ! 
    10671068         z1_S0 = 1._wp / 35.16504_wp 
    1068          DO_2D_11_11 
     1069         DO_2D( 1, 1, 1, 1 ) 
    10691070            zs= SQRT( ABS( psal(ji,jj) ) * z1_S0 )           ! square root salinity 
    10701071            ptf(ji,jj) = ((((1.46873e-03_wp*zs-9.64972e-03_wp)*zs+2.28348e-02_wp)*zs & 
     
    11731174      CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==! 
    11741175         ! 
    1175          DO_3D_11_11( 1, jpkm1 ) 
     1176         DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
    11761177            ! 
    11771178            zh  = gdept(ji,jj,jk,Kmm) * r1_Z0                                ! depth 
     
    12321233      CASE( np_seos )                !==  Vallis (2006) simplified EOS  ==! 
    12331234         ! 
    1234          DO_3D_11_11( 1, jpkm1 ) 
     1235         DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
    12351236            zt  = pts(ji,jj,jk,jp_tem) - 10._wp  ! temperature anomaly (t-T0) 
    12361237            zs = pts (ji,jj,jk,jp_sal) - 35._wp  ! abs. salinity anomaly (s-S0) 
     
    12481249      CASE( np_leos )                !==  linear ISOMIP EOS  ==! 
    12491250         ! 
    1250          DO_3D_11_11( 1, jpkm1 ) 
     1251         DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
    12511252            zt  = pts(ji,jj,jk,jp_tem) - (-1._wp)  ! temperature anomaly (t-T0) 
    12521253            zs = pts (ji,jj,jk,jp_sal) - 34.2_wp   ! abs. salinity anomaly (s-S0) 
     
    17231724         ! 
    17241725      CASE( np_leos )                        !==  Linear ISOMIP EOS     ==! 
     1726 
     1727         r1_S0  = 0.875_wp/35.16504_wp   ! Used to convert CT in potential temperature when using bulk formulae (eos_pt_from_ct) 
     1728          
    17251729         IF(lwp) THEN 
    17261730            WRITE(numout,*) 
     
    17311735            WRITE(numout,*) '             saline  cont. coef.   rn_b0      = ', rn_b0 
    17321736         ENDIF 
     1737         l_useCT = .TRUE.          ! Use conservative temperature 
    17331738         ! 
    17341739      CASE DEFAULT                     !==  ERROR in neos  ==! 
  • NEMO/branches/2020/tickets_icb_1900/tests/ISOMIP+/MY_SRC/isf_oce.F90

    r12077 r13899  
    7575   ! 
    7676   ! 2.1 -------- ice shelf cavity parameter -------------- 
    77    LOGICAL , PUBLIC            :: l_isfoasis 
     77   LOGICAL , PUBLIC            :: l_isfoasis = .FALSE. 
    7878   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)    ::   risfload                    !: ice shelf load 
    7979   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)    ::   fwfisf_oasis 
  • NEMO/branches/2020/tickets_icb_1900/tests/ISOMIP+/MY_SRC/isfcavgam.F90

    r12905 r13899  
    3030   PUBLIC   isfcav_gammats 
    3131 
     32#  include "domzgr_substitute.h90" 
    3233   !!---------------------------------------------------------------------- 
    3334   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
  • NEMO/branches/2020/tickets_icb_1900/tests/ISOMIP+/MY_SRC/isfstp.F90

    r12905 r13899  
    1313   !!   isfstp       : compute iceshelf melt and heat flux 
    1414   !!---------------------------------------------------------------------- 
    15    ! 
    1615   USE isf_oce                                      ! isf variables 
    1716   USE isfload, ONLY: isf_load                      ! ice shelf load 
     
    2120   USE isfcpl , ONLY: isfcpl_rst_write, isfcpl_init ! isf variables 
    2221 
    23    USE dom_oce, ONLY: ht, e3t, ln_isfcav, ln_linssh     ! ocean space and time domain 
     22   USE dom_oce        ! ocean space and time domain 
     23   USE oce      , ONLY: ssh                           ! sea surface height 
    2424   USE domvvl,  ONLY: ln_vvl_zstar                      ! zstar logical 
    2525   USE zdfdrg,  ONLY: r_Cdmin_top, r_ke0_top            ! vertical physics: top/bottom drag coef. 
     
    3131 
    3232   IMPLICIT NONE 
    33  
    3433   PRIVATE 
    3534 
    3635   PUBLIC   isf_stp, isf_init, isf_nam  ! routine called in sbcmod and divhor 
    3736 
     37   !! * Substitutions 
     38#  include "domzgr_substitute.h90" 
    3839   !!---------------------------------------------------------------------- 
    3940   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    4142   !! Software governed by the CeCILL license (see ./LICENSE) 
    4243   !!---------------------------------------------------------------------- 
     44 
    4345CONTAINS 
    4446  
     
    6062      INTEGER, INTENT(in) ::   kt   ! ocean time step 
    6163      INTEGER, INTENT(in) ::   Kmm  ! ocean time level index 
     64      !!---------------------------------------------------------------------- 
     65      INTEGER :: jk                               ! loop index 
     66      REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3t    ! e3t  
    6267      !!--------------------------------------------------------------------- 
    6368      ! 
     
    7883         ! 1.2: compute misfkb, rhisf_tbl, rfrac (deepest level, thickness, fraction of deepest cell affected by tbl) 
    7984         rhisf_tbl_cav(:,:) = rn_htbl * mskisf_cav(:,:) 
    80          CALL isf_tbl_lvl(ht, e3t(:,:,:,Kmm), misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav) 
     85         DO jk = 1, jpk 
     86            ze3t(:,:,jk) = e3t(:,:,jk,Kmm) 
     87         END DO  
     88         CALL isf_tbl_lvl(ht(:,:), ze3t, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav) 
    8189         ! 
    8290         ! 1.3: compute ice shelf melt 
     
    100108         ! by simplicity, we assume the top level where param applied do not change with time (done in init part) 
    101109         rhisf_tbl_par(:,:) = rhisf0_tbl_par(:,:) 
    102          CALL isf_tbl_lvl(ht, e3t(:,:,:,Kmm), misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par) 
     110         DO jk = 1, jpk 
     111            ze3t(:,:,jk) = e3t(:,:,jk,Kmm) 
     112         END DO 
     113         CALL isf_tbl_lvl(ht(:,:), ze3t, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par) 
    103114         ! 
    104115         ! 2.3: compute ice shelf melt 
  • NEMO/branches/2020/tickets_icb_1900/tests/ISOMIP+/MY_SRC/istate.F90

    r12905 r13899  
    2424   USE dom_oce        ! ocean space and time domain  
    2525   USE daymod         ! calendar 
    26    USE divhor         ! horizontal divergence            (div_hor routine) 
    2726   USE dtatsd         ! data temperature and salinity   (dta_tsd routine) 
    2827   USE dtauvd         ! data: U & V current             (dta_uvd routine) 
     
    3534   USE lib_mpp         ! MPP library 
    3635   USE restart         ! restart 
     36#if defined key_agrif 
     37   USE agrif_oce_interp 
     38   USE agrif_oce 
     39#endif    
    3740 
    3841   IMPLICIT NONE 
     
    4346   !! * Substitutions 
    4447#  include "do_loop_substitute.h90" 
     48#  include "domzgr_substitute.h90" 
    4549   !!---------------------------------------------------------------------- 
    4650   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    5963      ! 
    6064      INTEGER ::   ji, jj, jk   ! dummy loop indices 
     65      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zgdept     ! 3D table  !!st patch to use gdept subtitute 
    6166!!gm see comment further down 
    6267      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::   zuvd    ! U & V data workspace 
     
    7075!!gm  Why not include in the first call of dta_tsd ?   
    7176!!gm  probably associated with the use of internal damping... 
    72                      CALL dta_tsd_init        ! Initialisation of T & S input data 
     77       CALL dta_tsd_init        ! Initialisation of T & S input data 
    7378!!gm to be moved in usrdef of C1D case 
    7479!      IF( lk_c1d )   CALL dta_uvd_init        ! Initialization of U & V input data 
     
    8489#endif 
    8590 
     91#if defined key_agrif 
     92      IF ( (.NOT.Agrif_root()).AND.ln_init_chfrpar ) THEN 
     93         numror = 0                           ! define numror = 0 -> no restart file to read 
     94         ln_1st_euler = .true.                ! Set time-step indicator at nit000 (euler forward) 
     95         CALL day_init  
     96         CALL agrif_istate( Kbb, Kmm, Kaa )   ! Interp from parent 
     97         ! 
     98         ts  (:,:,:,:,Kmm) = ts (:,:,:,:,Kbb)  
     99         ssh (:,:,Kmm)     = ssh(:,:,Kbb) 
     100         uu   (:,:,:,Kmm)   = uu  (:,:,:,Kbb) 
     101         vv   (:,:,:,Kmm)   = vv  (:,:,:,Kbb) 
     102      ELSE 
     103#endif 
    86104      IF( ln_rstart ) THEN                    ! Restart from a file 
    87105         !                                    ! ------------------- 
     
    100118            ! 
    101119            ssh(:,:,Kbb)   = 0._wp               ! set the ocean at rest 
     120            uu  (:,:,:,Kbb) = 0._wp 
     121            vv  (:,:,:,Kbb) = 0._wp   
     122            ! 
    102123            IF( ll_wd ) THEN 
    103124               ssh(:,:,Kbb) =  -ssh_ref  ! Added in 30 here for bathy that adds 30 as Iterative test CEOD  
     
    105126               ! Apply minimum wetdepth criterion 
    106127               ! 
    107                DO_2D_11_11 
     128               DO_2D( 1, 1, 1, 1 ) 
    108129                  IF( ht_0(ji,jj) + ssh(ji,jj,Kbb)  < rn_wdmin1 ) THEN 
    109130                     ssh(ji,jj,Kbb) = tmask(ji,jj,1)*( rn_wdmin1 - (ht_0(ji,jj)) ) 
     
    111132               END_2D 
    112133            ENDIF  
    113             uu  (:,:,:,Kbb) = 0._wp 
    114             vv  (:,:,:,Kbb) = 0._wp   
    115             ! 
     134             ! 
    116135         ELSE                                 ! user defined initial T and S 
    117             CALL usr_def_istate( gdept(:,:,:,Kbb), tmask, ts(:,:,:,:,Kbb), uu(:,:,:,Kbb), vv(:,:,:,Kbb), ssh(:,:,Kbb)  )          
     136            DO jk = 1, jpk 
     137               zgdept(:,:,jk) = gdept(:,:,jk,Kbb) 
     138            END DO 
     139            CALL usr_def_istate( zgdept, tmask, ts(:,:,:,:,Kbb), uu(:,:,:,Kbb), vv(:,:,:,Kbb), ssh(:,:,Kbb)  )          
    118140         ENDIF 
    119141         ts  (:,:,:,:,Kmm) = ts (:,:,:,:,Kbb)       ! set now values from to before ones 
     
    121143         uu   (:,:,:,Kmm)   = uu  (:,:,:,Kbb) 
    122144         vv   (:,:,:,Kmm)   = vv  (:,:,:,Kbb) 
    123          hdiv(:,:,jpk) = 0._wp               ! bottom divergence set one for 0 to zero at jpk level 
    124          CALL div_hor( 0, Kbb, Kmm )         ! compute interior hdiv value   
    125 !!gm                                    hdiv(:,:,:) = 0._wp 
    126145 
    127146!!gm POTENTIAL BUG : 
    128147!!gm  ISSUE :  if ssh(:,:,Kbb) /= 0  then, in non linear free surface, the e3._n, e3._b should be recomputed 
    129 !!             as well as gdept and gdepw....   !!!!!  
     148!!             as well as gdept_ and gdepw_....   !!!!!  
    130149!!      ===>>>>   probably a call to domvvl initialisation here.... 
    131150 
     
    151170         !  
    152171      ENDIF  
     172#if defined key_agrif 
     173      ENDIF 
     174#endif 
    153175      !  
    154176      ! Initialize "now" and "before" barotropic velocities: 
     
    159181      ! 
    160182!!gm  the use of umsak & vmask is not necessary below as uu(:,:,:,Kmm), vv(:,:,:,Kmm), uu(:,:,:,Kbb), vv(:,:,:,Kbb) are always masked 
    161       DO_3D_11_11( 1, jpkm1 ) 
     183      DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
    162184         uu_b(ji,jj,Kmm) = uu_b(ji,jj,Kmm) + e3u(ji,jj,jk,Kmm) * uu(ji,jj,jk,Kmm) * umask(ji,jj,jk) 
    163185         vv_b(ji,jj,Kmm) = vv_b(ji,jj,Kmm) + e3v(ji,jj,jk,Kmm) * vv(ji,jj,jk,Kmm) * vmask(ji,jj,jk) 
  • NEMO/branches/2020/tickets_icb_1900/tests/ISOMIP+/MY_SRC/sbcfwb.F90

    r12905 r13899  
    1717   USE dom_oce        ! ocean space and time domain 
    1818   USE sbc_oce        ! surface ocean boundary condition 
    19    USE isf_oce       ! ice shelf melting contribution 
     19   USE isf_oce , ONLY : fwfisf_cav, fwfisf_par, ln_isfcpl, ln_isfcpl_cons, risfcpl_cons_ssh ! ice shelf melting contribution 
    2020   USE sbc_ice , ONLY : snwice_mass, snwice_mass_b, snwice_fmass 
    2121   USE phycst         ! physical constants 
     
    7171      REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   ztmsk_tospread, zerp_cor    !   -      - 
    7272      REAL(wp)   ,DIMENSION(1) ::   z_fwfprv   
    73       COMPLEX(wp),DIMENSION(1) ::   y_fwfnow   
     73      COMPLEX(dp),DIMENSION(1) ::   y_fwfnow   
    7474      !!---------------------------------------------------------------------- 
    7575      ! 
     
    9595         snwice_mass_b(:,:) = 0.e0               ! no sea-ice model is being used : no snow+ice mass 
    9696         snwice_mass  (:,:) = 0.e0 
     97         snwice_fmass (:,:) = 0.e0 
    9798#endif 
    9899         ! 
     
    205206            ! 
    206207!!gm   ===>>>>  lbc_lnk should be useless as all the computation is done over the whole domain ! 
    207             CALL lbc_lnk( 'sbcfwb', zerp_cor, 'T', 1. ) 
     208            CALL lbc_lnk( 'sbcfwb', zerp_cor, 'T', 1.0_wp ) 
    208209            ! 
    209210            emp(:,:) = emp(:,:) + zerp_cor(:,:) 
     
    211212            erp(:,:) = erp(:,:) + zerp_cor(:,:) 
    212213            ! 
    213             IF( nprint == 1 .AND. lwp ) THEN                   ! control print 
     214            IF( lwp ) THEN                   ! control print 
    214215               IF( z_fwf < 0._wp ) THEN 
    215216                  WRITE(numout,*)'   z_fwf < 0' 
  • NEMO/branches/2020/tickets_icb_1900/tests/ISOMIP+/MY_SRC/tradmp.F90

    r12905 r13899  
    112112      CASE( 0 )                        !*  newtonian damping throughout the water column  *! 
    113113         DO jn = 1, jpts 
    114             DO_3D_00_00( 1, jpkm1 ) 
     114            DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
    115115               pts(ji,jj,jk,jn,Krhs) = pts(ji,jj,jk,jn,Krhs)           & 
    116116                  &                  + resto(ji,jj,jk) * ( zts_dta(ji,jj,jk,jn) - pts(ji,jj,jk,jn,Kbb) ) 
     
    119119         ! 
    120120      CASE ( 1 )                       !*  no damping in the turbocline (avt > 5 cm2/s)  *! 
    121          DO_3D_00_00( 1, jpkm1 ) 
     121         DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
    122122            IF( avt(ji,jj,jk) <= avt_c ) THEN 
    123123               pts(ji,jj,jk,jp_tem,Krhs) = pts(ji,jj,jk,jp_tem,Krhs)   & 
     
    129129         ! 
    130130      CASE ( 2 )                       !*  no damping in the mixed layer   *! 
    131          DO_3D_00_00( 1, jpkm1 ) 
     131         DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
    132132            IF( gdept(ji,jj,jk,Kmm) >= hmlp (ji,jj) ) THEN 
    133133               pts(ji,jj,jk,jp_tem,Krhs) = pts(ji,jj,jk,jp_tem,Krhs)   & 
     
    208208         !                          ! Read in mask from file 
    209209         CALL iom_open ( cn_resto, imask) 
    210          CALL iom_get  ( imask, jpdom_autoglo, 'resto', resto ) 
     210         CALL iom_get  ( imask, jpdom_auto, 'resto', resto ) 
    211211         CALL iom_close( imask ) 
    212212      ENDIF 
  • NEMO/branches/2020/tickets_icb_1900/tests/ISOMIP/EXPREF/context_nemo.xml

    r12276 r13899  
    1111       <variable id="ref_month" type="int"> 01 </variable> 
    1212       <variable id="ref_day"   type="int"> 01 </variable> 
    13        <variable id="rau0"      type="float" > 1026.0 </variable> 
     13       <variable id="rho0"      type="float" > 1026.0 </variable> 
    1414       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
    1515       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
  • NEMO/branches/2020/tickets_icb_1900/tests/ISOMIP/EXPREF/namelist_cfg

    r12489 r13899  
    227227!!                                                                    !! 
    228228!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    229 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    230 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     229!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     230!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    231231!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    232232!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    236236&namdrg        !   top/bottom drag coefficient                          (default: NO selection) 
    237237!----------------------------------------------------------------------- 
    238    ln_OFF     = .false.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
     238   ln_drg_OFF = .false.   !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    239239   ln_lin     = .false.    !      linear  drag: Cd = Cd0 Uc0                   &   namdrg_top) 
    240240   ln_non_lin = .true.     !  non-linear  drag: Cd = Cd0 |U| 
     
    244244/ 
    245245!----------------------------------------------------------------------- 
    246 &namdrg_top    !   TOP friction                                         (ln_OFF =F & ln_isfcav=T) 
     246&namdrg_top    !   TOP friction                                         (ln_drg_OFF =F & ln_isfcav=T) 
    247247!----------------------------------------------------------------------- 
    248248   rn_Cd0     =  2.5e-3    !  drag coefficient [-] 
     
    255255/ 
    256256!----------------------------------------------------------------------- 
    257 &namdrg_bot    !   BOTTOM friction                                      (ln_OFF =F) 
     257&namdrg_bot    !   BOTTOM friction                                      (ln_drg_OFF =F) 
    258258!----------------------------------------------------------------------- 
    259259   rn_Cd0     =  1.e-3    !  drag coefficient [-] 
     
    423423!!                                                                    !! 
    424424!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    425 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    426425!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    427426!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
     
    438437/ 
    439438!----------------------------------------------------------------------- 
    440 &namptr        !   Poleward Transport Diagnostic                        (default: OFF) 
    441 !----------------------------------------------------------------------- 
    442 / 
    443 !----------------------------------------------------------------------- 
    444439&namhsb        !  Heat and salt budgets                                 (default: OFF) 
    445440!----------------------------------------------------------------------- 
  • NEMO/branches/2020/tickets_icb_1900/tests/ISOMIP/MY_SRC/usrdef_hgr.F90

    r12740 r13899  
    1414   !!   usr_def_hgr    : initialize the horizontal mesh for ISOMIP configuration 
    1515   !!---------------------------------------------------------------------- 
    16    USE dom_oce  ,  ONLY: nimpp, njmpp       ! ocean space and time domain 
     16   USE dom_oce 
    1717   USE par_oce         ! ocean space and time domain 
    1818   USE phycst          ! physical constants 
     
    7777      ! 
    7878      !                       !==  grid point position  ==!   (in degrees) 
    79       DO_2D_11_11 
     79      DO_2D( 1, 1, 1, 1 ) 
    8080         !                       ! longitude   (west coast at lon=0°) 
    81          plamt(ji,jj) = rn_e1deg * (  - 0.5 + REAL( ji-1 + nimpp-1 , wp )  )   
    82          plamu(ji,jj) = rn_e1deg * (          REAL( ji-1 + nimpp-1 , wp )  ) 
     81         plamt(ji,jj) = rn_e1deg * (  - 0.5 + REAL( mig0_oldcmp(ji)-1 , wp )  )   
     82         plamu(ji,jj) = rn_e1deg * (          REAL( mig0_oldcmp(ji)-1 , wp )  ) 
    8383         plamv(ji,jj) = plamt(ji,jj) 
    8484         plamf(ji,jj) = plamu(ji,jj) 
    8585         !                       ! latitude   (south coast at lat= 81°) 
    86          pphit(ji,jj) = rn_e2deg * (  - 0.5 + REAL( jj-1 + njmpp-1 , wp )  ) - 80._wp 
     86         pphit(ji,jj) = rn_e2deg * (  - 0.5 + REAL( mjg0_oldcmp(jj)-1 , wp )  ) - 80._wp 
    8787         pphiu(ji,jj) = pphit(ji,jj) 
    88          pphiv(ji,jj) = rn_e2deg * (          REAL( jj-1 + njmpp-1 , wp )  ) - 80_wp 
     88         pphiv(ji,jj) = rn_e2deg * (          REAL( mjg0_oldcmp(jj)-1 , wp )  ) - 80_wp 
    8989         pphif(ji,jj) = pphiv(ji,jj) 
    9090      END_2D 
    9191      ! 
    9292      !                       !==  Horizontal scale factors  ==!   (in meters) 
    93       DO_2D_11_11 
     93      DO_2D( 1, 1, 1, 1 ) 
    9494         !                       ! e1   (zonal) 
    9595         pe1t(ji,jj) = ra * rad * COS( rad * pphit(ji,jj) ) * rn_e1deg 
  • NEMO/branches/2020/tickets_icb_1900/tests/ISOMIP/MY_SRC/usrdef_nam.F90

    r12377 r13899  
    1515   !!   usr_def_hgr   : initialize the horizontal mesh  
    1616   !!---------------------------------------------------------------------- 
    17    USE dom_oce  , ONLY: nimpp , njmpp            ! i- & j-indices of the local domain 
    1817   USE dom_oce  , ONLY: ln_zco, ln_zps, ln_sco   ! flag of type of coordinate 
    1918   USE par_oce        ! ocean space and time domain 
     
    9594         WRITE(numout,*) '         vertical   resolution                 rn_e3    = ', rn_e3   , ' meters' 
    9695         WRITE(numout,*) '      ISOMIP domain = 15° x 10° x 900 m' 
    97          WRITE(numout,*) '         resulting global domain size :        jpiglo   = ', kpi 
    98          WRITE(numout,*) '                                               jpjglo   = ', kpj 
     96         WRITE(numout,*) '         resulting global domain size :        Ni0glo   = ', kpi 
     97         WRITE(numout,*) '                                               Nj0glo   = ', kpj 
    9998         WRITE(numout,*) '                                               jpkglo   = ', kpk 
    10099         WRITE(numout,*) '   ' 
  • NEMO/branches/2020/tickets_icb_1900/tests/ISOMIP/MY_SRC/usrdef_zgr.F90

    r12740 r13899  
    1616   !!--------------------------------------------------------------------- 
    1717   USE oce            ! ocean variables 
    18    USE dom_oce ,  ONLY: mj0   , mj1   , nimpp , njmpp  ! ocean space and time domain 
    19    USE dom_oce ,  ONLY: glamt , gphit                   ! ocean space and time domain 
     18   USE dom_oce ,  ONLY: mj0   , mj1    ! ocean space and time domain 
     19   USE dom_oce ,  ONLY: glamt , gphit  ! ocean space and time domain 
    2020   USE usrdef_nam     ! User defined : namelist variables 
    2121   ! 
     
    6767      REAL(wp), DIMENSION(jpi,jpj) ::   zht  , zhu         ! bottom depth 
    6868      REAL(wp), DIMENSION(jpi,jpj) ::   zhisf, zhisfu      ! top depth 
    69       REAL(wp), DIMENSION(jpi,jpj) ::   zmsk  
    70       REAL(wp), DIMENSION(jpi,jpj) ::   z2d                ! 2d workspace 
    7169      !!---------------------------------------------------------------------- 
    7270      ! 
     
    8785      !                       !==  isfdraft  ==! 
    8886      ! 
    89       ! the ocean basin surrounded by land (1 grid-point) set through lbc_lnk call as jperio=0  
    90       z2d(:,:) = 1._wp                    ! surface ocean is the 1st level 
    91       CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin since jperio = 0 (see userdef_nam.F90) 
    92       zmsk(:,:) = NINT( z2d(:,:) ) 
    93       ! 
    94       ! 
    9587      zht  (:,:) = rbathy  
    9688      zhisf(:,:) = 200._wp 
    97       ij0 = 1 ; ij1 = 40 
     89      ij0 = 1   ;   ij1 = 40+nn_hls 
    9890      DO jj = mj0(ij0), mj1(ij1) 
    9991         zhisf(:,jj)=700.0_wp-(gphit(:,jj)+80.0_wp)*125.0_wp 
    10092      END DO 
    101       zhisf(:,:) = zhisf(:,:) * zmsk(:,:) 
    10293      ! 
    10394      CALL zgr_z1d( pdept_1d, pdepw_1d, pe3t_1d , pe3w_1d )   ! Reference z-coordinate system 
     
    135126         END DO 
    136127         ! top scale factors and depth at T- and W-points 
    137          DO_2D_11_11 
     128         DO_2D( 1, 1, 1, 1 ) 
    138129            ik = k_top(ji,jj) 
    139130            IF ( ik > 2 ) THEN 
     
    154145         END_2D 
    155146         ! bottom scale factors and depth at T- and W-points 
    156          DO_2D_11_11 
     147         DO_2D( 1, 1, 1, 1 ) 
    157148            ik = k_bot(ji,jj) 
    158149            pdepw(ji,jj,ik+1) = MIN( zht(ji,jj) , pdepw_1d(ik+1) ) 
     
    167158         pe3u (:,:,:) = pe3t(:,:,:) 
    168159         pe3uw(:,:,:) = pe3w(:,:,:) 
    169          DO_3D_00_00( 1, jpk ) 
     160         DO_3D( 0, 0, 0, 0, 1, jpk ) 
    170161         !                                   ! Computed as the minimum of neighbooring scale factors 
    171162            pe3v (ji,jj,jk) = MIN( pe3t(ji,jj,jk), pe3t(ji,jj+1,jk) ) 
  • NEMO/branches/2020/tickets_icb_1900/tests/LOCK_EXCHANGE/EXPREF/context_nemo.xml

    r12276 r13899  
    1111       <variable id="ref_month" type="int"> 01 </variable> 
    1212       <variable id="ref_day"   type="int"> 01 </variable> 
    13        <variable id="rau0"      type="float" > 1026.0 </variable> 
     13       <variable id="rho0"      type="float" > 1026.0 </variable> 
    1414       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
    1515       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
  • NEMO/branches/2020/tickets_icb_1900/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_flux_cen2_cfg

    r12489 r13899  
    6565&namdrg            !   top/bottom drag coefficient                      (default: NO selection) 
    6666!----------------------------------------------------------------------- 
    67    ln_OFF     = .true.    !  free-slip       : Cd = 0                   
     67   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    6868/ 
    6969!----------------------------------------------------------------------- 
     
    7272   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    7373   !                     ! S-EOS coefficients (nn_eos=1): 
    74    !                          !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     74   !                          !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    7575   rn_a0       =  0.2         !  thermal expension coefficient (nn_eos= 1) 
    7676   rn_b0       =  0.          !  saline  expension coefficient (nn_eos= 1) 
  • NEMO/branches/2020/tickets_icb_1900/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_flux_ubs_cfg

    r12489 r13899  
    110110!!                                                                    !! 
    111111!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    112 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    113 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     112!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     113!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    114114!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    115115!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    119119&namdrg            !   top/bottom drag coefficient                      (default: NO selection) 
    120120!----------------------------------------------------------------------- 
    121    ln_OFF     = .true.    !  free-slip       : Cd = 0                   
     121   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    122122/ 
    123123!!====================================================================== 
     
    137137   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    138138   !                     ! S-EOS coefficients (nn_eos=1): 
    139    !                          !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     139   !                          !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    140140   rn_a0       =  0.2         !  thermal expension coefficient (nn_eos= 1) 
    141141   rn_b0       =  0.          !  saline  expension coefficient (nn_eos= 1) 
     
    271271!!                                                                    !! 
    272272!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    273 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    274273!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    275274!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_vect_eenH_cfg

    r12489 r13899  
    6565&namdrg            !   top/bottom drag coefficient                      (default: NO selection) 
    6666!----------------------------------------------------------------------- 
    67    ln_OFF     = .true.    !  free-slip       : Cd = 0                   
     67   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    6868/ 
    6969!----------------------------------------------------------------------- 
     
    7272   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    7373   !                     ! S-EOS coefficients (nn_eos=1): 
    74    !                          !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     74   !                          !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    7575   rn_a0       =  0.2         !  thermal expension coefficient (nn_eos= 1) 
    7676   rn_b0       =  0.          !  saline  expension coefficient (nn_eos= 1) 
  • NEMO/branches/2020/tickets_icb_1900/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_vect_een_cfg

    r12489 r13899  
    6565&namdrg            !   top/bottom drag coefficient                      (default: NO selection) 
    6666!----------------------------------------------------------------------- 
    67    ln_OFF     = .true.    !  free-slip       : Cd = 0                   
     67   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    6868/ 
    6969!----------------------------------------------------------------------- 
     
    7272   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    7373   !                     ! S-EOS coefficients (nn_eos=1): 
    74    !                          !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     74   !                          !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    7575   rn_a0       =  0.2         !  thermal expension coefficient (nn_eos= 1) 
    7676   rn_b0       =  0.          !  saline  expension coefficient (nn_eos= 1) 
  • NEMO/branches/2020/tickets_icb_1900/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_vect_ene_cfg

    r12489 r13899  
    6565&namdrg            !   top/bottom drag coefficient                      (default: NO selection) 
    6666!----------------------------------------------------------------------- 
    67    ln_OFF     = .true.    !  free-slip       : Cd = 0                   
     67   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    6868/ 
    6969!----------------------------------------------------------------------- 
     
    7272   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    7373   !                     ! S-EOS coefficients (nn_eos=1): 
    74    !                          !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     74   !                          !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    7575   rn_a0       =  0.2         !  thermal expension coefficient (nn_eos= 1) 
    7676   rn_b0       =  0.          !  saline  expension coefficient (nn_eos= 1) 
  • NEMO/branches/2020/tickets_icb_1900/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_vect_ens_cfg

    r12489 r13899  
    6565&namdrg            !   top/bottom drag coefficient                      (default: NO selection) 
    6666!----------------------------------------------------------------------- 
    67    ln_OFF     = .true.    !  free-slip       : Cd = 0                   
     67   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    6868/ 
    6969!----------------------------------------------------------------------- 
     
    7272   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    7373   !                     ! S-EOS coefficients (nn_eos=1): 
    74    !                          !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     74   !                          !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    7575   rn_a0       =  0.2         !  thermal expension coefficient (nn_eos= 1) 
    7676   rn_b0       =  0.          !  saline  expension coefficient (nn_eos= 1) 
  • NEMO/branches/2020/tickets_icb_1900/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_flux_cen2_cfg

    r12489 r13899  
    6565&namdrg            !   top/bottom drag coefficient                      (default: NO selection) 
    6666!----------------------------------------------------------------------- 
    67    ln_OFF     = .true.    !  free-slip       : Cd = 0                   
     67   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    6868/ 
    6969!----------------------------------------------------------------------- 
     
    7272   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    7373   !                     ! S-EOS coefficients (nn_eos=1): 
    74    !                          !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     74   !                          !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    7575   rn_a0       =  0.2         !  thermal expension coefficient (nn_eos= 1) 
    7676   rn_b0       =  0.          !  saline  expension coefficient (nn_eos= 1) 
  • NEMO/branches/2020/tickets_icb_1900/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_flux_ubs_cfg

    r12489 r13899  
    6565&namdrg            !   top/bottom drag coefficient                      (default: NO selection) 
    6666!----------------------------------------------------------------------- 
    67    ln_OFF     = .true.    !  free-slip       : Cd = 0                   
     67   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    6868/ 
    6969!----------------------------------------------------------------------- 
     
    7272   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    7373   !                     ! S-EOS coefficients (nn_eos=1): 
    74    !                          !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     74   !                          !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    7575   rn_a0       =  0.2         !  thermal expension coefficient (nn_eos= 1) 
    7676   rn_b0       =  0.          !  saline  expension coefficient (nn_eos= 1) 
  • NEMO/branches/2020/tickets_icb_1900/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_vect_eenH_cfg

    r12489 r13899  
    6565&namdrg            !   top/bottom drag coefficient                      (default: NO selection) 
    6666!----------------------------------------------------------------------- 
    67    ln_OFF     = .true.    !  free-slip       : Cd = 0                   
     67   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    6868/ 
    6969!----------------------------------------------------------------------- 
     
    7272   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    7373   !                     ! S-EOS coefficients (nn_eos=1): 
    74    !                          !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     74   !                          !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    7575   rn_a0       =  0.2         !  thermal expension coefficient (nn_eos= 1) 
    7676   rn_b0       =  0.          !  saline  expension coefficient (nn_eos= 1) 
  • NEMO/branches/2020/tickets_icb_1900/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_vect_een_cfg

    r12489 r13899  
    6565&namdrg            !   top/bottom drag coefficient                      (default: NO selection) 
    6666!----------------------------------------------------------------------- 
    67    ln_OFF     = .true.    !  free-slip       : Cd = 0                   
     67   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    6868/ 
    6969!----------------------------------------------------------------------- 
     
    7272   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    7373   !                     ! S-EOS coefficients (nn_eos=1): 
    74    !                          !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     74   !                          !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    7575   rn_a0       =  0.2         !  thermal expension coefficient (nn_eos= 1) 
    7676   rn_b0       =  0.          !  saline  expension coefficient (nn_eos= 1) 
  • NEMO/branches/2020/tickets_icb_1900/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_vect_ene_cfg

    r12489 r13899  
    6565&namdrg            !   top/bottom drag coefficient                      (default: NO selection) 
    6666!----------------------------------------------------------------------- 
    67    ln_OFF     = .true.    !  free-slip       : Cd = 0                   
     67   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    6868/ 
    6969!----------------------------------------------------------------------- 
     
    7272   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    7373   !                     ! S-EOS coefficients (nn_eos=1): 
    74    !                          !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     74   !                          !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    7575   rn_a0       =  0.2         !  thermal expension coefficient (nn_eos= 1) 
    7676   rn_b0       =  0.          !  saline  expension coefficient (nn_eos= 1) 
  • NEMO/branches/2020/tickets_icb_1900/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_vect_ens_cfg

    r12489 r13899  
    6565&namdrg            !   top/bottom drag coefficient                      (default: NO selection) 
    6666!----------------------------------------------------------------------- 
    67    ln_OFF     = .true.    !  free-slip       : Cd = 0                   
     67   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    6868/ 
    6969!----------------------------------------------------------------------- 
     
    7272   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    7373   !                     ! S-EOS coefficients (nn_eos=1): 
    74    !                          !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     74   !                          !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    7575   rn_a0       =  0.2         !  thermal expension coefficient (nn_eos= 1) 
    7676   rn_b0       =  0.          !  saline  expension coefficient (nn_eos= 1) 
  • NEMO/branches/2020/tickets_icb_1900/tests/LOCK_EXCHANGE/MY_SRC/usrdef_hgr.F90

    r12740 r13899  
    1313   !!   usr_def_hgr    : initialize the horizontal mesh for LOCK_EXCHANGE configuration 
    1414   !!---------------------------------------------------------------------- 
    15    USE dom_oce  ,  ONLY: nimpp, njmpp       ! ocean space and time domain 
     15   USE dom_oce 
    1616   USE par_oce         ! ocean space and time domain 
    1717   USE phycst          ! physical constants 
     
    7474      !                       !==  grid point position  ==!   (in kilometers) 
    7575      zfact = rn_dx * 1.e-3         ! conversion in km 
    76       DO_2D_11_11 
     76      DO_2D( 1, 1, 1, 1 ) 
    7777         !                       ! longitude 
    78          plamt(ji,jj) = zfact * (  - 0.5 + REAL( ji-1 + nimpp-1 , wp )  )   
    79          plamu(ji,jj) = zfact * (          REAL( ji-1 + nimpp-1 , wp )  ) 
     78         plamt(ji,jj) = zfact * (  - 0.5 + REAL( mig0_oldcmp(ji)-1 , wp )  )   
     79         plamu(ji,jj) = zfact * (          REAL( mig0_oldcmp(ji)-1 , wp )  ) 
    8080         plamv(ji,jj) = plamt(ji,jj) 
    8181         plamf(ji,jj) = plamu(ji,jj) 
    8282         !                       ! latitude 
    83          pphit(ji,jj) = zfact * (  - 0.5 + REAL( jj-1 + njmpp-1 , wp )  ) 
     83         pphit(ji,jj) = zfact * (  - 0.5 + REAL( mjg0_oldcmp(jj)-1 , wp )  ) 
    8484         pphiu(ji,jj) = pphit(ji,jj) 
    85          pphiv(ji,jj) = zfact * (          REAL( jj-1 + njmpp-1 , wp )  ) 
     85         pphiv(ji,jj) = zfact * (          REAL( mjg0_oldcmp(jj)-1 , wp )  ) 
    8686         pphif(ji,jj) = pphiv(ji,jj) 
    8787      END_2D 
  • NEMO/branches/2020/tickets_icb_1900/tests/LOCK_EXCHANGE/MY_SRC/usrdef_nam.F90

    r12377 r13899  
    1414   !!   usr_def_hgr   : initialize the horizontal mesh  
    1515   !!---------------------------------------------------------------------- 
    16    USE dom_oce  , ONLY: nimpp , njmpp            ! i- & j-indices of the local domain 
    1716   USE par_oce        ! ocean space and time domain 
    1817   USE phycst         ! physical constants 
     
    8584         WRITE(numout,*) '      vertical   resolution                    rn_dz  = ', rn_dz, ' meters' 
    8685         WRITE(numout,*) '      LOCK_EXCHANGE domain = 64 km  x  3 grid-points  x  20 m' 
    87          WRITE(numout,*) '         resulting global domain size :        jpiglo = ', kpi 
    88          WRITE(numout,*) '                                               jpjglo = ', kpj 
     86         WRITE(numout,*) '         resulting global domain size :        Ni0glo = ', kpi 
     87         WRITE(numout,*) '                                               Nj0glo = ', kpj 
    8988         WRITE(numout,*) '                                               jpkglo = ', kpk 
    9089         WRITE(numout,*) '   ' 
  • NEMO/branches/2020/tickets_icb_1900/tests/OVERFLOW/EXPREF/context_nemo.xml

    r12276 r13899  
    1111       <variable id="ref_month" type="int"> 01 </variable> 
    1212       <variable id="ref_day"   type="int"> 01 </variable> 
    13        <variable id="rau0"      type="float" > 1026.0 </variable> 
     13       <variable id="rho0"      type="float" > 1026.0 </variable> 
    1414       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
    1515       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
  • NEMO/branches/2020/tickets_icb_1900/tests/OVERFLOW/EXPREF/namelist_sco_FCT2_flux_cen-ahm1000_cfg

    r12489 r13899  
    2121   nn_it000    =       1   !  first time step 
    2222   nn_itend    =    6120  ! here 17h of simulation  (=6120 time-step)  
    23    !nn_itend    =    5760   ! here 16h of simulation  (=5760 time-step) abort after 5802 for zps: pb of physics conditions 
    2423   nn_istate   =       0   !  output the initial state (1) or not (0) 
    2524   nn_stock    =    6120   !  frequency of creation of a restart file (modulo referenced to 1) 
     
    7170&namdrg            !   top/bottom drag coefficient                      (default: NO selection) 
    7271!----------------------------------------------------------------------- 
    73    ln_OFF     = .true.     !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
     72   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    7473   ln_lin     = .false.    !      linear  drag: Cd = Cd0 Uc0                   &   namdrg_top) 
    7574   ln_non_lin = .false.    !  non-linear  drag: Cd = Cd0 |U| 
     
    8281!----------------------------------------------------------------------- 
    8382   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    84    !                             !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     83   !                             !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    8584   rn_a0       =  0.2         !  thermal expension coefficient (for simplified equation of state) 
    8685   rn_b0       =  0.          !  saline  expension coefficient (for simplified equation of state) 
  • NEMO/branches/2020/tickets_icb_1900/tests/OVERFLOW/EXPREF/namelist_sco_FCT2_flux_ubs_cfg

    r12489 r13899  
    2121   nn_it000    =       1   !  first time step 
    2222   nn_itend    =    6120  ! here 17h of simulation  (=6120 time-step)  
    23    !nn_itend    =    5760   ! here 16h of simulation  (=5760 time-step) abort after 5802 for zps: pb of physics conditions 
    2423   nn_istate   =       0   !  output the initial state (1) or not (0) 
    2524   nn_stock    =    1080   !  frequency of creation of a restart file (modulo referenced to 1) 
     
    7170&namdrg            !   top/bottom drag coefficient                      (default: NO selection) 
    7271!----------------------------------------------------------------------- 
    73    ln_OFF    = .true.     !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
     72   ln_drg_OFF = .true.     !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    7473   ln_lin     = .false.    !      linear  drag: Cd = Cd0 Uc0                   &   namdrg_top) 
    7574   ln_non_lin = .false.    !  non-linear  drag: Cd = Cd0 |U| 
     
    8281!----------------------------------------------------------------------- 
    8382   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    84    !                             !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     83   !                             !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    8584   rn_a0       =  0.2         !  thermal expension coefficient (for simplified equation of state) 
    8685   rn_b0       =  0.          !  saline  expension coefficient (for simplified equation of state) 
  • NEMO/branches/2020/tickets_icb_1900/tests/OVERFLOW/EXPREF/namelist_sco_FCT4_flux_cen-ahm1000_cfg

    r12489 r13899  
    2121   nn_it000    =       1   !  first time step 
    2222   nn_itend    =    6120  ! here 17h of simulation  (=6120 time-step)  
    23    !nn_itend    =    5760   ! here 16h of simulation  (=5760 time-step) abort after 5802 for zps: pb of physics conditions 
    2423   nn_istate   =       0   !  output the initial state (1) or not (0) 
    2524   nn_stock    =    6120   !  frequency of creation of a restart file (modulo referenced to 1) 
     
    7170&namdrg            !   top/bottom drag coefficient                      (default: NO selection) 
    7271!----------------------------------------------------------------------- 
    73    ln_OFF     = .true.     !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
     72   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    7473   ln_lin     = .false.    !      linear  drag: Cd = Cd0 Uc0                   &   namdrg_top) 
    7574   ln_non_lin = .false.    !  non-linear  drag: Cd = Cd0 |U| 
     
    8281!----------------------------------------------------------------------- 
    8382   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    84    !                             !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     83   !                             !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    8584   rn_a0       =  0.2         !  thermal expension coefficient (for simplified equation of state) 
    8685   rn_b0       =  0.          !  saline  expension coefficient (for simplified equation of state) 
  • NEMO/branches/2020/tickets_icb_1900/tests/OVERFLOW/EXPREF/namelist_sco_FCT4_flux_ubs_cfg

    r12489 r13899  
    2121   nn_it000    =       1   !  first time step 
    2222   nn_itend    =    6120  ! here 17h of simulation  (=6120 time-step)  
    23    !nn_itend    =    5760   ! here 16h of simulation  (=5760 time-step) abort after 5802 for zps: pb of physics conditions 
    2423   nn_istate   =       0   !  output the initial state (1) or not (0) 
    2524   nn_stock    =    1080   !  frequency of creation of a restart file (modulo referenced to 1) 
     
    7170&namdrg            !   top/bottom drag coefficient                      (default: NO selection) 
    7271!----------------------------------------------------------------------- 
    73    ln_OFF     = .true.     !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
     72   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    7473   ln_lin     = .false.    !      linear  drag: Cd = Cd0 Uc0                   &   namdrg_top) 
    7574   ln_non_lin = .false.    !  non-linear  drag: Cd = Cd0 |U| 
     
    8281!----------------------------------------------------------------------- 
    8382   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    84    !                             !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     83   !                             !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    8584   rn_a0       =  0.2         !  thermal expension coefficient (for simplified equation of state) 
    8685   rn_b0       =  0.          !  saline  expension coefficient (for simplified equation of state) 
  • NEMO/branches/2020/tickets_icb_1900/tests/OVERFLOW/EXPREF/namelist_zps_FCT2_flux_ubs_cfg

    r12489 r13899  
    2020   cn_exp      =   "OVF_zps_FCT2_flux_ubs"  !  experience name 
    2121   nn_it000    =       1   !  first time step 
    22    !nn_itend    =    6120  ! here 17h of simulation  (=6120 time-step)  
    2322   nn_itend    =    5760   ! here 16h of simulation  (=5760 time-step) abort after 5802 for zps: pb of physics conditions 
    2423   nn_istate   =       0   !  output the initial state (1) or not (0) 
     
    7170&namdrg            !   top/bottom drag coefficient                      (default: NO selection) 
    7271!----------------------------------------------------------------------- 
    73    ln_OFF     = .true.     !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
     72   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    7473   ln_lin     = .false.    !      linear  drag: Cd = Cd0 Uc0                   &   namdrg_top) 
    7574   ln_non_lin = .false.    !  non-linear  drag: Cd = Cd0 |U| 
     
    8281!----------------------------------------------------------------------- 
    8382   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    84    !                             !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     83   !                             !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    8584   rn_a0       =  0.2         !  thermal expension coefficient (for simplified equation of state) 
    8685   rn_b0       =  0.          !  saline  expension coefficient (for simplified equation of state) 
  • NEMO/branches/2020/tickets_icb_1900/tests/OVERFLOW/EXPREF/namelist_zps_FCT4_flux_ubs_cfg

    r12489 r13899  
    105105!!                                                                    !! 
    106106!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    107 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    108 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     107!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     108!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    109109!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    110110!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    114114&namdrg        !   top/bottom drag coefficient                          (default: NO selection) 
    115115!----------------------------------------------------------------------- 
    116    ln_OFF    = .true.     !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
     116   ln_drg_OFF = .true.     !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    117117   ln_lin     = .false.    !      linear  drag: Cd = Cd0 Uc0                   &   namdrg_top) 
    118118   ln_non_lin = .false.    !  non-linear  drag: Cd = Cd0 |U| 
     
    136136!----------------------------------------------------------------------- 
    137137   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    138    !                             !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     138   !                             !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    139139   rn_a0       =  0.2         !  thermal expension coefficient (for simplified equation of state) 
    140140   rn_b0       =  0.          !  saline  expension coefficient (for simplified equation of state) 
     
    289289!!                                                                    !! 
    290290!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    291 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    292291!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    293292!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/OVERFLOW/EXPREF/namelist_zps_FCT4_vect_een_cfg

    r12489 r13899  
    2020   cn_exp      =   "OVF_zps_FCT4_vect_een"  !  experience name 
    2121   nn_it000    =       1   !  first time step 
    22    !nn_itend    =    6120  ! here 17h of simulation  (=6120 time-step)  
    2322   nn_itend    =    5760   ! here 16h of simulation  (=5760 time-step) abort after 5802 for zps: pb of physics conditions 
    2423   nn_istate   =       0   !  output the initial state (1) or not (0) 
     
    7170&namdrg            !   top/bottom drag coefficient                      (default: NO selection) 
    7271!----------------------------------------------------------------------- 
    73    ln_OFF     = .true.     !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
     72   ln_drg_OFF = .true.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    7473   ln_lin     = .false.    !      linear  drag: Cd = Cd0 Uc0                   &   namdrg_top) 
    7574   ln_non_lin = .false.    !  non-linear  drag: Cd = Cd0 |U| 
     
    8281!----------------------------------------------------------------------- 
    8382   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    84    !                             !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     83   !                             !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    8584   rn_a0       =  0.2         !  thermal expension coefficient (for simplified equation of state) 
    8685   rn_b0       =  0.          !  saline  expension coefficient (for simplified equation of state) 
  • NEMO/branches/2020/tickets_icb_1900/tests/OVERFLOW/MY_SRC/usrdef_hgr.F90

    r12740 r13899  
    1313   !!   usr_def_hgr    : initialize the horizontal mesh for OVERFLOW configuration 
    1414   !!---------------------------------------------------------------------- 
    15    USE dom_oce  ,  ONLY: nimpp, njmpp       ! ocean space and time domain 
     15   USE dom_oce 
    1616   USE par_oce         ! ocean space and time domain 
    1717   USE phycst          ! physical constants 
     
    7474      !                       !==  grid point position  ==!   (in kilometers) 
    7575      zfact = rn_dx * 1.e-3         ! conversion in km 
    76       DO_2D_11_11 
     76      DO_2D( 1, 1, 1, 1 ) 
    7777         !                       ! longitude 
    78          plamt(ji,jj) = zfact * (  - 0.5 + REAL( ji-1 + nimpp-1 , wp )  )   
    79          plamu(ji,jj) = zfact * (          REAL( ji-1 + nimpp-1 , wp )  ) 
     78         plamt(ji,jj) = zfact * (  - 0.5 + REAL( mig0_oldcmp(ji)-1 , wp )  )   
     79         plamu(ji,jj) = zfact * (          REAL( mig0_oldcmp(ji)-1 , wp )  ) 
    8080         plamv(ji,jj) = plamt(ji,jj) 
    8181         plamf(ji,jj) = plamu(ji,jj) 
    8282         !                       ! latitude 
    83          pphit(ji,jj) = zfact * (  - 0.5 + REAL( jj-1 + njmpp-1 , wp )  ) 
     83         pphit(ji,jj) = zfact * (  - 0.5 + REAL( mjg0_oldcmp(jj)-1 , wp )  ) 
    8484         pphiu(ji,jj) = pphit(ji,jj) 
    85          pphiv(ji,jj) = zfact * (          REAL( jj-1 + njmpp-1 , wp )  ) 
     85         pphiv(ji,jj) = zfact * (          REAL( mjg0_oldcmp(jj)-1 , wp )  ) 
    8686         pphif(ji,jj) = pphiv(ji,jj) 
    8787      END_2D 
  • NEMO/branches/2020/tickets_icb_1900/tests/OVERFLOW/MY_SRC/usrdef_nam.F90

    r12377 r13899  
    1414   !!   usr_def_hgr   : initialize the horizontal mesh  
    1515   !!---------------------------------------------------------------------- 
    16    USE dom_oce  , ONLY: nimpp , njmpp            ! i- & j-indices of the local domain 
    1716   USE dom_oce  , ONLY: ln_zco, ln_zps, ln_sco   ! flag of type of coordinate 
    1817   USE par_oce        ! ocean space and time domain 
     
    8685      WRITE(numout,*) '      vertical   resolution                    rn_dz  = ', rn_dz, ' meters' 
    8786      WRITE(numout,*) '      OVERFLOW domain = 200 km x 3 grid-points x 2000 m' 
    88       WRITE(numout,*) '         resulting global domain size :        jpiglo = ', kpi 
    89       WRITE(numout,*) '                                               jpjglo = ', kpj 
     87      WRITE(numout,*) '         resulting global domain size :        Ni0glo = ', kpi 
     88      WRITE(numout,*) '                                               Nj0glo = ', kpj 
    9089      WRITE(numout,*) '                                               jpkglo = ', kpk 
    9190      ! 
  • NEMO/branches/2020/tickets_icb_1900/tests/OVERFLOW/MY_SRC/usrdef_zgr.F90

    r12740 r13899  
    1515   !!--------------------------------------------------------------------- 
    1616   USE oce            ! ocean variables 
    17    USE dom_oce ,  ONLY: mi0, mi1, nimpp, njmpp   ! ocean space and time domain 
    18    USE dom_oce ,  ONLY: glamt                    ! ocean space and time domain 
     17   USE dom_oce ,  ONLY: mi0, mi1   ! ocean space and time domain 
     18   USE dom_oce ,  ONLY: glamt      ! ocean space and time domain 
    1919   USE usrdef_nam     ! User defined : namelist variables 
    2020   ! 
     
    184184            pe3vw(:,:,jk) = pe3w_1d (jk) 
    185185         END DO 
    186          DO_2D_11_11 
     186         DO_2D( 1, 1, 1, 1 ) 
    187187            ik = k_bot(ji,jj) 
    188188            pdepw(ji,jj,ik+1) = MIN( zht(ji,jj) , pdepw_1d(ik+1) ) 
  • NEMO/branches/2020/tickets_icb_1900/tests/STATION_ASF/EXPREF/launch_sasf.sh

    r13226 r13899  
    11#!/bin/bash 
    22 
    3 # NEMO directory where to fetch compiled STATION_ASF nemo.exe + setup: 
    4 NEMO_DIR=`pwd | sed -e "s|/tests/STATION_ASF/EXPREF||g"` 
     3################################################################ 
     4# 
     5# Script to launch a set of STATION_ASF simulations 
     6# 
     7# L. Brodeau, 2020 
     8# 
     9################################################################ 
    510 
    6 echo "Using NEMO_DIR=${NEMO_DIR}" 
    7  
    8 # what directory inside "tests" actually contains the compiled test-case? 
     11# What directory inside "tests" actually contains the compiled "nemo.exe" for STATION_ASF ? 
    912TC_DIR="STATION_ASF2" 
    1013 
    11 # => so the executable to use is: 
    12 NEMO_EXE="${NEMO_DIR}/tests/${TC_DIR}/BLD/bin/nemo.exe" 
     14expdir=`basename ${PWD}`; # we expect "EXPREF" or "EXP00" normally... 
    1315 
    14 # Directory where to run the simulation: 
    15 WORK_DIR="${HOME}/tmp/STATION_ASF" 
     16# NEMOGCM root directory: 
     17NEMO_ROOT_DIR=`pwd | sed -e "s|/tests/STATION_ASF/${expdir}||g"` 
    1618 
    17 # DATA_IN_DIR => Directory containing sea-surface + atmospheric forcings 
    18 #             (get it there https://drive.google.com/file/d/1MxNvjhRHmMrL54y6RX7WIaM9-LGl--ZP/): 
    19 if [ `hostname` = "merlat"        ]; then 
    20     DATA_IN_DIR="/MEDIA/data/STATION_ASF/input_data_STATION_ASF_2016-2018" 
    21 elif [ `hostname` = "luitel"        ]; then 
    22     DATA_IN_DIR="/data/gcm_setup/STATION_ASF/input_data_STATION_ASF_2016-2018" 
    23 elif [ `hostname` = "ige-meom-cal1" ]; then 
    24     DATA_IN_DIR="/mnt/meom/workdir/brodeau/STATION_ASF/input_data_STATION_ASF_2016-2018" 
    25 elif [ `hostname` = "salvelinus" ]; then 
    26     DATA_IN_DIR="/opt/data/STATION_ASF/input_data_STATION_ASF_2016-2018" 
    27 else 
    28     echo "Oops! We don't know `hostname` yet! Define 'DATA_IN_DIR' in the script!"; exit  
    29 fi 
    30  
    31  
    32 if [ ! -f ${NEMO_EXE} ]; then echo " Mhhh, no compiled nemo.exe found into ${NEMO_DIR}/tests/STATION_ASF/BLD/bin !"; exit; fi 
    33  
    34 # NEMOGCM root directory where to fetch compiled STATION_ASF nemo.exe + setup: 
    35 NEMO_WRK_DIR=`pwd | sed -e "s|/tests/STATION_ASF/${expdir}||g"` 
     19# NEMOGCM root directory where to fetch compiled STATION_ASF nemo.exe: 
     20SASF_WRK_DIR="${NEMO_ROOT_DIR}/tests/${TC_DIR}" 
    3621 
    3722# Directory where to run the simulation: 
     
    4328#================================================================================ 
    4429 
     30SASF_REF_DIR="${NEMO_ROOT_DIR}/tests/STATION_ASF" 
     31if [ ! -d ${SASF_REF_DIR} ]; then echo " Mhhh, no EXPREF directory ${SASF_REF_DIR} !"; exit; fi 
     32 
    4533# NEMO executable to use is: 
    46 NEMO_EXE="${NEMO_WRK_DIR}/tests/${TC_DIR}/BLD/bin/nemo.exe" 
     34NEMO_EXE="${SASF_WRK_DIR}/BLD/bin/nemo.exe" 
     35if [ ! -f ${NEMO_EXE} ]; then echo " Mhhh, no compiled 'nemo.exe' found into `dirname ${NEMO_EXE}` !"; exit; fi 
     36 
     37DATA_IN_DIR="${SASF_REF_DIR}/input_data" ; # Directory containing sea-surface + atmospheric input data 
     38if [ ! -d ${DATA_IN_DIR} ]; then echo "PROBLEM!!! => did not find directory 'input_data' with input forcing..."; exit; fi 
     39 
     40SASF_EXPREF=${SASF_REF_DIR}/${expdir}  ; # STATION_ASF EXPREF directory from which to use namelists and XIOS xml files... 
     41if [ ! -d ${SASF_EXPREF} ]; then echo " Mhhh, no ${expdir} directory ${SASF_EXPREF} !"; exit; fi 
    4742 
    4843 
     
    5146echo "###########################################################" 
    5247echo 
    53 echo " We shall work in here: ${STATION_ASF_DIR}/" 
    54 echo " NEMOGCM   work    depository is: ${NEMO_WRK_DIR}/" 
    55 echo "   ==> NEMO EXE to use: ${NEMO_EXE}" 
    56 echo " Input forcing data into: ${DATA_IN_DIR}/" 
    57 echo " Production will be done into: ${PROD_DIR}/" 
     48echo "  * NEMO reference root directory is: ${NEMO_ROOT_DIR}" 
     49echo "  * STATION_ASF work directory is: ${SASF_WRK_DIR}" 
     50echo "       ==> NEMO EXE to use: ${NEMO_EXE}" 
     51echo 
     52echo "  * Input forcing data into: ${DATA_IN_DIR}" 
     53echo "  * Production will be done into: ${PROD_DIR}" 
     54echo "  * Directory in which namelists and xml files are fetched:" 
     55echo "       ==> ${SASF_EXPREF}" 
    5856echo 
    5957 
    6058mkdir -p ${PROD_DIR} 
    6159 
    62 if [ ! -f ${NEMO_EXE} ]; then echo " Mhhh, no compiled 'nemo.exe' found into `dirname ${NEMO_EXE}` !"; exit; fi 
    63  
    64 echo 
    65 echo " *** Using the following NEMO executable:" 
    66 echo "  ${NEMO_EXE} " 
    67 echo 
    68  
    69 NEMO_EXPREF="${NEMO_WRK_DIR}/tests/STATION_ASF/EXPREF" 
    70 if [ ! -d ${NEMO_EXPREF} ]; then echo " Mhhh, no EXPREF directory ${NEMO_EXPREF} !"; exit; fi 
    71  
    7260rsync -avP ${NEMO_EXE}          ${PROD_DIR}/ 
    7361 
    7462for ff in "context_nemo.xml" "domain_def_nemo.xml" "field_def_nemo-oce.xml" "file_def_nemo-oce.xml" "grid_def_nemo.xml" "iodef.xml" "namelist_ref"; do 
    75     if [ ! -f ${NEMO_EXPREF}/${ff} ]; then echo " Mhhh, ${ff} not found into ${NEMO_EXPREF} !"; exit; fi 
    76     rsync -avPL ${NEMO_EXPREF}/${ff} ${PROD_DIR}/ 
     63    if [ ! -f ${SASF_EXPREF}/${ff} ]; then echo " Mhhh, ${ff} not found into ${SASF_EXPREF} !"; exit; fi 
     64    rsync -avPL ${SASF_EXPREF}/${ff} ${PROD_DIR}/ 
    7765done 
    7866 
     
    9179 
    9280    rm -f ${PROD_DIR}/namelist_cfg 
    93     rsync -avPL ${NEMO_EXPREF}/namelist_${scase}_cfg ${PROD_DIR}/namelist_cfg 
     81    rsync -avPL ${SASF_EXPREF}/namelist_${scase}_cfg ${PROD_DIR}/namelist_cfg 
    9482 
    9583    cd ${PROD_DIR}/ 
  • NEMO/branches/2020/tickets_icb_1900/tests/STATION_ASF/EXPREF/namelist_coare3p6-noskin_cfg

    r13108 r13899  
    201201!!                                                                    !! 
    202202!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    203 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    204 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     203!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     204!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    205205!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    206206!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    250250!!                                                                    !! 
    251251!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    252 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    253252!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    254253!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/STATION_ASF/EXPREF/namelist_coare3p6_cfg

    r13108 r13899  
    201201!!                                                                    !! 
    202202!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    203 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    204 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     203!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     204!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    205205!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    206206!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    250250!!                                                                    !! 
    251251!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    252 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    253252!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    254253!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/STATION_ASF/EXPREF/namelist_ecmwf-noskin_cfg

    r13108 r13899  
    201201!!                                                                    !! 
    202202!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    203 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    204 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     203!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     204!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    205205!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    206206!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    250250!!                                                                    !! 
    251251!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    252 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    253252!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    254253!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/STATION_ASF/EXPREF/namelist_ecmwf_cfg

    r13108 r13899  
    201201!!                                                                    !! 
    202202!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    203 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    204 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     203!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     204!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    205205!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    206206!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    250250!!                                                                    !! 
    251251!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    252 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    253252!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    254253!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/STATION_ASF/EXPREF/namelist_ncar_cfg

    r13108 r13899  
    201201!!                                                                    !! 
    202202!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    203 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    204 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     203!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     204!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    205205!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    206206!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    250250!!                                                                    !! 
    251251!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    252 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    253252!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    254253!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/STATION_ASF/EXPREF/plot_station_asf.py

    r12629 r13899  
    1 #!/usr/bin/env python 
     1#!/usr/bin/env python3 
    22# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- 
    33 
    4 # Post-diagnostic of STATION_ASF /  L. Brodeau, 2019 
     4# Post-diagnostic of STATION_ASF /  L. Brodeau, 2020 
    55 
    66import sys 
    77from os import path as path 
    8 #from string import replace 
    98import math 
    109import numpy as nmp 
    11 #import scipy.signal as signal 
    1210from netCDF4 import Dataset 
    1311import matplotlib as mpl 
     
    1513import matplotlib.pyplot as plt 
    1614import matplotlib.dates as mdates 
    17 #from string import find 
    18 #import warnings 
    19 #warnings.filterwarnings("ignore") 
    20 #import time 
    21  
    22 #import barakuda_plot as bp 
    23 #import barakuda_tool as bt 
    24  
    25 reload(sys) 
    26 sys.setdefaultencoding('utf8') 
    27  
    28 cy1     = '2016' ; # First year 
     15 
     16cy1     = '2018' ; # First year 
    2917cy2     = '2018' ; # Last year 
    30  
    31 jt0 = 0 
    32 jt0 = 17519 
    33  
    3418 
    3519dir_figs='.' 
     
    7256narg = len(sys.argv) 
    7357if narg != 2: 
    74     print 'Usage: '+sys.argv[0]+' <DIR_OUT_SASF>'; sys.exit(0) 
     58    print('Usage: '+sys.argv[0]+' <DIR_OUT_SASF>'); sys.exit(0) 
    7559cdir_data = sys.argv[1] 
    7660 
     
    8266def chck4f(cf): 
    8367    cmesg = 'ERROR: File '+cf+' does not exist !!!' 
    84     if not path.exists(cf): print cmesg ; sys.exit(0) 
     68    if not path.exists(cf): print(cmesg); sys.exit(0) 
    8569 
    8670###cf_in = nmp.empty((), dtype="S10") 
     
    10488# Getting time array from the first file: 
    10589id_in = Dataset(cf_in[0]) 
    106 vt = id_in.variables['time_counter'][jt0:] 
     90vt = id_in.variables['time_counter'][:] 
    10791cunit_t = id_in.variables['time_counter'].units ; print(' "time_counter" is in "'+cunit_t+'"') 
    10892id_in.close() 
     
    138122            if ctest == 'skin':   id_in = Dataset(cf_in[ja]) 
    139123            if ctest == 'noskin': id_in = Dataset(cf_in_ns[ja]) 
    140             xF[:,ja] = id_in.variables[L_VNEM[jv]][jt0:,1,1] # only the center point of the 3x3 spatial domain! 
     124            xF[:,ja] = id_in.variables[L_VNEM[jv]][:,1,1] # only the center point of the 3x3 spatial domain! 
    141125            if ja == 0: cvar_lnm = id_in.variables[L_VNEM[jv]].long_name 
    142126            id_in.close() 
     
    180164                rmlt = 10.**(int(romagn)) / 2. 
    181165                yrng = math.copysign( math.ceil(abs(rmax)/rmlt)*rmlt , rmax) 
    182                 #print 'yrng = ', yrng ;  #sys.exit(0) 
    183166 
    184167                fig = plt.figure(num = 10+jv, figsize=size_fig, facecolor='w', edgecolor='k') 
     
    211194    for ja in range(nb_algos-1): 
    212195        id_in = Dataset(cf_in[ja]) 
    213         xF[:,ja]   = id_in.variables[L_VNEM[jv]][jt0:,1,1] # only the center point of the 3x3 spatial domain! 
     196        xF[:,ja]   = id_in.variables[L_VNEM[jv]][:,1,1] # only the center point of the 3x3 spatial domain! 
    214197        if ja == 0: cvar_lnm = id_in.variables[L_VNEM[jv]].long_name 
    215198        id_in.close() 
    216199        # 
    217200        id_in = Dataset(cf_in_ns[ja]) 
    218         xFns[:,ja] = id_in.variables[L_VNEM[jv]][jt0:,1,1] # only the center point of the 3x3 spatial domain! 
     201        xFns[:,ja] = id_in.variables[L_VNEM[jv]][:,1,1] # only the center point of the 3x3 spatial domain! 
    219202        if ja == 0: cvar_lnm = id_in.variables[L_VNEM[jv]].long_name 
    220203        id_in.close() 
     
    229212    rmlt = 10.**(int(romagn)) / 2. 
    230213    yrng = math.copysign( math.ceil(abs(rmax)/rmlt)*rmlt , rmax) 
    231     print 'yrng = ', yrng ;  #sys.exit(0) 
    232  
    233  
    234  
    235  
     214 
     215     
    236216    for ja in range(nb_algos-1): 
    237217 
  • NEMO/branches/2020/tickets_icb_1900/tests/STATION_ASF/MY_SRC/nemogcm.F90

    r13011 r13899  
    3030   USE step_c1d       ! Time stepping loop for the 1D configuration 
    3131   ! 
     32   USE prtctl         ! Print control 
    3233   USE in_out_manager ! I/O manager 
    3334   USE lib_mpp        ! distributed memory computing 
     
    131132      INTEGER ::   ios, ilocal_comm   ! local integers 
    132133      !! 
    133       NAMELIST/namctl/ sn_cfctl,  nn_print, nn_ictls, nn_ictle,             & 
    134          &             nn_isplt , nn_jsplt, nn_jctls, nn_jctle,             & 
    135          &             ln_timing, ln_diacfl 
     134      NAMELIST/namctl/ sn_cfctl, ln_timing, ln_diacfl,                                & 
     135         &             nn_isplt,  nn_jsplt,  nn_ictls, nn_ictle, nn_jctls, nn_jctle 
    136136      NAMELIST/namcfg/ ln_read_cfg, cn_domcfg, ln_closea, ln_write_cfg, cn_domcfg_out, ln_use_jattr 
    137137      !!---------------------------------------------------------------------- 
     
    232232      ! 
    233233      IF( ln_read_cfg ) THEN            ! Read sizes in domain configuration file 
    234          CALL domain_cfg ( cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 
     234         CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio ) 
    235235      ELSE                              ! user-defined namelist 
    236          CALL usr_def_nam( cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 
     236         CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio ) 
    237237      ENDIF 
    238238      ! 
     
    306306         WRITE(numout,*) '                              sn_cfctl%procincr  = ', sn_cfctl%procincr  
    307307         WRITE(numout,*) '                              sn_cfctl%ptimincr  = ', sn_cfctl%ptimincr  
    308          WRITE(numout,*) '      level of print                  nn_print   = ', nn_print 
    309          WRITE(numout,*) '      Start i indice for SUM control  nn_ictls   = ', nn_ictls 
    310          WRITE(numout,*) '      End i indice for SUM control    nn_ictle   = ', nn_ictle 
    311          WRITE(numout,*) '      Start j indice for SUM control  nn_jctls   = ', nn_jctls 
    312          WRITE(numout,*) '      End j indice for SUM control    nn_jctle   = ', nn_jctle 
    313          WRITE(numout,*) '      number of proc. following i     nn_isplt   = ', nn_isplt 
    314          WRITE(numout,*) '      number of proc. following j     nn_jsplt   = ', nn_jsplt 
    315308         WRITE(numout,*) '      timing by routine               ln_timing  = ', ln_timing 
    316309         WRITE(numout,*) '      CFL diagnostics                 ln_diacfl  = ', ln_diacfl 
    317310      ENDIF 
    318311      ! 
    319       nprint    = nn_print          ! convert DOCTOR namelist names into OLD names 
    320       nictls    = nn_ictls 
    321       nictle    = nn_ictle 
    322       njctls    = nn_jctls 
    323       njctle    = nn_jctle 
    324       isplt     = nn_isplt 
    325       jsplt     = nn_jsplt 
    326  
     312      IF( .NOT.ln_read_cfg )   ln_closea = .false.   ! dealing possible only with a domcfg file 
    327313      IF(lwp) THEN                  ! control print 
    328314         WRITE(numout,*) 
     
    335321         WRITE(numout,*) '      use file attribute if exists as i/p j-start   ln_use_jattr     = ', ln_use_jattr 
    336322      ENDIF 
    337       IF( .NOT.ln_read_cfg )   ln_closea = .false.   ! dealing possible only with a domcfg file 
    338       ! 
    339       !                             ! Parameter control 
    340       ! 
    341       IF( sn_cfctl%l_prtctl .OR. sn_cfctl%l_prttrc ) THEN              ! sub-domain area indices for the control prints 
    342          IF( lk_mpp .AND. jpnij > 1 ) THEN 
    343             isplt = jpni   ;   jsplt = jpnj   ;   ijsplt = jpni*jpnj   ! the domain is forced to the real split domain 
    344          ELSE 
    345             IF( isplt == 1 .AND. jsplt == 1  ) THEN 
    346                CALL ctl_warn( ' - isplt & jsplt are equal to 1',   & 
    347                   &           ' - the print control will be done over the whole domain' ) 
    348             ENDIF 
    349             ijsplt = isplt * jsplt            ! total number of processors ijsplt 
    350          ENDIF 
    351          IF(lwp) WRITE(numout,*)'          - The total number of processors over which the' 
    352          IF(lwp) WRITE(numout,*)'            print control will be done is ijsplt : ', ijsplt 
    353          ! 
    354          !                              ! indices used for the SUM control 
    355          IF( nictls+nictle+njctls+njctle == 0 )   THEN    ! print control done over the default area 
    356             lsp_area = .FALSE. 
    357          ELSE                                             ! print control done over a specific  area 
    358             lsp_area = .TRUE. 
    359             IF( nictls < 1 .OR. nictls > jpiglo )   THEN 
    360                CALL ctl_warn( '          - nictls must be 1<=nictls>=jpiglo, it is forced to 1' ) 
    361                nictls = 1 
    362             ENDIF 
    363             IF( nictle < 1 .OR. nictle > jpiglo )   THEN 
    364                CALL ctl_warn( '          - nictle must be 1<=nictle>=jpiglo, it is forced to jpiglo' ) 
    365                nictle = jpiglo 
    366             ENDIF 
    367             IF( njctls < 1 .OR. njctls > jpjglo )   THEN 
    368                CALL ctl_warn( '          - njctls must be 1<=njctls>=jpjglo, it is forced to 1' ) 
    369                njctls = 1 
    370             ENDIF 
    371             IF( njctle < 1 .OR. njctle > jpjglo )   THEN 
    372                CALL ctl_warn( '          - njctle must be 1<=njctle>=jpjglo, it is forced to jpjglo' ) 
    373                njctle = jpjglo 
    374             ENDIF 
    375          ENDIF 
    376       ENDIF 
    377323      ! 
    378324      IF( 1._wp /= SIGN(1._wp,-0._wp)  )   CALL ctl_stop( 'nemo_ctl: The intrinsec SIGN function follows f2003 standard.',  & 
  • NEMO/branches/2020/tickets_icb_1900/tests/STATION_ASF/MY_SRC/stpctl.F90

    r13136 r13899  
    4747      !! 
    4848      !! ** Method  : - Save the time step in numstp 
    49       !!              - Print it each 50 time steps 
    5049      !!              - Stop the run IF problem encountered by setting nstop > 0 
    5150      !!                Problems checked: wind stress module  max larger than 5 N/m^2 
     
    6665      REAL(wp)                        ::   zzz                                   ! local real  
    6766      REAL(wp), DIMENSION(4)          ::   zmax, zmaxlocal 
    68       LOGICAL                         ::   ll_wrtstp, ll_colruns, ll_wrtruns 
     67      LOGICAL                         ::   ll_wrtstp, ll_colruns, ll_wrtruns, ll_0oce 
    6968      LOGICAL, DIMENSION(jpi,jpj)     ::   llmsk 
    7069      CHARACTER(len=20)               ::   clname 
     
    110109      !                                   !==            test of local extrema           ==! 
    111110      !                                   !==  done by all processes at every time step  ==! 
    112       llmsk(:,:) = tmask(:,:,1) == 1._wp 
    113       IF( COUNT( llmsk(:,:) ) > 0 ) THEN   ! avoid huge values sent back for land processors... 
    114          zmax(1) = MAXVAL(     taum(:,:)   , mask = llmsk )   ! max wind stress module 
    115          zmax(2) = MAXVAL( ABS( qns(:,:) ) , mask = llmsk )   ! max non-solar heat flux 
    116          zmax(3) = MAXVAL( ABS( emp(:,:) ) , mask = llmsk )   ! max E-P 
    117       ELSE 
    118          IF( ll_colruns ) THEN    ! default value: must not be kept when calling mpp_max -> must be as small as possible 
    119             zmax(1:3) = -HUGE(1._wp) 
    120          ELSE                     ! default value: must not give true for any of the tests bellow (-> avoid manipulating HUGE...) 
    121             zmax(1:3) = 0._wp 
    122          ENDIF 
    123       ENDIF 
    124       zmax(4) = REAL( nstop, wp )                                     ! stop indicator 
     111      ! 
     112      llmsk(   1:Nis1,:) = .FALSE.                                              ! exclude halos from the checked region 
     113      llmsk(Nie1: jpi,:) = .FALSE. 
     114      llmsk(:,   1:Njs1) = .FALSE. 
     115      llmsk(:,Nje1: jpj) = .FALSE. 
     116      ! 
     117      llmsk(Nis0:Nie0,Njs0:Nje0) = tmask(Nis0:Nie0,Njs0:Nje0,1) == 1._wp        ! test only the inner domain 
     118      ! 
     119      ll_0oce = .NOT. ANY( llmsk(:,:) )                                         ! no ocean point in the inner domain? 
     120      ! 
     121      zmax(1) = MAXVAL(     taum(:,:)  , mask = llmsk )                         ! max wind stress module 
     122      zmax(2) = MAXVAL( ABS( qns(:,:) ), mask = llmsk )                         ! max non-solar heat flux 
     123      zmax(3) = MAXVAL( ABS( emp(:,:) ), mask = llmsk )                         ! max E-P 
     124      zmax(4) = REAL( nstop, wp )                                               ! stop indicator 
     125      ! 
    125126      !                                   !==               get global extrema             ==! 
    126127      !                                   !==  done by all processes if writting run.stat  ==! 
     
    129130         CALL mpp_max( "stpctl", zmax )          ! max over the global domain 
    130131         nstop = NINT( zmax(4) )                 ! update nstop indicator (now sheared among all local domains) 
    131       ENDIF 
     132      ELSE 
     133         ! if no ocean point: MAXVAL returns -HUGE => we must overwrite this value to avoid error handling bellow. 
     134         IF( ll_0oce )   zmax(1:3) = 0._wp       ! default "valid" values... 
     135      ENDIF 
     136      !                                   !==               error handling               ==! 
    132137      !                                   !==              write "run.stat" files              ==! 
    133138      !                                   !==  done only by 1st subdomain at writting timestep  ==! 
    134139      IF( ll_wrtruns ) THEN 
    135140         WRITE(numrun,9500) kt, zmax(1), zmax(2), zmax(3) 
    136          istatus = NF90_PUT_VAR( nrunid, nvarid(1), (/ zmax(1)/), (/kt/), (/1/) ) 
    137          istatus = NF90_PUT_VAR( nrunid, nvarid(2), (/ zmax(2)/), (/kt/), (/1/) ) 
    138          istatus = NF90_PUT_VAR( nrunid, nvarid(3), (/ zmax(3)/), (/kt/), (/1/) ) 
     141         DO ji = 1, 3 
     142            istatus = NF90_PUT_VAR( nrunid, nvarid(ji), (/zmax(ji)/), (/kt/), (/1/) ) 
     143         END DO 
    139144         IF( kt == nitend ) istatus = NF90_CLOSE(nrunid) 
    140145      END IF 
     
    153158            IF( lwm .AND. kt /= nitend )   istatus = NF90_CLOSE(nrunid) 
    154159            ! get global loc on the min/max 
    155             CALL mpp_maxloc( 'stpctl',    taum(:,:)  , tmask(:,:,1), zzz, iloc(1:2,1) )   ! mpp_maxloc ok if mask = F  
    156             CALL mpp_maxloc( 'stpctl',ABS( qns(:,:) ), tmask(:,:,1), zzz, iloc(1:2,2) ) 
    157             CALL mpp_minloc( 'stpctl',ABS( emp(:,:) ), tmask(:,:,1), zzz, iloc(1:2,3) ) 
     160            CALL mpp_maxloc( 'stpctl',    taum(:,:)  , llmsk, zzz, iloc(1:2,1) )   ! mpp_maxloc ok if mask = F  
     161            CALL mpp_maxloc( 'stpctl',ABS( qns(:,:) ), llmsk, zzz, iloc(1:2,2) ) 
     162            CALL mpp_minloc( 'stpctl',ABS( emp(:,:) ), llmsk, zzz, iloc(1:2,3) ) 
    158163            ! find which subdomain has the max. 
    159164            iareamin(:) = jpnij+1   ;   iareamax(:) = 0   ;   iareasum(:) = 0 
     
    168173         ELSE                    ! find local min and max locations: 
    169174            ! if we are here, this means that the subdomain contains some oce points -> no need to test the mask used in maxloc 
    170             iloc(1:2,1) = MAXLOC(     taum(:,:)  , mask = llmsk ) + (/ nimpp - 1, njmpp - 1/) 
    171             iloc(1:2,2) = MAXLOC( ABS( qns(:,:) ), mask = llmsk ) + (/ nimpp - 1, njmpp - 1/) 
    172             iloc(1:2,3) = MINLOC( ABS( emp(:,:) ), mask = llmsk ) + (/ nimpp - 1, njmpp - 1/) 
     175            iloc(1:2,1) = MAXLOC(     taum(:,:)  , mask = llmsk ) 
     176            iloc(1:2,2) = MAXLOC( ABS( qns(:,:) ), mask = llmsk ) 
     177            iloc(1:2,3) = MINLOC( ABS( emp(:,:) ), mask = llmsk ) 
     178            DO ji = 1, 3   ! local domain indices ==> global domain indices, excluding halos 
     179               iloc(1:2,ji) = (/ mig0(iloc(1,ji)), mjg0(iloc(2,ji)) /) 
     180            END DO 
    173181            iareamin(:) = narea   ;   iareamax(:) = narea   ;   iareasum(:) = 1         ! this is local information 
    174182         ENDIF 
  • NEMO/branches/2020/tickets_icb_1900/tests/STATION_ASF/MY_SRC/usrdef_hgr.F90

    r12629 r13899  
    1414   !!   usr_def_hgr   : initialize the horizontal mesh  
    1515   !!---------------------------------------------------------------------- 
    16    USE dom_oce  , ONLY: nimpp, njmpp       ! ocean space and time domain 
    1716   USE c1d      ,  ONLY: rn_lon1d, rn_lat1d ! ocean lon/lat define by namelist 
    1817   USE par_oce        ! ocean space and time domain 
  • NEMO/branches/2020/tickets_icb_1900/tests/STATION_ASF/MY_SRC/usrdef_nam.F90

    r12629 r13899  
    1515   !!   usr_def_hgr   : initialize the horizontal mesh  
    1616   !!---------------------------------------------------------------------- 
    17    USE dom_oce  , ONLY: nimpp, njmpp       ! ocean space and time domain 
    18 !!!   USE dom_oce  , ONLY: ln_zco, ln_zps, ln_sco   ! flag of type of coordinate 
    1917   USE par_oce        ! ocean space and time domain 
    2018   USE phycst         ! physical constants 
  • NEMO/branches/2020/tickets_icb_1900/tests/STATION_ASF/README.md

    r13132 r13899  
     1# *Station Air-Sea Fluxes* demonstration case 
    12 
    2 ## WARNING: TOTALLY-ALPHA-STUFF / DOCUMENT IN THE PROCESS OF BEING WRITEN! 
     3Last successful test done with NEMOGCM trunk: `r13263` 
     4 
     5Author: Laurent Brodeau, 2020 
    36 
    47NOTE: if working with the trunk of NEMO, you are strongly advised to use the same test-case but on the `NEMO-examples` GitHub depo: 
    58https://github.com/NEMO-ocean/NEMO-examples/tree/master/STATION_ASF 
    69 
    7  
    8 # *Station Air-Sea Fluxes* demonstration case 
    9  
    1010## Objectives 
    1111 
    12 ```STATION_ASF``` is a demonstration case that mimics an in-situ station (buoy, platform) dedicated to the estimation of surface air-sea fluxes by means of the measurement of traditional meteorological surface parameters. 
     12```STATION_ASF``` is a demonstration test-case that mimics a (static) in-situ station (buoy, platform) dedicated to the estimation of surface air-sea fluxes by means of *widely-measured* (bulk) meteorological surface parameters. 
    1313 
    14 ```STATION_ASF``` is based on the merging of the "single column" and the "standalone surface module" configurations of NEMO. In short, it coulb defined as "SAS meets C1D". As such, the spatial domain of ```STATION_ASF``` is punctual (1D, well actually 3 x 3 as in C1D). 
     14```STATION_ASF``` has been constructed by merging the *single column* and the *standalone surface module* configurations of NEMO. In short, it can be defined as "SAS meets C1D". As such, the spatial domain of ```STATION_ASF``` is punctual (1D, well actually 3 x 3 as in C1D). 
    1515 
    16 ```STATION_ASF``` is therefore a versatile tool, and extremely light in terms of computing requirements, to test the different bulk algorithms and cool-skin/warm-layer parameterization options included in NEMO. 
     16```STATION_ASF``` is therefore a versatile tool, and extremely lightweight in terms of computing requirements, to test the different bulk algorithms and cool-skin/warm-layer parameterization options included in NEMO. 
    1717 
    1818As input ```STATION_ASF``` will require the traditional *bulk* sea surface parameters: 
    1919 
    20 - sea surface temperature (SST) at $z_{SST}$ meters below the surface 
     20- Bulk sea surface temperature (SST) at _z<sub>SST</sub>_ meters below the surface 
    2121- Surface current vector 
    2222- Sea surface salinity 
     
    2424as well as the usual surface atmospheric state: 
    2525 
    26 - air temperature at $z_t$ meters above the surface 
    27 - air humidity  at $z_t$ meters above the surface (specific humidity or relative humidity or dew-point temperature) 
    28 - wind speed vector at $z_u$ meters above the surface 
     26- air temperature at _z<sub>t</sub>_ meters above the surface 
     27- air humidity  at _z<sub>t</sub>_ meters above the surface (specific humidity or relative humidity or dew-point temperature) 
     28- wind speed vector at _z<sub>u</sub>_ meters above the surface 
    2929- Sea level atmospheric pressure (SLP) 
    3030- Downwelling solar radiation 
    3131- Downwelling longwave radiation 
    3232 
     33### Example of diagnostics from `STATION_ASF` 
     34 
     35(Generated with script `./EXPREF/plot_station_asf_simple.py`) 
     36 
     37![plot](https://github.com/NEMO-ocean/NEMO-examples/blob/master/STATION_ASF/figs/01_temperatures_ECMWF.svg) 
     38 
     39![plot](https://github.com/NEMO-ocean/NEMO-examples/blob/master/STATION_ASF/figs/Cd.svg) 
     40 
     41![plot](https://github.com/NEMO-ocean/NEMO-examples/blob/master/STATION_ASF/figs/dT_skin.svg) 
     42 
     43![plot](https://github.com/NEMO-ocean/NEMO-examples/blob/master/STATION_ASF/figs/Qlat.svg) 
    3344 
    3445 
    3546## Physical description 
    3647 
    37 ### Important namelist parameters speficic to STATION_ASF 
     48### Important namelist parameters specific to STATION_ASF 
    3849 
    39 * ```rn_dept1@namusr_def:``` depth (m) at which the prescribed SST is taken (i.e. depth of first T-point); important due to impact on warm-layer estimate, the deeper, the more pronounced! 
     50* ```rn_dept1@namusr_def:``` depth (m) at which the prescribed SST is taken (*i.e.* depth of first T-point); important due to impact on warm-layer estimate, the deeper, the more pronounced! 
    4051 
    4152* ```rn_lat1d,rn_lon1d@namc1d:``` fixed coordinates of the location of the station (buoy, platform, etc). 
     
    4960## Input files to test STATION ASF 
    5061 
    51 Three full years of processed hourly data from the PAPA station (buoy) can be downloaded here: 
    52 https://drive.google.com/file/d/1MxNvjhRHmMrL54y6RX7WIaM9-LGl--ZP/ 
     62One full year (2018) of processed hourly data from the PAPA station (buoy) is found into the `input_data` directory. 
     63These three files are everything you need to play with the set of *namelists* provided for this test-case. 
    5364 
    54 These three files are everything you need to play with the set of namelists provided for this test-case. 
    55  
    56 - ```Station_PAPA_50N-145W_atm_hourly.nc```  → contains hourly surface atmospheric state 
    57 - ```Station_PAPA_50N-145W_precip_daily.nc``` → contains daily precipitation 
    58 - ```Station_PAPA_50N-145W_oce_hourly.nc``` → contains hourly sea surface state 
     65- ```Station_PAPA_50N-145W_atm_hourly_y2018.nc```  → contains hourly surface atmospheric state 
     66- ```Station_PAPA_50N-145W_precip_daily_y2018.nc``` → contains daily precipitation 
     67- ```Station_PAPA_50N-145W_oce_hourly_y2018.nc``` → contains hourly sea surface state 
    5968 
    6069For station PAPA (50.1 N, 144.9 W), air temperature and humidity are measured at 2.5 m, the wind speed at 4 m, and the SST at 1 m below the surface, hence the following namelist parameters are given: 
    6170 
    62 - ```rn_dept1 =    1.  ``` (&namusr_def) 
    63 - ```rn_lat1d =  50.1 ``` (&namc1d) 
    64 - ```rn_lon1d = 215.1``` (&namc1d) 
    65 - ```rn_zqt   =   2.5``` (&namsbc_blk) 
    66 - ```rn_zu    =    4.``` (&namsbc_blk) 
     71- `&namusr_def` 
     72  - ```rn_dept1 =    1.  ``` 
     73- `&namc1d` 
     74  - ```rn_lat1d =  50.1 ``` 
     75  - ```rn_lon1d = 215.1``` 
     76- `&namsbc_blk` 
     77  - ```rn_zqt   =   2.5``` 
     78  - ```rn_zu    =    4.``` 
    6779 
    6880 
     
    7284First compile the test-case as follows (compile with xios-2.5 support → check your ARCH file): 
    7385 
    74 ```./makenemo -m <your_arch> -n STATION_ASF -j 4 -a STATION_ASF``` 
     86```./makenemo -a STATION_ASF -m <your_arch> -n STATION_ASF2 -j 4``` 
    7587 
    7688Then you can use the script ``launch_sasf.sh`` found in  ```EXPREF/``` to launch 3 simulations (one for each bulk parameterization available). You need to adapt the following variable to your environment in the script: 
    7789 
    78 - ```NEMO_DIR``` : NEMO root directory where to fetch compiled STATION_ASF ```nemo.exe``` + setup (such as ```${NEMO_DIR}/tests/STATION_ASF```) 
     90- ```NEMO_ROOT_DIR``` : NEMO root directory where to fetch compiled STATION_ASF ```nemo.exe``` + setup (such as ```${NEMO_ROOT_DIR}/tests/STATION_ASF```) 
    7991 
    80 - ```WORK_DIR``` :  Directory where to run the simulation 
     92- ```PROD_DIR``` :  Directory where to run the simulation 
    8193 
    82 - ```FORC_DIR```  Directory containing sea-surface + atmospheric forcings (get it there https://drive.google.com/file/d/1MxNvjhRHmMrL54y6RX7WIaM9-LGl--ZP/) 
     94- ```DATA_IN_DIR``` : Directory containing sea-surface + atmospheric forcings (found here in ```input_data/```) 
    8395 
     96If everything goes according to plan, ``launch_sasf.sh`` should have generated the 3 following sets of output files into `${PROD_DIR}/output`: 
     97 
     98    STATION_ASF-COARE3p6_1h_20180101_20181231_gridT.nc 
     99    STATION_ASF-COARE3p6_1h_20180101_20181231_gridU.nc  
     100    STATION_ASF-COARE3p6_1h_20180101_20181231_gridV.nc  
     101    STATION_ASF-ECMWF_1h_20180101_20181231_gridT.nc  
     102    STATION_ASF-ECMWF_1h_20180101_20181231_gridU.nc  
     103    STATION_ASF-ECMWF_1h_20180101_20181231_gridV.nc  
     104    STATION_ASF-NCAR_1h_20180101_20181231_gridT.nc  
     105    STATION_ASF-NCAR_1h_20180101_20181231_gridU.nc  
     106    STATION_ASF-NCAR_1h_20180101_20181231_gridV.nc 
     107 
     108--- 
     109 
     110*/Laurent, July 2020.* 
     111 
  • NEMO/branches/2020/tickets_icb_1900/tests/VORTEX/EXPREF/1_context_nemo.xml

    r12276 r13899  
    1111       <variable id="ref_month" type="int"> 01 </variable> 
    1212       <variable id="ref_day"   type="int"> 01 </variable> 
    13        <variable id="rau0"      type="float" > 1026.0 </variable> 
     13       <variable id="rho0"      type="float" > 1026.0 </variable> 
    1414       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
    1515       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
  • NEMO/branches/2020/tickets_icb_1900/tests/VORTEX/EXPREF/1_namelist_cfg

    r13216 r13899  
    105105!!                                                                    !! 
    106106!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    107 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    108 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     107!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     108!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    109109!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    110110!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    114114&namdrg        !   top/bottom drag coefficient                          (default: NO selection) 
    115115!----------------------------------------------------------------------- 
    116    ln_OFF     = .true.    !  free-slip       : Cd = 0 
     116   ln_drg_OFF = .true.     !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    117117/ 
    118118!!====================================================================== 
     
    131131!----------------------------------------------------------------------- 
    132132   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    133       !                            !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     133      !                            !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    134134      rn_a0       =  0.28        !  thermal expension coefficient (for simplified equation of state) 
    135135      rn_b0       =  0.          !  saline  expension coefficient (for simplified equation of state) 
     
    266266!!                                                                    !! 
    267267!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    268 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    269268!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    270269!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/VORTEX/EXPREF/context_nemo.xml

    r12276 r13899  
    1111       <variable id="ref_month" type="int"> 01 </variable> 
    1212       <variable id="ref_day"   type="int"> 01 </variable> 
    13        <variable id="rau0"      type="float" > 1026.0 </variable> 
     13       <variable id="rho0"      type="float" > 1026.0 </variable> 
    1414       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
    1515       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
  • NEMO/branches/2020/tickets_icb_1900/tests/VORTEX/EXPREF/namelist_cfg

    r12489 r13899  
    9999!!                                                                    !! 
    100100!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    101 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    102 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     101!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     102!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    103103!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    104104!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    108108&namdrg        !   top/bottom drag coefficient                          (default: NO selection) 
    109109!----------------------------------------------------------------------- 
    110    ln_OFF     = .true.    !  free-slip       : Cd = 0 
     110   ln_drg_OFF  = .true.   !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
    111111/ 
    112112!!====================================================================== 
     
    125125!----------------------------------------------------------------------- 
    126126   ln_seos     = .true.         !  = Use simplified equation of state (S-EOS) 
    127    !                            !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     127   !                            !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    128128   rn_a0       =  0.28        !  thermal expension coefficient (for simplified equation of state) 
    129129   rn_b0       =  0.          !  saline  expension coefficient (for simplified equation of state) 
     
    259259!!                                                                    !! 
    260260!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    261 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    262261!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    263262!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/VORTEX/MY_SRC/domvvl.F90

    r12740 r13899  
    99   !!            3.6  !  2014-11  (P. Mathiot) add ice shelf capability 
    1010   !!            4.1  !  2019-08  (A. Coward, D. Storkey) rename dom_vvl_sf_swp -> dom_vvl_sf_update for new timestepping 
     11   !!            4.x  ! 2020-02  (G. Madec, S. Techene) introduce ssh to h0 ratio 
    1112   !!---------------------------------------------------------------------- 
    1213 
    13    !!---------------------------------------------------------------------- 
    14    !!   dom_vvl_init     : define initial vertical scale factors, depths and column thickness 
    15    !!   dom_vvl_sf_nxt   : Compute next vertical scale factors 
    16    !!   dom_vvl_sf_update   : Swap vertical scale factors and update the vertical grid 
    17    !!   dom_vvl_interpol : Interpolate vertical scale factors from one grid point to another 
    18    !!   dom_vvl_rst      : read/write restart file 
    19    !!   dom_vvl_ctl      : Check the vvl options 
    20    !!---------------------------------------------------------------------- 
    2114   USE oce             ! ocean dynamics and tracers 
    2215   USE phycst          ! physical constant 
     
    3629   PRIVATE 
    3730 
    38    PUBLIC  dom_vvl_init       ! called by domain.F90 
    39    PUBLIC  dom_vvl_zgr        ! called by isfcpl.F90 
    40    PUBLIC  dom_vvl_sf_nxt     ! called by step.F90 
    41    PUBLIC  dom_vvl_sf_update  ! called by step.F90 
    42    PUBLIC  dom_vvl_interpol   ! called by dynnxt.F90 
    43  
    4431   !                                                      !!* Namelist nam_vvl 
    4532   LOGICAL , PUBLIC :: ln_vvl_zstar           = .FALSE.    ! zstar  vertical coordinate 
     
    6350   REAL(wp)        , ALLOCATABLE, SAVE, DIMENSION(:,:)   :: frq_rst_hdv                 ! retoring period for low freq. divergence 
    6451 
     52#if defined key_qco 
     53   !!---------------------------------------------------------------------- 
     54   !!   'key_qco'      EMPTY MODULE      Quasi-Eulerian vertical coordonate 
     55   !!---------------------------------------------------------------------- 
     56#else 
     57   !!---------------------------------------------------------------------- 
     58   !!   Default key      Old management of time varying vertical coordinate 
     59   !!---------------------------------------------------------------------- 
     60    
     61   !!---------------------------------------------------------------------- 
     62   !!   dom_vvl_init     : define initial vertical scale factors, depths and column thickness 
     63   !!   dom_vvl_sf_nxt   : Compute next vertical scale factors 
     64   !!   dom_vvl_sf_update   : Swap vertical scale factors and update the vertical grid 
     65   !!   dom_vvl_interpol : Interpolate vertical scale factors from one grid point to another 
     66   !!   dom_vvl_rst      : read/write restart file 
     67   !!   dom_vvl_ctl      : Check the vvl options 
     68   !!---------------------------------------------------------------------- 
     69 
     70   PUBLIC  dom_vvl_init       ! called by domain.F90 
     71   PUBLIC  dom_vvl_zgr        ! called by isfcpl.F90 
     72   PUBLIC  dom_vvl_sf_nxt     ! called by step.F90 
     73   PUBLIC  dom_vvl_sf_update  ! called by step.F90 
     74   PUBLIC  dom_vvl_interpol   ! called by dynnxt.F90 
     75    
    6576   !! * Substitutions 
    6677#  include "do_loop_substitute.h90" 
     
    135146      ! 
    136147   END SUBROUTINE dom_vvl_init 
    137    ! 
     148 
     149 
    138150   SUBROUTINE dom_vvl_zgr(Kbb, Kmm, Kaa) 
    139151      !!---------------------------------------------------------------------- 
     
    190202      gdept(:,:,1,Kbb) = 0.5_wp * e3w(:,:,1,Kbb) 
    191203      gdepw(:,:,1,Kbb) = 0.0_wp 
    192       DO_3D_11_11( 2, jpk ) 
     204      DO_3D( 1, 1, 1, 1, 2, jpk ) 
    193205         !    zcoef = tmask - wmask    ! 0 everywhere tmask = wmask, ie everywhere expect at jk = mikt 
    194206         !                             ! 1 everywhere from mbkt to mikt + 1 or 1 (if no isf) 
     
    238250         ENDIF 
    239251         IF ( ln_vvl_zstar_at_eqtor ) THEN   ! use z-star in vicinity of the Equator 
    240             DO_2D_11_11 
     252            DO_2D( 1, 1, 1, 1 ) 
    241253!!gm  case |gphi| >= 6 degrees is useless   initialized just above by default 
    242254               IF( ABS(gphit(ji,jj)) >= 6.) THEN 
     
    261273            IF( cn_cfg == "orca" .OR. cn_cfg == "ORCA" ) THEN 
    262274               IF( nn_cfg == 3 ) THEN   ! ORCA2: Suppress ztilde in the Foxe Basin for ORCA2 
    263                   ii0 = 103   ;   ii1 = 111        
    264                   ij0 = 128   ;   ij1 = 135   ;    
     275                  ii0 = 103 + nn_hls - 1   ;   ii1 = 111 + nn_hls - 1       
     276                  ij0 = 128 + nn_hls       ;   ij1 = 135 + nn_hls 
    265277                  frq_rst_e3t( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) =  0.0_wp 
    266278                  frq_rst_hdv( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) =  1.e0_wp / rn_Dt 
     
    322334      LOGICAL                ::   ll_do_bclinic         ! local logical 
    323335      REAL(wp), DIMENSION(jpi,jpj)     ::   zht, z_scale, zwu, zwv, zhdiv 
    324       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   ze3t 
     336      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   ze3t 
     337      LOGICAL , DIMENSION(:,:,:), ALLOCATABLE ::   llmsk 
    325338      !!---------------------------------------------------------------------- 
    326339      ! 
     
    407420         zwu(:,:) = 0._wp 
    408421         zwv(:,:) = 0._wp 
    409          DO_3D_10_10( 1, jpkm1 ) 
     422         DO_3D( 1, 0, 1, 0, 1, jpkm1 ) 
    410423            un_td(ji,jj,jk) = rn_ahe3 * umask(ji,jj,jk) * e2_e1u(ji,jj)           & 
    411424               &            * ( tilde_e3t_b(ji,jj,jk) - tilde_e3t_b(ji+1,jj  ,jk) ) 
     
    415428            zwv(ji,jj) = zwv(ji,jj) + vn_td(ji,jj,jk) 
    416429         END_3D 
    417          DO_2D_11_11 
     430         DO_2D( 1, 1, 1, 1 ) 
    418431            un_td(ji,jj,mbku(ji,jj)) = un_td(ji,jj,mbku(ji,jj)) - zwu(ji,jj) 
    419432            vn_td(ji,jj,mbkv(ji,jj)) = vn_td(ji,jj,mbkv(ji,jj)) - zwv(ji,jj) 
    420433         END_2D 
    421          DO_3D_00_00( 1, jpkm1 ) 
     434         DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
    422435            tilde_e3t_a(ji,jj,jk) = tilde_e3t_a(ji,jj,jk) + (   un_td(ji-1,jj  ,jk) - un_td(ji,jj,jk)    & 
    423436               &                                          +     vn_td(ji  ,jj-1,jk) - vn_td(ji,jj,jk)    & 
     
    435448         ! Maximum deformation control 
    436449         ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    437          ze3t(:,:,jpk) = 0._wp 
    438          DO jk = 1, jpkm1 
    439             ze3t(:,:,jk) = tilde_e3t_a(:,:,jk) / e3t_0(:,:,jk) * tmask(:,:,jk) * tmask_i(:,:) 
    440          END DO 
    441          z_tmax = MAXVAL( ze3t(:,:,:) ) 
    442          CALL mpp_max( 'domvvl', z_tmax )                 ! max over the global domain 
    443          z_tmin = MINVAL( ze3t(:,:,:) ) 
    444          CALL mpp_min( 'domvvl', z_tmin )                 ! min over the global domain 
     450         ALLOCATE( ze3t(jpi,jpj,jpk), llmsk(jpi,jpj,jpk) ) 
     451         DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
     452            ze3t(ji,jj,jk) = tilde_e3t_a(ji,jj,jk) / e3t_0(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj) 
     453         END_3D 
     454         ! 
     455         llmsk(   1:Nis1,:,:) = .FALSE.   ! exclude halos from the checked region 
     456         llmsk(Nie1: jpi,:,:) = .FALSE. 
     457         llmsk(:,   1:Njs1,:) = .FALSE. 
     458         llmsk(:,Nje1: jpj,:) = .FALSE. 
     459         ! 
     460         llmsk(Nis0:Nie0,Njs0:Nje0,:) = tmask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp                  ! define only the inner domain 
     461         z_tmax = MAXVAL( ze3t(:,:,:), mask = llmsk )   ;   CALL mpp_max( 'domvvl', z_tmax )   ! max over the global domain 
     462         z_tmin = MINVAL( ze3t(:,:,:), mask = llmsk )   ;   CALL mpp_min( 'domvvl', z_tmin )   ! min over the global domain 
    445463         ! - ML - test: for the moment, stop simulation for too large e3_t variations 
    446464         IF( ( z_tmax >  rn_zdef_max ) .OR. ( z_tmin < - rn_zdef_max ) ) THEN 
    447             IF( lk_mpp ) THEN 
    448                CALL mpp_maxloc( 'domvvl', ze3t, tmask, z_tmax, ijk_max ) 
    449                CALL mpp_minloc( 'domvvl', ze3t, tmask, z_tmin, ijk_min ) 
    450             ELSE 
    451                ijk_max = MAXLOC( ze3t(:,:,:) ) 
    452                ijk_max(1) = ijk_max(1) + nimpp - 1 
    453                ijk_max(2) = ijk_max(2) + njmpp - 1 
    454                ijk_min = MINLOC( ze3t(:,:,:) ) 
    455                ijk_min(1) = ijk_min(1) + nimpp - 1 
    456                ijk_min(2) = ijk_min(2) + njmpp - 1 
    457             ENDIF 
     465            CALL mpp_maxloc( 'domvvl', ze3t, llmsk, z_tmax, ijk_max ) 
     466            CALL mpp_minloc( 'domvvl', ze3t, llmsk, z_tmin, ijk_min ) 
    458467            IF (lwp) THEN 
    459468               WRITE(numout, *) 'MAX( tilde_e3t_a(:,:,:) / e3t_0(:,:,:) ) =', z_tmax 
     
    464473            ENDIF 
    465474         ENDIF 
     475         DEALLOCATE( ze3t, llmsk ) 
    466476         ! - ML - end test 
    467477         ! - ML - Imposing these limits will cause a baroclinicity error which is corrected for below 
     
    647657      gdepw(:,:,1,Kmm) = 0.0_wp 
    648658      gde3w(:,:,1) = gdept(:,:,1,Kmm) - ssh(:,:,Kmm) 
    649       DO_3D_11_11( 2, jpk ) 
     659      DO_3D( 1, 1, 1, 1, 2, jpk ) 
    650660        !    zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk))   ! 0 everywhere tmask = wmask, ie everywhere expect at jk = mikt 
    651661                                                           ! 1 for jk = mikt 
     
    702712         ! 
    703713      CASE( 'U' )                   !* from T- to U-point : hor. surface weighted mean 
    704          DO_3D_10_10( 1, jpk ) 
     714         DO_3D( 1, 0, 1, 0, 1, jpk ) 
    705715            pe3_out(ji,jj,jk) = 0.5_wp * (  umask(ji,jj,jk) * (1.0_wp - zlnwd) + zlnwd ) * r1_e1e2u(ji,jj)   & 
    706716               &                       * (   e1e2t(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3t_0(ji  ,jj,jk) )     & 
     
    711721         ! 
    712722      CASE( 'V' )                   !* from T- to V-point : hor. surface weighted mean 
    713          DO_3D_10_10( 1, jpk ) 
     723         DO_3D( 1, 0, 1, 0, 1, jpk ) 
    714724            pe3_out(ji,jj,jk) = 0.5_wp * ( vmask(ji,jj,jk)  * (1.0_wp - zlnwd) + zlnwd ) * r1_e1e2v(ji,jj)   & 
    715725               &                       * (   e1e2t(ji,jj  ) * ( pe3_in(ji,jj  ,jk) - e3t_0(ji,jj  ,jk) )     & 
     
    720730         ! 
    721731      CASE( 'F' )                   !* from U-point to F-point : hor. surface weighted mean 
    722          DO_3D_10_10( 1, jpk ) 
     732         DO_3D( 1, 0, 1, 0, 1, jpk ) 
    723733            pe3_out(ji,jj,jk) = 0.5_wp * (  umask(ji,jj,jk) * umask(ji,jj+1,jk) * (1.0_wp - zlnwd) + zlnwd ) & 
    724734               &                       *    r1_e1e2f(ji,jj)                                                  & 
     
    793803         IF( ln_rstart ) THEN                   !* Read the restart file 
    794804            CALL rst_read_open                  !  open the restart file if necessary 
    795             CALL iom_get( numror, jpdom_autoglo, 'sshn'   , ssh(:,:,Kmm), ldxios = lrxios    ) 
     805            CALL iom_get( numror, jpdom_auto, 'sshn'   , ssh(:,:,Kmm), ldxios = lrxios    ) 
    796806            ! 
    797807            id1 = iom_varid( numror, 'e3t_b', ldstop = .FALSE. ) 
     
    806816            ! 
    807817            IF( MIN( id1, id2 ) > 0 ) THEN       ! all required arrays exist 
    808                CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) 
    809                CALL iom_get( numror, jpdom_autoglo, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lrxios ) 
     818               CALL iom_get( numror, jpdom_auto, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) 
     819               CALL iom_get( numror, jpdom_auto, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lrxios ) 
    810820               ! needed to restart if land processor not computed  
    811821               IF(lwp) write(numout,*) 'dom_vvl_rst : e3t(:,:,:,Kbb) and e3t(:,:,:,Kmm) found in restart files' 
     
    821831               IF(lwp) write(numout,*) 'e3t_n set equal to e3t_b.' 
    822832               IF(lwp) write(numout,*) 'l_1st_euler is forced to true' 
    823                CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) 
     833               CALL iom_get( numror, jpdom_auto, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) 
    824834               e3t(:,:,:,Kmm) = e3t(:,:,:,Kbb) 
    825835               l_1st_euler = .true. 
     
    828838               IF(lwp) write(numout,*) 'e3t_b set equal to e3t_n.' 
    829839               IF(lwp) write(numout,*) 'l_1st_euler is forced to true' 
    830                CALL iom_get( numror, jpdom_autoglo, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lrxios ) 
     840               CALL iom_get( numror, jpdom_auto, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lrxios ) 
    831841               e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm) 
    832842               l_1st_euler = .true. 
     
    853863               !                          ! ----------------------- ! 
    854864               IF( MIN( id3, id4 ) > 0 ) THEN  ! all required arrays exist 
    855                   CALL iom_get( numror, jpdom_autoglo, 'tilde_e3t_b', tilde_e3t_b(:,:,:), ldxios = lrxios ) 
    856                   CALL iom_get( numror, jpdom_autoglo, 'tilde_e3t_n', tilde_e3t_n(:,:,:), ldxios = lrxios ) 
     865                  CALL iom_get( numror, jpdom_auto, 'tilde_e3t_b', tilde_e3t_b(:,:,:), ldxios = lrxios ) 
     866                  CALL iom_get( numror, jpdom_auto, 'tilde_e3t_n', tilde_e3t_n(:,:,:), ldxios = lrxios ) 
    857867               ELSE                            ! one at least array is missing 
    858868                  tilde_e3t_b(:,:,:) = 0.0_wp 
     
    863873                  !                       ! ------------ ! 
    864874                  IF( id5 > 0 ) THEN  ! required array exists 
    865                      CALL iom_get( numror, jpdom_autoglo, 'hdiv_lf', hdiv_lf(:,:,:), ldxios = lrxios ) 
     875                     CALL iom_get( numror, jpdom_auto, 'hdiv_lf', hdiv_lf(:,:,:), ldxios = lrxios ) 
    866876                  ELSE                ! array is missing 
    867877                     hdiv_lf(:,:,:) = 0.0_wp 
     
    887897                  ssh(:,:,Kbb) = -ssh_ref 
    888898 
    889                   DO_2D_11_11 
     899                  DO_2D( 1, 1, 1, 1 ) 
    890900                     IF( ht_0(ji,jj)-ssh_ref <  rn_wdmin1 ) THEN ! if total depth is less than min depth 
    891901                        ssh(ji,jj,Kbb) = rn_wdmin1 - (ht_0(ji,jj) ) 
     
    903913               e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm) 
    904914 
    905                DO_2D_11_11 
     915               DO_2D( 1, 1, 1, 1 ) 
    906916                  IF ( ht_0(ji,jj) .LE. 0.0 .AND. NINT( ssmask(ji,jj) ) .EQ. 1) THEN 
    907917                     CALL ctl_stop( 'dom_vvl_rst: ht_0 must be positive at potentially wet points' ) 
     
    10301040   END SUBROUTINE dom_vvl_ctl 
    10311041 
     1042#endif 
     1043 
    10321044   !!====================================================================== 
    10331045END MODULE domvvl 
  • NEMO/branches/2020/tickets_icb_1900/tests/VORTEX/MY_SRC/usrdef_hgr.F90

    r12740 r13899  
    6363      REAL(wp), DIMENSION(:,:), INTENT(out) ::   pe1e2u, pe1e2v               ! u- & v-surfaces (if reduction in strait)   [m2] 
    6464      ! 
    65       INTEGER  ::   ji, jj   ! dummy loop indices 
     65      INTEGER  ::   ji, jj     ! dummy loop indices 
    6666      REAL(wp) ::   zphi0, zlam0, zbeta, zf0 
    67       REAL(wp) ::   zti, zui, ztj, zvj   ! local scalars 
     67      REAL(wp) ::   zti, ztj   ! local scalars 
    6868      !!------------------------------------------------------------------------------- 
    6969      ! 
     
    7777      ! Position coordinates (in kilometers) 
    7878      !                          ========== 
    79       zlam0 = -(jpiglo-1)/2 * 1.e-3 * rn_dx 
    80       zphi0 = -(jpjglo-1)/2 * 1.e-3 * rn_dy  
    81  
     79#if defined key_agrif  
     80      IF( Agrif_Root() ) THEN 
     81#endif 
     82         ! Compatibility WITH old version:  
     83         ! jperio = 0 =>  Ni0glo = jpigo_old_version 
     84         !            =>  jpiglo-1 replaced by Ni0glo-1 
     85         zlam0 = -REAL( (Ni0glo-1)/2, wp) * 1.e-3 * rn_dx 
     86         zphi0 = -REAL( (Nj0glo-1)/2, wp) * 1.e-3 * rn_dy  
    8287#if defined key_agrif 
    83       ! ! let lower left longitude and latitude from parent 
    84       IF (.NOT.Agrif_root()) THEN 
    85           zlam0 = (0.5_wp-(Agrif_parent(jpiglo)-1)/2)*1.e-3*Agrif_irhox()*rn_dx & 
    86              &+(Agrif_Ix()+nbghostcells-1)*Agrif_irhox()*rn_dx*1.e-3-(0.5_wp+nbghostcells)*rn_dx*1.e-3 
    87           zphi0 = (0.5_wp-(Agrif_parent(jpjglo)-1)/2)*1.e-3*Agrif_irhoy()*rn_dy & 
    88              &+(Agrif_Iy()+nbghostcells-1)*Agrif_irhoy()*rn_dy*1.e-3-(0.5_wp+nbghostcells)*rn_dy*1.e-3 
     88      ELSE 
     89         ! ! let lower left longitude and latitude from parent 
     90         ! Compatibility WITH old version:  
     91         ! jperio = 0 =>  Ni0glo = jpigo_old_version 
     92         !            =>  Agrif_parent(jpiglo)-1 replaced by  Agrif_parent(Ni0glo)-1 
     93         zlam0 = ( 0.5_wp - REAL( ( Agrif_parent(Ni0glo)-1 ) / 2, wp) ) * 1.e-3 * Agrif_irhox() * rn_dx  & 
     94            &  + ( Agrif_Ix() + nbghostcells - 1 ) * Agrif_irhox() * rn_dx * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dx * 1.e-3 
     95         zphi0 = ( 0.5_wp - REAL( ( Agrif_parent(Nj0glo)-1 ) / 2, wp) ) * 1.e-3 * Agrif_irhoy() * rn_dy  & 
     96            &  + ( Agrif_Iy() + nbghostcells - 1 ) * Agrif_irhoy() * rn_dy * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dy * 1.e-3 
    8997      ENDIF  
    9098#endif 
    9199          
    92       DO_2D_11_11 
    93          zti = FLOAT( ji - 1 + nimpp - 1 )          ;  ztj = FLOAT( jj - 1 + njmpp - 1 ) 
    94          zui = FLOAT( ji - 1 + nimpp - 1 ) + 0.5_wp ;  zvj = FLOAT( jj - 1 + njmpp - 1 ) + 0.5_wp 
     100      DO_2D( 1, 1, 1, 1 ) 
     101         zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos 
     102         ztj = REAL( mjg0_oldcmp(jj) - 1, wp )   ! start at j=0 in the global grid without halos 
    95103          
    96          plamt(ji,jj) = zlam0 + rn_dx * 1.e-3 * zti 
    97          plamu(ji,jj) = zlam0 + rn_dx * 1.e-3 * zui 
     104         plamt(ji,jj) = zlam0 + rn_dx * 1.e-3 *   zti 
     105         plamu(ji,jj) = zlam0 + rn_dx * 1.e-3 * ( zti + 0.5_wp ) 
    98106         plamv(ji,jj) = plamt(ji,jj)  
    99107         plamf(ji,jj) = plamu(ji,jj)  
    100108          
    101          pphit(ji,jj) = zphi0 + rn_dy * 1.e-3 * ztj 
    102          pphiv(ji,jj) = zphi0 + rn_dy * 1.e-3 * zvj 
     109         pphit(ji,jj) = zphi0 + rn_dy * 1.e-3 *   ztj 
     110         pphiv(ji,jj) = zphi0 + rn_dy * 1.e-3 * ( ztj + 0.5_wp ) 
    103111         pphiu(ji,jj) = pphit(ji,jj)  
    104112         pphif(ji,jj) = pphiv(ji,jj)  
  • NEMO/branches/2020/tickets_icb_1900/tests/VORTEX/MY_SRC/usrdef_istate.F90

    r12740 r13899  
    7575      ! Sea level: 
    7676      za = -zP0 * (1._wp-EXP(-zH)) / (grav*(zH-1._wp + EXP(-zH))) 
    77       DO_2D_11_11 
     77      DO_2D( 1, 1, 1, 1 ) 
    7878         zx = glamt(ji,jj) * 1.e3 
    7979         zy = gphit(ji,jj) * 1.e3 
     
    8383      ! 
    8484      ! temperature:          
    85       DO_2D_11_11 
     85      DO_2D( 1, 1, 1, 1 ) 
    8686         zx = glamt(ji,jj) * 1.e3 
    8787         zy = gphit(ji,jj) * 1.e3 
     
    102102      ! velocities: 
    103103      za = 2._wp * zP0 / (zf0 * rho0 * zlambda**2) 
    104       DO_2D_00_00 
     104      DO_2D( 0, 0, 0, 0 ) 
    105105         zx = glamu(ji,jj) * 1.e3 
    106106         zy = gphiu(ji,jj) * 1.e3 
     
    116116      END_2D 
    117117      ! 
    118       DO_2D_00_00 
     118      DO_2D( 0, 0, 0, 0 ) 
    119119         zx = glamv(ji,jj) * 1.e3 
    120120         zy = gphiv(ji,jj) * 1.e3 
  • NEMO/branches/2020/tickets_icb_1900/tests/VORTEX/MY_SRC/usrdef_nam.F90

    r12377 r13899  
    1414   !!   usr_def_hgr   : initialize the horizontal mesh  
    1515   !!---------------------------------------------------------------------- 
    16    USE dom_oce  , ONLY: nimpp , njmpp            ! i- & j-indices of the local domain 
     16   USE dom_oce 
    1717   USE par_oce        ! ocean space and time domain 
    1818   USE phycst         ! physical constants 
     
    8484         kpi = NINT( 1800.e3  / rn_dx ) + 3   
    8585         kpj = NINT( 1800.e3  / rn_dy ) + 3  
    86       ELSE 
    87          kpi  = nbcellsx + 2 + 2*nbghostcells 
    88          kpj  = nbcellsy + 2 + 2*nbghostcells 
     86      ELSE                          ! Global Domain size: add nbghostcells + 1 "land" point on each side 
     87         kpi  = nbcellsx + 2 * ( nbghostcells + 1 ) 
     88         kpj  = nbcellsy + 2 * ( nbghostcells + 1 ) 
     89!!$         kpi  = nbcellsx + nbghostcells_x   + nbghostcells_x   + 2 
     90!!$         kpj  = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 
    8991      ENDIF 
    9092      kpk = NINT( 5000._wp / rn_dz ) + 1 
     
    104106         WRITE(numout,*) '      horizontal resolution             rn_dy  = ', rn_dy, ' m' 
    105107         WRITE(numout,*) '      vertical resolution               rn_dz  = ', rn_dz, ' m' 
     108         WRITE(numout,*) '      resulting global domain size :    Ni0glo = ', kpi 
     109         WRITE(numout,*) '                                        Nj0glo = ', kpj 
     110         WRITE(numout,*) '                                        jpkglo = ', kpk 
    106111         WRITE(numout,*) '      VORTEX domain: ' 
    107112         WRITE(numout,*) '         LX [km]: ', zlx 
  • NEMO/branches/2020/tickets_icb_1900/tests/WAD/EXPREF/context_nemo.xml

    r12276 r13899  
    1111       <variable id="ref_month" type="int"> 01 </variable> 
    1212       <variable id="ref_day"   type="int"> 01 </variable> 
    13        <variable id="rau0"      type="float" > 1026.0 </variable> 
     13       <variable id="rho0"      type="float" > 1026.0 </variable> 
    1414       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
    1515       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
  • NEMO/branches/2020/tickets_icb_1900/tests/WAD/EXPREF/namelist_cfg

    r12489 r13899  
    200200!!                                                                    !! 
    201201!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    202 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    203 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     202!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     203!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    204204!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    205205!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    253253                                 ! 
    254254   !                     ! S-EOS coefficients (ln_seos=T): 
    255    !                             !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     255   !                             !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    256256   rn_a0       =  1.6550e-1      !  thermal expension coefficient (nn_eos= 1) 
    257257   rn_b0       =  7.6554e-1      !  saline  expension coefficient (nn_eos= 1) 
     
    263263!!org GYRE   rn_alpha    =   2.0e-4  !  thermal expension coefficient (nn_eos= 1 or 2) 
    264264!!org GYRE   rn_beta     =   7.7e-4  !  saline  expension coefficient (nn_eos= 2) 
    265 !!org  caution  now a0 = alpha / rau0   with rau0 = 1026 
     265!!org  caution  now a0 = alpha / rho0   with rho0 = 1026 
    266266/ 
    267267!----------------------------------------------------------------------- 
     
    417417!!                                                                    !! 
    418418!!   namtrd       dynamics and/or tracer trends                         (default: OFF) 
    419 !!   namptr       Poleward Transport Diagnostics                        (default: OFF) 
    420419!!   namhsb       Heat and salt budgets                                 (default: OFF) 
    421420!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
  • NEMO/branches/2020/tickets_icb_1900/tests/WAD/MY_SRC/usrdef_hgr.F90

    r12740 r13899  
    1313   !!   usr_def_hgr    : initialize the horizontal mesh for WAD_TEST_CASES configuration 
    1414   !!---------------------------------------------------------------------- 
    15    USE dom_oce  ,  ONLY: nimpp, njmpp       ! ocean space and time domain 
     15   USE dom_oce 
    1616   USE par_oce         ! ocean space and time domain 
    1717   USE phycst          ! physical constants 
     
    7474      !                       !==  grid point position  ==!   (in kilometers) 
    7575      zfact = rn_dx * 1.e-3         ! conversion in km 
    76       DO_2D_11_11 
     76      DO_2D( 1, 1, 1, 1 ) 
    7777         !                       ! longitude 
    78          plamt(ji,jj) = zfact * (  - 0.5 + REAL( ji-1 + nimpp-1 , wp )  )   
    79          plamu(ji,jj) = zfact * (          REAL( ji-1 + nimpp-1 , wp )  ) 
     78         plamt(ji,jj) = zfact * (  - 0.5 + REAL( mig0_oldcmp(ji)-1 , wp )  )   
     79         plamu(ji,jj) = zfact * (          REAL( mig0_oldcmp(ji)-1 , wp )  ) 
    8080         plamv(ji,jj) = plamt(ji,jj) 
    8181         plamf(ji,jj) = plamu(ji,jj) 
    8282         !                       ! latitude 
    83          pphit(ji,jj) = zfact * (  - 0.5 + REAL( jj-1 + njmpp-1 , wp )  ) 
     83         pphit(ji,jj) = zfact * (  - 0.5 + REAL( mjg0_oldcmp(jj)-1 , wp )  ) 
    8484         pphiu(ji,jj) = pphit(ji,jj) 
    85          pphiv(ji,jj) = zfact * (          REAL( jj-1 + njmpp-1 , wp )  ) 
     85         pphiv(ji,jj) = zfact * (          REAL( mjg0_oldcmp(jj)-1 , wp )  ) 
    8686         pphif(ji,jj) = pphiv(ji,jj) 
    8787      END_2D 
  • NEMO/branches/2020/tickets_icb_1900/tests/WAD/MY_SRC/usrdef_istate.F90

    r12740 r13899  
    176176      ! Apply minimum wetdepth criterion 
    177177      ! 
    178       DO_2D_11_11 
     178      DO_2D( 1, 1, 1, 1 ) 
    179179         IF( ht_0(ji,jj) + pssh(ji,jj) < rn_wdmin1 ) THEN 
    180180            pssh(ji,jj) = ptmask(ji,jj,1)*( rn_wdmin1 - ht_0(ji,jj) ) 
  • NEMO/branches/2020/tickets_icb_1900/tests/WAD/MY_SRC/usrdef_nam.F90

    r12377 r13899  
    1414   !!   usr_def_hgr   : initialize the horizontal mesh  
    1515   !!---------------------------------------------------------------------- 
    16    USE dom_oce  , ONLY: nimpp , njmpp            ! i- & j-indices of the local domain 
    1716   USE par_oce        ! ocean space and time domain 
    1817   USE phycst         ! physical constants 
     
    7776      !                             ! Set the lateral boundary condition of the global domain 
    7877      kperio = 0                    ! WAD_TEST_CASES configuration : closed domain 
    79       IF( nn_wad_test == 8 ) kperio = 7 ! North-South cyclic test 
     78      IF( nn_wad_test == 8 ) THEN 
     79         kperio = 7         ! North-South cyclic test 
     80         kpi = kpi - 2      ! no closed boundary 
     81         kpj = kpj - 2      ! no closed boundary 
     82      ENDIF 
    8083      ! 
    8184      !                             ! control print 
  • NEMO/branches/2020/tickets_icb_1900/tests/WAD/MY_SRC/usrdef_zgr.F90

    r12740 r13899  
    1515   !!--------------------------------------------------------------------- 
    1616   USE oce            ! ocean variables 
    17    USE dom_oce ,  ONLY: ht_0, mi0, mi1, nimpp, njmpp,  & 
    18                       & mj0, mj1, glamt, gphit         ! ocean space and time domain 
     17   USE dom_oce ,  ONLY: ht_0, mi0, mi1, mj0, mj1, glamt, gphit         ! ocean space and time domain 
    1918   USE usrdef_nam     ! User defined : namelist variables 
    2019   USE wet_dry ,  ONLY: rn_wdmin1, rn_wdmin2, rn_wdld  ! Wetting and drying 
     
    244243      ! at v-point: averaging zht 
    245244      zhv = 0._wp 
    246       DO_2D_00_00 
     245      DO_2D( 0, 0, 0, 0 ) 
    247246         zhv(ji,jj) = 0.5_wp * ( zht(ji,jj) + zht(ji,jj+1) ) 
    248247      END_2D 
     
    281280         ht_0 = zht 
    282281         k_bot(:,:) = jpkm1 * k_top(:,:)  !* bottom ocean = jpk-1 (here use k_top as a land mask) 
    283          DO_2D_11_11 
     282         DO_2D( 1, 1, 1, 1 ) 
    284283            IF( zht(ji,jj) <= -(rn_wdld - rn_wdmin2)) THEN 
    285284               k_bot(ji,jj) = 0 
     
    290289         !                                !* terrain-following coordinate with e3.(k)=cst) 
    291290         !                                !  OVERFLOW case : identical with j-index (T=V, U=F) 
    292          DO_2D_00_00 
     291         DO_2D( 0, 0, 0, 0 ) 
    293292            z1_jpkm1 = 1._wp / REAL( k_bot(ji,jj) - k_top(ji,jj) + 1 , wp) 
    294293            DO jk = 1, jpk 
Note: See TracChangeset for help on using the changeset viewer.