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 13463 for NEMO/branches/2019/dev_r11351_fldread_with_XIOS/tests/WAD – NEMO

Ignore:
Timestamp:
2020-09-14T17:40:34+02:00 (4 years ago)
Author:
andmirek
Message:

Ticket #2195:update to trunk 13461

Location:
NEMO/branches/2019/dev_r11351_fldread_with_XIOS
Files:
1 deleted
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11351_fldread_with_XIOS

    • Property svn:externals
      •  

        old new  
        33^/utils/build/mk@HEAD         mk 
        44^/utils/tools@HEAD            tools 
        5 ^/vendors/AGRIF/dev@HEAD      ext/AGRIF 
         5^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
        77^/vendors/IOIPSL@HEAD         ext/IOIPSL 
         8 
         9# SETTE 
         10^/utils/CI/sette@13382        sette 
  • NEMO/branches/2019/dev_r11351_fldread_with_XIOS/tests/WAD/EXPREF/context_nemo.xml

    r9930 r13463  
    55--> 
    66<context id="nemo"> 
    7 <!-- $id$ --> 
     7    <!-- $id$ --> 
     8    <variable_definition> 
     9       <!-- Year/Month/Day of time origin for NetCDF files; defaults to 1800-01-01 --> 
     10       <variable id="ref_year"  type="int"> 1900 </variable> 
     11       <variable id="ref_month" type="int"> 01 </variable> 
     12       <variable id="ref_day"   type="int"> 01 </variable> 
     13       <variable id="rau0"      type="float" > 1026.0 </variable> 
     14       <variable id="cpocean"   type="float" > 3991.86795711963 </variable> 
     15       <variable id="convSpsu"  type="float" > 0.99530670233846  </variable> 
     16       <variable id="rhoic"     type="float" > 917.0 </variable> 
     17       <variable id="rhosn"     type="float" > 330.0 </variable> 
     18       <variable id="missval"  type="float" > 1.e20 </variable>           
     19    </variable_definition> 
     20 
    821<!-- Fields definition --> 
    922    <field_definition src="./field_def_nemo-oce.xml"/>   <!--  NEMO ocean dynamics                     --> 
     
    1124<!-- Files definition --> 
    1225    <file_definition src="./file_def_nemo-oce.xml"/>     <!--  NEMO ocean dynamics                     --> 
    13     <!--  
    14 ============================================================================================================ 
    15 = grid definition = = DO NOT CHANGE = 
    16 ============================================================================================================ 
    17     --> 
    18      
    19     <axis_definition> 
    20       <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" /> 
    21       <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" /> 
    22       <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" /> 
    23       <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" /> 
    24       <axis id="nfloat" long_name="Float number"      unit="-"                 /> 
    25       <axis id="icbcla"  long_name="Iceberg class"      unit="1"               /> 
    26       <axis id="ncatice" long_name="Ice category"       unit="1"               /> 
    27       <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"            /> 
    28       <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"            /> 
    29     </axis_definition> 
     26 
     27<!-- Axis definition --> 
     28    <axis_definition src="./axis_def_nemo.xml"/> 
    3029  
     30<!-- Domain definition --> 
    3131    <domain_definition src="./domain_def_nemo.xml"/> 
     32 
     33<!-- Grids definition --> 
     34    <grid_definition   src="./grid_def_nemo.xml"/> 
    3235   
    33     <grid_definition src="./grid_def_nemo.xml"/> 
    3436 
    3537</context> 
  • NEMO/branches/2019/dev_r11351_fldread_with_XIOS/tests/WAD/EXPREF/makebdy_tc7.py

    r7609 r13463  
    44pathout = "bdyssh_tc7" 
    55 
    6 nx = 34  
     6nx = 23  
    77ny = 1 
    88nt = 24 
     
    1818 ssh = np.zeros((nt,ny,nx)) 
    1919 for nnt in range(nd*nt,(nd+1)*nt): 
    20    tx = 2.5*np.cos((3.141592654/6.0)*(nnt+1.0)) 
     20   tx = 2.5*np.cos((3.141592654/6.0)*(nnt)) 
    2121   print nnt, tx 
    2222   for nnx in range(nx): 
  • NEMO/branches/2019/dev_r11351_fldread_with_XIOS/tests/WAD/EXPREF/namelist_cfg

    r10075 r13463  
    4343   ! 
    4444   ln_meshmask = .true.    !  create (>0) a mesh file or not (=0) 
    45    rn_rdt      =    18.    !  time step for the dynamics  
     45   rn_Dt      =    18.    !  time step for the dynamics  
    4646/ 
    4747!----------------------------------------------------------------------- 
     
    169169!----------------------------------------------------------------------- 
    170170    ctypebdy = 'E' 
    171     nbdyind  = 50 
     171    nbdyind  = 33 
    172172    nbdybeg  = 1 
    173     nbdyend  = 34 
     173    nbdyend  = 23 
    174174    !ctypebdy = 'W' 
    175175    !nbdyind  = 2 
     
    180180&nambdy_dta    !  open boundaries - external data                        
    181181!----------------------------------------------------------------------- 
     182   ln_zinterp  = .false.      !  T if a vertical interpolation is required. Variables gdep[tuv] and e3[tuv] must exist in the file 
     183   !                          !  automatically defined to T if the number of vertical levels in bdy dta /= jpk 
     184   ln_full_vel = .false.      !  T if [uv]3d are "full" velocities and not only its baroclinic components 
     185   !                          !  in this case, baroclinic and barotropic velocities will be recomputed -> [uv]2d not needed 
     186   ! 
     187   cn_dir  =  './' 
    182188!              !  file name      ! frequency (hours) ! variable  ! time interp. !  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
    183189!              !                 !  (if <0  months)  !   name    !  (logical)   !  (T/F ) ! 'monthly' ! filename ! pairing  ! filename      ! 
    184    bn_ssh =     'bdyssh_tc7' ,         1        , 'sshbdy',     .true.     , .true.  ,  'daily'  ,    ''    ,   ''     , '' 
    185    bn_u2d =     'bdyuv_tc7'  ,         1        , 'ubdy'  ,     .true.     , .true.  ,  'daily'  ,    ''    ,   ''     , '' 
    186    bn_v2d =     'bdyuv_tc7'  ,         1        , 'vbdy'  ,     .true.     , .true.  ,  'daily'  ,    ''    ,   ''     , '' 
    187    cn_dir      =    './'   !  root directory for the location of the bulk files 
    188    ln_full_vel = .false.        ! 
     190   bn_ssh =     'bdyssh_tc7' ,         1.       , 'sshbdy',     .true.     , .true.  ,  'daily'  ,    ''    ,   ''     , '' 
     191   bn_u2d =     'bdyuv_tc7'  ,         1.       , 'ubdy'  ,     .true.     , .true.  ,  'daily'  ,    ''    ,   ''     , '' 
     192   bn_v2d =     'bdyuv_tc7'  ,         1.       , 'vbdy'  ,     .true.     , .true.  ,  'daily'  ,    ''    ,   ''     , '' 
    189193/ 
    190194!----------------------------------------------------------------------- 
     
    196200!!                                                                    !! 
    197201!!   namdrg        top/bottom drag coefficient                          (default: NO selection) 
    198 !!   namdrg_top    top    friction                                      (ln_OFF=F & ln_isfcav=T) 
    199 !!   namdrg_bot    bottom friction                                      (ln_OFF=F) 
     202!!   namdrg_top    top    friction                                      (ln_drg_OFF=F & ln_isfcav=T) 
     203!!   namdrg_bot    bottom friction                                      (ln_drg_OFF=F) 
    200204!!   nambbc        bottom temperature boundary condition                (default: OFF) 
    201205!!   nambbl        bottom boundary layer scheme                         (default: OFF) 
     
    340344   ln_dynspg_ts  = .true.  !  split-explicit free surface 
    341345   ln_bt_auto    = .false. ! Number of sub-step defined from: 
    342    nn_baro       =  12     ! =F : the number of sub-step in rn_rdt seconds 
     346   nn_e       =  12     ! =F : the number of sub-step in rn_Dt seconds 
    343347/ 
    344348!----------------------------------------------------------------------- 
     
    417421!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    418422!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    419 !!   namflo       float parameters                                      ("key_float") 
    420 !!   nam_diaharm  Harmonic analysis of tidal constituents               ("key_diaharm") 
    421 !!   namdct       transports through some sections                      ("key_diadct") 
    422 !!   nam_diatmb   Top Middle Bottom Output                              (default: OFF) 
     423!!   namflo       float parameters                                      (default: OFF) 
     424!!   nam_diadct   transports through some sections                      (default: OFF) 
    423425!!   nam_dia25h   25h Mean Output                                       (default: OFF) 
    424426!!   namnc4       netcdf4 chunking and compression settings             ("key_netcdf4") 
     
    439441/ 
    440442!----------------------------------------------------------------------- 
    441 &namdct        ! transports through some sections                       ("key_diadct") 
    442 !----------------------------------------------------------------------- 
     443&nam_diadct    !   transports through some sections                     (default: OFF) 
     444!----------------------------------------------------------------------- 
     445    ln_diadct  = .false.   ! Calculate transport thru sections or not 
    443446    nn_dct      = 60       !  time step frequency for transports computing 
    444447    nn_dctwri   = 60       !  time step frequency for transports writing 
  • NEMO/branches/2019/dev_r11351_fldread_with_XIOS/tests/WAD/MY_DOCS/Namelists/nam_wad_tc7

    r7609 r13463  
    1515    nb_bdy         = 1                    !  number of open boundary sets 
    1616/ 
    17 !----------------------------------------------------------------------- 
    18 &namwad  !   Wetting and drying 
    19 !----------------------------------------------------------------------- 
    20    rn_wdmin1         =  0.150   ! Minimum wet depth on dried cells 
    21 / 
  • NEMO/branches/2019/dev_r11351_fldread_with_XIOS/tests/WAD/MY_SRC/usrdef_hgr.F90

    r10074 r13463  
    1313   !!   usr_def_hgr    : initialize the horizontal mesh for WAD_TEST_CASES configuration 
    1414   !!---------------------------------------------------------------------- 
    15    USE dom_oce  ,  ONLY: nimpp, njmpp       ! ocean space and time domain 
     15   USE dom_oce 
    1616   USE par_oce         ! ocean space and time domain 
    1717   USE phycst          ! physical constants 
     
    2626   PUBLIC   usr_def_hgr   ! called by domhgr.F90 
    2727 
     28   !! * Substitutions 
     29#  include "do_loop_substitute.h90" 
    2830   !!---------------------------------------------------------------------- 
    2931   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    7274      !                       !==  grid point position  ==!   (in kilometers) 
    7375      zfact = rn_dx * 1.e-3         ! conversion in km 
    74       DO jj = 1, jpj 
    75          DO ji = 1, jpi             ! longitude 
    76             plamt(ji,jj) = zfact * (  - 0.5 + REAL( ji-1 + nimpp-1 , wp )  )   
    77             plamu(ji,jj) = zfact * (          REAL( ji-1 + nimpp-1 , wp )  ) 
    78             plamv(ji,jj) = plamt(ji,jj) 
    79             plamf(ji,jj) = plamu(ji,jj) 
    80             !                       ! latitude 
    81             pphit(ji,jj) = zfact * (  - 0.5 + REAL( jj-1 + njmpp-1 , wp )  ) 
    82             pphiu(ji,jj) = pphit(ji,jj) 
    83             pphiv(ji,jj) = zfact * (          REAL( jj-1 + njmpp-1 , wp )  ) 
    84             pphif(ji,jj) = pphiv(ji,jj) 
    85          END DO 
    86       END DO 
     76      DO_2D( 1, 1, 1, 1 ) 
     77         !                       ! longitude 
     78         plamt(ji,jj) = zfact * (  - 0.5 + REAL( mig0_oldcmp(ji)-1 , wp )  )   
     79         plamu(ji,jj) = zfact * (          REAL( mig0_oldcmp(ji)-1 , wp )  ) 
     80         plamv(ji,jj) = plamt(ji,jj) 
     81         plamf(ji,jj) = plamu(ji,jj) 
     82         !                       ! latitude 
     83         pphit(ji,jj) = zfact * (  - 0.5 + REAL( mjg0_oldcmp(jj)-1 , wp )  ) 
     84         pphiu(ji,jj) = pphit(ji,jj) 
     85         pphiv(ji,jj) = zfact * (          REAL( mjg0_oldcmp(jj)-1 , wp )  ) 
     86         pphif(ji,jj) = pphiv(ji,jj) 
     87      END_2D 
    8788      ! 
    8889      !                       !==  Horizontal scale factors  ==!   (in meters)  
  • NEMO/branches/2019/dev_r11351_fldread_with_XIOS/tests/WAD/MY_SRC/usrdef_istate.F90

    r10074 r13463  
    2626   PUBLIC   usr_def_istate   ! called in istate.F90 
    2727 
     28   !! * Substitutions 
     29#  include "do_loop_substitute.h90" 
    2830   !!---------------------------------------------------------------------- 
    2931   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    174176      ! Apply minimum wetdepth criterion 
    175177      ! 
    176       do jj = 1,jpj 
    177          do ji = 1,jpi 
    178             IF( ht_0(ji,jj) + pssh(ji,jj) < rn_wdmin1 ) THEN 
    179                pssh(ji,jj) = ptmask(ji,jj,1)*( rn_wdmin1 - ht_0(ji,jj) ) 
    180             ENDIF 
    181          end do 
    182       end do 
     178      DO_2D( 1, 1, 1, 1 ) 
     179         IF( ht_0(ji,jj) + pssh(ji,jj) < rn_wdmin1 ) THEN 
     180            pssh(ji,jj) = ptmask(ji,jj,1)*( rn_wdmin1 - ht_0(ji,jj) ) 
     181         ENDIF 
     182      END_2D 
    183183      ! 
    184184   END SUBROUTINE usr_def_istate 
  • NEMO/branches/2019/dev_r11351_fldread_with_XIOS/tests/WAD/MY_SRC/usrdef_nam.F90

    r10074 r13463  
    1414   !!   usr_def_hgr   : initialize the horizontal mesh  
    1515   !!---------------------------------------------------------------------- 
    16    USE dom_oce  , ONLY: nimpp , njmpp            ! i- & j-indices of the local domain 
    1716   USE par_oce        ! ocean space and time domain 
    1817   USE phycst         ! physical constants 
     
    3938CONTAINS 
    4039 
    41    SUBROUTINE usr_def_nam( ldtxt, ldnam, cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     40   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
    4241      !!---------------------------------------------------------------------- 
    4342      !!                     ***  ROUTINE dom_nam  *** 
     
    5150      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5251      !!---------------------------------------------------------------------- 
    53       CHARACTER(len=*), DIMENSION(:), INTENT(out) ::   ldtxt, ldnam    ! stored print information 
    5452      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    5553      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
     
    5755      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
    5856      ! 
    59       INTEGER ::   ios, ii   ! Local integer 
     57      INTEGER ::   ios   ! Local integer 
    6058      !! 
    6159      NAMELIST/namusr_def/ rn_dx, rn_dz, nn_wad_test 
    6260      !!---------------------------------------------------------------------- 
    6361      ! 
    64       ii = 1 
     62      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 
     63902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 
    6564      ! 
    66       REWIND( numnam_cfg )          ! Namelist namusr_def (exist in namelist_cfg only) 
    67       READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 
    68 902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist', .TRUE. ) 
    69       ! 
    70       WRITE( ldnam(:), namusr_def ) 
     65      IF(lwm)   WRITE( numond, namusr_def ) 
    7166      ! 
    7267      ! 
     
    7974      kpj = INT(  32.e3 / rn_dx ) + 2 
    8075      kpk = INT(  10.  / rn_dz ) + 1 
     76      !                             ! Set the lateral boundary condition of the global domain 
     77      kperio = 0                    ! WAD_TEST_CASES configuration : closed domain 
     78      IF( nn_wad_test == 8 ) THEN 
     79         kperio = 7         ! North-South cyclic test 
     80         kpi = kpi - 2      ! no closed boundary 
     81         kpj = kpj - 2      ! no closed boundary 
     82      ENDIF 
    8183      ! 
    8284      !                             ! control print 
    83       WRITE(ldtxt(ii),*) '   '                                                                          ;   ii = ii + 1 
    84       WRITE(ldtxt(ii),*) 'usr_def_nam  : read the user defined namelist (namusr_def) in namelist_cfg'   ;   ii = ii + 1 
    85       WRITE(ldtxt(ii),*) '~~~~~~~~~~~ '                                                                 ;   ii = ii + 1 
    86       WRITE(ldtxt(ii),*) '   Namelist namusr_def : WAD_TEST_CASES test case'                             ;   ii = ii + 1 
    87       WRITE(ldtxt(ii),*) '      horizontal resolution                    rn_dx  = ', rn_dx, ' meters'   ;   ii = ii + 1 
    88       WRITE(ldtxt(ii),*) '      vertical   resolution                    rn_dz  = ', rn_dz, ' meters'   ;   ii = ii + 1 
    89       WRITE(ldtxt(ii),*) '      WAD_TEST_CASES domain = 52 km  x  34 km x 10 m'                ;   ii = ii + 1 
    90       WRITE(ldtxt(ii),*) '         resulting global domain size :        jpiglo = ', kpi                ;   ii = ii + 1 
    91       WRITE(ldtxt(ii),*) '                                               jpjglo = ', kpj                ;   ii = ii + 1 
    92       WRITE(ldtxt(ii),*) '                                               jpkglo = ', kpk                ;   ii = ii + 1 
    93       ! 
    94       !                             ! Set the lateral boundary condition of the global domain 
    95       kperio = 0                    ! WAD_TEST_CASES configuration : closed domain 
    96       IF( nn_wad_test == 8 ) kperio = 7 ! North-South cyclic test 
    97       ! 
    98       WRITE(ldtxt(ii),*) '   '                                                                          ;   ii = ii + 1 
    99       WRITE(ldtxt(ii),*) '   Lateral boundary condition of the global domain'                           ;   ii = ii + 1 
    100       WRITE(ldtxt(ii),*) '      closed                                   jperio = ', kperio             ;   ii = ii + 1 
     85      IF(lwp) THEN 
     86         WRITE(numout,*) '   ' 
     87         WRITE(numout,*) 'usr_def_nam  : read the user defined namelist (namusr_def) in namelist_cfg' 
     88         WRITE(numout,*) '~~~~~~~~~~~ ' 
     89         WRITE(numout,*) '   Namelist namusr_def : WAD_TEST_CASES test case' 
     90         WRITE(numout,*) '      horizontal resolution                    rn_dx  = ', rn_dx, ' meters' 
     91         WRITE(numout,*) '      vertical   resolution                    rn_dz  = ', rn_dz, ' meters' 
     92         WRITE(numout,*) '      WAD_TEST_CASES domain = 52 km  x  34 km x 10 m' 
     93         WRITE(numout,*) '         resulting global domain size :        jpiglo = ', kpi 
     94         WRITE(numout,*) '                                               jpjglo = ', kpj 
     95         WRITE(numout,*) '                                               jpkglo = ', kpk 
     96         WRITE(numout,*) '   ' 
     97         WRITE(numout,*) '   Lateral boundary condition of the global domain' 
     98         WRITE(numout,*) '      closed                                   jperio = ', kperio 
     99      ENDIF 
    101100      ! 
    102101   END SUBROUTINE usr_def_nam 
  • NEMO/branches/2019/dev_r11351_fldread_with_XIOS/tests/WAD/MY_SRC/usrdef_sbc.F90

    r10074 r13463  
    3131   PUBLIC   usrdef_sbc_ice_flx  ! routine called by icestp.F90 for ice thermo 
    3232 
    33    !! * Substitutions 
    34 #  include "vectopt_loop_substitute.h90" 
    3533   !!---------------------------------------------------------------------- 
    3634   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    4038CONTAINS 
    4139 
    42    SUBROUTINE usrdef_sbc_oce( kt ) 
     40   SUBROUTINE usrdef_sbc_oce( kt, Kbb ) 
    4341      !!--------------------------------------------------------------------- 
    4442      !!                    ***  ROUTINE usr_def_sbc  *** 
     
    5553      !!---------------------------------------------------------------------- 
    5654      INTEGER, INTENT(in) ::   kt   ! ocean time step 
     55      INTEGER, INTENT(in) ::   Kbb  ! ocean time index 
    5756      !!--------------------------------------------------------------------- 
    5857      ! 
     
    8079   END SUBROUTINE usrdef_sbc_ice_tau 
    8180 
    82    SUBROUTINE usrdef_sbc_ice_flx( kt ) 
     81 
     82   SUBROUTINE usrdef_sbc_ice_flx( kt, phs, phi ) 
    8383      INTEGER, INTENT(in) ::   kt   ! ocean time step 
     84      REAL(wp), DIMENSION(:,:,:), INTENT(in)  ::   phs    ! snow thickness 
     85      REAL(wp), DIMENSION(:,:,:), INTENT(in)  ::   phi    ! ice thickness 
    8486   END SUBROUTINE usrdef_sbc_ice_flx 
    8587 
  • NEMO/branches/2019/dev_r11351_fldread_with_XIOS/tests/WAD/MY_SRC/usrdef_zgr.F90

    r10425 r13463  
    1515   !!--------------------------------------------------------------------- 
    1616   USE oce            ! ocean variables 
    17    USE dom_oce ,  ONLY: ht_0, mi0, mi1, nimpp, njmpp,  & 
    18                       & mj0, mj1, glamt, gphit         ! ocean space and time domain 
     17   USE dom_oce ,  ONLY: ht_0, mi0, mi1, mj0, mj1, glamt, gphit         ! ocean space and time domain 
    1918   USE usrdef_nam     ! User defined : namelist variables 
    2019   USE wet_dry ,  ONLY: rn_wdmin1, rn_wdmin2, rn_wdld  ! Wetting and drying 
     
    3029 
    3130   !! * Substitutions 
    32 #  include "vectopt_loop_substitute.h90" 
     31#  include "do_loop_substitute.h90" 
    3332   !!---------------------------------------------------------------------- 
    3433   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    244243      ! at v-point: averaging zht 
    245244      zhv = 0._wp 
    246       DO jj = 1, jpjm1 
    247          zhv(:,jj) = 0.5_wp * ( zht(:,jj) + zht(:,jj+1) ) 
    248       END DO 
     245      DO_2D( 0, 0, 0, 0 ) 
     246         zhv(ji,jj) = 0.5_wp * ( zht(ji,jj) + zht(ji,jj+1) ) 
     247      END_2D 
    249248      CALL lbc_lnk( 'usrdef_zgr', zhv, 'V', 1. )     ! boundary condition: this mask the surrounding grid-points 
    250249      DO jj = mj0(1), mj1(1)   ! first  row of global domain only 
     
    281280         ht_0 = zht 
    282281         k_bot(:,:) = jpkm1 * k_top(:,:)  !* bottom ocean = jpk-1 (here use k_top as a land mask) 
    283          DO jj = 1, jpj 
    284             DO ji = 1, jpi 
    285               IF( zht(ji,jj) <= -(rn_wdld - rn_wdmin2)) THEN 
    286                 k_bot(ji,jj) = 0 
    287                 k_top(ji,jj) = 0 
    288               ENDIF 
    289            END DO 
    290          END DO 
     282         DO_2D( 1, 1, 1, 1 ) 
     283            IF( zht(ji,jj) <= -(rn_wdld - rn_wdmin2)) THEN 
     284               k_bot(ji,jj) = 0 
     285               k_top(ji,jj) = 0 
     286            ENDIF 
     287         END_2D 
    291288         ! 
    292289         !                                !* terrain-following coordinate with e3.(k)=cst) 
    293290         !                                !  OVERFLOW case : identical with j-index (T=V, U=F) 
    294          DO jj = 1, jpjm1 
    295             DO ji = 1, jpim1 
    296               z1_jpkm1 = 1._wp / REAL( k_bot(ji,jj) - k_top(ji,jj) + 1 , wp) 
    297               DO jk = 1, jpk 
    298                   zwet = MAX( zht(ji,jj), rn_wdmin1 ) 
    299                   pdept(ji,jj,jk) = zwet * z1_jpkm1 * ( REAL( jk   , wp ) - 0.5_wp ) 
    300                   pdepw(ji,jj,jk) = zwet * z1_jpkm1 * ( REAL( jk-1 , wp )          ) 
    301                   pe3t (ji,jj,jk) = zwet * z1_jpkm1 
    302                   pe3w (ji,jj,jk) = zwet * z1_jpkm1 
    303                   zwet = MAX( zhu(ji,jj), rn_wdmin1 ) 
    304                   pe3u (ji,jj,jk) = zwet * z1_jpkm1 
    305                   pe3uw(ji,jj,jk) = zwet * z1_jpkm1 
    306                   pe3f (ji,jj,jk) = zwet * z1_jpkm1 
    307                   zwet = MAX( zhv(ji,jj), rn_wdmin1 ) 
    308                   pe3v (ji,jj,jk) = zwet * z1_jpkm1 
    309                   pe3vw(ji,jj,jk) = zwet * z1_jpkm1 
    310               END DO       
    311            END DO       
    312          END DO       
     291         DO_2D( 0, 0, 0, 0 ) 
     292            z1_jpkm1 = 1._wp / REAL( k_bot(ji,jj) - k_top(ji,jj) + 1 , wp) 
     293            DO jk = 1, jpk 
     294               zwet = MAX( zht(ji,jj), rn_wdmin1 ) 
     295               pdept(ji,jj,jk) = zwet * z1_jpkm1 * ( REAL( jk   , wp ) - 0.5_wp ) 
     296               pdepw(ji,jj,jk) = zwet * z1_jpkm1 * ( REAL( jk-1 , wp )          ) 
     297               pe3t (ji,jj,jk) = zwet * z1_jpkm1 
     298               pe3w (ji,jj,jk) = zwet * z1_jpkm1 
     299               zwet = MAX( zhu(ji,jj), rn_wdmin1 ) 
     300               pe3u (ji,jj,jk) = zwet * z1_jpkm1 
     301               pe3uw(ji,jj,jk) = zwet * z1_jpkm1 
     302               pe3f (ji,jj,jk) = zwet * z1_jpkm1 
     303               zwet = MAX( zhv(ji,jj), rn_wdmin1 ) 
     304               pe3v (ji,jj,jk) = zwet * z1_jpkm1 
     305               pe3vw(ji,jj,jk) = zwet * z1_jpkm1 
     306            END DO 
     307         END_2D      
    313308         CALL lbc_lnk( 'usrdef_zgr', pdept, 'T', 1. ) 
    314309         CALL lbc_lnk( 'usrdef_zgr', pdepw, 'T', 1. ) 
Note: See TracChangeset for help on using the changeset viewer.