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

source: trunk/NEMO/TOP_SRC/TRP/trcstp.F90 @ 653

Last change on this file since 653 was 616, checked in by opalod, 17 years ago

nemo_v2_update_003:CE:use of IOM module for restart file

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 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 prtctl_trc       ! Print control for debbuging
16   USE trcdia
17   USE trcdit
18   USE trcrst
19
20   IMPLICIT NONE
21   PRIVATE
22
23   !! * Routine accessibility
24   PUBLIC trc_stp           ! called by step
25   !!----------------------------------------------------------------------
26   !!   TOP 1.0 , LOCEAN-IPSL (2005)
27   !! $Header$
28   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
29   !!----------------------------------------------------------------------
30
31CONTAINS
32
33   SUBROUTINE trc_stp( kt, kindic )
34      !!-------------------------------------------------------------------
35      !!                     ***  ROUTINE trc_stp  ***
36      !!                     
37      !! ** Purpose : Time loop of opa for passive tracer
38      !!
39      !! ** Method  :
40      !!              Compute the passive tracers trends
41      !!              Update the passive tracers
42      !!
43      !! History :
44      !!   9.0  !  04-03  (C. Ethe)  Original
45      !!-------------------------------------------------------------------
46      !! * Arguments
47      INTEGER, INTENT( in ) ::  kt  ! ocean time-step index
48      INTEGER, INTENT( in ) ::  kindic
49      CHARACTER (len=25) :: charout
50
51      ! this ROUTINE is called only every ndttrc time step
52      IF( MOD( kt , ndttrc ) /= 0 ) RETURN
53
54      CALL trc_rst_opn( kt )      ! Open tracer restart file
55
56       ! tracers: sink and source
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      CALL trc_sms( kt )
63
64      IF(ln_ctl)   THEN  ! print mean trends (used for debugging)
65         WRITE(charout, FMT="('SMS')")
66         CALL prt_ctl_trc_info(charout)
67         CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm)
68      ENDIF
69
70      ! transport of passive tracers
71      CALL trc_trp( kt )
72
73      IF(ln_ctl)   THEN  ! print mean trends (used for debugging)
74         WRITE(charout, FMT="('TRP')")
75         CALL prt_ctl_trc_info(charout)
76         CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm)
77      ENDIF
78
79      IF( lrst_trc ) CALL trc_rst_wri( kt )  ! write tracer restart file
80
81      CALL trc_dia( kt, kindic )     ! diagnostics
82
83
84   END SUBROUTINE trc_stp
85
86#else
87   !!----------------------------------------------------------------------
88   !!   Default key                                     NO passive tracers
89   !!----------------------------------------------------------------------
90CONTAINS
91   SUBROUTINE trc_stp( kt )        ! Empty routine
92      INTEGER, INTENT(in) :: kt
93      WRITE(*,*) 'trc_stp: You should not have seen this print! error?', kt
94   END SUBROUTINE trc_stp
95#endif
96
97   !!======================================================================
98END MODULE trcstp
Note: See TracBrowser for help on using the repository browser.