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 12149 for NEMO/branches/2019/ENHANCE-03_closea/src/OCE/DOM/domain.F90 – NEMO

Ignore:
Timestamp:
2019-12-10T15:03:24+01:00 (4 years ago)
Author:
ayoung
Message:

Updated trunk to 12072

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/ENHANCE-03_closea/src/OCE/DOM/domain.F90

    r11656 r12149  
    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)' 
     
    310310      REWIND( numnam_ref )              ! Namelist namrun in reference namelist : Parameters of the run 
    311311      READ  ( numnam_ref, namrun, IOSTAT = ios, ERR = 901) 
    312 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namrun in reference namelist', lwp ) 
     312901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namrun in reference namelist' ) 
    313313      REWIND( numnam_cfg )              ! Namelist namrun in configuration namelist : Parameters of the run 
    314314      READ  ( numnam_cfg, namrun, IOSTAT = ios, ERR = 902 ) 
    315 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namrun in configuration namelist', lwp ) 
     315902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namrun in configuration namelist' ) 
    316316      IF(lwm) WRITE ( numond, namrun ) 
    317317      ! 
     
    338338            WRITE(numout,*) '      frequency of restart file       nn_stock        = ', nn_stock 
    339339         ENDIF 
     340#if ! defined key_iomput 
    340341         WRITE(numout,*) '      frequency of output file        nn_write        = ', nn_write 
     342#endif 
    341343         WRITE(numout,*) '      mask land points                ln_mskland      = ', ln_mskland 
    342344         WRITE(numout,*) '      additional CF standard metadata ln_cfmeta       = ', ln_cfmeta 
     
    360362      nleapy = nn_leapy 
    361363      ninist = nn_istate 
    362       nstock = nn_stock 
    363       nstocklist = nn_stocklist 
    364       nwrite = nn_write 
    365364      neuler = nn_euler 
    366365      IF( neuler == 1 .AND. .NOT. ln_rstart ) THEN 
     
    371370      ENDIF 
    372371      !                             ! control of output frequency 
    373       IF( nstock == 0 .OR. nstock > nitend ) THEN 
    374          WRITE(ctmp1,*) 'nstock = ', nstock, ' it is forced to ', nitend 
     372      IF( .NOT. ln_rst_list ) THEN     ! we use nn_stock 
     373         IF( nn_stock == -1 )   CALL ctl_warn( 'nn_stock = -1 --> no restart will be done' ) 
     374         IF( nn_stock == 0 .OR. nn_stock > nitend ) THEN 
     375            WRITE(ctmp1,*) 'nn_stock = ', nn_stock, ' it is forced to ', nitend 
     376            CALL ctl_warn( ctmp1 ) 
     377            nn_stock = nitend 
     378         ENDIF 
     379      ENDIF 
     380#if ! defined key_iomput 
     381      IF( nn_write == -1 )   CALL ctl_warn( 'nn_write = -1 --> no output files will be done' ) 
     382      IF ( nn_write == 0 ) THEN 
     383         WRITE(ctmp1,*) 'nn_write = ', nn_write, ' it is forced to ', nitend 
    375384         CALL ctl_warn( ctmp1 ) 
    376          nstock = nitend 
    377       ENDIF 
    378       IF ( nwrite == 0 ) THEN 
    379          WRITE(ctmp1,*) 'nwrite = ', nwrite, ' it is forced to ', nitend 
    380          CALL ctl_warn( ctmp1 ) 
    381          nwrite = nitend 
    382       ENDIF 
     385         nn_write = nitend 
     386      ENDIF 
     387#endif 
    383388 
    384389#if defined key_agrif 
     
    403408      REWIND( numnam_ref )              ! Namelist namdom in reference namelist : space & time domain (bathymetry, mesh, timestep) 
    404409      READ  ( numnam_ref, namdom, IOSTAT = ios, ERR = 903) 
    405 903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdom in reference namelist', lwp ) 
     410903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdom in reference namelist' ) 
    406411      REWIND( numnam_cfg )              ! Namelist namdom in configuration namelist : space & time domain (bathymetry, mesh, timestep) 
    407412      READ  ( numnam_cfg, namdom, IOSTAT = ios, ERR = 904 ) 
    408 904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdom in configuration namelist', lwp ) 
     413904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdom in configuration namelist' ) 
    409414      IF(lwm) WRITE( numond, namdom ) 
    410415      ! 
     
    435440      REWIND( numnam_ref )              ! Namelist namnc4 in reference namelist : NETCDF 
    436441      READ  ( numnam_ref, namnc4, IOSTAT = ios, ERR = 907) 
    437 907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namnc4 in reference namelist', lwp ) 
     442907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namnc4 in reference namelist' ) 
    438443      REWIND( numnam_cfg )              ! Namelist namnc4 in configuration namelist : NETCDF 
    439444      READ  ( numnam_cfg, namnc4, IOSTAT = ios, ERR = 908 ) 
    440 908   IF( ios >  0 )   CALL ctl_nam ( ios , 'namnc4 in configuration namelist', lwp ) 
     445908   IF( ios >  0 )   CALL ctl_nam ( ios , 'namnc4 in configuration namelist' ) 
    441446      IF(lwm) WRITE( numond, namnc4 ) 
    442447 
     
    513518 
    514519 
    515    SUBROUTINE domain_cfg( ldtxt, cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     520   SUBROUTINE domain_cfg( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
    516521      !!---------------------------------------------------------------------- 
    517522      !!                     ***  ROUTINE dom_nam  *** 
     
    521526      !! ** Method  :   read the cn_domcfg NetCDF file 
    522527      !!---------------------------------------------------------------------- 
    523       CHARACTER(len=*), DIMENSION(:), INTENT(out) ::   ldtxt           ! stored print information 
    524528      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    525529      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
     
    527531      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
    528532      ! 
    529       INTEGER ::   inum, ii   ! local integer 
     533      INTEGER ::   inum   ! local integer 
    530534      REAL(wp) ::   zorca_res                     ! local scalars 
    531       REAL(wp) ::   ziglo, zjglo, zkglo, zperio   !   -      - 
    532       !!---------------------------------------------------------------------- 
    533       ! 
    534       ii = 1 
    535       WRITE(ldtxt(ii),*) '           '                                                    ;   ii = ii+1 
    536       WRITE(ldtxt(ii),*) 'domain_cfg : domain size read in ', TRIM( cn_domcfg ), ' file'  ;   ii = ii+1 
    537       WRITE(ldtxt(ii),*) '~~~~~~~~~~ '                                                    ;   ii = ii+1 
     535      REAL(wp) ::   zperio                        !   -      - 
     536      INTEGER, DIMENSION(4) ::   idvar, idimsz    ! size   of dimensions 
     537      !!---------------------------------------------------------------------- 
     538      ! 
     539      IF(lwp) THEN 
     540         WRITE(numout,*) '           ' 
     541         WRITE(numout,*) 'domain_cfg : domain size read in ', TRIM( cn_domcfg ), ' file' 
     542         WRITE(numout,*) '~~~~~~~~~~ ' 
     543      ENDIF 
    538544      ! 
    539545      CALL iom_open( cn_domcfg, inum ) 
     
    546552         CALL iom_get( inum, 'ORCA_index', zorca_res )   ;   kk_cfg = NINT( zorca_res ) 
    547553         ! 
    548          WRITE(ldtxt(ii),*) '   .'                                                     ;   ii = ii+1 
    549          WRITE(ldtxt(ii),*) '   ==>>>   ORCA configuration '                           ;   ii = ii+1 
    550          WRITE(ldtxt(ii),*) '   .'                                                     ;   ii = ii+1 
     554         IF(lwp) THEN 
     555            WRITE(numout,*) '   .' 
     556            WRITE(numout,*) '   ==>>>   ORCA configuration ' 
     557            WRITE(numout,*) '   .' 
     558         ENDIF 
    551559         ! 
    552560      ELSE                                !- cd_cfg & k_cfg are not used 
     
    561569         ! 
    562570      ENDIF 
    563       ! 
    564       CALL iom_get( inum, 'jpiglo', ziglo  )   ;   kpi = NINT( ziglo ) 
    565       CALL iom_get( inum, 'jpjglo', zjglo  )   ;   kpj = NINT( zjglo ) 
    566       CALL iom_get( inum, 'jpkglo', zkglo  )   ;   kpk = NINT( zkglo ) 
     571       ! 
     572      idvar = iom_varid( inum, 'e3t_0', kdimsz = idimsz )   ! use e3t_0, that must exist, to get jp(ijk)glo 
     573      kpi = idimsz(1) 
     574      kpj = idimsz(2) 
     575      kpk = idimsz(3) 
    567576      CALL iom_get( inum, 'jperio', zperio )   ;   kperio = NINT( zperio ) 
    568577      CALL iom_close( inum ) 
    569578      ! 
    570       WRITE(ldtxt(ii),*) '      cn_cfg = ', TRIM(cd_cfg), '   nn_cfg = ', kk_cfg             ;   ii = ii+1 
    571       WRITE(ldtxt(ii),*) '      jpiglo = ', kpi                                              ;   ii = ii+1 
    572       WRITE(ldtxt(ii),*) '      jpjglo = ', kpj                                              ;   ii = ii+1 
    573       WRITE(ldtxt(ii),*) '      jpkglo = ', kpk                                              ;   ii = ii+1 
    574       WRITE(ldtxt(ii),*) '      type of global domain lateral boundary   jperio = ', kperio  ;   ii = ii+1 
     579      IF(lwp) THEN 
     580         WRITE(numout,*) '      cn_cfg = ', TRIM(cd_cfg), '   nn_cfg = ', kk_cfg 
     581         WRITE(numout,*) '      jpiglo = ', kpi 
     582         WRITE(numout,*) '      jpjglo = ', kpj 
     583         WRITE(numout,*) '      jpkglo = ', kpk 
     584         WRITE(numout,*) '      type of global domain lateral boundary   jperio = ', kperio 
     585      ENDIF 
    575586      !         
    576587   END SUBROUTINE domain_cfg 
Note: See TracChangeset for help on using the changeset viewer.