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 8201 for branches/UKMO/dev_r5518_GO6M_dev/NEMOGCM/NEMO/TOP_SRC/trcstp.F90 – NEMO

Ignore:
Timestamp:
2017-06-21T16:27:21+02:00 (7 years ago)
Author:
frrh
Message:

Merge MEDUSA branch using command:

svn merge -r 5711:8182 \u200b\u200bsvn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/NERC/dev_r5518_NOC_MEDUSA_Stable

and run "fcm conflicts" to resolve conflicts - mainly tree conflicts in AGRIF files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6M_dev/NEMOGCM/NEMO/TOP_SRC/trcstp.F90

    r6487 r8201  
    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 
     
    8790         tra(:,:,:,:) = 0.e0 
    8891         ! 
     92# if defined key_debug_medusa 
     93         IF(lwp) WRITE(numout,*) ' MEDUSA trc_stp begins at kt =', kt 
     94         CALL flush(numout) 
     95# endif 
    8996                                   CALL trc_rst_opn  ( kt )       ! Open tracer restart file  
     97# if defined key_debug_medusa 
     98                                   CALL trc_rst_stat  
     99                                   CALL trc_rst_tra_stat 
     100# endif 
    90101         IF( lrst_trc )            CALL trc_rst_cal  ( kt, 'WRITE' )   ! calendar 
    91102         IF( lk_iomput ) THEN  ;   CALL trc_wri      ( kt )       ! output of passive tracers with iom I/O manager 
     
    93104         ENDIF 
    94105                                   CALL trc_sms      ( kt )       ! tracers: sinks and sources 
     106# if defined key_debug_medusa 
     107         IF(lwp) WRITE(numout,*) ' MEDUSA trc_stp SMS complete at kt =', kt 
     108         CALL trc_rst_stat 
     109         CALL trc_rst_tra_stat 
     110         CALL flush(numout) 
     111# endif 
    95112                                   CALL trc_trp      ( kt )       ! transport of passive tracers 
     113# if defined key_debug_medusa 
     114         IF(lwp) WRITE(numout,*) ' MEDUSA trc_stp transport complete at kt =', kt 
     115         CALL trc_rst_stat 
     116         CALL trc_rst_tra_stat 
     117         CALL flush(numout) 
     118# endif 
    96119         IF( kt == nittrc000 ) THEN 
    97120            CALL iom_close( numrtr )       ! close input tracer restart file 
     
    102125         ! 
    103126         IF( nn_dttrc /= 1   )     CALL trc_sub_reset( kt )       ! resetting physical variables when sub-stepping 
    104          ! 
    105       ENDIF 
    106       ! 
    107       ztrai = 0._wp                                                   !  content of all tracers 
    108       DO jn = 1, jptra 
    109          ztrai = ztrai + glob_sum( trn(:,:,:,jn) * cvol(:,:,:)   ) 
    110       END DO 
    111       IF( lwp ) WRITE(numstr,9300) kt,  ztrai / areatot 
    112 9300  FORMAT(i10,e18.10) 
     127# if defined key_debug_medusa 
     128         IF(lwp) WRITE(numout,*) ' MEDUSA trc_stp ends at kt =', kt 
     129         CALL flush(numout) 
     130# endif 
     131         ! 
     132      ENDIF 
     133      ! 
     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( numstr /= -1 ) WRITE(numstr,9300) kt,  ztrai / areatot 
     1499300     FORMAT(i10,e18.10) 
     150      ENDIF 
    113151      ! 
    114152      IF( nn_timing == 1 )   CALL timing_stop('trc_stp') 
Note: See TracChangeset for help on using the changeset viewer.