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

source: branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcstp.F90 @ 2038

Last change on this file since 2038 was 2038, checked in by cetlod, 14 years ago

Apply the merge to passive tracers, see ticket:693

File size: 3.6 KB
Line 
1MODULE trcstp
2   !!======================================================================
3   !!                       ***  MODULE trcstp  ***
4   !! Time-stepping    : time loop of opa for passive tracer
5   !!======================================================================
6#if defined key_top
7   !!----------------------------------------------------------------------
8   !!   trc_stp      : passive tracer system time-stepping
9   !!----------------------------------------------------------------------
10   !! * Modules used
11   USE oce_trc          ! ocean dynamics and active tracers variables
12   USE trc
13   USE trctrp           ! passive tracers transport
14   USE trcsms           ! passive tracers sources and sinks
15   USE prtctl_trc       ! Print control for debbuging
16   USE trcdia
17   USE trcwri
18   USE trcrst
19   USE trdmod_trc_oce
20   USE trdmld_trc
21   USE iom
22   USE in_out_manager
23
24   IMPLICIT NONE
25   PRIVATE
26
27   !! * Routine accessibility
28   PUBLIC trc_stp           ! called by step
29   !!----------------------------------------------------------------------
30   !!   TOP 1.0 , LOCEAN-IPSL (2005)
31   !! $Id: trcstp.F90 1285 2009-02-03 13:38:51Z cetlod $
32   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
33   !!----------------------------------------------------------------------
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      !! History :
48      !!   9.0  !  04-03  (C. Ethe)  Original
49      !!-------------------------------------------------------------------
50      !! * Arguments
51      INTEGER, INTENT( in ) ::  kt  ! ocean time-step index
52      CHARACTER (len=25)    ::  charout
53
54      ! this ROUTINE is called only every nn_dttrc time step
55      IF( MOD( kt , nn_dttrc ) /= 0 ) RETURN
56
57      IF(ln_ctl) THEN
58         WRITE(charout,FMT="('kt =', I4,'  d/m/y =',I2,I2,I4)") kt, nday, nmonth, nyear
59         CALL prt_ctl_trc_info(charout)
60      ENDIF
61
62      tra(:,:,:,:) = 0.
63
64      IF( kt == nittrc000 .AND. lk_trdmld_trc  )  &
65         &                   CALL trd_mld_trc_init        ! trends: Mixed-layer
66                             CALL trc_rst_opn( kt )       ! Open tracer restart file
67                             CALL trc_sms( kt )           ! tracers: sink and source
68                             CALL trc_trp( kt )           ! transport of passive tracers
69      IF( kt == nittrc000 )  CALL iom_close( numrtr )     ! close input  passive tracers restart file
70      IF( lrst_trc )         CALL trc_rst_wri( kt )       ! write tracer restart file
71      IF( lk_iomput ) THEN
72                             CALL trc_wri( kt )           ! output of passive tracers
73      ELSE
74                             CALL trc_dia( kt )   ! diagnostics
75      ENDIF
76      IF( lk_trdmld_trc  )   CALL trd_mld_trc( kt )     ! trends: Mixed-layer
77
78   END SUBROUTINE trc_stp
79
80#else
81   !!----------------------------------------------------------------------
82   !!   Default key                                     NO passive tracers
83   !!----------------------------------------------------------------------
84CONTAINS
85   SUBROUTINE trc_stp( kt )        ! Empty routine
86      INTEGER, INTENT(in) :: kt
87      WRITE(*,*) 'trc_stp: You should not have seen this print! error?', kt
88   END SUBROUTINE trc_stp
89#endif
90
91   !!======================================================================
92END MODULE trcstp
Note: See TracBrowser for help on using the repository browser.