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 9763 for NEMO/trunk/tests/SAS_BIPER/MY_SRC/usrdef_nam.F90 – NEMO

Ignore:
Timestamp:
2018-06-07T17:36:49+02:00 (6 years ago)
Author:
clem
Message:

repair broken reproducibility in SAS_BIPER

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/tests/SAS_BIPER/MY_SRC/usrdef_nam.F90

    r9460 r9763  
    1515   !!---------------------------------------------------------------------- 
    1616   USE dom_oce  , ONLY: nimpp , njmpp            ! i- & j-indices of the local domain 
    17    USE dom_oce  , ONLY: ln_zco, ln_zps, ln_sco   ! flag of type of coordinate 
    1817   USE par_oce        ! ocean space and time domain 
    1918   USE phycst         ! physical constants 
     
    2827   PUBLIC   usr_def_nam   ! called by nemogcm.F90 
    2928 
    30    !                              !!* namusr_def namelist *!! 
    31    REAL(wp), PUBLIC ::   rn_dx     ! resolution in meters defining the horizontal domain size 
    32    REAL(wp), PUBLIC ::   rn_dy     ! resolution in meters defining the horizontal domain size 
     29   !                               !!* namusr_def namelist *!! 
     30   REAL(wp), PUBLIC ::   rn_dx      ! resolution in meters defining the horizontal domain size 
     31   REAL(wp), PUBLIC ::   rn_dy      ! resolution in meters defining the horizontal domain size 
     32   REAL(wp), PUBLIC ::   rn_ppgphi0 ! reference latitude for beta-plane  
    3333 
    3434   !!---------------------------------------------------------------------- 
     
    5858      ! 
    5959      INTEGER ::   ios, ii   ! Local integer 
     60      REAL(wp)::   zlx, zly  ! Local scalars 
    6061      !! 
    61       NAMELIST/namusr_def/ ln_zco, rn_dx, rn_dy 
     62      NAMELIST/namusr_def/ ln_zco, rn_dx, rn_dy, rn_ppgphi0 
    6263      !!---------------------------------------------------------------------- 
    6364      ! 
     
    6768      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 
    6869902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist', .TRUE. ) 
     70      ! 
     71#if defined key_agrif  
     72      ! Domain parameters are taken from parent: 
     73      IF( .NOT. Agrif_Root() ) THEN 
     74         rn_dx = Agrif_Parent(rn_dx)/Agrif_Rhox() 
     75         rn_dy = Agrif_Parent(rn_dy)/Agrif_Rhoy() 
     76         rn_ppgphi0 = Agrif_Parent(rn_ppgphi0) 
     77      ENDIF 
     78#endif 
    6979      ! 
    7080      WRITE( ldnam(:), namusr_def ) 
     
    8494      kpk = 1 
    8595      ! 
     96!!      zlx = (kpi-2)*rn_dx*1.e-3 
     97!!      zly = (kpj-2)*rn_dy*1.e-3 
     98      zlx = kpi*rn_dx*1.e-3 
     99      zly = kpj*rn_dy*1.e-3 
    86100      !                             ! control print 
    87101      WRITE(ldtxt(ii),*) '   '                                                                          ;   ii = ii + 1 
     
    89103      WRITE(ldtxt(ii),*) '~~~~~~~~~~~ '                                                                 ;   ii = ii + 1 
    90104      WRITE(ldtxt(ii),*) '   Namelist namusr_def : SAS_BIPER test case'                                 ;   ii = ii + 1 
    91       WRITE(ldtxt(ii),*) '      type of vertical coordinate : '                                         ;   ii = ii + 1 
    92       WRITE(ldtxt(ii),*) '         z-coordinate flag                     ln_zco = ', ln_zco             ;   ii = ii + 1 
    93       WRITE(ldtxt(ii),*) '         z-partial-step coordinate flag        ln_zps = ', ln_zps             ;   ii = ii + 1 
    94       WRITE(ldtxt(ii),*) '         s-coordinate flag                     ln_sco = ', ln_sco             ;   ii = ii + 1 
    95105      WRITE(ldtxt(ii),*) '      horizontal resolution                    rn_dx  = ', rn_dx, ' meters'   ;   ii = ii + 1 
    96106      WRITE(ldtxt(ii),*) '      horizontal resolution                    rn_dy  = ', rn_dy, ' meters'   ;   ii = ii + 1 
    97107      WRITE(ldtxt(ii),*) '      SAS_BIPER domain = 300 km x 300Km x 1 grid-point '                      ;   ii = ii + 1 
     108      WRITE(ldtxt(ii),*) '         LX [km]: ', zlx                                                      ;   ii = ii + 1 
     109      WRITE(ldtxt(ii),*) '         LY [km]: ', zly                                                      ;   ii = ii + 1 
    98110      WRITE(ldtxt(ii),*) '         resulting global domain size :        jpiglo = ', kpi                ;   ii = ii + 1 
    99111      WRITE(ldtxt(ii),*) '                                               jpjglo = ', kpj                ;   ii = ii + 1 
Note: See TracChangeset for help on using the changeset viewer.