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/C14b/trcnam_c14b.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/C14b/trcnam_c14b.F90

    r3294 r4147  
    4242      !! ** input   :   Namelist namelist_c14b 
    4343      !!---------------------------------------------------------------------- 
    44       INTEGER ::   numnatb 
     44      INTEGER ::  numnatb_ref = -1   ! Logical unit for reference c14b namelist 
     45      INTEGER ::  numnatb_cfg = -1   ! Logical unit for configuration c14b namelist 
     46      INTEGER ::  numonb      = -1   ! Logical unit for output namelist 
     47      INTEGER :: ios                 ! Local integer output status for namelist read 
    4548 
    4649      ! definition of additional diagnostic as a structure 
     
    5255      NAMELIST/namc14dia/  c14dia2d, c14dia3d     ! additional diagnostics 
    5356      !!------------------------------------------------------------------- 
     57      !                             ! Open namelist file 
     58      CALL ctl_opn( numnatb_ref, 'namelist_c14b_ref'  ,     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
     59      CALL ctl_opn( numnatb_cfg, 'namelist_c14b_cfg'  ,     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )    
     60      CALL ctl_opn( numonb     , 'output.namelist.c14', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )      
     61      REWIND( numnatb_ref )              ! Namelist namc14date in reference namelist : c14b parameters 
     62      READ  ( numnatb_ref, namc14date, IOSTAT = ios, ERR = 901) 
     63901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc14date in reference namelist', lwp ) 
    5464 
    55       ndate_beg_b = 650101            ! default namelist value 
    56       nyear_res_b = 1955 
    57  
    58       !                             ! Open namelist file 
    59       CALL ctl_opn( numnatb, 'namelist_c14b', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    60           
    61       READ( numnatb , namc14date )     ! read namelist 
    62  
     65      REWIND( numnatb_cfg )              ! Namelist namc14date in configuration namelist : c14b parameters 
     66      READ  ( numnatb_cfg, namc14date, IOSTAT = ios, ERR = 902 ) 
     67902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc14date in configuration namelist', lwp ) 
     68      WRITE ( numonb, namc14date ) 
    6369      IF(lwp) THEN                  ! control print 
    6470         WRITE(numout,*) 
     
    7581         ! Namelist namc14dia 
    7682         ! ------------------- 
    77          DO jl = 1, jp_c14b_2d 
    78             WRITE(c14dia2d(jl)%sname,'("2D_",I1)') jl                      ! short name 
    79             WRITE(c14dia2d(jl)%lname,'("2D DIAGNOSTIC NUMBER ",I2)') jl    ! long name 
    80             c14dia2d(jl)%units = ' '                                       ! units 
    81          END DO 
    82          !                                 ! 3D output arrays 
    83          DO jl = 1, jp_c14b_3d 
    84             WRITE(c14dia3d(jl)%sname,'("3D_",I1)') jl                      ! short name 
    85             WRITE(c14dia3d(jl)%lname,'("3D DIAGNOSTIC NUMBER ",I2)') jl    ! long name 
    86             c14dia3d(jl)%units = ' '                                       ! units 
    87          END DO 
     83         REWIND( numnatb_ref )              ! Namelist namc14dia in reference namelist : c14b diagnostics 
     84         READ  ( numnatb_ref, namc14dia, IOSTAT = ios, ERR = 903) 
     85903      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc14dia in reference namelist', lwp ) 
    8886 
    89          REWIND( numnatb )               !  
    90          READ  ( numnatb, namc14dia ) 
     87         REWIND( numnatb_cfg )              ! Namelist namc14dia in configuration namelist : c14b diagnostics 
     88         READ  ( numnatb_cfg, namc14dia, IOSTAT = ios, ERR = 904 ) 
     89904      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc14dia in configuration namelist', lwp ) 
     90         WRITE ( numonb, namc14dia ) 
    9191 
    9292         DO jl = 1, jp_c14b_2d 
     
    124124      ENDIF 
    125125 
     126   CALL FLUSH ( numonb )     ! flush output namelist C14b 
     127 
    126128   END SUBROUTINE trc_nam_c14b 
    127129    
Note: See TracChangeset for help on using the changeset viewer.