1 | MODULE trctrp |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE trctrp *** |
---|
4 | !! Ocean Physics : manage the passive tracer transport |
---|
5 | !!====================================================================== |
---|
6 | !! History : 1.0 ! 2004-03 (C. Ethe) Original code |
---|
7 | !! 3.3 ! 2010-07 (C. Ethe) Merge TRA-TRC |
---|
8 | !!---------------------------------------------------------------------- |
---|
9 | #if defined key_top |
---|
10 | !!---------------------------------------------------------------------- |
---|
11 | !! 'key_top' TOP models |
---|
12 | !!---------------------------------------------------------------------- |
---|
13 | !! trc_trp : passive tracer transport |
---|
14 | !!---------------------------------------------------------------------- |
---|
15 | USE oce_trc ! ocean dynamics and active tracers variables |
---|
16 | USE trc ! ocean passive tracers variables |
---|
17 | USE trcbbl ! bottom boundary layer (trc_bbl routine) |
---|
18 | USE trcdmp ! internal damping (trc_dmp routine) |
---|
19 | USE trcldf ! lateral mixing (trc_ldf routine) |
---|
20 | USE trcadv ! advection (trc_adv routine) |
---|
21 | USE trczdf ! vertical diffusion (trc_zdf routine) |
---|
22 | USE trcnxt ! time-stepping (trc_nxt routine) |
---|
23 | USE trcrad ! positivity (trc_rad routine) |
---|
24 | USE trcsbc ! surface boundary condition (trc_sbc routine) |
---|
25 | USE zpshde ! partial step: hor. derivative (zps_hde routine) |
---|
26 | USE bdy_oce , ONLY: ln_bdy |
---|
27 | USE trcbdy ! BDY open boundaries |
---|
28 | |
---|
29 | #if defined key_agrif |
---|
30 | USE agrif_top_sponge ! tracers sponges |
---|
31 | #endif |
---|
32 | |
---|
33 | IMPLICIT NONE |
---|
34 | PRIVATE |
---|
35 | |
---|
36 | PUBLIC trc_trp ! called by trc_stp |
---|
37 | |
---|
38 | !!---------------------------------------------------------------------- |
---|
39 | !! NEMO/TOP 4.0 , NEMO Consortium (2018) |
---|
40 | !! $Id$ |
---|
41 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
42 | !!---------------------------------------------------------------------- |
---|
43 | |
---|
44 | CONTAINS |
---|
45 | |
---|
46 | SUBROUTINE trc_trp( kt ) |
---|
47 | !!---------------------------------------------------------------------- |
---|
48 | !! *** ROUTINE trc_trp *** |
---|
49 | !! |
---|
50 | !! ** Purpose : Management of passive tracers transport |
---|
51 | !! |
---|
52 | !! ** Method : - Compute the passive tracers trends |
---|
53 | !! - Update the passive tracers |
---|
54 | !!---------------------------------------------------------------------- |
---|
55 | INTEGER, INTENT( in ) :: kt ! ocean time-step index |
---|
56 | !! --------------------------------------------------------------------- |
---|
57 | ! |
---|
58 | IF( ln_timing ) CALL timing_start('trc_trp') |
---|
59 | ! |
---|
60 | IF( .NOT. lk_c1d ) THEN |
---|
61 | ! |
---|
62 | CALL trc_sbc ( kt ) ! surface boundary condition |
---|
63 | IF( ln_trabbl ) CALL trc_bbl ( kt ) ! advective (and/or diffusive) bottom boundary layer scheme |
---|
64 | IF( ln_trcdmp ) CALL trc_dmp ( kt ) ! internal damping trends |
---|
65 | IF( ln_bdy ) CALL trc_bdy_dmp( kt ) ! BDY damping trends |
---|
66 | CALL trc_adv ( kt ) ! horizontal & vertical advection |
---|
67 | ! ! Partial top/bottom cell: GRADh( trb ) |
---|
68 | IF( ln_zps ) THEN |
---|
69 | IF( ln_isfcav ) THEN ; CALL zps_hde_isf( kt, jptra, trb, pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi ) ! both top & bottom |
---|
70 | ELSE ; CALL zps_hde ( kt, jptra, trb, gtru, gtrv ) ! only bottom |
---|
71 | ENDIF |
---|
72 | ENDIF |
---|
73 | ! |
---|
74 | CALL trc_ldf ( kt ) ! lateral mixing |
---|
75 | #if defined key_agrif |
---|
76 | IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_trc ! tracers sponge |
---|
77 | #endif |
---|
78 | CALL trc_zdf ( kt ) ! vertical mixing and after tracer fields |
---|
79 | CALL trc_nxt ( kt ) ! tracer fields at next time step |
---|
80 | IF( ln_trcrad ) CALL trc_rad ( kt ) ! Correct artificial negative concentrations |
---|
81 | IF( ln_trcdmp_clo ) CALL trc_dmp_clo( kt ) ! internal damping trends on closed seas only |
---|
82 | |
---|
83 | ! |
---|
84 | ELSE ! 1D vertical configuration |
---|
85 | CALL trc_sbc( kt ) ! surface boundary condition |
---|
86 | IF( ln_trcdmp ) CALL trc_dmp( kt ) ! internal damping trends |
---|
87 | CALL trc_zdf( kt ) ! vertical mixing and after tracer fields |
---|
88 | CALL trc_nxt( kt ) ! tracer fields at next time step |
---|
89 | IF( ln_trcrad ) CALL trc_rad( kt ) ! Correct artificial negative concentrations |
---|
90 | ! |
---|
91 | END IF |
---|
92 | ! |
---|
93 | IF( ln_timing ) CALL timing_stop('trc_trp') |
---|
94 | ! |
---|
95 | END SUBROUTINE trc_trp |
---|
96 | |
---|
97 | #else |
---|
98 | !!---------------------------------------------------------------------- |
---|
99 | !! Dummy module : No TOP models |
---|
100 | !!---------------------------------------------------------------------- |
---|
101 | CONTAINS |
---|
102 | SUBROUTINE trc_trp( kt ) ! Empty routine |
---|
103 | INTEGER, INTENT(in) :: kt |
---|
104 | WRITE(*,*) 'trc_trp: You should not have seen this print! error?', kt |
---|
105 | END SUBROUTINE trc_trp |
---|
106 | #endif |
---|
107 | |
---|
108 | !!====================================================================== |
---|
109 | END MODULE trctrp |
---|