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/SAS_SRC/nemogcm.F90 – NEMO

Ignore:
Timestamp:
2013-11-04T12:51:55+01:00 (11 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/SAS_SRC/nemogcm.F90

    r3769 r4147  
    151151      !!---------------------------------------------------------------------- 
    152152      INTEGER ::   ji            ! dummy loop indices 
    153       INTEGER ::   ilocal_comm   ! local integer 
     153      INTEGER ::   ilocal_comm   ! local integer       
     154      INTEGER ::   ios 
     155 
    154156      CHARACTER(len=80), DIMENSION(16) ::   cltxt 
    155157      !! 
     
    157159         &             nn_isplt, nn_jsplt, nn_jctls, nn_jctle,   & 
    158160         &             nn_bench, nn_timing 
    159       !!---------------------------------------------------------------------- 
    160       ! 
    161       cltxt = '' 
    162       ! 
    163       !                             ! open Namelist file 
    164       CALL ctl_opn( numnam, 'namelist', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    165       ! 
    166       READ( numnam, namctl )        ! Namelist namctl : Control prints & Benchmark 
    167       ! 
     161      NAMELIST/namcfg/ cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 
     162         &             jpizoom, jpjzoom, jperio 
     163      !!---------------------------------------------------------------------- 
     164      ! 
     165      cltxt = ''      ! 
     166      !                             ! Open reference namelist and configuration namelist files 
     167      CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
     168      CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
     169      CALL ctl_opn( numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
     170      ! 
     171      REWIND( numnam_ref )              ! Namelist namctl in reference namelist : Control prints & Benchmark 
     172      READ  ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 
     173901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in reference namelist', lwp ) 
     174 
     175      REWIND( numnam_cfg )              ! Namelist namctl in confguration namelist : Control prints & Benchmark 
     176      READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 
     177902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', lwp ) 
     178      WRITE( numond, namctl ) 
     179      ! 
     180      REWIND( numnam_ref )              ! Namelist namcfg in reference namelist : Control prints & Benchmark 
     181      READ  ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 
     182903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in reference namelist', lwp ) 
     183 
     184      REWIND( numnam_cfg )              ! Namelist namcfg in confguration namelist : Control prints & Benchmark 
     185      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 
     186904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', lwp )    
     187      WRITE( numond, namcfg ) 
    168188      !                             !--------------------------------------------! 
    169189      !                             !  set communicator & select the local node  ! 
     
    173193         CALL  xios_initialize( "nemo",return_comm=ilocal_comm ) 
    174194      ENDIF 
    175       narea = mynode( cltxt, numnam, nstop, ilocal_comm )   ! Nodes selection 
     195      narea = mynode ( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm )  ! Nodes selection 
    176196#else 
    177197      ilocal_comm = 0 
    178       narea = mynode( cltxt, numnam, nstop )                 ! Nodes selection (control print return in cltxt) 
     198      narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm )        ! Nodes selection (control print return in cltxt) 
    179199#endif 
    180200      narea = narea + 1                                     ! mynode return the rank of proc (0 --> jpnij -1 ) 
     
    300320      jsplt     = nn_jsplt 
    301321      nbench    = nn_bench 
     322 
     323      IF(lwp) THEN                  ! control print 
     324         WRITE(numout,*) 
     325         WRITE(numout,*) 'namcfg  : configuration initialization through namelist read' 
     326         WRITE(numout,*) '~~~~~~~ ' 
     327         WRITE(numout,*) '   Namelist namcfg' 
     328         WRITE(numout,*) '      configuration name              cp_cfg      = ', TRIM(cp_cfg) 
     329         WRITE(numout,*) '      configuration zoom name         cp_cfz      = ', TRIM(cp_cfz) 
     330         WRITE(numout,*) '      configuration resolution        jp_cfg      = ', jp_cfg 
     331         WRITE(numout,*) '      1st lateral dimension ( >= jpi ) jpidta     = ', jpidta 
     332         WRITE(numout,*) '      2nd    "         "    ( >= jpj ) jpjdta     = ', jpjdta 
     333         WRITE(numout,*) '      3nd    "         "               jpkdta     = ', jpkdta 
     334         WRITE(numout,*) '      1st dimension of global domain in i jpiglo  = ', jpiglo 
     335         WRITE(numout,*) '      2nd    -                  -    in j jpjglo  = ', jpjglo 
     336         WRITE(numout,*) '      left bottom i index of the zoom (in data domain) jpizoom = ', jpizoom 
     337         WRITE(numout,*) '      left bottom j index of the zoom (in data domain) jpizoom = ', jpjzoom 
     338         WRITE(numout,*) '      lateral cond. type (between 0 and 6) jperio = ', jperio    
     339      ENDIF 
    302340      !                             ! Parameter control 
    303341      ! 
     
    343381         CASE ( 'gyre' )   ;   CALL ctl_warn( ' The Benchmark is activated ' ) 
    344382         CASE DEFAULT      ;   CALL ctl_stop( ' The Benchmark is based on the GYRE configuration:',   & 
    345             &                                 ' key_gyre must be used or set nbench = 0' ) 
     383            &                                 ' cp_cfg="gyre" in namelist &namcfg or set nbench = 0' ) 
    346384         END SELECT 
    347385      ENDIF 
     
    361399      CALL iom_close                                 ! close all input/output files managed by iom_* 
    362400      ! 
    363       IF( numstp      /= -1 )   CLOSE( numstp      )   ! time-step file 
    364       IF( numnam      /= -1 )   CLOSE( numnam      )   ! oce namelist 
    365       IF( numnam_ice  /= -1 )   CLOSE( numnam_ice  )   ! ice namelist 
    366       IF( numevo_ice  /= -1 )   CLOSE( numevo_ice  )   ! ice variables (temp. evolution) 
    367       IF( numout      /=  6 )   CLOSE( numout      )   ! standard model output file 
     401      IF( numstp          /= -1 )   CLOSE( numstp      )   ! time-step file       
     402      IF( numnam_ref      /= -1 )   CLOSE( numnam_ref      )   ! oce reference namelist 
     403      IF( numnam_cfg      /= -1 )   CLOSE( numnam_cfg      )   ! oce configuration namelist 
     404      IF( numond          /= -1 )   CLOSE( numond          )   ! oce output namelist 
     405      IF( numnam_ice_ref  /= -1 )   CLOSE( numnam_ice_ref  )   ! ice reference namelist 
     406      IF( numnam_ice_cfg  /= -1 )   CLOSE( numnam_ice_cfg  )   ! ice configuration namelist 
     407      IF( numoni          /= -1 )   CLOSE( numoni          )   ! ice output namelist 
     408      IF( numevo_ice      /= -1 )   CLOSE( numevo_ice  )   ! ice variables (temp. evolution) 
     409      IF( numout          /=  6 )   CLOSE( numout      )   ! standard model output file 
    368410      ! 
    369411      numout = 6                                     ! redefine numout in case it is used after this point... 
     
    382424      USE diawri    , ONLY: dia_wri_alloc 
    383425      USE dom_oce   , ONLY: dom_oce_alloc 
    384       ! 
    385       INTEGER :: ierr 
     426      USE oce       , ONLY : sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass  
     427      ! 
     428      INTEGER :: ierr,ierr4 
    386429      !!---------------------------------------------------------------------- 
    387430      ! 
     
    389432      ierr = ierr + dom_oce_alloc   ()          ! ocean domain 
    390433      ierr = ierr + lib_mpp_alloc   (numout)    ! mpp exchanges 
     434      ALLOCATE( snwice_mass(jpi,jpj)  , snwice_mass_b(jpi,jpj),             & 
     435         &      snwice_fmass(jpi,jpj), STAT= ierr4 ) 
     436      ierr = ierr + ierr4 
    391437      ! 
    392438      IF( lk_mpp    )   CALL mpp_sum( ierr ) 
Note: See TracChangeset for help on using the changeset viewer.