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 15574 for NEMO/branches/2021/dev_r14318_RK3_stage1/tests – NEMO

Ignore:
Timestamp:
2021-12-03T20:32:50+01:00 (3 years ago)
Author:
techene
Message:

#2605 #2715 trunk merged into dev_r14318_RK3_stage1

Location:
NEMO/branches/2021/dev_r14318_RK3_stage1
Files:
4 deleted
112 edited
2 copied

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14318_RK3_stage1

    • Property svn:externals
      •  

        old new  
        99 
        1010# SETTE 
        11 ^/utils/CI/sette@14244        sette 
         11^/utils/CI/sette@HEAD        sette 
         12 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/BENCH/EXPREF/namelist_cfg_orca025_like

    r14229 r15574  
    1818   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 
    20    nn_perio   =   4        ! periodicity 
     20   ln_Iperio  =   .true.   ! i-periodicity 
     21   ln_Jperio  =  .false.   ! j-periodicity 
     22   ln_NFold   =   .true.   ! North pole folding 
     23      cn_NFtype   =   'T'  ! Folding type: T or F 
    2124/ 
    2225!----------------------------------------------------------------------- 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/BENCH/EXPREF/namelist_cfg_orca12_like

    r14229 r15574  
    1818   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 
    20    nn_perio   =   4        ! periodicity 
     20   ln_Iperio  =   .true.   ! i-periodicity 
     21   ln_Jperio  =  .false.   ! j-periodicity 
     22   ln_NFold   =   .true.   ! North pole folding 
     23      cn_NFtype   =   'T'  ! Folding type: T or F 
    2124/ 
    2225!----------------------------------------------------------------------- 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/BENCH/EXPREF/namelist_cfg_orca1_like

    r14229 r15574  
    1818   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 
    20    nn_perio   =   6        ! periodicity 
     20   ln_Iperio  =   .true.   ! i-periodicity 
     21   ln_Jperio  =  .false.   ! j-periodicity 
     22   ln_NFold   =   .true.   ! North pole folding 
     23      cn_NFtype   =   'F'  ! Folding type: T or F 
    2124/ 
    2225!----------------------------------------------------------------------- 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/BENCH/MY_SRC/usrdef_hgr.F90

    r14223 r15574  
    6262      ! 
    6363      INTEGER  ::   ji, jj         ! dummy loop indices 
     64      REAL(wp), DIMENSION(jpi,jpj) ::   z2d   ! 2D workspace 
    6465      REAL(wp) ::   zres, zf0 
    6566      REAL(wp) ::   zti, ztj       ! local scalars 
     
    7273      IF(lwp) WRITE(numout,*) '          given by rn_dx and rn_dy'  
    7374      ! 
     75      ! define unique value on each point of the inner global domain. z2d ranging from 0.05 to -0.05 
     76      ! 
     77      DO_2D( 0, 0, 0, 0 )   !  +/- 0.5 
     78         z2d(ji,jj) = 0.5 - REAL( mig0(ji) + (mjg0(jj)-1) * Ni0glo, wp ) / REAL( Ni0glo * Nj0glo, wp ) 
     79      END_2D 
     80      ! 
    7481      ! Position coordinates (in grid points) 
    7582      !                          ========== 
    76       DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     83      DO_2D( 0, 0, 0, 0 ) 
    7784          
    78          zti = REAL( mig0(ji), wp ) - 0.5_wp  ! start at i=0.5 in the global grid without halos 
    79          ztj = REAL( mjg0(jj), wp ) - 0.5_wp  ! start at j=0.5 in the global grid without halos 
     85         zti = REAL( mig0(ji), wp ) - 0.5_wp   ! start at i=0.5 in the global grid without halos 
     86         ztj = REAL( mjg0(jj), wp ) - 0.5_wp   ! start at j=0.5 in the global grid without halos 
    8087          
    81          plamt(ji,jj) = zti 
    82          plamu(ji,jj) = zti + 0.5_wp 
    83          plamv(ji,jj) = zti 
    84          plamf(ji,jj) = zti + 0.5_wp 
     88         plamt(ji,jj) =   zti            * (1. + 1.0e-5 * z2d(ji,jj) ) 
     89         plamu(ji,jj) = ( zti + 0.5_wp ) * (1. + 2.0e-5 * z2d(ji,jj) ) 
     90         plamv(ji,jj) =   zti            * (1. + 3.0e-5 * z2d(ji,jj) ) 
     91         plamf(ji,jj) = ( zti + 0.5_wp ) * (1. + 4.0e-5 * z2d(ji,jj) ) 
    8592          
    86          pphit(ji,jj) = ztj 
    87          pphiu(ji,jj) = ztj 
    88          pphiv(ji,jj) = ztj + 0.5_wp 
    89          pphif(ji,jj) = ztj + 0.5_wp 
     93         pphit(ji,jj) =   ztj            * (1. + 1.5e-5 * z2d(ji,jj) )          
     94         pphiu(ji,jj) =   ztj            * (1. + 2.5e-5 * z2d(ji,jj) )          
     95         pphiv(ji,jj) = ( ztj + 0.5_wp ) * (1. + 3.5e-5 * z2d(ji,jj) ) 
     96         pphif(ji,jj) = ( ztj + 0.5_wp ) * (1. + 4.5e-5 * z2d(ji,jj) ) 
    9097 
    9198      END_2D 
     
    93100      ! Horizontal scale factors (in meters) 
    94101      !                              ====== 
    95       zres = 1.e+5   !  100km 
    96       pe1t(:,:) = zres  ;   pe2t(:,:) = zres  
    97       pe1u(:,:) = zres  ;   pe2u(:,:) = zres 
    98       pe1v(:,:) = zres  ;   pe2v(:,:) = zres 
    99       pe1f(:,:) = zres  ;   pe2f(:,:) = zres  
    100  
     102      DO_2D( 0, 0, 0, 0 ) 
     103         zres = 1.e+5   !  100km 
     104         pe1t(ji,jj) = zres * (1. + 1.0e-5 * z2d(ji,jj) )  ;   pe2t(ji,jj) = zres * (1. + 1.5e-5 * z2d(ji,jj) ) 
     105         pe1u(ji,jj) = zres * (1. + 2.0e-5 * z2d(ji,jj) )  ;   pe2u(ji,jj) = zres * (1. + 2.5e-5 * z2d(ji,jj) ) 
     106         pe1v(ji,jj) = zres * (1. + 3.0e-5 * z2d(ji,jj) )  ;   pe2v(ji,jj) = zres * (1. + 3.5e-5 * z2d(ji,jj) ) 
     107         pe1f(ji,jj) = zres * (1. + 4.0e-5 * z2d(ji,jj) )  ;   pe2f(ji,jj) = zres * (1. + 4.5e-5 * z2d(ji,jj) ) 
     108      END_2D 
    101109      !                             ! NO reduction of grid size in some straits  
    102110      ke1e2u_v = 0                  !    ==>> u_ & v_surfaces will be computed in dom_hgr routine 
     
    109117      ! 
    110118      zf0 = 2._wp * omega * SIN( rad * 45 )   ! constant coriolis factor corresponding to 45°N 
    111       pff_f(:,:) = zf0 
    112       pff_t(:,:) = zf0 
     119      DO_2D( 0, 0, 0, 0 ) 
     120         pff_f(ji,jj) = zf0 * (1. + 1.0e-5 * z2d(ji,jj) ) 
     121         pff_t(ji,jj) = zf0 * (1. + 2.0e-5 * z2d(ji,jj) ) 
     122      END_2D 
     123      ! 
     124      ! calls lbc_lnk done in dom_hgr 
    113125      ! 
    114126   END SUBROUTINE usr_def_hgr 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/BENCH/MY_SRC/usrdef_nam.F90

    r13286 r15574  
    2929CONTAINS 
    3030 
    31    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     31   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    3232      !!---------------------------------------------------------------------- 
    3333      !!                     ***  ROUTINE dom_nam  *** 
     
    4141      !! ** input   : - namusr_def namelist found in namelist_cfg 
    4242      !!---------------------------------------------------------------------- 
    43       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    44       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    45       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    46       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
    47       ! 
     43      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     44      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     45      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes  
     46      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     47      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     48      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    4849      ! 
    4950      INTEGER ::   ios         ! Local integer 
     
    5253      INTEGER ::   nn_jsize    ! number of point in j-direction of global(local) domain if >0 (<0)   
    5354      INTEGER ::   nn_ksize    ! total number of point in k-direction 
    54       INTEGER ::   nn_perio    ! periodicity 
    5555      !                              !!* nammpp namelist *!! 
    5656      INTEGER          ::   jpni, jpnj 
    57       LOGICAL          ::   ln_nnogather, ln_listonly 
     57      LOGICAL          ::   ln_listonly 
     58      LOGICAL          ::   ln_Iperio, ln_Jperio 
     59      LOGICAL          ::   ln_NFold 
     60      character(len=1) ::   cn_NFtype 
    5861      !! 
    59       NAMELIST/namusr_def/ nn_isize, nn_jsize, nn_ksize, nn_perio 
    60       NAMELIST/nammpp/ jpni, jpnj, nn_hls, ln_nnogather, ln_listonly 
     62      NAMELIST/namusr_def/ nn_isize, nn_jsize, nn_ksize, ln_Iperio, ln_Jperio, ln_NFold, cn_NFtype 
     63      NAMELIST/nammpp/ jpni, jpnj, nn_hls, ln_nnogather, ln_listonly, nn_comm 
    6164      !!----------------------------------------------------------------------      
    6265      ! 
     
    8386         kpj = nn_jsize 
    8487      ENDIF 
     88      kpk = nn_ksize 
    8589      ! 
    86       kpk = nn_ksize 
    87       kperio = nn_perio 
     90      ldIperio = ln_Iperio   ;   ldJperio = ln_Jperio 
     91      ldNFold  = ln_NFold    ;   cdNFtype = cn_NFtype 
     92      ! 
    8893      !                             ! control print 
    8994      IF(lwp) THEN 
     
    107112         ENDIF 
    108113         WRITE(numout,*) '      global domain size-z            nn_ksize = ', nn_ksize 
    109          WRITE(numout,*) '      LBC of the global domain          kperio = ', kperio 
     114         WRITE(numout,*) '   ' 
    110115      ENDIF 
    111116      ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/BENCH/MY_SRC/usrdef_sbc.F90

    r14273 r15574  
    110110      END_2D 
    111111 
    112       CALL lbc_lnk_multi( 'usrdef_sbc', utau_ice, 'U', -1., vtau_ice, 'V', -1. ) 
     112      CALL lbc_lnk( 'usrdef_sbc', utau_ice, 'U', -1., vtau_ice, 'V', -1. ) 
    113113#endif 
    114114      ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/BENCH/MY_SRC/usrdef_zgr.F90

    r13286 r15574  
    197197      ! 
    198198       
    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. 
     199!!$      IF( c_NFtype == 'T' ) 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._wp 
     201!!$         z2d(mi0(jpiglo-nn_hls):mi1(MIN(jpiglo,jpiglo-nn_hls+2)),mj0(jpjglo-nn_hls-1):mj1(jpjglo-nn_hls+1)) = 0._wp 
     202!!$         z2d(mi0(jpiglo/2     ):mi1(           jpiglo/2     +2 ),mj0(jpjglo-nn_hls-1):mj1(jpjglo-nn_hls+1)) = 0._wp 
    203203!!$      ENDIF 
    204204!!$      ! 
    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  
    211       ! 
    212       CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (here jperio=0 ==>> closed) 
     205      IF( c_NFtype == 'F' ) THEN   ! Must mask the 2 pivot-points  
     206         z2d(mi0(nn_hls+1):mi1(nn_hls+1),mj0(jpjglo-nn_hls):mj1(jpjglo-nn_hls)) = 0._wp 
     207         z2d(mi0(jpiglo/2):mi1(jpiglo/2),mj0(jpjglo-nn_hls):mj1(jpjglo-nn_hls)) = 0._wp 
     208      ENDIF 
     209      ! 
     210      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1._wp )           ! set surrounding land to zero (closed boundaries) 
    213211      ! 
    214212      k_bot(:,:) = INT( z2d(:,:) )           ! =jpkm1 over the ocean point, =0 elsewhere 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/C1D_ASICS/EXP00/file_def_nemo-oce.xml

    r14025 r15574  
    2121      <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files --> 
    2222 
    23       <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."> <!-- 6h files -->      
     23      <file_group id="6h" output_freq="6h"  output_level="10" enabled=".FALSE."> <!-- 6h files -->      
     24 
    2425        <file id="file61" name_suffix="_grid_T" description="ocean T grid variables" > 
    2526          <field field_ref="e3t"                           /> 
    26           <field field_ref="toce"         name="votemper"     operation="instant" freq_op="1d" > @toce_e3t / @e3t </field> 
    27           <field field_ref="soce"         name="vosaline"     operation="instant" freq_op="1d" > @soce_e3t / @e3t </field> 
     27          <field field_ref="toce"         name="votemper"     operation="instant" freq_op="6h" > @toce_e3t / @e3t </field> 
     28          <field field_ref="soce"         name="vosaline"     operation="instant" freq_op="6h" > @soce_e3t / @e3t </field> 
    2829          <field field_ref="mldkz5"                       /> 
    2930          <field field_ref="mldr10_1"                     /> 
     
    3738          <field field_ref="precip"       name="precip"   /> 
    3839        </file> 
     40 
    3941      </file_group> 
    4042 
    4143 
    42       <file_group id="12h" output_freq="12h"  output_level="10" enabled=".TRUE."> <!-- 1d files --> 
     44      <file_group id="12h" output_freq="12h"  output_level="10" enabled=".FALSE."> <!-- 12h files --> 
    4345 
    4446        <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
     47          <field field_ref="e3t"                           /> 
     48          <field field_ref="toce"         name="votemper"     operation="instant" freq_op="12h" > @toce_e3t / @e3t </field> 
     49          <field field_ref="soce"         name="vosaline"     operation="instant" freq_op="12h" > @soce_e3t / @e3t </field> 
     50          <field field_ref="mldkz5"                       /> 
     51          <field field_ref="mldr10_1"                     /> 
     52          <field field_ref="empmr"        name="wfo"      /> 
     53          <field field_ref="qsr_oce"      name="qsr_oce"  /> 
     54          <field field_ref="qns_oce"      name="qns_oce"  /> 
     55          <field field_ref="qt_oce"       name="qt_oce"   /> 
     56          <field field_ref="saltflx"      name="sfx"      /> 
     57          <field field_ref="taum"         name="taum"     /> 
     58          <field field_ref="wspd"         name="windsp"   /> 
     59          <field field_ref="precip"       name="precip"   /> 
     60        </file> 
     61 
     62       <file id="file2" name_suffix="_grid_U" description="ocean U grid variables" > 
     63          <field field_ref="uoce"         name="uo"       operation="instant" freq_op="12h" > @uoce_e3u / @e3u </field> 
     64          <field field_ref="utau"         name="tauuo"    /> 
     65        </file> 
     66 
     67       <file id="file3" name_suffix="_grid_V" description="ocean V grid variables" > 
     68          <field field_ref="voce"         name="vo"       operation="instant" freq_op="12h" > @voce_e3v / @e3v </field> 
     69          <field field_ref="vtau"         name="tauvo"    /> 
     70        </file> 
     71 
     72        <file id="file4" name_suffix="_grid_W" description="ocean W grid variables" > 
     73          <field field_ref="e3w" /> 
     74          <field field_ref="avt"          name="difvho"   /> 
     75        </file> 
     76 
     77      </file_group> 
     78 
     79       
     80      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."> <!-- 1d files --> 
     81 
     82        <file id="file60" name_suffix="_grid_T" description="ocean T grid variables" > 
    4583          <field field_ref="e3t"                           /> 
    4684          <field field_ref="toce"         name="votemper"     operation="instant" freq_op="1d" > @toce_e3t / @e3t </field> 
     
    5896        </file> 
    5997 
    60        <file id="file2" name_suffix="_grid_U" description="ocean U grid variables" > 
    61           <field field_ref="uoce"         name="uo"       operation="instant" freq_op="1d" > @uoce_e3u / @e3u </field> 
    62           <field field_ref="utau"         name="tauuo"    /> 
    63         </file> 
    64  
    65        <file id="file3" name_suffix="_grid_V" description="ocean V grid variables" > 
    66           <field field_ref="voce"         name="vo"       operation="instant" freq_op="1d" > @voce_e3v / @e3v </field> 
    67           <field field_ref="vtau"         name="tauvo"    /> 
    68         </file> 
    69  
    70         <file id="file4" name_suffix="_grid_W" description="ocean W grid variables" > 
    71           <field field_ref="e3w" /> 
    72           <field field_ref="avt"          name="difvho"   /> 
    73         </file> 
    74  
    75       </file_group> 
    76  
    77        
    78       <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."> <!-- 1d files --> 
    79         <file id="file60" name_suffix="_grid_T" description="ocean T grid variables" > 
    80           <field field_ref="e3t"                           /> 
    81           <field field_ref="toce"         name="votemper"     operation="instant" freq_op="1d" > @toce_e3t / @e3t </field> 
    82           <field field_ref="soce"         name="vosaline"     operation="instant" freq_op="1d" > @soce_e3t / @e3t </field> 
    83           <field field_ref="mldkz5"                       /> 
    84           <field field_ref="mldr10_1"                     /> 
    85           <field field_ref="empmr"        name="wfo"      /> 
    86           <field field_ref="qsr_oce"      name="qsr_oce"  /> 
    87           <field field_ref="qns_oce"      name="qns_oce"  /> 
    88           <field field_ref="qt_oce"       name="qt_oce"   /> 
    89           <field field_ref="saltflx"      name="sfx"      /> 
    90           <field field_ref="taum"         name="taum"     /> 
    91           <field field_ref="wspd"         name="windsp"   /> 
    92           <field field_ref="precip"       name="precip"   /> 
    93         </file> 
    9498      </file_group> 
    9599 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/C1D_ASICS/EXP00/namelist_cfg

    r14229 r15574  
    55!! namelists    2 - Surface boundary (namsbc, namsbc_flx, namsbc_blk, namsbc_cpl, 
    66!!                                    namsbc_sas, namtra_qsr, namsbc_rnf, 
    7 !!                                    namsbc_isf, namsbc_iscpl, namsbc_apr,  
     7!!                                    namisf, namsbc_apr,  
    88!!                                    namsbc_ssr, namsbc_wave, namberg) 
    99!!              3 - lateral boundary (namlbc, namagrif, nambdy, nambdy_tide) 
     
    2626!!   namtsd       data: temperature & salinity                          (default: OFF) 
    2727!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    28 !!   namc1d       1D configuration options                              ("key_c1d") 
    29 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    30 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     28!!   namc1d       1D configuration options                              (ln_c1d =T) 
     29!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     30!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    3131!!====================================================================== 
    3232! 
     
    4949&namdom        !   time and space domain 
    5050!----------------------------------------------------------------------- 
    51    ln_linssh   = .true.   !  =T  linear free surface  ==>>  model level are fixed in time 
     51   ln_linssh   = .true.    !  =T  linear free surface  ==>>  model level are fixed in time 
    5252   ! 
    53    rn_Dt      =  360.     !  time step for the dynamics and tracer 
     53   rn_Dt       =  360.     !  time step for the dynamics and tracer 
     54   ln_c1d      = .true.    !  Single column domain (1x1pt)              (T => fill namc1d) 
    5455/ 
    5556!----------------------------------------------------------------------- 
     
    7980/ 
    8081!----------------------------------------------------------------------- 
    81 &namc1d        !   1D configuration options                             ("key_c1d" default: PAPA station) 
    82 !----------------------------------------------------------------------- 
    83    rn_lat1d    =      30   !  Column latitude 
    84    rn_lon1d    =      15   !  Column longitude 
    85    ln_c1d_locpt =  .true.  ! Localization of 1D config in a grid (T) or independant point (F) 
    86 / 
    87 !----------------------------------------------------------------------- 
    88 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
     82&namc1d        !   1D configuration options                             (ln_c1d =T default: PAPA station) 
     83!----------------------------------------------------------------------- 
     84   rn_lat1d    =      30.  !  Column latitude 
     85   rn_lon1d    =      15.  !  Column longitude 
     86/ 
     87!----------------------------------------------------------------------- 
     88&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
    8989!----------------------------------------------------------------------- 
    9090   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F) 
    9191/ 
    9292!----------------------------------------------------------------------- 
    93 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     93&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    9494!----------------------------------------------------------------------- 
    9595   !                       !  =T read U-V fields for: 
     
    118118!!   namsbc_rnf      river runoffs                                      (ln_rnf     =T) 
    119119!!   namsbc_apr      Atmospheric Pressure                               (ln_apr_dyn =T) 
    120 !!   namsbc_isf      ice shelf melting/freezing                         (ln_isfcav  =T : read (ln_read_cfg=T) or set or usr_def_zgr ) 
    121 !!   namsbc_iscpl    coupling option between land ice model and ocean   (ln_isfcav  =T) 
    122120!!   namsbc_wave     external fields from wave model                    (ln_wave    =T) 
    123121!!   namberg         iceberg floats                                     (ln_icebergs=T) 
     122!!   namsbc_fwb      freshwater-budget adjustment                       (nn_fwb > 0) 
    124123!!====================================================================== 
    125124! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/C1D_ASICS/MY_SRC/usrdef_nam.F90

    r14021 r15574  
    3939CONTAINS 
    4040 
    41    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     41   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4242      !!---------------------------------------------------------------------- 
    4343      !!                     ***  ROUTINE dom_nam  *** 
     
    5151      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5252      !!---------------------------------------------------------------------- 
    53       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    54       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    55       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    56       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     53      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     54      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     55      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     56      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     57      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     58      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    5759      ! 
    5860      INTEGER ::   ios   ! Local integer 
     
    6971      kk_cfg = 0 
    7072 
    71       ! Global Domain size:  C1D domain is 3 x 3 grid-points x 75 or vertical levels 
    72       kpi = 3 
    73       kpj = 3 
    74       kpk = 75  
     73      ! Global Domain size:  C1D domain is 1 x 1 grid-points x 75 or vertical levels 
     74      kpi = 1 
     75      kpj = 1 
     76      kpk = 75 
    7577      !                             ! Set the lateral boundary condition of the global domain 
    76       kperio =  7                   ! C1D configuration : 3x3 basin with cyclic Est-West and Norht-South condition 
     78      ldIperio =  .TRUE.   ;   ldJperio = .TRUE.   ! C1D configuration : 1x1 basin with cyclic Est-West and Norht-South condition 
     79      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
    7780      ! 
    7881      !                             ! control print 
     
    8689         WRITE(numout,*) '         z-partial-step coordinate flag        ln_zps = ', ln_zps 
    8790         WRITE(numout,*) '         s-coordinate flag                     ln_sco = ', ln_sco 
    88          WRITE(numout,*) '      C1D domain = 3 x 3 x75 grid-points                ' 
     91         WRITE(numout,*) '      C1D domain = 1 x 1 x 75 grid-points                ' 
    8992         WRITE(numout,*) '         resulting global domain size :        jpiglo = ', kpi 
    9093         WRITE(numout,*) '                                               jpjglo = ', kpj 
    9194         WRITE(numout,*) '                                               jpkglo = ', kpk 
    92          WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    93          WRITE(numout,*) '      C1D : closed basin                       jperio = ', kperio 
     95         WRITE(numout,*) '   ' 
    9496      ENDIF 
    9597      ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/C1D_ASICS/cpp_C1D_ASICS.fcm

    r14239 r15574  
    1  bld::tool::fppkeys   key_c1d key_qco key_xios 
     1 bld::tool::fppkeys   key_linssh key_xios 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/CANAL/EXPREF/file_def_nemo-oce.xml

    r14224 r15574  
    1515     <field field_ref="soce" />  
    1616     <field field_ref="ssh"  /> 
    17      <field field_ref="socegrad"  /> 
     17     <field field_ref="sssgrad"  /> 
    1818     <field field_ref="ke_int"  /> 
    19      <field field_ref="relvor"  /> 
    20      <field field_ref="potvor"  /> 
     19     <field field_ref="ssrelvor"  /> 
     20     <field field_ref="ssrelpotvor"  /> 
    2121     <field field_ref="saltc"  /> 
    2222     <field field_ref="salt2c"  /> 
     
    2626     <field field_ref="utau"  /> 
    2727     <field field_ref="uoce" /> 
    28      <field_group group_ref="trendU"  />   
    2928   </file> 
    3029    
     
    3231     <field field_ref="vtau"  /> 
    3332     <field field_ref="voce" /> 
    34      <field_group group_ref="trendV"  />   
    3533   </file> 
    3634    
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/CANAL/EXPREF/namelist_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    4949   ln_sshnoise =  .FALSE.  !  add random noise on initial ssh 
    5050   rn_lambda   =     50.   !  gaussian lambda 
    51    nn_perio    = 1 
     51   ln_Iperio   =   .true.  ! i-periodicity 
     52   ln_Jperio   =  .false.  ! j-periodicity 
    5253/ 
    5354!----------------------------------------------------------------------- 
     
    7475   ln_write_cfg = .false.   !  (=T) create the domain configuration file 
    7576      cn_domcfg_out = "domain_cfg" ! newly created domain configuration filename 
     77/ 
     78!----------------------------------------------------------------------- 
     79&namtile        !   parameters of the tiling 
     80!----------------------------------------------------------------------- 
    7681/ 
    7782!!====================================================================== 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/CANAL/MY_SRC/usrdef_hgr.F90

    r14223 r15574  
    6464      ! 
    6565      INTEGER  ::   ji, jj     ! dummy loop indices 
    66       REAL(wp) ::   zphi0, zlam0, zbeta, zf0 
     66      INTEGER  ::   ii0, ij0   ! dummy loop indices 
     67      REAL(wp) ::   zbeta, zf0 
    6768      REAL(wp) ::   zti, ztj   ! local scalars 
    6869      !!------------------------------------------------------------------------------- 
     
    7778      ! Position coordinates (in kilometers) 
    7879      !                          ========== 
    79       zlam0 = -REAL(Ni0glo, wp) * rn_0xratio * rn_dx 
    80       zphi0 = -REAL(Nj0glo, wp) * rn_0yratio * rn_dy 
     80      ii0 = NINT( REAL(Ni0glo, wp) * rn_0xratio ) 
     81      ij0 = NINT( REAL(Nj0glo, wp) * rn_0yratio ) 
    8182 
    8283#if defined key_agrif 
    8384      ! ! let lower left longitude and latitude from parent 
    8485      IF (.NOT.Agrif_root()) THEN 
    85           zlam0 = (0.5_wp-(Agrif_parent(jpiglo)-1)/2)*Agrif_irhox()*rn_dx & 
    86              &+(Agrif_Ix()+nbghostcells-1)*Agrif_irhox()*rn_dx-(0.5_wp+nbghostcells)*rn_dx 
    87           zphi0 = (0.5_wp-(Agrif_parent(jpjglo)-1)/2)*Agrif_irhoy()*rn_dy & 
    88              &+(Agrif_Iy()+nbghostcells-1)*Agrif_irhoy()*rn_dy-(0.5_wp+nbghostcells)*rn_dy 
     86          to be coded... 
    8987      ENDIF  
    9088#endif 
    9189          
    9290      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )          
    93          zti = REAL( mig0(ji), wp ) - 0.5_wp  ! start at i=0.5 in the global grid without halos 
    94          ztj = REAL( mjg0(jj), wp ) - 0.5_wp  ! start at j=0.5 in the global grid without halos 
     91         zti = REAL( mig0(ji)-ii0, wp )   ! =0 at i=ii0 in the global grid without halos 
     92         ztj = REAL( mjg0(jj)-ij0, wp )   ! =0 at i=ij0 in the global grid without halos 
    9593          
    96          plamt(ji,jj) = zlam0 + rn_dx *   zti 
    97          plamu(ji,jj) = zlam0 + rn_dx * ( zti + 0.5_wp )  
     94         plamt(ji,jj) = rn_dx *   zti 
     95         plamu(ji,jj) = rn_dx * ( zti + 0.5_wp )  
    9896         plamv(ji,jj) = plamt(ji,jj)  
    9997         plamf(ji,jj) = plamu(ji,jj)  
    10098          
    101          pphit(ji,jj) = zphi0 + rn_dy *   ztj 
    102          pphiv(ji,jj) = zphi0 + rn_dy * ( ztj + 0.5_wp )  
     99         pphit(ji,jj) = rn_dy *   ztj 
     100         pphiv(ji,jj) = rn_dy * ( ztj + 0.5_wp )  
    103101         pphiu(ji,jj) = pphit(ji,jj)  
    104102         pphif(ji,jj) = pphiv(ji,jj)  
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/CANAL/MY_SRC/usrdef_istate.F90

    r14224 r15574  
    239239      ! 
    240240      CALL lbc_lnk( 'usrdef_istate', pts , 'T',  1. ) 
    241       CALL lbc_lnk_multi( 'usrdef_istate', pu, 'U', -1., pv, 'V', -1. ) 
     241      CALL lbc_lnk( 'usrdef_istate', pu, 'U', -1., pv, 'V', -1. ) 
    242242 
    243243   END SUBROUTINE usr_def_istate 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/CANAL/MY_SRC/usrdef_nam.F90

    r13472 r15574  
    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) 
    5352 
    5453   !!---------------------------------------------------------------------- 
     
    5958CONTAINS 
    6059 
    61    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     60   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    6261      !!---------------------------------------------------------------------- 
    6362      !!                     ***  ROUTINE dom_nam  *** 
     
    7170      !! ** input   : - namusr_def namelist found in namelist_cfg 
    7271      !!---------------------------------------------------------------------- 
    73       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    74       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    75       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    76       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     72      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     73      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     74      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     75      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     76      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     77      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    7778      ! 
    7879      INTEGER ::   ios      ! Local integer 
    7980      REAL(wp)::   zh       ! Local scalars 
     81      LOGICAL ::   ln_Iperio, ln_Jperio 
    8082      !! 
    8183      NAMELIST/namusr_def/  rn_domszx, rn_domszy, rn_domszz, rn_dx, rn_dy, rn_dz, rn_0xratio, rn_0yratio   & 
    8284         &                 , nn_fcase, rn_ppgphi0, rn_u10, rn_windszx, rn_windszy & !!, rn_uofac   & 
    8385         &                 , rn_vtxmax, rn_uzonal, rn_ujetszx, rn_ujetszy  & 
    84          &                 , nn_botcase, nn_initcase, ln_sshnoise, rn_lambda, nn_perio 
     86         &                 , nn_botcase, nn_initcase, ln_sshnoise, rn_lambda, ln_Iperio, ln_Jperio 
    8587      !!---------------------------------------------------------------------- 
    8688      ! 
     
    102104#endif 
    103105      ! 
    104       IF(lwm)   WRITE( numond, namusr_def ) 
    105       ! 
    106106      cd_cfg = 'EW_CANAL'             ! name & resolution (not used) 
    107107      kk_cfg = INT( rn_dx ) 
     
    109109      IF( Agrif_Root() ) THEN        ! Global Domain size:  EW_CANAL global domain is  1800 km x 1800 Km x 5000 m 
    110110         kpi = NINT( rn_domszx / rn_dx ) + 1 
    111          kpj = NINT( rn_domszy / rn_dy ) + 3 
     111         kpj = NINT( rn_domszy / rn_dy ) + 1 
    112112      ELSE                           ! Global Domain size: add nbghostcells + 1 "land" point on each side 
    113          kpi  = nbcellsx + nbghostcells_x   + nbghostcells_x  + 2 
     113         kpi  = nbcellsx + nbghostcells_x_w + nbghostcells_x_e + 2 
    114114         kpj  = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 
    115115      ENDIF 
     
    117117      ! 
    118118      zh  = (kpk-1)*rn_dz 
    119       !                             ! Set the lateral boundary condition of the global domain 
    120       kperio = 1                    ! EW_CANAL configuration : closed basin 
    121119      !                             ! control print 
    122120      IF(lwp) THEN 
     
    149147         WRITE(numout,*) '      add random noise on initial ssh   ln_sshnoise= ', ln_sshnoise 
    150148         WRITE(numout,*) '      Gaussian lambda parameter          rn_lambda = ', rn_lambda 
    151          WRITE(numout,*) '      Periodicity of the basin            nn_perio = ', nn_perio 
     149         WRITE(numout,*) '      i and j Periodicity     ln_Iperio, ln_Jperio = ', ln_Iperio, ln_Jperio 
     150         WRITE(numout,*) '   ' 
    152151      ENDIF 
    153152      !                             ! Set the lateral boundary condition of the global domain 
    154       kperio = nn_perio                    ! EW_CANAL configuration : closed basin 
     153      ldIperio = ln_Iperio   ;   ldJperio = ln_Jperio   ! CANAL configuration 
     154      ldNFold  =  .FALSE.    ;   cdNFtype = '-' 
    155155      ! 
    156156   END SUBROUTINE usr_def_nam 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/CANAL/MY_SRC/usrdef_zgr.F90

    r13472 r15574  
    202202      END SELECT 
    203203      ! 
    204       CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (here jperio=0 ==>> closed) 
     204      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (closed boundaries) 
    205205      ! 
    206206      k_bot(:,:) = NINT( z2d(:,:) )          ! =jpkm1 over the ocean point, =0 elsewhere 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/CPL_OASIS/EXPREF/namelist_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    3838      ln_closea    = .false.    !  F => suppress closed seas (defined by closea_mask field)  
    3939      !                         !       from the bathymetry at runtime. 
     40/ 
     41!----------------------------------------------------------------------- 
     42&namtile        !   parameters of the tiling 
     43!----------------------------------------------------------------------- 
    4044/ 
    4145!----------------------------------------------------------------------- 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/DOME/EXPREF/1_namelist_cfg

    r14254 r15574  
    77&namagrif      !  AGRIF zoom                                            ("key_agrif") 
    88!----------------------------------------------------------------------- 
    9    ln_agrif_2way   = .true. !  activate two way nesting 
    10    ln_init_chfrpar = .false.!  initialize child grids from parent 
    119   ln_vert_remap   = .true. !  use vertical remapping 
    12    ln_chk_bathy    = .true. !  =T  check the parent bathymetry 
    13    ln_spc_dyn      = .false. 
    14    rn_sponge_tra   = 0.0    !  coefficient for tracer   sponge layer [] 
    15    rn_sponge_dyn   = 0.002  !  coefficient for dynamics sponge layer [] 
    16    rn_trelax_tra   = 0.01   !  inverse of relaxation time (in steps) for tracers [] 
    17    rn_trelax_dyn   = 0.01   !  inverse of relaxation time (in steps) for dynamics [] 
    1810/ 
    1911!----------------------------------------------------------------------- 
     
    4436/ 
    4537!----------------------------------------------------------------------- 
     38&namtile        !   parameters of the tiling 
     39!----------------------------------------------------------------------- 
     40/ 
     41!----------------------------------------------------------------------- 
    4642&namdom        !   space and time domain (bathymetry, mesh, timestep) 
    4743!----------------------------------------------------------------------- 
    48    ln_linssh  = .true. 
     44   ln_linssh  = .false. 
    4945   rn_Dt      =   150.    !  time step for the dynamics (and tracer if nn_acc=0) 
    5046   rn_atfp    =    0.1    !  asselin time filter parameter 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/DOME/EXPREF/AGRIF_FixedGrids.in

    r14216 r15574  
    111 
    2 278 358 88 162 2 2 2    
     2281 361 121 169 2 2 2    
    330 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/DOME/EXPREF/namelist_cfg

    r14254 r15574  
    3232/ 
    3333!----------------------------------------------------------------------- 
     34&namtile        !   parameters of the tiling 
     35!----------------------------------------------------------------------- 
     36/ 
     37!----------------------------------------------------------------------- 
    3438&namdom        !   space and time domain (bathymetry, mesh, timestep) 
    3539!----------------------------------------------------------------------- 
    36    ln_linssh  = .true. 
     40   ln_linssh  = .false. 
    3741   rn_Dt      =   300.    !  time step for the dynamics (and tracer if nn_acc=0) 
    3842   rn_atfp    =    0.1    !  asselin time filter parameter 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/DOME/MY_SRC/usrdef_hgr.F90

    r14254 r15574  
    2323   IMPLICIT NONE 
    2424   PRIVATE 
     25 
     26   REAL(wp) :: roffsetx, roffsety ! Offset in km to first f-point 
    2527 
    2628   PUBLIC   usr_def_hgr   ! called by domhgr.F90 
     
    6466      ! 
    6567      INTEGER  ::   ji, jj     ! dummy loop indices 
    66       REAL(wp) ::   zphi0, zlam0  
    6768      REAL(wp) ::   zti, ztj   ! local scalars 
    6869      !!------------------------------------------------------------------------------- 
     
    7778      ! Position coordinates (in kilometers) 
    7879      !                          ========== 
    79       zlam0 = -REAL( 0.5 + 1700._wp * 1.e3 / rn_dx) 
    80       zphi0 = -REAL( 0.5 +  800._wp * 1.e3 / rn_dy) 
     80      ! Offsets in km of the first south west f-point:  
     81      roffsetx = -1700._wp 
     82      roffsety =  -800._wp  
    8183#if defined key_agrif 
    82       IF( .NOT.Agrif_Root() ) THEN  
    83          zlam0 = - REAL( 0.5 + 1700._wp * 1.e3 / rn_dx + nbghostcells) & 
    84                & + REAL((nbghostcells + Agrif_Ix() - 1)*Agrif_irhox())   
    85          zphi0 = - REAL( 0.5 +  800._wp * 1.e3 / rn_dy + nbghostcells) & 
    86                & + REAL((nbghostcells + Agrif_Iy() - 1)*Agrif_irhoy())   
    87       ENDIF  
     84      IF( .NOT.Agrif_Root() ) THEN 
     85         ! deduce offset from parent: 
     86         roffsetx = Agrif_Parent(roffsetx) & 
     87              & + (-(nbghostcells_x_w - 1) + (Agrif_Parent(nbghostcells_x_w) & 
     88              & + Agrif_Ix()-2)*Agrif_Rhox()) * 1.e-3 * rn_dx 
     89         roffsety = Agrif_Parent(roffsety) & 
     90              & + (-(nbghostcells_y_s - 1) + (Agrif_Parent(nbghostcells_y_s) & 
     91              & + Agrif_Iy()-2)*Agrif_Rhoy()) * 1.e-3 * rn_dy 
     92      ENDIF 
    8893#endif 
    8994          
    90       DO_2D( 1, 1, 1, 1 ) 
    91          zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos 
    92          ztj = REAL( mjg0_oldcmp(jj) - 1, wp )   ! start at j=0 in the global grid without halos 
     95      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     96         zti = REAL( mig0(ji) - 1, wp )   ! start at i=0 in the global grid without halos 
     97         ztj = REAL( mjg0(jj) - 1, wp )   ! start at j=0 in the global grid without halos 
    9398          
    94          plamt(ji,jj) = rn_dx * 1.e-3 * ( zlam0 + zti ) 
    95          plamu(ji,jj) = rn_dx * 1.e-3 * ( zlam0 + zti + 0.5_wp ) 
     99         plamt(ji,jj) = roffsetx + rn_dx * 1.e-3 * ( zti - 0.5_wp ) 
     100         plamu(ji,jj) = roffsetx + rn_dx * 1.e-3 *   zti  
    96101         plamv(ji,jj) = plamt(ji,jj)  
    97102         plamf(ji,jj) = plamu(ji,jj)  
    98103          
    99          pphit(ji,jj) = rn_dy * 1.e-3 * ( zphi0 + ztj ) 
    100          pphiv(ji,jj) = rn_dy * 1.e-3 * ( zphi0 + ztj + 0.5_wp ) 
     104         pphit(ji,jj) = roffsety + rn_dy * 1.e-3 * ( ztj - 0.5_wp ) 
     105         pphiv(ji,jj) = roffsety + rn_dy * 1.e-3 *   ztj 
    101106         pphiu(ji,jj) = pphit(ji,jj)  
    102107         pphif(ji,jj) = pphiv(ji,jj)  
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/DOME/MY_SRC/usrdef_istate.F90

    r14254 r15574  
    103103            pts(ji,jj,jk,jp_tem) = (15._wp - zrho1) * ptmask(ji,jj,jk) 
    104104! Mass conserving initialization: 
    105             ztd = 15._wp*gdepw_0(ji,jj,jk+1)-0.5*rho0*zn2/(rn_a0*grav)*gdepw_0(ji,jj,jk+1)**2 
    106             ztu = 15._wp*gdepw_0(ji,jj,jk  )-0.5*rho0*zn2/(rn_a0*grav)*gdepw_0(ji,jj,jk  )**2 
    107             pts(ji,jj,jk,jp_tem) = (ztd - ztu)/e3t_0(ji,jj,jk) * ptmask(ji,jj,jk) 
     105!            ztd = 15._wp*gdepw_0(ji,jj,jk+1)-0.5*rho0*zn2/(rn_a0*grav)*gdepw_0(ji,jj,jk+1)**2 
     106!            ztu = 15._wp*gdepw_0(ji,jj,jk  )-0.5*rho0*zn2/(rn_a0*grav)*gdepw_0(ji,jj,jk  )**2 
     107!            pts(ji,jj,jk,jp_tem) = (ztd - ztu)/e3t_0(ji,jj,jk) * ptmask(ji,jj,jk) 
    108108            IF (Agrif_root().AND.(  mjg0(jj) == Nj0glo-2 ) )  THEN 
    109109               pv(ji,jj,jk) = -sqrt(zdb*zh0)*exp(-zxw/zro)*(1._wp-zf) * ptmask(ji,jj,jk) 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/DOME/MY_SRC/usrdef_nam.F90

    r14254 r15574  
    4040CONTAINS 
    4141 
    42    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     42   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4343      !!---------------------------------------------------------------------- 
    4444      !!                     ***  ROUTINE dom_nam  *** 
     
    5252      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5353      !!---------------------------------------------------------------------- 
    54       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    55       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    56       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    57       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     54      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     55      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     56      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     57      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     58      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     59      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    5860      ! 
    5961      INTEGER ::   ios          ! Local integer 
     62      INTEGER ::   ighost_w, ighost_e, ighost_s, ighost_n 
    6063      REAL(wp)::   zlx, zly, zh ! Local scalars 
    6164      !! 
     
    7275         rn_dx = Agrif_Parent(rn_dx)/Agrif_Rhox() 
    7376         rn_dy = Agrif_Parent(rn_dy)/Agrif_Rhoy() 
    74          rn_dz = Agrif_Parent(rn_dz) 
    7577         rn_f0 = Agrif_Parent(rn_f0) 
    7678      ENDIF 
     
    8284      kk_cfg = nINT( rn_dx ) 
    8385      ! 
     86#if defined key_agrif  
    8487      IF( Agrif_Root() ) THEN       ! Global Domain size:  DOME  global domain is  2000 km x 850 Km x 3600 m 
     88#endif 
    8589         kpi = NINT( 2000.e3  / rn_dx ) + 2   
    8690         kpj = NINT(  850.e3  / rn_dy ) + 2 + 1  
     91#if defined key_agrif  
    8792      ELSE                          ! Global Domain size: add nbghostcells + 1 "land" point on each side 
    88          kpi  = nbcellsx + 2 * ( nbghostcells + 1 ) 
    89          kpj  = nbcellsy + 2 * ( nbghostcells + 1 ) 
    90 !!$         kpi  = nbcellsx + nbghostcells_x   + nbghostcells_x   + 2 
    91 !!$         kpj  = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 
     93         ! At this stage, child ghosts have not been set 
     94         ighost_w = nbghostcells 
     95         ighost_e = nbghostcells 
     96         ighost_s = nbghostcells 
     97         ighost_n = nbghostcells 
     98         ! In case one sets zoom boundaries over domain edges:  
     99         IF  ( Agrif_Ix() == 2 - Agrif_Parent(nbghostcells_x_w) ) ighost_w = 1  
     100         IF  ( Agrif_Ix() + nbcellsx/AGRIF_Irhox() == Agrif_Parent(Ni0glo)-Agrif_Parent(nbghostcells_x_w) ) ighost_e = 1  
     101         IF  ( Agrif_Iy() == 2 - Agrif_Parent(nbghostcells_y_s) ) ighost_s = 1  
     102         IF  ( Agrif_Iy() + nbcellsy/AGRIF_Irhoy() == Agrif_Parent(Nj0glo)-Agrif_Parent(nbghostcells_y_s) ) ighost_n = 1  
     103         kpi  = nbcellsx + ighost_w + ighost_e 
     104         kpj  = nbcellsy + ighost_s + ighost_n 
     105!! JC: number of ghosts are unknown at this stage ! 
     106!!$         kpi  = nbcellsx + nbghostcells_x_w + nbghostcells_x_e 
     107!!$         kpj  = nbcellsy + nbghostcells_y_s + nbghostcells_y_n  
    92108      ENDIF 
     109#endif 
    93110      kpk = NINT( 3600._wp / rn_dz ) + 1 
    94111      ! 
     
    97114      zh  = (kpk-1)*rn_dz 
    98115      !                             ! Set the lateral boundary condition of the global domain 
    99       kperio = 0                    ! DOME configuration : closed basin 
     116      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! DOME configuration : closed domain 
     117      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
     118      ! 
    100119      !                             ! control print 
    101120      IF(lwp) THEN 
     
    118137         WRITE(numout,*) '      Coriolis frequency                rn_f0 = ', rn_f0, ' s-1' 
    119138         WRITE(numout,*) '   ' 
    120          WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    121          WRITE(numout,*) '      DOME : closed basin            jperio = ', kperio 
    122139      ENDIF 
    123140      ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/DOME/MY_SRC/usrdef_zgr.F90

    r14261 r15574  
    8686      ! at u/v/f-point: averaging zht 
    8787      zhu(:,:) = 600_wp ; zhv(:,:) = 600_wp ; zhf(:,:) = 600_wp 
    88       DO ji = 1, jpim1 
    89          zhu(ji,:) = 0.5_wp * ( zht(ji,:) + zht(ji+1,:) ) 
    90       END DO 
    91       DO jj = 1, jpjm1 
    92          zhv(:,jj) = 0.5_wp * ( zht(:,jj) + zht(:,jj+1) ) 
    93       END DO 
    94       DO jj = 1, jpjm1 
    95          DO ji = 1, jpim1 
    96             zhf(ji,jj) = 0.25_wp * (  zht(ji,jj  ) + zht(ji+1,jj  ) & 
    97                        &            + zht(ji,jj+1) + zht(ji+1,jj+1) )  
    98          END DO 
    99       END DO 
    100       CALL lbc_lnk_multi( 'usrdef_zgr', zhu, 'U', 1.0_wp, zhv, 'V', 1.0_wp, zhf, 'F', 1.0_wp)       
     88      DO_2D( 0, 0, 0, 0 ) 
     89         zhu(ji,jj) =  0.5_wp * ( zht(ji,jj  ) + zht(ji+1,jj  ) ) 
     90         zhv(jj,jj) =  0.5_wp * ( zht(ji,jj  ) + zht(ji  ,jj+1) ) 
     91         zhf(ji,jj) = 0.25_wp * ( zht(ji,jj  ) + zht(ji+1,jj  ) & 
     92                       &        + zht(ji,jj+1) + zht(ji+1,jj+1) )  
     93      END_2D 
     94      CALL lbc_lnk( 'usrdef_zgr', zhu, 'U', 1.0_wp, zhv, 'V', 1.0_wp, zhf, 'F', 1.0_wp)       
    10195      !      
    10296      CALL zgr_z1d( pdept_1d, pdepw_1d, pe3t_1d , pe3w_1d )   ! Reference z-coordinate system 
     
    106100      ! 
    107101      ! no ocean cavities : top ocean level is ONE, except over land 
    108       ! the ocean basin surrounded by land (1 grid-point) set through lbc_lnk call as jperio=0  
     102      ! the ocean basin surrounded by land (1+nn_hls grid-point) set through lbc_lnk call 
    109103      z2d(:,:) = 1._wp                    ! surface ocean is the 1st level 
    110104      WHERE (gphit(:,:)>0._wp) z2d(:,:) = 0._wp 
    111105      ! Dig inlet: 
    112106      WHERE ((gphit(:,:)>0._wp).AND.(glamt(:,:)>-50._wp).AND.(glamt(:,:)<50._wp)) z2d(:,:) = 1._wp 
    113       CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin since jperio = 0 (see userdef_nam.F90) 
     107      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin, see userdef_nam.F90 
    114108      k_top(:,:) = NINT( z2d(:,:) ) 
    115109      ! 
     
    193187            pe3w (ji,jj,ik  ) = pdept(ji,jj,ik  ) - pdept(ji,jj,ik-1)            ! st caution ik > 1 
    194188         END_2D          
    195          !                                   ! bottom scale factors and depth at  U-, V-, UW and VW-points 
    196          !                                   ! usually Computed as the minimum of neighbooring scale factors 
    197          pe3u (:,:,:) = pe3t(:,:,:)          ! HERE DOME configuration :  
    198          pe3v (:,:,:) = pe3t(:,:,:)          !    e3 increases with i-index and identical with j-index 
    199          pe3f (:,:,:) = pe3t(:,:,:)          !    so e3 minimum of (i,i+1) points is (i) point 
    200          pe3uw(:,:,:) = pe3w(:,:,:)          !    in j-direction e3v=e3t and e3f=e3v 
    201          pe3vw(:,:,:) = pe3w(:,:,:)          !    ==>>  no need of lbc_lnk calls 
     189         ! 
     190         DO_3D( 0, 0, 0, 0, 1, jpk )  
     191               pe3u (ji,jj,jk) = MIN( pe3t(ji,jj,jk), pe3t(ji+1,jj,jk) ) 
     192               pe3v (ji,jj,jk) = MIN( pe3t(ji,jj,jk), pe3t(ji,jj+1,jk) ) 
     193               pe3uw(ji,jj,jk) = MIN( pe3w(ji,jj,jk), pe3w(ji+1,jj,jk) ) 
     194               pe3vw(ji,jj,jk) = MIN( pe3w(ji,jj,jk), pe3w(ji,jj+1,jk) ) 
     195         END_3D  
     196         ! 
     197         CALL lbc_lnk('usrdef_zgr', pe3u , 'U', 1._wp, pe3uw, 'U', 1._wp )    
     198         CALL lbc_lnk('usrdef_zgr', pe3v , 'V', 1._wp, pe3vw, 'V', 1._wp )  
     199         ! 
     200         DO jk = 1, jpk                  
     201            WHERE( pe3u (:,:,jk) == 0._wp )   pe3u (:,:,jk) = pe3t_1d(jk) 
     202            WHERE( pe3v (:,:,jk) == 0._wp )   pe3v (:,:,jk) = pe3t_1d(jk) 
     203            WHERE( pe3uw(:,:,jk) == 0._wp )   pe3uw(:,:,jk) = pe3w_1d(jk) 
     204            WHERE( pe3vw(:,:,jk) == 0._wp )   pe3vw(:,:,jk) = pe3w_1d(jk) 
     205         END DO 
     206 
     207         DO_3D( 0, 0, 0, 0, 1, jpk ) 
     208               pe3f(ji,jj,jk) = MIN( pe3v(ji,jj,jk), pe3v(ji+1,jj,jk) ) 
     209         END_3D 
     210         CALL lbc_lnk('usrdef_zgr', pe3f, 'F', 1._wp )       
    202211         !       
    203212      ENDIF 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/DOME/cpp_DOME.fcm

    r14239 r15574  
    1  bld::tool::fppkeys key_xios key_agrif key_linssh 
     1 bld::tool::fppkeys key_xios key_agrif 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/DONUT/EXPREF/namelist_cfg

    r14226 r15574  
    2727      !                    !  (=F) user defined configuration           (F => create/check namusr_def) 
    2828      cn_domcfg = "donut_cfg"  ! domain configuration filename 
     29/ 
     30!----------------------------------------------------------------------- 
     31&namtile        !   parameters of the tiling 
     32!----------------------------------------------------------------------- 
    2933/ 
    3034!----------------------------------------------------------------------- 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICB/EXPREF/namelist_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    5151/ 
    5252!----------------------------------------------------------------------- 
     53&namtile        !   parameters of the tiling 
     54!----------------------------------------------------------------------- 
     55/ 
     56!----------------------------------------------------------------------- 
    5357&namtsd        !    Temperature & Salinity Data  (init/dmp)             (default: OFF) 
    5458!----------------------------------------------------------------------- 
     
    6468/ 
    6569!----------------------------------------------------------------------- 
    66 &namc1d        !   1D configuration options                             ("key_c1d" default: PAPA station) 
    67 !----------------------------------------------------------------------- 
    68 / 
    69 !----------------------------------------------------------------------- 
    70 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
    71 !----------------------------------------------------------------------- 
    72 / 
    73 !----------------------------------------------------------------------- 
    74 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     70&namc1d        !   1D configuration options                             (ln_c1d =T default: PAPA station) 
     71!----------------------------------------------------------------------- 
     72/ 
     73!----------------------------------------------------------------------- 
     74&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
     75!----------------------------------------------------------------------- 
     76/ 
     77!----------------------------------------------------------------------- 
     78&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    7579!----------------------------------------------------------------------- 
    7680 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICB/MY_SRC/usrdef_nam.F90

    r13899 r15574  
    4242CONTAINS 
    4343 
    44    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     44   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4545      !!---------------------------------------------------------------------- 
    4646      !!                     ***  ROUTINE dom_nam  *** 
     
    5454      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5555      !!---------------------------------------------------------------------- 
    56       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    57       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    58       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    59       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     56      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     57      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     58      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     59      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     60      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     61      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    6062      ! 
    6163      INTEGER ::   ios   ! Local integer 
     
    7880      ! 
    7981      !                             ! Set the lateral boundary condition of the global domain 
    80       kperio = 0                    ! ICB configuration : box 
     82      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! ICB configuration : closed domain 
     83      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
    8184      ! 
    8285      !                             ! control print 
     
    99102         WRITE(numout,*) '                                               jpkglo   = ', kpk 
    100103         WRITE(numout,*) '   ' 
    101          WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    102          WRITE(numout,*) '      ICB : closed basin                    jperio   = ', kperio 
    103104      ENDIF 
    104105      ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_ADV1D/EXPREF/namelist_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    4949      !                     !  (=F) user defined configuration  ==>>>  see usrdef(_...) modules 
    5050      cn_domcfg = "ICE_ADV1D_domcfg"    ! domain configuration filename 
     51/ 
     52!----------------------------------------------------------------------- 
     53&namtile        !   parameters of the tiling 
     54!----------------------------------------------------------------------- 
    5155/ 
    5256!!====================================================================== 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_ADV1D/EXPREF/namelist_cfg_120pts

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_ADV1D/EXPREF/namelist_cfg_240pts

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_ADV1D/EXPREF/namelist_cfg_60pts

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_ADV1D/MY_SRC/usrdef_nam.F90

    r13286 r15574  
    3939CONTAINS 
    4040 
    41    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     41   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4242      !!---------------------------------------------------------------------- 
    4343      !!                     ***  ROUTINE dom_nam  *** 
     
    5151      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5252      !!---------------------------------------------------------------------- 
    53       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    54       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    55       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    56       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     53      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     54      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     55      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     56      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     57      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     58      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    5759      ! 
    5860      INTEGER ::   ios       ! Local integer 
     
    7880      zly = kpj*rn_dy*1.e-3 
    7981      !                             ! Set the lateral boundary condition of the global domain 
    80       kperio = 0                    ! ICE_ADV1D configuration : bi-periodic basin 
     82      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! ICE_ADV1D configuration : closed domain 
     83      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
     84      ! 
    8185      !                             ! control print 
    8286      IF(lwp) THEN 
     
    9599         WRITE(numout,*) '         Coriolis:', ln_corio 
    96100         WRITE(numout,*) '   ' 
    97          WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    98          WRITE(numout,*) '      ICE_ADV1D : closed basin                 jperio = ', kperio 
    99101      ENDIF 
    100102      ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_ADV2D/EXPREF/namelist_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    4949      !                     !  (=F) user defined configuration  ==>>>  see usrdef(_...) modules 
    5050      cn_domcfg = "ICE_ADV2D_domcfg"    ! domain configuration filename 
     51/ 
     52!----------------------------------------------------------------------- 
     53&namtile        !   parameters of the tiling 
     54!----------------------------------------------------------------------- 
    5155/ 
    5256!!====================================================================== 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_ADV2D/MY_SRC/usrdef_nam.F90

    r13286 r15574  
    4040CONTAINS 
    4141 
    42    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     42   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4343      !!---------------------------------------------------------------------- 
    4444      !!                     ***  ROUTINE dom_nam  *** 
     
    5252      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5353      !!---------------------------------------------------------------------- 
    54       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    55       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    56       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    57       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     54      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     55      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     56      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes  
     57      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     58      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     59      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    5860      ! 
    5961      INTEGER ::   ios       ! Local integer 
     
    8688         kpj = NINT( 300.e3 / rn_dy ) - 1 
    8789      ELSE                           ! Global Domain size: add nbghostcells + 1 "land" point on each side 
    88          kpi  = nbcellsx + nbghostcells_x   + nbghostcells_x  + 2 
     90         kpi  = nbcellsx + nbghostcells_x_w + nbghostcells_x_e + 2 
    8991         kpj  = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 
    9092      ENDIF 
     
    9698      zly = kpj*rn_dy*1.e-3 
    9799      ! 
    98       IF( Agrif_Root() ) THEN   ;   kperio = 7     ! ICE_AGRIF configuration : bi-periodic basin 
    99       ELSE                      ;   kperio = 0     ! closed periodicity for the zoom 
     100      IF( Agrif_Root() ) THEN   ;   ldIperio =  .TRUE.   ;   ldJperio =  .TRUE.     ! ICE_ADV2D configuration : bi-periodic basin 
     101      ELSE                      ;   ldIperio = .FALSE.   ;   ldJperio = .FALSE.     ! closed periodicity for the zoom 
    100102      ENDIF 
     103      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
     104      ! 
    101105      !                             ! control print 
    102106      IF(lwp) THEN 
     
    115119         WRITE(numout,*) '         Coriolis:', ln_corio 
    116120         WRITE(numout,*) '   ' 
    117          WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    118          WRITE(numout,*) '      ICE_ADV2D : bi-periodic basin            jperio = ', kperio 
    119121      ENDIF 
    120122      ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_AGRIF/EXPREF/1_namelist_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    4949      !                     !  (=F) user defined configuration  ==>>>  see usrdef(_...) modules 
    5050      cn_domcfg = "ICE_AGRIF_domcfg"    ! domain configuration filename 
     51/ 
     52!----------------------------------------------------------------------- 
     53&namtile        !   parameters of the tiling 
     54!----------------------------------------------------------------------- 
    5155/ 
    5256!!====================================================================== 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_AGRIF/EXPREF/AGRIF_FixedGrids.in

    r13286 r15574  
    111 
    2 33 62 33 62 3 3 3 
     234 63 34 63 3 3 3 
    330 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_AGRIF/EXPREF/make_INITICE.py

    r10516 r15574  
    2020# Reading coordinates file 
    2121nccoord=netcdf(fcoord,'r') 
    22 nav_lon=nccoord.variables['nav_lon'] 
    23 nav_lat=nccoord.variables['nav_lat'] 
     22nav_lon=nccoord.variables['x'] 
     23nav_lat=nccoord.variables['y'] 
    2424time_counter=1 
    2525LON1= nav_lon.shape[1] 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_AGRIF/EXPREF/namelist_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    4949      !                     !  (=F) user defined configuration  ==>>>  see usrdef(_...) modules 
    5050      cn_domcfg = "ICE_AGRIF_domcfg"    ! domain configuration filename 
     51/ 
     52!----------------------------------------------------------------------- 
     53&namtile        !   parameters of the tiling 
     54!----------------------------------------------------------------------- 
    5155/ 
    5256!!====================================================================== 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_AGRIF/MY_SRC/usrdef_hgr.F90

    r14223 r15574  
    2323   IMPLICIT NONE 
    2424   PRIVATE 
     25 
     26   REAL(wp) :: roffsetx, roffsety ! Offset in km to first f-point 
    2527 
    2628   PUBLIC   usr_def_hgr   ! called by domhgr.F90 
     
    5052      !!                without Coriolis force (f=0) 
    5153      !! 
    52       !! ** Action  : - define longitude & latitude of t-, u-, v- and f-points (in degrees)  
     54      !! ** Action  : - define longitude & latitude of t-, u-, v- and f-points (in kms)  
    5355      !!              - define coriolis parameter at f-point if the domain in not on the sphere (on beta-plane) 
    5456      !!              - define i- & j-scale factors at t-, u-, v- and f-points (in meters) 
     
    6567      ! 
    6668      INTEGER  ::   ji, jj     ! dummy loop indices 
    67       REAL(wp) ::   zphi0, zlam0, zbeta, zf0 
     69      REAL(wp) ::   zbeta, zf0 
    6870      REAL(wp) ::   zti, ztj   ! local scalars 
    6971      !!------------------------------------------------------------------------------- 
     
    7476      IF(lwp) WRITE(numout,*) '          f-plane with irregular grid-spacing (+- 10%)' 
    7577      IF(lwp) WRITE(numout,*) '          the max is given by rn_dx and rn_dy'  
     78      ! 
     79      ! 
     80      ! Position coordinates (in kilometers) 
     81      !                          ========== 
     82      ! Offset is given at first f-point, i.e. at (i,j) = (nn_hls+1, nn_hls+1) 
     83      ! Here we assume the grid is centred around a T-point at the middle of 
     84      ! of the domain (hence domain size is odd) 
     85      roffsetx = (-REAL(Ni0glo-1, wp) + 1._wp) * 0.5 * 1.e-3 * rn_dx 
     86      roffsety = (-REAL(Nj0glo-1, wp) + 1._wp) * 0.5 * 1.e-3 * rn_dy 
     87#if defined key_agrif 
     88      IF( .NOT.Agrif_Root() ) THEN 
     89         ! deduce offset from parent: 
     90         roffsetx = Agrif_Parent(roffsetx) & 
     91            & + (-(nbghostcells_x_w - 1) + (Agrif_Parent(nbghostcells_x_w) & 
     92            & + Agrif_Ix()-2)*Agrif_Rhox()) * 1.e-3 * rn_dx 
     93         roffsety = Agrif_Parent(roffsety) & 
     94            & + (-(nbghostcells_y_s - 1) + (Agrif_Parent(nbghostcells_y_s) & 
     95            & + Agrif_Iy()-2)*Agrif_Rhoy()) * 1.e-3 * rn_dy 
     96      ENDIF 
     97#endif 
     98      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     99         zti = REAL( mig0(ji)-1, wp )  ! start at i=0 in the global grid without halos 
     100         ztj = REAL( mjg0(jj)-1, wp )  ! start at j=0 in the global grid without halos 
    76101 
    77       !                          ========== 
    78 #if defined key_agrif  
    79       IF( Agrif_Root() ) THEN 
    80 #endif 
    81          zlam0 = -REAL(Ni0glo, wp) * 0.5 * 1.e-3 * rn_dx 
    82          zphi0 = -REAL(Nj0glo, wp) * 0.5 * 1.e-3 * rn_dy 
    83 #if defined key_agrif  
    84       ELSE 
    85          ! ! let lower left longitude and latitude from parent 
    86 !clem         zlam0  = Agrif_Parent(zlam0) + (Agrif_ix())*Agrif_Parent(rn_dx) * 1.e-5 
    87 !clem         zphi0  = Agrif_Parent(zphi0) + (Agrif_iy())*Agrif_Parent(rn_dy) * 1.e-5 
    88          zlam0 = ( 0.5_wp - REAL(Ni0glo, wp) * 0.5 ) * 1.e-3 * Agrif_irhox() * rn_dx  & 
    89             &  + ( Agrif_Ix() + nbghostcells - 1 ) * Agrif_irhox() * rn_dx * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dx * 1.e-3 
    90          zphi0 = ( 0.5_wp - REAL(Nj0glo, wp) * 0.5 ) * 1.e-3 * Agrif_irhoy() * rn_dy  & 
    91             &  + ( Agrif_Iy() + nbghostcells - 1 ) * Agrif_irhoy() * rn_dy * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dy * 1.e-3 
    92       ENDIF 
    93 #endif          
     102         plamt(ji,jj) = roffsetx + rn_dx * 1.e-3 * ( zti - 0.5_wp ) 
     103         plamu(ji,jj) = roffsetx + rn_dx * 1.e-3 *   zti 
     104         plamv(ji,jj) = plamt(ji,jj) 
     105         plamf(ji,jj) = plamu(ji,jj) 
    94106 
    95       DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    96          zti = REAL( mig0(ji), wp ) - 0.5_wp  ! start at i=0.5 in the global grid without halos 
    97          ztj = REAL( mjg0(jj), wp ) - 0.5_wp  ! start at j=0.5 in the global grid without halos 
    98            
    99          plamt(ji,jj) = zlam0 + rn_dx * 1.e-3 *   zti 
    100          plamu(ji,jj) = zlam0 + rn_dx * 1.e-3 * ( zti + 0.5_wp ) 
    101          plamv(ji,jj) = plamt(ji,jj)  
    102          plamf(ji,jj) = plamu(ji,jj)  
    103           
    104          pphit(ji,jj) = zphi0 + rn_dy * 1.e-3 *   ztj 
    105          pphiv(ji,jj) = zphi0 + rn_dy * 1.e-3 * ( ztj + 0.5_wp ) 
    106          pphiu(ji,jj) = pphit(ji,jj)  
    107          pphif(ji,jj) = pphiv(ji,jj)  
     107         pphit(ji,jj) = roffsety + rn_dy * 1.e-3 * ( ztj - 0.5_wp ) 
     108         pphiv(ji,jj) = roffsety + rn_dy * 1.e-3 *   ztj 
     109         pphiu(ji,jj) = pphit(ji,jj) 
     110         pphif(ji,jj) = pphiv(ji,jj) 
    108111      END_2D 
    109           
    110          ! Horizontal scale factors (in meters) 
    111          !                              ====== 
     112      ! 
     113      ! Horizontal scale factors (in meters) 
     114      !                              ====== 
    112115!! ==> EITHER 1) variable scale factors 
    113116!! clem: This can be used with a 1proc simulation but I think it breaks repro when >1procs are used       
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_AGRIF/MY_SRC/usrdef_nam.F90

    r14223 r15574  
    4040CONTAINS 
    4141 
    42    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     42   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4343      !!---------------------------------------------------------------------- 
    4444      !!                     ***  ROUTINE dom_nam  *** 
     
    5252      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5353      !!---------------------------------------------------------------------- 
    54       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    55       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    56       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    57       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     54      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     55      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     56      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes  
     57      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     58      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     59      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    5860      ! 
    5961      INTEGER ::   ios       ! Local integer 
     
    8688         kpj = NINT( 300.e3 / rn_dy ) - 3 
    8789      ELSE                           ! Global Domain size: add nbghostcells + 1 "land" point on each side 
    88          kpi  = nbcellsx + 2 * ( nbghostcells + 1 ) 
    89          kpj  = nbcellsy + 2 * ( nbghostcells + 1 ) 
    90 !!$         kpi  = nbcellsx + nbghostcells_x   + nbghostcells_x   + 2 
     90         kpi  = nbcellsx + 2 * nbghostcells 
     91         kpj  = nbcellsy + 2 * nbghostcells 
     92!! JC: number of ghosts unknown at this tage 
     93!!$         kpi  = nbcellsx + nbghostcells_x_w + nbghostcells_x_e + 2 
    9194!!$         kpj  = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 
    9295      ENDIF 
     
    98101      zly = kpj*rn_dy*1.e-3 
    99102      ! 
    100       IF( Agrif_Root() ) THEN   ;   kperio = 7     ! ICE_AGRIF configuration : bi-periodic basin 
    101       ELSE                      ;   kperio = 0     ! closed periodicity for the zoom 
     103      IF( Agrif_Root() ) THEN   ;   ldIperio =  .TRUE.   ;   ldJperio =  .TRUE.     ! ICE_AGRIF configuration : bi-periodic basin 
     104      ELSE                      ;   ldIperio = .FALSE.   ;   ldJperio = .FALSE.     ! closed periodicity for the zoom 
    102105      ENDIF 
     106      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
     107      ! 
    103108      !                             ! control print 
    104109      IF(lwp) THEN 
     
    117122         WRITE(numout,*) '         Coriolis:', ln_corio 
    118123         WRITE(numout,*) '   ' 
    119          WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    120          WRITE(numout,*) '      ICE_AGRIF : bi-periodic basin            jperio = ', kperio 
    121124      ENDIF 
    122125      ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_RHEO/EXPREF/namelist_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    4848   ln_read_cfg = .false.    !  (=T) read the domain configuration file 
    4949      !                     !  (=F) user defined configuration  ==>>>  see usrdef(_...) modules 
     50/ 
     51!----------------------------------------------------------------------- 
     52&namtile        !   parameters of the tiling 
     53!----------------------------------------------------------------------- 
    5054/ 
    5155!!====================================================================== 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_RHEO/MY_SRC/icedyn_rhg_eap.F90

    r14120 r15574  
    5858 
    5959   REAL(wp), DIMENSION(nx_yield, ny_yield, na_yield) ::   s11r, s12r, s22r, s11s, s12s, s22s 
    60  
    61    !! * Substitutions 
    62 #  include "do_loop_substitute.h90" 
    63 #  include "domzgr_substitute.h90" 
     60   REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   fimask   ! mask at F points for the ice 
    6461 
    6562   !! for convergence tests 
    6663   INTEGER ::   ncvgid   ! netcdf file id 
    6764   INTEGER ::   nvarid   ! netcdf variable id 
    68    REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   aimsk00 
    69    REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   eap_res  , aimsk15 
     65 
     66   !! * Substitutions 
     67#  include "do_loop_substitute.h90" 
    7068   !!---------------------------------------------------------------------- 
    7169   !! NEMO/ICE 4.0 , NEMO Consortium (2018) 
     
    182180      REAL(wp), DIMENSION(jpi,jpj) ::   ztaux_base, ztauy_base          ! ice-bottom stress at U-V points (landfast) 
    183181      ! 
     182      REAL(wp), DIMENSION(jpi,jpj) ::   zmsk00, zmsk15 
    184183      REAL(wp), DIMENSION(jpi,jpj) ::   zmsk01x, zmsk01y                ! dummy arrays 
    185184      REAL(wp), DIMENSION(jpi,jpj) ::   zmsk00x, zmsk00y                ! mask for ice presence 
    186       REAL(wp), DIMENSION(jpi,jpj) ::   zfmask                          ! mask at F points for the ice 
    187185 
    188186      REAL(wp), PARAMETER          ::   zepsi  = 1.0e-20_wp             ! tolerance parameter 
     
    205203      IF( kt == nit000 .AND. lwp )   WRITE(numout,*) '-- ice_dyn_rhg_eap: EAP sea-ice rheology' 
    206204      ! 
    207       IF( kt == nit000 )  THEN  
    208          ! 
    209          ! for diagnostics  
    210          ALLOCATE( aimsk00(jpi,jpj) ) 
    211          ! for convergence tests 
    212          IF( nn_rhg_chkcvg > 0 ) ALLOCATE( eap_res(jpi,jpj), aimsk15(jpi,jpj) ) 
    213       ENDIF 
    214       ! 
     205      ! for diagnostics and convergence tests 
    215206      DO_2D( 1, 1, 1, 1 ) 
    216          aimsk00(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06  ) ) ! 1 if ice    , 0 if no ice 
     207         zmsk00(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06  ) ) ! 1 if ice    , 0 if no ice 
    217208      END_2D 
    218209      IF( nn_rhg_chkcvg > 0 ) THEN 
    219210         DO_2D( 1, 1, 1, 1 ) 
    220             aimsk15(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - 0.15_wp ) ) ! 1 if 15% ice, 0 if less 
     211            zmsk15(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - 0.15_wp ) ) ! 1 if 15% ice, 0 if less 
    221212         END_2D 
    222213      ENDIF 
    223214      ! 
    224 !!gm for Clem:  OPTIMIZATION:  I think zfmask can be computed one for all at the initialization.... 
    225215      !------------------------------------------------------------------------------! 
    226216      ! 0) mask at F points for the ice 
    227217      !------------------------------------------------------------------------------! 
    228       ! ocean/land mask 
    229       DO_2D( 1, 0, 1, 0 ) 
    230          zfmask(ji,jj) = tmask(ji,jj,1) * tmask(ji+1,jj,1) * tmask(ji,jj+1,1) * tmask(ji+1,jj+1,1) 
    231       END_2D 
    232       CALL lbc_lnk( 'icedyn_rhg_eap', zfmask, 'F', 1._wp ) 
    233  
    234       ! Lateral boundary conditions on velocity (modify zfmask) 
    235       DO_2D( 0, 0, 0, 0 ) 
    236          IF( zfmask(ji,jj) == 0._wp ) THEN 
    237             zfmask(ji,jj) = rn_ishlat * MIN( 1._wp , MAX( umask(ji,jj,1), umask(ji,jj+1,1), & 
    238                &                                          vmask(ji,jj,1), vmask(ji+1,jj,1) ) ) 
     218      IF( kt == nit000 ) THEN 
     219         ! ocean/land mask 
     220         ALLOCATE( fimask(jpi,jpj) ) 
     221         IF( rn_ishlat == 0._wp ) THEN 
     222            DO_2D( 0, 0, 0, 0 ) 
     223               fimask(ji,jj) = tmask(ji,jj,1) * tmask(ji+1,jj,1) * tmask(ji,jj+1,1) * tmask(ji+1,jj+1,1) 
     224            END_2D 
     225         ELSE 
     226            DO_2D( 0, 0, 0, 0 ) 
     227               fimask(ji,jj) = tmask(ji,jj,1) * tmask(ji+1,jj,1) * tmask(ji,jj+1,1) * tmask(ji+1,jj+1,1) 
     228               ! Lateral boundary conditions on velocity (modify fimask) 
     229               IF( fimask(ji,jj) == 0._wp ) THEN 
     230                  fimask(ji,jj) = rn_ishlat * MIN( 1._wp , MAX( umask(ji,jj,1), umask(ji,jj+1,1), & 
     231                     &                                          vmask(ji,jj,1), vmask(ji+1,jj,1) ) ) 
     232               ENDIF 
     233            END_2D 
    239234         ENDIF 
    240       END_2D 
    241       DO jj = 2, jpjm1 
    242          IF( zfmask(1,jj) == 0._wp ) THEN 
    243             zfmask(1  ,jj) = rn_ishlat * MIN( 1._wp , MAX( vmask(2,jj,1), umask(1,jj+1,1), umask(1,jj,1) ) ) 
    244          ENDIF 
    245          IF( zfmask(jpi,jj) == 0._wp ) THEN 
    246             zfmask(jpi,jj) = rn_ishlat * MIN( 1._wp , MAX( umask(jpi,jj+1,1), vmask(jpim1,jj,1), umask(jpi,jj-1,1) ) ) 
    247          ENDIF 
    248       END DO 
    249       DO ji = 2, jpim1 
    250          IF( zfmask(ji,1) == 0._wp ) THEN 
    251             zfmask(ji, 1 ) = rn_ishlat * MIN( 1._wp , MAX( vmask(ji+1,1,1), umask(ji,2,1), vmask(ji,1,1) ) ) 
    252          ENDIF 
    253          IF( zfmask(ji,jpj) == 0._wp ) THEN 
    254             zfmask(ji,jpj) = rn_ishlat * MIN( 1._wp , MAX( vmask(ji+1,jpj,1), vmask(ji-1,jpj,1), umask(ji,jpjm1,1) ) ) 
    255          ENDIF 
    256       END DO 
    257       CALL lbc_lnk( 'icedyn_rhg_eap', zfmask, 'F', 1.0_wp ) 
     235         CALL lbc_lnk( 'icedyn_rhg_eap', fimask, 'F', 1.0_wp ) 
     236      ENDIF 
    258237 
    259238      !------------------------------------------------------------------------------! 
     
    354333 
    355334      END_2D 
    356       CALL lbc_lnk_multi( 'icedyn_rhg_eap', zmf, 'T', 1.0_wp, zdt_m, 'T', 1.0_wp ) 
     335      CALL lbc_lnk( 'icedyn_rhg_eap', zmf, 'T', 1.0_wp, zdt_m, 'T', 1.0_wp ) 
    357336      ! 
    358337      !                                  !== Landfast ice parameterization ==! 
     
    405384            zds(ji,jj) = ( ( u_ice(ji,jj+1) * r1_e1u(ji,jj+1) - u_ice(ji,jj) * r1_e1u(ji,jj) ) * e1f(ji,jj) * e1f(ji,jj)   & 
    406385               &         + ( v_ice(ji+1,jj) * r1_e2v(ji+1,jj) - v_ice(ji,jj) * r1_e2v(ji,jj) ) * e2f(ji,jj) * e2f(ji,jj)   & 
    407                &         ) * r1_e1e2f(ji,jj) * zfmask(ji,jj) 
     386               &         ) * r1_e1e2f(ji,jj) * fimask(ji,jj) 
    408387 
    409388         END_2D 
     
    492471            zs2(ji,jj) = ( zs2(ji,jj) * zalph1 + zstressmtmp ) * z1_alph1 
    493472         END_2D 
    494          CALL lbc_lnk_multi( 'icedyn_rhg_eap', zstress12tmp, 'T', 1.0_wp , paniso_11, 'T', 1.0_wp , paniso_12, 'T', 1.0_wp) 
     473         CALL lbc_lnk( 'icedyn_rhg_eap', zstress12tmp, 'T', 1.0_wp , paniso_11, 'T', 1.0_wp , paniso_12, 'T', 1.0_wp) 
    495474 
    496475        ! Save beta at T-points for further computations 
     
    520499 
    521500         END_2D 
    522          CALL lbc_lnk_multi( 'icedyn_rhg_eap', zs1, 'T', 1.0_wp, zs2, 'T', 1.0_wp, zs12, 'F', 1.0_wp ) 
     501         CALL lbc_lnk( 'icedyn_rhg_eap', zs1, 'T', 1.0_wp, zs2, 'T', 1.0_wp, zs12, 'F', 1.0_wp ) 
    523502 
    524503         ! --- Ice internal stresses (Appendix C of Hunke and Dukowicz, 2002) --- ! 
     
    782761 
    783762         ! convergence test 
    784          IF( nn_rhg_chkcvg == 2 )   CALL rhg_cvg_eap( kt, jter, nn_nevp, u_ice, v_ice, zu_ice, zv_ice ) 
     763         IF( nn_rhg_chkcvg == 2 )   CALL rhg_cvg_eap( kt, jter, nn_nevp, u_ice, v_ice, zu_ice, zv_ice, zmsk15 ) 
    785764         ! 
    786765         !                                                ! ==================== ! 
     
    799778         zds(ji,jj) = ( ( u_ice(ji,jj+1) * r1_e1u(ji,jj+1) - u_ice(ji,jj) * r1_e1u(ji,jj) ) * e1f(ji,jj) * e1f(ji,jj)   & 
    800779            &         + ( v_ice(ji+1,jj) * r1_e2v(ji+1,jj) - v_ice(ji,jj) * r1_e2v(ji,jj) ) * e2f(ji,jj) * e2f(ji,jj)   & 
    801             &         ) * r1_e1e2f(ji,jj) * zfmask(ji,jj) 
     780            &         ) * r1_e1e2f(ji,jj) * fimask(ji,jj) 
    802781 
    803782      END_2D 
     
    832811 
    833812      END_2D 
    834       CALL lbc_lnk_multi( 'icedyn_rhg_eap', pshear_i, 'T', 1.0_wp, pdivu_i, 'T', 1.0_wp, pdelta_i, 'T', 1.0_wp, & 
    835          &                                    zten_i, 'T', 1.0_wp, zs1    , 'T', 1.0_wp, zs2     , 'T', 1.0_wp, & 
    836          &                                      zs12, 'F', 1.0_wp ) 
     813      CALL lbc_lnk( 'icedyn_rhg_eap', pshear_i, 'T', 1.0_wp, pdivu_i, 'T', 1.0_wp, pdelta_i, 'T', 1.0_wp, & 
     814         &                              zten_i, 'T', 1.0_wp, zs1    , 'T', 1.0_wp, zs2     , 'T', 1.0_wp, & 
     815         &                                zs12, 'F', 1.0_wp ) 
    837816 
    838817      ! --- Store the stress tensor for the next time step --- ! 
     
    849828         & iom_use('utau_bi') .OR. iom_use('vtau_bi') ) THEN 
    850829         ! 
    851          CALL lbc_lnk_multi( 'icedyn_rhg_eap', ztaux_oi, 'U', -1.0_wp, ztauy_oi, 'V', -1.0_wp, ztaux_ai, 'U', -1.0_wp, & 
    852             &                                  ztauy_ai, 'V', -1.0_wp, ztaux_bi, 'U', -1.0_wp, ztauy_bi, 'V', -1.0_wp ) 
    853          ! 
    854          CALL iom_put( 'utau_oi' , ztaux_oi * aimsk00 ) 
    855          CALL iom_put( 'vtau_oi' , ztauy_oi * aimsk00 ) 
    856          CALL iom_put( 'utau_ai' , ztaux_ai * aimsk00 ) 
    857          CALL iom_put( 'vtau_ai' , ztauy_ai * aimsk00 ) 
    858          CALL iom_put( 'utau_bi' , ztaux_bi * aimsk00 ) 
    859          CALL iom_put( 'vtau_bi' , ztauy_bi * aimsk00 ) 
     830         CALL lbc_lnk( 'icedyn_rhg_eap', ztaux_oi, 'U', -1.0_wp, ztauy_oi, 'V', -1.0_wp, ztaux_ai, 'U', -1.0_wp, & 
     831            &                            ztauy_ai, 'V', -1.0_wp, ztaux_bi, 'U', -1.0_wp, ztauy_bi, 'V', -1.0_wp ) 
     832         ! 
     833         CALL iom_put( 'utau_oi' , ztaux_oi * zmsk00 ) 
     834         CALL iom_put( 'vtau_oi' , ztauy_oi * zmsk00 ) 
     835         CALL iom_put( 'utau_ai' , ztaux_ai * zmsk00 ) 
     836         CALL iom_put( 'vtau_ai' , ztauy_ai * zmsk00 ) 
     837         CALL iom_put( 'utau_bi' , ztaux_bi * zmsk00 ) 
     838         CALL iom_put( 'vtau_bi' , ztauy_bi * zmsk00 ) 
    860839      ENDIF 
    861840 
    862841      ! --- divergence, shear and strength --- ! 
    863       IF( iom_use('icediv') )   CALL iom_put( 'icediv' , pdivu_i  * aimsk00 )   ! divergence 
    864       IF( iom_use('iceshe') )   CALL iom_put( 'iceshe' , pshear_i * aimsk00 )   ! shear 
    865       IF( iom_use('icedlt') )   CALL iom_put( 'icedlt' , pdelta_i * aimsk00 )   ! delta 
    866       IF( iom_use('icestr') )   CALL iom_put( 'icestr' , strength * aimsk00 )   ! strength 
     842      IF( iom_use('icediv') )   CALL iom_put( 'icediv' , pdivu_i  * zmsk00 )   ! divergence 
     843      IF( iom_use('iceshe') )   CALL iom_put( 'iceshe' , pshear_i * zmsk00 )   ! shear 
     844      IF( iom_use('icedlt') )   CALL iom_put( 'icedlt' , pdelta_i * zmsk00 )   ! delta 
     845      IF( iom_use('icestr') )   CALL iom_put( 'icestr' , strength * zmsk00 )   ! strength 
    867846 
    868847      ! --- Stress tensor invariants (SIMIP diags) --- ! 
     
    889868         ! 
    890869         ! Stress tensor invariants (normal and shear stress N/m) - SIMIP diags - definitions following Coon (1974) and Feltham (2008) 
    891          IF( iom_use('normstr') )   CALL iom_put( 'normstr', zsig_I (:,:) * aimsk00(:,:) ) ! Normal stress 
    892          IF( iom_use('sheastr') )   CALL iom_put( 'sheastr', zsig_II(:,:) * aimsk00(:,:) ) ! Maximum shear stress 
     870         IF( iom_use('normstr') )   CALL iom_put( 'normstr', zsig_I (:,:) * zmsk00(:,:) ) ! Normal stress 
     871         IF( iom_use('sheastr') )   CALL iom_put( 'sheastr', zsig_II(:,:) * zmsk00(:,:) ) ! Maximum shear stress 
    893872 
    894873         DEALLOCATE ( zsig_I, zsig_II ) 
     
    934913      IF( iom_use('yield11') .OR. iom_use('yield12') .OR. iom_use('yield22')) THEN 
    935914 
    936          CALL lbc_lnk_multi( 'icedyn_rhg_eap', zyield11, 'T', 1.0_wp, zyield22, 'T', 1.0_wp, zyield12, 'T', 1.0_wp ) 
    937  
    938          CALL iom_put( 'yield11', zyield11 * aimsk00 ) 
    939          CALL iom_put( 'yield22', zyield22 * aimsk00 ) 
    940          CALL iom_put( 'yield12', zyield12 * aimsk00 ) 
     915         CALL lbc_lnk( 'icedyn_rhg_eap', zyield11, 'T', 1.0_wp, zyield22, 'T', 1.0_wp, zyield12, 'T', 1.0_wp ) 
     916 
     917         CALL iom_put( 'yield11', zyield11 * zmsk00 ) 
     918         CALL iom_put( 'yield22', zyield22 * zmsk00 ) 
     919         CALL iom_put( 'yield12', zyield12 * zmsk00 ) 
    941920      ENDIF 
    942921 
     
    944923      IF( iom_use('aniso') ) THEN 
    945924         CALL lbc_lnk( 'icedyn_rhg_eap', paniso_11, 'T', 1.0_wp ) 
    946          CALL iom_put( 'aniso' , paniso_11 * aimsk00 ) 
     925         CALL iom_put( 'aniso' , paniso_11 * zmsk00 ) 
    947926      ENDIF 
    948927 
     
    951930         & iom_use('corstrx') .OR. iom_use('corstry') .OR. iom_use('intstrx') .OR. iom_use('intstry') ) THEN 
    952931         ! 
    953          CALL lbc_lnk_multi( 'icedyn_rhg_eap', zspgU, 'U', -1.0_wp, zspgV, 'V', -1.0_wp, & 
    954             &                                  zCorU, 'U', -1.0_wp, zCorV, 'V', -1.0_wp, & 
    955             &                                    zfU, 'U', -1.0_wp,   zfV, 'V', -1.0_wp ) 
    956  
    957          CALL iom_put( 'dssh_dx' , zspgU * aimsk00 )   ! Sea-surface tilt term in force balance (x) 
    958          CALL iom_put( 'dssh_dy' , zspgV * aimsk00 )   ! Sea-surface tilt term in force balance (y) 
    959          CALL iom_put( 'corstrx' , zCorU * aimsk00 )   ! Coriolis force term in force balance (x) 
    960          CALL iom_put( 'corstry' , zCorV * aimsk00 )   ! Coriolis force term in force balance (y) 
    961          CALL iom_put( 'intstrx' , zfU   * aimsk00 )   ! Internal force term in force balance (x) 
    962          CALL iom_put( 'intstry' , zfV   * aimsk00 )   ! Internal force term in force balance (y) 
     932         CALL lbc_lnk( 'icedyn_rhg_eap', zspgU, 'U', -1.0_wp, zspgV, 'V', -1.0_wp, & 
     933            &                            zCorU, 'U', -1.0_wp, zCorV, 'V', -1.0_wp, & 
     934            &                              zfU, 'U', -1.0_wp,   zfV, 'V', -1.0_wp ) 
     935 
     936         CALL iom_put( 'dssh_dx' , zspgU * zmsk00 )   ! Sea-surface tilt term in force balance (x) 
     937         CALL iom_put( 'dssh_dy' , zspgV * zmsk00 )   ! Sea-surface tilt term in force balance (y) 
     938         CALL iom_put( 'corstrx' , zCorU * zmsk00 )   ! Coriolis force term in force balance (x) 
     939         CALL iom_put( 'corstry' , zCorV * zmsk00 )   ! Coriolis force term in force balance (y) 
     940         CALL iom_put( 'intstrx' , zfU   * zmsk00 )   ! Internal force term in force balance (x) 
     941         CALL iom_put( 'intstry' , zfV   * zmsk00 )   ! Internal force term in force balance (y) 
    963942      ENDIF 
    964943 
     
    971950         DO_2D( 0, 0, 0, 0 ) 
    972951            ! 2D ice mass, snow mass, area transport arrays (X, Y) 
    973             zfac_x = 0.5 * u_ice(ji,jj) * e2u(ji,jj) * aimsk00(ji,jj) 
    974             zfac_y = 0.5 * v_ice(ji,jj) * e1v(ji,jj) * aimsk00(ji,jj) 
     952            zfac_x = 0.5 * u_ice(ji,jj) * e2u(ji,jj) * zmsk00(ji,jj) 
     953            zfac_y = 0.5 * v_ice(ji,jj) * e1v(ji,jj) * zmsk00(ji,jj) 
    975954 
    976955            zdiag_xmtrp_ice(ji,jj) = rhoi * zfac_x * ( vt_i(ji+1,jj) + vt_i(ji,jj) ) ! ice mass transport, X-component 
     
    985964         END_2D 
    986965 
    987          CALL lbc_lnk_multi( 'icedyn_rhg_eap', zdiag_xmtrp_ice, 'U', -1.0_wp, zdiag_ymtrp_ice, 'V', -1.0_wp, & 
    988             &                                  zdiag_xmtrp_snw, 'U', -1.0_wp, zdiag_ymtrp_snw, 'V', -1.0_wp, & 
    989             &                                  zdiag_xatrp    , 'U', -1.0_wp, zdiag_yatrp    , 'V', -1.0_wp ) 
     966         CALL lbc_lnk( 'icedyn_rhg_eap', zdiag_xmtrp_ice, 'U', -1.0_wp, zdiag_ymtrp_ice, 'V', -1.0_wp, & 
     967            &                            zdiag_xmtrp_snw, 'U', -1.0_wp, zdiag_ymtrp_snw, 'V', -1.0_wp, & 
     968            &                            zdiag_xatrp    , 'U', -1.0_wp, zdiag_yatrp    , 'V', -1.0_wp ) 
    990969 
    991970         CALL iom_put( 'xmtrpice' , zdiag_xmtrp_ice )   ! X-component of sea-ice mass transport (kg/s) 
     
    1006985            IF( ln_aEVP ) THEN   ! output: beta * ( u(t=nn_nevp) - u(t=nn_nevp-1) ) 
    1007986               CALL iom_put( 'uice_cvg', MAX( ABS( u_ice(:,:) - zu_ice(:,:) ) * zbeta(:,:) * umask(:,:,1) , & 
    1008                   &                           ABS( v_ice(:,:) - zv_ice(:,:) ) * zbeta(:,:) * vmask(:,:,1) ) * aimsk15(:,:) ) 
     987                  &                           ABS( v_ice(:,:) - zv_ice(:,:) ) * zbeta(:,:) * vmask(:,:,1) ) * zmsk15(:,:) ) 
    1009988            ELSE                 ! output: nn_nevp * ( u(t=nn_nevp) - u(t=nn_nevp-1) ) 
    1010989               CALL iom_put( 'uice_cvg', REAL( nn_nevp ) * MAX( ABS( u_ice(:,:) - zu_ice(:,:) ) * umask(:,:,1) , & 
    1011                   &                                             ABS( v_ice(:,:) - zv_ice(:,:) ) * vmask(:,:,1) ) * aimsk15(:,:) ) 
     990                  &                                             ABS( v_ice(:,:) - zv_ice(:,:) ) * vmask(:,:,1) ) * zmsk15(:,:) ) 
    1012991            ENDIF 
    1013992         ENDIF 
     
    1017996 
    1018997 
    1019    SUBROUTINE rhg_cvg_eap( kt, kiter, kitermax, pu, pv, pub, pvb ) 
     998   SUBROUTINE rhg_cvg_eap( kt, kiter, kitermax, pu, pv, pub, pvb, pmsk15 ) 
    1020999      !!---------------------------------------------------------------------- 
    10211000      !!                    ***  ROUTINE rhg_cvg_eap  *** 
     
    10321011      INTEGER ,                 INTENT(in) ::   kt, kiter, kitermax       ! ocean time-step index 
    10331012      REAL(wp), DIMENSION(:,:), INTENT(in) ::   pu, pv, pub, pvb          ! now and before velocities 
     1013      REAL(wp), DIMENSION(:,:), INTENT(in) ::   pmsk15 
    10341014      !! 
    10351015      INTEGER           ::   it, idtime, istatus 
     
    10661046         zresm = 0._wp 
    10671047      ELSE 
    1068          DO_2D( 1, 1, 1, 1 ) 
    1069             eap_res(ji,jj) = MAX( ABS( pu(ji,jj) - pub(ji,jj) ) * umask(ji,jj,1), & 
    1070                &               ABS( pv(ji,jj) - pvb(ji,jj) ) * vmask(ji,jj,1) ) * aimsk15(ji,jj) 
     1048         zresm = 0._wp 
     1049         DO_2D( 0, 0, 0, 0 ) 
    10711050            ! cut of the boundary of the box (forced velocities) 
    1072             IF (mjg(jj)<=30 .or. mjg(jj)>970 .or. mig(ji)<=30 .or. mig(ji)>970) THEN 
    1073                eap_res(ji,jj) = 0._wp 
    1074             END IF 
     1051            IF (mjg0(jj)>30 .AND. mjg0(jj)<=970 .AND. mig0(ji)>30 .AND. mig0(ji)<=970) THEN 
     1052               zresm = MAX( zresm, MAX( ABS( pu(ji,jj) - pub(ji,jj) ) * umask(ji,jj,1), & 
     1053                  &                     ABS( pv(ji,jj) - pvb(ji,jj) ) * vmask(ji,jj,1) ) * pmsk15(ji,jj) ) 
     1054            ENDIF 
    10751055         END_2D 
    1076  
    1077          zresm = MAXVAL( eap_res ) 
    10781056         CALL mpp_max( 'icedyn_rhg_evp', zresm )   ! max over the global domain 
    10791057      ENDIF 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_RHEO/MY_SRC/icedyn_rhg_evp.F90

    r14021 r15574  
    4848   PUBLIC   rhg_evp_rst       ! called by icedyn_rhg.F90 
    4949 
    50    !! * Substitutions 
    51 #  include "do_loop_substitute.h90" 
    52 #  include "domzgr_substitute.h90" 
    53  
    5450   !! for convergence tests 
    5551   INTEGER ::   ncvgid   ! netcdf file id 
    5652   INTEGER ::   nvarid   ! netcdf variable id 
    57    REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zmsk00, zmsk15 
     53   REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   fimask   ! mask at F points for the ice 
     54 
     55   !! * Substitutions 
     56#  include "do_loop_substitute.h90" 
    5857   !!---------------------------------------------------------------------- 
    5958   !! NEMO/ICE 4.0 , NEMO Consortium (2018) 
     
    163162      REAL(wp), DIMENSION(jpi,jpj) ::   ztaux_base, ztauy_base          ! ice-bottom stress at U-V points (landfast) 
    164163      ! 
     164      REAL(wp), DIMENSION(jpi,jpj) ::   zmsk00, zmsk15 
    165165      REAL(wp), DIMENSION(jpi,jpj) ::   zmsk01x, zmsk01y                ! dummy arrays 
    166166      REAL(wp), DIMENSION(jpi,jpj) ::   zmsk00x, zmsk00y                ! mask for ice presence 
    167       REAL(wp), DIMENSION(jpi,jpj) ::   zfmask                          ! mask at F points for the ice 
    168167 
    169168      REAL(wp), PARAMETER          ::   zepsi  = 1.0e-20_wp             ! tolerance parameter 
     
    187186      ! 
    188187      ! for diagnostics and convergence tests 
    189       ALLOCATE( zmsk00(jpi,jpj), zmsk15(jpi,jpj) ) 
    190188      DO_2D( 1, 1, 1, 1 ) 
    191189         zmsk00(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06  ) ) ! 1 if ice    , 0 if no ice 
    192          zmsk15(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - 0.15_wp ) ) ! 1 if 15% ice, 0 if less 
    193190      END_2D 
    194       ! 
    195       !!gm for Clem:  OPTIMIZATION:  I think zfmask can be computed one for all at the initialization.... 
     191      IF( nn_rhg_chkcvg > 0 ) THEN 
     192         DO_2D( 1, 1, 1, 1 ) 
     193            zmsk15(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - 0.15_wp ) ) ! 1 if 15% ice, 0 if less 
     194         END_2D 
     195      ENDIF 
     196      ! 
    196197      !------------------------------------------------------------------------------! 
    197198      ! 0) mask at F points for the ice 
    198199      !------------------------------------------------------------------------------! 
    199       ! ocean/land mask 
    200       DO_2D( 1, 0, 1, 0 ) 
    201          zfmask(ji,jj) = tmask(ji,jj,1) * tmask(ji+1,jj,1) * tmask(ji,jj+1,1) * tmask(ji+1,jj+1,1) 
    202       END_2D 
    203       CALL lbc_lnk( 'icedyn_rhg_evp', zfmask, 'F', 1._wp ) 
    204  
    205       ! Lateral boundary conditions on velocity (modify zfmask) 
    206       DO_2D( 0, 0, 0, 0 ) 
    207          IF( zfmask(ji,jj) == 0._wp ) THEN 
    208             zfmask(ji,jj) = rn_ishlat * MIN( 1._wp , MAX( umask(ji,jj,1), umask(ji,jj+1,1), & 
    209                &                                          vmask(ji,jj,1), vmask(ji+1,jj,1) ) ) 
     200      IF( kt == nit000 ) THEN 
     201         ! ocean/land mask 
     202         ALLOCATE( fimask(jpi,jpj) ) 
     203         IF( rn_ishlat == 0._wp ) THEN 
     204            DO_2D( 0, 0, 0, 0 ) 
     205               fimask(ji,jj) = tmask(ji,jj,1) * tmask(ji+1,jj,1) * tmask(ji,jj+1,1) * tmask(ji+1,jj+1,1) 
     206            END_2D 
     207         ELSE 
     208            DO_2D( 0, 0, 0, 0 ) 
     209               fimask(ji,jj) = tmask(ji,jj,1) * tmask(ji+1,jj,1) * tmask(ji,jj+1,1) * tmask(ji+1,jj+1,1) 
     210               ! Lateral boundary conditions on velocity (modify fimask) 
     211               IF( fimask(ji,jj) == 0._wp ) THEN 
     212                  fimask(ji,jj) = rn_ishlat * MIN( 1._wp , MAX( umask(ji,jj,1), umask(ji,jj+1,1), & 
     213                     &                                          vmask(ji,jj,1), vmask(ji+1,jj,1) ) ) 
     214               ENDIF 
     215            END_2D 
    210216         ENDIF 
    211       END_2D 
    212       DO jj = 2, jpjm1 
    213          IF( zfmask(1,jj) == 0._wp ) THEN 
    214             zfmask(1  ,jj) = rn_ishlat * MIN( 1._wp , MAX( vmask(2,jj,1), umask(1,jj+1,1), umask(1,jj,1) ) ) 
    215          ENDIF 
    216          IF( zfmask(jpi,jj) == 0._wp ) THEN 
    217             zfmask(jpi,jj) = rn_ishlat * MIN( 1._wp , MAX( umask(jpi,jj+1,1), vmask(jpim1,jj,1), umask(jpi,jj-1,1) ) ) 
    218         ENDIF 
    219       END DO 
    220       DO ji = 2, jpim1 
    221          IF( zfmask(ji,1) == 0._wp ) THEN 
    222             zfmask(ji, 1 ) = rn_ishlat * MIN( 1._wp , MAX( vmask(ji+1,1,1), umask(ji,2,1), vmask(ji,1,1) ) ) 
    223          ENDIF 
    224          IF( zfmask(ji,jpj) == 0._wp ) THEN 
    225             zfmask(ji,jpj) = rn_ishlat * MIN( 1._wp , MAX( vmask(ji+1,jpj,1), vmask(ji-1,jpj,1), umask(ji,jpjm1,1) ) ) 
    226          ENDIF 
    227       END DO 
    228       CALL lbc_lnk( 'icedyn_rhg_evp', zfmask, 'F', 1._wp ) 
    229  
     217         CALL lbc_lnk( 'icedyn_rhg_evp', fimask, 'F', 1._wp ) 
     218      ENDIF 
    230219      !------------------------------------------------------------------------------! 
    231220      ! 1) define some variables and initialize arrays 
     
    320309 
    321310      END_2D 
    322       CALL lbc_lnk_multi( 'icedyn_rhg_evp', zmf, 'T', 1.0_wp, zdt_m, 'T', 1.0_wp ) 
     311      CALL lbc_lnk( 'icedyn_rhg_evp', zmf, 'T', 1.0_wp, zdt_m, 'T', 1.0_wp ) 
    323312      ! 
    324313      !                                  !== Landfast ice parameterization ==! 
     
    371360            zds(ji,jj) = ( ( u_ice(ji,jj+1) * r1_e1u(ji,jj+1) - u_ice(ji,jj) * r1_e1u(ji,jj) ) * e1f(ji,jj) * e1f(ji,jj)   & 
    372361               &         + ( v_ice(ji+1,jj) * r1_e2v(ji+1,jj) - v_ice(ji,jj) * r1_e2v(ji,jj) ) * e2f(ji,jj) * e2f(ji,jj)   & 
    373                &         ) * r1_e1e2f(ji,jj) * zfmask(ji,jj) 
     362               &         ) * r1_e1e2f(ji,jj) * fimask(ji,jj) 
    374363 
    375364         END_2D 
     
    722711 
    723712         ! convergence test 
    724          IF( nn_rhg_chkcvg == 2 )   CALL rhg_cvg( kt, jter, nn_nevp, u_ice, v_ice, zu_ice, zv_ice ) 
     713         IF( nn_rhg_chkcvg == 2 )   CALL rhg_cvg( kt, jter, nn_nevp, u_ice, v_ice, zu_ice, zv_ice, zmsk15 ) 
    725714         ! 
    726715         !                                                ! ==================== ! 
     
    737726         zds(ji,jj) = ( ( u_ice(ji,jj+1) * r1_e1u(ji,jj+1) - u_ice(ji,jj) * r1_e1u(ji,jj) ) * e1f(ji,jj) * e1f(ji,jj)   & 
    738727            &         + ( v_ice(ji+1,jj) * r1_e2v(ji+1,jj) - v_ice(ji,jj) * r1_e2v(ji,jj) ) * e2f(ji,jj) * e2f(ji,jj)   & 
    739             &         ) * r1_e1e2f(ji,jj) * zfmask(ji,jj) 
     728            &         ) * r1_e1e2f(ji,jj) * fimask(ji,jj) 
    740729 
    741730      END_2D 
     
    770759 
    771760      END_2D 
    772       CALL lbc_lnk_multi( 'icedyn_rhg_evp', pshear_i, 'T', 1._wp, pdivu_i, 'T', 1._wp, pdelta_i, 'T', 1._wp, zten_i, 'T', 1._wp, & 
    773          &                                  zs1     , 'T', 1._wp, zs2    , 'T', 1._wp, zs12    , 'F', 1._wp ) 
     761      CALL lbc_lnk( 'icedyn_rhg_evp', pshear_i, 'T', 1._wp, pdivu_i, 'T', 1._wp, pdelta_i, 'T', 1._wp, zten_i, 'T', 1._wp, & 
     762         &                            zs1     , 'T', 1._wp, zs2    , 'T', 1._wp, zs12    , 'F', 1._wp ) 
    774763       
    775764      ! --- Store the stress tensor for the next time step --- ! 
     
    786775         & iom_use('utau_bi') .OR. iom_use('vtau_bi') ) THEN 
    787776         ! 
    788          CALL lbc_lnk_multi( 'icedyn_rhg_evp', ztaux_oi, 'U', -1.0_wp, ztauy_oi, 'V', -1.0_wp, ztaux_ai, 'U', -1.0_wp, ztauy_ai, 'V', -1.0_wp, & 
    789             &                                  ztaux_bi, 'U', -1.0_wp, ztauy_bi, 'V', -1.0_wp ) 
     777         CALL lbc_lnk( 'icedyn_rhg_evp', ztaux_oi, 'U', -1.0_wp, ztauy_oi, 'V', -1.0_wp,   & 
     778            &                            ztaux_ai, 'U', -1.0_wp, ztauy_ai, 'V', -1.0_wp,   & 
     779            &                            ztaux_bi, 'U', -1.0_wp, ztauy_bi, 'V', -1.0_wp ) 
    790780         ! 
    791781         CALL iom_put( 'utau_oi' , ztaux_oi * zmsk00 ) 
     
    871861         & iom_use('corstrx') .OR. iom_use('corstry') .OR. iom_use('intstrx') .OR. iom_use('intstry') ) THEN 
    872862         ! 
    873          CALL lbc_lnk_multi( 'icedyn_rhg_evp', zspgU, 'U', -1.0_wp, zspgV, 'V', -1.0_wp, & 
    874             &                                  zCorU, 'U', -1.0_wp, zCorV, 'V', -1.0_wp, zfU, 'U', -1.0_wp, zfV, 'V', -1.0_wp ) 
     863         CALL lbc_lnk( 'icedyn_rhg_evp', zspgU, 'U', -1.0_wp, zspgV, 'V', -1.0_wp, & 
     864            &                            zCorU, 'U', -1.0_wp, zCorV, 'V', -1.0_wp, zfU, 'U', -1.0_wp, zfV, 'V', -1.0_wp ) 
    875865 
    876866         CALL iom_put( 'dssh_dx' , zspgU * zmsk00 )   ! Sea-surface tilt term in force balance (x) 
     
    904894         END_2D 
    905895 
    906          CALL lbc_lnk_multi( 'icedyn_rhg_evp', zdiag_xmtrp_ice, 'U', -1.0_wp, zdiag_ymtrp_ice, 'V', -1.0_wp, & 
    907             &                                  zdiag_xmtrp_snw, 'U', -1.0_wp, zdiag_ymtrp_snw, 'V', -1.0_wp, & 
    908             &                                  zdiag_xatrp    , 'U', -1.0_wp, zdiag_yatrp    , 'V', -1.0_wp ) 
     896         CALL lbc_lnk( 'icedyn_rhg_evp', zdiag_xmtrp_ice, 'U', -1.0_wp, zdiag_ymtrp_ice, 'V', -1.0_wp, & 
     897            &                            zdiag_xmtrp_snw, 'U', -1.0_wp, zdiag_ymtrp_snw, 'V', -1.0_wp, & 
     898            &                            zdiag_xatrp    , 'U', -1.0_wp, zdiag_yatrp    , 'V', -1.0_wp ) 
    909899 
    910900         CALL iom_put( 'xmtrpice' , zdiag_xmtrp_ice )   ! X-component of sea-ice mass transport (kg/s) 
     
    931921            ENDIF 
    932922         ENDIF 
    933       ENDIF       
    934       ! 
    935       DEALLOCATE( zmsk00, zmsk15 ) 
     923      ENDIF 
    936924      ! 
    937925   END SUBROUTINE ice_dyn_rhg_evp 
    938926 
    939927 
    940    SUBROUTINE rhg_cvg( kt, kiter, kitermax, pu, pv, pub, pvb ) 
     928   SUBROUTINE rhg_cvg( kt, kiter, kitermax, pu, pv, pub, pvb, pmsk15 ) 
    941929      !!---------------------------------------------------------------------- 
    942930      !!                    ***  ROUTINE rhg_cvg  *** 
     
    953941      INTEGER ,                 INTENT(in) ::   kt, kiter, kitermax       ! ocean time-step index 
    954942      REAL(wp), DIMENSION(:,:), INTENT(in) ::   pu, pv, pub, pvb          ! now and before velocities 
     943      REAL(wp), DIMENSION(:,:), INTENT(in) ::   pmsk15 
    955944      !! 
    956945      INTEGER           ::   it, idtime, istatus 
     
    958947      REAL(wp)          ::   zresm           ! local real  
    959948      CHARACTER(len=20) ::   clname 
    960       REAL(wp), DIMENSION(jpi,jpj) ::   zres           ! check convergence 
    961949      !!---------------------------------------------------------------------- 
    962950 
     
    988976         zresm = 0._wp 
    989977      ELSE 
    990          DO_2D( 1, 1, 1, 1 ) 
    991             zres(ji,jj) = MAX( ABS( pu(ji,jj) - pub(ji,jj) ) * umask(ji,jj,1), & 
    992                &               ABS( pv(ji,jj) - pvb(ji,jj) ) * vmask(ji,jj,1) ) * zmsk15(ji,jj) 
     978         zresm = 0._wp 
     979         DO_2D( 0, 0, 0, 0 ) 
     980            ! cut of the boundary of the box (forced velocities) 
     981            IF (mjg0(jj)>30 .AND. mjg0(jj)<=970 .AND. mig0(ji)>30 .AND. mig0(ji)<=970) THEN 
     982               zresm = MAX( zresm, MAX( ABS( pu(ji,jj) - pub(ji,jj) ) * umask(ji,jj,1), & 
     983                  &                     ABS( pv(ji,jj) - pvb(ji,jj) ) * vmask(ji,jj,1) ) * pmsk15(ji,jj) ) 
     984            ENDIF 
    993985         END_2D 
    994  
    995          ! cut of the boundary of the box (forced velocities) 
    996          IF (mjg(jj)<=30 .or. mjg(jj)>970 .or. mig(ji)<=30 .or. mig(ji)>970) THEN 
    997             zres(ji,jj) = 0._wp 
    998          END IF 
    999  
    1000          zresm = MAXVAL( zres ) 
    1001986         CALL mpp_max( 'icedyn_rhg_evp', zresm )   ! max over the global domain 
    1002987      ENDIF 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_RHEO/MY_SRC/usrdef_nam.F90

    r14021 r15574  
    4040CONTAINS 
    4141 
    42    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     42   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4343      !!---------------------------------------------------------------------- 
    4444      !!                     ***  ROUTINE dom_nam  *** 
     
    5252      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5353      !!---------------------------------------------------------------------- 
    54       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    55       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    56       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    57       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     54      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     55      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     56      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     57      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     58      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     59      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    5860      ! 
    5961      INTEGER ::   ios       ! Local integer 
     
    8183      zly = kpj*rn_dy*1.e-3 
    8284      ! 
    83       kperio = 0     ! closed periodicity for the zoom 
     85      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! ICE_RHEO configuration : closed domain 
     86      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
     87      ! 
    8488      !                             ! control print 
    8589      IF(lwp) THEN 
     
    98102         WRITE(numout,*) '         Coriolis:', ln_corio 
    99103         WRITE(numout,*) '   ' 
    100          WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    101          WRITE(numout,*) '      ICE_RHEO closed basin                    jperio = ', kperio 
    102104      ENDIF 
    103105      ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_RHEO/MY_SRC/usrdef_sbc.F90

    r14273 r15574  
    126126         windv(ji,jj) = Umax/sqrt(d*1000)*(d-2*mjg(jj)*res)/((d-2*mig(ji)*res)**2+(d-2*mjg(jj)*res)**2*Rwind**2)**(1/4)*Rwind*min(kt*30./21600,1.) 
    127127      END_2D 
    128       CALL lbc_lnk_multi( 'usrdef_sbc', windu, 'U', -1., windv, 'V', -1. ) 
     128      CALL lbc_lnk( 'usrdef_sbc', windu, 'U', -1., windv, 'V', -1. ) 
    129129 
    130130      wndm_ice(:,:) = 0._wp      !!gm brutal.... 
     
    156156            &          * ( 0.5 * (windv(ji,jj+1) + windv(ji,jj) ) - r_vfac * v_ice(ji,jj) ) 
    157157      END_2D 
    158       CALL lbc_lnk_multi( 'usrdef_sbc', utau_ice, 'U', -1., vtau_ice, 'V', -1. ) 
     158      CALL lbc_lnk( 'usrdef_sbc', utau_ice, 'U', -1., vtau_ice, 'V', -1. ) 
    159159      ! 
    160160   END SUBROUTINE usrdef_sbc_ice_tau 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP+/EXPREF/namelist_cfg

    r14229 r15574  
    2727!!   namtsd       data: temperature & salinity                          (default: OFF) 
    2828!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    29 !!   namc1d       1D configuration options                              ("key_c1d") 
    30 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    31 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     29!!   namc1d       1D configuration options                              (ln_c1d =T) 
     30!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     31!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    3232!!====================================================================== 
    3333! 
     
    5050!----------------------------------------------------------------------- 
    5151   ln_read_cfg = .true.   !  (=T) read the domain configuration file 
     52/ 
     53!----------------------------------------------------------------------- 
     54&namtile        !   parameters of the tiling 
     55!----------------------------------------------------------------------- 
    5256/ 
    5357!----------------------------------------------------------------------- 
     
    7781/ 
    7882!----------------------------------------------------------------------- 
    79 &namc1d        !   1D configuration options                             ("key_c1d" default: PAPA station) 
    80 !----------------------------------------------------------------------- 
    81 / 
    82 !----------------------------------------------------------------------- 
    83 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
    84 !----------------------------------------------------------------------- 
    85 / 
    86 !----------------------------------------------------------------------- 
    87 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     83&namc1d        !   1D configuration options                             (ln_c1d =T default: PAPA station) 
     84!----------------------------------------------------------------------- 
     85/ 
     86!----------------------------------------------------------------------- 
     87&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
     88!----------------------------------------------------------------------- 
     89/ 
     90!----------------------------------------------------------------------- 
     91&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    8892!----------------------------------------------------------------------- 
    8993 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP+/MY_SRC/dtatsd.F90

    r14090 r15574  
    66   !! History :  OPA  ! 1991-03  ()  Original code 
    77   !!             -   ! 1992-07  (M. Imbard) 
    8    !!            8.0  ! 1999-10  (M.A. Foujols, M. Imbard)  NetCDF FORMAT  
    9    !!   NEMO     1.0  ! 2002-06  (G. Madec)  F90: Free form and module  
     8   !!            8.0  ! 1999-10  (M.A. Foujols, M. Imbard)  NetCDF FORMAT 
     9   !!   NEMO     1.0  ! 2002-06  (G. Madec)  F90: Free form and module 
    1010   !!            3.3  ! 2010-10  (C. Bricaud, S. Masson)  use of fldread 
    1111   !!            3.4  ! 2010-11  (G. Madec, C. Ethe) Merge of dtatem and dtasal + remove CPP keys 
     
    4949      !!---------------------------------------------------------------------- 
    5050      !!                   ***  ROUTINE dta_tsd_init  *** 
    51       !!                     
    52       !! ** Purpose :   initialisation of T & S input data  
    53       !!  
     51      !! 
     52      !! ** Purpose :   initialisation of T & S input data 
     53      !! 
    5454      !! ** Method  : - Read namtsd namelist 
    55       !!              - allocates T & S data structure  
     55      !!              - allocates T & S data structure 
    5656      !!---------------------------------------------------------------------- 
    5757      LOGICAL, INTENT(in), OPTIONAL ::   ld_tradmp   ! force the initialization when tradp is used 
     
    7777 
    7878      IF( PRESENT( ld_tradmp ) )   ln_tsd_dmp = .TRUE.     ! forces the initialization when tradmp is used 
    79        
     79 
    8080      IF(lwp) THEN                  ! control print 
    8181         WRITE(numout,*) 
     
    114114            CALL ctl_stop( 'dta_tsd : unable to allocate T & S data arrays' )   ;   RETURN 
    115115         ENDIF 
    116          ! 
    117116         !                         ! fill sf_tsd with sn_tem & sn_sal and control print 
    118117         slf_i(jp_tem) = sn_tem   ;   slf_i(jp_sal) = sn_sal 
     
    150149      !!---------------------------------------------------------------------- 
    151150      !!                   ***  ROUTINE dta_tsd  *** 
    152       !!                     
     151      !! 
    153152      !! ** Purpose :   provides T and S data at kt 
    154       !!  
     153      !! 
    155154      !! ** Method  : - call fldread routine 
    156       !!              - ORCA_R2: add some hand made alteration to read data   
     155      !!              - ORCA_R2: add some hand made alteration to read data 
    157156      !!              - 'key_orca_lev10' interpolates on 10 times more levels 
    158157      !!              - s- or mixed z-s coordinate: vertical interpolation on model mesh 
     
    162161      !! ** Action  :   ptsd   T-S data on medl mesh and interpolated at time-step kt 
    163162      !!---------------------------------------------------------------------- 
    164       INTEGER                              , INTENT(in   ) ::   kt     ! ocean time-step 
    165       CHARACTER(LEN=3)                     , INTENT(in   ) ::   cddta  ! dmp or ini 
     163      INTEGER                          , INTENT(in   ) ::   kt     ! ocean time-step 
     164      CHARACTER(LEN=3)                 , INTENT(in   ) ::   cddta  ! dmp or ini 
    166165      REAL(wp), DIMENSION(A2D(nn_hls),jpk,jpts), INTENT(  out) ::   ptsd   ! T & S data 
    167166      ! 
    168167      INTEGER ::   ji, jj, jk, jl, jkk   ! dummy loop indicies 
    169168      INTEGER ::   ik, il0, il1, ii0, ii1, ij0, ij1   ! local integers 
    170       INTEGER ::   itile 
    171169      REAL(wp)::   zl, zi                             ! local scalars 
    172170      REAL(wp), DIMENSION(jpk) ::  ztp, zsp   ! 1D workspace 
    173171      !!---------------------------------------------------------------------- 
    174172      ! 
    175       IF( ntile == 0 .OR. ntile == 1 )  THEN                                         ! Do only for the full domain 
    176          itile = ntile 
    177          IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )            ! Use full domain 
     173      IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                                         ! Do only for the full domain 
     174         IF( ln_tile ) CALL dom_tile_stop( ldhold=.TRUE. )             ! Use full domain 
    178175 
    179176         SELECT CASE(cddta) 
     
    186183         END SELECT 
    187184 
    188          IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = itile )            ! Revert to tile domain 
     185         IF( ln_tile ) CALL dom_tile_start( ldhold=.TRUE. )            ! Revert to tile domain 
    189186      ENDIF 
    190187      ! 
     
    206203      IF( ln_sco ) THEN                   !==   s- or mixed s-zps-coordinate   ==! 
    207204         ! 
    208          IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     205         IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    209206            IF( kt == nit000 .AND. lwp )THEN 
    210207               WRITE(numout,*) 
     
    213210         ENDIF 
    214211         ! 
    215          DO_2D( 1, 1, 1, 1 )                  ! vertical interpolation of T & S 
     212         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )                  ! vertical interpolation of T & S 
    216213            DO jk = 1, jpk                        ! determines the intepolated T-S profiles at each (i,j) points 
    217214               zl = gdept_0(ji,jj,jk) 
     
    226223                     IF( (zl-gdept_1d(jkk)) * (zl-gdept_1d(jkk+1)) <= 0._wp ) THEN 
    227224                        zi = ( zl - gdept_1d(jkk) ) / (gdept_1d(jkk+1)-gdept_1d(jkk)) 
    228                         ztp(jk) = ptsd(ji,jj,jkk,jp_tem) + ( ptsd(ji,jj,jkk+1,jp_tem) - ptsd(ji,jj,jkk,jp_tem) ) * zi  
     225                        ztp(jk) = ptsd(ji,jj,jkk,jp_tem) + ( ptsd(ji,jj,jkk+1,jp_tem) - ptsd(ji,jj,jkk,jp_tem) ) * zi 
    229226                        zsp(jk) = ptsd(ji,jj,jkk,jp_sal) + ( ptsd(ji,jj,jkk+1,jp_sal) - ptsd(ji,jj,jkk,jp_sal) ) * zi 
    230227                     ENDIF 
     
    239236            ptsd(ji,jj,jpk,jp_sal) = 0._wp 
    240237         END_2D 
    241          !  
     238         ! 
    242239      ELSE                                !==   z- or zps- coordinate   ==! 
    243          !                              
     240         ! 
    244241         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpk ) 
    245242            ptsd(ji,jj,jk,jp_tem) = ptsd(ji,jj,jk,jp_tem) * tmask(ji,jj,jk)    ! Mask 
     
    248245         ! 
    249246         IF( ln_zps ) THEN                      ! zps-coordinate (partial steps) interpolation at the last ocean level 
    250             DO_2D( 1, 1, 1, 1 ) 
    251                ik = mbkt(ji,jj)  
     247            DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     248               ik = mbkt(ji,jj) 
    252249               IF( ik > 1 ) THEN 
    253250                  zl = ( gdept_1d(ik) - gdept_0(ji,jj,ik) ) / ( gdept_1d(ik) - gdept_1d(ik-1) ) 
     
    257254               ik = mikt(ji,jj) 
    258255               IF( ik > 1 ) THEN 
    259                   zl = ( gdept_0(ji,jj,ik) - gdept_1d(ik) ) / ( gdept_1d(ik+1) - gdept_1d(ik) )  
     256                  zl = ( gdept_0(ji,jj,ik) - gdept_1d(ik) ) / ( gdept_1d(ik+1) - gdept_1d(ik) ) 
    260257                  ptsd(ji,jj,ik,jp_tem) = (1.-zl) * ptsd(ji,jj,ik,jp_tem) + zl * ptsd(ji,jj,ik+1,jp_tem) 
    261258                  ptsd(ji,jj,ik,jp_sal) = (1.-zl) * ptsd(ji,jj,ik,jp_sal) + zl * ptsd(ji,jj,ik+1,jp_sal) 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP+/MY_SRC/eosbn2.F90

    r15155 r15574  
    3131   !!   bn2           : compute the Brunt-Vaisala frequency 
    3232   !!   eos_pt_from_ct: compute the potential temperature from the Conservative Temperature 
    33    !!   eos_rab       : generic interface of in situ thermal/haline expansion ratio  
     33   !!   eos_rab       : generic interface of in situ thermal/haline expansion ratio 
    3434   !!   eos_rab_3d    : compute in situ thermal/haline expansion ratio 
    3535   !!   eos_rab_2d    : compute in situ thermal/haline expansion ratio for 2d fields 
     
    4646   USE in_out_manager ! I/O manager 
    4747   USE lib_mpp        ! MPP library 
    48    USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
     48   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
    4949   USE prtctl         ! Print control 
    5050   USE lbclnk         ! ocean lateral boundary conditions 
     
    6363   END INTERFACE 
    6464   ! 
    65    INTERFACE eos_fzp  
     65   INTERFACE eos_fzp 
    6666      MODULE PROCEDURE eos_fzp_2d, eos_fzp_0d 
    6767   END INTERFACE 
     
    9191 
    9292   !                               !!!  simplified eos coefficients (default value: Vallis 2006) 
    93    REAL(wp), PUBLIC ::   rn_a0      = 1.6550e-1_wp     ! thermal expansion coeff.  
    94    REAL(wp), PUBLIC ::   rn_b0      = 7.6554e-1_wp     ! saline  expansion coeff.  
    95    REAL(wp) ::   rn_lambda1 = 5.9520e-2_wp     ! cabbeling coeff. in T^2         
    96    REAL(wp) ::   rn_lambda2 = 5.4914e-4_wp     ! cabbeling coeff. in S^2         
    97    REAL(wp) ::   rn_mu1     = 1.4970e-4_wp     ! thermobaric coeff. in T   
    98    REAL(wp) ::   rn_mu2     = 1.1090e-5_wp     ! thermobaric coeff. in S   
    99    REAL(wp) ::   rn_nu      = 2.4341e-3_wp     ! cabbeling coeff. in theta*salt   
    100     
     93   REAL(wp), PUBLIC ::   rn_a0      = 1.6550e-1_wp     ! thermal expansion coeff. 
     94   REAL(wp), PUBLIC ::   rn_b0      = 7.6554e-1_wp     ! saline  expansion coeff. 
     95   REAL(wp) ::   rn_lambda1 = 5.9520e-2_wp     ! cabbeling coeff. in T^2 
     96   REAL(wp) ::   rn_lambda2 = 5.4914e-4_wp     ! cabbeling coeff. in S^2 
     97   REAL(wp) ::   rn_mu1     = 1.4970e-4_wp     ! thermobaric coeff. in T 
     98   REAL(wp) ::   rn_mu2     = 1.1090e-5_wp     ! thermobaric coeff. in S 
     99   REAL(wp) ::   rn_nu      = 2.4341e-3_wp     ! cabbeling coeff. in theta*salt 
     100 
    101101   ! TEOS10/EOS80 parameters 
    102102   REAL(wp) ::   r1_S0, r1_T0, r1_Z0, rdeltaS 
    103     
     103 
    104104   ! EOS parameters 
    105105   REAL(wp) ::   EOS000 , EOS100 , EOS200 , EOS300 , EOS400 , EOS500 , EOS600 
     
    119119   REAL(wp) ::   EOS022 
    120120   REAL(wp) ::   EOS003 , EOS103 
    121    REAL(wp) ::   EOS013  
    122     
     121   REAL(wp) ::   EOS013 
     122 
    123123   ! ALPHA parameters 
    124124   REAL(wp) ::   ALP000 , ALP100 , ALP200 , ALP300 , ALP400 , ALP500 
     
    135135   REAL(wp) ::   ALP012 
    136136   REAL(wp) ::   ALP003 
    137     
     137 
    138138   ! BETA parameters 
    139139   REAL(wp) ::   BET000 , BET100 , BET200 , BET300 , BET400 , BET500 
     
    162162   REAL(wp) ::   PEN002 , PEN102 
    163163   REAL(wp) ::   PEN012 
    164     
     164 
    165165   ! ALPHA_PEN parameters 
    166166   REAL(wp) ::   APE000 , APE100 , APE200 , APE300 
     
    365365      INTEGER                                 , INTENT(in   ) ::   ktts, ktrd, ktdep 
    366366      REAL(wp), DIMENSION(A2D_T(ktts) ,JPK,JPTS), INTENT(in   ) ::   pts   ! 1 : potential temperature  [Celsius] 
    367       !                                                               ! 2 : salinity               [psu] 
     367      !                                                                  ! 2 : salinity               [psu] 
    368368      REAL(wp), DIMENSION(A2D_T(ktrd) ,JPK     ), INTENT(  out) ::   prd   ! in situ density            [-] 
    369369      REAL(wp), DIMENSION(A2D_T(ktdep),JPK     ), INTENT(in   ) ::   pdep  ! depth                      [m] 
     
    380380      CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==! 
    381381         ! 
    382          DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
     382         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 
    383383            ! 
    384384            zh  = pdep(ji,jj,jk) * r1_Z0                                  ! depth 
     
    416416      CASE( np_seos )                !==  simplified EOS  ==! 
    417417         ! 
    418          DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
     418         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 
    419419            zt  = pts  (ji,jj,jk,jp_tem) - 10._wp 
    420420            zs  = pts  (ji,jj,jk,jp_sal) - 35._wp 
     
    425425               &  + rn_b0 * ( 1._wp - 0.5_wp*rn_lambda2*zs - rn_mu2*zh ) * zs   & 
    426426               &  - rn_nu * zt * zs 
    427                !                                  
     427               ! 
    428428            prd(ji,jj,jk) = zn * r1_rho0 * ztm                ! density anomaly (masked) 
    429429         END_3D 
     
    431431      CASE( np_leos )                !==  linear ISOMIP EOS  ==! 
    432432         ! 
    433          DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
     433         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 
    434434            zt  = pts  (ji,jj,jk,jp_tem) - (-1._wp) 
    435435            zs  = pts  (ji,jj,jk,jp_sal) - 34.2_wp 
     
    478478      INTEGER                                  , INTENT(in   ) ::   ktts, ktrd, ktrhop, ktdep 
    479479      REAL(wp), DIMENSION(A2D_T(ktts)  ,JPK,JPTS), INTENT(in   ) ::   pts    ! 1 : potential temperature  [Celsius] 
    480       !                                                                ! 2 : salinity               [psu] 
     480      !                                                                    ! 2 : salinity               [psu] 
    481481      REAL(wp), DIMENSION(A2D_T(ktrd)  ,JPK     ), INTENT(  out) ::   prd    ! in situ density            [-] 
    482482      REAL(wp), DIMENSION(A2D_T(ktrhop),JPK     ), INTENT(  out) ::   prhop  ! potential density (surface referenced) 
     
    506506            END DO 
    507507            ! 
    508             DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
     508            DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 
    509509               ! 
    510510               ! compute density (2*nn_sto_eos) times: 
     
    556556         ! Non-stochastic equation of state 
    557557         ELSE 
    558             DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
     558            DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 
    559559               ! 
    560560               zh  = pdep(ji,jj,jk) * r1_Z0                                  ! depth 
     
    591591            END_3D 
    592592         ENDIF 
    593           
     593 
    594594      CASE( np_seos )                !==  simplified EOS  ==! 
    595595         ! 
    596          DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
     596         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 
    597597            zt  = pts  (ji,jj,jk,jp_tem) - 10._wp 
    598598            zs  = pts  (ji,jj,jk,jp_sal) - 35._wp 
     
    612612      CASE( np_leos )                !==  linear ISOMIP EOS  ==! 
    613613         ! 
    614          DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
     614         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 
    615615            zt  = pts  (ji,jj,jk,jp_tem) - (-1._wp) 
    616616            zs  = pts  (ji,jj,jk,jp_sal) - 34.2_wp 
     
    627627      END SELECT 
    628628      ! 
    629       IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=prd, clinfo1=' eos-pot: ', tab3d_2=prhop, clinfo2=' pot : ', kdim=jpk ) 
     629      IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=prd, clinfo1=' eos-pot: ', & 
     630         &                                  tab3d_2=prhop, clinfo2=' pot : ', kdim=jpk ) 
    630631      ! 
    631632      IF( ln_timing )   CALL timing_stop('eos-pot') 
     
    658659      INTEGER                            , INTENT(in   ) ::   ktts, ktdep, ktrd 
    659660      REAL(wp), DIMENSION(A2D_T(ktts),JPTS), INTENT(in   ) ::   pts   ! 1 : potential temperature  [Celsius] 
    660       !                                                           ! 2 : salinity               [psu] 
     661      !                                                             ! 2 : salinity               [psu] 
    661662      REAL(wp), DIMENSION(A2D_T(ktdep)    ), INTENT(in   ) ::   pdep  ! depth                      [m] 
    662663      REAL(wp), DIMENSION(A2D_T(ktrd)     ), INTENT(  out) ::   prd   ! in situ density 
     
    675676      CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==! 
    676677         ! 
    677          DO_2D( 1, 1, 1, 1 ) 
     678         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    678679            ! 
    679680            zh  = pdep(ji,jj) * r1_Z0                                  ! depth 
     
    710711      CASE( np_seos )                !==  simplified EOS  ==! 
    711712         ! 
    712          DO_2D( 1, 1, 1, 1 ) 
     713         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    713714            ! 
    714715            zt    = pts  (ji,jj,jp_tem)  - 10._wp 
     
    726727      CASE( np_leos )                !==  ISOMIP EOS  ==! 
    727728         ! 
    728          DO_2D( 1, 1, 1, 1 ) 
     729         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    729730            ! 
    730731            zt    = pts  (ji,jj,jp_tem)  - (-1._wp) 
     
    749750 
    750751   SUBROUTINE eos_insitu_pot_2d( pts, prhop ) 
     752      !! 
     753      REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   pts    ! 1 : potential temperature  [Celsius] 
     754      !                                                     ! 2 : salinity               [psu] 
     755      REAL(wp), DIMENSION(:,:)  , INTENT(  out) ::   prhop  ! potential density (surface referenced) 
     756      !! 
     757      CALL eos_insitu_pot_2d_t( pts, is_tile(pts), prhop, is_tile(prhop) ) 
     758   END SUBROUTINE eos_insitu_pot_2d 
     759 
     760 
     761   SUBROUTINE eos_insitu_pot_2d_t( pts, ktts, prhop, ktrhop ) 
    751762      !!---------------------------------------------------------------------- 
    752763      !!                  ***  ROUTINE eos_insitu_pot  *** 
     
    761772      !! 
    762773      !!---------------------------------------------------------------------- 
    763       REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(in   ) ::   pts    ! 1 : potential temperature  [Celsius] 
     774      INTEGER                              , INTENT(in   ) ::   ktts, ktrhop 
     775      REAL(wp), DIMENSION(A2D_T(ktts),JPTS), INTENT(in   ) ::   pts    ! 1 : potential temperature  [Celsius] 
    764776      !                                                                ! 2 : salinity               [psu] 
    765       REAL(wp), DIMENSION(jpi,jpj     ), INTENT(  out) ::   prhop  ! potential density (surface referenced) 
     777      REAL(wp), DIMENSION(A2D_T(ktrhop)   ), INTENT(  out) ::   prhop  ! potential density (surface referenced) 
    766778      ! 
    767779      INTEGER  ::   ji, jj, jk, jsmp             ! dummy loop indices 
     
    778790      CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==! 
    779791         ! 
    780             DO_2D( 1, 1, 1, 1 ) 
    781                ! 
    782                zt  = pts (ji,jj,jp_tem) * r1_T0                           ! temperature 
    783                zs  = SQRT( ABS( pts(ji,jj,jp_sal) + rdeltaS ) * r1_S0 )   ! square root salinity 
    784                ztm = tmask(ji,jj,1)                                         ! tmask 
    785                ! 
    786                zn0 = (((((EOS060*zt   & 
    787                   &   + EOS150*zs+EOS050)*zt   & 
    788                   &   + (EOS240*zs+EOS140)*zs+EOS040)*zt   & 
    789                   &   + ((EOS330*zs+EOS230)*zs+EOS130)*zs+EOS030)*zt   & 
    790                   &   + (((EOS420*zs+EOS320)*zs+EOS220)*zs+EOS120)*zs+EOS020)*zt   & 
    791                   &   + ((((EOS510*zs+EOS410)*zs+EOS310)*zs+EOS210)*zs+EOS110)*zs+EOS010)*zt   & 
    792                   &   + (((((EOS600*zs+EOS500)*zs+EOS400)*zs+EOS300)*zs+EOS200)*zs+EOS100)*zs+EOS000 
    793                   ! 
    794                ! 
    795                prhop(ji,jj) = zn0 * ztm                           ! potential density referenced at the surface 
    796                ! 
    797             END_2D 
     792         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     793            ! 
     794            zt  = pts (ji,jj,jp_tem) * r1_T0                           ! temperature 
     795            zs  = SQRT( ABS( pts(ji,jj,jp_sal) + rdeltaS ) * r1_S0 )   ! square root salinity 
     796            ztm = tmask(ji,jj,1)                                         ! tmask 
     797            ! 
     798            zn0 = (((((EOS060*zt   & 
     799               &   + EOS150*zs+EOS050)*zt   & 
     800               &   + (EOS240*zs+EOS140)*zs+EOS040)*zt   & 
     801               &   + ((EOS330*zs+EOS230)*zs+EOS130)*zs+EOS030)*zt   & 
     802               &   + (((EOS420*zs+EOS320)*zs+EOS220)*zs+EOS120)*zs+EOS020)*zt   & 
     803               &   + ((((EOS510*zs+EOS410)*zs+EOS310)*zs+EOS210)*zs+EOS110)*zs+EOS010)*zt   & 
     804               &   + (((((EOS600*zs+EOS500)*zs+EOS400)*zs+EOS300)*zs+EOS200)*zs+EOS100)*zs+EOS000 
     805               ! 
     806            ! 
     807            prhop(ji,jj) = zn0 * ztm                           ! potential density referenced at the surface 
     808            ! 
     809         END_2D 
    798810 
    799811      CASE( np_seos )                !==  simplified EOS  ==! 
    800812         ! 
    801          DO_2D( 1, 1, 1, 1 ) 
     813         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    802814            zt  = pts  (ji,jj,jp_tem) - 10._wp 
    803815            zs  = pts  (ji,jj,jp_sal) - 35._wp 
     
    813825      CASE( np_leos )                !==  ISOMIP EOS  ==! 
    814826         ! 
    815          DO_2D( 1, 1, 1, 1 ) 
     827         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    816828            ! 
    817829            zt    = pts  (ji,jj,jp_tem)  - (-1._wp) 
     
    826838         ! 
    827839      END SELECT 
     840      IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab2d_1=prhop, clinfo1=' pot: ', kdim=1 ) 
    828841      ! 
    829842      IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab2d_1=prhop, clinfo1=' eos-pot: ' ) 
     
    831844      IF( ln_timing )   CALL timing_stop('eos-pot') 
    832845      ! 
    833    END SUBROUTINE eos_insitu_pot_2d 
     846   END SUBROUTINE eos_insitu_pot_2d_t 
    834847 
    835848 
     
    854867      !! ** Action  : - pab     : thermal/haline expansion ratio at T-points 
    855868      !!---------------------------------------------------------------------- 
    856       INTEGER                              , INTENT(in   ) ::   Kmm   ! time level index 
     869      INTEGER                                , INTENT(in   ) ::   Kmm   ! time level index 
    857870      INTEGER                                , INTENT(in   ) ::   ktts, ktab 
    858871      REAL(wp), DIMENSION(A2D_T(ktts),JPK,JPTS), INTENT(in   ) ::   pts   ! pot. temperature & salinity 
     
    870883      CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==! 
    871884         ! 
    872          DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
     885         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 
    873886            ! 
    874887            zh  = gdept(ji,jj,jk,Kmm) * r1_Z0                                ! depth 
     
    923936      CASE( np_seos )                  !==  simplified EOS  ==! 
    924937         ! 
    925          DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
     938         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 
    926939            zt  = pts (ji,jj,jk,jp_tem) - 10._wp   ! pot. temperature anomaly (t-T0) 
    927940            zs  = pts (ji,jj,jk,jp_sal) - 35._wp   ! abs. salinity anomaly (s-S0) 
     
    939952      CASE( np_leos )                  !==  linear ISOMIP EOS  ==! 
    940953         ! 
    941          DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
     954         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 
    942955            zt  = pts (ji,jj,jk,jp_tem) - (-1._wp) 
    943956            zs  = pts (ji,jj,jk,jp_sal) - 34.2_wp   ! abs. salinity anomaly (s-S0) 
     
    986999      !! ** Action  : - pab     : thermal/haline expansion ratio at T-points 
    9871000      !!---------------------------------------------------------------------- 
    988       INTEGER                              , INTENT(in   ) ::   Kmm   ! time level index 
     1001      INTEGER                            , INTENT(in   ) ::   Kmm   ! time level index 
    9891002      INTEGER                            , INTENT(in   ) ::   ktts, ktdep, ktab 
    9901003      REAL(wp), DIMENSION(A2D_T(ktts),JPTS), INTENT(in   ) ::   pts    ! pot. temperature & salinity 
     
    10051018      CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==! 
    10061019         ! 
    1007          DO_2D( 1, 1, 1, 1 ) 
     1020         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    10081021            ! 
    10091022            zh  = pdep(ji,jj) * r1_Z0                                  ! depth 
     
    10581071      CASE( np_seos )                  !==  simplified EOS  ==! 
    10591072         ! 
    1060          DO_2D( 1, 1, 1, 1 ) 
     1073         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    10611074            ! 
    10621075            zt    = pts  (ji,jj,jp_tem) - 10._wp   ! pot. temperature anomaly (t-T0) 
     
    10741087      CASE( np_leos )                  !==  linear ISOMIP EOS  ==! 
    10751088         ! 
    1076          DO_2D( 1, 1, 1, 1 ) 
     1089         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    10771090            ! 
    10781091            zt    = pts  (ji,jj,jp_tem) - (-1._wp)   ! pot. temperature anomaly (t-T0) 
     
    12261239      !!                  ***  ROUTINE bn2  *** 
    12271240      !! 
    1228       !! ** Purpose :   Compute the local Brunt-Vaisala frequency at the  
     1241      !! ** Purpose :   Compute the local Brunt-Vaisala frequency at the 
    12291242      !!                time-step of the input arguments 
    12301243      !! 
     
    12331246      !!      N.B. N^2 is set one for all to zero at jk=1 in istate module. 
    12341247      !! 
    1235       !! ** Action  :   pn2 : square of the brunt-vaisala frequency at w-point  
    1236       !! 
    1237       !!---------------------------------------------------------------------- 
    1238       INTEGER                              , INTENT(in   ) ::   Kmm   ! time level index 
     1248      !! ** Action  :   pn2 : square of the brunt-vaisala frequency at w-point 
     1249      !! 
     1250      !!---------------------------------------------------------------------- 
     1251      INTEGER                                , INTENT(in   ) ::  Kmm   ! time level index 
    12391252      INTEGER                                , INTENT(in   ) ::  ktab, ktn2 
    1240       REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in   ) ::  pts   ! pot. temperature and salinity   [Celsius,psu] 
     1253      REAL(wp), DIMENSION(jpi,jpj,  jpk,jpts), INTENT(in   ) ::  pts   ! pot. temperature and salinity   [Celsius,psu] 
    12411254      REAL(wp), DIMENSION(A2D_T(ktab),JPK,JPTS), INTENT(in   ) ::  pab   ! thermal/haline expansion coef.  [Celsius-1,psu-1] 
    12421255      REAL(wp), DIMENSION(A2D_T(ktn2),JPK     ), INTENT(  out) ::  pn2   ! Brunt-Vaisala frequency squared [1/s^2] 
     
    12481261      IF( ln_timing )   CALL timing_start('bn2') 
    12491262      ! 
    1250       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 
     1263      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 2, jpkm1 )      ! interior points only (2=< jk =< jpkm1 ); surface and bottom value set to zero one for all in istate.F90 
    12511264         zrw =   ( gdepw(ji,jj,jk  ,Kmm) - gdept(ji,jj,jk,Kmm) )   & 
    1252             &  / ( gdept(ji,jj,jk-1,Kmm) - gdept(ji,jj,jk,Kmm) )  
    1253             ! 
    1254          zaw = pab(ji,jj,jk,jp_tem) * (1. - zrw) + pab(ji,jj,jk-1,jp_tem) * zrw  
     1265            &  / ( gdept(ji,jj,jk-1,Kmm) - gdept(ji,jj,jk,Kmm) ) 
     1266            ! 
     1267         zaw = pab(ji,jj,jk,jp_tem) * (1. - zrw) + pab(ji,jj,jk-1,jp_tem) * zrw 
    12551268         zbw = pab(ji,jj,jk,jp_sal) * (1. - zrw) + pab(ji,jj,jk-1,jp_sal) * zrw 
    12561269         ! 
     
    12961309      z1_T0   = 1._wp/40._wp 
    12971310      ! 
    1298       DO_2D( 1, 1, 1, 1 ) 
     1311      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    12991312         ! 
    13001313         zt  = ctmp   (ji,jj) * z1_T0 
    1301          zs  = SQRT( ABS( psal(ji,jj) + zdeltaS ) * r1_S0 ) 
     1314         zs  = SQRT( ABS( psal(ji,jj) + zdeltaS ) * z1_S0 ) 
    13021315         ztm = tmask(ji,jj,1) 
    13031316         ! 
     
    13241337 
    13251338 
    1326    SUBROUTINE  eos_fzp_2d( psal, ptf, pdep ) 
     1339   SUBROUTINE eos_fzp_2d( psal, ptf, pdep ) 
    13271340      !! 
    13281341      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   )           ::   psal   ! salinity   [psu] 
     
    13471360      !!---------------------------------------------------------------------- 
    13481361      INTEGER                       , INTENT(in   )           ::   kttf 
    1349       REAL(wp), DIMENSION(jpi,jpj), INTENT(in   )           ::   psal   ! salinity   [psu] 
    1350       REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ), OPTIONAL ::   pdep   ! depth      [m] 
     1362      REAL(wp), DIMENSION(jpi,jpj)  , INTENT(in   )           ::   psal   ! salinity   [psu] 
     1363      REAL(wp), DIMENSION(jpi,jpj)  , INTENT(in   ), OPTIONAL ::   pdep   ! depth      [m] 
    13511364      REAL(wp), DIMENSION(A2D_T(kttf)), INTENT(out  )           ::   ptf    ! freezing temperature [Celsius] 
    13521365      ! 
     
    13601373         ! 
    13611374         z1_S0 = 1._wp / 35.16504_wp 
    1362          DO_2D( 1, 1, 1, 1 ) 
     1375         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    13631376            zs= SQRT( ABS( psal(ji,jj) ) * z1_S0 )           ! square root salinity 
    13641377            ptf(ji,jj) = ((((1.46873e-03_wp*zs-9.64972e-03_wp)*zs+2.28348e-02_wp)*zs & 
     
    13801393         CALL ctl_stop( 'eos_fzp_2d:', ctmp1 ) 
    13811394         ! 
    1382       END SELECT       
     1395      END SELECT 
    13831396      ! 
    13841397  END SUBROUTINE eos_fzp_2d_t 
     
    14371450      !! ** Purpose :   Calculates nonlinear anomalies of alpha_PE, beta_PE and PE at T-points 
    14381451      !! 
    1439       !! ** Method  :   PE is defined analytically as the vertical  
     1452      !! ** Method  :   PE is defined analytically as the vertical 
    14401453      !!                   primitive of EOS times -g integrated between 0 and z>0. 
    14411454      !!                pen is the nonlinear bsq-PE anomaly: pen = ( PE - rho0 gz ) / rho0 gz - rd 
    1442       !!                                                      = 1/z * /int_0^z rd dz - rd  
     1455      !!                                                      = 1/z * /int_0^z rd dz - rd 
    14431456      !!                                where rd is the density anomaly (see eos_rhd function) 
    14441457      !!                ab_pe are partial derivatives of PE anomaly with respect to T and S: 
     
    14671480      CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==! 
    14681481         ! 
    1469          DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
     1482         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 
    14701483            ! 
    14711484            zh  = gdept(ji,jj,jk,Kmm) * r1_Z0                                ! depth 
     
    15041517               ! 
    15051518            zn  = ( zn2 * zh + zn1 ) * zh + zn0 
    1506             !                               
     1519            ! 
    15071520            pab_pe(ji,jj,jk,jp_tem) = zn * zh * r1_rho0 * ztm 
    15081521            ! 
     
    15191532               ! 
    15201533            zn  = ( zn2 * zh + zn1 ) * zh + zn0 
    1521             !                               
     1534            ! 
    15221535            pab_pe(ji,jj,jk,jp_sal) = zn / zs * zh * r1_rho0 * ztm 
    15231536            ! 
     
    15261539      CASE( np_seos )                !==  Vallis (2006) simplified EOS  ==! 
    15271540         ! 
    1528          DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
     1541         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 
    15291542            zt  = pts(ji,jj,jk,jp_tem) - 10._wp  ! temperature anomaly (t-T0) 
    15301543            zs = pts (ji,jj,jk,jp_sal) - 35._wp  ! abs. salinity anomaly (s-S0) 
     
    15421555      CASE( np_leos )                !==  linear ISOMIP EOS  ==! 
    15431556         ! 
    1544          DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
     1557         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 
    15451558            zt  = pts(ji,jj,jk,jp_tem) - (-1._wp)  ! temperature anomaly (t-T0) 
    15461559            zs = pts (ji,jj,jk,jp_sal) - 34.2_wp   ! abs. salinity anomaly (s-S0) 
     
    16171630         IF(lwp) WRITE(numout,*) '   ==>>>   use of TEOS-10 equation of state (cons. temp. and abs. salinity)' 
    16181631         ! 
    1619          l_useCT = .TRUE.                          ! model temperature is Conservative temperature  
     1632         l_useCT = .TRUE.                          ! model temperature is Conservative temperature 
    16201633         ! 
    16211634         rdeltaS = 32._wp 
     
    19982011 
    19992012         r1_S0  = 0.875_wp/35.16504_wp   ! Used to convert CT in potential temperature when using bulk formulae (eos_pt_from_ct) 
    2000           
     2013 
    20012014         IF(lwp) THEN 
    20022015            WRITE(numout,*) 
     
    20362049      END SELECT 
    20372050      ! 
    2038       rho0_rcp    = rho0 * rcp  
     2051      rho0_rcp    = rho0 * rcp 
    20392052      r1_rho0     = 1._wp / rho0 
    20402053      r1_rcp      = 1._wp / rcp 
    2041       r1_rho0_rcp = 1._wp / rho0_rcp  
     2054      r1_rho0_rcp = 1._wp / rho0_rcp 
    20422055      ! 
    20432056      IF(lwp) THEN 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP+/MY_SRC/isf_oce.F90

    r13583 r15574  
    11MODULE isf_oce 
    22   !!====================================================================== 
    3    !!                       ***  MODULE  sbcisf  *** 
    4    !! Surface module :  compute iceshelf melt and heat flux 
     3   !!                       ***  MODULE  isf_oce  *** 
     4   !! Ice shelves :  ice shelves variables defined in memory 
    55   !!====================================================================== 
    66   !! History :  3.2  !  2011-02  (C.Harris  ) Original code isf cav 
     
    4848   ! 
    4949   ! 0.3 -------- ice shelf cavity parametrised namelist parameter ------------- 
    50    LOGICAL           , PUBLIC :: ln_isfpar_mlt   !: logical for the computation of melt inside the cavity 
    51    CHARACTER(LEN=256), PUBLIC :: cn_isfpar_mlt   !: melt formulation (cavity/param) 
    52    TYPE(FLD_N)       , PUBLIC :: sn_isfpar_fwf   !: information about the isf melting file to be read 
    53    TYPE(FLD_N)       , PUBLIC :: sn_isfpar_zmax  !: information about the grounding line depth file to be read 
    54    TYPE(FLD_N)       , PUBLIC :: sn_isfpar_zmin  !: information about the calving   line depth file to be read 
    55    TYPE(FLD_N)       , PUBLIC :: sn_isfpar_Leff  !: information about the effective length     file to be read 
     50   LOGICAL           , PUBLIC :: ln_isfpar_mlt      !: logical for the computation of melt inside the cavity 
     51   REAL(wp)          , PUBLIC :: rn_isfpar_bg03_gt0 !: temperature exchange coeficient [m/s] 
     52   CHARACTER(LEN=256), PUBLIC :: cn_isfpar_mlt      !: melt formulation (cavity/param) 
     53   TYPE(FLD_N)       , PUBLIC :: sn_isfpar_fwf      !: information about the isf melting file to be read 
     54   TYPE(FLD_N)       , PUBLIC :: sn_isfpar_zmax     !: information about the grounding line depth file to be read 
     55   TYPE(FLD_N)       , PUBLIC :: sn_isfpar_zmin     !: information about the calving   line depth file to be read 
     56   TYPE(FLD_N)       , PUBLIC :: sn_isfpar_Leff     !: information about the effective length     file to be read 
    5657   ! 
    5758   ! 0.4 -------- coupling namelist parameter ------------- 
     
    147148   END SUBROUTINE isf_alloc_par 
    148149 
     150    
    149151   SUBROUTINE isf_alloc_cav() 
    150152      !!--------------------------------------------------------------------- 
     
    174176   END SUBROUTINE isf_alloc_cav 
    175177 
     178    
    176179   SUBROUTINE isf_alloc_cpl() 
    177180      !!--------------------------------------------------------------------- 
     
    185188      ierr = 0 
    186189      ! 
    187       ALLOCATE( risfcpl_ssh(jpi,jpj), risfcpl_tsc(jpi,jpj,jpk,jpts), risfcpl_vol(jpi,jpj,jpk), STAT=ialloc ) 
    188       ierr = ierr + ialloc 
    189       ! 
    190       risfcpl_tsc(:,:,:,:) = 0.0 ; risfcpl_vol(:,:,:) = 0.0 ; risfcpl_ssh(:,:) = 0.0 
    191  
    192       IF ( ln_isfcpl_cons) THEN 
    193          ALLOCATE( risfcpl_cons_tsc(jpi,jpj,jpk,jpts) , risfcpl_cons_vol(jpi,jpj,jpk) ,risfcpl_cons_ssh(jpi,jpj), STAT=ialloc ) 
     190      ALLOCATE( risfcpl_ssh(jpi,jpj) , risfcpl_tsc(jpi,jpj,jpk,jpts) , risfcpl_vol(jpi,jpj,jpk) , STAT=ialloc ) 
     191      ierr = ierr + ialloc 
     192      ! 
     193      risfcpl_tsc(:,:,:,:) = 0._wp ; risfcpl_vol(:,:,:) = 0._wp ; risfcpl_ssh(:,:) = 0._wp 
     194 
     195      IF ( ln_isfcpl_cons ) THEN 
     196         ALLOCATE( risfcpl_cons_tsc(jpi,jpj,jpk,jpts) , risfcpl_cons_vol(jpi,jpj,jpk) , risfcpl_cons_ssh(jpi,jpj) , STAT=ialloc ) 
    194197         ierr = ierr + ialloc 
    195198         ! 
    196          risfcpl_cons_tsc(:,:,:,:) = 0.0 ; risfcpl_cons_vol(:,:,:) = 0.0 ; risfcpl_cons_ssh(:,:) = 0.0 
     199         risfcpl_cons_tsc(:,:,:,:) = 0._wp ; risfcpl_cons_vol(:,:,:) = 0._wp ; risfcpl_cons_ssh(:,:) = 0._wp 
    197200         ! 
    198201      END IF 
     
    203206   END SUBROUTINE isf_alloc_cpl 
    204207 
     208    
    205209   SUBROUTINE isf_dealloc_cpl() 
    206210      !!--------------------------------------------------------------------- 
     
    214218      ierr = 0 
    215219      ! 
    216       DEALLOCATE( risfcpl_ssh, risfcpl_tsc, risfcpl_vol, STAT=ialloc ) 
     220      DEALLOCATE( risfcpl_ssh , risfcpl_tsc , risfcpl_vol , STAT=ialloc ) 
    217221      ierr = ierr + ialloc 
    218222      ! 
     
    222226   END SUBROUTINE isf_dealloc_cpl 
    223227 
     228    
    224229   SUBROUTINE isf_alloc() 
    225230      !!--------------------------------------------------------------------- 
     
    234239      ierr = 0       ! set to zero if no array to be allocated 
    235240      ! 
    236       ALLOCATE(fwfisf_par(jpi,jpj)  , fwfisf_par_b(jpi,jpj), & 
    237          &     fwfisf_cav(jpi,jpj)  , fwfisf_cav_b(jpi,jpj), & 
    238          &     fwfisf_oasis(jpi,jpj),            STAT=ialloc ) 
    239       ierr = ierr + ialloc 
    240       ! 
    241       ALLOCATE(risf_par_tsc(jpi,jpj,jpts), risf_par_tsc_b(jpi,jpj,jpts), STAT=ialloc ) 
    242       ierr = ierr + ialloc 
    243       ! 
    244       ALLOCATE(risf_cav_tsc(jpi,jpj,jpts), risf_cav_tsc_b(jpi,jpj,jpts), STAT=ialloc ) 
    245       ierr = ierr + ialloc 
    246       ! 
    247       ALLOCATE(risfload(jpi,jpj), STAT=ialloc) 
    248       ierr = ierr + ialloc 
    249       ! 
    250       ALLOCATE( mskisf_cav(jpi,jpj), STAT=ialloc) 
     241      ALLOCATE( fwfisf_par  (jpi,jpj) , fwfisf_par_b(jpi,jpj) ,    & 
     242         &      fwfisf_cav  (jpi,jpj) , fwfisf_cav_b(jpi,jpj) ,    & 
     243         &      fwfisf_oasis(jpi,jpj)                         , STAT=ialloc ) 
     244      ierr = ierr + ialloc 
     245      ! 
     246      ALLOCATE( risf_par_tsc(jpi,jpj,jpts) , risf_par_tsc_b(jpi,jpj,jpts) , STAT=ialloc ) 
     247      ierr = ierr + ialloc 
     248      ! 
     249      ALLOCATE( risf_cav_tsc(jpi,jpj,jpts) , risf_cav_tsc_b(jpi,jpj,jpts) , STAT=ialloc ) 
     250      ierr = ierr + ialloc 
     251      ! 
     252      ALLOCATE( risfload(jpi,jpj) , STAT=ialloc ) 
     253      ierr = ierr + ialloc 
     254      ! 
     255      ALLOCATE( mskisf_cav(jpi,jpj) , STAT=ialloc ) 
    251256      ierr = ierr + ialloc 
    252257      ! 
     
    255260      ! 
    256261      ! initalisation of fwf and tsc array to 0 
    257       risfload(:,:)       = 0.0_wp 
    258       fwfisf_oasis(:,:)   = 0.0_wp 
    259       fwfisf_par(:,:)     = 0.0_wp    ; fwfisf_par_b(:,:)     = 0.0_wp 
    260       fwfisf_cav(:,:)     = 0.0_wp    ; fwfisf_cav_b(:,:)     = 0.0_wp 
    261       risf_cav_tsc(:,:,:) = 0.0_wp    ; risf_cav_tsc_b(:,:,:) = 0.0_wp 
    262       risf_par_tsc(:,:,:) = 0.0_wp    ; risf_par_tsc_b(:,:,:) = 0.0_wp 
    263       ! 
    264  
     262      risfload    (:,:)   = 0._wp 
     263      fwfisf_oasis(:,:)   = 0._wp 
     264      fwfisf_par  (:,:)   = 0._wp   ;   fwfisf_par_b  (:,:)   = 0._wp 
     265      fwfisf_cav  (:,:)   = 0._wp   ;   fwfisf_cav_b  (:,:)   = 0._wp 
     266      risf_cav_tsc(:,:,:) = 0._wp   ;   risf_cav_tsc_b(:,:,:) = 0._wp 
     267      risf_par_tsc(:,:,:) = 0._wp   ;   risf_par_tsc_b(:,:,:) = 0._wp 
     268      ! 
    265269   END SUBROUTINE isf_alloc 
    266  
     270    
     271   !!====================================================================== 
    267272END MODULE isf_oce 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP+/MY_SRC/isfcavgam.F90

    r13583 r15574  
    1414   USE isftbl  , ONLY: isf_tbl 
    1515 
    16    USE oce     , ONLY: uu, vv, rn2         ! ocean dynamics and tracers 
     16   USE oce     , ONLY: uu, vv              ! ocean dynamics 
    1717   USE phycst  , ONLY: grav, vkarmn        ! physical constant 
    1818   USE eosbn2  , ONLY: eos_rab             ! equation of state 
     
    3030   PUBLIC   isfcav_gammats 
    3131 
     32   !! * Substitutions    
     33#  include "do_loop_substitute.h90" 
    3234#  include "domzgr_substitute.h90" 
    3335   !!---------------------------------------------------------------------- 
     
    4244   !!----------------------------------------------------------------------------------------------------- 
    4345   ! 
    44    SUBROUTINE isfcav_gammats( Kmm, pttbl, pstbl, pqoce, pqfwf, pgt, pgs ) 
     46   SUBROUTINE isfcav_gammats( Kmm, pttbl, pstbl, pqoce, pqfwf, pRc, pgt, pgs ) 
    4547      !!---------------------------------------------------------------------- 
    4648      !! ** Purpose    : compute the coefficient echange for heat and fwf flux 
     
    5557      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pqoce, pqfwf    ! isf heat and fwf 
    5658      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pttbl, pstbl    ! top boundary layer tracer 
     59      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pRc             ! Richardson number 
    5760      !!--------------------------------------------------------------------- 
    5861      REAL(wp), DIMENSION(jpi,jpj)                :: zutbl, zvtbl    ! top boundary layer velocity 
     
    9295         pgs(:,:) = rn_gammas0 
    9396      CASE ( 'vel' ) ! gamma is proportional to u* 
    94          CALL gammats_vel      (                   zutbl, zvtbl, rCd0_top, rn_vtide**2,               pgt, pgs ) 
     97         CALL gammats_vel      (                   zutbl, zvtbl, rCd0_top, rn_vtide**2,                    pgt, pgs ) 
    9598      CASE ( 'vel_stab' ) ! gamma depends of stability of boundary layer and u* 
    96          CALL gammats_vel_stab (Kmm, pttbl, pstbl, zutbl, zvtbl, rCd0_top, rn_vtide**2, pqoce, pqfwf, pgt, pgs ) 
     99         CALL gammats_vel_stab (Kmm, pttbl, pstbl, zutbl, zvtbl, rCd0_top, rn_vtide**2, pqoce, pqfwf, pRc, pgt, pgs ) 
    97100      CASE DEFAULT 
    98101         CALL ctl_stop('STOP','method to compute gamma (cn_gammablk) is unknown (should not see this)') 
     
    133136      REAL(wp),                     INTENT(in   ) :: pke2         ! background velocity 
    134137      !!--------------------------------------------------------------------- 
     138      INTEGER  :: ji, jj                     ! loop index 
    135139      REAL(wp), DIMENSION(jpi,jpj) :: zustar 
    136140      !!--------------------------------------------------------------------- 
    137141      ! 
    138       ! compute ustar (AD15 eq. 27) 
    139       zustar(:,:) = SQRT( pCd(:,:) * ( putbl(:,:) * putbl(:,:) + pvtbl(:,:) * pvtbl(:,:) + pke2 ) ) * mskisf_cav(:,:) 
    140       ! 
    141       ! Compute gammats 
    142       pgt(:,:) = zustar(:,:) * rn_gammat0 
    143       pgs(:,:) = zustar(:,:) * rn_gammas0 
     142      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     143         ! compute ustar (AD15 eq. 27) 
     144         zustar(ji,jj) = SQRT( pCd(ji,jj) * ( putbl(ji,jj) * putbl(ji,jj) + pvtbl(ji,jj) * pvtbl(ji,jj) + pke2 ) ) * mskisf_cav(ji,jj) 
     145         ! 
     146         ! Compute gammats 
     147         pgt(ji,jj) = zustar(ji,jj) * rn_gammat0 
     148         pgs(ji,jj) = zustar(ji,jj) * rn_gammas0 
     149      END_2D 
    144150      ! 
    145151      ! output ustar 
     
    148154   END SUBROUTINE gammats_vel 
    149155 
    150    SUBROUTINE gammats_vel_stab( Kmm, pttbl, pstbl, putbl, pvtbl, pCd, pke2, pqoce, pqfwf, &  ! <<== in 
    151       &                                                                     pgt  , pgs    )  ! ==>> out gammats [m/s] 
     156   SUBROUTINE gammats_vel_stab( Kmm, pttbl, pstbl, putbl, pvtbl, pCd, pke2, pqoce, pqfwf, pRc, &  ! <<== in 
     157      &                                                                     pgt  , pgs         )  ! ==>> out gammats [m/s] 
    152158      !!---------------------------------------------------------------------- 
    153159      !! ** Purpose    : compute the coefficient echange coefficient  
     
    166172      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: putbl, pvtbl   ! velocity in the losch top boundary layer 
    167173      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pttbl, pstbl   ! tracer   in the losch top boundary layer 
     174      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pRc            ! Richardson number 
    168175      !!--------------------------------------------------------------------- 
    169176      INTEGER  :: ji, jj                     ! loop index 
    170177      INTEGER  :: ikt                        ! local integer 
    171178      REAL(wp) :: zdku, zdkv                 ! U, V shear  
    172       REAL(wp) :: zPr, zSc, zRc              ! Prandtl, Scmidth and Richardson number  
     179      REAL(wp) :: zPr, zSc                   ! Prandtl and Scmidth number  
    173180      REAL(wp) :: zmob, zmols                ! Monin Obukov length, coriolis factor at T point 
    174181      REAL(wp) :: zbuofdep, zhnu             ! Bouyancy length scale, sublayer tickness 
     
    185192      !!--------------------------------------------------------------------- 
    186193      ! 
    187       ! compute ustar 
    188       zustar(:,:) = SQRT( pCd * ( putbl(:,:) * putbl(:,:) + pvtbl(:,:) * pvtbl(:,:) + pke2 ) ) 
    189       ! 
    190       ! output ustar 
    191       CALL iom_put('isfustar',zustar(:,:)) 
    192       ! 
    193194      ! compute Pr and Sc number (eq ??) 
    194195      zPr =   13.8_wp 
     
    200201      ! 
    201202      ! compute gamma 
    202       DO ji = 2, jpi 
    203          DO jj = 2, jpj 
    204             ikt = mikt(ji,jj) 
    205  
    206             IF( zustar(ji,jj) == 0._wp ) THEN           ! only for kt = 1 I think 
    207                pgt = rn_gammat0 
    208                pgs = rn_gammas0 
    209             ELSE 
    210                ! compute Rc number (as done in zdfric.F90) 
    211 !!gm better to do it like in the new zdfric.F90   i.e. avm weighted Ri computation 
    212                zcoef = 0.5_wp / e3w(ji,jj,ikt+1,Kmm) 
    213                !                                            ! shear of horizontal velocity 
    214                zdku = zcoef * (  uu(ji-1,jj  ,ikt  ,Kmm) + uu(ji,jj,ikt  ,Kmm)  & 
    215                   &             -uu(ji-1,jj  ,ikt+1,Kmm) - uu(ji,jj,ikt+1,Kmm)  ) 
    216                zdkv = zcoef * (  vv(ji  ,jj-1,ikt  ,Kmm) + vv(ji,jj,ikt  ,Kmm)  & 
    217                   &             -vv(ji  ,jj-1,ikt+1,Kmm) - vv(ji,jj,ikt+1,Kmm)  ) 
    218                !                                            ! richardson number (minimum value set to zero) 
    219                zRc = MAX(rn2(ji,jj,ikt+1), 0._wp) / MAX( zdku*zdku + zdkv*zdkv, zeps ) 
    220  
    221                ! compute bouyancy  
    222                zts(jp_tem) = pttbl(ji,jj) 
    223                zts(jp_sal) = pstbl(ji,jj) 
    224                zdep        = gdepw(ji,jj,ikt,Kmm) 
    225                ! 
    226                CALL eos_rab( zts, zdep, zab, Kmm ) 
    227                ! 
    228                ! compute length scale (Eq ??) 
    229                zbuofdep = grav * ( zab(jp_tem) * pqoce(ji,jj) - zab(jp_sal) * pqfwf(ji,jj) ) 
    230                ! 
    231                ! compute Monin Obukov Length 
    232                ! Maximum boundary layer depth (Eq ??) 
    233                zhmax = gdept(ji,jj,mbkt(ji,jj),Kmm) - gdepw(ji,jj,mikt(ji,jj),Kmm) -0.001_wp 
    234                ! 
    235                ! Compute Monin obukhov length scale at the surface and Ekman depth: (Eq ??) 
    236                zmob   = zustar(ji,jj) ** 3 / (vkarmn * (zbuofdep + zeps)) 
    237                zmols  = SIGN(1._wp, zmob) * MIN(ABS(zmob), zhmax) * tmask(ji,jj,ikt) 
    238                ! 
    239                ! compute eta* (stability parameter) (Eq ??) 
    240                zetastar = 1._wp / ( SQRT(1._wp + MAX(zxsiN * zustar(ji,jj) / ( ABS(ff_f(ji,jj)) * zmols * zRc ), 0._wp))) 
    241                ! 
    242                ! compute the sublayer thickness (Eq ??) 
    243                zhnu = 5 * znu / zustar(ji,jj) 
    244                ! 
    245                ! compute gamma turb (Eq ??) 
    246                zgturb = 1._wp / vkarmn * LOG(zustar(ji,jj) * zxsiN * zetastar * zetastar / ( ABS(ff_f(ji,jj)) * zhnu )) & 
     203      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     204 
     205         ikt = mikt(ji,jj) 
     206 
     207         ! compute ustar 
     208         zustar(ji,jj) = SQRT( pCd(ji,jj) * ( putbl(ji,jj) * putbl(ji,jj) + pvtbl(ji,jj) * pvtbl(ji,jj) + pke2 ) ) 
     209 
     210         IF( zustar(ji,jj) == 0._wp ) THEN           ! only for kt = 1 I think 
     211            pgt(ji,jj) = rn_gammat0 
     212            pgs(ji,jj) = rn_gammas0 
     213         ELSE 
     214            ! compute bouyancy  
     215            zts(jp_tem) = pttbl(ji,jj) 
     216            zts(jp_sal) = pstbl(ji,jj) 
     217            zdep        = gdepw(ji,jj,ikt,Kmm) 
     218            ! 
     219            CALL eos_rab( zts, zdep, zab, Kmm ) 
     220            ! 
     221            ! compute length scale (Eq ??) 
     222            zbuofdep = grav * ( zab(jp_tem) * pqoce(ji,jj) - zab(jp_sal) * pqfwf(ji,jj) ) 
     223            ! 
     224            ! compute Monin Obukov Length 
     225            ! Maximum boundary layer depth (Eq ??) 
     226            zhmax = gdept(ji,jj,mbkt(ji,jj),Kmm) - gdepw(ji,jj,mikt(ji,jj),Kmm) -0.001_wp 
     227            ! 
     228            ! Compute Monin obukhov length scale at the surface and Ekman depth: (Eq ??) 
     229            zmob   = zustar(ji,jj) ** 3 / (vkarmn * (zbuofdep + zeps)) 
     230            zmols  = SIGN(1._wp, zmob) * MIN(ABS(zmob), zhmax) * tmask(ji,jj,ikt) 
     231            ! 
     232            ! compute eta* (stability parameter) (Eq ??) 
     233            zetastar = 1._wp / ( SQRT(1._wp + MAX( 0._wp, zxsiN * zustar(ji,jj) & 
     234               &                                        / MAX( 1.e-20, ABS(ff_t(ji,jj)) * zmols * pRc(ji,jj) ) ))) 
     235            ! 
     236            ! compute the sublayer thickness (Eq ??) 
     237            zhnu = 5 * znu / MAX( 1.e-20, zustar(ji,jj) ) 
     238            ! 
     239            ! compute gamma turb (Eq ??) 
     240            zgturb = 1._wp / vkarmn * LOG(zustar(ji,jj) * zxsiN * zetastar * zetastar / MAX( 1.e-10, ABS(ff_t(ji,jj)) * zhnu )) & 
    247241               &      + 1._wp / ( 2 * zxsiN * zetastar ) - 1._wp / vkarmn 
    248                ! 
    249                ! compute gammats 
    250                pgt(ji,jj) = zustar(ji,jj) / (zgturb + zgmolet) 
    251                pgs(ji,jj) = zustar(ji,jj) / (zgturb + zgmoles) 
    252             END IF 
    253          END DO 
    254       END DO 
     242            ! 
     243            ! compute gammats 
     244            pgt(ji,jj) = zustar(ji,jj) / (zgturb + zgmolet) 
     245            pgs(ji,jj) = zustar(ji,jj) / (zgturb + zgmoles) 
     246         END IF 
     247      END_2D 
     248      ! output ustar 
     249      CALL iom_put('isfustar',zustar(:,:)) 
    255250 
    256251   END SUBROUTINE gammats_vel_stab 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP+/MY_SRC/isfstp.F90

    r13583 r15574  
    22   !!====================================================================== 
    33   !!                       ***  MODULE  isfstp  *** 
    4    !! Surface module :  compute iceshelf load, melt and heat flux 
     4   !! Ice Shelves :  compute iceshelf load, melt and heat flux 
    55   !!====================================================================== 
    66   !! History :  3.2  !  2011-02  (C.Harris  ) Original code isf cav 
     
    4242   !! Software governed by the CeCILL license (see ./LICENSE) 
    4343   !!---------------------------------------------------------------------- 
    44  
    4544CONTAINS 
    4645  
    47   SUBROUTINE isf_stp( kt, Kmm ) 
     46   SUBROUTINE isf_stp( kt, Kmm ) 
    4847      !!--------------------------------------------------------------------- 
    4948      !!                  ***  ROUTINE isf_stp  *** 
     
    5857      !!              - compute fluxes 
    5958      !!              - write restart variables 
    60       !! 
    61       !!---------------------------------------------------------------------- 
    62       INTEGER, INTENT(in) ::   kt   ! ocean time step 
    63       INTEGER, INTENT(in) ::   Kmm  ! ocean time level index 
    64       !!---------------------------------------------------------------------- 
    65       INTEGER :: jk                               ! loop index 
    66       REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3t    ! e3t  
     59      !!---------------------------------------------------------------------- 
     60      INTEGER, INTENT(in) ::   kt    ! ocean time step 
     61      INTEGER, INTENT(in) ::   Kmm   ! ocean time level index 
     62      ! 
     63      INTEGER :: jk                              ! loop index 
     64#if defined key_qco 
     65      REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3t   ! 3D workspace 
     66#endif 
    6767      !!--------------------------------------------------------------------- 
    6868      ! 
     
    8383         ! 1.2: compute misfkb, rhisf_tbl, rfrac (deepest level, thickness, fraction of deepest cell affected by tbl) 
    8484         rhisf_tbl_cav(:,:) = rn_htbl * mskisf_cav(:,:) 
     85#if defined key_qco 
    8586         DO jk = 1, jpk 
    8687            ze3t(:,:,jk) = e3t(:,:,jk,Kmm) 
    8788         END DO  
    88          CALL isf_tbl_lvl(ht(:,:), ze3t, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav) 
     89         CALL isf_tbl_lvl( ht(:,:), ze3t           , misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav ) 
     90#else 
     91         CALL isf_tbl_lvl( ht(:,:),  e3t(:,:,:,Kmm), misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav ) 
     92#endif 
    8993         ! 
    9094         ! 1.3: compute ice shelf melt 
    91          CALL isf_cav( kt, Kmm, risf_cav_tsc, fwfisf_cav) 
     95         CALL isf_cav( kt, Kmm, risf_cav_tsc, fwfisf_cav ) 
    9296         ! 
    9397      END IF 
     
    108112         ! by simplicity, we assume the top level where param applied do not change with time (done in init part) 
    109113         rhisf_tbl_par(:,:) = rhisf0_tbl_par(:,:) 
     114#if defined key_qco 
    110115         DO jk = 1, jpk 
    111116            ze3t(:,:,jk) = e3t(:,:,jk,Kmm) 
    112117         END DO 
    113          CALL isf_tbl_lvl(ht(:,:), ze3t, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par) 
     118         CALL isf_tbl_lvl( ht(:,:), ze3t           , misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par ) 
     119#else 
     120         CALL isf_tbl_lvl( ht(:,:),  e3t(:,:,:,Kmm), misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par ) 
     121#endif 
    114122         ! 
    115123         ! 2.3: compute ice shelf melt 
    116          CALL isf_par( kt, Kmm, risf_par_tsc, fwfisf_par) 
     124         CALL isf_par( kt, Kmm, risf_par_tsc, fwfisf_par ) 
    117125         ! 
    118126      END IF 
     
    128136   END SUBROUTINE isf_stp 
    129137 
    130    SUBROUTINE isf_init(Kbb, Kmm, Kaa) 
     138    
     139   SUBROUTINE isf_init( Kbb, Kmm, Kaa ) 
    131140      !!--------------------------------------------------------------------- 
    132141      !!                  ***  ROUTINE isfstp_init  *** 
     
    142151      !!              - call cav/param/isfcpl init routine 
    143152      !!---------------------------------------------------------------------- 
    144       INTEGER, INTENT(in) :: Kbb, Kmm, Kaa      ! ocean time level indices 
     153      INTEGER, INTENT(in) ::   Kbb, Kmm, Kaa   ! ocean time level indices 
     154      !!---------------------------------------------------------------------- 
    145155      ! 
    146156      ! constrain: l_isfoasis need to be known 
    147157      ! 
    148       ! Read namelist 
    149       CALL isf_nam() 
    150       ! 
    151       ! Allocate public array 
    152       CALL isf_alloc() 
    153       ! 
    154       ! check option compatibility 
    155       CALL isf_ctl() 
    156       ! 
    157       ! compute ice shelf load 
    158       IF ( ln_isfcav ) CALL isf_load( Kmm, risfload ) 
     158      CALL isf_nam()                                              ! Read namelist 
     159      ! 
     160      CALL isf_alloc()                                            ! Allocate public array 
     161      ! 
     162      CALL isf_ctl()                                              ! check option compatibility 
     163      ! 
     164      IF( ln_isfcav ) CALL isf_load( Kmm, risfload )              ! compute ice shelf load 
    159165      ! 
    160166      ! terminate routine now if no ice shelf melt formulation specify 
    161       IF ( ln_isf ) THEN 
    162          ! 
    163          !--------------------------------------------------------------------------------------------------------------------- 
    164          ! initialisation melt in the cavity 
    165          IF ( ln_isfcav_mlt ) CALL isf_cav_init() 
    166          ! 
    167          !--------------------------------------------------------------------------------------------------------------------- 
    168          ! initialisation parametrised melt 
    169          IF ( ln_isfpar_mlt ) CALL isf_par_init() 
    170          ! 
    171          !--------------------------------------------------------------------------------------------------------------------- 
    172          ! initialisation ice sheet coupling 
    173          IF( ln_isfcpl ) CALL isfcpl_init(Kbb, Kmm, Kaa) 
     167      IF( ln_isf ) THEN 
     168         ! 
     169         IF( ln_isfcav_mlt )   CALL isf_cav_init()                ! initialisation melt in the cavity 
     170         ! 
     171         IF( ln_isfpar_mlt )   CALL isf_par_init()                ! initialisation parametrised melt 
     172         ! 
     173         IF( ln_isfcpl     )   CALL isfcpl_init( Kbb, Kmm, Kaa )  ! initialisation ice sheet coupling 
    174174         ! 
    175175      END IF 
     
    177177  END SUBROUTINE isf_init 
    178178 
     179   
    179180  SUBROUTINE isf_ctl() 
    180181      !!--------------------------------------------------------------------- 
     
    283284      END IF 
    284285   END SUBROUTINE isf_ctl 
    285    ! 
     286 
     287    
    286288   SUBROUTINE isf_nam 
    287289      !!--------------------------------------------------------------------- 
     
    299301         &             sn_isfpar_zmin, sn_isfpar_zmax, sn_isfpar_Leff,                           & 
    300302         &             ln_isfcpl     , nn_drown      , ln_isfcpl_cons, ln_isfdebug, rn_vtide,    & 
    301          &             cn_isfload    , rn_isfload_T  , rn_isfload_S  , cn_isfdir 
     303         &             cn_isfload    , rn_isfload_T  , rn_isfload_S  , cn_isfdir  ,              & 
     304         &             rn_isfpar_bg03_gt0 
    302305      !!---------------------------------------------------------------------- 
    303306      ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP+/MY_SRC/istate.F90

    r14053 r15574  
    3434   USE lib_mpp         ! MPP library 
    3535   USE restart         ! restart 
     36 
    3637#if defined key_agrif 
     38   USE agrif_oce       ! initial state interpolation 
    3739   USE agrif_oce_interp 
    38    USE agrif_oce 
    3940#endif    
    4041 
     
    4243   PRIVATE 
    4344 
    44    PUBLIC   istate_init   ! routine called by step.F90 
     45   PUBLIC   istate_init   ! routine called by nemogcm.F90 
    4546 
    4647   !! * Substitutions 
     
    6364      ! 
    6465      INTEGER ::   ji, jj, jk   ! dummy loop indices 
    65       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zgdept     ! 3D table  !!st patch to use gdept subtitute 
     66      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zgdept     ! 3D table for qco substitute 
    6667!!gm see comment further down 
    6768      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::   zuvd    ! U & V data workspace 
     
    7374      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 
    7475 
    75 !!gm  Why not include in the first call of dta_tsd ?   
    76 !!gm  probably associated with the use of internal damping... 
    77        CALL dta_tsd_init        ! Initialisation of T & S input data 
    78 !!gm to be moved in usrdef of C1D case 
    79 !      IF( lk_c1d )   CALL dta_uvd_init        ! Initialization of U & V input data 
    80 !!gm 
     76      CALL dta_tsd_init                 ! Initialisation of T & S input data 
     77      IF( ln_c1d) CALL dta_uvd_init     ! Initialisation of U & V input data (c1d only) 
    8178 
    82       rhd  (:,:,:  ) = 0._wp   ;   rhop (:,:,:  ) = 0._wp      ! set one for all to 0 at level jpk 
    83       rn2b (:,:,:  ) = 0._wp   ;   rn2  (:,:,:  ) = 0._wp      ! set one for all to 0 at levels 1 and jpk 
    84       ts  (:,:,:,:,Kaa) = 0._wp                                   ! set one for all to 0 at level jpk 
    85       rab_b(:,:,:,:) = 0._wp   ;   rab_n(:,:,:,:) = 0._wp      ! set one for all to 0 at level jpk 
     79      rhd  (:,:,:      ) = 0._wp   ;   rhop (:,:,:  ) = 0._wp      ! set one for all to 0 at level jpk 
     80      rn2b (:,:,:      ) = 0._wp   ;   rn2  (:,:,:  ) = 0._wp      ! set one for all to 0 at levels 1 and jpk 
     81      ts   (:,:,:,:,Kaa) = 0._wp                                   ! set one for all to 0 at level jpk 
     82      rab_b(:,:,:,:    ) = 0._wp   ;   rab_n(:,:,:,:) = 0._wp      ! set one for all to 0 at level jpk 
    8683#if defined key_agrif 
    8784      uu   (:,:,:  ,Kaa) = 0._wp   ! used in agrif_oce_sponge at initialization 
     
    9491         ln_1st_euler = .true.                ! Set time-step indicator at nit000 (euler forward) 
    9592         CALL day_init  
    96          CALL agrif_istate( Kbb, Kmm, Kaa )   ! Interp from parent 
     93         CALL agrif_istate_oce( Kbb, Kmm, Kaa )   ! Interp from parent 
    9794         ! 
    98          ts  (:,:,:,:,Kmm) = ts (:,:,:,:,Kbb)  
    99          ssh (:,:,Kmm)     = ssh(:,:,Kbb) 
    100          uu   (:,:,:,Kmm)   = uu  (:,:,:,Kbb) 
    101          vv   (:,:,:,Kmm)   = vv  (:,:,:,Kbb) 
     95         ts (:,:,:,:,Kmm) = ts (:,:,:,:,Kbb) 
     96         uu (:,:,:  ,Kmm) = uu (:,:,:  ,Kbb) 
     97         vv (:,:,:  ,Kmm) = vv (:,:,:  ,Kbb) 
    10298      ELSE 
    10399#endif 
    104       IF( ln_rstart ) THEN                    ! Restart from a file 
    105          !                                    ! ------------------- 
    106          CALL rst_read( Kbb, Kmm )            ! Read the restart file 
    107          CALL day_init                        ! model calendar (using both namelist and restart infos) 
    108          ! 
    109       ELSE                                    ! Start from rest 
    110          !                                    ! --------------- 
    111          numror = 0                           ! define numror = 0 -> no restart file to read 
    112          l_1st_euler = .true.                 ! Set time-step indicator at nit000 (euler forward) 
    113          CALL day_init                        ! model calendar (using both namelist and restart infos) 
    114          !                                    ! Initialization of ocean to zero 
    115          ! 
    116          IF( ln_tsd_init ) THEN                
    117             CALL dta_tsd( nit000, 'ini', ts(:,:,:,:,Kbb) )       ! read 3D T and S data at nit000 
     100         IF( ln_rstart ) THEN                    ! Restart from a file 
     101            !                                    ! ------------------- 
     102            CALL rst_read( Kbb, Kmm )            ! Read the restart file 
     103            CALL day_init                        ! model calendar (using both namelist and restart infos) 
    118104            ! 
    119             uu (:,:,:,Kbb) = 0._wp 
    120             vv (:,:,:,Kbb) = 0._wp 
     105         ELSE                                    ! Start from rest 
     106            !                                    ! --------------- 
     107            numror = 0                           ! define numror = 0 -> no restart file to read 
     108            l_1st_euler = .true.                 ! Set time-step indicator at nit000 (euler forward) 
     109            CALL day_init                        ! model calendar (using both namelist and restart infos) 
     110            !                                    ! Initialization of ocean to zero 
    121111            ! 
    122          ELSE                                 ! user defined initial T and S 
    123             DO jk = 1, jpk 
    124                zgdept(:,:,jk) = gdept(:,:,jk,Kbb) 
    125             END DO 
    126             CALL usr_def_istate( zgdept, tmask, ts(:,:,:,:,Kbb), uu(:,:,:,Kbb), vv(:,:,:,Kbb)  )          
    127          ENDIF 
    128          ts  (:,:,:,:,Kmm) = ts (:,:,:,:,Kbb)       ! set now values from to before ones 
    129          uu   (:,:,:,Kmm)   = uu  (:,:,:,Kbb) 
    130          vv   (:,:,:,Kmm)   = vv  (:,:,:,Kbb) 
     112            IF( ln_tsd_init ) THEN                
     113               CALL dta_tsd( nit000, 'ini', ts(:,:,:,:,Kbb) )       ! read 3D T and S data at nit000 
     114            ENDIF 
     115            ! 
     116            IF( ln_uvd_init .AND. ln_c1d ) THEN                
     117               CALL dta_uvd( nit000, Kbb, uu(:,:,:,Kbb), vv(:,:,:,Kbb) )   ! read 3D U and V data at nit000 
     118            ELSE 
     119               uu  (:,:,:,Kbb) = 0._wp               ! set the ocean at rest 
     120               vv  (:,:,:,Kbb) = 0._wp   
     121            ENDIF 
     122               ! 
     123               ! 
     124            IF( .NOT. ln_tsd_init .AND. .NOT. ln_uvd_init ) THEN 
     125               DO jk = 1, jpk 
     126                  zgdept(:,:,jk) = gdept(:,:,jk,Kbb) 
     127               END DO 
     128               CALL usr_def_istate( zgdept, tmask, ts(:,:,:,:,Kbb), uu(:,:,:,Kbb), vv(:,:,:,Kbb) )          
     129            ENDIF 
     130            ts  (:,:,:,:,Kmm) = ts (:,:,:,:,Kbb)       ! set now values from to before ones 
     131            uu    (:,:,:,Kmm) = uu   (:,:,:,Kbb) 
     132            vv    (:,:,:,Kmm) = vv   (:,:,:,Kbb) 
    131133 
    132 !!gm POTENTIAL BUG : 
    133 !!gm  ISSUE :  if ssh(:,:,Kbb) /= 0  then, in non linear free surface, the e3._n, e3._b should be recomputed 
    134 !!             as well as gdept_ and gdepw_....   !!!!!  
    135 !!      ===>>>>   probably a call to domvvl initialisation here.... 
    136  
    137  
    138          ! 
    139 !!gm to be moved in usrdef of C1D case 
    140 !         IF ( ln_uvd_init .AND. lk_c1d ) THEN ! read 3D U and V data at nit000 
    141 !            ALLOCATE( zuvd(jpi,jpj,jpk,2) ) 
    142 !            CALL dta_uvd( nit000, zuvd ) 
    143 !            uu(:,:,:,Kbb) = zuvd(:,:,:,1) ;  uu(:,:,:,Kmm) = uu(:,:,:,Kbb) 
    144 !            vv(:,:,:,Kbb) = zuvd(:,:,:,2) ;  vv(:,:,:,Kmm) = vv(:,:,:,Kbb) 
    145 !            DEALLOCATE( zuvd ) 
    146 !         ENDIF 
    147          ! 
    148 !!gm This is to be changed !!!! 
    149 !         ! - ML - ssh(:,:,Kmm) could be modified by istate_eel, so that initialization of e3t(:,:,:,Kbb) is done here 
    150 !         IF( .NOT.ln_linssh ) THEN 
    151 !            DO jk = 1, jpk 
    152 !               e3t(:,:,jk,Kbb) = e3t(:,:,jk,Kmm) 
    153 !            END DO 
    154 !         ENDIF 
    155 !!gm  
    156          !  
    157       ENDIF  
     134         ENDIF  
    158135#if defined key_agrif 
    159136      ENDIF 
     
    167144      ! 
    168145!!gm  the use of umsak & vmask is not necessary below as uu(:,:,:,Kmm), vv(:,:,:,Kmm), uu(:,:,:,Kbb), vv(:,:,:,Kbb) are always masked 
    169       DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
     146      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 
    170147         uu_b(ji,jj,Kmm) = uu_b(ji,jj,Kmm) + e3u(ji,jj,jk,Kmm) * uu(ji,jj,jk,Kmm) * umask(ji,jj,jk) 
    171148         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/2021/dev_r14318_RK3_stage1/tests/ISOMIP+/MY_SRC/sbcfwb.F90

    r13583 r15574  
    2424   ! 
    2525   USE in_out_manager ! I/O manager 
     26   USE iom            ! IOM 
    2627   USE lib_mpp        ! distribued memory computing library 
    2728   USE timing         ! Timing 
     
    3435   PUBLIC   sbc_fwb    ! routine called by step 
    3536 
    36    REAL(wp) ::   a_fwb_b   ! annual domain averaged freshwater budget 
    37    REAL(wp) ::   a_fwb     ! for 2 year before (_b) and before year. 
    38    REAL(wp) ::   fwfold    ! fwfold to be suppressed 
     37   REAL(wp) ::   rn_fwb0   ! initial freshwater adjustment flux [kg/m2/s] (nn_fwb = 2 only) 
     38   REAL(wp) ::   a_fwb     ! annual domain averaged freshwater budget from the 
     39                           ! previous year 
    3940   REAL(wp) ::   area      ! global mean ocean surface (interior domain) 
    4041 
     
    6566      INTEGER, INTENT( in ) ::   Kmm      ! ocean time level index 
    6667      ! 
    67       INTEGER  ::   inum, ikty, iyear     ! local integers 
     68      INTEGER  ::   ios, inum, ikty       ! local integers 
    6869      REAL(wp) ::   z_fwf, z_fwf_nsrf, zsum_fwf, zsum_erp                ! local scalars 
    6970      REAL(wp) ::   zsurf_neg, zsurf_pos, zsurf_tospread, zcoef          !   -      - 
     
    7273      REAL(wp)   ,DIMENSION(1) ::   z_fwfprv   
    7374      COMPLEX(dp),DIMENSION(1) ::   y_fwfnow   
     75      ! 
     76      NAMELIST/namsbc_fwb/rn_fwb0 
    7477      !!---------------------------------------------------------------------- 
    7578      ! 
    7679      IF( kt == nit000 ) THEN 
     80         READ( numnam_ref, namsbc_fwb, IOSTAT = ios, ERR = 901 ) 
     81901      IF( ios /= 0 ) CALL ctl_nam( ios, 'namsbc_fwb in reference namelist'     ) 
     82         READ( numnam_cfg, namsbc_fwb, IOSTAT = ios, ERR = 902 ) 
     83902      IF( ios >  0 ) CALL ctl_nam( ios, 'namsbc_fwb in configuration namelist' ) 
     84         IF(lwm) WRITE( numond, namsbc_fwb ) 
    7785         IF(lwp) THEN 
    7886            WRITE(numout,*) 
     
    8088            WRITE(numout,*) '~~~~~~~' 
    8189            IF( kn_fwb == 1 )   WRITE(numout,*) '          instantaneously set to zero' 
    82             IF( kn_fwb == 2 )   WRITE(numout,*) '          adjusted from previous year budget' 
     90            IF( kn_fwb == 4 )   WRITE(numout,*) '          instantaneously set to zero with heat and salt flux correction (ISOMIP+)' 
    8391            IF( kn_fwb == 3 )   WRITE(numout,*) '          fwf set to zero and spread out over erp area' 
    84             IF( kn_fwb == 4 )   WRITE(numout,*) '          instantaneously set to zero with heat and salt flux correction (ISOMIP+)' 
     92            IF( kn_fwb == 2 ) THEN 
     93               WRITE(numout,*) '          adjusted from previous year budget' 
     94               WRITE(numout,*) 
     95               WRITE(numout,*) '   Namelist namsbc_fwb' 
     96               WRITE(numout,*) '      Initial freshwater adjustment flux [kg/m2/s] = ', rn_fwb0 
     97            END IF 
    8598         ENDIF 
    8699         ! 
     
    105118         ! 
    106119         IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN 
    107             y_fwfnow(1) = local_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf_cav(:,:) + fwfisf_par(:,:) - snwice_fmass(:,:) ) ) 
     120            y_fwfnow(1) = local_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) - fwfisf_cav(:,:) - fwfisf_par(:,:) - snwice_fmass(:,:) ) ) 
    108121            CALL mpp_delay_sum( 'sbcfwb', 'fwb', y_fwfnow(:), z_fwfprv(:), kt == nitend - nn_fsbc + 1 ) 
    109122            z_fwfprv(1) = z_fwfprv(1) / area 
     
    111124            emp(:,:) = emp(:,:) - z_fwfprv(1)        * tmask(:,:,1) 
    112125            qns(:,:) = qns(:,:) + zcoef * sst_m(:,:) * tmask(:,:,1) ! account for change to the heat budget due to fw correction 
     126            ! outputs 
     127            IF( iom_use('hflx_fwb_cea') )  CALL iom_put( 'hflx_fwb_cea', zcoef * sst_m(:,:) * tmask(:,:,1) ) 
     128            IF( iom_use('vflx_fwb_cea') )  CALL iom_put( 'vflx_fwb_cea', z_fwfprv(1)        * tmask(:,:,1) ) 
    113129         ENDIF 
    114130         ! 
     
    116132         ! 
    117133         IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN 
    118             z_fwf = glob_sum( 'sbcfwb',  e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf_cav(:,:) + fwfisf_par(:,:) - snwice_fmass(:,:) ) ) 
     134            z_fwf = glob_sum( 'sbcfwb',  e1e2t(:,:) * ( emp(:,:) - rnf(:,:) - fwfisf_cav(:,:) - fwfisf_par(:,:) - snwice_fmass(:,:) ) ) 
    119135            ! 
    120136            ! correction for ice sheet coupling testing (ie remove the excess through the surface) 
     
    131147            qns(:,:) = qns(:,:) + zcoef * sst_m(:,:) * tmask(:,:,1) ! (Eq. 35 AD2015) ! use sst_m to avoid generation of any bouyancy fluxes 
    132148            sfx(:,:) = sfx(:,:) + z_fwf * sss_m(:,:) * tmask(:,:,1) ! (Eq. 36 AD2015) ! use sss_m to avoid generation of any bouyancy fluxes 
    133             !qns(:,:) = qns(:,:) + zcoef * ( -1.9 ) * tmask(:,:,1) ! (Eq. 35 AD2015) ! could be sst_m if we don't want any bouyancy fluxes 
    134             !sfx(:,:) = sfx(:,:) + z_fwf * ( 33.8 ) * tmask(:,:,1) ! (Eq. 36 AD2015) ! could be sss_m if we don't want any bouyancy fluxes 
    135             !qns(:,:) = qns(:,:) + zcoef * ( -1.0 ) * tmask(:,:,1) ! use for ISOMIP+ coupling sanity check (keep ssh cst while playing with cpl conservation option) 
    136             !sfx(:,:) = sfx(:,:) + z_fwf * ( 34.2 ) * tmask(:,:,1) ! use for ISOMIP+ coupling sanity check (keep ssh cst while playing with cpl conservation option) 
    137          ENDIF 
    138          ! 
    139       CASE ( 2 )                             !==  fwf budget adjusted from the previous year  ==! 
    140          ! 
    141          IF( kt == nit000 ) THEN                      ! initialisation 
    142             !                                         ! Read the corrective factor on precipitations (fwfold) 
    143             CALL ctl_opn( inum, 'EMPave_old.dat', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    144             READ ( inum, "(24X,I8,2ES24.16)" ) iyear, a_fwb_b, a_fwb 
    145             CLOSE( inum ) 
    146             fwfold = a_fwb                            ! current year freshwater budget correction 
    147             !                                         ! estimate from the previous year budget 
     149         ENDIF 
     150         ! 
     151      CASE ( 2 )                             !==  fw adjustment based on fw budget at the end of the previous year  ==! 
     152         ! 
     153         IF( kt == nit000 ) THEN                                                                    ! initialisation 
     154            !                                                                                       ! set the fw adjustment (a_fwb) 
     155            IF ( ln_rstart .AND. iom_varid( numror, 'a_fwb',   ldstop = .FALSE. ) > 0 ) THEN        !    as read from restart file 
     156               IF(lwp) WRITE(numout,*) 'sbc_fwb : reading FW-budget adjustment from restart file' 
     157               CALL iom_get( numror, 'a_fwb',   a_fwb ) 
     158            ELSE                                                                                    !    as specified in namelist 
     159               a_fwb = rn_fwb0 
     160            END IF 
     161            ! 
    148162            IF(lwp)WRITE(numout,*) 
    149             IF(lwp)WRITE(numout,*)'sbc_fwb : year = ',iyear  , ' freshwater budget correction = ', fwfold 
    150             IF(lwp)WRITE(numout,*)'          year = ',iyear-1, ' freshwater budget read       = ', a_fwb 
    151             IF(lwp)WRITE(numout,*)'          year = ',iyear-2, ' freshwater budget read       = ', a_fwb_b 
     163            IF(lwp)WRITE(numout,*)'sbc_fwb : initial freshwater-budget adjustment = ', a_fwb, 'kg/m2/s' 
     164            ! 
    152165         ENDIF    
    153          !                                         ! Update fwfold if new year start 
     166         !                                         ! Update a_fwb if new year start 
    154167         ikty = 365 * 86400 / rn_Dt                  !!bug  use of 365 days leap year or 360d year !!!!!!! 
    155168         IF( MOD( kt, ikty ) == 0 ) THEN 
    156             a_fwb_b = a_fwb                           ! mean sea level taking into account the ice+snow 
     169                                                      ! mean sea level taking into account the ice+snow 
    157170                                                      ! sum over the global domain 
    158171            a_fwb   = glob_sum( 'sbcfwb', e1e2t(:,:) * ( ssh(:,:,Kmm) + snwice_mass(:,:) * r1_rho0 ) ) 
    159172            a_fwb   = a_fwb * 1.e+3 / ( area * rday * 365. )     ! convert in Kg/m3/s = mm/s 
    160173!!gm        !                                                      !!bug 365d year  
    161             fwfold =  a_fwb                           ! current year freshwater budget correction 
    162             !                                         ! estimate from the previous year budget 
    163174         ENDIF 
    164175         !  
    165176         IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN         ! correct the freshwater fluxes 
    166             zcoef = fwfold * rcp 
    167             emp(:,:) = emp(:,:) + fwfold             * tmask(:,:,1) 
     177            zcoef = a_fwb * rcp 
     178            emp(:,:) = emp(:,:) + a_fwb              * tmask(:,:,1) 
    168179            qns(:,:) = qns(:,:) - zcoef * sst_m(:,:) * tmask(:,:,1) ! account for change to the heat budget due to fw correction 
    169          ENDIF 
    170          ! 
    171          IF( kt == nitend .AND. lwm ) THEN            ! save fwfold value in a file (only one required) 
    172             CALL ctl_opn( inum, 'EMPave.dat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE., narea ) 
    173             WRITE( inum, "(24X,I8,2ES24.16)" ) nyear, a_fwb_b, a_fwb 
    174             CLOSE( inum ) 
    175          ENDIF 
     180            ! outputs 
     181            IF( iom_use('hflx_fwb_cea') )  CALL iom_put( 'hflx_fwb_cea', -zcoef * sst_m(:,:) * tmask(:,:,1) ) 
     182            IF( iom_use('vflx_fwb_cea') )  CALL iom_put( 'vflx_fwb_cea', -a_fwb              * tmask(:,:,1) ) 
     183         ENDIF 
     184         ! Output restart information 
     185         IF( lrst_oce ) THEN 
     186            IF(lwp) WRITE(numout,*) 
     187            IF(lwp) WRITE(numout,*) 'sbc_fwb : writing FW-budget adjustment to ocean restart file at it = ', kt 
     188            IF(lwp) WRITE(numout,*) '~~~~' 
     189            CALL iom_rstput( kt, nitrst, numrow, 'a_fwb',   a_fwb ) 
     190         END IF 
     191         ! 
     192         IF( kt == nitend .AND. lwp ) WRITE(numout,*) 'sbc_fwb : final freshwater-budget adjustment = ', a_fwb, 'kg/m2/s' 
    176193         ! 
    177194      CASE ( 3 )                             !==  global fwf set to zero and spread out over erp area  ==! 
     
    184201            ztmsk_neg(:,:) = tmask_i(:,:) - ztmsk_pos(:,:) 
    185202            !                                                  ! fwf global mean (excluding ocean to ice/snow exchanges)  
    186             z_fwf     = glob_sum( 'sbcfwb', e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf_cav(:,:) + fwfisf_par(:,:) - snwice_fmass(:,:) ) ) / area 
     203            z_fwf     = glob_sum( 'sbcfwb', e1e2t(:,:) * ( emp(:,:) - rnf(:,:) - fwfisf_cav(:,:) - fwfisf_par(:,:) - snwice_fmass(:,:) ) ) / area 
    187204            !             
    188205            IF( z_fwf < 0._wp ) THEN         ! spread out over >0 erp area to increase evaporation 
     
    211228            qns(:,:) = qns(:,:) - zerp_cor(:,:) * rcp * sst_m(:,:)  ! account for change to the heat budget due to fw correction 
    212229            erp(:,:) = erp(:,:) + zerp_cor(:,:) 
     230            ! outputs 
     231            IF( iom_use('hflx_fwb_cea') )  CALL iom_put( 'hflx_fwb_cea', -zerp_cor(:,:) * rcp * sst_m(:,:) ) 
     232            IF( iom_use('vflx_fwb_cea') )  CALL iom_put( 'vflx_fwb_cea', -zerp_cor(:,:) ) 
    213233            ! 
    214234            IF( lwp ) THEN                   ! control print 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP+/MY_SRC/tradmp.F90

    r13982 r15574  
    1111   !!  NEMO      1.0  ! 2002-08  (G. Madec, E. Durand)  free form + modules 
    1212   !!            3.2  ! 2009-08  (G. Madec, C. Talandier)  DOCTOR norm for namelist parameter 
    13    !!            3.3  ! 2010-06  (C. Ethe, G. Madec) merge TRA-TRC  
     13   !!            3.3  ! 2010-06  (C. Ethe, G. Madec) merge TRA-TRC 
    1414   !!            3.4  ! 2011-04  (G. Madec, C. Ethe) Merge of dtatem and dtasal + suppression of CPP keys 
    1515   !!            3.6  ! 2015-06  (T. Graham)  read restoring coefficient in a file 
     
    2626   USE c1d            ! 1D vertical configuration 
    2727   USE trd_oce        ! trends: ocean variables 
    28    USE trdtra         ! trends manager: tracers  
     28   USE trdtra         ! trends manager: tracers 
    2929   USE zdf_oce        ! ocean: vertical physics 
    3030   USE phycst         ! physical constants 
     
    5353   !! * Substitutions 
    5454#  include "do_loop_substitute.h90" 
     55#  include "domzgr_substitute.h90" 
    5556   !!---------------------------------------------------------------------- 
    5657   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    7576      !!---------------------------------------------------------------------- 
    7677      !!                   ***  ROUTINE tra_dmp  *** 
    77       !!                   
     78      !! 
    7879      !! ** Purpose :   Compute the tracer trend due to a newtonian damping 
    7980      !!      of the tracer field towards given data field and add it to the 
    8081      !!      general tracer trends. 
    8182      !! 
    82       !! ** Method  :   Newtonian damping towards t_dta and s_dta computed  
     83      !! ** Method  :   Newtonian damping towards t_dta and s_dta computed 
    8384      !!      and add to the general tracer trends: 
    8485      !!                     ta = ta + resto * (t_dta - tb) 
     
    9697      INTEGER ::   ji, jj, jk, jn   ! dummy loop indices 
    9798      REAL(wp), DIMENSION(A2D(nn_hls),jpk,jpts)     ::  zts_dta 
     99      REAL(wp), DIMENSION(jpi,jpj,jpk)              ::  ze3t 
    98100      REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::  ztrdts 
    99101      !!---------------------------------------------------------------------- 
     
    101103      IF( ln_timing )   CALL timing_start('tra_dmp') 
    102104      ! 
    103       IF( l_trdtra )   THEN                    !* Save ta and sa trends 
    104          ALLOCATE( ztrdts(jpi,jpj,jpk,jpts) )  
    105          ztrdts(:,:,:,:) = pts(:,:,:,:,Krhs)  
     105      IF( l_trdtra .OR. iom_use('hflx_dmp_cea') .OR. iom_use('sflx_dmp_cea') ) THEN   !* Save ta and sa trends 
     106         ALLOCATE( ztrdts(jpi,jpj,jpk,jpts) ) 
     107         ztrdts(:,:,:,:) = pts(:,:,:,:,Krhs) 
    106108      ENDIF 
    107109      !                           !==  input T-S data at kt  ==! 
     
    140142      END SELECT 
    141143      ! 
     144      ! outputs (clem trunk) 
     145      DO jk = 1, jpk 
     146         ze3t(:,:,jk) = e3t(:,:,jk,Kmm) 
     147      END DO       
     148      ! 
     149      IF( iom_use('hflx_dmp_cea') )       & 
     150         &   CALL iom_put('hflx_dmp_cea', & 
     151         &   SUM( ( pts(:,:,:,jp_tem,Krhs) - ztrdts(:,:,:,jp_tem) ) * ze3t(:,:,:), dim=3 ) * rcp * rho0 ) ! W/m2 
     152      IF( iom_use('sflx_dmp_cea') )       & 
     153         &   CALL iom_put('sflx_dmp_cea', & 
     154         &   SUM( ( pts(:,:,:,jp_sal,Krhs) - ztrdts(:,:,:,jp_sal) ) * ze3t(:,:,:), dim=3 ) * rho0 )       ! g/m2/s 
     155      ! 
    142156      IF( l_trdtra )   THEN       ! trend diagnostic 
    143157         ztrdts(:,:,:,:) = pts(:,:,:,:,Krhs) - ztrdts(:,:,:,:) 
    144158         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_dmp, ztrdts(:,:,:,jp_tem) ) 
    145159         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_dmp, ztrdts(:,:,:,jp_sal) ) 
    146          DEALLOCATE( ztrdts )  
     160         DEALLOCATE( ztrdts ) 
    147161      ENDIF 
    148162      !                           ! Control print 
     
    158172      !!---------------------------------------------------------------------- 
    159173      !!                  ***  ROUTINE tra_dmp_init  *** 
    160       !!  
    161       !! ** Purpose :   Initialization for the newtonian damping  
     174      !! 
     175      !! ** Purpose :   Initialization for the newtonian damping 
    162176      !! 
    163177      !! ** Method  :   read the namtra_dmp namelist and check the parameters 
    164178      !!---------------------------------------------------------------------- 
    165       INTEGER ::   ios, imask   ! local integers  
     179      INTEGER ::   ios, imask   ! local integers 
    166180      ! 
    167181      NAMELIST/namtra_dmp/ ln_tradmp, nn_zdmp, cn_resto 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP/EXPREF/namelist_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    5151/ 
    5252!----------------------------------------------------------------------- 
     53&namtile        !   parameters of the tiling 
     54!----------------------------------------------------------------------- 
     55/ 
     56!----------------------------------------------------------------------- 
    5357&namtsd        !    Temperature & Salinity Data  (init/dmp)             (default: OFF) 
    5458!----------------------------------------------------------------------- 
     
    6468/ 
    6569!----------------------------------------------------------------------- 
    66 &namc1d        !   1D configuration options                             ("key_c1d" default: PAPA station) 
    67 !----------------------------------------------------------------------- 
    68 / 
    69 !----------------------------------------------------------------------- 
    70 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
    71 !----------------------------------------------------------------------- 
    72 / 
    73 !----------------------------------------------------------------------- 
    74 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     70&namc1d        !   1D configuration options                             (ln_c1d =T default: PAPA station) 
     71!----------------------------------------------------------------------- 
     72/ 
     73!----------------------------------------------------------------------- 
     74&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
     75!----------------------------------------------------------------------- 
     76/ 
     77!----------------------------------------------------------------------- 
     78&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    7579!----------------------------------------------------------------------- 
    7680 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP/MY_SRC/usrdef_nam.F90

    r13286 r15574  
    4141CONTAINS 
    4242 
    43    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     43   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4444      !!---------------------------------------------------------------------- 
    4545      !!                     ***  ROUTINE dom_nam  *** 
     
    5353      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5454      !!---------------------------------------------------------------------- 
    55       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    56       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    57       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    58       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     55      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     56      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     57      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     58      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     59      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     60      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    5961      ! 
    6062      INTEGER ::   ios   ! Local integer 
     
    7779      ! 
    7880      !                             ! Set the lateral boundary condition of the global domain 
    79       kperio = 0                    ! ISOMIP configuration : close basin 
     81      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! ISOMIP configuration : closed domain 
     82      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
    8083      ! 
    8184      !                             ! control print 
     
    98101         WRITE(numout,*) '                                               jpkglo   = ', kpk 
    99102         WRITE(numout,*) '   ' 
    100          WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    101          WRITE(numout,*) '      ISOMIP : closed basin                    jperio   = ', kperio 
    102103      ENDIF 
    103104      ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_flux_ubs_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    4141      !                    !  (=F) user defined configuration  ==>>>  see usrdef(_...) modules 
    4242   ln_write_cfg = .false.   !  (=T) create the domain configuration file 
     43/ 
     44!----------------------------------------------------------------------- 
     45&namtile        !   parameters of the tiling 
     46!----------------------------------------------------------------------- 
    4347/ 
    4448!----------------------------------------------------------------------- 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/LOCK_EXCHANGE/MY_SRC/usrdef_nam.F90

    r13286 r15574  
    3737CONTAINS 
    3838 
    39    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     39   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4040      !!---------------------------------------------------------------------- 
    4141      !!                     ***  ROUTINE dom_nam  *** 
     
    4949      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5050      !!---------------------------------------------------------------------- 
    51       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    52       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    53       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    54       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     51      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     52      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     53      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     54      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     55      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     56      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    5557      ! 
    5658      INTEGER ::   ios   ! Local integer 
     
    7375      kpk = INT(  20.  / rn_dz ) + 1 
    7476      !                             ! Set the lateral boundary condition of the global domain 
    75       kperio = 0                    ! LOCK_EXCHANGE configuration : closed domain 
     77      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! LOCK_EXCHANGE configuration : closed domain 
     78      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
    7679      ! 
    7780      !                             ! control print 
     
    8891         WRITE(numout,*) '                                               jpkglo = ', kpk 
    8992         WRITE(numout,*) '   ' 
    90          WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    91          WRITE(numout,*) '      closed                                   jperio = ', kperio 
    9293      ENDIF 
    9394      ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/LOCK_EXCHANGE/MY_SRC/usrdef_zgr.F90

    r12377 r15574  
    8484      ! 
    8585      ! no ocean cavities : top ocean level is ONE, except over land 
    86       ! the ocean basin surrounded by land (1 grid-point) set through lbc_lnk call as jperio=0  
     86      ! the ocean basin surrounded by land (1+nn_hls grid-points) set through lbc_lnk call 
    8787      z2d(:,:) = 1._wp                    ! surface ocean is the 1st level 
    88       CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin since jperio = 0 (see userdef_nam.F90) 
     88      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin, see userdef_nam.F90 
    8989      k_top(:,:) = NINT( z2d(:,:) ) 
    9090      ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/OVERFLOW/EXPREF/AGRIF/1_namelist_cfg

    r14229 r15574  
    1111   ln_sco      = .false.      ! s-coordinate    
    1212   rn_dx       =   1000.   !  horizontal resolution   [meters] 
    13    rn_dz       =     20.   !  vertical   resolution   [meters] 
     13   rn_dz       =     50.   !  vertical   resolution   [meters] 
    1414/ 
    1515! 
     
    1818!----------------------------------------------------------------------- 
    1919   ln_vert_remap   = .true.  !  use vertical remapping 
    20    ln_chk_bathy    = .true.  !  =T  check the parent bathymetry 
    2120/ 
    2221!----------------------------------------------------------------------- 
     
    2625   cn_exp      =    "OVF"  !  experience name 
    2726   nn_it000    =       1   !  first time step 
    28    nn_itend    =    2040   ! here 16h of simulation  (=5760 time-step) abort after 5802 for zps: pb of physics conditions 
     27   nn_itend    =    1530   ! here 16h of simulation  (=5760 time-step) abort after 5802 for zps: pb of physics conditions 
    2928   nn_istate   =       0   !  output the initial state (1) or not (0) 
    3029   nn_stock    =    9999   !  frequency of creation of a restart file (modulo referenced to 1) 
     
    4039/ 
    4140!----------------------------------------------------------------------- 
     41&namtile        !   parameters of the tiling 
     42!----------------------------------------------------------------------- 
     43/ 
     44!----------------------------------------------------------------------- 
    4245&namdom        !   space and time domain (bathymetry, mesh, timestep) 
    4346!----------------------------------------------------------------------- 
    44    rn_Dt      =   10.     !  time step for the dynamics (and tracer if nn_acc=0) 
     47   rn_Dt      =   40.     !  time step for the dynamics (and tracer if nn_acc=0) 
    4548   rn_atfp    =    0.1    !  asselin time filter parameter 
    4649   ln_meshmask = .false.  !  =T create a mesh file 
     
    150153   ln_dynvor_mix = .false. !  mixed scheme 
    151154   ln_dynvor_een = .false. !  energy & enstrophy scheme 
    152       nn_een_e3f = 0             !  e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1) 
    153155/ 
    154156!----------------------------------------------------------------------- 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/OVERFLOW/EXPREF/AGRIF/AGRIF_FixedGrids.in

    r13936 r15574  
    111 
    2 10 41 1 4 4 1 4  
     210 41 1 4 1 1 1  
    330 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/OVERFLOW/EXPREF/AGRIF/namelist_cfg

    r14229 r15574  
    1111   ln_sco      = .false.      ! s-coordinate    
    1212   rn_dx       =   1000.   !  horizontal resolution   [meters] 
    13    rn_dz       =     20.   !  vertical   resolution   [meters] 
     13   rn_dz       =     50.   !  vertical   resolution   [meters] 
    1414/ 
    1515! 
     
    2020   cn_exp      =    "OVF"  !  experience name 
    2121   nn_it000    =       1   !  first time step 
    22    nn_itend    =    2040   ! here 16h of simulation  (=5760 time-step) abort after 5802 for zps: pb of physics conditions 
     22   nn_itend    =    1530   ! here 16h of simulation  (=5760 time-step) abort after 5802 for zps: pb of physics conditions 
    2323   nn_istate   =       0   !  output the initial state (1) or not (0) 
    2424   nn_stock    =    9999   !  frequency of creation of a restart file (modulo referenced to 1) 
     
    3232      cn_domcfg = "OVF_domcfg"  ! domain configuration filename 
    3333      ! 
     34/ 
     35!----------------------------------------------------------------------- 
     36&namtile        !   parameters of the tiling 
     37!----------------------------------------------------------------------- 
    3438/ 
    3539!----------------------------------------------------------------------- 
     
    144148   ln_dynvor_mix = .false. !  mixed scheme 
    145149   ln_dynvor_een = .false. !  energy & enstrophy scheme 
    146       nn_een_e3f = 0             !  e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1) 
    147150/ 
    148151!----------------------------------------------------------------------- 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/OVERFLOW/EXPREF/namelist_zps_FCT4_flux_ubs_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    4141!----------------------------------------------------------------------- 
    4242&namcfg        !   parameters of the configuration 
     43!----------------------------------------------------------------------- 
     44/ 
     45!----------------------------------------------------------------------- 
     46&namtile        !   parameters of the tiling 
    4347!----------------------------------------------------------------------- 
    4448/ 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/OVERFLOW/MY_SRC/usrdef_nam.F90

    r13286 r15574  
    3838CONTAINS 
    3939 
    40    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     40   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4141      !!---------------------------------------------------------------------- 
    4242      !!                     ***  ROUTINE dom_nam  *** 
     
    5050      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5151      !!---------------------------------------------------------------------- 
    52       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    53       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    54       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    55       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     52      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     53      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     54      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     55      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     56      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     57      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    5658      ! 
    5759      INTEGER ::   ios   ! Local integer 
     
    8890      WRITE(numout,*) '                                               Nj0glo = ', kpj 
    8991      WRITE(numout,*) '                                               jpkglo = ', kpk 
     92      WRITE(numout,*) '   ' 
    9093      ! 
    9194      !                             ! Set the lateral boundary condition of the global domain 
    92       kperio = 0                    ! OVERFLOW configuration : close basin 
    93       ! 
    94       WRITE(numout,*) '   ' 
    95       WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    96       WRITE(numout,*) '      OVERFLOW : closed basin                  jperio = ', kperio 
     95      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! OVERFLOW configuration : closed domain 
     96      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
    9797      ! 
    9898   END SUBROUTINE usr_def_nam 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/OVERFLOW/MY_SRC/usrdef_zgr.F90

    r14053 r15574  
    9090      ! 
    9191      ! at u-point: averaging zht 
    92       DO ji = 1, jpim1 
    93          zhu(ji,:) = 0.5_wp * ( zht(ji,:) + zht(ji+1,:) ) 
    94       END DO 
     92      DO_2D( 0, 0, 0, 0 ) 
     93         zhu(ji,jj) = 0.5_wp * ( zht(ji,jj) + zht(ji+1,jj) ) 
     94      END_2D 
    9595      CALL lbc_lnk( 'usrdef_zgr', zhu, 'U', 1. )     ! boundary condition: this mask the surrouding grid-points 
    9696      !                                ! ==>>>  set by hand non-zero value on first/last columns & rows  
     
    110110      ! 
    111111      ! no ocean cavities : top ocean level is ONE, except over land 
    112       ! the ocean basin surrounded by land (1 grid-point) set through lbc_lnk call as jperio=0  
     112      ! the ocean basin surrounded by land (1+nn_hls grid-points) set through lbc_lnk call 
    113113      z2d(:,:) = 1._wp                    ! surface ocean is the 1st level 
    114       CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin since jperio = 0 (see userdef_nam.F90) 
     114      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin, see userdef_nam.F90 
    115115      k_top(:,:) = NINT( z2d(:,:) ) 
    116116      ! 
     
    184184            pe3vw(:,:,jk) = pe3w_1d (jk) 
    185185         END DO 
    186          DO_2D( 1, 1, 1, 1 ) 
     186         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    187187            ik = k_bot(ji,jj) 
    188188            pdepw(ji,jj,ik+1) = MIN( zht(ji,jj) , pdepw_1d(ik+1) ) 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/README.rst

    r14226 r15574  
    206206   :labelprefix: T 
    207207 
     208ICE_RHEO 
     209-------- 
     210|  
     211 
     212BENCH 
     213----- 
     214| Benchmark configuration. Allow to run any configuration (including ORCA type or BDY) with idealized grid 
     215  and initial state so it does not need any input file other than the namelists. 
     216  As usual, all configuration changes can be done through the namelist.  
     217  We provide 3 example of namelist_cfg to mimic ORCA1, OR025 or ORCA12 configurations. 
     218  By default do not produce any output file. An extensive description of BENCH will be abailable in  
     219  Irrmann et al. 2021. 
     220 
    208221CPL_OASIS 
    209222--------- 
    210223| This test case checks the OASIS interface in OCE/SBC, allowing to set up  
    211 a coupled configuration through OASIS. See CPL_OASIS/README.md for more information. 
     224  a coupled configuration through OASIS. See CPL_OASIS/README.md for more information. 
     225 
     226DIA_GPU 
     227--------- 
     228| This is a demonstrator of diagnostic DIAHSB ported to GPU using CUDA Fortran.  
     229  Memory communications between host and device are asynchronous given the device has that capability.  
     230  This experiment is target for ORCA2_ICE_PISCES 
    212231 
    213232TSUNAMI 
    214233--------- 
    215234| just use dynspg_ts to simulate the propagation of an ssh anomaly (cosinus) in a box configuration 
    216 with flat bottom and jpk=2 
     235  with flat bottom and jpk=2. 
    217236 
    218237DONUT 
    219238----- 
    220 | Donut shaped configuration to test MPI decomposition with bdy 
     239| Donut shaped configuration to test MPI decomposition with bdy. 
     240 
     241C1D_ASICS 
     242--------- 
     243|  
     244 
     245DOME 
     246---- 
     247|  
     248 
     249ICB 
     250---- 
     251| ICB is a very idealized configuration used to test and debug the icb module. 
     252  The configuration is box with a shallow shelf (40m) on the east and west part of the domain  
     253  with a deep central trough (> 100m). 
     254  ICB are generating using the test capability of the icb model along a E-W line (this can easily be tuned). 
     255 
     256STATION_ASF 
     257----------- 
     258| this demonstration test case can be used to perform a sanity test of the SBCBLK interface of 
     259  NEMO.  It will test all the bulk-parameterization algorithms using an idealized 
     260  forcing that includes a wide range of *SSX / surface atmospheric state* 
     261  conditions to detect potential error / inconsistencies.  Both a short report and 
     262  boolean output: *passed* or *failed* is provided as an output. 
     263 
     264SWG 
     265--- 
     266| Square bassin blown with an analytical wind. Vertical structure allows only one mode 
     267  associated with reduced gravity to develop. This configuration is based on Adcroft & Marshall 1998. 
     268  Also run with RK3 time stepping.  
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/ERA5/oce+ice/namelist_ecmwf-an05_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    5353/ 
    5454!----------------------------------------------------------------------- 
    55 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
     55&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
    5656!----------------------------------------------------------------------- 
    5757   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F) 
    5858/ 
    5959!----------------------------------------------------------------------- 
    60 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     60&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    6161!----------------------------------------------------------------------- 
    6262   !                       !  =T read U-V fields for: 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/ERA5/oce+ice/namelist_ecmwf-cstc_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    5353/ 
    5454!----------------------------------------------------------------------- 
    55 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
     55&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
    5656!----------------------------------------------------------------------- 
    5757   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F) 
    5858/ 
    5959!----------------------------------------------------------------------- 
    60 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     60&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    6161!----------------------------------------------------------------------- 
    6262   !                       !  =T read U-V fields for: 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/ERA5/oce+ice/namelist_ecmwf-lg15_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    5353/ 
    5454!----------------------------------------------------------------------- 
    55 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
     55&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
    5656!----------------------------------------------------------------------- 
    5757   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F) 
    5858/ 
    5959!----------------------------------------------------------------------- 
    60 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     60&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    6161!----------------------------------------------------------------------- 
    6262   !                       !  =T read U-V fields for: 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/ERA5/oce+ice/namelist_ecmwf-lu12_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    5353/ 
    5454!----------------------------------------------------------------------- 
    55 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
     55&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
    5656!----------------------------------------------------------------------- 
    5757   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F) 
    5858/ 
    5959!----------------------------------------------------------------------- 
    60 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     60&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    6161!----------------------------------------------------------------------- 
    6262   !                       !  =T read U-V fields for: 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/ERA5/oce/namelist_andreas_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    5353/ 
    5454!----------------------------------------------------------------------- 
    55 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
     55&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
    5656!----------------------------------------------------------------------- 
    5757   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F) 
    5858/ 
    5959!----------------------------------------------------------------------- 
    60 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     60&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    6161!----------------------------------------------------------------------- 
    6262   !                       !  =T read U-V fields for: 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/ERA5/oce/namelist_coare3p6_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    5353/ 
    5454!----------------------------------------------------------------------- 
    55 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
     55&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
    5656!----------------------------------------------------------------------- 
    5757   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F) 
    5858/ 
    5959!----------------------------------------------------------------------- 
    60 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     60&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    6161!----------------------------------------------------------------------- 
    6262   !                       !  =T read U-V fields for: 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/ERA5/oce/namelist_ecmwf_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    5353/ 
    5454!----------------------------------------------------------------------- 
    55 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
     55&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
    5656!----------------------------------------------------------------------- 
    5757   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F) 
    5858/ 
    5959!----------------------------------------------------------------------- 
    60 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     60&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    6161!----------------------------------------------------------------------- 
    6262   !                       !  =T read U-V fields for: 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/ERA5/oce/namelist_ncar_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    5353/ 
    5454!----------------------------------------------------------------------- 
    55 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
     55&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
    5656!----------------------------------------------------------------------- 
    5757   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F) 
    5858/ 
    5959!----------------------------------------------------------------------- 
    60 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     60&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    6161!----------------------------------------------------------------------- 
    6262   !                       !  =T read U-V fields for: 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/PAPA/oce/namelist_andreas_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    4747/ 
    4848!----------------------------------------------------------------------- 
    49 &namc1d        !   1D configuration options / STATION_ASF               ("key_c1d" default: PAPA station) 
     49&namc1d        !   1D configuration options / STATION_ASF               (ln_c1d =T default: PAPA station) 
    5050!----------------------------------------------------------------------- 
    5151   rn_lat1d    =      50.1 !  Column latitude    [PAPA station] 
     
    5353/ 
    5454!----------------------------------------------------------------------- 
    55 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
     55&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
    5656!----------------------------------------------------------------------- 
    5757   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F) 
    5858/ 
    5959!----------------------------------------------------------------------- 
    60 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     60&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    6161!----------------------------------------------------------------------- 
    6262   !                       !  =T read U-V fields for: 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/PAPA/oce/namelist_coare3p6_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    4747/ 
    4848!----------------------------------------------------------------------- 
    49 &namc1d        !   1D configuration options / STATION_ASF               ("key_c1d" default: PAPA station) 
     49&namc1d        !   1D configuration options / STATION_ASF               (ln_c1d =T default: PAPA station) 
    5050!----------------------------------------------------------------------- 
    5151   rn_lat1d    =      50.1 !  Column latitude    [PAPA station] 
     
    5353/ 
    5454!----------------------------------------------------------------------- 
    55 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
     55&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
    5656!----------------------------------------------------------------------- 
    5757   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F) 
    5858/ 
    5959!----------------------------------------------------------------------- 
    60 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     60&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    6161!----------------------------------------------------------------------- 
    6262   !                       !  =T read U-V fields for: 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/PAPA/oce/namelist_ecmwf_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    4747/ 
    4848!----------------------------------------------------------------------- 
    49 &namc1d        !   1D configuration options / STATION_ASF               ("key_c1d" default: PAPA station) 
     49&namc1d        !   1D configuration options / STATION_ASF               (ln_c1d =T default: PAPA station) 
    5050!----------------------------------------------------------------------- 
    5151   rn_lat1d    =      50.1 !  Column latitude    [PAPA station] 
     
    5353/ 
    5454!----------------------------------------------------------------------- 
    55 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
     55&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
    5656!----------------------------------------------------------------------- 
    5757   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F) 
    5858/ 
    5959!----------------------------------------------------------------------- 
    60 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     60&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    6161!----------------------------------------------------------------------- 
    6262   !                       !  =T read U-V fields for: 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/PAPA/oce/namelist_ncar_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    4747/ 
    4848!----------------------------------------------------------------------- 
    49 &namc1d        !   1D configuration options / STATION_ASF               ("key_c1d" default: PAPA station) 
     49&namc1d        !   1D configuration options / STATION_ASF               (ln_c1d =T default: PAPA station) 
    5050!----------------------------------------------------------------------- 
    5151   rn_lat1d    =      50.1 !  Column latitude    [PAPA station] 
     
    5353/ 
    5454!----------------------------------------------------------------------- 
    55 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
     55&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
    5656!----------------------------------------------------------------------- 
    5757   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F) 
    5858/ 
    5959!----------------------------------------------------------------------- 
    60 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     60&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    6161!----------------------------------------------------------------------- 
    6262   !                       !  =T read U-V fields for: 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/MY_SRC/icesbc.F90

    r14072 r15574  
    9191         vtau_ice(ji,jj) = vtau_ice(ji,jj) * xcplmask(ji,jj,0) + zvtau_ice(ji,jj) * ( 1. - xcplmask(ji,jj,0) ) 
    9292         END_2D 
    93          CALL lbc_lnk_multi( 'icesbc', utau_ice, 'U', -1.0_wp, vtau_ice, 'V', -1.0_wp ) 
     93         CALL lbc_lnk( 'icesbc', utau_ice, 'U', -1.0_wp, vtau_ice, 'V', -1.0_wp ) 
    9494      ENDIF 
    9595      ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/MY_SRC/nemogcm.F90

    r14239 r15574  
    243243      ! 
    244244      IF( ln_read_cfg ) THEN            ! Read sizes in domain configuration file 
    245          CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio ) 
     245         CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype ) 
    246246      ELSE                              ! user-defined namelist 
    247          CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio ) 
     247         CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype ) 
    248248      ENDIF 
    249249      ! 
     
    273273                           CALL     phy_cst         ! Physical constants 
    274274                           CALL     eos_init        ! Equation of state 
    275       IF( lk_c1d       )   CALL     c1d_init        ! 1D column configuration 
     275      IF( ln_c1d       )   CALL     c1d_init        ! 1D column configuration 
    276276                           CALL     dom_init( Nbb, Nnn, Naa ) ! Domain 
    277277      IF( sn_cfctl%l_prtctl )   & 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/MY_SRC/sbcssm.F90

    r14072 r15574  
    1212   !!---------------------------------------------------------------------- 
    1313   USE oce            ! ocean dynamics and tracers variables 
    14    USE c1d            ! 1D configuration: lk_c1d 
     14   USE c1d            ! 1D configuration: ln_c1d 
    1515   USE dom_oce        ! ocean domain: variables 
    1616   USE sbc_oce        ! surface module: variables 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/MY_SRC/stpctl.F90

    r14318 r15574  
    113113      !                                   !==  done by all processes at every time step  ==! 
    114114      ! 
    115       llmsk(   1:Nis1,:) = .FALSE.                                              ! exclude halos from the checked region 
    116       llmsk(Nie1: jpi,:) = .FALSE. 
    117       llmsk(:,   1:Njs1) = .FALSE. 
    118       llmsk(:,Nje1: jpj) = .FALSE. 
     115      llmsk(     1:nn_hls,:) = .FALSE.                                          ! exclude halos from the checked region 
     116      llmsk(Nie0+1:  jpi,:) = .FALSE. 
     117      llmsk(:,     1:nn_hls) = .FALSE. 
     118      llmsk(:,Nje0+1:  jpj) = .FALSE. 
    119119      ! 
    120120      llmsk(Nis0:Nie0,Njs0:Nje0) = tmask(Nis0:Nie0,Njs0:Nje0,1) == 1._wp        ! test only the inner domain 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/MY_SRC/usrdef_nam.F90

    r14072 r15574  
    3737CONTAINS 
    3838 
    39    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     39   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4040      !!---------------------------------------------------------------------- 
    4141      !!                     ***  ROUTINE dom_nam  *** 
     
    4949      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5050      !!---------------------------------------------------------------------- 
    51       CHARACTER(len=*), INTENT(out) ::   cd_cfg          ! configuration name 
    52       INTEGER         , INTENT(out) ::   kk_cfg          ! configuration resolution 
    53       INTEGER         , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
    54       INTEGER         , INTENT(out) ::   kperio          ! lateral global domain b.c. 
     51      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     52      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     53      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     54      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     55      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     56      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    5557      ! 
    5658      INTEGER ::   ios   ! Local integer 
     
    7375      ! 
    7476      !                             ! Set the lateral boundary condition of the global domain 
    75       kperio =  7                   ! C1D configuration : 3x3 basin with cyclic Est-West and Norht-South condition 
     77      ldIperio = .TRUE.    ;   ldJperio = .true.   ! C1D configuration : 3x3 basin with cyclic Est-West and Norht-South condition 
     78      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
    7679      ! 
    7780      !                             ! control print 
     
    8588         WRITE(numout,*) '      number of model levels                              kpk = ', kpk 
    8689         WRITE(numout,*) '   ' 
    87          WRITE(numout,*) '   Lateral b.c. of the domain set to       jperio = ', kperio 
    8890      ENDIF 
    8991      ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/SANITY_CHECK/IDEALIZED/oce/namelist_andreas_cfg

    r14229 r15574  
    1616!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1717!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    18 !!   namc1d       1D configuration options                              ("key_c1d") 
    19 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    20 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     18!!   namc1d       1D configuration options                              (ln_c1d =T) 
     19!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     20!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    2121!!====================================================================== 
    2222! 
     
    5151/ 
    5252!----------------------------------------------------------------------- 
    53 &namc1d        !   1D configuration options / STATION_ASF               ("key_c1d" default: PAPA station) 
     53&namc1d        !   1D configuration options / STATION_ASF               (ln_c1d =T default: PAPA station) 
    5454!----------------------------------------------------------------------- 
    5555   rn_lat1d    =      50.1 !  Column latitude    [PAPA station] 
     
    5757/ 
    5858!----------------------------------------------------------------------- 
    59 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
     59&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
    6060!----------------------------------------------------------------------- 
    6161   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F) 
    6262/ 
    6363!----------------------------------------------------------------------- 
    64 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     64&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    6565!----------------------------------------------------------------------- 
    6666   !                       !  =T read U-V fields for: 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/SANITY_CHECK/IDEALIZED/oce/namelist_coare3p0_cfg

    r14229 r15574  
    1616!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1717!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    18 !!   namc1d       1D configuration options                              ("key_c1d") 
    19 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    20 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     18!!   namc1d       1D configuration options                              (ln_c1d =T) 
     19!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     20!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    2121!!====================================================================== 
    2222! 
     
    5151/ 
    5252!----------------------------------------------------------------------- 
    53 &namc1d        !   1D configuration options / STATION_ASF               ("key_c1d" default: PAPA station) 
     53&namc1d        !   1D configuration options / STATION_ASF               (ln_c1d =T default: PAPA station) 
    5454!----------------------------------------------------------------------- 
    5555   rn_lat1d    =      50.1 !  Column latitude    [PAPA station] 
     
    5757/ 
    5858!----------------------------------------------------------------------- 
    59 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
     59&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
    6060!----------------------------------------------------------------------- 
    6161   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F) 
    6262/ 
    6363!----------------------------------------------------------------------- 
    64 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     64&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    6565!----------------------------------------------------------------------- 
    6666   !                       !  =T read U-V fields for: 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/SANITY_CHECK/IDEALIZED/oce/namelist_coare3p6_cfg

    r14229 r15574  
    1616!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1717!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    18 !!   namc1d       1D configuration options                              ("key_c1d") 
    19 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    20 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     18!!   namc1d       1D configuration options                              (ln_c1d =T) 
     19!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     20!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    2121!!====================================================================== 
    2222! 
     
    5151/ 
    5252!----------------------------------------------------------------------- 
    53 &namc1d        !   1D configuration options / STATION_ASF               ("key_c1d" default: PAPA station) 
     53&namc1d        !   1D configuration options / STATION_ASF               (ln_c1d =T default: PAPA station) 
    5454!----------------------------------------------------------------------- 
    5555   rn_lat1d    =      50.1 !  Column latitude    [PAPA station] 
     
    5757/ 
    5858!----------------------------------------------------------------------- 
    59 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
     59&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
    6060!----------------------------------------------------------------------- 
    6161   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F) 
    6262/ 
    6363!----------------------------------------------------------------------- 
    64 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     64&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    6565!----------------------------------------------------------------------- 
    6666   !                       !  =T read U-V fields for: 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/SANITY_CHECK/IDEALIZED/oce/namelist_ecmwf_cfg

    r14229 r15574  
    1616!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1717!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    18 !!   namc1d       1D configuration options                              ("key_c1d") 
    19 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    20 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     18!!   namc1d       1D configuration options                              (ln_c1d =T) 
     19!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     20!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    2121!!====================================================================== 
    2222! 
     
    5151/ 
    5252!----------------------------------------------------------------------- 
    53 &namc1d        !   1D configuration options / STATION_ASF               ("key_c1d" default: PAPA station) 
     53&namc1d        !   1D configuration options / STATION_ASF               (ln_c1d =T default: PAPA station) 
    5454!----------------------------------------------------------------------- 
    5555   rn_lat1d    =      50.1 !  Column latitude    [PAPA station] 
     
    5757/ 
    5858!----------------------------------------------------------------------- 
    59 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
     59&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
    6060!----------------------------------------------------------------------- 
    6161   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F) 
    6262/ 
    6363!----------------------------------------------------------------------- 
    64 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     64&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    6565!----------------------------------------------------------------------- 
    6666   !                       !  =T read U-V fields for: 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/SANITY_CHECK/IDEALIZED/oce/namelist_ncar_cfg

    r14229 r15574  
    1616!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1717!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    18 !!   namc1d       1D configuration options                              ("key_c1d") 
    19 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    20 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     18!!   namc1d       1D configuration options                              (ln_c1d =T) 
     19!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     20!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    2121!!====================================================================== 
    2222! 
     
    5151/ 
    5252!----------------------------------------------------------------------- 
    53 &namc1d        !   1D configuration options / STATION_ASF               ("key_c1d" default: PAPA station) 
     53&namc1d        !   1D configuration options / STATION_ASF               (ln_c1d =T default: PAPA station) 
    5454!----------------------------------------------------------------------- 
    5555   rn_lat1d    =      50.1 !  Column latitude    [PAPA station] 
     
    5757/ 
    5858!----------------------------------------------------------------------- 
    59 &namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
     59&namc1d_dyndmp !   U & V newtonian damping                              (ln_c1d =T default: OFF) 
    6060!----------------------------------------------------------------------- 
    6161   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F) 
    6262/ 
    6363!----------------------------------------------------------------------- 
    64 &namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     64&namc1d_uvd    !   data: U & V currents                                 (ln_c1d =T default: OFF) 
    6565!----------------------------------------------------------------------- 
    6666   !                       !  =T read U-V fields for: 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/cpp_STATION_ASF.fcm

    r14239 r15574  
    1  bld::tool::fppkeys   key_si3 key_c1d key_qco key_xios 
     1 bld::tool::fppkeys   key_si3 key_qco key_xios 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/SWG/EXPREF/namelist_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    3232!----------------------------------------------------------------------- 
    3333   ln_read_cfg = .false.   !  (=F) user defined configuration           (F => create/check namusr_def) 
     34/ 
     35!----------------------------------------------------------------------- 
     36&namtile        !   parameters of the tiling 
     37!----------------------------------------------------------------------- 
    3438/ 
    3539!----------------------------------------------------------------------- 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/SWG/MY_SRC/usrdef_hgr.F90

    r13752 r15574  
    113113      DO jj = 1, jpj  
    114114         DO ji = 1, jpi  
    115             zim1 = REAL( ji + nimpp - 1 )   ;   zim05 = REAL( ji + nimpp - 1 ) - 0.5  
    116             zjm1 = REAL( jj + njmpp - 1 )   ;   zjm05 = REAL( jj + njmpp - 1 ) - 0.5  
     115            zim1 = REAL( ji + nimpp - nn_hls )   ;   zim05 = REAL( ji + nimpp - nn_hls ) - 0.5 
     116            zjm1 = REAL( jj + njmpp - nn_hls )   ;   zjm05 = REAL( jj + njmpp - nn_hls ) - 0.5 
    117117            !    
    118118            !glamt(i,j) position (meters) at T-point  
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/SWG/MY_SRC/usrdef_nam.F90

    r13752 r15574  
    5757CONTAINS 
    5858 
    59    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     59   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    6060      !!---------------------------------------------------------------------- 
    6161      !!                     ***  ROUTINE dom_nam  *** 
     
    6969      !! ** input   : - namusr_def namelist found in namelist_cfg 
    7070      !!---------------------------------------------------------------------- 
    71       CHARACTER(len=*), INTENT(out) ::   cd_cfg          ! configuration name 
    72       INTEGER         , INTENT(out) ::   kk_cfg          ! configuration resolution 
    73       INTEGER         , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    74       INTEGER         , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     71      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     72      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     73      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     74      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     75      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     76      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    7577      ! 
    7678      INTEGER  ::   ios             ! Local integer 
     
    110112      kpk = jpkglo 
    111113      !                             ! Set the lateral boundary condition of the global domain 
    112       kperio = 0                    ! SWG configuration : closed domain 
     114      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! SWG configuration : closed domain 
     115      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
    113116      ! 
    114117# if defined key_bvp 
     
    131134         WRITE(numout,*) '      number of model levels                              jpkglo = ', kpk 
    132135         WRITE(numout,*) '   ' 
    133          WRITE(numout,*) '   Lateral b.c. of the global domain set to closed        jperio = ', kperio 
    134136      ENDIF 
    135137      ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/SWG/MY_SRC/usrdef_sbc.F90

    r13752 r15574  
    3232   PUBLIC   usrdef_sbc_ice_flx   ! routine called by icestp.F90 for ice thermo 
    3333       
     34   !! * Substitutions 
     35#  include "do_loop_substitute.h90" 
    3436   !!---------------------------------------------------------------------- 
    3537   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    7072      sfx (:,:) = 0._wp 
    7173      qns (:,:) = 0._wp 
     74      qsr (:,:) = 0._wp 
    7275 
    7376      ! ---------------------------- ! 
     
    8487      ztauv = - REAL( rn_tau, wp ) * SIN( rn_theta * rad )   ! N.m-2 
    8588       
    86       DO jj = 1, jpj 
    87          DO ji = 1, jpi 
    88            ! length of the domain : 2000km x 2000km  
    89            utau(ji,jj) = - ztauu * COS( rpi * gphiu(ji,jj) / 2000000._wp) 
    90            vtau(ji,jj) = - ztauv * COS( rpi * gphiv(ji,jj) / 2000000._wp) 
    91          END DO 
    92       END DO 
    93       
     89      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     90         ! length of the domain : 2000km x 2000km  
     91         utau(ji,jj) = - ztauu * COS( rpi * gphiu(ji,jj) / 2000000._wp) 
     92         vtau(ji,jj) = - ztauv * COS( rpi * gphiv(ji,jj) / 2000000._wp) 
     93      END_2D 
     94       
    9495      ! module of wind stress and wind speed at T-point 
    9596      zcoef = 1. / ( zrhoa * zcdrag )  
    96       DO jj = 2, jpjm1 
    97          DO ji = 2, jpim1 
    98             ztx = utau(ji-1,jj  ) + utau(ji,jj)  
    99             zty = vtau(ji  ,jj-1) + vtau(ji,jj)  
    100             zmod = 0.5 * SQRT( ztx * ztx + zty * zty ) 
    101             taum(ji,jj) = zmod 
    102             wndm(ji,jj) = SQRT( zmod * zcoef ) 
    103          END DO 
    104       END DO 
    105        
    106       CALL lbc_lnk_multi( 'usrdef_sbc', taum(:,:), 'T', 1. , wndm(:,:), 'T', 1. ) 
     97      DO_2D( 0, 0, 0, 0 ) 
     98         ztx = utau(ji-1,jj  ) + utau(ji,jj)  
     99         zty = vtau(ji  ,jj-1) + vtau(ji,jj)  
     100         zmod = 0.5 * SQRT( ztx * ztx + zty * zty ) 
     101         taum(ji,jj) = zmod 
     102         wndm(ji,jj) = SQRT( zmod * zcoef ) 
     103      END_2D 
     104      CALL lbc_lnk( 'usrdef_sbc', taum(:,:), 'T', 1. , wndm(:,:), 'T', 1. ) 
    107105      ! 
    108106   END SUBROUTINE usrdef_sbc_oce 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/SWG/MY_SRC/usrdef_zgr.F90

    r14204 r15574  
    3131   PUBLIC   usr_def_zgr        ! called by domzgr.F90 
    3232 
     33   !! * Substitutions 
     34#  include "do_loop_substitute.h90" 
    3335   !!---------------------------------------------------------------------- 
    3436   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    190192      z2d(:,:) = REAL( jpkm1 , wp )          ! flat bottom 
    191193      ! 
    192       CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (here jperio=0 ==>> closed) 
    193       ! 
    194       !  
     194      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (closed boundaries) 
     195      ! 
    195196      zylim0 =   10000._wp    ! +10km  
    196197      zylim1 = 2010000._wp    ! 2010km 
     
    198199      zxlim1 = 2010000._wp    ! 2010km 
    199200      ! 
    200       DO jj = 1, jpj 
    201          DO ji = 1, jpi 
     201      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    202202         ! if T point in the 2000 km x 2000 km domain 
    203203         ! IF ( gphit(ji,jj) > zylim0 .AND. gphit(ji,jj) < zylim1 .AND. &  
     
    206206         IF ( gphiv(ji,jj) > zylim0 .AND. gphiv(ji,jj) < zylim1 .AND. &  
    207207            & glamu(ji,jj) > zxlim0 .AND. glamu(ji,jj) < zxlim1       )  THEN 
    208          k_top(ji,jj) = 1    ! = ocean 
    209          k_bot(ji,jj) = NINT( z2d(ji,jj) ) 
     208            k_top(ji,jj) = 1    ! = ocean 
     209            k_bot(ji,jj) = NINT( z2d(ji,jj) ) 
    210210         ELSE 
    211          k_top(ji,jj) = 0    ! = land 
    212          k_bot(ji,jj) = 0 
     211            k_top(ji,jj) = 0    ! = land 
     212            k_bot(ji,jj) = 0 
    213213         END IF 
    214          END DO 
    215       END DO 
     214      END_2D 
    216215      ! mask the lonely corners 
    217       DO jj = 2, jpjm1 
    218          DO ji = 2, jpim1 
     216      DO_2D( 0, 0, 0, 0 ) 
    219217         zcoeff = k_top(ji+1,jj) + k_top(ji,jj+1)   & 
    220218            +     k_top(ji-1,jj) + k_top(ji,jj-1) 
     
    223221            k_bot(ji,jj) = 0 
    224222         END IF 
    225          END DO 
    226       END DO 
    227       ! 
     223      END_2D 
    228224      ! 
    229225   END SUBROUTINE zgr_msk_top_bot 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/TSUNAMI/EXPREF/namelist_cfg

    r14297 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration optgions                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration optgions                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    2929   nn_fcase    =      0    !  Coriolis frequency(f) computation (0:f0, 1:Beta plan, 2:real) 
    3030   rn_ppgphi0  =    38.5   !  Reference latitude      [degrees] 
    31    nn_perio    =      7 
     31   ln_Iperio  =   .true.   ! i-periodicity 
     32   ln_Jperio  =   .true.   ! j-periodicity 
     33/ 
     34!----------------------------------------------------------------------- 
     35&namtile        !   parameters of the tiling 
     36!----------------------------------------------------------------------- 
    3237/ 
    3338!----------------------------------------------------------------------- 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/TSUNAMI/MY_SRC/usrdef_hgr.F90

    r14225 r15574  
    6464      ! 
    6565      INTEGER  ::   ji, jj     ! dummy loop indices 
    66       REAL(wp) ::   zphi0, zlam0, zbeta, zf0 
     66      INTEGER  ::   ii0, ij0   ! dummy loop indices 
     67      REAL(wp) ::   zbeta, zf0 
    6768      REAL(wp) ::   zti, ztj   ! local scalars 
    6869      !!------------------------------------------------------------------------------- 
     
    7778      ! Position coordinates (in kilometers) 
    7879      !                          ========== 
    79       zlam0 = -REAL(Ni0glo, wp) * rn_0xratio * rn_dx 
    80       zphi0 = -REAL(Nj0glo, wp) * rn_0yratio * rn_dy 
     80      ii0 = NINT( REAL(Ni0glo, wp) * rn_0xratio ) 
     81      ij0 = NINT( REAL(Nj0glo, wp) * rn_0yratio ) 
    8182 
    8283#if defined key_agrif 
    8384      ! ! let lower left longitude and latitude from parent 
    8485      IF (.NOT.Agrif_root()) THEN 
    85           zlam0 = (0.5_wp-(Agrif_parent(jpiglo)-1)/2)*Agrif_irhox()*rn_dx & 
    86              &+(Agrif_Ix()+nbghostcells-1)*Agrif_irhox()*rn_dx-(0.5_wp+nbghostcells)*rn_dx 
    87           zphi0 = (0.5_wp-(Agrif_parent(jpjglo)-1)/2)*Agrif_irhoy()*rn_dy & 
    88              &+(Agrif_Iy()+nbghostcells-1)*Agrif_irhoy()*rn_dy-(0.5_wp+nbghostcells)*rn_dy 
     86          to be coded... 
    8987      ENDIF  
    9088#endif 
    9189          
    9290      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )          
    93          zti = REAL( mig0(ji), wp ) - 0.5_wp  ! start at i=0.5 in the global grid without halos 
    94          ztj = REAL( mjg0(jj), wp ) - 0.5_wp  ! start at j=0.5 in the global grid without halos 
     91         zti = REAL( mig0(ji)-ii0, wp )   ! =0 at i=ii0 in the global grid without halos 
     92         ztj = REAL( mjg0(jj)-ij0, wp )   ! =0 at i=ij0 in the global grid without halos 
    9593          
    96          plamt(ji,jj) = zlam0 + rn_dx *   zti 
    97          plamu(ji,jj) = zlam0 + rn_dx * ( zti + 0.5_wp )  
     94         plamt(ji,jj) = rn_dx *   zti 
     95         plamu(ji,jj) = rn_dx * ( zti + 0.5_wp )  
    9896         plamv(ji,jj) = plamt(ji,jj)  
    9997         plamf(ji,jj) = plamu(ji,jj)  
    10098          
    101          pphit(ji,jj) = zphi0 + rn_dy *   ztj 
    102          pphiv(ji,jj) = zphi0 + rn_dy * ( ztj + 0.5_wp )  
     99         pphit(ji,jj) = rn_dy *   ztj 
     100         pphiv(ji,jj) = rn_dy * ( ztj + 0.5_wp )  
    103101         pphiu(ji,jj) = pphit(ji,jj)  
    104102         pphif(ji,jj) = pphiv(ji,jj)  
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/TSUNAMI/MY_SRC/usrdef_nam.F90

    r14297 r15574  
    3737   INTEGER , PUBLIC ::   nn_fcase   =    1   ! F computation (0:f0, 1:Beta, 2:real) 
    3838   REAL(wp), PUBLIC ::   rn_ppgphi0 =   38.5 ! reference latitude for beta-plane  
    39    INTEGER , PUBLIC ::   nn_perio   =    0   ! periodicity of the channel (0=closed, 1=E-W) 
    4039 
    4140   !!---------------------------------------------------------------------- 
     
    4645CONTAINS 
    4746 
    48    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     47   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4948      !!---------------------------------------------------------------------- 
    5049      !!                     ***  ROUTINE dom_nam  *** 
     
    5857      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5958      !!---------------------------------------------------------------------- 
    60       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    61       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    62       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    63       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     59      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     60      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     61      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     62      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     63      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     64      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    6465      ! 
    6566      INTEGER ::   ios      ! Local integer 
     67      LOGICAL ::   ln_Iperio, ln_Jperio 
    6668      !! 
    6769      NAMELIST/namusr_def/  rn_domszx, rn_domszy, rn_domszz, rn_dx, rn_dy, rn_0xratio, rn_0yratio   & 
    68          &                 , nn_fcase, rn_ppgphi0, nn_perio 
     70         &                 , nn_fcase, rn_ppgphi0, ln_Iperio, ln_Jperio 
    6971      !!---------------------------------------------------------------------- 
    7072      ! 
     
    8587#endif 
    8688      ! 
    87       IF(lwm)   WRITE( numond, namusr_def ) 
    88       ! 
    8989      cd_cfg = 'TSUNAMI'             ! name & resolution (not used) 
    9090      kk_cfg = INT( rn_dx ) 
     
    9292      IF( Agrif_Root() ) THEN        ! Global Domain size:  TSUNAMI global domain is  1800 km x 1800 Km x 5000 m 
    9393         kpi = NINT( rn_domszx / rn_dx ) + 1 
    94          kpj = NINT( rn_domszy / rn_dy ) + 3 
     94         kpj = NINT( rn_domszy / rn_dy ) + 1 
    9595      ELSE                           ! Global Domain size: add nbghostcells + 1 "land" point on each side 
    96          kpi  = nbcellsx + nbghostcells_x   + nbghostcells_x  + 2 
     96         kpi  = nbcellsx + nbghostcells_x_w + nbghostcells_x_e + 2 
    9797         kpj  = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 
    9898      ENDIF 
    9999      kpk = 2 
    100       !                             ! Set the lateral boundary condition of the global domain 
    101       kperio = 1                    ! TSUNAMI configuration : closed basin 
    102       !                             ! control print 
     100      !                              ! Set the lateral boundary condition of the global domain 
     101      ! 
     102      ldIperio = ln_Iperio   ;   ldJperio = ln_Jperio 
     103      ldNFold  =  .FALSE.    ;   cdNFtype = '-' 
     104      ! 
     105      !                              ! control print 
    103106      IF(lwp) THEN 
    104107         WRITE(numout,*) '   ' 
     
    115118         WRITE(numout,*) '      F computation                     nn_fcase   = ',   nn_fcase 
    116119         WRITE(numout,*) '      Reference latitude                rn_ppgphi0 = ', rn_ppgphi0 
    117          WRITE(numout,*) '      Periodicity of the basin            nn_perio = ', nn_perio 
     120         WRITE(numout,*) '   ' 
    118121      ENDIF 
    119       !                             ! Set the lateral boundary condition of the global domain 
    120       kperio = nn_perio                    ! TSUNAMI configuration : closed basin 
    121122      ! 
    122123   END SUBROUTINE usr_def_nam 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/TSUNAMI/MY_SRC/usrdef_sbc.F90

    r14225 r15574  
    33   !!                       ***  MODULE  usrdef_sbc  *** 
    44   !!  
    5    !!                      ===  CANAL configuration  === 
     5   !!                      ===  TSUNAMI configuration  === 
    66   !! 
    77   !! User defined :   surface forcing of a user configuration 
     
    4444      !!              condition, i.e. the momentum, heat and freshwater fluxes. 
    4545      !! 
    46       !! ** Method  :   all 0 fields, for CANAL case 
     46      !! ** Method  :   all 0 fields, for TSUNAMI case 
    4747      !!                CAUTION : never mask the surface stress field ! 
    4848      !! 
     
    5757      IF( kt == nit000 ) THEN 
    5858         ! 
    59          IF(lwp) WRITE(numout,*)' usr_sbc : EW_CANAL case: surface forcing' 
     59         IF(lwp) WRITE(numout,*)' usr_sbc : TSUNAMI case: surface forcing' 
    6060         IF(lwp) WRITE(numout,*)' ~~~~~~~~~~~   vtau = taum = wndm = qns = qsr = emp = sfx = 0' 
    6161         ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/VORTEX/EXPREF/1_namelist_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    4545!----------------------------------------------------------------------- 
    4646&namcfg        !   parameters of the configuration                      (default: user defined GYRE) 
     47!----------------------------------------------------------------------- 
     48/ 
     49!----------------------------------------------------------------------- 
     50&namtile        !   parameters of the tiling 
    4751!----------------------------------------------------------------------- 
    4852/ 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/VORTEX/EXPREF/AGRIF_FixedGrids.in

    r9787 r15574  
    111 
    2 19 38 19 38 3 3 3  
     222 41 22 41 3 3 3  
    330 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/VORTEX/EXPREF/namelist_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    4545!----------------------------------------------------------------------- 
    4646&namcfg        !   parameters of the configuration                      (default: use namusr_def in namelist_cfg) 
     47!----------------------------------------------------------------------- 
     48/ 
     49!----------------------------------------------------------------------- 
     50&namtile        !   parameters of the tiling 
    4751!----------------------------------------------------------------------- 
    4852/ 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/VORTEX/MY_SRC/usrdef_hgr.F90

    r14799 r15574  
    2323   IMPLICIT NONE 
    2424   PRIVATE 
     25 
     26   REAL(wp) :: roffsetx, roffsety ! Offset in km to first f-point 
    2527 
    2628   PUBLIC   usr_def_hgr   ! called by domhgr.F90 
     
    6466      ! 
    6567      INTEGER  ::   ji, jj     ! dummy loop indices 
    66       REAL(wp) ::   zphi0, zlam0, zbeta, zf0 
     68      REAL(wp) ::   zbeta, zf0 
    6769      REAL(wp) ::   zti, ztj   ! local scalars 
    6870      !!------------------------------------------------------------------------------- 
     
    7779      ! Position coordinates (in kilometers) 
    7880      !                          ========== 
    79 #if defined key_agrif  
    80       IF( Agrif_Root() ) THEN 
    81 #endif 
    82          zlam0 = -REAL((Ni0glo-1)/2, wp) * 1.e-3 * rn_dx 
    83          zphi0 = -REAL((Nj0glo-1)/2, wp) * 1.e-3 * rn_dy 
     81      ! offset is given at first f-point, i.e. at (i,j) = (nn_hls+1, nn_hls+1) 
     82      ! Here we assume the grid is centred around a T-point at the middle of 
     83      ! of the domain (hence domain size is odd)  
     84      roffsetx = (-REAL(Ni0glo-1, wp) + 1._wp) * 0.5 * 1.e-3 * rn_dx 
     85      roffsety = (-REAL(Nj0glo-1, wp) + 1._wp) * 0.5 * 1.e-3 * rn_dy 
    8486#if defined key_agrif 
    85       ELSE 
    86          ! ! let lower left longitude and latitude from parent 
    87          zlam0 = ( 0.5_wp - REAL(Agrif_Parent(Ni0glo)-1, wp) * 0.5 ) * 1.e-3 * Agrif_irhox() * rn_dx  & 
    88             &  + ( Agrif_Ix() + nbghostcells - 1 ) * Agrif_irhox() * rn_dx * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dx * 1.e-3 
    89          zphi0 = ( 0.5_wp - REAL(Agrif_Parent(Nj0glo)-1, wp) * 0.5 ) * 1.e-3 * Agrif_irhoy() * rn_dy  & 
    90             &  + ( Agrif_Iy() + nbghostcells - 1 ) * Agrif_irhoy() * rn_dy * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dy * 1.e-3 
    91       ENDIF  
    92 #endif 
     87      IF( .NOT.Agrif_Root() ) THEN 
     88         ! deduce offset from parent: 
     89         roffsetx = Agrif_Parent(roffsetx) & 
     90                  & + (-(nbghostcells_x_w - 1) + (Agrif_Parent(nbghostcells_x_w) + Agrif_Ix()-2)*Agrif_Rhox()) * 1.e-3 * rn_dx 
     91         roffsety = Agrif_Parent(roffsety) & 
     92                  & + (-(nbghostcells_y_s - 1) + (Agrif_Parent(nbghostcells_y_s) + Agrif_Iy()-2)*Agrif_Rhoy()) * 1.e-3 * rn_dy 
     93      ENDIF 
     94#endif          
     95      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     96         zti = REAL( mig0(ji)-1, wp )  ! start at i=0 in the global grid without halos 
     97         ztj = REAL( mjg0(jj)-1, wp )  ! start at j=0 in the global grid without halos 
    9398          
    94       DO_2D( nn_hls , nn_hls, nn_hls, nn_hls ) 
    95          zti = REAL( mig0(ji)-1, wp )   ! start at i=0.5 in the global grid without halos 
    96          ztj = REAL( mjg0(jj)-1, wp )   ! start at j=0.5 in the global grid without halos 
    97           
    98          plamt(ji,jj) = zlam0 + rn_dx * 1.e-3 *   zti 
    99          plamu(ji,jj) = zlam0 + rn_dx * 1.e-3 * ( zti + 0.5_wp ) 
     99         plamt(ji,jj) = roffsetx + rn_dx * 1.e-3 * ( zti - 0.5_wp ) 
     100         plamu(ji,jj) = roffsetx + rn_dx * 1.e-3 *   zti  
    100101         plamv(ji,jj) = plamt(ji,jj)  
    101102         plamf(ji,jj) = plamu(ji,jj)  
    102103          
    103          pphit(ji,jj) = zphi0 + rn_dy * 1.e-3 *   ztj 
    104          pphiv(ji,jj) = zphi0 + rn_dy * 1.e-3 * ( ztj + 0.5_wp ) 
     104         pphit(ji,jj) = roffsety + rn_dy * 1.e-3 * ( ztj - 0.5_wp ) 
     105         pphiv(ji,jj) = roffsety + rn_dy * 1.e-3 *   ztj  
    105106         pphiu(ji,jj) = pphit(ji,jj)  
    106107         pphif(ji,jj) = pphiv(ji,jj)  
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/VORTEX/MY_SRC/usrdef_istate.F90

    r14133 r15574  
    7676      ! 
    7777      ! temperature:          
    78       DO_2D( 1, 1, 1, 1 ) 
     78      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    7979         zx = glamt(ji,jj) * 1.e3 
    8080         zy = gphit(ji,jj) * 1.e3 
     
    123123      END_2D 
    124124      ! 
    125       CALL lbc_lnk_multi( 'usrdef_istate', pu, 'U', -1., pv, 'V', -1. ) 
     125      CALL lbc_lnk( 'usrdef_istate', pu, 'U', -1., pv, 'V', -1. ) 
    126126      !    
    127127   END SUBROUTINE usr_def_istate 
     
    160160      ! Sea level: 
    161161      za = -zP0 * (1._wp-EXP(-zH)) / (grav*(zH-1._wp + EXP(-zH))) 
    162       DO_2D( 1, 1, 1, 1 ) 
     162      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    163163         zx = glamt(ji,jj) * 1.e3 
    164164         zy = gphit(ji,jj) * 1.e3 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/VORTEX/MY_SRC/usrdef_nam.F90

    r14086 r15574  
    4040CONTAINS 
    4141 
    42    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     42   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4343      !!---------------------------------------------------------------------- 
    4444      !!                     ***  ROUTINE dom_nam  *** 
     
    5252      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5353      !!---------------------------------------------------------------------- 
    54       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    55       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    56       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    57       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     54      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     55      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     56      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     57      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     58      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     59      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    5860      ! 
    5961      INTEGER ::   ios          ! Local integer 
     62      INTEGER :: ighost_n, ighost_s, ighost_w, ighost_e 
    6063      REAL(wp)::   zlx, zly, zh ! Local scalars 
    6164      !! 
     
    8184      kk_cfg = nINT( rn_dx ) 
    8285      ! 
     86#if defined key_agrif  
    8387      IF( Agrif_Root() ) THEN       ! Global Domain size:  VORTEX global domain is  1800 km x 1800 Km x 5000 m 
     88#endif 
    8489         kpi = NINT( 1800.e3  / rn_dx ) + 3   
    8590         kpj = NINT( 1800.e3  / rn_dy ) + 3  
     91#if defined key_agrif  
    8692      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 
     93         ! At this stage, child ghosts have not been set 
     94         ighost_w = nbghostcells 
     95         ighost_e = nbghostcells 
     96         ighost_s = nbghostcells 
     97         ighost_n = nbghostcells 
     98 
     99         ! In case one sets zoom boundaries over domain edges:  
     100         IF  ( Agrif_Ix() == 2 - Agrif_Parent(nbghostcells_x_w) ) ighost_w = 1 
     101         IF  ( Agrif_Ix() + nbcellsx/AGRIF_Irhox() == Agrif_Parent(Ni0glo) - Agrif_Parent(nbghostcells_x_w) ) ighost_e = 1  
     102         IF  ( Agrif_Iy() == 2 - Agrif_Parent(nbghostcells_y_s) ) ighost_s = 1 
     103         IF  ( Agrif_Iy() + nbcellsy/AGRIF_Irhoy() == Agrif_Parent(Nj0glo) - Agrif_Parent(nbghostcells_y_s) ) ighost_n = 1  
     104!         kpi  = nbcellsx + 2 * ( nbghostcells + 1 ) 
     105!         kpj  = nbcellsy + 2 * ( nbghostcells + 1 ) 
     106         kpi  = nbcellsx + ighost_w + ighost_e  
     107         kpj  = nbcellsy + ighost_s + ighost_n 
    91108      ENDIF 
     109#endif 
    92110      kpk = NINT( 5000._wp / rn_dz ) + 1 
    93111      ! 
     
    96114      zh  = (kpk-1)*rn_dz 
    97115      !                             ! Set the lateral boundary condition of the global domain 
    98       kperio = 0                    ! VORTEX configuration : closed basin 
     116      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! VORTEX configuration : closed domain 
     117      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
     118      ! 
    99119      !                             ! control print 
    100120      IF(lwp) THEN 
     
    115135         WRITE(numout,*) '      Reference latitude            rn_ppgphi0 = ', rn_ppgphi0 
    116136         WRITE(numout,*) '   ' 
    117          WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    118          WRITE(numout,*) '      VORTEX : closed basin            jperio = ', kperio 
    119137      ENDIF 
    120138      ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/VORTEX/MY_SRC/usrdef_zgr.F90

    r12740 r15574  
    190190      z2d(:,:) = REAL( jpkm1 , wp )          ! flat bottom 
    191191      ! 
    192       CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (here jperio=0 ==>> closed) 
     192      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (closed boundaries) 
    193193      ! 
    194194      k_bot(:,:) = NINT( z2d(:,:) )          ! =jpkm1 over the ocean point, =0 elsewhere 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/WAD/EXPREF/namelist_cfg

    r14229 r15574  
    1212!!   namtsd       data: temperature & salinity                          (default: OFF) 
    1313!!   namcrs       coarsened grid (for outputs and/or TOP)               (ln_crs =T) 
    14 !!   namc1d       1D configuration options                              ("key_c1d") 
    15 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    16 !!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
     14!!   namc1d       1D configuration options                              (ln_c1d =T) 
     15!!   namc1d_dyndmp 1D newtonian damping applied on currents             (ln_c1d =T) 
     16!!   namc1d_uvd   1D data (currents)                                    (ln_c1d =T) 
    1717!!====================================================================== 
    1818! 
     
    5151      !                    !  (=F) user defined configuration  ==>>>  see usrdef(_...) modules 
    5252   ln_write_cfg = .true.    !  (=T) create the domain configuration file 
     53/ 
     54!----------------------------------------------------------------------- 
     55&namtile        !   parameters of the tiling 
     56!----------------------------------------------------------------------- 
    5357/ 
    5458!----------------------------------------------------------------------- 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/WAD/MY_SRC/usrdef_nam.F90

    r13286 r15574  
    3838CONTAINS 
    3939 
    40    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     40   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4141      !!---------------------------------------------------------------------- 
    4242      !!                     ***  ROUTINE dom_nam  *** 
     
    5050      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5151      !!---------------------------------------------------------------------- 
    52       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    53       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    54       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    55       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     52      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     53      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     54      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     55      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     56      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     57      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    5658      ! 
    5759      INTEGER ::   ios   ! Local integer 
     
    7577      kpk = INT(  10.  / rn_dz ) + 1 
    7678      !                             ! Set the lateral boundary condition of the global domain 
    77       kperio = 0                    ! WAD_TEST_CASES configuration : closed domain 
     79      ldIperio = .FALSE.   ;   ldJperio = .FALSE.    ! WAD_TEST_CASES configuration : closed domain 
     80      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
    7881      IF( nn_wad_test == 8 ) THEN 
    79          kperio = 7         ! North-South cyclic test 
     82         ldIperio = .TRUE.   ;   ldJperio = .TRUE.   ! WAD_TEST_CASES configuration : bi-periodic 
    8083         kpi = kpi - 2      ! no closed boundary 
    8184         kpj = kpj - 2      ! no closed boundary 
     
    9598         WRITE(numout,*) '                                               jpkglo = ', kpk 
    9699         WRITE(numout,*) '   ' 
    97          WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    98          WRITE(numout,*) '      closed                                   jperio = ', kperio 
    99100      ENDIF 
    100101      ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/WAD/MY_SRC/usrdef_zgr.F90

    r13295 r15574  
    230230 
    231231      ! at u-point: averaging zht 
    232       DO ji = 1, jpim1 
    233          zhu(ji,:) = 0.5_wp * ( zht(ji,:) + zht(ji+1,:) ) 
    234       END DO 
     232      DO_2D( 0, 0, 0, 0 ) 
     233         zhu(ji,jj) = 0.5_wp * ( zht(ji,jj) + zht(ji+1,jj) ) 
     234      END_2D 
    235235      CALL lbc_lnk( 'usrdef_zgr', zhu, 'U', 1. )     ! boundary condition: this mask the surrounding grid-points 
    236236      !                                ! ==>>>  set by hand non-zero value on first/last columns & rows  
     
    260260      ! 
    261261      ! no ocean cavities : top ocean level is ONE, except over land 
    262       ! the ocean basin surrounnded by land (1 grid-point) set through lbc_lnk call as jperio=0  
     262      ! the ocean basin surrounnded by land (1+nn_hls grid-points) set through lbc_lnk call 
    263263      z2d(:,:) = 1._wp                    ! surface ocean is the 1st level 
    264264      z2d(mi0(1):mi1(1),:) = 0._wp 
     
    267267      z2d(:,mj0(jpjglo):mj1(jpjglo)) = 0._wp 
    268268 
    269  
    270  
    271  
    272  
    273       CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin since jperio = 0 (see userdef_nam.F90) 
     269      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin, see userdef_nam.F90 
    274270      k_top(:,:) = NINT( z2d(:,:) ) 
    275271      ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/demo_cfgs.txt

    r14226 r15574  
    1212STATION_ASF OCE ICE 
    1313CPL_OASIS  OCE TOP ICE NST 
     14DIA_GPU OCE ICE 
    1415SWG OCE SWE 
    1516C1D_ASICS OCE 
Note: See TracChangeset for help on using the changeset viewer.