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 11624 for NEMO/branches/2019/dev_r11613_ENHANCE-04_namelists_as_internalfiles/src/OCE/nemogcm.F90 – NEMO

Ignore:
Timestamp:
2019-10-01T15:07:45+02:00 (5 years ago)
Author:
acc
Message:

Branch 2019/dev_r11613_ENHANCE-04_namelists_as_internalfiles. Substantive changes required to replace all namelists with internal files. These are the key changes only; to compile and run tests all REWIND and CLOSE operations on the (no longer) units have to be removed. These changes affect many more files but can be scripted so are not included here in order to make a later merge easier. The scripts used to prepare code for testing are included on: wiki:2019WP/ENHANCE-04_AndrewC-reporting/Internal_Namelists. With these additional changes this code passes most SETTE tests but the AGRIF preprocessor does not currently accept the new allocatable character strings. To be investigated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11613_ENHANCE-04_namelists_as_internalfiles/src/OCE/nemogcm.F90

    r11536 r11624  
    307307      IF( lwm )   CALL ctl_opn(     numout,        'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    308308      ! open reference and configuration namelist files 
    309                   CALL ctl_opn( numnam_ref,        'namelist_ref',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    310                   CALL ctl_opn( numnam_cfg,        'namelist_cfg',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     309                  CALL load_nml( numnam_ref,        'namelist_ref',                                          -1, .FALSE. ) 
     310                  CALL load_nml( numnam_cfg,        'namelist_cfg',                                          -1, .FALSE. ) 
    311311      IF( lwm )   CALL ctl_opn(     numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    312312      ! open /dev/null file to be able to supress output write easily 
     
    317317      !                             !--------------------! 
    318318      ! 
    319       REWIND( numnam_ref )              ! Namelist namctl in reference namelist 
    320319      READ  ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 
    321320901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namctl in reference namelist' ) 
    322       REWIND( numnam_cfg )              ! Namelist namctl in confguration namelist 
    323321      READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 
    324322902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namctl in configuration namelist' ) 
     
    375373      !                             !------------------------------------! 
    376374      ! 
    377       REWIND( numnam_ref )              ! Namelist namcfg in reference namelist 
    378375      READ  ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 
    379376903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcfg in reference namelist' ) 
    380       REWIND( numnam_cfg )              ! Namelist namcfg in confguration namelist 
    381377      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 
    382378904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfg in configuration namelist' )    
     
    619615      IF( numstp          /= -1 )   CLOSE( numstp          )   ! time-step file 
    620616      IF( numrun          /= -1 )   CLOSE( numrun          )   ! run statistics file 
    621       IF( numnam_ref      /= -1 )   CLOSE( numnam_ref      )   ! oce reference namelist 
    622       IF( numnam_cfg      /= -1 )   CLOSE( numnam_cfg      )   ! oce configuration namelist 
    623617      IF( lwm.AND.numond  /= -1 )   CLOSE( numond          )   ! oce output namelist 
    624       IF( numnam_ice_ref  /= -1 )   CLOSE( numnam_ice_ref  )   ! ice reference namelist 
    625       IF( numnam_ice_cfg  /= -1 )   CLOSE( numnam_ice_cfg  )   ! ice configuration namelist 
    626618      IF( lwm.AND.numoni  /= -1 )   CLOSE( numoni          )   ! ice output namelist 
    627619      IF( numevo_ice      /= -1 )   CLOSE( numevo_ice      )   ! ice variables (temp. evolution) 
Note: See TracChangeset for help on using the changeset viewer.