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 4147 for branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/trcnam.F90 – NEMO

Ignore:
Timestamp:
2013-11-04T12:51:55+01:00 (10 years ago)
Author:
cetlod
Message:

merge in dev_LOCEAN_2013, the 1st development branch dev_r3853_CNRS9_Confsetting, from its starting point ( r3853 ) on the trunk: see ticket #1169

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/trcnam.F90

    r3749 r4147  
    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  
    77       ! Namelist nattrc (files) 
    78       ! ---------------------------------------------- 
    79       nn_dttrc      = 1                 ! default values 
    80       nn_writetrc   = 10  
    81       ln_top_euler  = .FALSE. 
    82       ln_rsttr      = .FALSE. 
    83       nn_rsttr      =  0 
    84       cn_trcrst_in  = 'restart_trc' 
    85       cn_trcrst_out = 'restart_trc' 
    86       ! 
    87       DO jn = 1, jptra 
    88          WRITE( sn_tracer(jn)%clsname,'("TR_",I1)'           ) jn 
    89          WRITE( sn_tracer(jn)%cllname,'("TRACER NUMBER ",I1)') jn 
    90          sn_tracer(jn)%clunit  = 'mmole/m3' 
    91          sn_tracer(jn)%llinit  = .FALSE. 
    92          sn_tracer(jn)%llsave  = .TRUE. 
    93       END DO 
    94       ln_trcdta = .FALSE. 
    95       ln_trcdmp = .FALSE. 
    96  
    97  
    98       REWIND( numnat )               ! read nattrc 
    99       READ  ( numnat, namtrc ) 
     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. ) 
     79 
     80      REWIND( numnat_ref )              ! Namelist namtrc in reference namelist : Passive tracer variables 
     81      READ  ( numnat_ref, namtrc, IOSTAT = ios, ERR = 901) 
     82901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in reference namelist', lwp ) 
     83 
     84      REWIND( numnat_cfg )              ! Namelist namtrc in configuration namelist : Passive tracer variables 
     85      READ  ( numnat_cfg, namtrc, IOSTAT = ios, ERR = 902 ) 
     86902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in configuration namelist', lwp ) 
     87      WRITE ( numont, namtrc ) 
    10088 
    10189      DO jn = 1, jptra 
     
    137125      ENDIF 
    138126 
    139       ln_diatrc = .FALSE. 
    140       ln_diabio = .FALSE. 
    141       nn_writedia = 10 
    142       nn_writebio = 10 
    143  
    144       REWIND( numnat )               !  namelist namtoptrd : passive tracer trends diagnostic 
    145       READ  ( numnat, namtrc_dia ) 
     127      REWIND( numnat_ref )              ! Namelist namtrc_dia in reference namelist : Passive tracer diagnostics 
     128      READ  ( numnat_ref, namtrc_dia, IOSTAT = ios, ERR = 903) 
     129903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dia in reference namelist', lwp ) 
     130 
     131      REWIND( numnat_cfg )              ! Namelist namtrc_dia in configuration namelist : Passive tracer diagnostics 
     132      READ  ( numnat_cfg, namtrc_dia, IOSTAT = ios, ERR = 904 ) 
     133904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dia in configuration namelist', lwp ) 
     134      WRITE ( numont, namtrc_dia ) 
    146135 
    147136      IF(lwp) THEN 
     
    212201 
    213202#if defined key_trdmld_trc || defined key_trdtrc 
    214          nn_trd_trc  = 20 
    215          nn_ctls_trc =  9 
    216          rn_ucf_trc   =  1. 
    217          ln_trdmld_trc_instant = .TRUE. 
    218          ln_trdmld_trc_restart =.FALSE. 
    219          cn_trdrst_trc_in  = "restart_mld_trc" 
    220          cn_trdrst_trc_out = "restart_mld_trc" 
    221          ln_trdtrc(:) = .FALSE. 
    222  
    223          REWIND( numnat )               !  namelist namtoptrd : passive tracer trends diagnostic 
    224          READ  ( numnat, namtrc_trd ) 
     203 
     204         REWIND( numnat_ref )              ! Namelist namtrc_trd in reference namelist : Passive tracer trends 
     205         READ  ( numnat_ref, namtrc_trd, IOSTAT = ios, ERR = 905) 
     206905      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_trd in reference namelist', lwp ) 
     207 
     208         REWIND( numnat_cfg )              ! Namelist namtrc_trd in configuration namelist : Passive tracer trends 
     209         READ  ( numnat_cfg, namtrc_trd, IOSTAT = ios, ERR = 906 ) 
     210906      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_trd in configuration namelist', lwp ) 
     211         WRITE ( numont, namtrc_trd ) 
    225212 
    226213         IF(lwp) THEN 
Note: See TracChangeset for help on using the changeset viewer.