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

    r4319 r5038  
    168168      CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    169169      CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    170       CALL ctl_opn( numond, 'output.namelist.dyn', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. , 1 ) 
    171170      ! 
    172171      REWIND( numnam_ref )              ! Namelist namctl in reference namelist : Control prints & Benchmark 
     
    177176      READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 
    178177902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', .TRUE. ) 
    179       WRITE( numond, namctl ) 
    180178 
    181179      ! 
     
    187185      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 
    188186904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. )    
    189       WRITE( numond, namcfg ) 
    190187 
    191188      !                             !--------------------------------------------! 
    192189      !                             !  set communicator & select the local node  ! 
     190      !                             !  NB: mynode also opens output.namelist.dyn ! 
     191      !                             !      on unit number numond on first proc   ! 
    193192      !                             !--------------------------------------------! 
    194193#if defined key_iomput 
     
    203202      narea = narea + 1                                     ! mynode return the rank of proc (0 --> jpnij -1 ) 
    204203 
     204      lwm = (narea == 1)                                    ! control of output namelists 
    205205      lwp = (narea == 1) .OR. ln_ctl                        ! control of all listing output print 
     206 
     207      IF(lwm) THEN 
     208         ! write merged namelists from earlier to output namelist now that the 
     209         ! file has been opened in call to mynode. nammpp has already been 
     210         ! written in mynode (if lk_mpp_mpi) 
     211         WRITE( numond, namctl ) 
     212         WRITE( numond, namcfg ) 
     213      ENDIF 
    206214 
    207215      ! If dimensions of processor grid weren't specified in the namelist file  
     
    405413      IF( numnam_ref      /= -1 )   CLOSE( numnam_ref      )   ! oce reference namelist 
    406414      IF( numnam_cfg      /= -1 )   CLOSE( numnam_cfg      )   ! oce configuration namelist 
    407       IF( numond          /= -1 )   CLOSE( numond          )   ! oce output namelist 
     415      IF( lwm.AND.numond  /= -1 )   CLOSE( numond          )   ! oce output namelist 
    408416      IF( numnam_ice_ref  /= -1 )   CLOSE( numnam_ice_ref  )   ! ice reference namelist 
    409417      IF( numnam_ice_cfg  /= -1 )   CLOSE( numnam_ice_cfg  )   ! ice configuration namelist 
    410       IF( numoni          /= -1 )   CLOSE( numoni          )   ! ice output namelist 
     418      IF( lwm.AND.numoni  /= -1 )   CLOSE( numoni          )   ! ice output namelist 
    411419      IF( numevo_ice      /= -1 )   CLOSE( numevo_ice  )   ! ice variables (temp. evolution) 
    412420      IF( numout          /=  6 )   CLOSE( numout      )   ! standard model output file 
Note: See TracChangeset for help on using the changeset viewer.