1 | MODULE 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 trctrp1d ! passive tracers transport 1D configuration |
---|
15 | USE trcsms ! passive tracers sources and sinks |
---|
16 | USE prtctl_trc ! Print control for debbuging |
---|
17 | USE trcdia |
---|
18 | USE trcdit |
---|
19 | USE trcrst |
---|
20 | USE ini1d |
---|
21 | |
---|
22 | IMPLICIT NONE |
---|
23 | PRIVATE |
---|
24 | |
---|
25 | !! * Routine accessibility |
---|
26 | PUBLIC trc_stp ! called by step |
---|
27 | !!---------------------------------------------------------------------- |
---|
28 | !! TOP 1.0 , LOCEAN-IPSL (2005) |
---|
29 | !! $Header$ |
---|
30 | !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt |
---|
31 | !!---------------------------------------------------------------------- |
---|
32 | |
---|
33 | CONTAINS |
---|
34 | |
---|
35 | SUBROUTINE trc_stp( kt, kindic ) |
---|
36 | !!------------------------------------------------------------------- |
---|
37 | !! *** ROUTINE trc_stp *** |
---|
38 | !! |
---|
39 | !! ** Purpose : Time loop of opa for passive tracer |
---|
40 | !! |
---|
41 | !! ** Method : |
---|
42 | !! Compute the passive tracers trends |
---|
43 | !! Update the passive tracers |
---|
44 | !! |
---|
45 | !! History : |
---|
46 | !! 9.0 ! 04-03 (C. Ethe) Original |
---|
47 | !!------------------------------------------------------------------- |
---|
48 | !! * Arguments |
---|
49 | INTEGER, INTENT( in ) :: kt ! ocean time-step index |
---|
50 | INTEGER, INTENT( in ) :: kindic |
---|
51 | CHARACTER (len=25) :: charout |
---|
52 | |
---|
53 | ! this ROUTINE is called only every ndttrc time step |
---|
54 | IF( MOD( kt , ndttrc ) /= 0 ) RETURN |
---|
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 | |
---|
63 | CALL trc_sms( kt ) |
---|
64 | |
---|
65 | IF(ln_ctl) THEN ! print mean trends (used for debugging) |
---|
66 | WRITE(charout, FMT="('SMS')") |
---|
67 | CALL prt_ctl_trc_info(charout) |
---|
68 | CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm) |
---|
69 | ENDIF |
---|
70 | |
---|
71 | ! transport of passive tracers |
---|
72 | IF( lk_cfg_1d ) THEN |
---|
73 | CALL trc_trp_1d( kt ) |
---|
74 | ELSE |
---|
75 | CALL trc_trp( kt ) |
---|
76 | ENDIF |
---|
77 | |
---|
78 | |
---|
79 | IF(ln_ctl) THEN ! print mean trends (used for debugging) |
---|
80 | WRITE(charout, FMT="('TRP')") |
---|
81 | CALL prt_ctl_trc_info(charout) |
---|
82 | CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm) |
---|
83 | ENDIF |
---|
84 | |
---|
85 | CALL trc_wri( kt ) ! outputs |
---|
86 | |
---|
87 | CALL trc_dia( kt, kindic ) ! diagnostics |
---|
88 | |
---|
89 | |
---|
90 | END SUBROUTINE trc_stp |
---|
91 | |
---|
92 | #else |
---|
93 | !!---------------------------------------------------------------------- |
---|
94 | !! Default key NO passive tracers |
---|
95 | !!---------------------------------------------------------------------- |
---|
96 | CONTAINS |
---|
97 | SUBROUTINE trc_stp( kt ) ! Empty routine |
---|
98 | INTEGER, INTENT(in) :: kt |
---|
99 | WRITE(*,*) 'trc_stp: You should not have seen this print! error?', kt |
---|
100 | END SUBROUTINE trc_stp |
---|
101 | #endif |
---|
102 | |
---|
103 | !!====================================================================== |
---|
104 | END MODULE trcstp |
---|