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 trcnam_trp ! passive tracers transport namelist variables |
---|
18 | USE trabbl ! bottom boundary layer (trc_bbl routine) |
---|
19 | USE trcbbl ! bottom boundary layer (trc_bbl routine) |
---|
20 | USE zdfkpp ! KPP non-local tracer fluxes (trc_kpp routine) |
---|
21 | USE trcdmp ! internal damping (trc_dmp routine) |
---|
22 | USE trcldf ! lateral mixing (trc_ldf routine) |
---|
23 | USE trcadv ! advection (trc_adv routine) |
---|
24 | USE trczdf ! vertical diffusion (trc_zdf routine) |
---|
25 | USE trcnxt ! time-stepping (trc_nxt routine) |
---|
26 | USE trcrad ! positivity (trc_rad routine) |
---|
27 | USE trcsbc ! surface boundary condition (trc_sbc routine) |
---|
28 | USE zpshde ! partial step: hor. derivative (zps_hde routine) |
---|
29 | |
---|
30 | #if defined key_agrif |
---|
31 | USE agrif_top_sponge ! tracers sponges |
---|
32 | USE agrif_top_update ! tracers updates |
---|
33 | #endif |
---|
34 | |
---|
35 | IMPLICIT NONE |
---|
36 | PRIVATE |
---|
37 | |
---|
38 | PUBLIC trc_trp ! called by trc_stp |
---|
39 | |
---|
40 | !! * Substitutions |
---|
41 | # include "top_substitute.h90" |
---|
42 | !!---------------------------------------------------------------------- |
---|
43 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
44 | !! $Id$ |
---|
45 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
46 | !!---------------------------------------------------------------------- |
---|
47 | |
---|
48 | CONTAINS |
---|
49 | |
---|
50 | SUBROUTINE trc_trp( kstp ) |
---|
51 | !!---------------------------------------------------------------------- |
---|
52 | !! *** ROUTINE trc_trp *** |
---|
53 | !! |
---|
54 | !! ** Purpose : Management of passive tracers transport |
---|
55 | !! |
---|
56 | !! ** Method : - Compute the passive tracers trends |
---|
57 | !! - Update the passive tracers |
---|
58 | !!---------------------------------------------------------------------- |
---|
59 | INTEGER, INTENT( in ) :: kstp ! ocean time-step index |
---|
60 | !! --------------------------------------------------------------------- |
---|
61 | ! |
---|
62 | IF( nn_timing == 1 ) CALL timing_start('trc_trp') |
---|
63 | ! |
---|
64 | IF( .NOT. lk_c1d ) THEN |
---|
65 | ! |
---|
66 | CALL trc_sbc( kstp ) ! surface boundary condition |
---|
67 | IF( lk_trabbl ) CALL trc_bbl( kstp ) ! advective (and/or diffusive) bottom boundary layer scheme |
---|
68 | IF( ln_trcdmp ) CALL trc_dmp( kstp ) ! internal damping trends |
---|
69 | CALL trc_adv( kstp ) ! horizontal & vertical advection |
---|
70 | IF( ln_zps ) THEN |
---|
71 | IF( ln_isfcav ) THEN ; CALL zps_hde_isf( kt, jptra, trb, pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi ) ! both top & bottom |
---|
72 | ELSE ; CALL zps_hde ( kt, jptra, trb, gtru, gtrv ) ! only bottom |
---|
73 | ENDIF |
---|
74 | ENDIF |
---|
75 | CALL trc_ldf( kstp ) ! lateral mixing |
---|
76 | IF( .NOT. lk_offline .AND. lk_zdfkpp ) & |
---|
77 | & CALL trc_kpp( kstp ) ! KPP non-local tracer fluxes |
---|
78 | #if defined key_agrif |
---|
79 | IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_trc ! tracers sponge |
---|
80 | #endif |
---|
81 | CALL trc_zdf( kstp ) ! vertical mixing and after tracer fields |
---|
82 | ! |
---|
83 | CALL trc_nxt( kstp ) ! tracer fields at next time step |
---|
84 | IF( ln_trcrad ) CALL trc_rad( kstp ) ! Correct artificial negative concentrations |
---|
85 | IF( ln_trcdmp_clo ) CALL trc_dmp_clo( kstp ) ! internal damping trends on closed seas only |
---|
86 | |
---|
87 | #if defined key_agrif |
---|
88 | IF( .NOT. Agrif_Root()) CALL Agrif_Update_Trc( kstp ) ! Update tracer at AGRIF zoom boundaries : children only |
---|
89 | #endif |
---|
90 | |
---|
91 | ELSE ! 1D vertical configuration |
---|
92 | CALL trc_sbc( kstp ) ! surface boundary condition |
---|
93 | IF( .NOT. lk_offline .AND. lk_zdfkpp ) & |
---|
94 | & CALL trc_kpp( kstp ) ! KPP non-local tracer fluxes |
---|
95 | CALL trc_zdf( kstp ) ! vertical mixing and after tracer fields |
---|
96 | CALL trc_nxt( kstp ) ! tracer fields at next time step |
---|
97 | IF( ln_trcrad ) CALL trc_rad( kstp ) ! Correct artificial negative concentrations |
---|
98 | ! |
---|
99 | END IF |
---|
100 | ! |
---|
101 | IF( nn_timing == 1 ) CALL timing_stop('trc_trp') |
---|
102 | ! |
---|
103 | 9400 FORMAT(a25,i4,D23.16) |
---|
104 | ! |
---|
105 | END SUBROUTINE trc_trp |
---|
106 | |
---|
107 | #else |
---|
108 | !!---------------------------------------------------------------------- |
---|
109 | !! Dummy module : No TOP models |
---|
110 | !!---------------------------------------------------------------------- |
---|
111 | CONTAINS |
---|
112 | SUBROUTINE trc_trp( kstp ) ! Empty routine |
---|
113 | INTEGER, INTENT(in) :: kstp |
---|
114 | WRITE(*,*) 'trc_trp: You should not have seen this print! error?', kstp |
---|
115 | END SUBROUTINE trc_trp |
---|
116 | #endif |
---|
117 | |
---|
118 | !!====================================================================== |
---|
119 | END MODULE trctrp |
---|