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 7709 for branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC – NEMO

Ignore:
Timestamp:
2017-02-21T16:46:07+01:00 (7 years ago)
Author:
jpalmier
Message:

JPALM -- 21-02-2017 -- merge the branch with Richard optim branch, and add 2 fixes in trcnam_medusa

Location:
branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcnam_medusa.F90

    r7331 r7709  
    239239!! 
    240240      jliebig     = 0 
     241      jq10        = 0. 
    241242      xnln        = 0. 
    242243      xnld        = 0. 
     
    343344      jdms        = 0 
    344345      jdms_input  = 0 
    345       jdms_input  = 3 
     346      jdms_model  = 0 
    346347             
    347348      !REWIND(numnatm) 
  • branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trc.F90

    r7703 r7709  
    2626   INTEGER, PUBLIC                                                 ::   numnat_cfg = -1   !: logical unit for the reference passive tracer namelist_top_cfg 
    2727   INTEGER, PUBLIC                                                 ::   numont     = -1   !: logical unit for the reference passive tracer namelist output output.namelist.top 
    28    INTEGER, PUBLIC                                                 ::   numstr        !: logical unit for tracer statistics 
     28   INTEGER, PUBLIC                                                 ::   numstr     = -1   !: logical unit for tracer statistics 
    2929   INTEGER, PUBLIC                                                 ::   numrtr        !: logical unit for trc restart (read ) 
    3030   INTEGER, PUBLIC                                                 ::   numrtw        !: logical unit for trc restart ( write ) 
  • branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcini.F90

    r6715 r7709  
    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 
  • branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcstp.F90

    r6234 r7709  
    5555      !!              Update the passive tracers 
    5656      !!------------------------------------------------------------------- 
     57 
     58      USE dom_oce, ONLY: narea 
     59 
    5760      INTEGER, INTENT( in ) ::  kt      ! ocean time-step index 
    5861      INTEGER               ::  jk, jn  ! dummy loop indices 
     
    129132      ENDIF 
    130133      ! 
    131       ztrai = 0._wp                                                   !  content of all tracers 
    132       DO jn = 1, jptra 
    133          ztrai = ztrai + glob_sum( trn(:,:,:,jn) * cvol(:,:,:)   ) 
    134       END DO 
    135       IF( lwp ) WRITE(numstr,9300) kt,  ztrai / areatot 
    136 9300  FORMAT(i10,e18.10) 
     134      IF (ln_ctl) THEN  
     135         ! The following code is very expensive since it involves multiple  
     136         ! reproducible global sums over all tracer fields and is potentially   
     137         ! called on every timestep. The results it produces are purely for  
     138         ! informational purposes and do not affect model evolution.  
     139         ! Hence we restrict its use by protecting it with the ln_ctl RTL  
     140         ! which should normally only be used under debugging conditions  
     141         ! and not in operational runs. We also need to restrict output   
     142         ! to the master PE since there's no point duplicating the same results  
     143         ! on all processors.     
     144         ztrai = 0._wp                                                   !  content of all tracers 
     145         DO jn = 1, jptra 
     146            ztrai = ztrai + glob_sum( trn(:,:,:,jn) * cvol(:,:,:)   ) 
     147         END DO 
     148         IF( lwp ) WRITE(numstr,9300) kt,  ztrai / areatot 
     1499300     FORMAT(i10,e18.10) 
     150      ENDIF 
    137151      ! 
    138152      IF( nn_timing == 1 )   CALL timing_stop('trc_stp') 
Note: See TracChangeset for help on using the changeset viewer.