Ignore:
Timestamp:
2019-10-01T15:07:45+02:00 (16 months 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/TOP/trcnam.F90

    r11536 r11624  
    108108      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 
    109109      ! 
    110       CALL ctl_opn( numnat_ref, 'namelist_top_ref'   , 'OLD'    , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    111       CALL ctl_opn( numnat_cfg, 'namelist_top_cfg'   , 'OLD'    , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
     110      CALL load_nml( numnat_ref, 'namelist_top_ref' , numout, .FALSE. ) 
     111      CALL load_nml( numnat_cfg, 'namelist_top_cfg' , numout, .FALSE. ) 
    112112      IF(lwm) CALL ctl_opn( numont, 'output.namelist.top', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE., 1 ) 
    113113      ! 
    114       REWIND( numnat_ref )              ! Namelist namtrc in reference namelist : Passive tracer variables 
    115114      READ  ( numnat_ref, namtrc_run, IOSTAT = ios, ERR = 901) 
    116115901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc in reference namelist' ) 
    117       REWIND( numnat_cfg )              ! Namelist namtrc in configuration namelist : Passive tracer variables 
    118116      READ  ( numnat_cfg, namtrc_run, IOSTAT = ios, ERR = 902 ) 
    119117902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc in configuration namelist' ) 
     
    158156      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 
    159157 
    160       REWIND( numnat_ref )              ! Namelist namtrc in reference namelist : Passive tracer variables 
    161158      READ  ( numnat_ref, namtrc, IOSTAT = ios, ERR = 901) 
    162159901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc in reference namelist' ) 
    163       REWIND( numnat_cfg )              ! Namelist namtrc in configuration namelist : Passive tracer variables 
    164160      READ  ( numnat_cfg, namtrc, IOSTAT = ios, ERR = 902 ) 
    165161902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc in configuration namelist' ) 
     
    228224      IF( ll_cfc .OR. ln_c14 ) THEN 
    229225        !                             ! Open namelist files 
    230         CALL ctl_opn( numtrc_ref, 'namelist_trc_ref'   ,     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    231         CALL ctl_opn( numtrc_cfg, 'namelist_trc_cfg'   ,     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
     226        CALL load_nml( numtrc_ref, 'namelist_trc_ref' , numout, .FALSE. ) 
     227        CALL load_nml( numtrc_cfg, 'namelist_trc_cfg' , numout, .FALSE. ) 
    232228        IF(lwm) CALL ctl_opn( numonr, 'output.namelist.trc', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    233229        ! 
     
    261257      ALLOCATE( ln_trdtrc(jptra) )  
    262258      ! 
    263       REWIND( numnat_ref )              ! Namelist namtrc_trd in reference namelist : Passive tracer trends 
    264259      READ  ( numnat_ref, namtrc_trd, IOSTAT = ios, ERR = 905) 
    265260905   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_trd in reference namelist' ) 
    266       REWIND( numnat_cfg )              ! Namelist namtrc_trd in configuration namelist : Passive tracer trends 
    267261      READ  ( numnat_cfg, namtrc_trd, IOSTAT = ios, ERR = 906 ) 
    268262906   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_trd in configuration namelist' ) 
Note: See TracChangeset for help on using the changeset viewer.