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 3875 for branches/2013/dev_r3853_CNRS9_ConfSetting/NEMOGCM/NEMO/OFF_SRC/domain.F90 – NEMO

Ignore:
Timestamp:
2013-04-18T16:38:06+02:00 (11 years ago)
Author:
clevy
Message:

Configuration Setting/Step? 1, see ticket:#1074

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2013/dev_r3853_CNRS9_ConfSetting/NEMOGCM/NEMO/OFF_SRC/domain.F90

    r3632 r3875  
    8888      !!---------------------------------------------------------------------- 
    8989      USE ioipsl 
     90      INTEGER  ::   ios                 ! Local integer output status for namelist read 
    9091      NAMELIST/namrun/ nn_no   , cn_exp    , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl,   & 
    9192         &             nn_it000, nn_itend  , nn_date0    , nn_leapy     , nn_istate , nn_stock ,   & 
     
    100101      !!---------------------------------------------------------------------- 
    101102 
    102       REWIND( numnam )              ! Namelist namrun : parameters of the run 
    103       READ  ( numnam, namrun ) 
     103      REWIND( numnam_ref )              ! Namelist namrun in reference namelist : Parameters of the run 
     104      READ  ( numnam_ref, namrun, IOSTAT = ios, ERR = 901) 
     105901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namrun in reference namelist', lwp ) 
     106 
     107      REWIND( numnam_cfg )              ! Namelist namrun in configuration namelist : Parameters of the run 
     108      READ  ( numnam_cfg, namrun, IOSTAT = ios, ERR = 902 ) 
     109902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namrun in configuration namelist', lwp ) 
     110      WRITE ( numond, namrun ) 
    104111      ! 
    105112      IF(lwp) THEN                  ! control print 
     
    170177#endif 
    171178 
    172       REWIND( numnam )             ! Domain 
    173       READ  ( numnam, namdom ) 
     179      REWIND( numnam_ref )              ! Namelist namdom in reference namelist : space & time domain (bathymetry, mesh, timestep) 
     180      READ  ( numnam_ref, namdom, IOSTAT = ios, ERR = 903) 
     181903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdom in reference namelist', lwp ) 
     182 
     183      REWIND( numnam_cfg )              ! Namelist namdom in configuration namelist : space & time domain (bathymetry, mesh, timestep) 
     184      READ  ( numnam_cfg, namdom, IOSTAT = ios, ERR = 904 ) 
     185904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdom in configuration namelist', lwp ) 
     186      WRITE ( numond, namdom ) 
    174187 
    175188      IF(lwp) THEN 
     
    206219      rdth      = rn_rdth 
    207220 
    208       REWIND( numnam )             ! Namelist cross land advection 
    209       READ  ( numnam, namcla ) 
     221      REWIND( numnam_ref )              ! Namelist namcla in reference namelist : Cross land advection 
     222      READ  ( numnam_ref, namcla, IOSTAT = ios, ERR = 905) 
     223905   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcla in reference namelist', lwp ) 
     224 
     225      REWIND( numnam_cfg )              ! Namelist namcla in configuration namelist : Cross land advection 
     226      READ  ( numnam_cfg, namcla, IOSTAT = ios, ERR = 906 ) 
     227906   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcla in configuration namelist', lwp ) 
     228      WRITE( numond, namcla ) 
     229 
    210230      IF(lwp) THEN 
    211231         WRITE(numout,*) 
     
    216236#if defined key_netcdf4 
    217237      !                             ! NetCDF 4 case   ("key_netcdf4" defined) 
    218       REWIND( numnam )                    ! Namelist namnc4 : netcdf4 chunking parameters 
    219       READ  ( numnam, namnc4 ) 
     238      REWIND( numnam_ref )              ! Namelist namnc4 in reference namelist : NETCDF 
     239      READ  ( numnam_ref, namnc4, IOSTAT = ios, ERR = 907) 
     240907   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namnc4 in reference namelist', lwp ) 
     241 
     242      REWIND( numnam_cfg )              ! Namelist namnc4 in configuration namelist : NETCDF 
     243      READ  ( numnam_cfg, namnc4, IOSTAT = ios, ERR = 908 ) 
     244908   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namnc4 in configuration namelist', lwp ) 
     245      WRITE( numond, namnc4 ) 
    220246      IF(lwp) THEN                        ! control print 
    221247         WRITE(numout,*) 
     
    257283      !!---------------------------------------------------------------------- 
    258284      INTEGER ::   ioptio = 0   ! temporary integer 
     285      INTEGER ::   ios 
    259286      !! 
    260287      NAMELIST/namzgr/ ln_zco, ln_zps, ln_sco 
    261288      !!---------------------------------------------------------------------- 
    262289 
    263       REWIND ( numnam )                ! Read Namelist namzgr : vertical coordinate' 
    264       READ   ( numnam, namzgr ) 
     290      REWIND( numnam_ref )              ! Namelist namzgr in reference namelist : Vertical coordinate 
     291      READ  ( numnam_ref, namzgr, IOSTAT = ios, ERR = 901 ) 
     292901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzgr in reference namelist', lwp ) 
     293 
     294      REWIND( numnam_cfg )              ! Namelist namzgr in configuration namelist : Vertical coordinate 
     295      READ  ( numnam_cfg, namzgr, IOSTAT = ios, ERR = 902 ) 
     296902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzgr in configuration namelist', lwp ) 
     297      WRITE ( numond, namzgr ) 
    265298 
    266299      IF(lwp) THEN                     ! Control print 
Note: See TracChangeset for help on using the changeset viewer.