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 3294 for trunk/NEMOGCM/NEMO/TOP_SRC/trcstp.F90 – NEMO

Ignore:
Timestamp:
2012-01-28T17:44:18+01:00 (12 years ago)
Author:
rblod
Message:

Merge of 3.4beta into the trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/TOP_SRC/trcstp.F90

    r2528 r3294  
    2222   USE iom 
    2323   USE in_out_manager 
     24   USE trcsub 
    2425 
    2526   IMPLICIT NONE 
     
    2728 
    2829   PUBLIC   trc_stp    ! called by step 
    29     
     30 
     31   !! * Substitutions 
     32#  include "domzgr_substitute.h90" 
    3033   !!---------------------------------------------------------------------- 
    3134   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
     
    4548      !!              Update the passive tracers 
    4649      !!------------------------------------------------------------------- 
    47       INTEGER, INTENT( in ) ::  kt  ! ocean time-step index 
     50      INTEGER, INTENT( in ) ::  kt      ! ocean time-step index 
     51      INTEGER               ::  jk, jn  ! dummy loop indices 
     52      REAL(wp)              ::  ztrai 
    4853      CHARACTER (len=25)    ::  charout 
    4954      !!------------------------------------------------------------------- 
     55      ! 
     56      IF( nn_timing == 1 )   CALL timing_start('trc_stp') 
     57      ! 
     58      IF( kt == nittrc000 ) THEN 
     59                               CALL iom_close( numrtr )     ! close input  passive tracers restart file 
     60         IF( lk_trdmld_trc  )  CALL trd_mld_trc_init        ! trends: Mixed-layer 
     61      ENDIF 
     62      ! 
     63      IF( lk_vvl ) THEN                              ! update ocean volume due to ssh temporal evolution 
     64         DO jk = 1, jpk 
     65            cvol(:,:,jk) = e1e2t(:,:) * fse3t(:,:,jk) * tmask(:,:,jk) 
     66         END DO 
     67         IF( lk_degrad )  cvol(:,:,:) = cvol(:,:,:) * facvol(:,:,:)      ! degrad option: reduction by facvol 
     68         areatot         = glob_sum( cvol(:,:,:) ) 
     69      ENDIF 
     70      !     
     71     IF( nn_dttrc /= 1 )   CALL trc_sub_stp( kt )  ! averaging physical variables for sub-stepping 
    5072 
    51       IF( MOD( kt - 1 , nn_dttrc ) == 0 ) THEN      ! only every nn_dttrc time step 
     73     IF( MOD( kt , nn_dttrc ) == 0 ) THEN      ! only every nn_dttrc time step 
    5274         ! 
    5375         IF(ln_ctl) THEN 
     
    5880         tra(:,:,:,:) = 0.e0 
    5981         ! 
    60          IF( kt == nit000 .AND. lk_trdmld_trc  )  & 
    61             &                      CALL trd_mld_trc_init        ! trends: Mixed-layer 
    62                                    CALL trc_rst_opn( kt )       ! Open tracer restart file  
    63          IF( lk_iomput ) THEN  ;   CALL trc_wri( kt )           ! output of passive tracers 
    64          ELSE                  ;   CALL trc_dia( kt ) 
     82                                   CALL trc_rst_opn  ( kt )       ! Open tracer restart file  
     83         IF( lk_iomput ) THEN  ;   CALL trc_wri      ( kt )       ! output of passive tracers with iom I/O manager 
     84         ELSE                  ;   CALL trc_dia      ( kt )       ! output of passive tracers with old I/O manager 
    6585         ENDIF 
    66                                    CALL trc_sms( kt )           ! tracers: sink and source 
    67                                    CALL trc_trp( kt )           ! transport of passive tracers 
    68          IF( kt == nit000 )     CALL iom_close( numrtr )     ! close input  passive tracers restart file 
    69          IF( lrst_trc )            CALL trc_rst_wri( kt )       ! write tracer restart file 
    70          IF( lk_trdmld_trc  )      CALL trd_mld_trc( kt )       ! trends: Mixed-layer 
     86                                   CALL trc_sms      ( kt )       ! tracers: sinks and sources 
     87                                   CALL trc_trp      ( kt )       ! transport of passive tracers 
     88         IF( lrst_trc )            CALL trc_rst_wri  ( kt )       ! write tracer restart file 
     89         IF( lk_trdmld_trc  )      CALL trd_mld_trc  ( kt )       ! trends: Mixed-layer 
     90         ! 
     91         IF( nn_dttrc /= 1   )     CALL trc_sub_reset( kt )       ! resetting physical variables when sub-stepping 
    7192         ! 
    7293      ENDIF 
    73  
     94      ! 
     95      ztrai = 0._wp                                                   !  content of all tracers 
     96      DO jn = 1, jptra 
     97         ztrai = ztrai + glob_sum( trn(:,:,:,jn) * cvol(:,:,:)   ) 
     98      END DO 
     99      IF( lwp ) WRITE(numstr,9300) kt,  ztrai / areatot 
     1009300  FORMAT(i10,e18.10) 
     101      ! 
     102      IF( nn_timing == 1 )   CALL timing_stop('trc_stp') 
     103      ! 
    74104   END SUBROUTINE trc_stp 
    75105 
Note: See TracChangeset for help on using the changeset viewer.