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

Ignore:
Timestamp:
2019-09-11T15:54:18+02:00 (5 years ago)
Author:
smasson
Message:

trunk: merge dev_r10984_HPC-13 into the trunk

File:
1 edited

Legend:

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

    r10074 r11536  
    4040CONTAINS 
    4141 
    42    SUBROUTINE usr_def_nam( ldtxt, ldnam, cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     42   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
    4343      !!---------------------------------------------------------------------- 
    4444      !!                     ***  ROUTINE dom_nam  *** 
     
    5252      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5353      !!---------------------------------------------------------------------- 
    54       CHARACTER(len=*), DIMENSION(:), INTENT(out) ::   ldtxt, ldnam    ! stored print information 
    5554      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    5655      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
     
    5857      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
    5958      ! 
    60       INTEGER ::   ios, ii      ! Local integer 
     59      INTEGER ::   ios          ! Local integer 
    6160      REAL(wp)::   zlx, zly, zh ! Local scalars 
    6261      !! 
     
    6463      !!---------------------------------------------------------------------- 
    6564      ! 
    66       ii = 1 
    67       ! 
    6865      REWIND( numnam_cfg )          ! Namelist namusr_def (exist in namelist_cfg only) 
    6966      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 
    70 902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist', .TRUE. ) 
     67902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 
    7168      ! 
    7269#if defined key_agrif  
     
    8077#endif 
    8178      ! 
    82       WRITE( ldnam(:), namusr_def ) 
     79      IF(lwm)   WRITE( numond, namusr_def ) 
    8380      ! 
    8481      cd_cfg = 'VORTEX'             ! name & resolution (not used) 
    85       kk_cfg = INT( rn_dx ) 
     82      kk_cfg = nINT( rn_dx ) 
    8683      ! 
    87       ! Global Domain size:  VORTEX global domain is  1800 km x 1800 Km x 5000 m 
    88       kpi = INT( 1800.e3  / rn_dx ) + 3   
    89       kpj = INT( 1800.e3  / rn_dy ) + 3  
    90       kpk = INT( 5000._wp / rn_dz ) + 1 
    91 #if defined key_agrif 
    92       IF( .NOT. Agrif_Root() ) THEN 
     84      IF( Agrif_Root() ) THEN       ! Global Domain size:  VORTEX global domain is  1800 km x 1800 Km x 5000 m 
     85         kpi = NINT( 1800.e3  / rn_dx ) + 3   
     86         kpj = NINT( 1800.e3  / rn_dy ) + 3  
     87      ELSE 
    9388         kpi  = nbcellsx + 2 + 2*nbghostcells 
    9489         kpj  = nbcellsy + 2 + 2*nbghostcells 
    9590      ENDIF 
    96 #endif 
     91      kpk = NINT( 5000._wp / rn_dz ) + 1 
    9792      ! 
    9893      zlx = (kpi-2)*rn_dx*1.e-3 
    9994      zly = (kpj-2)*rn_dy*1.e-3 
    10095      zh  = (kpk-1)*rn_dz 
    101       !                             ! control print 
    102       WRITE(ldtxt(ii),*) '   '                                                                          ;   ii = ii + 1 
    103       WRITE(ldtxt(ii),*) 'usr_def_nam  : read the user defined namelist (namusr_def) in namelist_cfg'   ;   ii = ii + 1 
    104       WRITE(ldtxt(ii),*) '~~~~~~~~~~~ '                                                                 ;   ii = ii + 1 
    105       WRITE(ldtxt(ii),*) '   Namelist namusr_def : VORTEX test case'                                    ;   ii = ii + 1 
    106       WRITE(ldtxt(ii),*) '      horizontal resolution             rn_dx  = ', rn_dx, ' m'               ;   ii = ii + 1 
    107       WRITE(ldtxt(ii),*) '      horizontal resolution             rn_dy  = ', rn_dy, ' m'               ;   ii = ii + 1 
    108       WRITE(ldtxt(ii),*) '      vertical resolution               rn_dz  = ', rn_dz, ' m'               ;   ii = ii + 1 
    109       WRITE(ldtxt(ii),*) '      VORTEX domain: '                                                        ;   ii = ii + 1 
    110       WRITE(ldtxt(ii),*) '         LX [km]: ', zlx                                                      ;   ii = ii + 1 
    111       WRITE(ldtxt(ii),*) '         LY [km]: ', zly                                                      ;   ii = ii + 1 
    112       WRITE(ldtxt(ii),*) '          H [m] : ', zh                                                       ;   ii = ii + 1 
    113       WRITE(ldtxt(ii),*) '      Reference latitude            rn_ppgphi0 = ', rn_ppgphi0                ;   ii = ii + 1 
    114       ! 
    11596      !                             ! Set the lateral boundary condition of the global domain 
    11697      kperio = 0                    ! VORTEX configuration : closed basin 
    117       ! 
    118       WRITE(ldtxt(ii),*) '   '                                                                          ;   ii = ii + 1 
    119       WRITE(ldtxt(ii),*) '   Lateral boundary condition of the global domain'                           ;   ii = ii + 1 
    120       WRITE(ldtxt(ii),*) '      VORTEX : closed basin            jperio = ', kperio                     ;   ii = ii + 1 
     98      !                             ! control print 
     99      IF(lwp) THEN 
     100         WRITE(numout,*) '   ' 
     101         WRITE(numout,*) 'usr_def_nam  : read the user defined namelist (namusr_def) in namelist_cfg' 
     102         WRITE(numout,*) '~~~~~~~~~~~ ' 
     103         WRITE(numout,*) '   Namelist namusr_def : VORTEX test case' 
     104         WRITE(numout,*) '      horizontal resolution             rn_dx  = ', rn_dx, ' m' 
     105         WRITE(numout,*) '      horizontal resolution             rn_dy  = ', rn_dy, ' m' 
     106         WRITE(numout,*) '      vertical resolution               rn_dz  = ', rn_dz, ' m' 
     107         WRITE(numout,*) '      VORTEX domain: ' 
     108         WRITE(numout,*) '         LX [km]: ', zlx 
     109         WRITE(numout,*) '         LY [km]: ', zly 
     110         WRITE(numout,*) '          H [m] : ', zh 
     111         WRITE(numout,*) '      Reference latitude            rn_ppgphi0 = ', rn_ppgphi0 
     112         WRITE(numout,*) '   ' 
     113         WRITE(numout,*) '   Lateral boundary condition of the global domain' 
     114         WRITE(numout,*) '      VORTEX : closed basin            jperio = ', kperio 
     115      ENDIF 
    121116      ! 
    122117   END SUBROUTINE usr_def_nam 
Note: See TracChangeset for help on using the changeset viewer.