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 11960 for NEMO/branches – NEMO

Changeset 11960 for NEMO/branches


Ignore:
Timestamp:
2019-11-25T18:19:39+01:00 (4 years ago)
Author:
acc
Message:

Branch 2019/dev_r11943_MERGE_2019. Merge in changes from 2019/dev_r11613_ENHANCE-04_namelists_as_internalfiles. (svn merge -r 11614:11954). Resolved tree conflicts and one actual conflict. Sette tested(these changes alter the ext/AGRIF reference; remember to update). See ticket #2341

Location:
NEMO/branches/2019/dev_r11943_MERGE_2019
Files:
1 deleted
140 edited
1 copied

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11943_MERGE_2019

    • Property svn:externals
      •  

        old new  
        33^/utils/build/mk@HEAD         mk 
        44^/utils/tools@HEAD            tools 
        5 ^/vendors/AGRIF/dev@HEAD      ext/AGRIF 
         5^/vendors/AGRIF/dev_r11615_ENHANCE-04_namelists_as_internalfiles_agrif@HEAD      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
        77^/vendors/IOIPSL@HEAD         ext/IOIPSL 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/cfgs/C1D_PAPA/MY_SRC/usrdef_nam.F90

    r11536 r11960  
    6161      !!---------------------------------------------------------------------- 
    6262      ! 
    63       REWIND( numnam_cfg )          ! Namelist namusr_def (exist in namelist_cfg only) 
    6463      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 
    6564902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/ICE/icealb.F90

    r11536 r11960  
    190190      !!---------------------------------------------------------------------- 
    191191      ! 
    192       REWIND( numnam_ice_ref )              ! Namelist namalb in reference namelist : Albedo parameters 
    193192      READ  ( numnam_ice_ref, namalb, IOSTAT = ios, ERR = 901) 
    194193901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namalb in reference namelist' ) 
    195       REWIND( numnam_ice_cfg )              ! Namelist namalb in configuration namelist : Albedo parameters 
    196194      READ  ( numnam_ice_cfg, namalb, IOSTAT = ios, ERR = 902 ) 
    197195902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namalb in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/ICE/icedia.F90

    r11536 r11960  
    178178      !!---------------------------------------------------------------------- 
    179179      ! 
    180       REWIND( numnam_ice_ref )      ! Namelist namdia in reference namelist : Parameters for ice 
    181180      READ  ( numnam_ice_ref, namdia, IOSTAT = ios, ERR = 901) 
    182181901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdia in reference namelist' ) 
    183       REWIND( numnam_ice_cfg )      ! Namelist namdia in configuration namelist : Parameters for ice 
    184182      READ  ( numnam_ice_cfg, namdia, IOSTAT = ios, ERR = 902 ) 
    185183902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdia in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/ICE/icedyn.F90

    r11949 r11960  
    225225      !!------------------------------------------------------------------- 
    226226      ! 
    227       REWIND( numnam_ice_ref )         ! Namelist namdyn in reference namelist : Ice dynamics 
    228227      READ  ( numnam_ice_ref, namdyn, IOSTAT = ios, ERR = 901) 
    229228901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn in reference namelist' ) 
    230       REWIND( numnam_ice_cfg )         ! Namelist namdyn in configuration namelist : Ice dynamics 
    231229      READ  ( numnam_ice_cfg, namdyn, IOSTAT = ios, ERR = 902 ) 
    232230902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/ICE/icedyn_adv.F90

    r11536 r11960  
    131131      !!------------------------------------------------------------------- 
    132132      ! 
    133       REWIND( numnam_ice_ref )         ! Namelist namdyn_adv in reference namelist : Ice dynamics 
    134133      READ  ( numnam_ice_ref, namdyn_adv, IOSTAT = ios, ERR = 901) 
    135134901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_adv in reference namelist' ) 
    136       REWIND( numnam_ice_cfg )         ! Namelist namdyn_adv in configuration namelist : Ice dynamics 
    137135      READ  ( numnam_ice_cfg, namdyn_adv, IOSTAT = ios, ERR = 902 ) 
    138136902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_adv in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/ICE/icedyn_rdgrft.F90

    r11732 r11960  
    908908      !!------------------------------------------------------------------- 
    909909      ! 
    910       REWIND( numnam_ice_ref )              ! Namelist namicetdme in reference namelist : Ice mechanical ice redistribution 
    911910      READ  ( numnam_ice_ref, namdyn_rdgrft, IOSTAT = ios, ERR = 901) 
    912911901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_rdgrft in reference namelist' ) 
    913       REWIND( numnam_ice_cfg )              ! Namelist namdyn_rdgrft in configuration namelist : Ice mechanical ice redistribution 
    914912      READ  ( numnam_ice_cfg, namdyn_rdgrft, IOSTAT = ios, ERR = 902 ) 
    915913902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_rdgrft in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/ICE/icedyn_rhg.F90

    r11949 r11960  
    112112      !!------------------------------------------------------------------- 
    113113      ! 
    114       REWIND( numnam_ice_ref )         ! Namelist namdyn_rhg in reference namelist : Ice dynamics 
    115114      READ  ( numnam_ice_ref, namdyn_rhg, IOSTAT = ios, ERR = 901) 
    116115901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_rhg in reference namelist' ) 
    117       REWIND( numnam_ice_cfg )         ! Namelist namdyn_rhg in configuration namelist : Ice dynamics 
    118116      READ  ( numnam_ice_cfg, namdyn_rhg, IOSTAT = ios, ERR = 902 ) 
    119117902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namdyn_rhg in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/ICE/iceistate.F90

    r11949 r11960  
    475475      !!----------------------------------------------------------------------------- 
    476476      ! 
    477       REWIND( numnam_ice_ref )              ! Namelist namini in reference namelist : Ice initial state 
    478477      READ  ( numnam_ice_ref, namini, IOSTAT = ios, ERR = 901) 
    479478901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namini in reference namelist' ) 
    480       REWIND( numnam_ice_cfg )              ! Namelist namini in configuration namelist : Ice initial state 
    481479      READ  ( numnam_ice_cfg, namini, IOSTAT = ios, ERR = 902 ) 
    482480902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namini in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/ICE/iceitd.F90

    r11732 r11960  
    686686      !!------------------------------------------------------------------ 
    687687      ! 
    688       REWIND( numnam_ice_ref )      ! Namelist namitd in reference namelist : Parameters for ice 
    689688      READ  ( numnam_ice_ref, namitd, IOSTAT = ios, ERR = 901) 
    690689901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namitd in reference namelist' ) 
    691       REWIND( numnam_ice_cfg )      ! Namelist namitd in configuration namelist : Parameters for ice 
    692690      READ  ( numnam_ice_cfg, namitd, IOSTAT = ios, ERR = 902 ) 
    693691902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namitd in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/ICE/icesbc.F90

    r11575 r11960  
    284284      !!------------------------------------------------------------------- 
    285285      ! 
    286       REWIND( numnam_ice_ref )         ! Namelist namsbc in reference namelist : Ice dynamics 
    287286      READ  ( numnam_ice_ref, namsbc, IOSTAT = ios, ERR = 901) 
    288287901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc in reference namelist' ) 
    289       REWIND( numnam_ice_cfg )         ! Namelist namsbc in configuration namelist : Ice dynamics 
    290288      READ  ( numnam_ice_cfg, namsbc, IOSTAT = ios, ERR = 902 ) 
    291289902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/ICE/icestp.F90

    r11949 r11960  
    235235      IF(lwp) WRITE(numout,*) '~~~~~~~~' 
    236236      ! 
    237       !                                ! Open the reference and configuration namelist files and namelist output file 
    238       CALL ctl_opn( numnam_ice_ref, 'namelist_ice_ref',    'OLD',     'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 
    239       CALL ctl_opn( numnam_ice_cfg, 'namelist_ice_cfg',    'OLD',     'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 
    240       IF(lwm) CALL ctl_opn( numoni, 'output.namelist.ice', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, 1 ) 
     237      !                                ! Load the reference and configuration namelist files and open namelist output file 
     238      CALL load_nml( numnam_ice_ref, 'namelist_ice_ref',    numout, lwm ) 
     239      CALL load_nml( numnam_ice_cfg, 'namelist_ice_cfg',    numout, lwm ) 
     240      IF(lwm) CALL ctl_opn( numoni , 'output.namelist.ice', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, 1 ) 
    241241      ! 
    242242      CALL par_init                ! set some ice run parameters 
     
    304304      !!------------------------------------------------------------------- 
    305305      ! 
    306       REWIND( numnam_ice_ref )      ! Namelist nampar in reference namelist : Parameters for ice 
    307306      READ  ( numnam_ice_ref, nampar, IOSTAT = ios, ERR = 901) 
    308307901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampar in reference namelist' ) 
    309       REWIND( numnam_ice_cfg )      ! Namelist nampar in configuration namelist : Parameters for ice 
    310308      READ  ( numnam_ice_cfg, nampar, IOSTAT = ios, ERR = 902 ) 
    311309902   IF( ios > 0 )   CALL ctl_nam ( ios , 'nampar in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/ICE/icethd.F90

    r11536 r11960  
    539539      !!------------------------------------------------------------------- 
    540540      ! 
    541       REWIND( numnam_ice_ref )              ! Namelist namthd in reference namelist : Ice thermodynamics 
    542541      READ  ( numnam_ice_ref, namthd, IOSTAT = ios, ERR = 901) 
    543542901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namthd in reference namelist' ) 
    544       REWIND( numnam_ice_cfg )              ! Namelist namthd in configuration namelist : Ice thermodynamics 
    545543      READ  ( numnam_ice_cfg, namthd, IOSTAT = ios, ERR = 902 ) 
    546544902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namthd in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/ICE/icethd_da.F90

    r11536 r11960  
    177177      !!------------------------------------------------------------------- 
    178178      ! 
    179       REWIND( numnam_ice_ref )              ! Namelist namthd_da in reference namelist : Ice thermodynamics 
    180179      READ  ( numnam_ice_ref, namthd_da, IOSTAT = ios, ERR = 901) 
    181180901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namthd_da in reference namelist' ) 
    182       REWIND( numnam_ice_cfg )              ! Namelist namthd_da in configuration namelist : Ice thermodynamics 
    183181      READ  ( numnam_ice_cfg, namthd_da, IOSTAT = ios, ERR = 902 ) 
    184182902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namthd_da in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/ICE/icethd_do.F90

    r11536 r11960  
    443443      !!------------------------------------------------------------------- 
    444444      ! 
    445       REWIND( numnam_ice_ref )              ! Namelist namthd_do in reference namelist : Ice thermodynamics 
    446445      READ  ( numnam_ice_ref, namthd_do, IOSTAT = ios, ERR = 901) 
    447446901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namthd_do in reference namelist' ) 
    448       REWIND( numnam_ice_cfg )              ! Namelist namthd_do in configuration namelist : Ice thermodynamics 
    449447      READ  ( numnam_ice_cfg, namthd_do, IOSTAT = ios, ERR = 902 ) 
    450448902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namthd_do in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/ICE/icethd_pnd.F90

    r11536 r11960  
    208208      !!------------------------------------------------------------------- 
    209209      ! 
    210       REWIND( numnam_ice_ref )              ! Namelist namthd_pnd  in reference namelist : Melt Ponds   
    211210      READ  ( numnam_ice_ref, namthd_pnd, IOSTAT = ios, ERR = 901) 
    212211901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namthd_pnd  in reference namelist' ) 
    213       REWIND( numnam_ice_cfg )              ! Namelist namthd_pnd  in configuration namelist : Melt Ponds 
    214212      READ  ( numnam_ice_cfg, namthd_pnd, IOSTAT = ios, ERR = 902 ) 
    215213902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namthd_pnd in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/ICE/icethd_sal.F90

    r11536 r11960  
    132132      !!------------------------------------------------------------------- 
    133133      ! 
    134       REWIND( numnam_ice_ref )              ! Namelist namthd_sal in reference namelist : Ice salinity 
    135134      READ  ( numnam_ice_ref, namthd_sal, IOSTAT = ios, ERR = 901) 
    136135901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namthd_sal in reference namelist' ) 
    137       REWIND( numnam_ice_cfg )              ! Namelist namthd_sal in configuration namelist : Ice salinity 
    138136      READ  ( numnam_ice_cfg, namthd_sal, IOSTAT = ios, ERR = 902 ) 
    139137902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namthd_sal in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/ICE/icethd_zdf.F90

    r11536 r11960  
    8888      !!------------------------------------------------------------------- 
    8989      ! 
    90       REWIND( numnam_ice_ref )              ! Namelist namthd_zdf in reference namelist : Ice thermodynamics 
    9190      READ  ( numnam_ice_ref, namthd_zdf, IOSTAT = ios, ERR = 901) 
    9291901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namthd_zdf in reference namelist' ) 
    93       REWIND( numnam_ice_cfg )              ! Namelist namthd_zdf in configuration namelist : Ice thermodynamics 
    9492      READ  ( numnam_ice_cfg, namthd_zdf, IOSTAT = ios, ERR = 902 ) 
    9593902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namthd_zdf in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/NST/agrif_user.F90

    r11949 r11960  
    709709      !!-------------------------------------------------------------------------------------- 
    710710   ! 
    711    REWIND( numnam_ref )              ! Namelist namagrif in reference namelist : AGRIF zoom 
    712711   READ  ( numnam_ref, namagrif, IOSTAT = ios, ERR = 901) 
    713712901 IF( ios /= 0 )   CALL ctl_nam ( ios , 'namagrif in reference namelist' ) 
    714    REWIND( numnam_cfg )              ! Namelist namagrif in configuration namelist : AGRIF zoom 
    715713   READ  ( numnam_cfg, namagrif, IOSTAT = ios, ERR = 902 ) 
    716714902 IF( ios >  0 )   CALL ctl_nam ( ios , 'namagrif in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/ASM/asminc.F90

    r11949 r11960  
    147147      ln_temnofreeze = .FALSE. 
    148148 
    149       REWIND( numnam_ref )              ! Namelist nam_asminc in reference namelist : Assimilation increment 
    150149      READ  ( numnam_ref, nam_asminc, IOSTAT = ios, ERR = 901) 
    151150901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_asminc in reference namelist' ) 
    152       REWIND( numnam_cfg )              ! Namelist nam_asminc in configuration namelist : Assimilation increment 
    153151      READ  ( numnam_cfg, nam_asminc, IOSTAT = ios, ERR = 902 ) 
    154152902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nam_asminc in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/BDY/bdydta.F90

    r11949 r11960  
    373373      INTEGER ::   ierror, ios     !  
    374374      ! 
     375      INTEGER ::   nbdy_rdstart, nbdy_loc 
     376      CHARACTER(LEN=50)                      ::   cerrmsg       ! error string 
    375377      CHARACTER(len=3)                       ::   cl3           !  
    376378      CHARACTER(len=100)                     ::   cn_dir        ! Root directory for location of data files 
     
    415417      ! Read namelists 
    416418      ! -------------- 
    417       REWIND(numnam_cfg) 
     419      nbdy_rdstart = 1 
    418420      DO jbdy = 1, nb_bdy 
    419421 
     
    421423         WRITE(ctmp2, '(a,i2)') 'block nambdy_dta number ', jbdy 
    422424 
    423          ! There is only one nambdy_dta block in namelist_ref -> use it for each bdy so we do a rewind  
    424          REWIND(numnam_ref) 
     425         ! There is only one nambdy_dta block in namelist_ref -> use it for each bdy so we read from the beginning 
    425426         READ  ( numnam_ref, nambdy_dta, IOSTAT = ios, ERR = 901) 
    426427901      IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy_dta in reference namelist' ) 
     
    431432            & .OR. ( dta_bdy(jbdy)%lneed_tra   .AND.       nn_tra_dta(jbdy)    == 1 )   & 
    432433            & .OR. ( dta_bdy(jbdy)%lneed_ice   .AND.       nn_ice_dta(jbdy)    == 1 )   )   THEN 
    433             ! WARNING: we don't do a rewind here, each bdy reads its own nambdy_dta block one after another 
    434             READ  ( numnam_cfg, nambdy_dta, IOSTAT = ios, ERR = 902 ) 
     434            ! 
     435            ! Need to support possibility of reading more than one 
     436            ! nambdy_dta from the namelist_cfg internal file. 
     437            ! Do this by finding the jbdy'th occurence of nambdy_dta in the 
     438            ! character buffer as the starting point. 
     439            ! 
     440            nbdy_loc = INDEX( numnam_cfg( nbdy_rdstart: ), 'nambdy_dta' ) 
     441            IF( nbdy_loc .GT. 0 ) THEN 
     442               nbdy_rdstart = nbdy_rdstart + nbdy_loc 
     443            ELSE 
     444               WRITE(cerrmsg,'(A,I4,A)') 'Error: entry number ',jbdy,' of nambdy_dta not found' 
     445               ios = -1 
     446               CALL ctl_nam ( ios , cerrmsg ) 
     447            ENDIF 
     448            READ  ( numnam_cfg( MAX( 1, nbdy_rdstart - 2 ): ), nambdy_dta, IOSTAT = ios, ERR = 902) 
    435449902         IF( ios >  0 )   CALL ctl_nam ( ios , 'nambdy_dta in configuration namelist' ) 
    436450            IF(lwm) WRITE( numond, nambdy_dta )            
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/BDY/bdyini.F90

    r11536 r11960  
    7575      ! Read namelist parameters 
    7676      ! ------------------------ 
    77       REWIND( numnam_ref )              ! Namelist nambdy in reference namelist :Unstructured open boundaries 
    7877      READ  ( numnam_ref, nambdy, IOSTAT = ios, ERR = 901) 
    7978901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy in reference namelist' ) 
     
    9392      cn_ice         (2:jp_bdy) = cn_ice         (1) 
    9493      nn_ice_dta     (2:jp_bdy) = nn_ice_dta     (1) 
    95       REWIND( numnam_cfg )              ! Namelist nambdy in configuration namelist :Unstructured open boundaries 
    9694      READ  ( numnam_cfg, nambdy, IOSTAT = ios, ERR = 902 ) 
    9795902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambdy in configuration namelist' ) 
     
    364362      ! ------------------------------------------------- 
    365363 
    366       REWIND( numnam_cfg )      
    367364      nblendta(:,:) = 0 
    368365      nbdysege = 0 
     
    10791076      INTEGER          ::   ios                 ! Local integer output status for namelist read 
    10801077      INTEGER          ::   nbdyind, nbdybeg, nbdyend 
     1078      INTEGER          ::   nbdy_count, nbdy_rdstart, nbdy_loc 
    10811079      CHARACTER(LEN=1) ::   ctypebdy   !     -        -  
     1080      CHARACTER(LEN=50)::   cerrmsg    !     -        -  
    10821081      NAMELIST/nambdy_index/ ctypebdy, nbdyind, nbdybeg, nbdyend 
    10831082      !!---------------------------------------------------------------------- 
    1084  
    1085       ! No REWIND here because may need to read more than one nambdy_index namelist. 
    1086       ! Read only namelist_cfg to avoid unseccessfull overwrite  
    1087       ! keep full control of the configuration namelist 
    1088       READ  ( numnam_cfg, nambdy_index, IOSTAT = ios, ERR = 904 ) 
     1083      ! Need to support possibility of reading more than one nambdy_index from 
     1084      ! the namelist_cfg internal file. 
     1085      ! Do this by finding the kb_bdy'th occurence of nambdy_index in the 
     1086      ! character buffer as the starting point. 
     1087      nbdy_rdstart = 1 
     1088      DO nbdy_count = 1, kb_bdy 
     1089       nbdy_loc = INDEX( numnam_cfg( nbdy_rdstart: ), 'nambdy_index' ) 
     1090       IF( nbdy_loc .GT. 0 ) THEN 
     1091          nbdy_rdstart = nbdy_rdstart + nbdy_loc 
     1092       ELSE 
     1093          WRITE(cerrmsg,'(A,I4,A)') 'Error: entry number ',kb_bdy,' of nambdy_index not found' 
     1094          ios = -1 
     1095          CALL ctl_nam ( ios , cerrmsg ) 
     1096       ENDIF 
     1097      END DO 
     1098      nbdy_rdstart = MAX( 1, nbdy_rdstart - 2 ) 
     1099      READ  ( numnam_cfg( nbdy_rdstart: ), nambdy_index, IOSTAT = ios, ERR = 904) 
    10891100904   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy_index in configuration namelist' ) 
    10901101      IF(lwm) WRITE ( numond, nambdy_index ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/BDY/bdytides.F90

    r11536 r11960  
    7171      INTEGER, DIMENSION(3)                     ::   ilen0       !: length of boundary data (from OBC arrays) 
    7272      INTEGER                                   ::   ios                 ! Local integer output status for namelist read 
     73      INTEGER                                   ::   nbdy_rdstart, nbdy_loc 
     74      CHARACTER(LEN=50)                         ::   cerrmsg             !: error string 
    7375      CHARACTER(len=80)                         ::   clfile              !: full file name for tidal input file  
    7476      REAL(wp),ALLOCATABLE, DIMENSION(:,:,:)    ::   dta_read            !: work space to read in tidal harmonics data 
     
    8486      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 
    8587 
    86       REWIND(numnam_cfg) 
    87  
     88 
     89      nbdy_rdstart = 1 
    8890      DO ib_bdy = 1, nb_bdy 
    8991         IF( nn_dyn2d_dta(ib_bdy) >= 2 ) THEN 
     
    9496            filtide(:) = '' 
    9597 
    96             REWIND( numnam_ref ) 
    9798            READ  ( numnam_ref, nambdy_tide, IOSTAT = ios, ERR = 901) 
    9899901         IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy_tide in reference namelist' ) 
    99             ! Don't REWIND here - may need to read more than one of these namelists.  
    100             READ  ( numnam_cfg, nambdy_tide, IOSTAT = ios, ERR = 902 ) 
     100            ! 
     101            ! Need to support possibility of reading more than one 
     102            ! nambdy_tide from the namelist_cfg internal file. 
     103            ! Do this by finding the ib_bdy'th occurence of nambdy_tide in the 
     104            ! character buffer as the starting point. 
     105            ! 
     106            nbdy_loc = INDEX( numnam_cfg( nbdy_rdstart: ), 'nambdy_tide' ) 
     107            IF( nbdy_loc .GT. 0 ) THEN 
     108               nbdy_rdstart = nbdy_rdstart + nbdy_loc 
     109            ELSE 
     110               WRITE(cerrmsg,'(A,I4,A)') 'Error: entry number ',ib_bdy,' of nambdy_tide not found' 
     111               ios = -1 
     112               CALL ctl_nam ( ios , cerrmsg ) 
     113            ENDIF 
     114            READ  ( numnam_cfg( MAX( 1, nbdy_rdstart - 2 ): ), nambdy_tide, IOSTAT = ios, ERR = 902) 
    101115902         IF( ios >  0 )   CALL ctl_nam ( ios , 'nambdy_tide in configuration namelist' ) 
    102116            IF(lwm) WRITE ( numond, nambdy_tide ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/C1D/c1d.F90

    r11536 r11960  
    5050      !!---------------------------------------------------------------------- 
    5151      ! 
    52       REWIND( numnam_ref )              ! Namelist namc1d in reference namelist : Tracer advection scheme 
    5352      READ  ( numnam_ref, namc1d, IOSTAT = ios, ERR = 901) 
    5453901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc1d in reference namelist' ) 
    5554      ! 
    56       REWIND( numnam_cfg )              ! Namelist namtra_adv in configuration namelist : Tracer advection scheme 
    5755      READ  ( numnam_cfg, namc1d, IOSTAT = ios, ERR = 902 ) 
    5856902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namc1d in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/C1D/dtauvd.F90

    r11949 r11960  
    6060      ierr0 = 0   ;   ierr1 = 0   ;   ierr2 = 0  ;   ierr3 = 0 
    6161 
    62       REWIND( numnam_ref )              ! Namelist namc1d_uvd in reference namelist :  
    6362      READ  ( numnam_ref, namc1d_uvd, IOSTAT = ios, ERR = 901) 
    6463901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc1d_uvd in reference namelist' ) 
    6564      ! 
    66       REWIND( numnam_cfg )              ! Namelist namc1d_uvd in configuration namelist : Parameters of the run 
    6765      READ  ( numnam_cfg, namc1d_uvd, IOSTAT = ios, ERR = 902 ) 
    6866902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namc1d_uvd in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/C1D/dyndmp.F90

    r11949 r11960  
    7979      !!---------------------------------------------------------------------- 
    8080      ! 
    81       REWIND( numnam_ref )              ! Namelist namc1d_dyndmp in reference namelist :  
    8281      READ  ( numnam_ref, namc1d_dyndmp, IOSTAT = ios, ERR = 901) 
    8382901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc1d_dyndmp in reference namelist' ) 
    84       REWIND( numnam_cfg )              ! Namelist namc1d_dyndmp in configuration namelist : Parameters of the run 
    8583      READ  ( numnam_cfg, namc1d_dyndmp, IOSTAT = ios, ERR = 902 ) 
    8684902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namc1d_dyndmp in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/CRS/crsini.F90

    r11949 r11960  
    8282     !--------------------------------------------------------- 
    8383     ! 
    84       REWIND( numnam_ref )              ! Namelist namrun in reference namelist : Parameters of the run 
    8584      READ  ( numnam_ref, namcrs, IOSTAT = ios, ERR = 901) 
    8685901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcrs in reference namelist' ) 
    87       REWIND( numnam_cfg )              ! Namelist namrun in configuration namelist : Parameters of the run 
    8886      READ  ( numnam_cfg, namcrs, IOSTAT = ios, ERR = 902 ) 
    8987902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcrs in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DIA/dia25h.F90

    r11949 r11960  
    5555      !!---------------------------------------------------------------------- 
    5656      ! 
    57       REWIND ( numnam_ref )              ! Read Namelist nam_dia25h in reference namelist : 25hour mean diagnostics 
    5857      READ   ( numnam_ref, nam_dia25h, IOSTAT=ios, ERR= 901 ) 
    5958901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_dia25h in reference namelist' ) 
    60       REWIND( numnam_cfg )              ! Namelist nam_dia25h in configuration namelist  25hour diagnostics 
    6159      READ  ( numnam_cfg, nam_dia25h, IOSTAT = ios, ERR = 902 ) 
    6260902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nam_dia25h in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DIA/diadct.F90

    r11949 r11960  
    123123      !!--------------------------------------------------------------------- 
    124124 
    125      REWIND( numnam_ref )              ! Namelist nam_diadct in reference namelist : Diagnostic: transport through sections 
    126125     READ  ( numnam_ref, nam_diadct, IOSTAT = ios, ERR = 901) 
    127126901  IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diadct in reference namelist' ) 
    128127 
    129      REWIND( numnam_cfg )              ! Namelist nam_diadct in configuration namelist : Diagnostic: transport through sections 
    130128     READ  ( numnam_cfg, nam_diadct, IOSTAT = ios, ERR = 902 ) 
    131129902  IF( ios >  0 ) CALL ctl_nam ( ios , 'nam_diadct in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DIA/diaharm.F90

    r11949 r11960  
    7979      ENDIF 
    8080      ! 
    81       REWIND( numnam_ref )              ! Namelist nam_diaharm in reference namelist : Tidal harmonic analysis 
    8281      READ  ( numnam_ref, nam_diaharm, IOSTAT = ios, ERR = 901) 
    8382901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_diaharm in reference namelist' ) 
    84       REWIND( numnam_cfg )              ! Namelist nam_diaharm in configuration namelist : Tidal harmonic analysis 
    8583      READ  ( numnam_cfg, nam_diaharm, IOSTAT = ios, ERR = 902 ) 
    8684902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nam_diaharm in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DIA/diahsb.F90

    r11949 r11960  
    364364         WRITE(numout,*) '~~~~~~~~~~~~ ' 
    365365      ENDIF 
    366       REWIND( numnam_ref )              ! Namelist namhsb in reference namelist 
    367366      READ  ( numnam_ref, namhsb, IOSTAT = ios, ERR = 901) 
    368367901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namhsb in reference namelist' ) 
    369       REWIND( numnam_cfg )              ! Namelist namhsb in configuration namelist 
    370368      READ  ( numnam_cfg, namhsb, IOSTAT = ios, ERR = 902 ) 
    371369902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namhsb in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DIA/diaptr.F90

    r11949 r11960  
    392392      !!---------------------------------------------------------------------- 
    393393 
    394       REWIND( numnam_ref )              ! Namelist namptr in reference namelist : Poleward transport 
    395394      READ  ( numnam_ref, namptr, IOSTAT = ios, ERR = 901) 
    396395901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namptr in reference namelist' ) 
    397396 
    398       REWIND( numnam_cfg )              ! Namelist namptr in configuration namelist : Poleward transport 
    399397      READ  ( numnam_cfg, namptr, IOSTAT = ios, ERR = 902 ) 
    400398902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namptr in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DIA/diatmb.F90

    r11949 r11960  
    4141      !!---------------------------------------------------------------------- 
    4242      ! 
    43       REWIND( numnam_ref )              ! Read Namelist nam_diatmb in reference namelist : TMB diagnostics 
    4443      READ  ( numnam_ref, nam_diatmb, IOSTAT=ios, ERR= 901 ) 
    4544901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diatmb in reference namelist' ) 
    4645  
    47       REWIND( numnam_cfg )              ! Namelist nam_diatmb in configuration namelist  TMB diagnostics 
    4846      READ  ( numnam_cfg, nam_diatmb, IOSTAT = ios, ERR = 902 ) 
    4947902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nam_diatmb in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DIU/diu_bulk.F90

    r11949 r11960  
    5252 
    5353      ! Read the namelist 
    54       REWIND( numnam_ref ) 
    5554      READ  ( numnam_ref, namdiu, IOSTAT = ios, ERR = 901 ) 
    5655901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdiu in reference namelist' ) 
    57       REWIND( numnam_cfg ) 
    5856      READ  ( numnam_cfg, namdiu, IOSTAT = ios, ERR = 902 ) 
    5957902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdiu in configuration namelist' )       
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DOM/domain.F90

    r11949 r11960  
    308308      ! 
    309309      ! 
    310       REWIND( numnam_ref )              ! Namelist namrun in reference namelist : Parameters of the run 
    311310      READ  ( numnam_ref, namrun, IOSTAT = ios, ERR = 901) 
    312311901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namrun in reference namelist' ) 
    313       REWIND( numnam_cfg )              ! Namelist namrun in configuration namelist : Parameters of the run 
    314312      READ  ( numnam_cfg, namrun, IOSTAT = ios, ERR = 902 ) 
    315313902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namrun in configuration namelist' ) 
     
    406404#endif 
    407405 
    408       REWIND( numnam_ref )              ! Namelist namdom in reference namelist : space & time domain (bathymetry, mesh, timestep) 
    409406      READ  ( numnam_ref, namdom, IOSTAT = ios, ERR = 903) 
    410407903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdom in reference namelist' ) 
    411       REWIND( numnam_cfg )              ! Namelist namdom in configuration namelist : space & time domain (bathymetry, mesh, timestep) 
    412408      READ  ( numnam_cfg, namdom, IOSTAT = ios, ERR = 904 ) 
    413409904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdom in configuration namelist' ) 
     
    438434#if defined key_netcdf4 
    439435      !                             ! NetCDF 4 case   ("key_netcdf4" defined) 
    440       REWIND( numnam_ref )              ! Namelist namnc4 in reference namelist : NETCDF 
    441436      READ  ( numnam_ref, namnc4, IOSTAT = ios, ERR = 907) 
    442437907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namnc4 in reference namelist' ) 
    443       REWIND( numnam_cfg )              ! Namelist namnc4 in configuration namelist : NETCDF 
    444438      READ  ( numnam_cfg, namnc4, IOSTAT = ios, ERR = 908 ) 
    445439908   IF( ios >  0 )   CALL ctl_nam ( ios , 'namnc4 in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DOM/dommsk.F90

    r11536 r11960  
    103103      !!--------------------------------------------------------------------- 
    104104      ! 
    105       REWIND( numnam_ref )              ! Namelist namlbc in reference namelist : Lateral momentum boundary condition 
    106105      READ  ( numnam_ref, namlbc, IOSTAT = ios, ERR = 901 ) 
    107106901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlbc in reference namelist' ) 
    108       REWIND( numnam_cfg )              ! Namelist namlbc in configuration namelist : Lateral momentum boundary condition 
    109107      READ  ( numnam_cfg, namlbc, IOSTAT = ios, ERR = 902 ) 
    110108902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlbc in configuration namelist' ) 
     
    148146 
    149147     ! Mask corrections for bdy (read in mppini2) 
    150       REWIND( numnam_ref )              ! Namelist nambdy in reference namelist :Unstructured open boundaries 
    151148      READ  ( numnam_ref, nambdy, IOSTAT = ios, ERR = 903) 
    152149903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy in reference namelist' ) 
    153       REWIND( numnam_cfg )              ! Namelist nambdy in configuration namelist :Unstructured open boundaries 
    154150      READ  ( numnam_cfg, nambdy, IOSTAT = ios, ERR = 904 ) 
    155151904   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambdy in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DOM/domvvl.F90

    r11949 r11960  
    987987      !!----------------------------------------------------------------------  
    988988      ! 
    989       REWIND( numnam_ref )              ! Namelist nam_vvl in reference namelist :  
    990989      READ  ( numnam_ref, nam_vvl, IOSTAT = ios, ERR = 901) 
    991990901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_vvl in reference namelist' ) 
    992       REWIND( numnam_cfg )              ! Namelist nam_vvl in configuration namelist : Parameters of the run 
    993991      READ  ( numnam_cfg, nam_vvl, IOSTAT = ios, ERR = 902 ) 
    994992902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nam_vvl in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DOM/dtatsd.F90

    r11536 r11960  
    6565      ierr0 = 0  ;  ierr1 = 0  ;  ierr2 = 0  ;  ierr3 = 0 
    6666      ! 
    67       REWIND( numnam_ref )              ! Namelist namtsd in reference namelist :  
    6867      READ  ( numnam_ref, namtsd, IOSTAT = ios, ERR = 901) 
    6968901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtsd in reference namelist' ) 
    70       REWIND( numnam_cfg )              ! Namelist namtsd in configuration namelist : Parameters of the run 
    7169      READ  ( numnam_cfg, namtsd, IOSTAT = ios, ERR = 902 ) 
    7270902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtsd in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DOM/iscplini.F90

    r11536 r11960  
    6262      nn_fiscpl = 0 
    6363      ln_hsb    = .FALSE. 
    64       REWIND( numnam_ref )              ! Namelist namsbc_iscpl in reference namelist : Ice sheet coupling 
    6564      READ  ( numnam_ref, namsbc_iscpl, IOSTAT = ios, ERR = 901) 
    6665901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_iscpl in reference namelist' ) 
    67       REWIND( numnam_cfg )              ! Namelist namsbc_iscpl in configuration namelist : Ice Sheet coupling 
    6866      READ  ( numnam_cfg, namsbc_iscpl, IOSTAT = ios, ERR = 902 ) 
    6967902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_iscpl in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DYN/dynadv.F90

    r11949 r11960  
    106106      ENDIF 
    107107      ! 
    108       REWIND( numnam_ref )              ! Namelist namdyn_adv in reference namelist : Momentum advection scheme 
    109108      READ  ( numnam_ref, namdyn_adv, IOSTAT = ios, ERR = 901) 
    110109901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_adv in reference namelist' ) 
    111       REWIND( numnam_cfg )              ! Namelist namdyn_adv in configuration namelist : Momentum advection scheme 
    112110      READ  ( numnam_cfg, namdyn_adv, IOSTAT = ios, ERR = 902 ) 
    113111902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_adv in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DYN/dynhpg.F90

    r11949 r11960  
    155155      !!---------------------------------------------------------------------- 
    156156      ! 
    157       REWIND( numnam_ref )              ! Namelist namdyn_hpg in reference namelist : Hydrostatic pressure gradient 
    158157      READ  ( numnam_ref, namdyn_hpg, IOSTAT = ios, ERR = 901) 
    159158901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_hpg in reference namelist' ) 
    160159      ! 
    161       REWIND( numnam_cfg )              ! Namelist namdyn_hpg in configuration namelist : Hydrostatic pressure gradient 
    162160      READ  ( numnam_cfg, namdyn_hpg, IOSTAT = ios, ERR = 902 ) 
    163161902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_hpg in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DYN/dynspg.F90

    r11949 r11960  
    203203      ENDIF 
    204204      ! 
    205       REWIND( numnam_ref )              ! Namelist namdyn_spg in reference namelist : Free surface 
    206205      READ  ( numnam_ref, namdyn_spg, IOSTAT = ios, ERR = 901) 
    207206901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_spg in reference namelist' ) 
    208207      ! 
    209       REWIND( numnam_cfg )              ! Namelist namdyn_spg in configuration namelist : Free surface 
    210208      READ  ( numnam_cfg, namdyn_spg, IOSTAT = ios, ERR = 902 ) 
    211209902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_spg in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DYN/dynvor.F90

    r11949 r11960  
    856856      ENDIF 
    857857      ! 
    858       REWIND( numnam_ref )              ! Namelist namdyn_vor in reference namelist : Vorticity scheme options 
    859858      READ  ( numnam_ref, namdyn_vor, IOSTAT = ios, ERR = 901) 
    860859901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_vor in reference namelist' ) 
    861       REWIND( numnam_cfg )              ! Namelist namdyn_vor in configuration namelist : Vorticity scheme options 
    862860      READ  ( numnam_cfg, namdyn_vor, IOSTAT = ios, ERR = 902 ) 
    863861902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_vor in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DYN/wet_dry.F90

    r11949 r11960  
    7979      !!---------------------------------------------------------------------- 
    8080      ! 
    81       REWIND( numnam_ref )              ! Namelist namwad in reference namelist : Parameters for Wetting/Drying 
    8281      READ  ( numnam_ref, namwad, IOSTAT = ios, ERR = 905) 
    8382905   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namwad in reference namelist' )  
    84       REWIND( numnam_cfg )              ! Namelist namwad in configuration namelist : Parameters for Wetting/Drying 
    8583      READ  ( numnam_cfg, namwad, IOSTAT = ios, ERR = 906) 
    8684906   IF( ios >  0 )   CALL ctl_nam ( ios , 'namwad in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/FLO/floats.F90

    r11949 r11960  
    8989      IF(lwp) WRITE(numout,*) '~~~~~~~' 
    9090 
    91       REWIND( numnam_ref )              ! Namelist namflo in reference namelist : Floats 
    9291      READ  ( numnam_ref, namflo, IOSTAT = ios, ERR = 901) 
    9392901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namflo in reference namelist' ) 
    9493 
    95       REWIND( numnam_cfg )              ! Namelist namflo in configuration namelist : Floats 
    9694      READ  ( numnam_cfg, namflo, IOSTAT = ios, ERR = 902 ) 
    9795902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namflo in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/ICB/icbini.F90

    r11536 r11960  
    404404#endif    
    405405      !                             !==  read namelist  ==! 
    406       REWIND( numnam_ref )              ! Namelist namberg in reference namelist : Iceberg parameters 
    407406      READ  ( numnam_ref, namberg, IOSTAT = ios, ERR = 901) 
    408407901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namberg in reference namelist' ) 
    409       REWIND( numnam_cfg )              ! Namelist namberg in configuration namelist : Iceberg parameters 
    410408      READ  ( numnam_cfg, namberg, IOSTAT = ios, ERR = 902 ) 
    411409902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namberg in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/IOM/in_out_manager.F90

    r11536 r11960  
    139139   INTEGER ::   numnul          =   -1      !: logical unit for /dev/null 
    140140      !                                     !  early output can be collected; do not change 
    141    INTEGER ::   numnam_ref      =   -1      !: logical unit for reference namelist 
    142    INTEGER ::   numnam_cfg      =   -1      !: logical unit for configuration specific namelist 
    143141   INTEGER ::   numond          =   -1      !: logical unit for Output Namelist Dynamics 
    144    INTEGER ::   numnam_ice_ref  =   -1      !: logical unit for ice reference namelist 
    145    INTEGER ::   numnam_ice_cfg  =   -1      !: logical unit for ice reference namelist 
    146142   INTEGER ::   numoni          =   -1      !: logical unit for Output Namelist Ice 
    147143   INTEGER ::   numevo_ice      =   -1      !: logical unit for ice variables (temp. evolution) 
    148144   INTEGER ::   numrun          =   -1      !: logical unit for run statistics 
    149145   INTEGER ::   numdct_in       =   -1      !: logical unit for transports computing 
    150    INTEGER ::   numdct_vol      =   -1      !: logical unit for voulume transports output 
    151    INTEGER ::   numdct_heat     =   -1      !: logical unit for heat    transports output 
    152    INTEGER ::   numdct_salt     =   -1      !: logical unit for salt    transports output 
     146   INTEGER ::   numdct_vol      =   -1      !: logical unit for volume transports output 
     147   INTEGER ::   numdct_heat     =   -1      !: logical unit for heat   transports output 
     148   INTEGER ::   numdct_salt     =   -1      !: logical unit for salt   transports output 
    153149   INTEGER ::   numfl           =   -1      !: logical unit for floats ascii output 
    154150   INTEGER ::   numflo          =   -1      !: logical unit for floats ascii output 
     151      ! 
     152   CHARACTER(LEN=:), ALLOCATABLE :: numnam_ref      !: character buffer for reference namelist 
     153   CHARACTER(LEN=:), ALLOCATABLE :: numnam_cfg      !: character buffer for configuration specific namelist 
     154   CHARACTER(LEN=:), ALLOCATABLE :: numnam_ice_ref  !: character buffer for ice reference namelist 
     155   CHARACTER(LEN=:), ALLOCATABLE :: numnam_ice_cfg  !: character buffer for ice configuration specific namelist 
    155156 
    156157   !!---------------------------------------------------------------------- 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/LBC/lib_mpp.F90

    r11949 r11960  
    3232   !!   ctl_opn       : Open file and check if required file is available. 
    3333   !!   ctl_nam       : Prints informations when an error occurs while reading a namelist 
     34   !!   load_nml      : Read, condense and buffer namelist file into character array for use as an internal file 
    3435   !!---------------------------------------------------------------------- 
    3536   !!---------------------------------------------------------------------- 
     
    5051   !!   mpp_ini_north : initialisation of north fold 
    5152   !!   mpp_lbc_north_icb : alternative to mpp_nfd for extra outer halo with icebergs 
     53   !!   mpp_bcast_nml : broadcast/receive namelist character buffer from reading process to all others 
    5254   !!---------------------------------------------------------------------- 
    5355   USE dom_oce        ! ocean space and time domain 
     
    5759   PRIVATE 
    5860   ! 
    59    PUBLIC   ctl_stop, ctl_warn, ctl_opn, ctl_nam 
     61   PUBLIC   ctl_stop, ctl_warn, ctl_opn, ctl_nam, load_nml 
    6062   PUBLIC   mpp_start, mppstop, mppsync, mpp_comm_free 
    6163   PUBLIC   mpp_ini_north 
     
    6668   PUBLIC   mppsend, mpprecv                          ! needed by TAM and ICB routines 
    6769   PUBLIC   mpp_report 
     70   PUBLIC   mpp_bcast_nml 
    6871   PUBLIC   tic_tac 
    6972#if ! defined key_mpp_mpi 
     
    498501#endif 
    499502   END SUBROUTINE mpp_delay_rcv 
     503 
     504   SUBROUTINE mpp_bcast_nml( cdnambuff , kleng ) 
     505      CHARACTER(LEN=:)    , ALLOCATABLE, INTENT(INOUT) :: cdnambuff 
     506      INTEGER                          , INTENT(INOUT) :: kleng 
     507      !!---------------------------------------------------------------------- 
     508      !!                  ***  routine mpp_bcast_nml  *** 
     509      !! 
     510      !! ** Purpose :   broadcast namelist character buffer 
     511      !! 
     512      !!---------------------------------------------------------------------- 
     513      !! 
     514      INTEGER ::   iflag 
     515      !!---------------------------------------------------------------------- 
     516      ! 
     517#if defined key_mpp_mpi 
     518      call MPI_BCAST(kleng, 1, MPI_INT, 0, mpi_comm_oce, iflag) 
     519      call MPI_BARRIER(mpi_comm_oce, iflag) 
     520!$AGRIF_DO_NOT_TREAT 
     521      IF ( .NOT. ALLOCATED(cdnambuff) ) ALLOCATE( CHARACTER(LEN=kleng) :: cdnambuff ) 
     522!$AGRIF_END_DO_NOT_TREAT 
     523      call MPI_BCAST(cdnambuff, kleng, MPI_CHARACTER, 0, mpi_comm_oce, iflag) 
     524      call MPI_BARRIER(mpi_comm_oce, iflag) 
     525#endif 
     526      ! 
     527   END SUBROUTINE mpp_bcast_nml 
    500528 
    501529    
     
    10661094 
    10671095   !!---------------------------------------------------------------------- 
    1068    !!   ctl_stop, ctl_warn, get_unit, ctl_opn, ctl_nam   routines 
     1096   !!   ctl_stop, ctl_warn, get_unit, ctl_opn, ctl_nam, load_nml   routines 
    10691097   !!---------------------------------------------------------------------- 
    10701098 
     
    12771305   END FUNCTION get_unit 
    12781306 
     1307   SUBROUTINE load_nml( cdnambuff , cdnamfile, kout, ldwp) 
     1308      CHARACTER(LEN=:)    , ALLOCATABLE, INTENT(INOUT) :: cdnambuff 
     1309      CHARACTER(LEN=*), INTENT(IN )                :: cdnamfile 
     1310      CHARACTER(LEN=256)                           :: chline 
     1311      INTEGER, INTENT(IN)                          :: kout 
     1312      LOGICAL, INTENT(IN)                          :: ldwp  !: .true. only for the root broadcaster 
     1313      INTEGER                                      :: itot, iun, iltc, inl, ios, itotsav 
     1314      ! 
     1315      ! Check if the namelist buffer has already been allocated. Return if it has. 
     1316      ! 
     1317      IF ( ALLOCATED( cdnambuff ) ) RETURN 
     1318      IF( ldwp ) THEN 
     1319         ! 
     1320         ! Open namelist file 
     1321         ! 
     1322         CALL ctl_opn( iun, cdnamfile, 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, kout, ldwp ) 
     1323         ! 
     1324         ! First pass: count characters excluding comments and trimable white space 
     1325         ! 
     1326         itot=0 
     1327     10  READ(iun,'(A256)',END=20,ERR=20) chline 
     1328         iltc = LEN_TRIM(chline) 
     1329         IF ( iltc.GT.0 ) THEN 
     1330          inl = INDEX(chline, '!')  
     1331          IF( inl.eq.0 ) THEN 
     1332           itot = itot + iltc + 1                                ! +1 for the newline character 
     1333          ELSEIF( inl.GT.0 .AND. LEN_TRIM( chline(1:inl-1) ).GT.0 ) THEN 
     1334           itot = itot + inl                                  !  includes +1 for the newline character 
     1335          ENDIF 
     1336         ENDIF 
     1337         GOTO 10 
     1338     20  CONTINUE 
     1339         ! 
     1340         ! Allocate text cdnambuff for condensed namelist 
     1341         ! 
     1342!$AGRIF_DO_NOT_TREAT 
     1343         ALLOCATE( CHARACTER(LEN=itot) :: cdnambuff ) 
     1344!$AGRIF_END_DO_NOT_TREAT 
     1345         itotsav = itot 
     1346         ! 
     1347         ! Second pass: read and transfer pruned characters into cdnambuff 
     1348         ! 
     1349         REWIND(iun) 
     1350         itot=1 
     1351     30  READ(iun,'(A256)',END=40,ERR=40) chline 
     1352         iltc = LEN_TRIM(chline) 
     1353         IF ( iltc.GT.0 ) THEN 
     1354          inl = INDEX(chline, '!') 
     1355          IF( inl.eq.0 ) THEN 
     1356           inl = iltc 
     1357          ELSE 
     1358           inl = inl - 1 
     1359          ENDIF 
     1360          IF( inl.GT.0 .AND. LEN_TRIM( chline(1:inl) ).GT.0 ) THEN 
     1361             cdnambuff(itot:itot+inl-1) = chline(1:inl) 
     1362             WRITE( cdnambuff(itot+inl:itot+inl), '(a)' ) NEW_LINE('A') 
     1363             itot = itot + inl + 1 
     1364          ENDIF 
     1365         ENDIF 
     1366         GOTO 30 
     1367     40  CONTINUE 
     1368         itot = itot - 1 
     1369         IF( itotsav .NE. itot ) WRITE(*,*) 'WARNING in load_nml. Allocated ',itotsav,' for read buffer; but used ',itot 
     1370         ! 
     1371         ! Close namelist file 
     1372         ! 
     1373         CLOSE(iun) 
     1374         !write(*,'(32A)') cdnambuff 
     1375      ENDIF 
     1376#if defined key_mpp_mpi 
     1377      CALL mpp_bcast_nml( cdnambuff, itot ) 
     1378#endif 
     1379  END SUBROUTINE load_nml 
     1380 
     1381 
    12791382   !!---------------------------------------------------------------------- 
    12801383END MODULE lib_mpp 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/LBC/mppini.F90

    r11640 r11960  
    176176      ! ----------------------------------- 
    177177      ! 
    178       REWIND( numnam_ref )              ! Namelist nammpp in reference namelist 
    179178      READ  ( numnam_ref, nammpp, IOSTAT = ios, ERR = 901 ) 
    180179901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nammpp in reference namelist' ) 
    181       REWIND( numnam_cfg )              ! Namelist nammpp in confguration namelist 
    182180      READ  ( numnam_cfg, nammpp, IOSTAT = ios, ERR = 902 ) 
    183181902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nammpp in configuration namelist' )    
     
    197195 
    198196      ! do we need to take into account bdy_msk? 
    199       REWIND( numnam_ref )              ! Namelist nambdy in reference namelist : BDY 
    200197      READ  ( numnam_ref, nambdy, IOSTAT = ios, ERR = 903) 
    201198903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy in reference namelist (mppini)' ) 
    202       REWIND( numnam_cfg )              ! Namelist nambdy in configuration namelist : BDY 
    203199      READ  ( numnam_cfg, nambdy, IOSTAT = ios, ERR = 904 ) 
    204200904   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambdy in configuration namelist (mppini)' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/LDF/ldfdyn.F90

    r11949 r11960  
    115115      !!---------------------------------------------------------------------- 
    116116      ! 
    117       REWIND( numnam_ref )              ! Namelist namdyn_ldf in reference namelist : Lateral physics 
    118117      READ  ( numnam_ref, namdyn_ldf, IOSTAT = ios, ERR = 901) 
    119118901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_ldf in reference namelist' ) 
    120119 
    121       REWIND( numnam_cfg )              ! Namelist namdyn_ldf in configuration namelist : Lateral physics 
    122120      READ  ( numnam_cfg, namdyn_ldf, IOSTAT = ios, ERR = 902 ) 
    123121902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_ldf in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/LDF/ldftra.F90

    r11949 r11960  
    152152      ! ================================= 
    153153      ! 
    154       REWIND( numnam_ref )              ! Namelist namtra_ldf in reference namelist : Lateral physics on tracers 
    155154      READ  ( numnam_ref, namtra_ldf, IOSTAT = ios, ERR = 901) 
    156155901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_ldf in reference namelist' ) 
    157       REWIND( numnam_cfg )              ! Namelist namtra_ldf in configuration namelist : Lateral physics on tracers 
    158156      READ  ( numnam_cfg, namtra_ldf, IOSTAT = ios, ERR = 902 ) 
    159157902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_ldf in configuration namelist' ) 
     
    511509      ENDIF 
    512510      ! 
    513       REWIND( numnam_ref )              ! Namelist namtra_eiv in reference namelist : eddy induced velocity param. 
    514511      READ  ( numnam_ref, namtra_eiv, IOSTAT = ios, ERR = 901) 
    515512901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_eiv in reference namelist' ) 
    516513      ! 
    517       REWIND( numnam_cfg )              ! Namelist namtra_eiv in configuration namelist : eddy induced velocity param. 
    518514      READ  ( numnam_cfg, namtra_eiv, IOSTAT = ios, ERR = 902 ) 
    519515902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_eiv in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/OBS/diaobs.F90

    r11949 r11960  
    202202 
    203203      ! Read namelist namobs : control observation diagnostics 
    204       REWIND( numnam_ref )   ! Namelist namobs in reference namelist 
    205204      READ  ( numnam_ref, namobs, IOSTAT = ios, ERR = 901) 
    206205901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namobs in reference namelist' ) 
    207       REWIND( numnam_cfg )   ! Namelist namobs in configuration namelist 
    208206      READ  ( numnam_cfg, namobs, IOSTAT = ios, ERR = 902 ) 
    209207902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namobs in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbcapr.F90

    r11536 r11960  
    6969      NAMELIST/namsbc_apr/ cn_dir, sn_apr, ln_ref_apr, rn_pref, ln_apr_obc 
    7070      !!---------------------------------------------------------------------- 
    71       REWIND( numnam_ref )              ! Namelist namsbc_apr in reference namelist : File for atmospheric pressure forcing 
    7271      READ  ( numnam_ref, namsbc_apr, IOSTAT = ios, ERR = 901) 
    7372901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_apr in reference namelist' ) 
    7473 
    75       REWIND( numnam_cfg )              ! Namelist namsbc_apr in configuration namelist : File for atmospheric pressure forcing 
    7674      READ  ( numnam_cfg, namsbc_apr, IOSTAT = ios, ERR = 902 ) 
    7775902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_apr in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbcblk.F90

    r11536 r11960  
    180180      ! 
    181181      !                             !** read bulk namelist   
    182       REWIND( numnam_ref )                !* Namelist namsbc_blk in reference namelist : bulk parameters 
    183182      READ  ( numnam_ref, namsbc_blk, IOSTAT = ios, ERR = 901) 
    184183901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_blk in reference namelist' ) 
    185184      ! 
    186       REWIND( numnam_cfg )                !* Namelist namsbc_blk in configuration namelist : bulk parameters 
    187185      READ  ( numnam_cfg, namsbc_blk, IOSTAT = ios, ERR = 902 ) 
    188186902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_blk in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbccpl.F90

    r11949 r11960  
    264264      ! ================================ ! 
    265265      ! 
    266       REWIND( numnam_ref )              ! Namelist namsbc_cpl in reference namelist : Variables for OASIS coupling 
    267266      READ  ( numnam_ref, namsbc_cpl, IOSTAT = ios, ERR = 901) 
    268267901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_cpl in reference namelist' ) 
    269268      ! 
    270       REWIND( numnam_cfg )              ! Namelist namsbc_cpl in configuration namelist : Variables for OASIS coupling 
    271269      READ  ( numnam_cfg, namsbc_cpl, IOSTAT = ios, ERR = 902 ) 
    272270902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_cpl in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbcflx.F90

    r11536 r11960  
    9191      IF( kt == nit000 ) THEN                ! First call kt=nit000   
    9292         ! set file information 
    93          REWIND( numnam_ref )              ! Namelist namsbc_flx in reference namelist : Files for fluxes 
    9493         READ  ( numnam_ref, namsbc_flx, IOSTAT = ios, ERR = 901) 
    9594901      IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_flx in reference namelist' ) 
    9695 
    97          REWIND( numnam_cfg )              ! Namelist namsbc_flx in configuration namelist : Files for fluxes 
    9896         READ  ( numnam_cfg, namsbc_flx, IOSTAT = ios, ERR = 902 ) 
    9997902      IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_flx in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbcice_cice.F90

    r11949 r11960  
    763763         sn_bot5 = FLD_N( 'botmeltn5_1m' ,    -1.    ,  'botmeltn5' ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    ) 
    764764 
    765          REWIND( numnam_ref )              ! Namelist namsbc_cice in reference namelist :  
    766765         READ  ( numnam_ref, namsbc_cice, IOSTAT = ios, ERR = 901) 
    767766901      IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_cice in reference namelist' ) 
    768767 
    769          REWIND( numnam_cfg )              ! Namelist namsbc_cice in configuration namelist : Parameters of the run 
    770768         READ  ( numnam_cfg, namsbc_cice, IOSTAT = ios, ERR = 902 ) 
    771769902      IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_cice in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbcice_if.F90

    r11949 r11960  
    7575         !                                      ! ====================== ! 
    7676         ! set file information 
    77          REWIND( numnam_ref )              ! Namelist namsbc_iif in reference namelist : Ice if file 
    7877         READ  ( numnam_ref, namsbc_iif, IOSTAT = ios, ERR = 901) 
    7978901      IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_iif in reference namelist' ) 
    8079 
    81          REWIND( numnam_cfg )              ! Namelist Namelist namsbc_iif in configuration namelist : Ice if file 
    8280         READ  ( numnam_cfg, namsbc_iif, IOSTAT = ios, ERR = 902 ) 
    8381902      IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_iif in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbcisf.F90

    r11949 r11960  
    278278      !!---------------------------------------------------------------------- 
    279279 
    280       REWIND( numnam_ref )              ! Namelist namsbc_rnf in reference namelist : Runoffs  
    281280      READ  ( numnam_ref, namsbc_isf, IOSTAT = ios, ERR = 901) 
    282281901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_isf in reference namelist' ) 
    283282 
    284       REWIND( numnam_cfg )              ! Namelist namsbc_rnf in configuration namelist : Runoffs 
    285283      READ  ( numnam_cfg, namsbc_isf, IOSTAT = ios, ERR = 902 ) 
    286284902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_isf in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbcmod.F90

    r11949 r11960  
    109109      ! 
    110110      !                       !**  read Surface Module namelist 
    111       REWIND( numnam_ref )          !* Namelist namsbc in reference namelist : Surface boundary 
    112111      READ  ( numnam_ref, namsbc, IOSTAT = ios, ERR = 901) 
    113112901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc in reference namelist' ) 
    114       REWIND( numnam_cfg )          !* Namelist namsbc in configuration namelist : Parameters of the run 
    115113      READ  ( numnam_cfg, namsbc, IOSTAT = ios, ERR = 902 ) 
    116114902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbcrnf.F90

    r11949 r11960  
    267267      !                                   ! ============ 
    268268      ! 
    269       REWIND( numnam_ref )              ! Namelist namsbc_rnf in reference namelist : Runoffs  
    270269      READ  ( numnam_ref, namsbc_rnf, IOSTAT = ios, ERR = 901) 
    271270901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_rnf in reference namelist' ) 
    272271 
    273       REWIND( numnam_cfg )              ! Namelist namsbc_rnf in configuration namelist : Runoffs 
    274272      READ  ( numnam_cfg, namsbc_rnf, IOSTAT = ios, ERR = 902 ) 
    275273902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_rnf in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbcssr.F90

    r11536 r11960  
    164164      ENDIF 
    165165      !  
    166       REWIND( numnam_ref )              ! Namelist namsbc_ssr in reference namelist :  
    167166      READ  ( numnam_ref, namsbc_ssr, IOSTAT = ios, ERR = 901) 
    168167901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_ssr in reference namelist' ) 
    169168 
    170       REWIND( numnam_cfg )              ! Namelist namsbc_ssr in configuration namelist : 
    171169      READ  ( numnam_cfg, namsbc_ssr, IOSTAT = ios, ERR = 902 ) 
    172170902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_ssr in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbcwave.F90

    r11949 r11960  
    397397      !!--------------------------------------------------------------------- 
    398398      ! 
    399       REWIND( numnam_ref )              ! Namelist namsbc_wave in reference namelist : File for drag coeff. from wave model 
    400399      READ  ( numnam_ref, namsbc_wave, IOSTAT = ios, ERR = 901) 
    401400901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_wave in reference namelist' ) 
    402401          
    403       REWIND( numnam_cfg )              ! Namelist namsbc_wave in configuration namelist : File for drag coeff. from wave model 
    404402      READ  ( numnam_cfg, namsbc_wave, IOSTAT = ios, ERR = 902 ) 
    405403902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_wave in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/tideini.F90

    r11536 r11960  
    5858      ! 
    5959      ! Read Namelist nam_tide 
    60       REWIND( numnam_ref )              ! Namelist nam_tide in reference namelist : Tides 
    6160      READ  ( numnam_ref, nam_tide, IOSTAT = ios, ERR = 901) 
    6261901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_tide in reference namelist' ) 
    6362      ! 
    64       REWIND( numnam_cfg )              ! Namelist nam_tide in configuration namelist : Tides 
    6563      READ  ( numnam_cfg, nam_tide, IOSTAT = ios, ERR = 902 ) 
    6664902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nam_tide in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/STO/stopar.F90

    r11536 r11960  
    261261 
    262262      ! Read namsto namelist : stochastic parameterization 
    263       REWIND( numnam_ref )              ! Namelist namdyn_adv in reference namelist : Momentum advection scheme 
    264263      READ  ( numnam_ref, namsto, IOSTAT = ios, ERR = 901) 
    265264901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsto in reference namelist' ) 
    266265 
    267       REWIND( numnam_cfg )              ! Namelist namdyn_adv in configuration namelist : Momentum advection scheme 
    268266      READ  ( numnam_cfg, namsto, IOSTAT = ios, ERR = 902 ) 
    269267902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namsto in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/TRA/eosbn2.F90

    r11949 r11960  
    12401240      !!---------------------------------------------------------------------- 
    12411241      ! 
    1242       REWIND( numnam_ref )              ! Namelist nameos in reference namelist : equation of state 
    12431242      READ  ( numnam_ref, nameos, IOSTAT = ios, ERR = 901 ) 
    12441243901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nameos in reference namelist' ) 
    12451244      ! 
    1246       REWIND( numnam_cfg )              ! Namelist nameos in configuration namelist : equation of state 
    12471245      READ  ( numnam_cfg, nameos, IOSTAT = ios, ERR = 902 ) 
    12481246902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nameos in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/TRA/traadv.F90

    r11949 r11960  
    196196      ! 
    197197      !                                !==  Namelist  ==! 
    198       REWIND( numnam_ref )                   ! Namelist namtra_adv in reference namelist : Tracer advection scheme 
    199198      READ  ( numnam_ref, namtra_adv, IOSTAT = ios, ERR = 901) 
    200199901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_adv in reference namelist' ) 
    201200      ! 
    202       REWIND( numnam_cfg )                   ! Namelist namtra_adv in configuration namelist : Tracer advection scheme 
    203201      READ  ( numnam_cfg, namtra_adv, IOSTAT = ios, ERR = 902 ) 
    204202902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_adv in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/TRA/trabbc.F90

    r11949 r11960  
    135135      !!---------------------------------------------------------------------- 
    136136      ! 
    137       REWIND( numnam_ref )              ! Namelist nambbc in reference namelist : Bottom momentum boundary condition 
    138137      READ  ( numnam_ref, nambbc, IOSTAT = ios, ERR = 901) 
    139138901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambbc in reference namelist' ) 
    140139      ! 
    141       REWIND( numnam_cfg )              ! Namelist nambbc in configuration namelist : Bottom momentum boundary condition 
    142140      READ  ( numnam_cfg, nambbc, IOSTAT = ios, ERR = 902 ) 
    143141902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambbc in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/TRA/trabbl.F90

    r11949 r11960  
    488488      !!---------------------------------------------------------------------- 
    489489      ! 
    490       REWIND( numnam_ref )              ! Namelist nambbl in reference namelist : Bottom boundary layer scheme 
    491490      READ  ( numnam_ref, nambbl, IOSTAT = ios, ERR = 901) 
    492491901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambbl in reference namelist' ) 
    493492      ! 
    494       REWIND( numnam_cfg )              ! Namelist nambbl in configuration namelist : Bottom boundary layer scheme 
    495493      READ  ( numnam_cfg, nambbl, IOSTAT = ios, ERR = 902 ) 
    496494902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambbl in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/TRA/tradmp.F90

    r11949 r11960  
    180180      !!---------------------------------------------------------------------- 
    181181      ! 
    182       REWIND( numnam_ref )   ! Namelist namtra_dmp in reference namelist : T & S relaxation 
    183182      READ  ( numnam_ref, namtra_dmp, IOSTAT = ios, ERR = 901) 
    184183901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_dmp in reference namelist' ) 
    185184      ! 
    186       REWIND( numnam_cfg )   ! Namelist namtra_dmp in configuration namelist : T & S relaxation 
    187185      READ  ( numnam_cfg, namtra_dmp, IOSTAT = ios, ERR = 902 ) 
    188186902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_dmp in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/TRA/tramle.F90

    r11949 r11960  
    267267      !!---------------------------------------------------------------------- 
    268268 
    269       REWIND( numnam_ref )              ! Namelist namtra_mle in reference namelist : Tracer advection scheme 
    270269      READ  ( numnam_ref, namtra_mle, IOSTAT = ios, ERR = 901) 
    271270901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_mle in reference namelist' ) 
    272271 
    273       REWIND( numnam_cfg )              ! Namelist namtra_mle in configuration namelist : Tracer advection scheme 
    274272      READ  ( numnam_cfg, namtra_mle, IOSTAT = ios, ERR = 902 ) 
    275273902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_mle in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/TRA/traqsr.F90

    r11949 r11960  
    338338      !!---------------------------------------------------------------------- 
    339339      ! 
    340       REWIND( numnam_ref )              ! Namelist namtra_qsr in reference     namelist 
    341340      READ  ( numnam_ref, namtra_qsr, IOSTAT = ios, ERR = 901) 
    342341901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_qsr in reference namelist' ) 
    343342      ! 
    344       REWIND( numnam_cfg )              ! Namelist namtra_qsr in configuration namelist 
    345343      READ  ( numnam_cfg, namtra_qsr, IOSTAT = ios, ERR = 902 ) 
    346344902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_qsr in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/TRD/trdini.F90

    r11949 r11960  
    4747      !!---------------------------------------------------------------------- 
    4848      ! 
    49       REWIND( numnam_ref )              ! Namelist namtrd in reference namelist : trends diagnostic 
    5049      READ  ( numnam_ref, namtrd, IOSTAT = ios, ERR = 901 ) 
    5150901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrd in reference namelist' ) 
    5251      ! 
    53       REWIND( numnam_cfg )              ! Namelist namtrd in configuration namelist : trends diagnostic 
    5452      READ  ( numnam_cfg, namtrd, IOSTAT = ios, ERR = 902 ) 
    5553902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrd in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/TRD/trdmxl.F90

    r11949 r11960  
    733733      !!---------------------------------------------------------------------- 
    734734      ! 
    735       REWIND( numnam_ref )              ! Namelist namtrd_mxl in reference namelist : mixed layer trends diagnostic 
    736735      READ  ( numnam_ref, namtrd_mxl, IOSTAT = ios, ERR = 901 ) 
    737736901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrd_mxl in reference namelist' ) 
    738737 
    739       REWIND( numnam_cfg )              ! Namelist namtrd_mxl in configuration namelist : mixed layer trends diagnostic 
    740738      READ  ( numnam_cfg, namtrd_mxl, IOSTAT = ios, ERR = 902 ) 
    741739902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrd_mxl in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/USR/usrdef_nam.F90

    r11536 r11960  
    5959      !!---------------------------------------------------------------------- 
    6060      ! 
    61       REWIND( numnam_cfg )          ! Namelist namusr_def (exist in namelist_cfg only) 
    6261      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 
    6362902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/ZDF/zdfdrg.F90

    r11949 r11960  
    238238      !                     !==  drag nature  ==! 
    239239      ! 
    240       REWIND( numnam_ref )                   ! Namelist namdrg in reference namelist 
    241240      READ  ( numnam_ref, namdrg, IOSTAT = ios, ERR = 901) 
    242241901   IF( ios /= 0 )   CALL ctl_nam( ios , 'namdrg in reference namelist' ) 
    243       REWIND( numnam_cfg )                   ! Namelist namdrg in configuration namelist 
    244242      READ  ( numnam_cfg, namdrg, IOSTAT = ios, ERR = 902 ) 
    245243902   IF( ios >  0 )   CALL ctl_nam( ios , 'namdrg in configuration namelist' ) 
     
    337335      !                          !==  read namlist  ==! 
    338336      ! 
    339       REWIND( numnam_ref )                   ! Namelist cl_namdrg in reference namelist 
    340337      IF(ll_top)   READ  ( numnam_ref, namdrg_top, IOSTAT = ios, ERR = 901) 
    341338      IF(ll_bot)   READ  ( numnam_ref, namdrg_bot, IOSTAT = ios, ERR = 901) 
    342339901   IF( ios /= 0 )   CALL ctl_nam( ios , TRIM(cl_namref) ) 
    343       REWIND( numnam_cfg )                   ! Namelist cd_namdrg in configuration namelist 
    344340      IF(ll_top)   READ  ( numnam_cfg, namdrg_top, IOSTAT = ios, ERR = 902 ) 
    345341      IF(ll_bot)   READ  ( numnam_cfg, namdrg_bot, IOSTAT = ios, ERR = 902 ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/ZDF/zdfgls.F90

    r11949 r11960  
    858858      !!---------------------------------------------------------- 
    859859      ! 
    860       REWIND( numnam_ref )              ! Namelist namzdf_gls in reference namelist : Vertical eddy diffivity and viscosity using gls turbulent closure scheme 
    861860      READ  ( numnam_ref, namzdf_gls, IOSTAT = ios, ERR = 901) 
    862861901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namzdf_gls in reference namelist' ) 
    863862 
    864       REWIND( numnam_cfg )              ! Namelist namzdf_gls in configuration namelist : Vertical eddy diffivity and viscosity using gls turbulent closure scheme 
    865863      READ  ( numnam_cfg, namzdf_gls, IOSTAT = ios, ERR = 902 ) 
    866864902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namzdf_gls in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/ZDF/zdfiwm.F90

    r11949 r11960  
    423423      !!---------------------------------------------------------------------- 
    424424      ! 
    425       REWIND( numnam_ref )              ! Namelist namzdf_iwm in reference namelist : Wave-driven mixing 
    426425      READ  ( numnam_ref, namzdf_iwm, IOSTAT = ios, ERR = 901) 
    427426901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namzdf_iwm in reference namelist' ) 
    428427      ! 
    429       REWIND( numnam_cfg )              ! Namelist namzdf_iwm in configuration namelist : Wave-driven mixing 
    430428      READ  ( numnam_cfg, namzdf_iwm, IOSTAT = ios, ERR = 902 ) 
    431429902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namzdf_iwm in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/ZDF/zdfosm.F90

    r11949 r11960  
    13871387     !!---------------------------------------------------------------------- 
    13881388     ! 
    1389      REWIND( numnam_ref )              ! Namelist namzdf_osm in reference namelist : Osmosis ML model 
    13901389     READ  ( numnam_ref, namzdf_osm, IOSTAT = ios, ERR = 901) 
    13911390901  IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_osm in reference namelist' ) 
    13921391 
    1393      REWIND( numnam_cfg )              ! Namelist namzdf_tke in configuration namelist : Turbulent Kinetic Energy 
    13941392     READ  ( numnam_cfg, namzdf_osm, IOSTAT = ios, ERR = 902 ) 
    13951393902  IF( ios >  0 ) CALL ctl_nam ( ios , 'namzdf_osm in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/ZDF/zdfphy.F90

    r11949 r11960  
    9393      ! 
    9494      !                           !==  Namelist  ==! 
    95       REWIND( numnam_ref )              ! Namelist namzdf in reference namelist : Vertical mixing parameters 
    9695      READ  ( numnam_ref, namzdf, IOSTAT = ios, ERR = 901) 
    9796901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namzdf in reference namelist' ) 
    9897      ! 
    99       REWIND( numnam_cfg )              ! Namelist namzdf in reference namelist : Vertical mixing parameters 
    10098      READ  ( numnam_cfg, namzdf, IOSTAT = ios, ERR = 902 ) 
    10199902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namzdf in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/ZDF/zdfric.F90

    r11949 r11960  
    7878      !!---------------------------------------------------------------------- 
    7979      ! 
    80       REWIND( numnam_ref )              ! Namelist namzdf_ric in reference namelist : Vertical diffusion Kz depends on Richardson number 
    8180      READ  ( numnam_ref, namzdf_ric, IOSTAT = ios, ERR = 901) 
    8281901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_ric in reference namelist' ) 
    8382 
    84       REWIND( numnam_cfg )              ! Namelist namzdf_ric in configuration namelist : Vertical diffusion Kz depends on Richardson number 
    8583      READ  ( numnam_cfg, namzdf_ric, IOSTAT = ios, ERR = 902 ) 
    8684902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namzdf_ric in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/ZDF/zdftke.F90

    r11949 r11960  
    656656      !!---------------------------------------------------------------------- 
    657657      ! 
    658       REWIND( numnam_ref )              ! Namelist namzdf_tke in reference namelist : Turbulent Kinetic Energy 
    659658      READ  ( numnam_ref, namzdf_tke, IOSTAT = ios, ERR = 901) 
    660659901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_tke in reference namelist' ) 
    661660 
    662       REWIND( numnam_cfg )              ! Namelist namzdf_tke in configuration namelist : Turbulent Kinetic Energy 
    663661      READ  ( numnam_cfg, namzdf_tke, IOSTAT = ios, ERR = 902 ) 
    664662902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namzdf_tke in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/nemogcm.F90

    r11949 r11960  
    309309      IF( lwm )   CALL ctl_opn(     numout,        'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    310310      ! open reference and configuration namelist files 
    311                   CALL ctl_opn( numnam_ref,        'namelist_ref',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    312                   CALL ctl_opn( numnam_cfg,        'namelist_cfg',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     311                  CALL load_nml( numnam_ref,        'namelist_ref',                                           -1, lwm ) 
     312                  CALL load_nml( numnam_cfg,        'namelist_cfg',                                           -1, lwm ) 
    313313      IF( lwm )   CALL ctl_opn(     numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    314314      ! open /dev/null file to be able to supress output write easily 
     
    319319      !                             !--------------------! 
    320320      ! 
    321       REWIND( numnam_ref )              ! Namelist namctl in reference namelist 
    322321      READ  ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 
    323322901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namctl in reference namelist' ) 
    324       REWIND( numnam_cfg )              ! Namelist namctl in confguration namelist 
    325323      READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 
    326324902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namctl in configuration namelist' ) 
     
    377375      !                             !------------------------------------! 
    378376      ! 
    379       REWIND( numnam_ref )              ! Namelist namcfg in reference namelist 
    380377      READ  ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 
    381378903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcfg in reference namelist' ) 
    382       REWIND( numnam_cfg )              ! Namelist namcfg in confguration namelist 
    383379      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 
    384380904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfg in configuration namelist' )    
     
    624620      IF( numstp          /= -1 )   CLOSE( numstp          )   ! time-step file 
    625621      IF( numrun          /= -1 )   CLOSE( numrun          )   ! run statistics file 
    626       IF( numnam_ref      /= -1 )   CLOSE( numnam_ref      )   ! oce reference namelist 
    627       IF( numnam_cfg      /= -1 )   CLOSE( numnam_cfg      )   ! oce configuration namelist 
    628622      IF( lwm.AND.numond  /= -1 )   CLOSE( numond          )   ! oce output namelist 
    629       IF( numnam_ice_ref  /= -1 )   CLOSE( numnam_ice_ref  )   ! ice reference namelist 
    630       IF( numnam_ice_cfg  /= -1 )   CLOSE( numnam_ice_cfg  )   ! ice configuration namelist 
    631623      IF( lwm.AND.numoni  /= -1 )   CLOSE( numoni          )   ! ice output namelist 
    632624      IF( numevo_ice      /= -1 )   CLOSE( numevo_ice      )   ! ice variables (temp. evolution) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OFF/dtadyn.F90

    r11949 r11960  
    230230      !!---------------------------------------------------------------------- 
    231231      ! 
    232       REWIND( numnam_ref )              ! Namelist namdta_dyn in reference namelist : Offline: init. of dynamical data 
    233232      READ  ( numnam_ref, namdta_dyn, IOSTAT = ios, ERR = 901) 
    234233901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdta_dyn in reference namelist' ) 
    235       REWIND( numnam_cfg )              ! Namelist namdta_dyn in configuration namelist : Offline: init. of dynamical data 
    236234      READ  ( numnam_cfg, namdta_dyn, IOSTAT = ios, ERR = 902 ) 
    237235902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdta_dyn in configuration namelist' ) 
     
    483481      !!---------------------------------------------------------------------- 
    484482      ! 
    485       REWIND( numnam_ref )              ! Namelist namdta_dyn in reference namelist : Offline: init. of dynamical data 
    486483      READ  ( numnam_ref, namdta_dyn, IOSTAT = ios, ERR = 901) 
    487484901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdta_dyn in reference namelist' ) 
    488       REWIND( numnam_cfg )              ! Namelist namdta_dyn in configuration namelist : Offline: init. of dynamical data 
    489485      READ  ( numnam_cfg, namdta_dyn, IOSTAT = ios, ERR = 902 ) 
    490486902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdta_dyn in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OFF/nemogcm.F90

    r11949 r11960  
    205205      IF( lwm )   CALL ctl_opn(     numout,        'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    206206      ! open reference and configuration namelist files 
    207                   CALL ctl_opn( numnam_ref,        'namelist_ref',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    208                   CALL ctl_opn( numnam_cfg,        'namelist_cfg',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     207                  CALL load_nml( numnam_ref,        'namelist_ref',                                           -1, lwm ) 
     208                  CALL load_nml( numnam_cfg,        'namelist_cfg',                                           -1, lwm ) 
    209209      IF( lwm )   CALL ctl_opn(     numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    210210      ! open /dev/null file to be able to supress output write easily 
     
    215215      !                             !--------------------! 
    216216      ! 
    217       REWIND( numnam_ref )              ! Namelist namctl in reference namelist 
    218217      READ  ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 
    219218901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namctl in reference namelist' ) 
    220       REWIND( numnam_cfg )              ! Namelist namctl in confguration namelist 
    221219      READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 
    222220902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namctl in configuration namelist' ) 
     
    273271      !                             !------------------------------------! 
    274272      !      
    275       REWIND( numnam_ref )              ! Namelist namcfg in reference namelist 
    276273      READ  ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 
    277274903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcfg in reference namelist' ) 
    278       REWIND( numnam_cfg )              ! Namelist namcfg in confguration namelist 
    279275      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 
    280276904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfg in configuration namelist' )    
     
    463459      ! 
    464460      IF( numstp     /= -1 )   CLOSE( numstp     )   ! time-step file 
    465       IF( numnam_ref /= -1 )   CLOSE( numnam_ref )   ! oce reference namelist 
    466       IF( numnam_cfg /= -1 )   CLOSE( numnam_cfg )   ! oce configuration namelist 
    467       IF( numout     /=  6 )   CLOSE( numout     )   ! standard model output file 
    468461      IF( lwm.AND.numond  /= -1 )   CLOSE( numond          )   ! oce output namelist 
    469462      ! 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/SAO/nemogcm.F90

    r11949 r11960  
    135135      IF( lwm )   CALL ctl_opn(     numout,        'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    136136      ! open reference and configuration namelist files 
    137                   CALL ctl_opn( numnam_ref,        'namelist_ref',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    138                   CALL ctl_opn( numnam_cfg,        'namelist_cfg',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     137                  CALL load_nml( numnam_ref,        'namelist_ref',                                           -1, lwm ) 
     138                  CALL load_nml( numnam_cfg,        'namelist_cfg',                                           -1, lwm ) 
    139139      IF( lwm )   CALL ctl_opn(     numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    140140      ! open /dev/null file to be able to supress output write easily 
     
    145145      !                             !--------------------! 
    146146      ! 
    147       REWIND( numnam_ref )              ! Namelist namctl in reference namelist 
    148147      READ  ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 
    149148901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namctl in reference namelist' ) 
    150       REWIND( numnam_cfg )              ! Namelist namctl in confguration namelist 
    151149      READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 
    152150902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namctl in configuration namelist' ) 
     
    203201      !                             !------------------------------------! 
    204202      ! 
    205       REWIND( numnam_ref )              ! Namelist namcfg in reference namelist 
    206203      READ  ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 
    207204903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcfg in reference namelist' ) 
    208       REWIND( numnam_cfg )              ! Namelist namcfg in confguration namelist 
    209205      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 
    210206904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfg in configuration namelist' )    
     
    363359      IF( numstp          /= -1 )   CLOSE( numstp          )   ! time-step file 
    364360      IF( numrun          /= -1 )   CLOSE( numrun          )   ! run statistics file 
    365       IF( numnam_ref      /= -1 )   CLOSE( numnam_ref      )   ! oce reference namelist 
    366       IF( numnam_cfg      /= -1 )   CLOSE( numnam_cfg      )   ! oce configuration namelist 
    367361      IF( lwm.AND.numond  /= -1 )   CLOSE( numond          )   ! oce output namelist 
    368       IF( numnam_ice_ref  /= -1 )   CLOSE( numnam_ice_ref  )   ! ice reference namelist 
    369       IF( numnam_ice_cfg  /= -1 )   CLOSE( numnam_ice_cfg  )   ! ice configuration namelist 
    370362      IF( lwm.AND.numoni  /= -1 )   CLOSE( numoni          )   ! ice output namelist 
    371363      IF( numevo_ice      /= -1 )   CLOSE( numevo_ice      )   ! ice variables (temp. evolution) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/SAO/sao_data.F90

    r11536 r11960  
    5252 
    5353      ! Standard offline obs_oper settings 
    54       REWIND( numnam_ref )              ! Namelist namctl in reference namelist : Control prints & Benchmark 
    5554      READ  ( numnam_ref, namsao, IOSTAT = ios, ERR = 901 ) 
    5655901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsao in reference namelist' ) 
    57       REWIND( numnam_cfg )              ! Namelist namctl in confguration namelist : Control prints & Benchmark 
    5856      READ  ( numnam_cfg, namsao, IOSTAT = ios, ERR = 902 ) 
    5957902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsao in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/SAS/nemogcm.F90

    r11949 r11960  
    243243      ! open ocean.output as soon as possible to get all output prints (including errors messages) 
    244244      IF( lk_oasis ) THEN 
    245          IF( lwm )   CALL ctl_opn(     numout,              'sas.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     245         IF( lwm )   CALL ctl_opn(     numout,               'sas.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    246246         ! open reference and configuration namelist files 
    247                      CALL ctl_opn( numnam_ref,        'namelist_sas_ref',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    248                      CALL ctl_opn( numnam_cfg,        'namelist_sas_cfg',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    249          IF( lwm )   CALL ctl_opn(     numond, 'output.namelist_sas.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     247                     CALL load_nml( numnam_ref,        'namelist_sas_ref',                                           -1, lwm ) 
     248                     CALL load_nml( numnam_cfg,        'namelist_sas_cfg',                                           -1, lwm ) 
     249         IF( lwm )   CALL ctl_opn(      numond, 'output.namelist_sas.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    250250      ELSE 
    251          IF( lwm )   CALL ctl_opn(     numout,            'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     251         IF( lwm )   CALL ctl_opn(      numout,            'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    252252         ! open reference and configuration namelist files 
    253                      CALL ctl_opn( numnam_ref,            'namelist_ref',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    254                      CALL ctl_opn( numnam_cfg,            'namelist_cfg',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    255          IF( lwm )   CALL ctl_opn(     numond,     'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     253                     CALL load_nml( numnam_ref,            'namelist_ref',                                           -1, lwm ) 
     254                     CALL load_nml( numnam_cfg,            'namelist_cfg',                                           -1, lwm ) 
     255         IF( lwm )   CALL ctl_opn(      numond,     'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    256256      ENDIF 
    257257      ! open /dev/null file to be able to supress output write easily 
     
    262262      !                             !--------------------! 
    263263      ! 
    264       REWIND( numnam_ref )              ! Namelist namctl in reference namelist 
    265264      READ  ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 
    266265901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namctl in reference namelist' ) 
    267       REWIND( numnam_cfg )              ! Namelist namctl in confguration namelist 
    268266      READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 
    269267902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namctl in configuration namelist' ) 
     
    324322      !                             !------------------------------------! 
    325323      ! 
    326       REWIND( numnam_ref )              ! Namelist namcfg in reference namelist 
    327324      READ  ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 
    328325903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcfg in reference namelist' ) 
    329       REWIND( numnam_cfg )              ! Namelist namcfg in confguration namelist 
    330326      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 
    331327904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfg in configuration namelist' )    
     
    505501      IF( numstp          /= -1 )   CLOSE( numstp          )   ! time-step file       
    506502      IF( numrun          /= -1 )   CLOSE( numrun          )   ! run statistics file 
    507       IF( numnam_ref      /= -1 )   CLOSE( numnam_ref      )   ! oce reference namelist 
    508       IF( numnam_cfg      /= -1 )   CLOSE( numnam_cfg      )   ! oce configuration namelist 
    509503      IF( lwm.AND.numond  /= -1 )   CLOSE( numond          )   ! oce output namelist 
    510       IF( numnam_ice_ref  /= -1 )   CLOSE( numnam_ice_ref  )   ! ice reference namelist 
    511       IF( numnam_ice_cfg  /= -1 )   CLOSE( numnam_ice_cfg  )   ! ice configuration namelist 
    512504      IF( lwm.AND.numoni  /= -1 )   CLOSE( numoni          )   ! ice output namelist 
    513505      IF( numevo_ice      /= -1 )   CLOSE( numevo_ice      )   ! ice variables (temp. evolution) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/SAS/sbcssm.F90

    r11949 r11960  
    190190      ENDIF 
    191191      ! 
    192       REWIND( numnam_ref )              ! Namelist namsbc_sas in reference namelist : Input fields 
    193192      READ  ( numnam_ref, namsbc_sas, IOSTAT = ios, ERR = 901) 
    194193901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_sas in reference namelist' ) 
    195       REWIND( numnam_cfg )              ! Namelist namsbc_sas in configuration namelist : Input fields 
    196194      READ  ( numnam_cfg, namsbc_sas, IOSTAT = ios, ERR = 902 ) 
    197195902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_sas in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/AGE/trcnam_age.F90

    r11536 r11960  
    5454      ln_trc_obc(jp_age) = .false. 
    5555      ! 
    56       REWIND( numnat_ref )              ! Namelist namagedate in reference namelist : AGE parameters 
    5756      READ  ( numnat_ref, namage, IOSTAT = ios, ERR = 901) 
    5857901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namage in reference namelist' ) 
    59       REWIND( numnat_cfg )              ! Namelist namagedate in configuration namelist : AGE parameters 
    6058      READ  ( numnat_cfg, namage, IOSTAT = ios, ERR = 902 ) 
    6159902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namage in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/C14/trcnam_c14.F90

    r11536 r11960  
    6161      ln_trc_obc(jp_c14) = .false. 
    6262      ! 
    63       REWIND( numtrc_ref )              ! Namelist namc14_typ in reference namelist : 
    6463      READ  ( numtrc_ref, namc14_typ, IOSTAT = ios, ERR = 901) 
    6564901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc14_typ in reference namelist' ) 
    66       REWIND( numtrc_cfg )              ! Namelist namcfcdate in configuration namelist  
    6765      READ  ( numtrc_cfg, namc14_typ, IOSTAT = ios, ERR = 902) 
    6866902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namc14_typ in configuration namelist' ) 
     
    7876      ENDIF 
    7977 
    80       REWIND( numtrc_ref )              ! Namelist namc14_typ in reference namelist : 
    8178      READ  ( numtrc_ref, namc14_sbc, IOSTAT = ios, ERR = 903) 
    8279903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc14_sbc in reference namelist' ) 
    83       REWIND( numtrc_cfg )              ! Namelist namcfcdate in configuration namelist  
    8480      READ  ( numtrc_cfg, namc14_sbc, IOSTAT = ios, ERR = 904) 
    8581904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namc14_sbc in configuration namelist' ) 
     
    9490      ENDIF 
    9591 
    96       REWIND( numtrc_ref )              ! Namelist namc14_typ in reference namelist : 
    9792      READ  ( numtrc_ref, namc14_fcg, IOSTAT = ios, ERR = 905) 
    9893905   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc14_fcg in reference namelist' ) 
    99       REWIND( numtrc_cfg )              ! Namelist namcfcdate in configuration namelist  
    10094      READ  ( numtrc_cfg, namc14_fcg, IOSTAT = ios, ERR = 906) 
    10195906   IF( ios >  0 )   CALL ctl_nam ( ios , 'namc14_fcg in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/CFC/trcnam_cfc.F90

    r11536 r11960  
    5151      ENDIF 
    5252      ! 
    53       REWIND( numtrc_ref )              ! Namelist namcfcdate in reference namelist : CFC parameters 
    5453      READ  ( numtrc_ref, namcfc, IOSTAT = ios, ERR = 901) 
    5554901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcfc in reference namelist' ) 
    56       REWIND( numtrc_cfg )              ! Namelist namcfcdate in configuration namelist : CFC parameters 
    5755      READ  ( numtrc_cfg, namcfc, IOSTAT = ios, ERR = 902 ) 
    5856902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfc in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P2Z/p2zbio.F90

    r11949 r11960  
    403403      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~' 
    404404      ! 
    405       REWIND( numnatp_ref )              ! Namelist namlobphy in reference namelist : Lobster biological parameters 
    406405      READ  ( numnatp_ref, namlobphy, IOSTAT = ios, ERR = 901) 
    407406901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlobphy in reference namelist' ) 
    408       REWIND( numnatp_cfg )              ! Namelist namlobphy in configuration namelist : Lobster biological parameters 
    409407      READ  ( numnatp_cfg, namlobphy, IOSTAT = ios, ERR = 902 ) 
    410408902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobphy in configuration namelist' ) 
     
    420418      ENDIF 
    421419 
    422       REWIND( numnatp_ref )              ! Namelist namlobnut in reference namelist : Lobster nutriments parameters 
    423420      READ  ( numnatp_ref, namlobnut, IOSTAT = ios, ERR = 903) 
    424421903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlobnut in reference namelist' ) 
    425       REWIND( numnatp_cfg )              ! Namelist namlobnut in configuration namelist : Lobster nutriments parameters 
    426422      READ  ( numnatp_cfg, namlobnut, IOSTAT = ios, ERR = 904 ) 
    427423904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobnut in configuration namelist' ) 
     
    437433      ENDIF 
    438434 
    439       REWIND( numnatp_ref )              ! Namelist namlobzoo in reference namelist : Lobster zooplankton parameters 
    440435      READ  ( numnatp_ref, namlobzoo, IOSTAT = ios, ERR = 905) 
    441436905   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlobzoo in reference namelist' ) 
    442       REWIND( numnatp_cfg )              ! Namelist namlobzoo in configuration namelist : Lobster zooplankton parameters 
    443437      READ  ( numnatp_cfg, namlobzoo, IOSTAT = ios, ERR = 906 ) 
    444438906   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobzoo in configuration namelist' ) 
     
    459453      ENDIF 
    460454 
    461       REWIND( numnatp_ref )              ! Namelist namlobdet in reference namelist : Lobster detritus parameters 
    462455      READ  ( numnatp_ref, namlobdet, IOSTAT = ios, ERR = 907) 
    463456907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlobdet in reference namelist' ) 
    464       REWIND( numnatp_cfg )              ! Namelist namlobdet in configuration namelist : Lobster detritus parameters 
    465457      READ  ( numnatp_cfg, namlobdet, IOSTAT = ios, ERR = 908 ) 
    466458908   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobdet in configuration namelist' ) 
     
    474466      ENDIF 
    475467 
    476       REWIND( numnatp_ref )              ! Namelist namlobdom in reference namelist : Lobster DOM breakdown rate 
    477468      READ  ( numnatp_ref, namlobdom, IOSTAT = ios, ERR = 909) 
    478469909   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlobdom in reference namelist' ) 
    479       REWIND( numnatp_cfg )              ! Namelist namlobdom in configuration namelist : Lobster DOM breakdown rate 
    480470      READ  ( numnatp_cfg, namlobdom, IOSTAT = ios, ERR = 910 ) 
    481471910   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobdom in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P2Z/p2zopt.F90

    r11949 r11960  
    160160      !!---------------------------------------------------------------------- 
    161161 
    162       REWIND( numnatp_ref )              ! Namelist namlobopt in reference namelist : Lobster options 
    163162      READ  ( numnatp_ref, namlobopt, IOSTAT = ios, ERR = 901) 
    164163901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlobopt in reference namelist' ) 
    165164 
    166       REWIND( numnatp_cfg )              ! Namelist namlobopt in configuration namelist : Lobster options 
    167165      READ  ( numnatp_cfg, namlobopt, IOSTAT = ios, ERR = 902 ) 
    168166902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namlobopt in configuration namelist' ) 
     
    182180      ENDIF 
    183181      ! 
    184       REWIND( numnatp_ref )              ! Namelist namlobrat in reference namelist : Lobster ratios 
    185182      READ  ( numnatp_ref, namlobrat, IOSTAT = ios, ERR = 903) 
    186183903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlobrat in reference namelist' ) 
    187184 
    188       REWIND( numnatp_cfg )              ! Namelist namlobrat in configuration namelist : Lobster ratios 
    189185      READ  ( numnatp_cfg, namlobrat, IOSTAT = ios, ERR = 904 ) 
    190186904   IF( ios >  0 ) CALL ctl_nam ( ios , 'namlobrat in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P2Z/p2zsed.F90

    r11949 r11960  
    133133      !!---------------------------------------------------------------------- 
    134134      ! 
    135       REWIND( numnatp_ref )              ! Namelist namlobsed in reference namelist : Lobster sediments 
    136135      READ  ( numnatp_ref, namlobsed, IOSTAT = ios, ERR = 901) 
    137136901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlosed in reference namelist' ) 
    138       REWIND( numnatp_cfg )              ! Namelist namlobsed in configuration namelist : Lobster sediments 
    139137      READ  ( numnatp_cfg, namlobsed, IOSTAT = ios, ERR = 902 ) 
    140138902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobsed in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p4zfechem.F90

    r11949 r11960  
    255255      ENDIF 
    256256      ! 
    257       REWIND( numnatp_ref )            ! Namelist nampisfer in reference namelist : Pisces iron chemistry 
    258257      READ  ( numnatp_ref, nampisfer, IOSTAT = ios, ERR = 901) 
    259258901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisfer in reference namelist' ) 
    260       REWIND( numnatp_cfg )            ! Namelist nampisfer in configuration namelist : Pisces iron chemistry 
    261259      READ  ( numnatp_cfg, nampisfer, IOSTAT = ios, ERR = 902 ) 
    262260902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisfer in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p4zflx.F90

    r11949 r11960  
    240240      ENDIF 
    241241      ! 
    242       REWIND( numnatp_ref )              ! Namelist nampisext in reference namelist : Pisces atm. conditions 
    243242      READ  ( numnatp_ref, nampisext, IOSTAT = ios, ERR = 901) 
    244243901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisext in reference namelist' ) 
    245       REWIND( numnatp_cfg )              ! Namelist nampisext in configuration namelist : Pisces atm. conditions 
    246244      READ  ( numnatp_cfg, nampisext, IOSTAT = ios, ERR = 902 ) 
    247245902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisext in configuration namelist' ) 
     
    321319         ENDIF 
    322320         ! 
    323          REWIND( numnatp_ref )              ! Namelist nampisatm in reference namelist : Pisces atm. sea level pressure file 
    324321         READ  ( numnatp_ref, nampisatm, IOSTAT = ios, ERR = 901) 
    325322901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisatm in reference namelist' ) 
    326          REWIND( numnatp_cfg )              ! Namelist nampisatm in configuration namelist : Pisces atm. sea level pressure file  
    327323         READ  ( numnatp_cfg, nampisatm, IOSTAT = ios, ERR = 902 ) 
    328324902      IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisatm in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p4zligand.F90

    r11949 r11960  
    126126         WRITE(numout,*) '~~~~~~~~~~~~~~~' 
    127127      ENDIF 
    128       REWIND( numnatp_ref )              ! Namelist nampislig in reference namelist : Pisces remineralization 
    129128      READ  ( numnatp_ref, nampislig, IOSTAT = ios, ERR = 901) 
    130129901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampislig in reference namelist' ) 
    131       REWIND( numnatp_cfg )              ! Namelist nampislig in configuration namelist : Pisces remineralization 
    132130      READ  ( numnatp_cfg, nampislig, IOSTAT = ios, ERR = 902 ) 
    133131902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampislig in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p4zlim.F90

    r11949 r11960  
    253253      ENDIF 
    254254      ! 
    255       REWIND( numnatp_ref )              ! Namelist nampislim in reference namelist : Pisces nutrient limitation parameters 
    256255      READ  ( numnatp_ref, namp4zlim, IOSTAT = ios, ERR = 901) 
    257256901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namp4zlim in reference namelist' ) 
    258       REWIND( numnatp_cfg )              ! Namelist nampislim in configuration namelist : Pisces nutrient limitation parameters  
    259257      READ  ( numnatp_cfg, namp4zlim, IOSTAT = ios, ERR = 902 ) 
    260258902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namp4zlim in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p4zlys.F90

    r11949 r11960  
    163163      ENDIF 
    164164      ! 
    165       REWIND( numnatp_ref )              ! Namelist nampiscal in reference namelist : Pisces CaCO3 dissolution 
    166165      READ  ( numnatp_ref, nampiscal, IOSTAT = ios, ERR = 901) 
    167166901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampiscal in reference namelist' ) 
    168       REWIND( numnatp_cfg )              ! Namelist nampiscal in configuration namelist : Pisces CaCO3 dissolution 
    169167      READ  ( numnatp_cfg, nampiscal, IOSTAT = ios, ERR = 902 ) 
    170168902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampiscal in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p4zmeso.F90

    r11949 r11960  
    291291      ENDIF 
    292292      ! 
    293       REWIND( numnatp_ref )              ! Namelist nampismes in reference namelist : Pisces mesozooplankton 
    294293      READ  ( numnatp_ref, namp4zmes, IOSTAT = ios, ERR = 901) 
    295294901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namp4zmes in reference namelist' ) 
    296       REWIND( numnatp_cfg )              ! Namelist nampismes in configuration namelist : Pisces mesozooplankton 
    297295      READ  ( numnatp_cfg, namp4zmes, IOSTAT = ios, ERR = 902 ) 
    298296902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namp4zmes in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p4zmicro.F90

    r11949 r11960  
    244244      ENDIF 
    245245      ! 
    246       REWIND( numnatp_ref )              ! Namelist nampiszoo in reference namelist : Pisces microzooplankton 
    247246      READ  ( numnatp_ref, namp4zzoo, IOSTAT = ios, ERR = 901) 
    248247901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namp4zzoo in reference namelist' ) 
    249       REWIND( numnatp_cfg )              ! Namelist nampiszoo in configuration namelist : Pisces microzooplankton 
    250248      READ  ( numnatp_cfg, namp4zzoo, IOSTAT = ios, ERR = 902 ) 
    251249902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namp4zzoo in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p4zmort.F90

    r11949 r11960  
    230230      ENDIF 
    231231      ! 
    232       REWIND( numnatp_ref )              ! Namelist nampismort in reference namelist : Pisces phytoplankton 
    233232      READ  ( numnatp_ref, namp4zmort, IOSTAT = ios, ERR = 901) 
    234233901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namp4zmort in reference namelist' ) 
    235       REWIND( numnatp_cfg )              ! Namelist nampismort in configuration namelist : Pisces phytoplankton 
    236234      READ  ( numnatp_cfg, namp4zmort, IOSTAT = ios, ERR = 902 ) 
    237235902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namp4zmort in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p4zopt.F90

    r11949 r11960  
    402402         WRITE(numout,*) '~~~~~~~~~~~~ ' 
    403403      ENDIF 
    404       REWIND( numnatp_ref )              ! Namelist nampisopt in reference namelist : Pisces attenuation coef. and PAR 
    405404      READ  ( numnatp_ref, nampisopt, IOSTAT = ios, ERR = 901) 
    406405901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisopt in reference namelist' ) 
    407       REWIND( numnatp_cfg )              ! Namelist nampisopt in configuration namelist : Pisces attenuation coef. and PAR 
    408406      READ  ( numnatp_cfg, nampisopt, IOSTAT = ios, ERR = 902 ) 
    409407902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisopt in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p4zpoc.F90

    r11949 r11960  
    498498      ENDIF 
    499499      ! 
    500       REWIND( numnatp_ref )              ! Namelist nampisrem in reference namelist : Pisces remineralization 
    501500      READ  ( numnatp_ref, nampispoc, IOSTAT = ios, ERR = 901) 
    502501901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampispoc in reference namelist' ) 
    503       REWIND( numnatp_cfg )              ! Namelist nampisrem in configuration namelist : Pisces remineralization 
    504502      READ  ( numnatp_cfg, nampispoc, IOSTAT = ios, ERR = 902 ) 
    505503902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampispoc in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p4zprod.F90

    r11949 r11960  
    491491      ENDIF 
    492492      ! 
    493       REWIND( numnatp_ref )              ! Namelist nampisprod in reference namelist : Pisces phytoplankton production 
    494493      READ  ( numnatp_ref, namp4zprod, IOSTAT = ios, ERR = 901) 
    495494901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namp4zprod in reference namelist' ) 
    496       REWIND( numnatp_cfg )              ! Namelist nampisprod in configuration namelist : Pisces phytoplankton production 
    497495      READ  ( numnatp_cfg, namp4zprod, IOSTAT = ios, ERR = 902 ) 
    498496902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namp4zprod in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p4zrem.F90

    r11949 r11960  
    328328      ENDIF 
    329329      ! 
    330       REWIND( numnatp_ref )              ! Namelist nampisrem in reference namelist : Pisces remineralization 
    331330      READ  ( numnatp_ref, nampisrem, IOSTAT = ios, ERR = 901) 
    332331901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisrem in reference namelist' ) 
    333       REWIND( numnatp_cfg )              ! Namelist nampisrem in configuration namelist : Pisces remineralization 
    334332      READ  ( numnatp_cfg, nampisrem, IOSTAT = ios, ERR = 902 ) 
    335333902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisrem in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p4zsbc.F90

    r11949 r11960  
    232232      ENDIF 
    233233      !                            !* set file information 
    234       REWIND( numnatp_ref )              ! Namelist nampissbc in reference namelist : Pisces external sources of nutrients 
    235234      READ  ( numnatp_ref, nampissbc, IOSTAT = ios, ERR = 901) 
    236235901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampissbc in reference namelist' ) 
    237       REWIND( numnatp_cfg )              ! Namelist nampissbc in configuration namelist : Pisces external sources of nutrients 
    238236      READ  ( numnatp_cfg, nampissbc, IOSTAT = ios, ERR = 902 ) 
    239237902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampissbc in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p4zsms.F90

    r11949 r11960  
    202202      ENDIF 
    203203 
    204       REWIND( numnatp_ref )              ! Namelist nampisbio in reference namelist : Pisces variables 
    205204      READ  ( numnatp_ref, nampisbio, IOSTAT = ios, ERR = 901) 
    206205901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisbio in reference namelist' ) 
    207       REWIND( numnatp_cfg )              ! Namelist nampisbio in configuration namelist : Pisces variables 
    208206      READ  ( numnatp_cfg, nampisbio, IOSTAT = ios, ERR = 902 ) 
    209207902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisbio in configuration namelist' ) 
     
    233231 
    234232 
    235       REWIND( numnatp_ref )              ! Namelist nampisdmp in reference namelist : Pisces damping 
    236233      READ  ( numnatp_ref, nampisdmp, IOSTAT = ios, ERR = 905) 
    237234905   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisdmp in reference namelist' ) 
    238       REWIND( numnatp_cfg )              ! Namelist nampisdmp in configuration namelist : Pisces damping 
    239235      READ  ( numnatp_cfg, nampisdmp, IOSTAT = ios, ERR = 906 ) 
    240236906   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisdmp in configuration namelist' ) 
     
    248244      ENDIF 
    249245 
    250       REWIND( numnatp_ref )              ! Namelist nampismass in reference namelist : Pisces mass conservation check 
    251246      READ  ( numnatp_ref, nampismass, IOSTAT = ios, ERR = 907) 
    252247907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampismass in reference namelist' ) 
    253       REWIND( numnatp_cfg )              ! Namelist nampismass in configuration namelist : Pisces mass conservation check  
    254248      READ  ( numnatp_cfg, nampismass, IOSTAT = ios, ERR = 908 ) 
    255249908   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampismass in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p5zlim.F90

    r11949 r11960  
    449449      !!---------------------------------------------------------------------- 
    450450      ! 
    451       REWIND( numnatp_ref )              ! Namelist nampislim in reference namelist : Pisces nutrient limitation parameters 
    452451      READ  ( numnatp_ref, namp5zlim, IOSTAT = ios, ERR = 901) 
    453452901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampislim in reference namelist' ) 
    454453      ! 
    455       REWIND( numnatp_cfg )              ! Namelist nampislim in configuration namelist : Pisces nutrient limitation parameters  
    456454      READ  ( numnatp_cfg, namp5zlim, IOSTAT = ios, ERR = 902 ) 
    457455902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampislim in configuration namelist' ) 
     
    490488      ENDIF 
    491489 
    492       REWIND( numnatp_ref )              ! Namelist nampislim in reference namelist : Pisces nutrient limitation parameters 
    493490      READ  ( numnatp_ref, namp5zquota, IOSTAT = ios, ERR = 903) 
    494491903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisquota in reference namelist' ) 
    495492      ! 
    496       REWIND( numnatp_cfg )              ! Namelist nampislim in configuration namelist : Pisces nutrient limitation parameters  
    497493      READ  ( numnatp_cfg, namp5zquota, IOSTAT = ios, ERR = 904 ) 
    498494904   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampisquota in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p5zmeso.F90

    r11949 r11960  
    408408      !!---------------------------------------------------------------------- 
    409409      ! 
    410       REWIND( numnatp_ref )              ! Namelist nampismes in reference namelist : Pisces mesozooplankton 
    411410      READ  ( numnatp_ref, namp5zmes, IOSTAT = ios, ERR = 901) 
    412411901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampismes in reference namelist' ) 
    413412      ! 
    414       REWIND( numnatp_cfg )              ! Namelist nampismes in configuration namelist : Pisces mesozooplankton 
    415413      READ  ( numnatp_cfg, namp5zmes, IOSTAT = ios, ERR = 902 ) 
    416414902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampismes in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p5zmicro.F90

    r11949 r11960  
    350350      !!---------------------------------------------------------------------- 
    351351      ! 
    352       REWIND( numnatp_ref )              ! Namelist nampiszoo in reference namelist : Pisces microzooplankton 
    353352      READ  ( numnatp_ref, namp5zzoo, IOSTAT = ios, ERR = 901) 
    354353901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp5zzoo in reference namelist' ) 
    355354      ! 
    356       REWIND( numnatp_cfg )              ! Namelist nampiszoo in configuration namelist : Pisces microzooplankton 
    357355      READ  ( numnatp_cfg, namp5zzoo, IOSTAT = ios, ERR = 902 ) 
    358356902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namp5zzoo in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p5zmort.F90

    r11949 r11960  
    290290      !!---------------------------------------------------------------------- 
    291291 
    292       REWIND( numnatp_ref )              ! Namelist nampismort in reference namelist : Pisces phytoplankton 
    293292      READ  ( numnatp_ref, namp5zmort, IOSTAT = ios, ERR = 901) 
    294293901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp5zmort in reference namelist' ) 
    295294 
    296       REWIND( numnatp_cfg )              ! Namelist nampismort in configuration namelist : Pisces phytoplankton 
    297295      READ  ( numnatp_cfg, namp5zmort, IOSTAT = ios, ERR = 902 ) 
    298296902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namp5zmort in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p5zprod.F90

    r11949 r11960  
    583583      !!---------------------------------------------------------------------- 
    584584 
    585       REWIND( numnatp_ref )              ! Namelist nampisprod in reference namelist : Pisces phytoplankton production 
    586585      READ  ( numnatp_ref, namp5zprod, IOSTAT = ios, ERR = 901) 
    587586901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp5zprod in reference namelist' ) 
    588587 
    589       REWIND( numnatp_cfg )              ! Namelist nampisprod in configuration namelist : Pisces phytoplankton production 
    590588      READ  ( numnatp_cfg, namp5zprod, IOSTAT = ios, ERR = 902 ) 
    591589902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namp5zprod in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/SED/sedini.F90

    r11949 r11960  
    405405      !!---------------------------------------------------------------------- 
    406406 
    407       INTEGER ::   numnamsed_ref = -1           !! Logical units for namelist sediment 
    408       INTEGER ::   numnamsed_cfg = -1           !! Logical units for namelist sediment 
     407      CHARACTER(:), ALLOCATABLE ::   numnamsed_ref           !! Character buffer for reference namelist sediment 
     408      CHARACTER(:), ALLOCATABLE ::   numnamsed_cfg           !! Character buffer for configuration namelist sediment 
    409409      INTEGER :: ios                 ! Local integer output status for namelist read 
    410410      CHARACTER(LEN=20)   ::   clname 
     
    451451      IF(lwp) WRITE(numsed,*) ' sed_init_nam : read SEDIMENT namelist' 
    452452      IF(lwp) WRITE(numsed,*) ' ~~~~~~~~~~~~~~' 
    453       CALL ctl_opn( numnamsed_ref, TRIM( clname )//'_ref', 'OLD'    , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    454       CALL ctl_opn( numnamsed_cfg, TRIM( clname )//'_cfg', 'OLD'    , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
     453      CALL load_nml( numnamsed_ref, TRIM( clname )//'_ref', numout, lwm ) 
     454      CALL load_nml( numnamsed_cfg, TRIM( clname )//'_cfg', numout, lwm ) 
    455455 
    456456      nitsed000 = nittrc000 
    457457      nitsedend = nitend 
    458458      ! Namelist nam_run 
    459       REWIND( numnamsed_ref )              ! Namelist nam_run in reference namelist : Pisces variables 
    460459      READ  ( numnamsed_ref, nam_run, IOSTAT = ios, ERR = 901) 
    461460901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_run in reference namelist' ) 
    462461 
    463       REWIND( numnamsed_cfg )              ! Namelist nam_run in reference namelist : Pisces variables 
    464462      READ  ( numnamsed_cfg, nam_run, IOSTAT = ios, ERR = 902) 
    465463902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_run in configuration namelist' ) 
     
    473471      IF ( ln_p5z .AND. ln_sed_2way ) CALL ctl_stop( '2 ways coupling with sediment cannot be activated with PISCES-QUOTA' ) 
    474472 
    475       REWIND( numnamsed_ref )              ! Namelist nam_geom in reference namelist : Pisces variables 
    476473      READ  ( numnamsed_ref, nam_geom, IOSTAT = ios, ERR = 903) 
    477474903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_geom in reference namelist' ) 
    478475 
    479       REWIND( numnamsed_cfg )              ! Namelist nam_geom in reference namelist : Pisces variables 
    480476      READ  ( numnamsed_cfg, nam_geom, IOSTAT = ios, ERR = 904) 
    481477904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_geom in configuration namelist' ) 
     
    496492      dtsed = r2dttrc 
    497493 
    498       REWIND( numnamsed_ref )              ! Namelist nam_trased in reference namelist : Pisces variables 
    499494      READ  ( numnamsed_ref, nam_trased, IOSTAT = ios, ERR = 905) 
    500495905   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_trased in reference namelist' ) 
    501496 
    502       REWIND( numnamsed_cfg )              ! Namelist nam_trased in reference namelist : Pisces variables 
    503497      READ  ( numnamsed_cfg, nam_trased, IOSTAT = ios, ERR = 906) 
    504498906   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_trased in configuration namelist' ) 
     
    529523      ENDIF 
    530524 
    531       REWIND( numnamsed_ref )              ! Namelist nam_diased in reference namelist : Pisces variables 
    532525      READ  ( numnamsed_ref, nam_diased, IOSTAT = ios, ERR = 907) 
    533526907   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diased in reference namelist' ) 
    534527 
    535       REWIND( numnamsed_cfg )              ! Namelist nam_diased in reference namelist : Pisces variables 
    536528      READ  ( numnamsed_cfg, nam_diased, IOSTAT = ios, ERR = 908) 
    537529908   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diased in configuration namelist' ) 
     
    571563      ! Inorganic chemistry parameters 
    572564      !---------------------------------- 
    573       REWIND( numnamsed_ref )              ! Namelist nam_inorg in reference namelist : Pisces variables 
    574565      READ  ( numnamsed_ref, nam_inorg, IOSTAT = ios, ERR = 909) 
    575566909   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_inorg in reference namelist' ) 
    576567 
    577       REWIND( numnamsed_cfg )              ! Namelist nam_inorg in reference namelist : Pisces variables 
    578568      READ  ( numnamsed_cfg, nam_inorg, IOSTAT = ios, ERR = 910) 
    579569910   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_inorg in configuration namelist' ) 
     
    597587      ! Additional parameter linked to POC/O2/No3/Po4 
    598588      !---------------------------------------------- 
    599       REWIND( numnamsed_ref )              ! Namelist nam_poc in reference namelist : Pisces variables 
    600589      READ  ( numnamsed_ref, nam_poc, IOSTAT = ios, ERR = 911) 
    601590911   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_poc in reference namelist' ) 
    602591 
    603       REWIND( numnamsed_cfg )              ! Namelist nam_poc in reference namelist : Pisces variables 
    604592      READ  ( numnamsed_cfg, nam_poc, IOSTAT = ios, ERR = 912) 
    605593912   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_poc in configuration namelist' ) 
     
    649637      ! Bioturbation parameter 
    650638      !------------------------ 
    651       REWIND( numnamsed_ref )              ! Namelist nam_btb in reference namelist : Pisces variables 
    652639      READ  ( numnamsed_ref, nam_btb, IOSTAT = ios, ERR = 913) 
    653640913   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_btb in reference namelist' ) 
    654641 
    655       REWIND( numnamsed_cfg )              ! Namelist nam_btb in reference namelist : Pisces variables 
    656642      READ  ( numnamsed_cfg, nam_btb, IOSTAT = ios, ERR = 914) 
    657643914   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_btb in configuration namelist' ) 
     
    670656      ! Initial value (t=0) for sediment pore water and solid components 
    671657      !---------------------------------------------------------------- 
    672       REWIND( numnamsed_ref )              ! Namelist nam_rst in reference namelist : Pisces variables 
    673658      READ  ( numnamsed_ref, nam_rst, IOSTAT = ios, ERR = 915) 
    674659915   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_rst in reference namelist' ) 
    675660 
    676       REWIND( numnamsed_cfg )              ! Namelist nam_rst in reference namelist : Pisces variables 
    677661      READ  ( numnamsed_cfg, nam_rst, IOSTAT = ios, ERR = 916) 
    678662916   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_rst in configuration namelist' ) 
     
    685669      nn_dtsed = 1 
    686670 
    687       CLOSE( numnamsed_cfg ) 
    688       CLOSE( numnamsed_ref ) 
    689671 
    690672   END SUBROUTINE sed_init_nam 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/sms_pisces.F90

    r10788 r11960  
    1313   PUBLIC 
    1414 
    15    INTEGER ::   numnatp_ref = -1           !! Logical units for namelist pisces 
    16    INTEGER ::   numnatp_cfg = -1           !! Logical units for namelist pisces 
    17    INTEGER ::   numonp      = -1           !! Logical unit for namelist pisces output 
     15   CHARACTER(:), ALLOCATABLE ::   numnatp_ref   !! Character buffer for reference namelist pisces 
     16   CHARACTER(:), ALLOCATABLE ::   numnatp_cfg   !! Character buffer for configuration namelist pisces 
     17   INTEGER ::   numonp      = -1                !! Logical unit for namelist pisces output 
    1818 
    1919   !                                                       !:  PISCES  : silicon dependant half saturation 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/trcnam_pisces.F90

    r11536 r11960  
    5151      IF(lwp) WRITE(numout,*) 'trc_nam_pisces : read PISCES namelist' 
    5252      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~' 
    53       CALL ctl_opn( numnatp_ref, TRIM( clname )//'_ref', 'OLD'    , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    54       CALL ctl_opn( numnatp_cfg, TRIM( clname )//'_cfg', 'OLD'    , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
     53      CALL load_nml( numnatp_ref, TRIM( clname )//'_ref', numout, lwm ) 
     54      CALL load_nml( numnatp_cfg, TRIM( clname )//'_cfg', numout, lwm ) 
    5555      IF(lwm) CALL ctl_opn( numonp     , 'output.namelist.pis' , 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    5656      ! 
    57       REWIND( numnatp_ref )              ! Namelist nampisbio in reference namelist : Pisces variables 
    5857      READ  ( numnatp_ref, nampismod, IOSTAT = ios, ERR = 901) 
    5958901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampismod in reference namelist' ) 
    60       REWIND( numnatp_cfg )              ! Namelist nampisbio in configuration namelist : Pisces variables 
    6159      READ  ( numnatp_cfg, nampismod, IOSTAT = ios, ERR = 902 ) 
    6260902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampismod in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/TRP/trcadv.F90

    r11949 r11960  
    166166      ! 
    167167      !                                !==  Namelist  ==! 
    168       REWIND( numnat_ref )                   !  namtrc_adv in reference namelist  
    169168      READ  ( numnat_ref, namtrc_adv, IOSTAT = ios, ERR = 901) 
    170169901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_adv in reference namelist' ) 
    171       REWIND( numnat_cfg )                   ! namtrc_adv in configuration namelist 
    172170      READ  ( numnat_cfg, namtrc_adv, IOSTAT = ios, ERR = 902 ) 
    173171902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_adv in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/TRP/trcdmp.F90

    r11949 r11960  
    183183      !!---------------------------------------------------------------------- 
    184184      ! 
    185       REWIND( numnat_ref )              ! Namelist namtrc_dmp in reference namelist : Passive tracers newtonian damping 
    186185      READ  ( numnat_ref, namtrc_dmp, IOSTAT = ios, ERR = 909) 
    187186909   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_dmp in reference namelist' ) 
    188       REWIND( numnat_cfg )              ! Namelist namtrc_dmp in configuration namelist : Passive tracers newtonian damping 
    189187      READ  ( numnat_cfg, namtrc_dmp, IOSTAT = ios, ERR = 910) 
    190188910   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_dmp in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/TRP/trcldf.F90

    r11949 r11960  
    149149      ENDIF 
    150150      ! 
    151       REWIND( numnat_ref )             !  namtrc_ldf in reference namelist  
    152151      READ  ( numnat_ref, namtrc_ldf, IOSTAT = ios, ERR = 903) 
    153152903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_ldf in reference namelist' ) 
    154153      ! 
    155       REWIND( numnat_cfg )             !  namtrc_ldf in configuration namelist  
    156154      READ  ( numnat_cfg, namtrc_ldf, IOSTAT = ios, ERR = 904 ) 
    157155904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_ldf in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/TRP/trcrad.F90

    r11949 r11960  
    9090      !!---------------------------------------------------------------------- 
    9191      ! 
    92       REWIND( numnat_ref )              ! namtrc_rad in reference namelist  
    9392      READ  ( numnat_ref, namtrc_rad, IOSTAT = ios, ERR = 907) 
    9493907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_rad in reference namelist' ) 
    95       REWIND( numnat_cfg )              ! namtrc_rad in configuration namelist  
    9694      READ  ( numnat_cfg, namtrc_rad, IOSTAT = ios, ERR = 908 ) 
    9795908   IF( ios > 0 )   CALL ctl_nam ( ios , 'namtrc_rad in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/TRP/trcsink.F90

    r11949 r11960  
    218218      !!---------------------------------------------------------------------- 
    219219      ! 
    220       REWIND( numnat_ref )              ! namtrc_rad in reference namelist  
    221220      READ  ( numnat_ref, namtrc_snk, IOSTAT = ios, ERR = 907) 
    222221907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_snk in reference namelist' ) 
    223       REWIND( numnat_cfg )              ! namtrc_rad in configuration namelist  
    224222      READ  ( numnat_cfg, namtrc_snk, IOSTAT = ios, ERR = 908 ) 
    225223908   IF( ios > 0 )   CALL ctl_nam ( ios , 'namtrc_snk in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/trc.F90

    r11949 r11960  
    1818 
    1919   !                                     !!- logical units of passive tracers 
    20    INTEGER, PUBLIC ::   numnat_ref = -1   !: reference passive tracer namelist_top_ref 
    21    INTEGER, PUBLIC ::   numnat_cfg = -1   !: reference passive tracer namelist_top_cfg 
    2220   INTEGER, PUBLIC ::   numont     = -1   !: reference passive tracer namelist output output.namelist.top 
    23    INTEGER, PUBLIC ::   numtrc_ref = -1   !: reference passive tracer namelist_top_ref 
    24    INTEGER, PUBLIC ::   numtrc_cfg = -1   !: reference passive tracer namelist_top_cfg 
    2521   INTEGER, PUBLIC ::   numonr     = -1   !: reference passive tracer namelist output output.namelist.top 
    2622   INTEGER, PUBLIC ::   numstr            !: tracer statistics 
    2723   INTEGER, PUBLIC ::   numrtr            !: trc restart (read ) 
    2824   INTEGER, PUBLIC ::   numrtw            !: trc restart ( write ) 
     25   CHARACTER(:), ALLOCATABLE, PUBLIC ::   numnat_ref   !: character buffer for reference passive tracer namelist_top_ref 
     26   CHARACTER(:), ALLOCATABLE, PUBLIC ::   numnat_cfg   !: character buffer for configuration specific passive tracer namelist_top_cfg 
     27   CHARACTER(:), ALLOCATABLE, PUBLIC ::   numtrc_ref   !: character buffer for reference passive tracer namelist_trc_ref 
     28   CHARACTER(:), ALLOCATABLE, PUBLIC ::   numtrc_cfg   !: character buffer for configuration specific passive tracer namelist_trc_cfg 
    2929 
    3030   !! passive tracers fields (before,now,after) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/trcbc.F90

    r11949 r11960  
    121121      ! 
    122122      ! Read Boundary Conditions Namelists 
    123       REWIND( numnat_ref )              ! Namelist namtrc_bc in reference namelist : Passive tracer data structure 
    124123      READ  ( numnat_ref, namtrc_bc, IOSTAT = ios, ERR = 901) 
    125124901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_bc in reference namelist' ) 
    126       REWIND( numnat_cfg )              ! Namelist namtrc_bc in configuration namelist : Passive tracer data structure 
    127125      READ  ( numnat_cfg, namtrc_bc, IOSTAT = ios, ERR = 902 ) 
    128126902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_bc in configuration namelist' ) 
     
    130128 
    131129      IF ( ln_bdy ) THEN 
    132          REWIND( numnat_ref )              ! Namelist namtrc_bdy in reference namelist : Passive tracer data structure 
    133130         READ  ( numnat_ref, namtrc_bdy, IOSTAT = ios, ERR = 903) 
    134131903      IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_bdy in reference namelist' ) 
     
    136133         cn_trc     (2:jp_bdy) = cn_trc     (1) 
    137134         cn_trc_dflt(2:jp_bdy) = cn_trc_dflt(1) 
    138          REWIND( numnat_cfg )              ! Namelist namtrc_bdy in configuration namelist : Passive tracer data structure 
    139135         READ  ( numnat_cfg, namtrc_bdy, IOSTAT = ios, ERR = 904 ) 
    140136904      IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_bdy in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/trcdta.F90

    r11949 r11960  
    9898      ENDIF 
    9999      ! 
    100       REWIND( numnat_ref )              ! Namelist namtrc_dta in reference namelist : Passive tracer input data 
    101100      READ  ( numnat_ref, namtrc_dta, IOSTAT = ios, ERR = 901) 
    102101901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_dta_ini in reference namelist' ) 
    103       REWIND( numnat_cfg )              ! Namelist namtrc_dta in configuration namelist : Passive tracer input data 
    104102      READ  ( numnat_cfg, namtrc_dta, IOSTAT = ios, ERR = 902 ) 
    105103902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_dta_ini in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/trcice.F90

    r11536 r11960  
    8585      ENDIF 
    8686      ! 
    87       REWIND( numnat_ref )              ! Namelist namtrc_ice in reference namelist : Passive tracer input data 
    8887      READ  ( numnat_ref, namtrc_ice, IOSTAT = ios, ERR = 901) 
    8988 901  IF( ios /= 0 )   CALL ctl_nam ( ios , ' namtrc_ice in reference namelist ' ) 
    90       REWIND( numnat_cfg )              ! Namelist namtrc_ice in configuration namelist : Pisces external sources of nutrients 
    9189      READ  ( numnat_cfg, namtrc_ice, IOSTAT = ios, ERR = 902 ) 
    9290 902  IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_ice in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/trcnam.F90

    r11949 r11960  
    105105      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 
    106106      ! 
    107       CALL ctl_opn( numnat_ref, 'namelist_top_ref'   , 'OLD'    , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    108       CALL ctl_opn( numnat_cfg, 'namelist_top_cfg'   , 'OLD'    , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
     107      CALL load_nml( numnat_ref, 'namelist_top_ref' , numout, lwm ) 
     108      CALL load_nml( numnat_cfg, 'namelist_top_cfg' , numout, lwm ) 
    109109      IF(lwm) CALL ctl_opn( numont, 'output.namelist.top', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE., 1 ) 
    110110      ! 
    111       REWIND( numnat_ref )              ! Namelist namtrc in reference namelist : Passive tracer variables 
    112111      READ  ( numnat_ref, namtrc_run, IOSTAT = ios, ERR = 901) 
    113112901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc in reference namelist' ) 
    114       REWIND( numnat_cfg )              ! Namelist namtrc in configuration namelist : Passive tracer variables 
    115113      READ  ( numnat_cfg, namtrc_run, IOSTAT = ios, ERR = 902 ) 
    116114902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc in configuration namelist' ) 
     
    150148      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 
    151149 
    152       REWIND( numnat_ref )              ! Namelist namtrc in reference namelist : Passive tracer variables 
    153150      READ  ( numnat_ref, namtrc, IOSTAT = ios, ERR = 901) 
    154151901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc in reference namelist' ) 
    155       REWIND( numnat_cfg )              ! Namelist namtrc in configuration namelist : Passive tracer variables 
    156152      READ  ( numnat_cfg, namtrc, IOSTAT = ios, ERR = 902 ) 
    157153902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc in configuration namelist' ) 
     
    220216      IF( ll_cfc .OR. ln_c14 ) THEN 
    221217        !                             ! Open namelist files 
    222         CALL ctl_opn( numtrc_ref, 'namelist_trc_ref'   ,     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    223         CALL ctl_opn( numtrc_cfg, 'namelist_trc_cfg'   ,     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
     218        CALL load_nml( numtrc_ref, 'namelist_trc_ref' , numout, lwm ) 
     219        CALL load_nml( numtrc_cfg, 'namelist_trc_cfg' , numout, lwm ) 
    224220        IF(lwm) CALL ctl_opn( numonr, 'output.namelist.trc', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    225221        ! 
     
    253249      ALLOCATE( ln_trdtrc(jptra) )  
    254250      ! 
    255       REWIND( numnat_ref )              ! Namelist namtrc_trd in reference namelist : Passive tracer trends 
    256251      READ  ( numnat_ref, namtrc_trd, IOSTAT = ios, ERR = 905) 
    257252905   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_trd in reference namelist' ) 
    258       REWIND( numnat_cfg )              ! Namelist namtrc_trd in configuration namelist : Passive tracer trends 
    259253      READ  ( numnat_cfg, namtrc_trd, IOSTAT = ios, ERR = 906 ) 
    260254906   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_trd in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/tests/BENCH/MY_SRC/usrdef_nam.F90

    r11536 r11960  
    6161      !!----------------------------------------------------------------------      
    6262      ! 
    63       REWIND( numnam_cfg )          ! Namelist namusr_def (exist in namelist_cfg only) 
    6463      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 903 ) 
    6564903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 
     
    7271      IF( nn_isize < 0 .AND. nn_jsize < 0 ) THEN 
    7372      ! 
    74          REWIND( numnam_ref )              ! Namelist nammpp in reference namelist: mpi variables 
    7573         READ  ( numnam_ref, nammpp, IOSTAT = ios, ERR = 901) 
    7674901      IF( ios /= 0 )   CALL ctl_nam ( ios , 'nammpp in reference namelist' ) 
    7775         ! 
    78          REWIND( numnam_cfg )              ! Namelist nammpp in configuration namelist: mpi variables 
    7976         READ  ( numnam_cfg, nammpp, IOSTAT = ios, ERR = 902 ) 
    8077902      IF( ios >  0 )   CALL ctl_nam ( ios , 'nammpp in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/tests/BENCH/MY_SRC/zdfiwm.F90

    r11949 r11960  
    405405      !!---------------------------------------------------------------------- 
    406406      ! 
    407       REWIND( numnam_ref )              ! Namelist namzdf_iwm in reference namelist : Wave-driven mixing 
    408407      READ  ( numnam_ref, namzdf_iwm, IOSTAT = ios, ERR = 901) 
    409408901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namzdf_iwm in reference namelist' ) 
    410409      ! 
    411       REWIND( numnam_cfg )              ! Namelist namzdf_iwm in configuration namelist : Wave-driven mixing 
    412410      READ  ( numnam_cfg, namzdf_iwm, IOSTAT = ios, ERR = 902 ) 
    413411902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namzdf_iwm in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/tests/CANAL/MY_SRC/domvvl.F90

    r11949 r11960  
    992992      !!----------------------------------------------------------------------  
    993993      ! 
    994       REWIND( numnam_ref )              ! Namelist nam_vvl in reference namelist :  
    995994      READ  ( numnam_ref, nam_vvl, IOSTAT = ios, ERR = 901) 
    996995901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_vvl in reference namelist' ) 
    997       REWIND( numnam_cfg )              ! Namelist nam_vvl in configuration namelist : Parameters of the run 
    998996      READ  ( numnam_cfg, nam_vvl, IOSTAT = ios, ERR = 902 ) 
    999997902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nam_vvl in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/tests/CANAL/MY_SRC/usrdef_nam.F90

    r11899 r11960  
    8484      !!---------------------------------------------------------------------- 
    8585      ! 
    86       REWIND( numnam_cfg )          ! Namelist namusr_def (exist in namelist_cfg only) 
    8786      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 
    8887902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/tests/ICE_ADV1D/MY_SRC/usrdef_nam.F90

    r11536 r11960  
    6363      !!---------------------------------------------------------------------- 
    6464      ! 
    65       REWIND( numnam_cfg )          ! Namelist namusr_def (exist in namelist_cfg only) 
    6665      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 
    6766902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/tests/ICE_ADV2D/MY_SRC/usrdef_nam.F90

    r11536 r11960  
    6363      !!---------------------------------------------------------------------- 
    6464      ! 
    65       REWIND( numnam_cfg )          ! Namelist namusr_def (exist in namelist_cfg only) 
    6665      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 
    6766902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/tests/ICE_AGRIF/MY_SRC/usrdef_nam.F90

    r11536 r11960  
    6363      !!---------------------------------------------------------------------- 
    6464      ! 
    65       REWIND( numnam_cfg )          ! Namelist namusr_def (exist in namelist_cfg only) 
    6665      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 
    6766902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/tests/ISOMIP/MY_SRC/usrdef_nam.F90

    r11536 r11960  
    6464      !!---------------------------------------------------------------------- 
    6565      ! 
    66       REWIND( numnam_cfg )          ! Namelist namusr_def (exist in namelist_cfg only) 
    6766      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 
    6867902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/tests/LOCK_EXCHANGE/MY_SRC/usrdef_nam.F90

    r11536 r11960  
    6060      !!---------------------------------------------------------------------- 
    6161      ! 
    62       REWIND( numnam_cfg )          ! Namelist namusr_def (exist in namelist_cfg only) 
    6362      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 
    6463902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/tests/OVERFLOW/MY_SRC/usrdef_nam.F90

    r11536 r11960  
    6161      !!---------------------------------------------------------------------- 
    6262      ! 
    63       REWIND( numnam_cfg )          ! Namelist namusr_def (exist in namelist_cfg only) 
    6463      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 
    6564902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/tests/VORTEX/MY_SRC/domvvl.F90

    r11949 r11960  
    988988      !!----------------------------------------------------------------------  
    989989      ! 
    990       REWIND( numnam_ref )              ! Namelist nam_vvl in reference namelist :  
    991990      READ  ( numnam_ref, nam_vvl, IOSTAT = ios, ERR = 901) 
    992991901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_vvl in reference namelist' ) 
    993       REWIND( numnam_cfg )              ! Namelist nam_vvl in configuration namelist : Parameters of the run 
    994992      READ  ( numnam_cfg, nam_vvl, IOSTAT = ios, ERR = 902 ) 
    995993902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nam_vvl in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/tests/VORTEX/MY_SRC/usrdef_nam.F90

    r11536 r11960  
    6363      !!---------------------------------------------------------------------- 
    6464      ! 
    65       REWIND( numnam_cfg )          ! Namelist namusr_def (exist in namelist_cfg only) 
    6665      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 
    6766902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/tests/WAD/MY_SRC/usrdef_nam.F90

    r11536 r11960  
    6161      !!---------------------------------------------------------------------- 
    6262      ! 
    63       REWIND( numnam_cfg )          ! Namelist namusr_def (exist in namelist_cfg only) 
    6463      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 
    6564902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 
Note: See TracChangeset for help on using the changeset viewer.