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.
trcstp.F90 in branches/2011/dev_r2802_TOP_substepping/NEMOGCM/NEMO/TOP_SRC – NEMO

source: branches/2011/dev_r2802_TOP_substepping/NEMOGCM/NEMO/TOP_SRC/trcstp.F90 @ 2830

Last change on this file since 2830 was 2830, checked in by kpedwards, 13 years ago

Updates to average physics variables for TOP substepping.

  • Property svn:keywords set to Id
File size: 3.9 KB
Line 
1MODULE trcstp
2   !!======================================================================
3   !!                       ***  MODULE trcstp  ***
4   !! Time-stepping    : time loop of opa for passive tracer
5   !!======================================================================
6   !! History :  1.0  !  2004-03  (C. Ethe)  Original
7   !!----------------------------------------------------------------------
8#if defined key_top
9   !!----------------------------------------------------------------------
10   !!   trc_stp      : passive tracer system time-stepping
11   !!----------------------------------------------------------------------
12   USE oce_trc          ! ocean dynamics and active tracers variables
13   USE trc
14   USE trctrp           ! passive tracers transport
15   USE trcsms           ! passive tracers sources and sinks
16   USE prtctl_trc       ! Print control for debbuging
17   USE trcdia
18   USE trcwri
19   USE trcrst
20   USE trdmod_trc_oce
21   USE trdmld_trc
22   USE iom
23   USE in_out_manager
24   USE trcsubstp
25
26   IMPLICIT NONE
27   PRIVATE
28
29   PUBLIC   trc_stp    ! called by step
30#  include "domzgr_substitute.h90"
31   
32   !!----------------------------------------------------------------------
33   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
34   !! $Id$
35   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
36   !!----------------------------------------------------------------------
37CONTAINS
38
39   SUBROUTINE trc_stp( kt )
40      !!-------------------------------------------------------------------
41      !!                     ***  ROUTINE trc_stp  ***
42      !!                     
43      !! ** Purpose : Time loop of opa for passive tracer
44      !!
45      !! ** Method  :
46      !!              Compute the passive tracers trends
47      !!              Update the passive tracers
48      !!-------------------------------------------------------------------
49      INTEGER, INTENT( in ) ::  kt  ! ocean time-step index
50      CHARACTER (len=25)    ::  charout
51      !!-------------------------------------------------------------------
52
53     IF(nn_dttrc .NE. 1) THEN
54        CALL trc_sub_stp(kt)
55     ENDIF
56     IF( MOD( kt , nn_dttrc ) == 0 ) THEN      ! only every nn_dttrc time step
57
58         !
59         IF(ln_ctl) THEN
60            WRITE(charout,FMT="('kt =', I4,'  d/m/y =',I2,I2,I4)") kt, nday, nmonth, nyear
61            CALL prt_ctl_trc_info(charout)
62         ENDIF
63         !
64         tra(:,:,:,:) = 0.e0
65         !
66         IF( kt == nittrc000 .AND. lk_trdmld_trc  )  &
67            &                      CALL trd_mld_trc_init        ! trends: Mixed-layer
68                                   CALL trc_rst_opn( kt )       ! Open tracer restart file
69         IF( lk_iomput ) THEN  ;   CALL trc_wri( kt )           ! output of passive tracers
70         ELSE                  ;   CALL trc_dia( kt )
71         ENDIF
72                                   CALL trc_sms( kt )           ! tracers: sink and source
73                                   CALL trc_trp( kt )           ! transport of passive tracers
74         IF( kt == nittrc000 )     CALL iom_close( numrtr )     ! close input  passive tracers restart file
75         IF( lrst_trc )            CALL trc_rst_wri( kt )       ! write tracer restart file
76         IF( lk_trdmld_trc  )      CALL trd_mld_trc( kt )       ! trends: Mixed-layer
77         !
78         IF(nn_dttrc .NE. 1) THEN
79            CALL trc_sub_stp_reset(kt)
80         ENDIF
81      ENDIF
82
83   END SUBROUTINE trc_stp
84
85#else
86   !!----------------------------------------------------------------------
87   !!   Default key                                     NO passive tracers
88   !!----------------------------------------------------------------------
89CONTAINS
90   SUBROUTINE trc_stp( kt )        ! Empty routine
91      WRITE(*,*) 'trc_stp: You should not have seen this print! error?', kt
92   END SUBROUTINE trc_stp
93#endif
94
95   !!======================================================================
96END MODULE trcstp
Note: See TracBrowser for help on using the repository browser.