Changeset 12202


Ignore:
Timestamp:
2019-12-12T09:59:50+01:00 (5 months ago)
Author:
cetlod
Message:

dev_merge_option2 : merge in dev_r11613_ENHANCE-04_namelists_as_internalfiles

Location:
NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019
Files:
148 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/cfgs/C1D_PAPA/MY_SRC/usrdef_nam.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/ABL/sbcabl.F90

    r12179 r12202  
    7777      !!--------------------------------------------------------------------- 
    7878 
    79       REWIND( numnam_ref )              ! Namelist namsbc_abl in reference namelist : ABL parameters 
    8079      READ  ( numnam_ref, namsbc_abl, IOSTAT = ios, ERR = 901 ) 
    8180901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_abl in reference namelist' ) 
    8281      ! 
    83       REWIND( numnam_cfg )              ! Namelist namsbc_abl in configuration namelist : ABL parameters 
    8482      READ  ( numnam_cfg, namsbc_abl, IOSTAT = ios, ERR = 902 ) 
    8583902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_abl in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/ICE/icealb.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/ICE/icedia.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/ICE/icedyn.F90

    r11536 r12202  
    224224      !!------------------------------------------------------------------- 
    225225      ! 
    226       REWIND( numnam_ice_ref )         ! Namelist namdyn in reference namelist : Ice dynamics 
    227226      READ  ( numnam_ice_ref, namdyn, IOSTAT = ios, ERR = 901) 
    228227901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn in reference namelist' ) 
    229       REWIND( numnam_ice_cfg )         ! Namelist namdyn in configuration namelist : Ice dynamics 
    230228      READ  ( numnam_ice_cfg, namdyn, IOSTAT = ios, ERR = 902 ) 
    231229902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/ICE/icedyn_adv.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/ICE/icedyn_rdgrft.F90

    r11732 r12202  
    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_r12072_MERGE_OPTION2_2019/src/ICE/icedyn_rhg.F90

    r11536 r12202  
    113113      !!------------------------------------------------------------------- 
    114114      ! 
    115       REWIND( numnam_ice_ref )         ! Namelist namdyn_rhg in reference namelist : Ice dynamics 
    116115      READ  ( numnam_ice_ref, namdyn_rhg, IOSTAT = ios, ERR = 901) 
    117116901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_rhg in reference namelist' ) 
    118       REWIND( numnam_ice_cfg )         ! Namelist namdyn_rhg in configuration namelist : Ice dynamics 
    119117      READ  ( numnam_ice_cfg, namdyn_rhg, IOSTAT = ios, ERR = 902 ) 
    120118902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namdyn_rhg in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/ICE/iceistate.F90

    r11536 r12202  
    474474      !!----------------------------------------------------------------------------- 
    475475      ! 
    476       REWIND( numnam_ice_ref )              ! Namelist namini in reference namelist : Ice initial state 
    477476      READ  ( numnam_ice_ref, namini, IOSTAT = ios, ERR = 901) 
    478477901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namini in reference namelist' ) 
    479       REWIND( numnam_ice_cfg )              ! Namelist namini in configuration namelist : Ice initial state 
    480478      READ  ( numnam_ice_cfg, namini, IOSTAT = ios, ERR = 902 ) 
    481479902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namini in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/ICE/iceitd.F90

    r11732 r12202  
    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_r12072_MERGE_OPTION2_2019/src/ICE/icesbc.F90

    r12154 r12202  
    290290      !!------------------------------------------------------------------- 
    291291      ! 
    292       REWIND( numnam_ice_ref )         ! Namelist namsbc in reference namelist : Ice dynamics 
    293292      READ  ( numnam_ice_ref, namsbc, IOSTAT = ios, ERR = 901) 
    294293901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc in reference namelist' ) 
    295       REWIND( numnam_ice_cfg )         ! Namelist namsbc in configuration namelist : Ice dynamics 
    296294      READ  ( numnam_ice_cfg, namsbc, IOSTAT = ios, ERR = 902 ) 
    297295902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/ICE/icestp.F90

    r11536 r12202  
    232232      IF(lwp) WRITE(numout,*) '~~~~~~~~' 
    233233      ! 
    234       !                                ! Open the reference and configuration namelist files and namelist output file 
    235       CALL ctl_opn( numnam_ice_ref, 'namelist_ice_ref',    'OLD',     'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 
    236       CALL ctl_opn( numnam_ice_cfg, 'namelist_ice_cfg',    'OLD',     'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 
    237       IF(lwm) CALL ctl_opn( numoni, 'output.namelist.ice', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, 1 ) 
     234      !                                ! Load the reference and configuration namelist files and open namelist output file 
     235      CALL load_nml( numnam_ice_ref, 'namelist_ice_ref',    numout, lwm ) 
     236      CALL load_nml( numnam_ice_cfg, 'namelist_ice_cfg',    numout, lwm ) 
     237      IF(lwm) CALL ctl_opn( numoni , 'output.namelist.ice', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, 1 ) 
    238238      ! 
    239239      CALL par_init                ! set some ice run parameters 
     
    301301      !!------------------------------------------------------------------- 
    302302      ! 
    303       REWIND( numnam_ice_ref )      ! Namelist nampar in reference namelist : Parameters for ice 
    304303      READ  ( numnam_ice_ref, nampar, IOSTAT = ios, ERR = 901) 
    305304901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampar in reference namelist' ) 
    306       REWIND( numnam_ice_cfg )      ! Namelist nampar in configuration namelist : Parameters for ice 
    307305      READ  ( numnam_ice_cfg, nampar, IOSTAT = ios, ERR = 902 ) 
    308306902   IF( ios > 0 )   CALL ctl_nam ( ios , 'nampar in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/ICE/icethd.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/ICE/icethd_da.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/ICE/icethd_do.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/ICE/icethd_pnd.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/ICE/icethd_sal.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/ICE/icethd_zdf.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/NST/agrif_user.F90

    r12191 r12202  
    724724      !!-------------------------------------------------------------------------------------- 
    725725      ! 
    726       REWIND( numnam_ref )              ! Namelist namagrif in reference namelist : AGRIF zoom 
    727726      READ  ( numnam_ref, namagrif, IOSTAT = ios, ERR = 901) 
    728 901 IF( ios /= 0 )   CALL ctl_nam ( ios , 'namagrif in reference namelist' ) 
    729       REWIND( numnam_cfg )              ! Namelist namagrif in configuration namelist : AGRIF zoom 
     727901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namagrif in reference namelist' ) 
    730728      READ  ( numnam_cfg, namagrif, IOSTAT = ios, ERR = 902 ) 
    731 902 IF( ios >  0 )   CALL ctl_nam ( ios , 'namagrif in configuration namelist' ) 
     729902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namagrif in configuration namelist' ) 
     730       
    732731      IF(lwm) WRITE ( numond, namagrif ) 
    733732      ! 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/ASM/asminc.F90

    r11536 r12202  
    145145      ln_temnofreeze = .FALSE. 
    146146 
    147       REWIND( numnam_ref )              ! Namelist nam_asminc in reference namelist : Assimilation increment 
    148147      READ  ( numnam_ref, nam_asminc, IOSTAT = ios, ERR = 901) 
    149148901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_asminc in reference namelist' ) 
    150       REWIND( numnam_cfg )              ! Namelist nam_asminc in configuration namelist : Assimilation increment 
    151149      READ  ( numnam_cfg, nam_asminc, IOSTAT = ios, ERR = 902 ) 
    152150902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nam_asminc in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/BDY/bdydta.F90

    r12184 r12202  
    365365      INTEGER ::   ierror, ios     !  
    366366      ! 
     367      INTEGER ::   nbdy_rdstart, nbdy_loc 
     368      CHARACTER(LEN=50)                      ::   cerrmsg       ! error string 
    367369      CHARACTER(len=3)                       ::   cl3           !  
    368370      CHARACTER(len=100)                     ::   cn_dir        ! Root directory for location of data files 
     
    407409      ! Read namelists 
    408410      ! -------------- 
    409       REWIND(numnam_cfg) 
     411      nbdy_rdstart = 1 
    410412      DO jbdy = 1, nb_bdy 
    411413 
     
    413415         WRITE(ctmp2, '(a,i2)') 'block nambdy_dta number ', jbdy 
    414416 
    415          ! There is only one nambdy_dta block in namelist_ref -> use it for each bdy so we do a rewind  
    416          REWIND(numnam_ref) 
     417         ! There is only one nambdy_dta block in namelist_ref -> use it for each bdy so we read from the beginning 
    417418         READ  ( numnam_ref, nambdy_dta, IOSTAT = ios, ERR = 901) 
    418419901      IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy_dta in reference namelist' ) 
     
    423424            & .OR. ( dta_bdy(jbdy)%lneed_tra   .AND.       nn_tra_dta(jbdy)    == 1 )   & 
    424425            & .OR. ( dta_bdy(jbdy)%lneed_ice   .AND.       nn_ice_dta(jbdy)    == 1 )   )   THEN 
    425             ! WARNING: we don't do a rewind here, each bdy reads its own nambdy_dta block one after another 
    426             READ  ( numnam_cfg, nambdy_dta, IOSTAT = ios, ERR = 902 ) 
     426            ! 
     427            ! Need to support possibility of reading more than one 
     428            ! nambdy_dta from the namelist_cfg internal file. 
     429            ! Do this by finding the jbdy'th occurence of nambdy_dta in the 
     430            ! character buffer as the starting point. 
     431            ! 
     432            nbdy_loc = INDEX( numnam_cfg( nbdy_rdstart: ), 'nambdy_dta' ) 
     433            IF( nbdy_loc .GT. 0 ) THEN 
     434               nbdy_rdstart = nbdy_rdstart + nbdy_loc 
     435            ELSE 
     436               WRITE(cerrmsg,'(A,I4,A)') 'Error: entry number ',jbdy,' of nambdy_dta not found' 
     437               ios = -1 
     438               CALL ctl_nam ( ios , cerrmsg ) 
     439            ENDIF 
     440            READ  ( numnam_cfg( MAX( 1, nbdy_rdstart - 2 ): ), nambdy_dta, IOSTAT = ios, ERR = 902) 
    427441902         IF( ios >  0 )   CALL ctl_nam ( ios , 'nambdy_dta in configuration namelist' ) 
    428442            IF(lwm) WRITE( numond, nambdy_dta )            
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/BDY/bdyini.F90

    r12184 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/BDY/bdytides.F90

    r12184 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/C1D/c1d.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/C1D/dtauvd.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/C1D/dyndmp.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/CRS/crsini.F90

    r11536 r12202  
    8080     !--------------------------------------------------------- 
    8181     ! 
    82       REWIND( numnam_ref )              ! Namelist namrun in reference namelist : Parameters of the run 
    8382      READ  ( numnam_ref, namcrs, IOSTAT = ios, ERR = 901) 
    8483901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcrs in reference namelist' ) 
    85       REWIND( numnam_cfg )              ! Namelist namrun in configuration namelist : Parameters of the run 
    8684      READ  ( numnam_cfg, namcrs, IOSTAT = ios, ERR = 902 ) 
    8785902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcrs in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/DIA/dia25h.F90

    r11536 r12202  
    5353      !!---------------------------------------------------------------------- 
    5454      ! 
    55       REWIND ( numnam_ref )              ! Read Namelist nam_dia25h in reference namelist : 25hour mean diagnostics 
    5655      READ   ( numnam_ref, nam_dia25h, IOSTAT=ios, ERR= 901 ) 
    5756901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_dia25h in reference namelist' ) 
    58       REWIND( numnam_cfg )              ! Namelist nam_dia25h in configuration namelist  25hour diagnostics 
    5957      READ  ( numnam_cfg, nam_dia25h, IOSTAT = ios, ERR = 902 ) 
    6058902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nam_dia25h in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/DIA/diadct.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/DIA/diahsb.F90

    r12166 r12202  
    365365         WRITE(numout,*) '~~~~~~~~~~~~ ' 
    366366      ENDIF 
    367       REWIND( numnam_ref )              ! Namelist namhsb in reference namelist 
    368367      READ  ( numnam_ref, namhsb, IOSTAT = ios, ERR = 901) 
    369368901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namhsb in reference namelist' ) 
    370       REWIND( numnam_cfg )              ! Namelist namhsb in configuration namelist 
    371369      READ  ( numnam_cfg, namhsb, IOSTAT = ios, ERR = 902 ) 
    372370902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namhsb in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/DIA/diaptr.F90

    r12109 r12202  
    344344         &  iom_use( 'sophtvtr' ) .OR. iom_use( 'uocetr_vsum_cumul' ) )  l_diaptr  = .TRUE. 
    345345 
    346   
     346      READ  ( numnam_ref, namptr, IOSTAT = ios, ERR = 901) 
     347901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namptr in reference namelist' ) 
     348      ! 
     349      READ  ( numnam_cfg, namptr, IOSTAT = ios, ERR = 902 ) 
     350902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namptr in configuration namelist' ) 
     351      IF(lwm) WRITE ( numond, namptr ) 
     352 
    347353      IF(lwp) THEN                     ! Control print 
    348354         WRITE(numout,*) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/DIA/diatmb.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/DIU/diurnal_bulk.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/DOM/closea.F90

    r12173 r12202  
    7878      !!--------------------------------------------------------------------- 
    7979      !! 
    80       REWIND( numnam_ref )              ! Namelist namclo in reference namelist : Lateral momentum boundary condition 
    8180      READ  ( numnam_ref, namclo, IOSTAT = ios, ERR = 901 ) 
    8281901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namclo in reference namelist') 
    83       REWIND( numnam_cfg )              ! Namelist namclo in configuration namelist : Lateral momentum boundary condition 
    8482      READ  ( numnam_cfg, namclo, IOSTAT = ios, ERR = 902 ) 
    8583902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namclo in configuration namelist') 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/DOM/domain.F90

    r12172 r12202  
    298298      ! 
    299299      ! 
    300       REWIND( numnam_ref )              ! Namelist namrun in reference namelist : Parameters of the run 
    301300      READ  ( numnam_ref, namrun, IOSTAT = ios, ERR = 901) 
    302301901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namrun in reference namelist' ) 
    303       REWIND( numnam_cfg )              ! Namelist namrun in configuration namelist : Parameters of the run 
    304302      READ  ( numnam_cfg, namrun, IOSTAT = ios, ERR = 902 ) 
    305303902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namrun in configuration namelist' ) 
     
    395393#endif 
    396394 
    397       REWIND( numnam_ref )              ! Namelist namdom in reference namelist : space & time domain (bathymetry, mesh, timestep) 
    398395      READ  ( numnam_ref, namdom, IOSTAT = ios, ERR = 903) 
    399396903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdom in reference namelist' ) 
    400       REWIND( numnam_cfg )              ! Namelist namdom in configuration namelist : space & time domain (bathymetry, mesh, timestep) 
    401397      READ  ( numnam_cfg, namdom, IOSTAT = ios, ERR = 904 ) 
    402398904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdom in configuration namelist' ) 
     
    426422#if defined key_netcdf4 
    427423      !                             ! NetCDF 4 case   ("key_netcdf4" defined) 
    428       REWIND( numnam_ref )              ! Namelist namnc4 in reference namelist : NETCDF 
    429424      READ  ( numnam_ref, namnc4, IOSTAT = ios, ERR = 907) 
    430425907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namnc4 in reference namelist' ) 
    431       REWIND( numnam_cfg )              ! Namelist namnc4 in configuration namelist : NETCDF 
    432426      READ  ( numnam_cfg, namnc4, IOSTAT = ios, ERR = 908 ) 
    433427908   IF( ios >  0 )   CALL ctl_nam ( ios , 'namnc4 in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/DOM/dommsk.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/DOM/domvvl.F90

    r12166 r12202  
    10191019      !!----------------------------------------------------------------------  
    10201020      ! 
    1021       REWIND( numnam_ref )              ! Namelist nam_vvl in reference namelist :  
    10221021      READ  ( numnam_ref, nam_vvl, IOSTAT = ios, ERR = 901) 
    10231022901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_vvl in reference namelist' ) 
    1024       REWIND( numnam_cfg )              ! Namelist nam_vvl in configuration namelist : Parameters of the run 
    10251023      READ  ( numnam_cfg, nam_vvl, IOSTAT = ios, ERR = 902 ) 
    10261024902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nam_vvl in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/DOM/dtatsd.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/DYN/dynadv.F90

    r11536 r12202  
    104104      ENDIF 
    105105      ! 
    106       REWIND( numnam_ref )              ! Namelist namdyn_adv in reference namelist : Momentum advection scheme 
    107106      READ  ( numnam_ref, namdyn_adv, IOSTAT = ios, ERR = 901) 
    108107901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_adv in reference namelist' ) 
    109       REWIND( numnam_cfg )              ! Namelist namdyn_adv in configuration namelist : Momentum advection scheme 
    110108      READ  ( numnam_cfg, namdyn_adv, IOSTAT = ios, ERR = 902 ) 
    111109902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_adv in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/DYN/dynhpg.F90

    r12166 r12202  
    152152      !!---------------------------------------------------------------------- 
    153153      ! 
    154       REWIND( numnam_ref )              ! Namelist namdyn_hpg in reference namelist : Hydrostatic pressure gradient 
    155154      READ  ( numnam_ref, namdyn_hpg, IOSTAT = ios, ERR = 901) 
    156155901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_hpg in reference namelist' ) 
    157156      ! 
    158       REWIND( numnam_cfg )              ! Namelist namdyn_hpg in configuration namelist : Hydrostatic pressure gradient 
    159157      READ  ( numnam_cfg, namdyn_hpg, IOSTAT = ios, ERR = 902 ) 
    160158902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_hpg in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/DYN/dynspg.F90

    r12184 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/DYN/dynvor.F90

    r11536 r12202  
    849849      ENDIF 
    850850      ! 
    851       REWIND( numnam_ref )              ! Namelist namdyn_vor in reference namelist : Vorticity scheme options 
    852851      READ  ( numnam_ref, namdyn_vor, IOSTAT = ios, ERR = 901) 
    853852901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_vor in reference namelist' ) 
    854       REWIND( numnam_cfg )              ! Namelist namdyn_vor in configuration namelist : Vorticity scheme options 
    855853      READ  ( numnam_cfg, namdyn_vor, IOSTAT = ios, ERR = 902 ) 
    856854902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_vor in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/DYN/wet_dry.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/FLO/floats.F90

    r11536 r12202  
    8686      IF(lwp) WRITE(numout,*) '~~~~~~~' 
    8787 
    88       REWIND( numnam_ref )              ! Namelist namflo in reference namelist : Floats 
    8988      READ  ( numnam_ref, namflo, IOSTAT = ios, ERR = 901) 
    9089901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namflo in reference namelist' ) 
    9190 
    92       REWIND( numnam_cfg )              ! Namelist namflo in configuration namelist : Floats 
    9391      READ  ( numnam_cfg, namflo, IOSTAT = ios, ERR = 902 ) 
    9492902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namflo in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/ICB/icbini.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/IOM/in_out_manager.F90

    r12154 r12202  
    142142   INTEGER ::   numnul          =   -1      !: logical unit for /dev/null 
    143143      !                                     !  early output can be collected; do not change 
    144    INTEGER ::   numnam_ref      =   -1      !: logical unit for reference namelist 
    145    INTEGER ::   numnam_cfg      =   -1      !: logical unit for configuration specific namelist 
    146144   INTEGER ::   numond          =   -1      !: logical unit for Output Namelist Dynamics 
    147    INTEGER ::   numnam_ice_ref  =   -1      !: logical unit for ice reference namelist 
    148    INTEGER ::   numnam_ice_cfg  =   -1      !: logical unit for ice reference namelist 
    149145   INTEGER ::   numoni          =   -1      !: logical unit for Output Namelist Ice 
    150146   INTEGER ::   numevo_ice      =   -1      !: logical unit for ice variables (temp. evolution) 
    151147   INTEGER ::   numrun          =   -1      !: logical unit for run statistics 
    152148   INTEGER ::   numdct_in       =   -1      !: logical unit for transports computing 
    153    INTEGER ::   numdct_vol      =   -1      !: logical unit for voulume transports output 
    154    INTEGER ::   numdct_heat     =   -1      !: logical unit for heat    transports output 
    155    INTEGER ::   numdct_salt     =   -1      !: logical unit for salt    transports output 
     149   INTEGER ::   numdct_vol      =   -1      !: logical unit for volume transports output 
     150   INTEGER ::   numdct_heat     =   -1      !: logical unit for heat   transports output 
     151   INTEGER ::   numdct_salt     =   -1      !: logical unit for salt   transports output 
    156152   INTEGER ::   numfl           =   -1      !: logical unit for floats ascii output 
    157153   INTEGER ::   numflo          =   -1      !: logical unit for floats ascii output 
     154      ! 
     155   CHARACTER(LEN=:), ALLOCATABLE :: numnam_ref      !: character buffer for reference namelist 
     156   CHARACTER(LEN=:), ALLOCATABLE :: numnam_cfg      !: character buffer for configuration specific namelist 
     157   CHARACTER(LEN=:), ALLOCATABLE :: numnam_ice_ref  !: character buffer for ice reference namelist 
     158   CHARACTER(LEN=:), ALLOCATABLE :: numnam_ice_cfg  !: character buffer for ice configuration specific namelist 
    158159 
    159160   !!---------------------------------------------------------------------- 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/ISF/isfstp.F90

    r12143 r12202  
    289289      !!---------------------------------------------------------------------- 
    290290      ! 
    291       REWIND( numnam_ref )              ! Namelist namsbc_rnf in reference namelist : Runoffs  
    292291      READ  ( numnam_ref, namisf, IOSTAT = ios, ERR = 901) 
    293292901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namisf in reference namelist' ) 
    294293      ! 
    295       REWIND( numnam_cfg )              ! Namelist namsbc_rnf in configuration namelist : Runoffs 
    296294      READ  ( numnam_cfg, namisf, IOSTAT = ios, ERR = 902 ) 
    297295902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namisf in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/LBC/lib_mpp.F90

    r11536 r12202  
    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 
     
    499502#endif 
    500503   END SUBROUTINE mpp_delay_rcv 
     504 
     505   SUBROUTINE mpp_bcast_nml( cdnambuff , kleng ) 
     506      CHARACTER(LEN=:)    , ALLOCATABLE, INTENT(INOUT) :: cdnambuff 
     507      INTEGER                          , INTENT(INOUT) :: kleng 
     508      !!---------------------------------------------------------------------- 
     509      !!                  ***  routine mpp_bcast_nml  *** 
     510      !! 
     511      !! ** Purpose :   broadcast namelist character buffer 
     512      !! 
     513      !!---------------------------------------------------------------------- 
     514      !! 
     515      INTEGER ::   iflag 
     516      !!---------------------------------------------------------------------- 
     517      ! 
     518#if defined key_mpp_mpi 
     519      call MPI_BCAST(kleng, 1, MPI_INT, 0, mpi_comm_oce, iflag) 
     520      call MPI_BARRIER(mpi_comm_oce, iflag) 
     521!$AGRIF_DO_NOT_TREAT 
     522      IF ( .NOT. ALLOCATED(cdnambuff) ) ALLOCATE( CHARACTER(LEN=kleng) :: cdnambuff ) 
     523!$AGRIF_END_DO_NOT_TREAT 
     524      call MPI_BCAST(cdnambuff, kleng, MPI_CHARACTER, 0, mpi_comm_oce, iflag) 
     525      call MPI_BARRIER(mpi_comm_oce, iflag) 
     526#endif 
     527      ! 
     528   END SUBROUTINE mpp_bcast_nml 
    501529 
    502530    
     
    10681096 
    10691097   !!---------------------------------------------------------------------- 
    1070    !!   ctl_stop, ctl_warn, get_unit, ctl_opn, ctl_nam   routines 
     1098   !!   ctl_stop, ctl_warn, get_unit, ctl_opn, ctl_nam, load_nml   routines 
    10711099   !!---------------------------------------------------------------------- 
    10721100 
     
    12041232         &  OPEN(UNIT=knum,FILE='NUL', FORM=cdform, ACCESS=cdacce, STATUS=cdstat                      , ERR=100, IOSTAT=iost )    
    12051233      IF( iost == 0 ) THEN 
    1206          IF(ldwp) THEN 
     1234         IF(ldwp .AND. kout > 0) THEN 
    12071235            WRITE(kout,*) '     file   : ', TRIM(clfile),' open ok' 
    12081236            WRITE(kout,*) '     unit   = ', knum 
     
    12791307   END FUNCTION get_unit 
    12801308 
     1309   SUBROUTINE load_nml( cdnambuff , cdnamfile, kout, ldwp) 
     1310      CHARACTER(LEN=:)    , ALLOCATABLE, INTENT(INOUT) :: cdnambuff 
     1311      CHARACTER(LEN=*), INTENT(IN )                :: cdnamfile 
     1312      CHARACTER(LEN=256)                           :: chline 
     1313      CHARACTER(LEN=1)                             :: csp 
     1314      INTEGER, INTENT(IN)                          :: kout 
     1315      LOGICAL, INTENT(IN)                          :: ldwp  !: .true. only for the root broadcaster 
     1316      INTEGER                                      :: itot, iun, iltc, inl, ios, itotsav 
     1317      ! 
     1318      !csp = NEW_LINE('A') 
     1319      ! a new line character is the best seperator but some systems (e.g.Cray) 
     1320      ! seem to terminate namelist reads from internal files early if they  
     1321      ! encounter new-lines. Use a single space for safety. 
     1322      csp = ' ' 
     1323      ! 
     1324      ! Check if the namelist buffer has already been allocated. Return if it has. 
     1325      ! 
     1326      IF ( ALLOCATED( cdnambuff ) ) RETURN 
     1327      IF( ldwp ) THEN 
     1328         ! 
     1329         ! Open namelist file 
     1330         ! 
     1331         CALL ctl_opn( iun, cdnamfile, 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, kout, ldwp ) 
     1332         ! 
     1333         ! First pass: count characters excluding comments and trimable white space 
     1334         ! 
     1335         itot=0 
     1336     10  READ(iun,'(A256)',END=20,ERR=20) chline 
     1337         iltc = LEN_TRIM(chline) 
     1338         IF ( iltc.GT.0 ) THEN 
     1339          inl = INDEX(chline, '!')  
     1340          IF( inl.eq.0 ) THEN 
     1341           itot = itot + iltc + 1                                ! +1 for the newline character 
     1342          ELSEIF( inl.GT.0 .AND. LEN_TRIM( chline(1:inl-1) ).GT.0 ) THEN 
     1343           itot = itot + inl                                  !  includes +1 for the newline character 
     1344          ENDIF 
     1345         ENDIF 
     1346         GOTO 10 
     1347     20  CONTINUE 
     1348         ! 
     1349         ! Allocate text cdnambuff for condensed namelist 
     1350         ! 
     1351!$AGRIF_DO_NOT_TREAT 
     1352         ALLOCATE( CHARACTER(LEN=itot) :: cdnambuff ) 
     1353!$AGRIF_END_DO_NOT_TREAT 
     1354         itotsav = itot 
     1355         ! 
     1356         ! Second pass: read and transfer pruned characters into cdnambuff 
     1357         ! 
     1358         REWIND(iun) 
     1359         itot=1 
     1360     30  READ(iun,'(A256)',END=40,ERR=40) chline 
     1361         iltc = LEN_TRIM(chline) 
     1362         IF ( iltc.GT.0 ) THEN 
     1363          inl = INDEX(chline, '!') 
     1364          IF( inl.eq.0 ) THEN 
     1365           inl = iltc 
     1366          ELSE 
     1367           inl = inl - 1 
     1368          ENDIF 
     1369          IF( inl.GT.0 .AND. LEN_TRIM( chline(1:inl) ).GT.0 ) THEN 
     1370             cdnambuff(itot:itot+inl-1) = chline(1:inl) 
     1371             WRITE( cdnambuff(itot+inl:itot+inl), '(a)' ) csp 
     1372             itot = itot + inl + 1 
     1373          ENDIF 
     1374         ENDIF 
     1375         GOTO 30 
     1376     40  CONTINUE 
     1377         itot = itot - 1 
     1378         IF( itotsav .NE. itot ) WRITE(*,*) 'WARNING in load_nml. Allocated ',itotsav,' for read buffer; but used ',itot 
     1379         ! 
     1380         ! Close namelist file 
     1381         ! 
     1382         CLOSE(iun) 
     1383         !write(*,'(32A)') cdnambuff 
     1384      ENDIF 
     1385#if defined key_mpp_mpi 
     1386      CALL mpp_bcast_nml( cdnambuff, itot ) 
     1387#endif 
     1388  END SUBROUTINE load_nml 
     1389 
     1390 
    12811391   !!---------------------------------------------------------------------- 
    12821392END MODULE lib_mpp 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/LBC/mppini.F90

    r11640 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/LDF/ldfdyn.F90

    r11653 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/LDF/ldftra.F90

    r12166 r12202  
    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' ) 
     
    510508      ENDIF 
    511509      ! 
    512       REWIND( numnam_ref )              ! Namelist namtra_eiv in reference namelist : eddy induced velocity param. 
    513510      READ  ( numnam_ref, namtra_eiv, IOSTAT = ios, ERR = 901) 
    514511901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_eiv in reference namelist' ) 
    515512      ! 
    516       REWIND( numnam_cfg )              ! Namelist namtra_eiv in configuration namelist : eddy induced velocity param. 
    517513      READ  ( numnam_cfg, namtra_eiv, IOSTAT = ios, ERR = 902 ) 
    518514902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_eiv in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/OBS/diaobs.F90

    r11536 r12202  
    201201 
    202202      ! Read namelist namobs : control observation diagnostics 
    203       REWIND( numnam_ref )   ! Namelist namobs in reference namelist 
    204203      READ  ( numnam_ref, namobs, IOSTAT = ios, ERR = 901) 
    205204901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namobs in reference namelist' ) 
    206       REWIND( numnam_cfg )   ! Namelist namobs in configuration namelist 
    207205      READ  ( numnam_cfg, namobs, IOSTAT = ios, ERR = 902 ) 
    208206902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namobs in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/SBC/sbcapr.F90

    r12154 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/SBC/sbcblk.F90

    r12192 r12202  
    178178      ! 
    179179      !                             !** read bulk namelist 
    180       REWIND( numnam_ref )                !* Namelist namsbc_blk in reference namelist : bulk parameters 
    181180      READ  ( numnam_ref, namsbc_blk, IOSTAT = ios, ERR = 901) 
    182181901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_blk in reference namelist' ) 
    183182      ! 
    184       REWIND( numnam_cfg )                !* Namelist namsbc_blk in configuration namelist : bulk parameters 
    185183      READ  ( numnam_cfg, namsbc_blk, IOSTAT = ios, ERR = 902 ) 
    186184902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_blk in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/SBC/sbccpl.F90

    r12166 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/SBC/sbcflx.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/SBC/sbcice_cice.F90

    r12154 r12202  
    762762         sn_bot5 = FLD_N( 'botmeltn5_1m' ,    -1.    ,  'botmeltn5' ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    ) 
    763763 
    764          REWIND( numnam_ref )              ! Namelist namsbc_cice in reference namelist :  
    765764         READ  ( numnam_ref, namsbc_cice, IOSTAT = ios, ERR = 901) 
    766765901      IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_cice in reference namelist' ) 
    767766 
    768          REWIND( numnam_cfg )              ! Namelist namsbc_cice in configuration namelist : Parameters of the run 
    769767         READ  ( numnam_cfg, namsbc_cice, IOSTAT = ios, ERR = 902 ) 
    770768902      IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_cice in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/SBC/sbcice_if.F90

    r11536 r12202  
    7474         !                                      ! ====================== ! 
    7575         ! set file information 
    76          REWIND( numnam_ref )              ! Namelist namsbc_iif in reference namelist : Ice if file 
    7776         READ  ( numnam_ref, namsbc_iif, IOSTAT = ios, ERR = 901) 
    7877901      IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_iif in reference namelist' ) 
    7978 
    80          REWIND( numnam_cfg )              ! Namelist Namelist namsbc_iif in configuration namelist : Ice if file 
    8179         READ  ( numnam_cfg, namsbc_iif, IOSTAT = ios, ERR = 902 ) 
    8280902      IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_iif in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/SBC/sbcmod.F90

    r12172 r12202  
    110110      ! 
    111111      !                       !**  read Surface Module namelist 
    112       REWIND( numnam_ref )          !* Namelist namsbc in reference namelist : Surface boundary 
    113112      READ  ( numnam_ref, namsbc, IOSTAT = ios, ERR = 901) 
    114113901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc in reference namelist' ) 
    115       REWIND( numnam_cfg )          !* Namelist namsbc in configuration namelist : Parameters of the run 
    116114      READ  ( numnam_cfg, namsbc, IOSTAT = ios, ERR = 902 ) 
    117115902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/SBC/sbcrnf.F90

    r12172 r12202  
    275275      !                                   ! ============ 
    276276      ! 
    277       REWIND( numnam_ref )              ! Namelist namsbc_rnf in reference namelist : Runoffs  
    278277      READ  ( numnam_ref, namsbc_rnf, IOSTAT = ios, ERR = 901) 
    279278901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_rnf in reference namelist' ) 
    280279 
    281       REWIND( numnam_cfg )              ! Namelist namsbc_rnf in configuration namelist : Runoffs 
    282280      READ  ( numnam_cfg, namsbc_rnf, IOSTAT = ios, ERR = 902 ) 
    283281902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_rnf in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/SBC/sbcssr.F90

    r12113 r12202  
    180180      ENDIF 
    181181      !  
    182       REWIND( numnam_ref )              ! Namelist namsbc_ssr in reference namelist :  
    183182      READ  ( numnam_ref, namsbc_ssr, IOSTAT = ios, ERR = 901) 
    184183901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_ssr in reference namelist' ) 
    185184 
    186       REWIND( numnam_cfg )              ! Namelist namsbc_ssr in configuration namelist : 
    187185      READ  ( numnam_cfg, namsbc_ssr, IOSTAT = ios, ERR = 902 ) 
    188186902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_ssr in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/SBC/sbcwave.F90

    r11536 r12202  
    395395      !!--------------------------------------------------------------------- 
    396396      ! 
    397       REWIND( numnam_ref )              ! Namelist namsbc_wave in reference namelist : File for drag coeff. from wave model 
    398397      READ  ( numnam_ref, namsbc_wave, IOSTAT = ios, ERR = 901) 
    399398901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_wave in reference namelist' ) 
    400399          
    401       REWIND( numnam_cfg )              ! Namelist namsbc_wave in configuration namelist : File for drag coeff. from wave model 
    402400      READ  ( numnam_cfg, namsbc_wave, IOSTAT = ios, ERR = 902 ) 
    403401902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_wave in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/STO/stopar.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/TDE/tide_mod.F90

    r12065 r12202  
    132132      sn_tide_cnames(:) = '' 
    133133      ! Read Namelist nam_tide 
    134       REWIND( numnam_ref )              ! Namelist nam_tide in reference namelist : Tides 
    135134      READ  ( numnam_ref, nam_tide, IOSTAT = ios, ERR = 901) 
    136135901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_tide in reference namelist' ) 
    137136      ! 
    138       REWIND( numnam_cfg )              ! Namelist nam_tide in configuration namelist : Tides 
    139137      READ  ( numnam_cfg, nam_tide, IOSTAT = ios, ERR = 902 ) 
    140138902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nam_tide in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/TRA/eosbn2.F90

    r11993 r12202  
    12351235      !!---------------------------------------------------------------------- 
    12361236      ! 
    1237       REWIND( numnam_ref )              ! Namelist nameos in reference namelist : equation of state 
    12381237      READ  ( numnam_ref, nameos, IOSTAT = ios, ERR = 901 ) 
    12391238901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nameos in reference namelist' ) 
    12401239      ! 
    1241       REWIND( numnam_cfg )              ! Namelist nameos in configuration namelist : equation of state 
    12421240      READ  ( numnam_cfg, nameos, IOSTAT = ios, ERR = 902 ) 
    12431241902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nameos in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/TRA/traadv.F90

    r12109 r12202  
    195195      ! 
    196196      !                                !==  Namelist  ==! 
    197       REWIND( numnam_ref )                   ! Namelist namtra_adv in reference namelist : Tracer advection scheme 
    198197      READ  ( numnam_ref, namtra_adv, IOSTAT = ios, ERR = 901) 
    199198901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_adv in reference namelist' ) 
    200199      ! 
    201       REWIND( numnam_cfg )                   ! Namelist namtra_adv in configuration namelist : Tracer advection scheme 
    202200      READ  ( numnam_cfg, namtra_adv, IOSTAT = ios, ERR = 902 ) 
    203201902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_adv in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/TRA/trabbc.F90

    r12109 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/TRA/trabbl.F90

    r11536 r12202  
    483483      !!---------------------------------------------------------------------- 
    484484      ! 
    485       REWIND( numnam_ref )              ! Namelist nambbl in reference namelist : Bottom boundary layer scheme 
    486485      READ  ( numnam_ref, nambbl, IOSTAT = ios, ERR = 901) 
    487486901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambbl in reference namelist' ) 
    488487      ! 
    489       REWIND( numnam_cfg )              ! Namelist nambbl in configuration namelist : Bottom boundary layer scheme 
    490488      READ  ( numnam_cfg, nambbl, IOSTAT = ios, ERR = 902 ) 
    491489902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambbl in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/TRA/tradmp.F90

    r11536 r12202  
    177177      !!---------------------------------------------------------------------- 
    178178      ! 
    179       REWIND( numnam_ref )   ! Namelist namtra_dmp in reference namelist : T & S relaxation 
    180179      READ  ( numnam_ref, namtra_dmp, IOSTAT = ios, ERR = 901) 
    181180901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_dmp in reference namelist' ) 
    182181      ! 
    183       REWIND( numnam_cfg )   ! Namelist namtra_dmp in configuration namelist : T & S relaxation 
    184182      READ  ( numnam_cfg, namtra_dmp, IOSTAT = ios, ERR = 902 ) 
    185183902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_dmp in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/TRA/tramle.F90

    r11536 r12202  
    266266      !!---------------------------------------------------------------------- 
    267267 
    268       REWIND( numnam_ref )              ! Namelist namtra_mle in reference namelist : Tracer advection scheme 
    269268      READ  ( numnam_ref, namtra_mle, IOSTAT = ios, ERR = 901) 
    270269901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_mle in reference namelist' ) 
    271270 
    272       REWIND( numnam_cfg )              ! Namelist namtra_mle in configuration namelist : Tracer advection scheme 
    273271      READ  ( numnam_cfg, namtra_mle, IOSTAT = ios, ERR = 902 ) 
    274272902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_mle in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/TRA/traqsr.F90

    r11536 r12202  
    336336      !!---------------------------------------------------------------------- 
    337337      ! 
    338       REWIND( numnam_ref )              ! Namelist namtra_qsr in reference     namelist 
    339338      READ  ( numnam_ref, namtra_qsr, IOSTAT = ios, ERR = 901) 
    340339901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_qsr in reference namelist' ) 
    341340      ! 
    342       REWIND( numnam_cfg )              ! Namelist namtra_qsr in configuration namelist 
    343341      READ  ( numnam_cfg, namtra_qsr, IOSTAT = ios, ERR = 902 ) 
    344342902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_qsr in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/TRD/trdini.F90

    r11536 r12202  
    4646      !!---------------------------------------------------------------------- 
    4747      ! 
    48       REWIND( numnam_ref )              ! Namelist namtrd in reference namelist : trends diagnostic 
    4948      READ  ( numnam_ref, namtrd, IOSTAT = ios, ERR = 901 ) 
    5049901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrd in reference namelist' ) 
    5150      ! 
    52       REWIND( numnam_cfg )              ! Namelist namtrd in configuration namelist : trends diagnostic 
    5351      READ  ( numnam_cfg, namtrd, IOSTAT = ios, ERR = 902 ) 
    5452902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrd in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/TRD/trdmxl.F90

    r11536 r12202  
    732732      !!---------------------------------------------------------------------- 
    733733      ! 
    734       REWIND( numnam_ref )              ! Namelist namtrd_mxl in reference namelist : mixed layer trends diagnostic 
    735734      READ  ( numnam_ref, namtrd_mxl, IOSTAT = ios, ERR = 901 ) 
    736735901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrd_mxl in reference namelist' ) 
    737736 
    738       REWIND( numnam_cfg )              ! Namelist namtrd_mxl in configuration namelist : mixed layer trends diagnostic 
    739737      READ  ( numnam_cfg, namtrd_mxl, IOSTAT = ios, ERR = 902 ) 
    740738902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrd_mxl in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/USR/usrdef_nam.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/ZDF/zdfdrg.F90

    r11536 r12202  
    236236      !                     !==  drag nature  ==! 
    237237      ! 
    238       REWIND( numnam_ref )                   ! Namelist namdrg in reference namelist 
    239238      READ  ( numnam_ref, namdrg, IOSTAT = ios, ERR = 901) 
    240239901   IF( ios /= 0 )   CALL ctl_nam( ios , 'namdrg in reference namelist' ) 
    241       REWIND( numnam_cfg )                   ! Namelist namdrg in configuration namelist 
    242240      READ  ( numnam_cfg, namdrg, IOSTAT = ios, ERR = 902 ) 
    243241902   IF( ios >  0 )   CALL ctl_nam( ios , 'namdrg in configuration namelist' ) 
     
    335333      !                          !==  read namlist  ==! 
    336334      ! 
    337       REWIND( numnam_ref )                   ! Namelist cl_namdrg in reference namelist 
    338335      IF(ll_top)   READ  ( numnam_ref, namdrg_top, IOSTAT = ios, ERR = 901) 
    339336      IF(ll_bot)   READ  ( numnam_ref, namdrg_bot, IOSTAT = ios, ERR = 901) 
    340337901   IF( ios /= 0 )   CALL ctl_nam( ios , TRIM(cl_namref) ) 
    341       REWIND( numnam_cfg )                   ! Namelist cd_namdrg in configuration namelist 
    342338      IF(ll_top)   READ  ( numnam_cfg, namdrg_top, IOSTAT = ios, ERR = 902 ) 
    343339      IF(ll_bot)   READ  ( numnam_cfg, namdrg_bot, IOSTAT = ios, ERR = 902 ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/ZDF/zdfgls.F90

    r11536 r12202  
    857857      !!---------------------------------------------------------- 
    858858      ! 
    859       REWIND( numnam_ref )              ! Namelist namzdf_gls in reference namelist : Vertical eddy diffivity and viscosity using gls turbulent closure scheme 
    860859      READ  ( numnam_ref, namzdf_gls, IOSTAT = ios, ERR = 901) 
    861860901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namzdf_gls in reference namelist' ) 
    862861 
    863       REWIND( numnam_cfg )              ! Namelist namzdf_gls in configuration namelist : Vertical eddy diffivity and viscosity using gls turbulent closure scheme 
    864862      READ  ( numnam_cfg, namzdf_gls, IOSTAT = ios, ERR = 902 ) 
    865863902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namzdf_gls in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/ZDF/zdfiwm.F90

    r12154 r12202  
    421421      !!---------------------------------------------------------------------- 
    422422      ! 
    423       REWIND( numnam_ref )              ! Namelist namzdf_iwm in reference namelist : Wave-driven mixing 
    424423      READ  ( numnam_ref, namzdf_iwm, IOSTAT = ios, ERR = 901) 
    425424901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namzdf_iwm in reference namelist' ) 
    426425      ! 
    427       REWIND( numnam_cfg )              ! Namelist namzdf_iwm in configuration namelist : Wave-driven mixing 
    428426      READ  ( numnam_cfg, namzdf_iwm, IOSTAT = ios, ERR = 902 ) 
    429427902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namzdf_iwm in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/ZDF/zdfosm.F90

    r11536 r12202  
    13841384     !!---------------------------------------------------------------------- 
    13851385     ! 
    1386      REWIND( numnam_ref )              ! Namelist namzdf_osm in reference namelist : Osmosis ML model 
    13871386     READ  ( numnam_ref, namzdf_osm, IOSTAT = ios, ERR = 901) 
    13881387901  IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_osm in reference namelist' ) 
    13891388 
    1390      REWIND( numnam_cfg )              ! Namelist namzdf_tke in configuration namelist : Turbulent Kinetic Energy 
    13911389     READ  ( numnam_cfg, namzdf_osm, IOSTAT = ios, ERR = 902 ) 
    13921390902  IF( ios >  0 ) CALL ctl_nam ( ios , 'namzdf_osm in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/ZDF/zdfphy.F90

    r11536 r12202  
    9191      ! 
    9292      !                           !==  Namelist  ==! 
    93       REWIND( numnam_ref )              ! Namelist namzdf in reference namelist : Vertical mixing parameters 
    9493      READ  ( numnam_ref, namzdf, IOSTAT = ios, ERR = 901) 
    9594901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namzdf in reference namelist' ) 
    9695      ! 
    97       REWIND( numnam_cfg )              ! Namelist namzdf in reference namelist : Vertical mixing parameters 
    9896      READ  ( numnam_cfg, namzdf, IOSTAT = ios, ERR = 902 ) 
    9997902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namzdf in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/ZDF/zdfric.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/ZDF/zdftke.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/OCE/module_example

    r11536 r12202  
    150150      !!---------------------------------------------------------------------- 
    151151      ! 
    152       REWIND( numnam_ref )              ! Namelist namexa in reference namelist : Example 
    153152      READ  ( numnam_ref, namexa, IOSTAT = ios, ERR = 901) 
    154153901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namexa in reference namelist' ) 
    155154      ! 
    156       REWIND( numnam_cfg )              ! Namelist namexa in configuration namelist : Example 
    157155      READ  ( numnam_cfg, namexa, IOSTAT = ios, ERR = 902 ) 
    158156902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namexa in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/nemogcm.F90

    r12184 r12202  
    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' )    
     
    626622      IF( numstp          /= -1 )   CLOSE( numstp          )   ! time-step file 
    627623      IF( numrun          /= -1 )   CLOSE( numrun          )   ! run statistics file 
    628       IF( numnam_ref      /= -1 )   CLOSE( numnam_ref      )   ! oce reference namelist 
    629       IF( numnam_cfg      /= -1 )   CLOSE( numnam_cfg      )   ! oce configuration namelist 
    630624      IF( lwm.AND.numond  /= -1 )   CLOSE( numond          )   ! oce output namelist 
    631       IF( numnam_ice_ref  /= -1 )   CLOSE( numnam_ice_ref  )   ! ice reference namelist 
    632       IF( numnam_ice_cfg  /= -1 )   CLOSE( numnam_ice_cfg  )   ! ice configuration namelist 
    633625      IF( lwm.AND.numoni  /= -1 )   CLOSE( numoni          )   ! ice output namelist 
    634626      IF( numevo_ice      /= -1 )   CLOSE( numevo_ice      )   ! ice variables (temp. evolution) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OFF/dtadyn.F90

    r11536 r12202  
    225225      !!---------------------------------------------------------------------- 
    226226      ! 
    227       REWIND( numnam_ref )              ! Namelist namdta_dyn in reference namelist : Offline: init. of dynamical data 
    228227      READ  ( numnam_ref, namdta_dyn, IOSTAT = ios, ERR = 901) 
    229228901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdta_dyn in reference namelist' ) 
    230       REWIND( numnam_cfg )              ! Namelist namdta_dyn in configuration namelist : Offline: init. of dynamical data 
    231229      READ  ( numnam_cfg, namdta_dyn, IOSTAT = ios, ERR = 902 ) 
    232230902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdta_dyn in configuration namelist' ) 
     
    475473      !!---------------------------------------------------------------------- 
    476474      ! 
    477       REWIND( numnam_ref )              ! Namelist namdta_dyn in reference namelist : Offline: init. of dynamical data 
    478475      READ  ( numnam_ref, namdta_dyn, IOSTAT = ios, ERR = 901) 
    479476901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdta_dyn in reference namelist' ) 
    480       REWIND( numnam_cfg )              ! Namelist namdta_dyn in configuration namelist : Offline: init. of dynamical data 
    481477      READ  ( numnam_cfg, namdta_dyn, IOSTAT = ios, ERR = 902 ) 
    482478902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdta_dyn in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OFF/nemogcm.F90

    r12026 r12202  
    194194      IF( lwm )   CALL ctl_opn(     numout,        'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    195195      ! open reference and configuration namelist files 
    196                   CALL ctl_opn( numnam_ref,        'namelist_ref',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    197                   CALL ctl_opn( numnam_cfg,        'namelist_cfg',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     196                  CALL load_nml( numnam_ref,        'namelist_ref',                                           -1, lwm ) 
     197                  CALL load_nml( numnam_cfg,        'namelist_cfg',                                           -1, lwm ) 
    198198      IF( lwm )   CALL ctl_opn(     numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    199199      ! open /dev/null file to be able to supress output write easily 
     
    204204      !                             !--------------------! 
    205205      ! 
    206       REWIND( numnam_ref )              ! Namelist namctl in reference namelist 
    207206      READ  ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 
    208207901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namctl in reference namelist' ) 
    209       REWIND( numnam_cfg )              ! Namelist namctl in confguration namelist 
    210208      READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 
    211209902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namctl in configuration namelist' ) 
     
    262260      !                             !------------------------------------! 
    263261      !      
    264       REWIND( numnam_ref )              ! Namelist namcfg in reference namelist 
    265262      READ  ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 
    266263903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcfg in reference namelist' ) 
    267       REWIND( numnam_cfg )              ! Namelist namcfg in confguration namelist 
    268264      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 
    269265904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfg in configuration namelist' )    
     
    448444      ! 
    449445      IF( numstp     /= -1 )   CLOSE( numstp     )   ! time-step file 
    450       IF( numnam_ref /= -1 )   CLOSE( numnam_ref )   ! oce reference namelist 
    451       IF( numnam_cfg /= -1 )   CLOSE( numnam_cfg )   ! oce configuration namelist 
    452       IF( numout     /=  6 )   CLOSE( numout     )   ! standard model output file 
    453446      IF( lwm.AND.numond  /= -1 )   CLOSE( numond          )   ! oce output namelist 
    454447      ! 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/SAO/nemogcm.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/SAO/sao_data.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/SAS/nemogcm.F90

    r11536 r12202  
    230230      ! open ocean.output as soon as possible to get all output prints (including errors messages) 
    231231      IF( lk_oasis ) THEN 
    232          IF( lwm )   CALL ctl_opn(     numout,              'sas.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     232         IF( lwm )   CALL ctl_opn(     numout,               'sas.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    233233         ! open reference and configuration namelist files 
    234                      CALL ctl_opn( numnam_ref,        'namelist_sas_ref',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    235                      CALL ctl_opn( numnam_cfg,        'namelist_sas_cfg',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    236          IF( lwm )   CALL ctl_opn(     numond, 'output.namelist_sas.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     234                     CALL load_nml( numnam_ref,        'namelist_sas_ref',                                           -1, lwm ) 
     235                     CALL load_nml( numnam_cfg,        'namelist_sas_cfg',                                           -1, lwm ) 
     236         IF( lwm )   CALL ctl_opn(      numond, 'output.namelist_sas.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    237237      ELSE 
    238          IF( lwm )   CALL ctl_opn(     numout,            'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     238         IF( lwm )   CALL ctl_opn(      numout,            'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    239239         ! open reference and configuration namelist files 
    240                      CALL ctl_opn( numnam_ref,            'namelist_ref',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    241                      CALL ctl_opn( numnam_cfg,            'namelist_cfg',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    242          IF( lwm )   CALL ctl_opn(     numond,     'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     240                     CALL load_nml( numnam_ref,            'namelist_ref',                                           -1, lwm ) 
     241                     CALL load_nml( numnam_cfg,            'namelist_cfg',                                           -1, lwm ) 
     242         IF( lwm )   CALL ctl_opn(      numond,     'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    243243      ENDIF 
    244244      ! open /dev/null file to be able to supress output write easily 
     
    249249      !                             !--------------------! 
    250250      ! 
    251       REWIND( numnam_ref )              ! Namelist namctl in reference namelist 
    252251      READ  ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 
    253252901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namctl in reference namelist' ) 
    254       REWIND( numnam_cfg )              ! Namelist namctl in confguration namelist 
    255253      READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 
    256254902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namctl in configuration namelist' ) 
     
    311309      !                             !------------------------------------! 
    312310      ! 
    313       REWIND( numnam_ref )              ! Namelist namcfg in reference namelist 
    314311      READ  ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 
    315312903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcfg in reference namelist' ) 
    316       REWIND( numnam_cfg )              ! Namelist namcfg in confguration namelist 
    317313      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 
    318314904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfg in configuration namelist' )    
     
    489485      IF( numstp          /= -1 )   CLOSE( numstp          )   ! time-step file       
    490486      IF( numrun          /= -1 )   CLOSE( numrun          )   ! run statistics file 
    491       IF( numnam_ref      /= -1 )   CLOSE( numnam_ref      )   ! oce reference namelist 
    492       IF( numnam_cfg      /= -1 )   CLOSE( numnam_cfg      )   ! oce configuration namelist 
    493487      IF( lwm.AND.numond  /= -1 )   CLOSE( numond          )   ! oce output namelist 
    494       IF( numnam_ice_ref  /= -1 )   CLOSE( numnam_ice_ref  )   ! ice reference namelist 
    495       IF( numnam_ice_cfg  /= -1 )   CLOSE( numnam_ice_cfg  )   ! ice configuration namelist 
    496488      IF( lwm.AND.numoni  /= -1 )   CLOSE( numoni          )   ! ice output namelist 
    497489      IF( numevo_ice      /= -1 )   CLOSE( numevo_ice      )   ! ice variables (temp. evolution) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/SAS/sbcssm.F90

    r11536 r12202  
    186186      ENDIF 
    187187      ! 
    188       REWIND( numnam_ref )              ! Namelist namsbc_sas in reference namelist : Input fields 
    189188      READ  ( numnam_ref, namsbc_sas, IOSTAT = ios, ERR = 901) 
    190189901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_sas in reference namelist' ) 
    191       REWIND( numnam_cfg )              ! Namelist namsbc_sas in configuration namelist : Input fields 
    192190      READ  ( numnam_cfg, namsbc_sas, IOSTAT = ios, ERR = 902 ) 
    193191902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_sas in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/AGE/trcnam_age.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/TOP/C14/trcnam_c14.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/TOP/CFC/trcnam_cfc.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P2Z/p2zbio.F90

    r11536 r12202  
    402402      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~' 
    403403      ! 
    404       REWIND( numnatp_ref )              ! Namelist namlobphy in reference namelist : Lobster biological parameters 
    405404      READ  ( numnatp_ref, namlobphy, IOSTAT = ios, ERR = 901) 
    406405901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlobphy in reference namelist' ) 
    407       REWIND( numnatp_cfg )              ! Namelist namlobphy in configuration namelist : Lobster biological parameters 
    408406      READ  ( numnatp_cfg, namlobphy, IOSTAT = ios, ERR = 902 ) 
    409407902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobphy in configuration namelist' ) 
     
    419417      ENDIF 
    420418 
    421       REWIND( numnatp_ref )              ! Namelist namlobnut in reference namelist : Lobster nutriments parameters 
    422419      READ  ( numnatp_ref, namlobnut, IOSTAT = ios, ERR = 903) 
    423420903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlobnut in reference namelist' ) 
    424       REWIND( numnatp_cfg )              ! Namelist namlobnut in configuration namelist : Lobster nutriments parameters 
    425421      READ  ( numnatp_cfg, namlobnut, IOSTAT = ios, ERR = 904 ) 
    426422904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobnut in configuration namelist' ) 
     
    436432      ENDIF 
    437433 
    438       REWIND( numnatp_ref )              ! Namelist namlobzoo in reference namelist : Lobster zooplankton parameters 
    439434      READ  ( numnatp_ref, namlobzoo, IOSTAT = ios, ERR = 905) 
    440435905   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlobzoo in reference namelist' ) 
    441       REWIND( numnatp_cfg )              ! Namelist namlobzoo in configuration namelist : Lobster zooplankton parameters 
    442436      READ  ( numnatp_cfg, namlobzoo, IOSTAT = ios, ERR = 906 ) 
    443437906   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobzoo in configuration namelist' ) 
     
    458452      ENDIF 
    459453 
    460       REWIND( numnatp_ref )              ! Namelist namlobdet in reference namelist : Lobster detritus parameters 
    461454      READ  ( numnatp_ref, namlobdet, IOSTAT = ios, ERR = 907) 
    462455907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlobdet in reference namelist' ) 
    463       REWIND( numnatp_cfg )              ! Namelist namlobdet in configuration namelist : Lobster detritus parameters 
    464456      READ  ( numnatp_cfg, namlobdet, IOSTAT = ios, ERR = 908 ) 
    465457908   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobdet in configuration namelist' ) 
     
    473465      ENDIF 
    474466 
    475       REWIND( numnatp_ref )              ! Namelist namlobdom in reference namelist : Lobster DOM breakdown rate 
    476467      READ  ( numnatp_ref, namlobdom, IOSTAT = ios, ERR = 909) 
    477468909   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlobdom in reference namelist' ) 
    478       REWIND( numnatp_cfg )              ! Namelist namlobdom in configuration namelist : Lobster DOM breakdown rate 
    479469      READ  ( numnatp_cfg, namlobdom, IOSTAT = ios, ERR = 910 ) 
    480470910   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobdom in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P2Z/p2zopt.F90

    r11536 r12202  
    159159      !!---------------------------------------------------------------------- 
    160160 
    161       REWIND( numnatp_ref )              ! Namelist namlobopt in reference namelist : Lobster options 
    162161      READ  ( numnatp_ref, namlobopt, IOSTAT = ios, ERR = 901) 
    163162901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlobopt in reference namelist' ) 
    164163 
    165       REWIND( numnatp_cfg )              ! Namelist namlobopt in configuration namelist : Lobster options 
    166164      READ  ( numnatp_cfg, namlobopt, IOSTAT = ios, ERR = 902 ) 
    167165902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namlobopt in configuration namelist' ) 
     
    181179      ENDIF 
    182180      ! 
    183       REWIND( numnatp_ref )              ! Namelist namlobrat in reference namelist : Lobster ratios 
    184181      READ  ( numnatp_ref, namlobrat, IOSTAT = ios, ERR = 903) 
    185182903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlobrat in reference namelist' ) 
    186183 
    187       REWIND( numnatp_cfg )              ! Namelist namlobrat in configuration namelist : Lobster ratios 
    188184      READ  ( numnatp_cfg, namlobrat, IOSTAT = ios, ERR = 904 ) 
    189185904   IF( ios >  0 ) CALL ctl_nam ( ios , 'namlobrat in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P2Z/p2zsed.F90

    r11536 r12202  
    132132      !!---------------------------------------------------------------------- 
    133133      ! 
    134       REWIND( numnatp_ref )              ! Namelist namlobsed in reference namelist : Lobster sediments 
    135134      READ  ( numnatp_ref, namlobsed, IOSTAT = ios, ERR = 901) 
    136135901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlosed in reference namelist' ) 
    137       REWIND( numnatp_cfg )              ! Namelist namlobsed in configuration namelist : Lobster sediments 
    138136      READ  ( numnatp_cfg, namlobsed, IOSTAT = ios, ERR = 902 ) 
    139137902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobsed in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P4Z/p4zbc.F90

    r12111 r12202  
    229229      ENDIF 
    230230      !                            !* set file information 
    231       REWIND( numnatp_ref )              ! Namelist nampisbc in reference namelist : Pisces external sources of nutrients 
    232231      READ  ( numnatp_ref, nampisbc, IOSTAT = ios, ERR = 901) 
    233232901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisbc in reference namelist' ) 
    234       REWIND( numnatp_cfg )              ! Namelist nampisbc in configuration namelist : Pisces external sources of nutrients 
    235233      READ  ( numnatp_cfg, nampisbc, IOSTAT = ios, ERR = 902 ) 
    236234902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisbc in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P4Z/p4zfechem.F90

    r12110 r12202  
    254254      ENDIF 
    255255      ! 
    256       REWIND( numnatp_ref )            ! Namelist nampisfer in reference namelist : Pisces iron chemistry 
    257256      READ  ( numnatp_ref, nampisfer, IOSTAT = ios, ERR = 901) 
    258257901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisfer in reference namelist' ) 
    259       REWIND( numnatp_cfg )            ! Namelist nampisfer in configuration namelist : Pisces iron chemistry 
    260258      READ  ( numnatp_cfg, nampisfer, IOSTAT = ios, ERR = 902 ) 
    261259902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisfer in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P4Z/p4zflx.F90

    r12109 r12202  
    246246      ENDIF 
    247247      ! 
    248       REWIND( numnatp_ref )              ! Namelist nampisext in reference namelist : Pisces atm. conditions 
    249248      READ  ( numnatp_ref, nampisext, IOSTAT = ios, ERR = 901) 
    250249901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisext in reference namelist' ) 
    251       REWIND( numnatp_cfg )              ! Namelist nampisext in configuration namelist : Pisces atm. conditions 
    252250      READ  ( numnatp_cfg, nampisext, IOSTAT = ios, ERR = 902 ) 
    253251902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisext in configuration namelist' ) 
     
    327325         ENDIF 
    328326         ! 
    329          REWIND( numnatp_ref )              ! Namelist nampisatm in reference namelist : Pisces atm. sea level pressure file 
    330327         READ  ( numnatp_ref, nampisatm, IOSTAT = ios, ERR = 901) 
    331328901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisatm in reference namelist' ) 
    332          REWIND( numnatp_cfg )              ! Namelist nampisatm in configuration namelist : Pisces atm. sea level pressure file  
    333329         READ  ( numnatp_cfg, nampisatm, IOSTAT = ios, ERR = 902 ) 
    334330902      IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisatm in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P4Z/p4zligand.F90

    r11536 r12202  
    125125         WRITE(numout,*) '~~~~~~~~~~~~~~~' 
    126126      ENDIF 
    127       REWIND( numnatp_ref )              ! Namelist nampislig in reference namelist : Pisces remineralization 
    128127      READ  ( numnatp_ref, nampislig, IOSTAT = ios, ERR = 901) 
    129128901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampislig in reference namelist' ) 
    130       REWIND( numnatp_cfg )              ! Namelist nampislig in configuration namelist : Pisces remineralization 
    131129      READ  ( numnatp_cfg, nampislig, IOSTAT = ios, ERR = 902 ) 
    132130902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampislig in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P4Z/p4zlim.F90

    r11536 r12202  
    252252      ENDIF 
    253253      ! 
    254       REWIND( numnatp_ref )              ! Namelist nampislim in reference namelist : Pisces nutrient limitation parameters 
    255254      READ  ( numnatp_ref, namp4zlim, IOSTAT = ios, ERR = 901) 
    256255901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namp4zlim in reference namelist' ) 
    257       REWIND( numnatp_cfg )              ! Namelist nampislim in configuration namelist : Pisces nutrient limitation parameters  
    258256      READ  ( numnatp_cfg, namp4zlim, IOSTAT = ios, ERR = 902 ) 
    259257902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namp4zlim in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P4Z/p4zlys.F90

    r11536 r12202  
    162162      ENDIF 
    163163      ! 
    164       REWIND( numnatp_ref )              ! Namelist nampiscal in reference namelist : Pisces CaCO3 dissolution 
    165164      READ  ( numnatp_ref, nampiscal, IOSTAT = ios, ERR = 901) 
    166165901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampiscal in reference namelist' ) 
    167       REWIND( numnatp_cfg )              ! Namelist nampiscal in configuration namelist : Pisces CaCO3 dissolution 
    168166      READ  ( numnatp_cfg, nampiscal, IOSTAT = ios, ERR = 902 ) 
    169167902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampiscal in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P4Z/p4zmeso.F90

    r11536 r12202  
    290290      ENDIF 
    291291      ! 
    292       REWIND( numnatp_ref )              ! Namelist nampismes in reference namelist : Pisces mesozooplankton 
    293292      READ  ( numnatp_ref, namp4zmes, IOSTAT = ios, ERR = 901) 
    294293901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namp4zmes in reference namelist' ) 
    295       REWIND( numnatp_cfg )              ! Namelist nampismes in configuration namelist : Pisces mesozooplankton 
    296294      READ  ( numnatp_cfg, namp4zmes, IOSTAT = ios, ERR = 902 ) 
    297295902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namp4zmes in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P4Z/p4zmicro.F90

    r11536 r12202  
    243243      ENDIF 
    244244      ! 
    245       REWIND( numnatp_ref )              ! Namelist nampiszoo in reference namelist : Pisces microzooplankton 
    246245      READ  ( numnatp_ref, namp4zzoo, IOSTAT = ios, ERR = 901) 
    247246901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namp4zzoo in reference namelist' ) 
    248       REWIND( numnatp_cfg )              ! Namelist nampiszoo in configuration namelist : Pisces microzooplankton 
    249247      READ  ( numnatp_cfg, namp4zzoo, IOSTAT = ios, ERR = 902 ) 
    250248902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namp4zzoo in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P4Z/p4zmort.F90

    r11536 r12202  
    227227      ENDIF 
    228228      ! 
    229       REWIND( numnatp_ref )              ! Namelist nampismort in reference namelist : Pisces phytoplankton 
    230229      READ  ( numnatp_ref, namp4zmort, IOSTAT = ios, ERR = 901) 
    231230901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namp4zmort in reference namelist' ) 
    232       REWIND( numnatp_cfg )              ! Namelist nampismort in configuration namelist : Pisces phytoplankton 
    233231      READ  ( numnatp_cfg, namp4zmort, IOSTAT = ios, ERR = 902 ) 
    234232902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namp4zmort in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P4Z/p4zopt.F90

    r11536 r12202  
    400400         WRITE(numout,*) '~~~~~~~~~~~~ ' 
    401401      ENDIF 
    402       REWIND( numnatp_ref )              ! Namelist nampisopt in reference namelist : Pisces attenuation coef. and PAR 
    403402      READ  ( numnatp_ref, nampisopt, IOSTAT = ios, ERR = 901) 
    404403901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisopt in reference namelist' ) 
    405       REWIND( numnatp_cfg )              ! Namelist nampisopt in configuration namelist : Pisces attenuation coef. and PAR 
    406404      READ  ( numnatp_cfg, nampisopt, IOSTAT = ios, ERR = 902 ) 
    407405902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisopt in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P4Z/p4zpoc.F90

    r11536 r12202  
    497497      ENDIF 
    498498      ! 
    499       REWIND( numnatp_ref )              ! Namelist nampisrem in reference namelist : Pisces remineralization 
    500499      READ  ( numnatp_ref, nampispoc, IOSTAT = ios, ERR = 901) 
    501500901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampispoc in reference namelist' ) 
    502       REWIND( numnatp_cfg )              ! Namelist nampisrem in configuration namelist : Pisces remineralization 
    503501      READ  ( numnatp_cfg, nampispoc, IOSTAT = ios, ERR = 902 ) 
    504502902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampispoc in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P4Z/p4zprod.F90

    r11536 r12202  
    490490      ENDIF 
    491491      ! 
    492       REWIND( numnatp_ref )              ! Namelist nampisprod in reference namelist : Pisces phytoplankton production 
    493492      READ  ( numnatp_ref, namp4zprod, IOSTAT = ios, ERR = 901) 
    494493901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namp4zprod in reference namelist' ) 
    495       REWIND( numnatp_cfg )              ! Namelist nampisprod in configuration namelist : Pisces phytoplankton production 
    496494      READ  ( numnatp_cfg, namp4zprod, IOSTAT = ios, ERR = 902 ) 
    497495902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namp4zprod in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P4Z/p4zrem.F90

    r11536 r12202  
    327327      ENDIF 
    328328      ! 
    329       REWIND( numnatp_ref )              ! Namelist nampisrem in reference namelist : Pisces remineralization 
    330329      READ  ( numnatp_ref, nampisrem, IOSTAT = ios, ERR = 901) 
    331330901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisrem in reference namelist' ) 
    332       REWIND( numnatp_cfg )              ! Namelist nampisrem in configuration namelist : Pisces remineralization 
    333331      READ  ( numnatp_cfg, nampisrem, IOSTAT = ios, ERR = 902 ) 
    334332902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisrem in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P4Z/p4zsed.F90

    r12111 r12202  
    381381      ENDIF 
    382382      !                            !* set file information 
    383       REWIND( numnatp_ref )              ! Namelist nampissed in reference namelist : PISCES sediment 
    384383      READ  ( numnatp_ref, nampissed, IOSTAT = ios, ERR = 901) 
    385384901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampissed in reference namelist' ) 
    386       REWIND( numnatp_cfg )              ! Namelist nampissbc in configuration namelist : PISCES sediment 
    387385      READ  ( numnatp_cfg, nampissed, IOSTAT = ios, ERR = 902 ) 
    388386902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampissed in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P4Z/p4zsms.F90

    r12110 r12202  
    262262      ENDIF 
    263263 
    264       REWIND( numnatp_ref )              ! Namelist nampisbio in reference namelist : Pisces variables 
    265264      READ  ( numnatp_ref, nampisbio, IOSTAT = ios, ERR = 901) 
    266265901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisbio in reference namelist' ) 
    267       REWIND( numnatp_cfg )              ! Namelist nampisbio in configuration namelist : Pisces variables 
    268266      READ  ( numnatp_cfg, nampisbio, IOSTAT = ios, ERR = 902 ) 
    269267902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisbio in configuration namelist' ) 
     
    293291 
    294292 
    295       REWIND( numnatp_ref )              ! Namelist nampisdmp in reference namelist : Pisces damping 
    296293      READ  ( numnatp_ref, nampisdmp, IOSTAT = ios, ERR = 905) 
    297294905   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisdmp in reference namelist' ) 
    298       REWIND( numnatp_cfg )              ! Namelist nampisdmp in configuration namelist : Pisces damping 
    299295      READ  ( numnatp_cfg, nampisdmp, IOSTAT = ios, ERR = 906 ) 
    300296906   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisdmp in configuration namelist' ) 
     
    308304      ENDIF 
    309305 
    310       REWIND( numnatp_ref )              ! Namelist nampismass in reference namelist : Pisces mass conservation check 
    311306      READ  ( numnatp_ref, nampismass, IOSTAT = ios, ERR = 907) 
    312307907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampismass in reference namelist' ) 
    313       REWIND( numnatp_cfg )              ! Namelist nampismass in configuration namelist : Pisces mass conservation check  
    314308      READ  ( numnatp_cfg, nampismass, IOSTAT = ios, ERR = 908 ) 
    315309908   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampismass in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P4Z/p5zlim.F90

    r11536 r12202  
    448448      !!---------------------------------------------------------------------- 
    449449      ! 
    450       REWIND( numnatp_ref )              ! Namelist nampislim in reference namelist : Pisces nutrient limitation parameters 
    451450      READ  ( numnatp_ref, namp5zlim, IOSTAT = ios, ERR = 901) 
    452451901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampislim in reference namelist' ) 
    453452      ! 
    454       REWIND( numnatp_cfg )              ! Namelist nampislim in configuration namelist : Pisces nutrient limitation parameters  
    455453      READ  ( numnatp_cfg, namp5zlim, IOSTAT = ios, ERR = 902 ) 
    456454902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampislim in configuration namelist' ) 
     
    489487      ENDIF 
    490488 
    491       REWIND( numnatp_ref )              ! Namelist nampislim in reference namelist : Pisces nutrient limitation parameters 
    492489      READ  ( numnatp_ref, namp5zquota, IOSTAT = ios, ERR = 903) 
    493490903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisquota in reference namelist' ) 
    494491      ! 
    495       REWIND( numnatp_cfg )              ! Namelist nampislim in configuration namelist : Pisces nutrient limitation parameters  
    496492      READ  ( numnatp_cfg, namp5zquota, IOSTAT = ios, ERR = 904 ) 
    497493904   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampisquota in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P4Z/p5zmeso.F90

    r11536 r12202  
    407407      !!---------------------------------------------------------------------- 
    408408      ! 
    409       REWIND( numnatp_ref )              ! Namelist nampismes in reference namelist : Pisces mesozooplankton 
    410409      READ  ( numnatp_ref, namp5zmes, IOSTAT = ios, ERR = 901) 
    411410901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampismes in reference namelist' ) 
    412411      ! 
    413       REWIND( numnatp_cfg )              ! Namelist nampismes in configuration namelist : Pisces mesozooplankton 
    414412      READ  ( numnatp_cfg, namp5zmes, IOSTAT = ios, ERR = 902 ) 
    415413902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampismes in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P4Z/p5zmicro.F90

    r11536 r12202  
    349349      !!---------------------------------------------------------------------- 
    350350      ! 
    351       REWIND( numnatp_ref )              ! Namelist nampiszoo in reference namelist : Pisces microzooplankton 
    352351      READ  ( numnatp_ref, namp5zzoo, IOSTAT = ios, ERR = 901) 
    353352901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp5zzoo in reference namelist' ) 
    354353      ! 
    355       REWIND( numnatp_cfg )              ! Namelist nampiszoo in configuration namelist : Pisces microzooplankton 
    356354      READ  ( numnatp_cfg, namp5zzoo, IOSTAT = ios, ERR = 902 ) 
    357355902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namp5zzoo in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P4Z/p5zmort.F90

    r11536 r12202  
    286286      !!---------------------------------------------------------------------- 
    287287 
    288       REWIND( numnatp_ref )              ! Namelist nampismort in reference namelist : Pisces phytoplankton 
    289288      READ  ( numnatp_ref, namp5zmort, IOSTAT = ios, ERR = 901) 
    290289901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp5zmort in reference namelist' ) 
    291290 
    292       REWIND( numnatp_cfg )              ! Namelist nampismort in configuration namelist : Pisces phytoplankton 
    293291      READ  ( numnatp_cfg, namp5zmort, IOSTAT = ios, ERR = 902 ) 
    294292902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namp5zmort in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/P4Z/p5zprod.F90

    r11536 r12202  
    582582      !!---------------------------------------------------------------------- 
    583583 
    584       REWIND( numnatp_ref )              ! Namelist nampisprod in reference namelist : Pisces phytoplankton production 
    585584      READ  ( numnatp_ref, namp5zprod, IOSTAT = ios, ERR = 901) 
    586585901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp5zprod in reference namelist' ) 
    587586 
    588       REWIND( numnatp_cfg )              ! Namelist nampisprod in configuration namelist : Pisces phytoplankton production 
    589587      READ  ( numnatp_cfg, namp5zprod, IOSTAT = ios, ERR = 902 ) 
    590588902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namp5zprod in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/SED/sedini.F90

    r11536 r12202  
    406406      !!---------------------------------------------------------------------- 
    407407 
    408       INTEGER ::   numnamsed_ref = -1           !! Logical units for namelist sediment 
    409       INTEGER ::   numnamsed_cfg = -1           !! Logical units for namelist sediment 
     408      CHARACTER(:), ALLOCATABLE ::   numnamsed_ref           !! Character buffer for reference namelist sediment 
     409      CHARACTER(:), ALLOCATABLE ::   numnamsed_cfg           !! Character buffer for configuration namelist sediment 
    410410      INTEGER :: ios                 ! Local integer output status for namelist read 
    411411      CHARACTER(LEN=20)   ::   clname 
     
    452452      IF(lwp) WRITE(numsed,*) ' sed_init_nam : read SEDIMENT namelist' 
    453453      IF(lwp) WRITE(numsed,*) ' ~~~~~~~~~~~~~~' 
    454       CALL ctl_opn( numnamsed_ref, TRIM( clname )//'_ref', 'OLD'    , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    455       CALL ctl_opn( numnamsed_cfg, TRIM( clname )//'_cfg', 'OLD'    , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
     454      CALL load_nml( numnamsed_ref, TRIM( clname )//'_ref', numout, lwm ) 
     455      CALL load_nml( numnamsed_cfg, TRIM( clname )//'_cfg', numout, lwm ) 
    456456 
    457457      nitsed000 = nittrc000 
    458458      nitsedend = nitend 
    459459      ! Namelist nam_run 
    460       REWIND( numnamsed_ref )              ! Namelist nam_run in reference namelist : Pisces variables 
    461460      READ  ( numnamsed_ref, nam_run, IOSTAT = ios, ERR = 901) 
    462461901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_run in reference namelist' ) 
    463462 
    464       REWIND( numnamsed_cfg )              ! Namelist nam_run in reference namelist : Pisces variables 
    465463      READ  ( numnamsed_cfg, nam_run, IOSTAT = ios, ERR = 902) 
    466464902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_run in configuration namelist' ) 
     
    474472      IF ( ln_p5z .AND. ln_sed_2way ) CALL ctl_stop( '2 ways coupling with sediment cannot be activated with PISCES-QUOTA' ) 
    475473 
    476       REWIND( numnamsed_ref )              ! Namelist nam_geom in reference namelist : Pisces variables 
    477474      READ  ( numnamsed_ref, nam_geom, IOSTAT = ios, ERR = 903) 
    478475903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_geom in reference namelist' ) 
    479476 
    480       REWIND( numnamsed_cfg )              ! Namelist nam_geom in reference namelist : Pisces variables 
    481477      READ  ( numnamsed_cfg, nam_geom, IOSTAT = ios, ERR = 904) 
    482478904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_geom in configuration namelist' ) 
     
    497493      dtsed = r2dttrc 
    498494 
    499       REWIND( numnamsed_ref )              ! Namelist nam_trased in reference namelist : Pisces variables 
    500495      READ  ( numnamsed_ref, nam_trased, IOSTAT = ios, ERR = 905) 
    501496905   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_trased in reference namelist' ) 
    502497 
    503       REWIND( numnamsed_cfg )              ! Namelist nam_trased in reference namelist : Pisces variables 
    504498      READ  ( numnamsed_cfg, nam_trased, IOSTAT = ios, ERR = 906) 
    505499906   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_trased in configuration namelist' ) 
     
    530524      ENDIF 
    531525 
    532       REWIND( numnamsed_ref )              ! Namelist nam_diased in reference namelist : Pisces variables 
    533526      READ  ( numnamsed_ref, nam_diased, IOSTAT = ios, ERR = 907) 
    534527907   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diased in reference namelist' ) 
    535528 
    536       REWIND( numnamsed_cfg )              ! Namelist nam_diased in reference namelist : Pisces variables 
    537529      READ  ( numnamsed_cfg, nam_diased, IOSTAT = ios, ERR = 908) 
    538530908   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diased in configuration namelist' ) 
     
    572564      ! Inorganic chemistry parameters 
    573565      !---------------------------------- 
    574       REWIND( numnamsed_ref )              ! Namelist nam_inorg in reference namelist : Pisces variables 
    575566      READ  ( numnamsed_ref, nam_inorg, IOSTAT = ios, ERR = 909) 
    576567909   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_inorg in reference namelist' ) 
    577568 
    578       REWIND( numnamsed_cfg )              ! Namelist nam_inorg in reference namelist : Pisces variables 
    579569      READ  ( numnamsed_cfg, nam_inorg, IOSTAT = ios, ERR = 910) 
    580570910   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_inorg in configuration namelist' ) 
     
    598588      ! Additional parameter linked to POC/O2/No3/Po4 
    599589      !---------------------------------------------- 
    600       REWIND( numnamsed_ref )              ! Namelist nam_poc in reference namelist : Pisces variables 
    601590      READ  ( numnamsed_ref, nam_poc, IOSTAT = ios, ERR = 911) 
    602591911   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_poc in reference namelist' ) 
    603592 
    604       REWIND( numnamsed_cfg )              ! Namelist nam_poc in reference namelist : Pisces variables 
    605593      READ  ( numnamsed_cfg, nam_poc, IOSTAT = ios, ERR = 912) 
    606594912   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_poc in configuration namelist' ) 
     
    650638      ! Bioturbation parameter 
    651639      !------------------------ 
    652       REWIND( numnamsed_ref )              ! Namelist nam_btb in reference namelist : Pisces variables 
    653640      READ  ( numnamsed_ref, nam_btb, IOSTAT = ios, ERR = 913) 
    654641913   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_btb in reference namelist' ) 
    655642 
    656       REWIND( numnamsed_cfg )              ! Namelist nam_btb in reference namelist : Pisces variables 
    657643      READ  ( numnamsed_cfg, nam_btb, IOSTAT = ios, ERR = 914) 
    658644914   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_btb in configuration namelist' ) 
     
    671657      ! Initial value (t=0) for sediment pore water and solid components 
    672658      !---------------------------------------------------------------- 
    673       REWIND( numnamsed_ref )              ! Namelist nam_rst in reference namelist : Pisces variables 
    674659      READ  ( numnamsed_ref, nam_rst, IOSTAT = ios, ERR = 915) 
    675660915   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_rst in reference namelist' ) 
    676661 
    677       REWIND( numnamsed_cfg )              ! Namelist nam_rst in reference namelist : Pisces variables 
    678662      READ  ( numnamsed_cfg, nam_rst, IOSTAT = ios, ERR = 916) 
    679663916   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_rst in configuration namelist' ) 
     
    686670      nn_dtsed = nn_dttrc 
    687671 
    688       CLOSE( numnamsed_cfg ) 
    689       CLOSE( numnamsed_ref ) 
    690672 
    691673   END SUBROUTINE sed_init_nam 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/sms_pisces.F90

    r12110 r12202  
    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_r12072_MERGE_OPTION2_2019/src/TOP/PISCES/trcnam_pisces.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/TOP/TRP/trcadv.F90

    r11536 r12202  
    164164      ! 
    165165      !                                !==  Namelist  ==! 
    166       REWIND( numnat_ref )                   !  namtrc_adv in reference namelist  
    167166      READ  ( numnat_ref, namtrc_adv, IOSTAT = ios, ERR = 901) 
    168167901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_adv in reference namelist' ) 
    169       REWIND( numnat_cfg )                   ! namtrc_adv in configuration namelist 
    170168      READ  ( numnat_cfg, namtrc_adv, IOSTAT = ios, ERR = 902 ) 
    171169902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_adv in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/TRP/trcdmp.F90

    r11536 r12202  
    181181      !!---------------------------------------------------------------------- 
    182182      ! 
    183       REWIND( numnat_ref )              ! Namelist namtrc_dmp in reference namelist : Passive tracers newtonian damping 
    184183      READ  ( numnat_ref, namtrc_dmp, IOSTAT = ios, ERR = 909) 
    185184909   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_dmp in reference namelist' ) 
    186       REWIND( numnat_cfg )              ! Namelist namtrc_dmp in configuration namelist : Passive tracers newtonian damping 
    187185      READ  ( numnat_cfg, namtrc_dmp, IOSTAT = ios, ERR = 910) 
    188186910   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_dmp in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/TRP/trcldf.F90

    r11536 r12202  
    143143      ENDIF 
    144144      ! 
    145       REWIND( numnat_ref )             !  namtrc_ldf in reference namelist  
    146145      READ  ( numnat_ref, namtrc_ldf, IOSTAT = ios, ERR = 903) 
    147146903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_ldf in reference namelist' ) 
    148147      ! 
    149       REWIND( numnat_cfg )             !  namtrc_ldf in configuration namelist  
    150148      READ  ( numnat_cfg, namtrc_ldf, IOSTAT = ios, ERR = 904 ) 
    151149904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_ldf in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/TRP/trcrad.F90

    r11536 r12202  
    8787      !!---------------------------------------------------------------------- 
    8888      ! 
    89       REWIND( numnat_ref )              ! namtrc_rad in reference namelist  
    9089      READ  ( numnat_ref, namtrc_rad, IOSTAT = ios, ERR = 907) 
    9190907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_rad in reference namelist' ) 
    92       REWIND( numnat_cfg )              ! namtrc_rad in configuration namelist  
    9391      READ  ( numnat_cfg, namtrc_rad, IOSTAT = ios, ERR = 908 ) 
    9492908   IF( ios > 0 )   CALL ctl_nam ( ios , 'namtrc_rad in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/TRP/trcsink.F90

    r11536 r12202  
    216216      !!---------------------------------------------------------------------- 
    217217      ! 
    218       REWIND( numnat_ref )              ! namtrc_rad in reference namelist  
    219218      READ  ( numnat_ref, namtrc_snk, IOSTAT = ios, ERR = 907) 
    220219907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_snk in reference namelist' ) 
    221       REWIND( numnat_cfg )              ! namtrc_rad in configuration namelist  
    222220      READ  ( numnat_cfg, namtrc_snk, IOSTAT = ios, ERR = 908 ) 
    223221908   IF( ios > 0 )   CALL ctl_nam ( ios , 'namtrc_snk in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/trc.F90

    r12110 r12202  
    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_r12072_MERGE_OPTION2_2019/src/TOP/trcbc.F90

    r12110 r12202  
    120120      ! 
    121121      ! Read Boundary Conditions Namelists 
    122       REWIND( numnat_ref )              ! Namelist namtrc_bc in reference namelist : Passive tracer data structure 
    123122      READ  ( numnat_ref, namtrc_bc, IOSTAT = ios, ERR = 901) 
    124123901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_bc in reference namelist' ) 
    125       REWIND( numnat_cfg )              ! Namelist namtrc_bc in configuration namelist : Passive tracer data structure 
    126124      READ  ( numnat_cfg, namtrc_bc, IOSTAT = ios, ERR = 902 ) 
    127125902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_bc in configuration namelist' ) 
     
    129127 
    130128      IF ( ln_bdy ) THEN 
    131          REWIND( numnat_ref )              ! Namelist namtrc_bdy in reference namelist : Passive tracer data structure 
    132129         READ  ( numnat_ref, namtrc_bdy, IOSTAT = ios, ERR = 903) 
    133130903      IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_bdy in reference namelist' ) 
     
    135132         cn_trc     (2:jp_bdy) = cn_trc     (1) 
    136133         cn_trc_dflt(2:jp_bdy) = cn_trc_dflt(1) 
    137          REWIND( numnat_cfg )              ! Namelist namtrc_bdy in configuration namelist : Passive tracer data structure 
    138134         READ  ( numnat_cfg, namtrc_bdy, IOSTAT = ios, ERR = 904 ) 
    139135904      IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_bdy in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/TOP/trcdta.F90

    r12110 r12202  
    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_r12072_MERGE_OPTION2_2019/src/TOP/trcice.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/src/TOP/trcnam.F90

    r12110 r12202  
    108108      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 
    109109      ! 
    110       CALL ctl_opn( numnat_ref, 'namelist_top_ref'   , 'OLD'    , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    111       CALL ctl_opn( numnat_cfg, 'namelist_top_cfg'   , 'OLD'    , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
     110      CALL load_nml( numnat_ref, 'namelist_top_ref' , numout, lwm ) 
     111      CALL load_nml( numnat_cfg, 'namelist_top_cfg' , numout, lwm ) 
    112112      IF(lwm) CALL ctl_opn( numont, 'output.namelist.top', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE., 1 ) 
    113113      ! 
    114       REWIND( numnat_ref )              ! Namelist namtrc in reference namelist : Passive tracer variables 
    115114      READ  ( numnat_ref, namtrc_run, IOSTAT = ios, ERR = 901) 
    116115901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc in reference namelist' ) 
    117       REWIND( numnat_cfg )              ! Namelist namtrc in configuration namelist : Passive tracer variables 
    118116      READ  ( numnat_cfg, namtrc_run, IOSTAT = ios, ERR = 902 ) 
    119117902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc in configuration namelist' ) 
     
    158156      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 
    159157 
    160       REWIND( numnat_ref )              ! Namelist namtrc in reference namelist : Passive tracer variables 
    161158      READ  ( numnat_ref, namtrc, IOSTAT = ios, ERR = 901) 
    162159901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc in reference namelist' ) 
    163       REWIND( numnat_cfg )              ! Namelist namtrc in configuration namelist : Passive tracer variables 
    164160      READ  ( numnat_cfg, namtrc, IOSTAT = ios, ERR = 902 ) 
    165161902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc in configuration namelist' ) 
     
    229225      IF( ll_cfc .OR. ln_c14 ) THEN 
    230226        !                             ! Open namelist files 
    231         CALL ctl_opn( numtrc_ref, 'namelist_trc_ref'   ,     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    232         CALL ctl_opn( numtrc_cfg, 'namelist_trc_cfg'   ,     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
     227        CALL load_nml( numtrc_ref, 'namelist_trc_ref' , numout, lwm ) 
     228        CALL load_nml( numtrc_cfg, 'namelist_trc_cfg' , numout, lwm ) 
    233229        IF(lwm) CALL ctl_opn( numonr, 'output.namelist.trc', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    234230        ! 
     
    262258      ALLOCATE( ln_trdtrc(jptra) )  
    263259      ! 
    264       REWIND( numnat_ref )              ! Namelist namtrc_trd in reference namelist : Passive tracer trends 
    265260      READ  ( numnat_ref, namtrc_trd, IOSTAT = ios, ERR = 905) 
    266261905   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_trd in reference namelist' ) 
    267       REWIND( numnat_cfg )              ! Namelist namtrc_trd in configuration namelist : Passive tracer trends 
    268262      READ  ( numnat_cfg, namtrc_trd, IOSTAT = ios, ERR = 906 ) 
    269263906   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_trd in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/tests/BENCH/MY_SRC/usrdef_nam.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/tests/BENCH/MY_SRC/zdfiwm.F90

    r11536 r12202  
    404404      !!---------------------------------------------------------------------- 
    405405      ! 
    406       REWIND( numnam_ref )              ! Namelist namzdf_iwm in reference namelist : Wave-driven mixing 
    407406      READ  ( numnam_ref, namzdf_iwm, IOSTAT = ios, ERR = 901) 
    408407901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namzdf_iwm in reference namelist' ) 
    409408      ! 
    410       REWIND( numnam_cfg )              ! Namelist namzdf_iwm in configuration namelist : Wave-driven mixing 
    411409      READ  ( numnam_cfg, namzdf_iwm, IOSTAT = ios, ERR = 902 ) 
    412410902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namzdf_iwm in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/tests/CANAL/MY_SRC/domvvl.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/tests/CANAL/MY_SRC/usrdef_nam.F90

    r11899 r12202  
    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_r12072_MERGE_OPTION2_2019/tests/ICE_ADV1D/MY_SRC/usrdef_nam.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/tests/ICE_ADV2D/MY_SRC/usrdef_nam.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/tests/ICE_AGRIF/MY_SRC/usrdef_nam.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/tests/ISOMIP+/MY_SRC/dtatsd.F90

    r11889 r12202  
    6767      ierr0 = 0  ;  ierr1 = 0  ;  ierr2 = 0  ;  ierr3 = 0 
    6868      ! 
    69       REWIND( numnam_ref )              ! Namelist namtsd in reference namelist :  
    7069      READ  ( numnam_ref, namtsd, IOSTAT = ios, ERR = 901) 
    7170901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtsd in reference namelist', lwp ) 
    72       REWIND( numnam_cfg )              ! Namelist namtsd in configuration namelist : Parameters of the run 
    7371      READ  ( numnam_cfg, namtsd, IOSTAT = ios, ERR = 902 ) 
    7472902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtsd in configuration namelist', lwp ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/tests/ISOMIP+/MY_SRC/eosbn2.F90

    r11889 r12202  
    13661366      !!---------------------------------------------------------------------- 
    13671367      ! 
    1368       REWIND( numnam_ref )              ! Namelist nameos in reference namelist : equation of state 
    13691368      READ  ( numnam_ref, nameos, IOSTAT = ios, ERR = 901 ) 
    13701369901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nameos in reference namelist', lwp ) 
    13711370      ! 
    1372       REWIND( numnam_cfg )              ! Namelist nameos in configuration namelist : equation of state 
    13731371      READ  ( numnam_cfg, nameos, IOSTAT = ios, ERR = 902 ) 
    13741372902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nameos in configuration namelist', lwp ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/tests/ISOMIP+/MY_SRC/isfstp.F90

    r12062 r12202  
    289289      !!---------------------------------------------------------------------- 
    290290      ! 
    291       REWIND( numnam_ref )              ! Namelist namsbc_rnf in reference namelist : Runoffs  
    292291      READ  ( numnam_ref, namisf, IOSTAT = ios, ERR = 901) 
    293292901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namisf in reference namelist', lwp ) 
    294293      ! 
    295       REWIND( numnam_cfg )              ! Namelist namsbc_rnf in configuration namelist : Runoffs 
    296294      READ  ( numnam_cfg, namisf, IOSTAT = ios, ERR = 902 ) 
    297295902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namisf in configuration namelist', lwp ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/tests/ISOMIP+/MY_SRC/tradmp.F90

    r11889 r12202  
    177177      !!---------------------------------------------------------------------- 
    178178      ! 
    179       REWIND( numnam_ref )   ! Namelist namtra_dmp in reference namelist : T & S relaxation 
    180179      READ  ( numnam_ref, namtra_dmp, IOSTAT = ios, ERR = 901) 
    181180901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_dmp in reference namelist', lwp ) 
    182181      ! 
    183       REWIND( numnam_cfg )   ! Namelist namtra_dmp in configuration namelist : T & S relaxation 
    184182      READ  ( numnam_cfg, namtra_dmp, IOSTAT = ios, ERR = 902 ) 
    185183902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_dmp in configuration namelist', lwp ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/tests/ISOMIP/MY_SRC/usrdef_nam.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/tests/LOCK_EXCHANGE/MY_SRC/usrdef_nam.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/tests/OVERFLOW/MY_SRC/usrdef_nam.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/tests/STATION_ASF/MY_SRC/nemogcm.F90

    r11831 r12202  
    188188      ! 
    189189      ! open ocean.output as soon as possible to get all output prints (including errors messages) 
    190       IF( lwm )   CALL ctl_opn(     numout,        'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     190      IF( lwm )   CALL ctl_opn(      numout,            'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    191191      ! open reference and configuration namelist files 
    192       CALL ctl_opn( numnam_ref,        'namelist_ref',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    193       CALL ctl_opn( numnam_cfg,        'namelist_cfg',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    194       IF( lwm )   CALL ctl_opn(     numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     192                  CALL load_nml( numnam_ref,            'namelist_ref',                                           -1, lwm ) 
     193                  CALL load_nml( numnam_cfg,            'namelist_cfg',                                           -1, lwm ) 
     194      IF( lwm )   CALL ctl_opn(      numond,    'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    195195      ! open /dev/null file to be able to supress output write easily 
    196       CALL ctl_opn(     numnul,           '/dev/null', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     196      CALL ctl_opn(     numnul,               '/dev/null', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    197197      ! 
    198198      !                             !--------------------! 
     
    200200      !                             !--------------------! 
    201201      ! 
    202       REWIND( numnam_ref )              ! Namelist namctl in reference namelist 
     202 
    203203      READ  ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 
    204204901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namctl in reference namelist' ) 
    205       REWIND( numnam_cfg )              ! Namelist namctl in confguration namelist 
    206205      READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 
    207206902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namctl in configuration namelist' ) 
     
    258257      !                             !------------------------------------! 
    259258      ! 
    260       REWIND( numnam_ref )              ! Namelist namcfg in reference namelist 
    261259      READ  ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 
    262260903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcfg in reference namelist' ) 
    263       REWIND( numnam_cfg )              ! Namelist namcfg in confguration namelist 
    264261      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 
    265262904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfg in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/tests/STATION_ASF/MY_SRC/sbcssm.F90

    r11831 r12202  
    186186      ENDIF 
    187187      ! 
    188       REWIND( numnam_ref )              ! Namelist namsbc_sas in reference namelist : Input fields 
    189188      READ  ( numnam_ref, namsbc_sas, IOSTAT = ios, ERR = 901) 
    190189901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_sas in reference namelist' ) 
    191       REWIND( numnam_cfg )              ! Namelist namsbc_sas in configuration namelist : Input fields 
    192190      READ  ( numnam_cfg, namsbc_sas, IOSTAT = ios, ERR = 902 ) 
    193191902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_sas in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/tests/STATION_ASF/MY_SRC/usrdef_nam.F90

    r11930 r12202  
    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_r12072_MERGE_OPTION2_2019/tests/VORTEX/MY_SRC/domvvl.F90

    r12166 r12202  
    10181018      !!----------------------------------------------------------------------  
    10191019      ! 
    1020       REWIND( numnam_ref )              ! Namelist nam_vvl in reference namelist :  
    10211020      READ  ( numnam_ref, nam_vvl, IOSTAT = ios, ERR = 901) 
    10221021901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_vvl in reference namelist' ) 
    1023       REWIND( numnam_cfg )              ! Namelist nam_vvl in configuration namelist : Parameters of the run 
    10241022      READ  ( numnam_cfg, nam_vvl, IOSTAT = ios, ERR = 902 ) 
    10251023902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nam_vvl in configuration namelist' ) 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/tests/VORTEX/MY_SRC/usrdef_nam.F90

    r11536 r12202  
    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_r12072_MERGE_OPTION2_2019/tests/WAD/MY_SRC/usrdef_nam.F90

    r11536 r12202  
    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.