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 5038 for branches/2014/dev_r4621_NOC4_BDY_VERT_INTERP/NEMOGCM/NEMO/OFF_SRC/nemogcm.F90 – NEMO

Ignore:
Timestamp:
2015-01-20T15:26:13+01:00 (9 years ago)
Author:
jamesharle
Message:

Merging branch with HEAD of the trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4621_NOC4_BDY_VERT_INTERP/NEMOGCM/NEMO/OFF_SRC/nemogcm.F90

    r4319 r5038  
    5151   USE trcnam 
    5252   USE trcrst 
     53   USE diaptr         ! Need to initialise this as some variables are used in if statements later 
    5354 
    5455   IMPLICIT NONE 
     
    155156      CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    156157      CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    157       CALL ctl_opn( numond, 'output.namelist.dyn', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. , 1 ) 
    158158      ! 
    159159      REWIND( numnam_ref )              ! Namelist namctl in reference namelist : Control prints & Benchmark 
     
    164164      READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 
    165165902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', .TRUE. ) 
    166       WRITE( numond, namctl ) 
    167166 
    168167      ! 
     
    174173      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 
    175174904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. )    
    176       WRITE( numond, namcfg ) 
    177175 
    178176      ! 
    179177      !                             !--------------------------------------------! 
    180178      !                             !  set communicator & select the local node  ! 
     179      !                             !  NB: mynode also opens output.namelist.dyn ! 
     180      !                             !      on unit number numond on first proc   ! 
    181181      !                             !--------------------------------------------! 
    182182#if defined key_iomput 
    183          CALL  xios_initialize( "nemo",return_comm=ilocal_comm ) 
     183      CALL  xios_initialize( "nemo",return_comm=ilocal_comm ) 
    184184      narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm )   ! Nodes selection 
    185185#else 
     
    190190      narea = narea + 1                       ! mynode return the rank of proc (0 --> jpnij -1 ) 
    191191 
     192      lwm = (narea == 1)                      ! control of output namelists 
    192193      lwp = (narea == 1) .OR. ln_ctl          ! control of all listing output print 
     194 
     195      IF(lwm) THEN 
     196         ! write merged namelists from earlier to output namelist now that the 
     197         ! file has been opened in call to mynode. nammpp has already been 
     198         ! written in mynode (if lk_mpp_mpi) 
     199         WRITE( numond, namctl ) 
     200         WRITE( numond, namcfg ) 
     201      ENDIF 
    193202 
    194203      ! If dimensions of processor grid weren't specified in the namelist file  
     
    257266                            CALL     phy_cst    ! Physical constants 
    258267                            CALL     eos_init   ! Equation of state 
     268      IF( lk_c1d        )   CALL     c1d_init   ! 1D column configuration 
    259269                            CALL     dom_cfg    ! Domain configuration 
    260270                            CALL     dom_init   ! Domain 
     
    289299      !                                     ! Passive tracers 
    290300                            CALL     trc_init   ! Passive tracers initialization 
    291  
     301      ! 
     302      ! Initialise diaptr as some variables are used in if statements later (in 
     303      ! various advection and diffusion routines. 
     304                            CALL dia_ptr_init 
     305      ! 
    292306      IF(lwp) WRITE(numout,cform_aaa)       ! Flag AAAAAAA 
    293307      ! 
Note: See TracChangeset for help on using the changeset viewer.