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 trunk/NEMOGCM/NEMO/TOP_SRC – NEMO

source: trunk/NEMOGCM/NEMO/TOP_SRC/trcstp.F90 @ 2528

Last change on this file since 2528 was 2528, checked in by rblod, 13 years ago

Update NEMOGCM from branch nemo_v3_3_beta

  • Property svn:keywords set to Id
File size: 3.6 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
25   IMPLICIT NONE
26   PRIVATE
27
28   PUBLIC   trc_stp    ! called by step
29   
30   !!----------------------------------------------------------------------
31   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
32   !! $Id$
33   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
34   !!----------------------------------------------------------------------
35CONTAINS
36
37   SUBROUTINE trc_stp( kt )
38      !!-------------------------------------------------------------------
39      !!                     ***  ROUTINE trc_stp  ***
40      !!                     
41      !! ** Purpose : Time loop of opa for passive tracer
42      !!
43      !! ** Method  :
44      !!              Compute the passive tracers trends
45      !!              Update the passive tracers
46      !!-------------------------------------------------------------------
47      INTEGER, INTENT( in ) ::  kt  ! ocean time-step index
48      CHARACTER (len=25)    ::  charout
49      !!-------------------------------------------------------------------
50
51      IF( MOD( kt - 1 , nn_dttrc ) == 0 ) THEN      ! only every nn_dttrc time step
52         !
53         IF(ln_ctl) THEN
54            WRITE(charout,FMT="('kt =', I4,'  d/m/y =',I2,I2,I4)") kt, nday, nmonth, nyear
55            CALL prt_ctl_trc_info(charout)
56         ENDIF
57         !
58         tra(:,:,:,:) = 0.e0
59         !
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 )
65         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
71         !
72      ENDIF
73
74   END SUBROUTINE trc_stp
75
76#else
77   !!----------------------------------------------------------------------
78   !!   Default key                                     NO passive tracers
79   !!----------------------------------------------------------------------
80CONTAINS
81   SUBROUTINE trc_stp( kt )        ! Empty routine
82      WRITE(*,*) 'trc_stp: You should not have seen this print! error?', kt
83   END SUBROUTINE trc_stp
84#endif
85
86   !!======================================================================
87END MODULE trcstp
Note: See TracBrowser for help on using the repository browser.