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

source: branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/TOP_SRC/trcstp.F90 @ 2819

Last change on this file since 2819 was 2819, checked in by cetlod, 13 years ago

Improvment of branch dev_r2787_LOCEAN3_TRA_TRP

  • Property svn:keywords set to Id
File size: 3.7 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( kt == nit000 ) THEN
52                               CALL iom_close( numrtr )     ! close input  passive tracers restart file
53         IF( lk_trdmld_trc  )  CALL trd_mld_trc_init        ! trends: Mixed-layer
54      ENDIF
55      !
56      IF( MOD( kt - 1 , nn_dttrc ) == 0 ) THEN      ! only every nn_dttrc time step
57         !
58         IF(ln_ctl) THEN
59            WRITE(charout,FMT="('kt =', I4,'  d/m/y =',I2,I2,I4)") kt, nday, nmonth, nyear
60            CALL prt_ctl_trc_info(charout)
61         ENDIF
62         !
63         tra(:,:,:,:) = 0.e0
64         !
65                                   CALL trc_rst_opn( kt )       ! Open tracer restart file
66         IF( lk_iomput ) THEN  ;   CALL trc_wri    ( kt )       ! output of passive tracers with iom I/O manager
67         ELSE                  ;   CALL trc_dia    ( kt )       ! output of passive tracers with old I/O manager
68         ENDIF
69                                   CALL trc_sms    ( kt )       ! tracers: sources minus sinks
70                                   CALL trc_trp    ( kt )       ! transport of passive tracers
71         IF( lrst_trc )            CALL trc_rst_wri( kt )       ! write tracer restart file
72         IF( lk_trdmld_trc  )      CALL trd_mld_trc( kt )       ! trends: Mixed-layer
73         !
74      ENDIF
75
76   END SUBROUTINE trc_stp
77
78#else
79   !!----------------------------------------------------------------------
80   !!   Default key                                     NO passive tracers
81   !!----------------------------------------------------------------------
82CONTAINS
83   SUBROUTINE trc_stp( kt )        ! Empty routine
84      WRITE(*,*) 'trc_stp: You should not have seen this print! error?', kt
85   END SUBROUTINE trc_stp
86#endif
87
88   !!======================================================================
89END MODULE trcstp
Note: See TracBrowser for help on using the repository browser.