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/TOP_SRC/trcnam.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/TOP_SRC/trcnam.F90

    r3749 r3875  
    5555      !!--------------------------------------------------------------------- 
    5656      INTEGER ::  jn, ierr 
     57      INTEGER ::  ios                 ! Local integer output status for namelist read 
    5758      ! Definition of a tracer as a structure 
    5859      TYPE(PTRACER), DIMENSION(jptra) :: sn_tracer  ! type of tracer for saving if not key_iomput 
     
    7374      IF(lwp) WRITE(numout,*) '~~~~~~~' 
    7475 
    75       CALL ctl_opn( numnat, 'namelist_top', 'OLD', 'FORMATTED', 'SEQUENTIAL', 1, numout, .FALSE. ) 
     76      CALL ctl_opn( numnat_ref, 'namelist_top_ref'   , 'OLD'    , 'FORMATTED', 'SEQUENTIAL', 1, numout, .FALSE. ) 
     77      CALL ctl_opn( numnat_cfg, 'namelist_top_cfg'   , 'OLD'    , 'FORMATTED', 'SEQUENTIAL', 1, numout, .FALSE. ) 
     78      CALL ctl_opn( numont    , 'output.namelist.top', 'REPLACE', 'FORMATTED', 'SEQUENTIAL',-1, numout, .FALSE. ) 
    7679 
    7780      ! Namelist nattrc (files) 
     
    9598      ln_trcdmp = .FALSE. 
    9699 
    97  
    98       REWIND( numnat )               ! read nattrc 
    99       READ  ( numnat, namtrc ) 
     100      REWIND( numnat_ref )              ! Namelist namtrc in reference namelist : Passive tracer variables 
     101      READ  ( numnat_ref, namtrc, IOSTAT = ios, ERR = 901) 
     102901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in reference namelist', lwp ) 
     103 
     104      REWIND( numnat_cfg )              ! Namelist namtrc in configuration namelist : Passive tracer variables 
     105      READ  ( numnat_cfg, namtrc, IOSTAT = ios, ERR = 902 ) 
     106902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in configuration namelist', lwp ) 
     107      WRITE ( numont, namtrc ) 
    100108 
    101109      DO jn = 1, jptra 
     
    142150      nn_writebio = 10 
    143151 
    144       REWIND( numnat )               !  namelist namtoptrd : passive tracer trends diagnostic 
    145       READ  ( numnat, namtrc_dia ) 
     152      REWIND( numnat_ref )              ! Namelist namtrc_dia in reference namelist : Passive tracer diagnostics 
     153      READ  ( numnat_ref, namtrc_dia, IOSTAT = ios, ERR = 903) 
     154903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dia in reference namelist', lwp ) 
     155 
     156      REWIND( numnat_cfg )              ! Namelist namtrc_dia in configuration namelist : Passive tracer diagnostics 
     157      READ  ( numnat_cfg, namtrc_dia, IOSTAT = ios, ERR = 904 ) 
     158904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dia in configuration namelist', lwp ) 
     159      WRITE ( numont, namtrc_dia ) 
    146160 
    147161      IF(lwp) THEN 
     
    221235         ln_trdtrc(:) = .FALSE. 
    222236 
    223          REWIND( numnat )               !  namelist namtoptrd : passive tracer trends diagnostic 
    224          READ  ( numnat, namtrc_trd ) 
     237         REWIND( numnat_ref )              ! Namelist namtrc_trd in reference namelist : Passive tracer trends 
     238         READ  ( numnat_ref, namtrc_trd, IOSTAT = ios, ERR = 905) 
     239905      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_trd in reference namelist', lwp ) 
     240 
     241         REWIND( numnat_cfg )              ! Namelist namtrc_trd in configuration namelist : Passive tracer trends 
     242         READ  ( numnat_cfg, namtrc_trd, IOSTAT = ios, ERR = 906 ) 
     243906      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_trd in configuration namelist', lwp ) 
     244         WRITE ( numont, namtrc_trd ) 
    225245 
    226246         IF(lwp) THEN 
Note: See TracChangeset for help on using the changeset viewer.