New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 4147 for branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OFF_SRC/nemogcm.F90 – NEMO

Ignore:
Timestamp:
2013-11-04T12:51:55+01:00 (10 years ago)
Author:
cetlod
Message:

merge in dev_LOCEAN_2013, the 1st development branch dev_r3853_CNRS9_Confsetting, from its starting point ( r3853 ) on the trunk: see ticket #1169

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OFF_SRC/nemogcm.F90

    r3827 r4147  
    136136      INTEGER ::   ji            ! dummy loop indices 
    137137      INTEGER ::   ilocal_comm   ! local integer 
     138      INTEGER ::   ios 
    138139      CHARACTER(len=80), DIMENSION(16) ::   cltxt 
    139140      !! 
     
    141142         &             nn_isplt, nn_jsplt, nn_jctls, nn_jctle,   & 
    142143         &             nn_bench, nn_timing 
     144      NAMELIST/namcfg/ cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 
     145         &             jpizoom, jpjzoom, jperio 
    143146      !!---------------------------------------------------------------------- 
    144147      ! 
    145148      cltxt = '' 
    146149      ! 
    147       !                             ! open Namelist file 
    148       CALL ctl_opn( numnam, 'namelist', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    149       ! 
    150       READ( numnam, namctl )        ! Namelist namctl : Control prints & Benchmark 
    151       ! 
     150      !                             ! Open reference namelist and configuration namelist files 
     151      CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
     152      CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
     153      CALL ctl_opn( numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 
     154      ! 
     155      ! 
     156      REWIND( numnam_ref )              ! Namelist namctl in reference namelist : Control prints & Benchmark 
     157      READ  ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 
     158901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in reference namelist', lwp ) 
     159 
     160      REWIND( numnam_cfg )              ! Namelist namctl in confguration namelist : Control prints & Benchmark 
     161      READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 
     162902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', lwp ) 
     163      WRITE( numond, namctl ) 
     164      ! 
     165      REWIND( numnam_ref )              ! Namelist namcfg in reference namelist : Control prints & Benchmark 
     166      READ  ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 
     167903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in reference namelist', lwp ) 
     168 
     169      REWIND( numnam_cfg )              ! Namelist namcfg in confguration namelist : Control prints & Benchmark 
     170      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 
     171904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', lwp )    
     172      WRITE( numond, namcfg ) 
    152173      !                             !--------------------------------------------! 
    153174      !                             !  set communicator & select the local node  ! 
     
    155176#if defined key_iomput 
    156177         CALL  xios_initialize( "nemo",return_comm=ilocal_comm ) 
    157       narea = mynode( cltxt, numnam, nstop, ilocal_comm )   ! Nodes selection 
     178      narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm )   ! Nodes selection 
    158179#else 
    159180      ilocal_comm = 0 
    160       narea = mynode( cltxt, numnam, nstop )                 ! Nodes selection (control print return in cltxt) 
     181      narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop )                ! Nodes selection (control print return in cltxt) 
    161182#endif 
    162183 
     
    294315      jsplt     = nn_jsplt 
    295316      nbench    = nn_bench 
     317     IF(lwp) THEN                  ! control print 
     318         WRITE(numout,*) 
     319         WRITE(numout,*) 'namcfg  : configuration initialization through namelist read' 
     320         WRITE(numout,*) '~~~~~~~ ' 
     321         WRITE(numout,*) '   Namelist namcfg' 
     322         WRITE(numout,*) '      configuration name              cp_cfg      = ', TRIM(cp_cfg) 
     323         WRITE(numout,*) '      configuration resolution        jp_cfg      = ', jp_cfg 
     324         WRITE(numout,*) '      1st lateral dimension ( >= jpi ) jpidta     = ', jpidta 
     325         WRITE(numout,*) '      2nd    "         "    ( >= jpj ) jpjdta     = ', jpjdta 
     326         WRITE(numout,*) '      3nd    "         "               jpkdta     = ', jpkdta 
     327         WRITE(numout,*) '      1st dimension of global domain in i jpiglo  = ', jpiglo 
     328         WRITE(numout,*) '      2nd    -                  -    in j jpjglo  = ', jpjglo 
     329         WRITE(numout,*) '      left bottom i index of the zoom (in data domain) jpizoom = ', jpizoom 
     330         WRITE(numout,*) '      left bottom j index of the zoom (in data domain) jpizoom = ', jpjzoom 
     331         WRITE(numout,*) '      lateral cond. type (between 0 and 6) jperio = ', jperio    
     332      ENDIF 
    296333      !                             ! Parameter control 
    297334      ! 
     
    337374         CASE ( 'gyre' )   ;   CALL ctl_warn( ' The Benchmark is activated ' ) 
    338375         CASE DEFAULT      ;   CALL ctl_stop( ' The Benchmark is based on the GYRE configuration:',   & 
    339             &                                 ' key_gyre must be used or set nbench = 0' ) 
     376            &                                 ' cp_cfg="gyre" in namelsit &namcfg or set nbench = 0' ) 
    340377         END SELECT 
    341378      ENDIF 
     
    364401      ! 
    365402      IF( numstp     /= -1 )   CLOSE( numstp     )   ! time-step file 
    366       IF( numnam     /= -1 )   CLOSE( numnam     )   ! oce namelist 
     403      IF( numnam_ref /= -1 )   CLOSE( numnam_ref )   ! oce reference namelist 
     404      IF( numnam_cfg /= -1 )   CLOSE( numnam_cfg )   ! oce configuration namelist 
    367405      IF( numout     /=  6 )   CLOSE( numout     )   ! standard model output file 
    368406      numout = 6                                     ! redefine numout in case it is used after this point... 
Note: See TracChangeset for help on using the changeset viewer.