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/src/OCE/DOM/domain.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/src/OCE/DOM/domain.F90

    r10425 r11536  
    101101         CASE( 0 )   ;   WRITE(numout,*) '         (i.e. closed)' 
    102102         CASE( 1 )   ;   WRITE(numout,*) '         (i.e. cyclic east-west)' 
    103          CASE( 2 )   ;   WRITE(numout,*) '         (i.e. equatorial symmetric)' 
     103         CASE( 2 )   ;   WRITE(numout,*) '         (i.e. cyclic north-south)' 
    104104         CASE( 3 )   ;   WRITE(numout,*) '         (i.e. north fold with T-point pivot)' 
    105105         CASE( 4 )   ;   WRITE(numout,*) '         (i.e. cyclic east-west and north fold with T-point pivot)' 
     
    308308      REWIND( numnam_ref )              ! Namelist namrun in reference namelist : Parameters of the run 
    309309      READ  ( numnam_ref, namrun, IOSTAT = ios, ERR = 901) 
    310 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namrun in reference namelist', lwp ) 
     310901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namrun in reference namelist' ) 
    311311      REWIND( numnam_cfg )              ! Namelist namrun in configuration namelist : Parameters of the run 
    312312      READ  ( numnam_cfg, namrun, IOSTAT = ios, ERR = 902 ) 
    313 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namrun in configuration namelist', lwp ) 
     313902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namrun in configuration namelist' ) 
    314314      IF(lwm) WRITE ( numond, namrun ) 
    315315      ! 
     
    336336            WRITE(numout,*) '      frequency of restart file       nn_stock        = ', nn_stock 
    337337         ENDIF 
     338#if ! defined key_iomput 
    338339         WRITE(numout,*) '      frequency of output file        nn_write        = ', nn_write 
     340#endif 
    339341         WRITE(numout,*) '      mask land points                ln_mskland      = ', ln_mskland 
    340342         WRITE(numout,*) '      additional CF standard metadata ln_cfmeta       = ', ln_cfmeta 
     
    358360      nleapy = nn_leapy 
    359361      ninist = nn_istate 
    360       nstock = nn_stock 
    361       nstocklist = nn_stocklist 
    362       nwrite = nn_write 
    363362      neuler = nn_euler 
    364363      IF( neuler == 1 .AND. .NOT. ln_rstart ) THEN 
     
    369368      ENDIF 
    370369      !                             ! control of output frequency 
    371       IF( nstock == 0 .OR. nstock > nitend ) THEN 
    372          WRITE(ctmp1,*) 'nstock = ', nstock, ' it is forced to ', nitend 
     370      IF( .NOT. ln_rst_list ) THEN     ! we use nn_stock 
     371         IF( nn_stock == -1 )   CALL ctl_warn( 'nn_stock = -1 --> no restart will be done' ) 
     372         IF( nn_stock == 0 .OR. nn_stock > nitend ) THEN 
     373            WRITE(ctmp1,*) 'nn_stock = ', nn_stock, ' it is forced to ', nitend 
     374            CALL ctl_warn( ctmp1 ) 
     375            nn_stock = nitend 
     376         ENDIF 
     377      ENDIF 
     378#if ! defined key_iomput 
     379      IF( nn_write == -1 )   CALL ctl_warn( 'nn_write = -1 --> no output files will be done' ) 
     380      IF ( nn_write == 0 ) THEN 
     381         WRITE(ctmp1,*) 'nn_write = ', nn_write, ' it is forced to ', nitend 
    373382         CALL ctl_warn( ctmp1 ) 
    374          nstock = nitend 
    375       ENDIF 
    376       IF ( nwrite == 0 ) THEN 
    377          WRITE(ctmp1,*) 'nwrite = ', nwrite, ' it is forced to ', nitend 
    378          CALL ctl_warn( ctmp1 ) 
    379          nwrite = nitend 
    380       ENDIF 
     383         nn_write = nitend 
     384      ENDIF 
     385#endif 
    381386 
    382387#if defined key_agrif 
     
    401406      REWIND( numnam_ref )              ! Namelist namdom in reference namelist : space & time domain (bathymetry, mesh, timestep) 
    402407      READ  ( numnam_ref, namdom, IOSTAT = ios, ERR = 903) 
    403 903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdom in reference namelist', lwp ) 
     408903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdom in reference namelist' ) 
    404409      REWIND( numnam_cfg )              ! Namelist namdom in configuration namelist : space & time domain (bathymetry, mesh, timestep) 
    405410      READ  ( numnam_cfg, namdom, IOSTAT = ios, ERR = 904 ) 
    406 904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdom in configuration namelist', lwp ) 
     411904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdom in configuration namelist' ) 
    407412      IF(lwm) WRITE( numond, namdom ) 
    408413      ! 
     
    433438      REWIND( numnam_ref )              ! Namelist namnc4 in reference namelist : NETCDF 
    434439      READ  ( numnam_ref, namnc4, IOSTAT = ios, ERR = 907) 
    435 907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namnc4 in reference namelist', lwp ) 
     440907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namnc4 in reference namelist' ) 
    436441      REWIND( numnam_cfg )              ! Namelist namnc4 in configuration namelist : NETCDF 
    437442      READ  ( numnam_cfg, namnc4, IOSTAT = ios, ERR = 908 ) 
    438 908   IF( ios >  0 )   CALL ctl_nam ( ios , 'namnc4 in configuration namelist', lwp ) 
     443908   IF( ios >  0 )   CALL ctl_nam ( ios , 'namnc4 in configuration namelist' ) 
    439444      IF(lwm) WRITE( numond, namnc4 ) 
    440445 
     
    511516 
    512517 
    513    SUBROUTINE domain_cfg( ldtxt, cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     518   SUBROUTINE domain_cfg( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
    514519      !!---------------------------------------------------------------------- 
    515520      !!                     ***  ROUTINE dom_nam  *** 
     
    519524      !! ** Method  :   read the cn_domcfg NetCDF file 
    520525      !!---------------------------------------------------------------------- 
    521       CHARACTER(len=*), DIMENSION(:), INTENT(out) ::   ldtxt           ! stored print information 
    522526      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    523527      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
     
    525529      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
    526530      ! 
    527       INTEGER ::   inum, ii   ! local integer 
     531      INTEGER ::   inum   ! local integer 
    528532      REAL(wp) ::   zorca_res                     ! local scalars 
    529       REAL(wp) ::   ziglo, zjglo, zkglo, zperio   !   -      - 
    530       !!---------------------------------------------------------------------- 
    531       ! 
    532       ii = 1 
    533       WRITE(ldtxt(ii),*) '           '                                                    ;   ii = ii+1 
    534       WRITE(ldtxt(ii),*) 'domain_cfg : domain size read in ', TRIM( cn_domcfg ), ' file'  ;   ii = ii+1 
    535       WRITE(ldtxt(ii),*) '~~~~~~~~~~ '                                                    ;   ii = ii+1 
     533      REAL(wp) ::   zperio                        !   -      - 
     534      INTEGER, DIMENSION(4) ::   idvar, idimsz    ! size   of dimensions 
     535      !!---------------------------------------------------------------------- 
     536      ! 
     537      IF(lwp) THEN 
     538         WRITE(numout,*) '           ' 
     539         WRITE(numout,*) 'domain_cfg : domain size read in ', TRIM( cn_domcfg ), ' file' 
     540         WRITE(numout,*) '~~~~~~~~~~ ' 
     541      ENDIF 
    536542      ! 
    537543      CALL iom_open( cn_domcfg, inum ) 
     
    544550         CALL iom_get( inum, 'ORCA_index', zorca_res )   ;   kk_cfg = NINT( zorca_res ) 
    545551         ! 
    546          WRITE(ldtxt(ii),*) '   .'                                                     ;   ii = ii+1 
    547          WRITE(ldtxt(ii),*) '   ==>>>   ORCA configuration '                           ;   ii = ii+1 
    548          WRITE(ldtxt(ii),*) '   .'                                                     ;   ii = ii+1 
     552         IF(lwp) THEN 
     553            WRITE(numout,*) '   .' 
     554            WRITE(numout,*) '   ==>>>   ORCA configuration ' 
     555            WRITE(numout,*) '   .' 
     556         ENDIF 
    549557         ! 
    550558      ELSE                                !- cd_cfg & k_cfg are not used 
     
    559567         ! 
    560568      ENDIF 
    561       ! 
    562       CALL iom_get( inum, 'jpiglo', ziglo  )   ;   kpi = NINT( ziglo ) 
    563       CALL iom_get( inum, 'jpjglo', zjglo  )   ;   kpj = NINT( zjglo ) 
    564       CALL iom_get( inum, 'jpkglo', zkglo  )   ;   kpk = NINT( zkglo ) 
     569       ! 
     570      idvar = iom_varid( inum, 'e3t_0', kdimsz = idimsz )   ! use e3t_0, that must exist, to get jp(ijk)glo 
     571      kpi = idimsz(1) 
     572      kpj = idimsz(2) 
     573      kpk = idimsz(3) 
    565574      CALL iom_get( inum, 'jperio', zperio )   ;   kperio = NINT( zperio ) 
    566575      CALL iom_close( inum ) 
    567576      ! 
    568       WRITE(ldtxt(ii),*) '      cn_cfg = ', TRIM(cd_cfg), '   nn_cfg = ', kk_cfg             ;   ii = ii+1 
    569       WRITE(ldtxt(ii),*) '      jpiglo = ', kpi                                              ;   ii = ii+1 
    570       WRITE(ldtxt(ii),*) '      jpjglo = ', kpj                                              ;   ii = ii+1 
    571       WRITE(ldtxt(ii),*) '      jpkglo = ', kpk                                              ;   ii = ii+1 
    572       WRITE(ldtxt(ii),*) '      type of global domain lateral boundary   jperio = ', kperio  ;   ii = ii+1 
     577      IF(lwp) THEN 
     578         WRITE(numout,*) '      cn_cfg = ', TRIM(cd_cfg), '   nn_cfg = ', kk_cfg 
     579         WRITE(numout,*) '      jpiglo = ', kpi 
     580         WRITE(numout,*) '      jpjglo = ', kpj 
     581         WRITE(numout,*) '      jpkglo = ', kpk 
     582         WRITE(numout,*) '      type of global domain lateral boundary   jperio = ', kperio 
     583      ENDIF 
    573584      !         
    574585   END SUBROUTINE domain_cfg 
Note: See TracChangeset for help on using the changeset viewer.