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 4290 for branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OOO_SRC/nemogcm.F90 – NEMO

Ignore:
Timestamp:
2013-11-20T16:33:46+01:00 (10 years ago)
Author:
cetlod
Message:

fix to lwp use for namelist reads

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OOO_SRC/nemogcm.F90

    r4120 r4290  
    129129      CHARACTER(len=80), DIMENSION(16) ::   cltxt 
    130130      !! 
    131       NAMELIST/namctl/ ln_ctl  , nn_print, nn_ictls, nn_ictle,   & 
     131      NAMELIST/namctl/ ln_ctl, nn_print, nn_ictls, nn_ictle,   & 
    132132         &             nn_isplt, nn_jsplt, nn_jctls, nn_jctle,   & 
    133133         &             nn_bench, nn_timing 
     134      NAMELIST/namcfg/ cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 
     135         &             jpizoom, jpjzoom, jperio 
    134136      !!---------------------------------------------------------------------- 
    135137      ! 
    136138      cltxt = '' 
    137139      ! 
    138       !                             ! open Namelist file 
    139       CALL ctl_opn( numnam, 'namelist', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    140       ! 
    141       READ( numnam, namctl )        ! Namelist namctl : Control prints & Benchmark 
    142       ! 
     140      !                             ! Open reference namelist and configuration namelist files 
     141      CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
     142      CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
     143      CALL ctl_opn( numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. , 1 ) 
     144      ! 
     145      REWIND( numnam_ref )              ! Namelist namctl in reference namelist : Control prints & Benchmark 
     146      READ  ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 
     147901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in reference namelist', .TRUE. ) 
     148 
     149      REWIND( numnam_cfg )              ! Namelist namctl in confguration namelist : Control prints & Benchmark 
     150      READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 
     151902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', .TRUE. ) 
     152      WRITE( numond, namctl ) 
     153 
     154      ! 
     155      REWIND( numnam_ref )              ! Namelist namcfg in reference namelist : Control prints & Benchmark 
     156      READ  ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 
     157903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in reference namelist', .TRUE. ) 
     158 
     159      REWIND( numnam_cfg )              ! Namelist namcfg in confguration namelist : Control prints & Benchmark 
     160      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 
     161904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. )    
     162      WRITE( numond, namcfg ) 
     163 
    143164      !                             !--------------------------------------------! 
    144165      !                             !  set communicator & select the local node  ! 
Note: See TracChangeset for help on using the changeset viewer.