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 7701 for branches/UKMO/dev_r5518_MEDUSA_optim_RH/NEMOGCM/NEMO/TOP_SRC/trcini.F90 – NEMO

Ignore:
Timestamp:
2017-02-20T11:07:50+01:00 (7 years ago)
Author:
frrh
Message:

Improve control of numstr unit.

In addition to only producing output, and doing the
related global sums when we really need them, we
need to restrict it to one instance on the master PE
in all circumstances and to explicitly close it at the
end of the run. (Currently if lwp = true you get a separate
file for every PE containing identical information and none
of the tracer.stat files are explicitly closed.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_MEDUSA_optim_RH/NEMOGCM/NEMO/TOP_SRC/trcini.F90

    r7693 r7701  
    123123# endif 
    124124 
    125       IF( lwp ) THEN 
     125      IF( ln_ctl ) THEN 
    126126         ! 
    127          CALL ctl_opn( numstr, 'tracer.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp , narea ) 
     127         IF (narea == 1) THEN  
     128            ! The tracer.stat file only contains global tracer sum values, if 
     129            ! it contains anything at all. Hence it only needs to be opened 
     130            ! and written to on the master PE, not on all PEs.  
     131            CALL ctl_opn( numstr, 'tracer.stat', 'REPLACE', 'FORMATTED',  & 
     132                          'SEQUENTIAL', -1, numout, lwp , narea ) 
     133         ENDIF  
    128134         ! 
    129135      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.