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 12143 for NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DOM/domain.F90 – NEMO

Ignore:
Timestamp:
2019-12-10T12:57:49+01:00 (4 years ago)
Author:
mathiot
Message:

update ENHANCE-02_ISF_nemo to 12072 (sette in progress)

File:
1 edited

Legend:

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

    r11823 r12143  
    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)' 
     
    300300      REWIND( numnam_ref )              ! Namelist namrun in reference namelist : Parameters of the run 
    301301      READ  ( numnam_ref, namrun, IOSTAT = ios, ERR = 901) 
    302 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namrun in reference namelist', lwp ) 
     302901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namrun in reference namelist' ) 
    303303      REWIND( numnam_cfg )              ! Namelist namrun in configuration namelist : Parameters of the run 
    304304      READ  ( numnam_cfg, namrun, IOSTAT = ios, ERR = 902 ) 
    305 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namrun in configuration namelist', lwp ) 
     305902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namrun in configuration namelist' ) 
    306306      IF(lwm) WRITE ( numond, namrun ) 
    307307      ! 
     
    328328            WRITE(numout,*) '      frequency of restart file       nn_stock        = ', nn_stock 
    329329         ENDIF 
     330#if ! defined key_iomput 
    330331         WRITE(numout,*) '      frequency of output file        nn_write        = ', nn_write 
     332#endif 
    331333         WRITE(numout,*) '      mask land points                ln_mskland      = ', ln_mskland 
    332334         WRITE(numout,*) '      additional CF standard metadata ln_cfmeta       = ', ln_cfmeta 
     
    349351      nleapy = nn_leapy 
    350352      ninist = nn_istate 
    351       nstock = nn_stock 
    352       nstocklist = nn_stocklist 
    353       nwrite = nn_write 
    354353      neuler = nn_euler 
    355354      IF( neuler == 1 .AND. .NOT. ln_rstart ) THEN 
     
    360359      ENDIF 
    361360      !                             ! control of output frequency 
    362       IF( nstock == 0 .OR. nstock > nitend ) THEN 
    363          WRITE(ctmp1,*) 'nstock = ', nstock, ' it is forced to ', nitend 
     361      IF( .NOT. ln_rst_list ) THEN     ! we use nn_stock 
     362         IF( nn_stock == -1 )   CALL ctl_warn( 'nn_stock = -1 --> no restart will be done' ) 
     363         IF( nn_stock == 0 .OR. nn_stock > nitend ) THEN 
     364            WRITE(ctmp1,*) 'nn_stock = ', nn_stock, ' it is forced to ', nitend 
     365            CALL ctl_warn( ctmp1 ) 
     366            nn_stock = nitend 
     367         ENDIF 
     368      ENDIF 
     369#if ! defined key_iomput 
     370      IF( nn_write == -1 )   CALL ctl_warn( 'nn_write = -1 --> no output files will be done' ) 
     371      IF ( nn_write == 0 ) THEN 
     372         WRITE(ctmp1,*) 'nn_write = ', nn_write, ' it is forced to ', nitend 
    364373         CALL ctl_warn( ctmp1 ) 
    365          nstock = nitend 
    366       ENDIF 
    367       IF ( nwrite == 0 ) THEN 
    368          WRITE(ctmp1,*) 'nwrite = ', nwrite, ' it is forced to ', nitend 
    369          CALL ctl_warn( ctmp1 ) 
    370          nwrite = nitend 
    371       ENDIF 
     374         nn_write = nitend 
     375      ENDIF 
     376#endif 
    372377 
    373378#if defined key_agrif 
     
    392397      REWIND( numnam_ref )              ! Namelist namdom in reference namelist : space & time domain (bathymetry, mesh, timestep) 
    393398      READ  ( numnam_ref, namdom, IOSTAT = ios, ERR = 903) 
    394 903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdom in reference namelist', lwp ) 
     399903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdom in reference namelist' ) 
    395400      REWIND( numnam_cfg )              ! Namelist namdom in configuration namelist : space & time domain (bathymetry, mesh, timestep) 
    396401      READ  ( numnam_cfg, namdom, IOSTAT = ios, ERR = 904 ) 
    397 904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdom in configuration namelist', lwp ) 
     402904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdom in configuration namelist' ) 
    398403      IF(lwm) WRITE( numond, namdom ) 
    399404      ! 
     
    423428      REWIND( numnam_ref )              ! Namelist namnc4 in reference namelist : NETCDF 
    424429      READ  ( numnam_ref, namnc4, IOSTAT = ios, ERR = 907) 
    425 907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namnc4 in reference namelist', lwp ) 
     430907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namnc4 in reference namelist' ) 
    426431      REWIND( numnam_cfg )              ! Namelist namnc4 in configuration namelist : NETCDF 
    427432      READ  ( numnam_cfg, namnc4, IOSTAT = ios, ERR = 908 ) 
    428 908   IF( ios >  0 )   CALL ctl_nam ( ios , 'namnc4 in configuration namelist', lwp ) 
     433908   IF( ios >  0 )   CALL ctl_nam ( ios , 'namnc4 in configuration namelist' ) 
    429434      IF(lwm) WRITE( numond, namnc4 ) 
    430435 
     
    501506 
    502507 
    503    SUBROUTINE domain_cfg( ldtxt, cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     508   SUBROUTINE domain_cfg( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
    504509      !!---------------------------------------------------------------------- 
    505510      !!                     ***  ROUTINE dom_nam  *** 
     
    509514      !! ** Method  :   read the cn_domcfg NetCDF file 
    510515      !!---------------------------------------------------------------------- 
    511       CHARACTER(len=*), DIMENSION(:), INTENT(out) ::   ldtxt           ! stored print information 
    512516      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    513517      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
     
    515519      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
    516520      ! 
    517       INTEGER ::   inum, ii   ! local integer 
     521      INTEGER ::   inum   ! local integer 
    518522      REAL(wp) ::   zorca_res                     ! local scalars 
    519       REAL(wp) ::   ziglo, zjglo, zkglo, zperio   !   -      - 
    520       !!---------------------------------------------------------------------- 
    521       ! 
    522       ii = 1 
    523       WRITE(ldtxt(ii),*) '           '                                                    ;   ii = ii+1 
    524       WRITE(ldtxt(ii),*) 'domain_cfg : domain size read in ', TRIM( cn_domcfg ), ' file'  ;   ii = ii+1 
    525       WRITE(ldtxt(ii),*) '~~~~~~~~~~ '                                                    ;   ii = ii+1 
     523      REAL(wp) ::   zperio                        !   -      - 
     524      INTEGER, DIMENSION(4) ::   idvar, idimsz    ! size   of dimensions 
     525      !!---------------------------------------------------------------------- 
     526      ! 
     527      IF(lwp) THEN 
     528         WRITE(numout,*) '           ' 
     529         WRITE(numout,*) 'domain_cfg : domain size read in ', TRIM( cn_domcfg ), ' file' 
     530         WRITE(numout,*) '~~~~~~~~~~ ' 
     531      ENDIF 
    526532      ! 
    527533      CALL iom_open( cn_domcfg, inum ) 
     
    534540         CALL iom_get( inum, 'ORCA_index', zorca_res )   ;   kk_cfg = NINT( zorca_res ) 
    535541         ! 
    536          WRITE(ldtxt(ii),*) '   .'                                                     ;   ii = ii+1 
    537          WRITE(ldtxt(ii),*) '   ==>>>   ORCA configuration '                           ;   ii = ii+1 
    538          WRITE(ldtxt(ii),*) '   .'                                                     ;   ii = ii+1 
     542         IF(lwp) THEN 
     543            WRITE(numout,*) '   .' 
     544            WRITE(numout,*) '   ==>>>   ORCA configuration ' 
     545            WRITE(numout,*) '   .' 
     546         ENDIF 
    539547         ! 
    540548      ELSE                                !- cd_cfg & k_cfg are not used 
     
    549557         ! 
    550558      ENDIF 
    551       ! 
    552       CALL iom_get( inum, 'jpiglo', ziglo  )   ;   kpi = NINT( ziglo ) 
    553       CALL iom_get( inum, 'jpjglo', zjglo  )   ;   kpj = NINT( zjglo ) 
    554       CALL iom_get( inum, 'jpkglo', zkglo  )   ;   kpk = NINT( zkglo ) 
     559       ! 
     560      idvar = iom_varid( inum, 'e3t_0', kdimsz = idimsz )   ! use e3t_0, that must exist, to get jp(ijk)glo 
     561      kpi = idimsz(1) 
     562      kpj = idimsz(2) 
     563      kpk = idimsz(3) 
    555564      CALL iom_get( inum, 'jperio', zperio )   ;   kperio = NINT( zperio ) 
    556565      CALL iom_close( inum ) 
    557566      ! 
    558       WRITE(ldtxt(ii),*) '      cn_cfg = ', TRIM(cd_cfg), '   nn_cfg = ', kk_cfg             ;   ii = ii+1 
    559       WRITE(ldtxt(ii),*) '      jpiglo = ', kpi                                              ;   ii = ii+1 
    560       WRITE(ldtxt(ii),*) '      jpjglo = ', kpj                                              ;   ii = ii+1 
    561       WRITE(ldtxt(ii),*) '      jpkglo = ', kpk                                              ;   ii = ii+1 
    562       WRITE(ldtxt(ii),*) '      type of global domain lateral boundary   jperio = ', kperio  ;   ii = ii+1 
     567      IF(lwp) THEN 
     568         WRITE(numout,*) '      cn_cfg = ', TRIM(cd_cfg), '   nn_cfg = ', kk_cfg 
     569         WRITE(numout,*) '      jpiglo = ', kpi 
     570         WRITE(numout,*) '      jpjglo = ', kpj 
     571         WRITE(numout,*) '      jpkglo = ', kpk 
     572         WRITE(numout,*) '      type of global domain lateral boundary   jperio = ', kperio 
     573      ENDIF 
    563574      !         
    564575   END SUBROUTINE domain_cfg 
Note: See TracChangeset for help on using the changeset viewer.