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/CFC/trcnam_cfc.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/CFC/trcnam_cfc.F90

    r3294 r4147  
    4242      !! ** input   :   Namelist namcfc 
    4343      !!---------------------------------------------------------------------- 
    44       INTEGER ::  numnatc 
     44      INTEGER ::  numnatc_ref = -1   ! Logical unit for reference CFC namelist 
     45      INTEGER ::  numnatc_cfg = -1   ! Logical unit for configuration CFC namelist 
     46      INTEGER ::  numonc      = -1   ! Logical unit for output namelist 
     47      INTEGER :: ios                 ! Local integer output status for namelist read 
    4548      INTEGER :: jl, jn 
    4649      TYPE(DIAG), DIMENSION(jp_cfc_2d) :: cfcdia2d 
     
    4851      NAMELIST/namcfcdate/ ndate_beg, nyear_res 
    4952      NAMELIST/namcfcdia/  cfcdia2d     ! additional diagnostics 
    50       !!------------------------------------------------------------------- 
     53      !!---------------------------------------------------------------------- 
     54      !                             ! Open namelist files 
     55      CALL ctl_opn( numnatc_ref, 'namelist_cfc_ref'   ,     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
     56      CALL ctl_opn( numnatc_cfg, 'namelist_cfc_cfg'   ,     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
     57      CALL ctl_opn( numonc     , 'output.namelist.cfc', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    5158 
    52       ndate_beg = 300101            ! default namelist value 
    53       nyear_res = 1950 
     59      REWIND( numnatc_ref )              ! Namelist namcfcdate in reference namelist : CFC parameters 
     60      READ  ( numnatc_ref, namcfcdate, IOSTAT = ios, ERR = 901) 
     61901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfcdate in reference namelist', lwp ) 
    5462 
    55       !                             ! Open namelist file 
    56       CALL ctl_opn( numnatc, 'namelist_cfc', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    57           
    58       READ( numnatc , namcfcdate )     ! read namelist 
     63      REWIND( numnatc_cfg )              ! Namelist namcfcdate in configuration namelist : CFC parameters 
     64      READ  ( numnatc_cfg, namcfcdate, IOSTAT = ios, ERR = 902 ) 
     65902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfcdate in configuration namelist', lwp ) 
     66      WRITE ( numonc, namcfcdate ) 
    5967 
    6068      IF(lwp) THEN                  ! control print 
     
    7381         ! Namelist namcfcdia 
    7482         ! ------------------- 
    75          DO jl = 1, jp_cfc_2d 
    76             WRITE(cfcdia2d(jl)%sname,'("2D_",I1)') jl                      ! short name 
    77             WRITE(cfcdia2d(jl)%lname,'("2D DIAGNOSTIC NUMBER ",I2)') jl    ! long name 
    78             cfcdia2d(jl)%units = ' '                                       ! units 
    79          END DO 
     83         REWIND( numnatc_ref )              ! Namelist namcfcdia in reference namelist : CFC diagnostics 
     84         READ  ( numnatc_ref, namcfcdia, IOSTAT = ios, ERR = 903) 
     85903      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfcdia in reference namelist', lwp ) 
    8086 
    81          REWIND( numnatc )               ! read natrtd 
    82          READ  ( numnatc, namcfcdia ) 
     87         REWIND( numnatc_cfg )              ! Namelist namcfcdia in configuration namelist : CFC diagnostics 
     88         READ  ( numnatc_cfg, namcfcdia, IOSTAT = ios, ERR = 904 ) 
     89904      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfcdia in configuration namelist', lwp ) 
     90         WRITE ( numonc, namcfcdia ) 
    8391 
    8492         DO jl = 1, jp_cfc_2d 
     
    102110      ENDIF 
    103111 
     112   CALL FLUSH ( numonc )     ! flush output namelist CFC 
     113 
    104114   END SUBROUTINE trc_nam_cfc 
    105115    
Note: See TracChangeset for help on using the changeset viewer.