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 tags/nemo_v1_04/NEMO/TOP_SRC/TRP – NEMO

source: tags/nemo_v1_04/NEMO/TOP_SRC/TRP/trcstp.F90 @ 8516

Last change on this file since 8516 was 276, checked in by opalod, 19 years ago

nemo_v1_update_005:RB: move calls to trc_dia and trc_wri from step.F90 to TOP_SRC/TRP/trcstp.F90

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 3.8 KB
Line 
1MODULE trcstp
2   !!======================================================================
3   !!                       ***  MODULE trcstp  ***
4   !! Time-stepping    : time loop of opa for passive tracer
5   !!======================================================================
6#if defined key_passivetrc
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              ! ocean passive tracers variables
13   USE trctrp           ! passive tracers transport
14   USE trcsms           ! passive tracers sources and sinks
15   USE trcdia          ! passive tracer diagnostics        (trc_dia routine)
16   USE trcrst          ! restart for passive tracers
17
18   IMPLICIT NONE
19   PRIVATE
20
21   !! * Routine accessibility
22   PUBLIC trc_stp           ! called by step
23   !!----------------------------------------------------------------------
24   !!  TOP 1.0,  LOCEAN-IPSL (2005)
25   !! $Header$
26   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
27   !!----------------------------------------------------------------------
28
29CONTAINS
30
31   SUBROUTINE trc_stp( kt )
32      !!-------------------------------------------------------------------
33      !!                     ***  ROUTINE trc_stp  ***
34      !!                     
35      !! ** Purpose : Time loop of opa for passive tracer
36      !!
37      !! ** Method  :
38      !!              Compute the passive tracers trends
39      !!              Update the passive tracers
40      !!
41      !! History :
42      !!   9.0  !  04-03  (C. Ethe)  Original
43      !!-------------------------------------------------------------------
44      !! * Arguments
45      INTEGER, INTENT( in ) ::  kt  ! ocean time-step index
46      INTEGER :: jn
47      REAL(wp) :: ztra
48
49      !! * local declarations
50      INTEGER ::   indic    ! error indicator if < 0
51      !! ---------------------------------------------------------------------
52
53      indic = 1                    ! reset to no error condition
54
55
56
57      ! diagnostics init
58
59      IF( kt == nit000 )   CALL trc_dia( kt, indic )
60
61      ! these ROUTINES are called only every ndttrc time step
62      IF( MOD( kt , ndttrc ) == 0 ) THEN
63
64         ! tracers: sink and source
65
66         CALL trc_sms( kt )
67
68         DO jn = 1, jptra
69            IF(ln_ctl) THEN         ! print mean trends (used for debugging)
70               ztra = SUM( tra(2:nictle,2:njctle,1:jpkm1,jn) * tmask(2:nictle,2:njctle,1:jpkm1) )
71               WRITE(numout,*) ' trc/sms  - ',ctrcnm(jn),' : ', ztra-tra_ctl(jn)
72               tra_ctl(jn) = ztra
73            ENDIF
74         END DO
75
76 
77
78         ! transport of passive tracers
79
80         CALL trc_trp( kt )
81
82         DO jn = 1, jptra
83            IF(ln_ctl) THEN         ! print mean trends (used for debugging)
84               ztra = SUM( tra(2:nictle,2:njctle,1:jpkm1,jn) * tmask(2:nictle,2:njctle,1:jpkm1) )
85               WRITE(numout,*) ' trc/trp  - ',ctrcnm(jn),' : ', ztra-tra_ctl(jn)
86               tra_ctl(jn) = ztra
87            ENDIF
88         END DO
89
90      ENDIF
91
92     
93
94      ! outputs
95
96      CALL trc_wri( kt ) 
97
98
99
100      ! diagnostics
101 
102      CALL trc_dia( kt, indic )
103
104
105
106   END SUBROUTINE trc_stp
107
108#else
109   !!----------------------------------------------------------------------
110   !!   Default key                                     NO passive tracers
111   !!----------------------------------------------------------------------
112CONTAINS
113   SUBROUTINE trc_stp( kt )        ! Empty routine
114      INTEGER, INTENT(in) :: kt
115      WRITE(*,*) 'trc_stp: You should not have seen this print! error?', kt
116   END SUBROUTINE trc_stp
117#endif
118
119   !!======================================================================
120END MODULE trcstp
Note: See TracBrowser for help on using the repository browser.