1 | MODULE ldftra |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE ldftra *** |
---|
4 | !! Ocean physics: lateral diffusivity coefficient |
---|
5 | !!===================================================================== |
---|
6 | !! History : ! 1997-07 (G. Madec) from inimix.F split in 2 routines |
---|
7 | !! NEMO 1.0 ! 2002-09 (G. Madec) F90: Free form and module |
---|
8 | !! 2.0 ! 2005-11 (G. Madec) |
---|
9 | !!---------------------------------------------------------------------- |
---|
10 | |
---|
11 | !!---------------------------------------------------------------------- |
---|
12 | !! ldf_tra_init : initialization, namelist read, and parameters control |
---|
13 | !! ldf_tra_c3d : 3D eddy viscosity coefficient initialization |
---|
14 | !! ldf_tra_c2d : 2D eddy viscosity coefficient initialization |
---|
15 | !! ldf_tra_c1d : 1D eddy viscosity coefficient initialization |
---|
16 | !!---------------------------------------------------------------------- |
---|
17 | USE oce ! ocean dynamics and tracers |
---|
18 | USE dom_oce ! ocean space and time domain |
---|
19 | USE phycst ! physical constants |
---|
20 | USE ldftra_oce ! ocean tracer lateral physics |
---|
21 | USE ldfslp ! ??? |
---|
22 | USE in_out_manager ! I/O manager |
---|
23 | USE ioipsl |
---|
24 | USE lib_mpp ! distribued memory computing library |
---|
25 | USE lbclnk ! ocean lateral boundary conditions (or mpp link) |
---|
26 | |
---|
27 | IMPLICIT NONE |
---|
28 | PRIVATE |
---|
29 | |
---|
30 | PUBLIC ldf_tra_init ! called by opa.F90 |
---|
31 | |
---|
32 | !! * Substitutions |
---|
33 | # include "domzgr_substitute.h90" |
---|
34 | # include "vectopt_loop_substitute.h90" |
---|
35 | !!---------------------------------------------------------------------- |
---|
36 | !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) |
---|
37 | !! $Id$ |
---|
38 | !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) |
---|
39 | !!---------------------------------------------------------------------- |
---|
40 | |
---|
41 | CONTAINS |
---|
42 | |
---|
43 | SUBROUTINE ldf_tra_init |
---|
44 | !!---------------------------------------------------------------------- |
---|
45 | !! *** ROUTINE ldf_tra_init *** |
---|
46 | !! |
---|
47 | !! ** Purpose : initializations of the tracer lateral mixing coeff. |
---|
48 | !! |
---|
49 | !! ** Method : the Eddy diffusivity and eddy induced velocity ceoff. |
---|
50 | !! are defined as follows: |
---|
51 | !! default option : constant coef. aht0, aeiv0 (namelist) |
---|
52 | !! 'key_traldf_c1d': depth dependent coef. defined in |
---|
53 | !! in ldf_tra_c1d routine |
---|
54 | !! 'key_traldf_c2d': latitude and longitude dependent coef. |
---|
55 | !! defined in ldf_tra_c2d routine |
---|
56 | !! 'key_traldf_c3d': latitude, longitude, depth dependent coef. |
---|
57 | !! defined in ldf_tra_c3d routine |
---|
58 | !! |
---|
59 | !! N.B. User defined include files. By default, 3d and 2d coef. |
---|
60 | !! are set to a constant value given in the namelist and the 1d |
---|
61 | !! coefficients are initialized to a hyperbolic tangent vertical |
---|
62 | !! profile. |
---|
63 | !!---------------------------------------------------------------------- |
---|
64 | INTEGER :: ioptio ! temporary integer |
---|
65 | LOGICAL :: ll_print = .FALSE. ! =T print eddy coef. in numout |
---|
66 | !! |
---|
67 | NAMELIST/namtra_ldf/ ln_traldf_lap , ln_traldf_bilap, & |
---|
68 | & ln_traldf_level, ln_traldf_hor , ln_traldf_iso, & |
---|
69 | & ln_traldf_vis, ln_traldf_grif , & |
---|
70 | & rn_aht_0 , rn_ahtb_0 , rn_aeiv_0 |
---|
71 | !!---------------------------------------------------------------------- |
---|
72 | |
---|
73 | ! Define the lateral tracer physics parameters |
---|
74 | ! ============================================= |
---|
75 | |
---|
76 | REWIND( numnam ) ! Read Namelist namtra_ldf : Lateral physics on tracers |
---|
77 | READ ( numnam, namtra_ldf ) |
---|
78 | |
---|
79 | IF(lwp) THEN ! control print |
---|
80 | WRITE(numout,*) |
---|
81 | WRITE(numout,*) 'ldf_tra_init : lateral tracer physics' |
---|
82 | WRITE(numout,*) '~~~~~~~~~~~~ ' |
---|
83 | WRITE(numout,*) ' Namelist namtra_ldf : lateral mixing coefficients' |
---|
84 | WRITE(numout,*) ' laplacian operator ln_traldf_lap = ', ln_traldf_lap |
---|
85 | WRITE(numout,*) ' bilaplacian operator ln_traldf_bilap = ', ln_traldf_bilap |
---|
86 | WRITE(numout,*) ' visbeck operator ln_traldf_vis = ', ln_traldf_vis |
---|
87 | WRITE(numout,*) ' griffies operator ln_traldf_grif = ', ln_traldf_grif |
---|
88 | WRITE(numout,*) ' lateral eddy diffusivity rn_aht_0 = ', rn_aht_0 |
---|
89 | WRITE(numout,*) ' background hor. diffusivity rn_ahtb_0 = ', rn_ahtb_0 |
---|
90 | WRITE(numout,*) ' eddy induced velocity coef. rn_aeiv_0 = ', rn_aeiv_0 |
---|
91 | WRITE(numout,*) |
---|
92 | ENDIF |
---|
93 | |
---|
94 | ! ! convert DOCTOR namelist names into OLD names |
---|
95 | aht0 = rn_aht_0 |
---|
96 | ahtb0 = rn_ahtb_0 |
---|
97 | aeiv0 = rn_aeiv_0 |
---|
98 | |
---|
99 | ! ! Parameter control |
---|
100 | |
---|
101 | ! ... Check consistency for type and direction : |
---|
102 | ! ==> will be done in traldf module |
---|
103 | |
---|
104 | ! ... Space variation of eddy coefficients |
---|
105 | ioptio = 0 |
---|
106 | #if defined key_traldf_c3d |
---|
107 | IF(lwp) WRITE(numout,*) ' tracer mixing coef. = F( latitude, longitude, depth)' |
---|
108 | ioptio = ioptio + 1 |
---|
109 | #endif |
---|
110 | #if defined key_traldf_c2d |
---|
111 | IF(lwp) WRITE(numout,*) ' tracer mixing coef. = F( latitude, longitude)' |
---|
112 | ioptio = ioptio + 1 |
---|
113 | #endif |
---|
114 | #if defined key_traldf_c1d |
---|
115 | IF(lwp) WRITE(numout,*) ' tracer mixing coef. = F( depth )' |
---|
116 | ioptio = ioptio + 1 |
---|
117 | IF( .NOT. ln_zco ) CALL ctl_stop( 'key_traldf_c1d can only be used in z-coordinate - full step' ) |
---|
118 | #endif |
---|
119 | IF( ioptio == 0 ) THEN |
---|
120 | IF(lwp) WRITE(numout,*) ' tracer mixing coef. = constant (default option)' |
---|
121 | ELSEIF( ioptio > 1 ) THEN |
---|
122 | CALL ctl_stop(' use only one of the following keys:', & |
---|
123 | & ' key_traldf_c3d, key_traldf_c2d, key_traldf_c1d' ) |
---|
124 | ENDIF |
---|
125 | |
---|
126 | IF( ln_traldf_bilap ) THEN |
---|
127 | IF(lwp) WRITE(numout,*) ' biharmonic tracer diffusion' |
---|
128 | IF( aht0 > 0 .AND. .NOT. lk_esopa ) CALL ctl_stop( 'The horizontal diffusivity coef. aht0 must be negative' ) |
---|
129 | ELSE |
---|
130 | IF(lwp) WRITE(numout,*) ' harmonic tracer diffusion (default)' |
---|
131 | IF( aht0 < 0 .AND. .NOT. lk_esopa ) CALL ctl_stop('The horizontal diffusivity coef. aht0 must be positive' ) |
---|
132 | ENDIF |
---|
133 | |
---|
134 | |
---|
135 | ! Lateral eddy diffusivity and eddy induced velocity coefficients |
---|
136 | ! ================================================================ |
---|
137 | #if defined key_traldf_c3d |
---|
138 | CALL ldf_tra_c3d( ll_print ) ! aht = 3D coef. = F( longitude, latitude, depth ) |
---|
139 | #elif defined key_traldf_c2d |
---|
140 | CALL ldf_tra_c2d( ll_print ) ! aht = 2D coef. = F( longitude, latitude ) |
---|
141 | #elif defined key_traldf_c1d |
---|
142 | CALL ldf_tra_c1d( ll_print ) ! aht = 1D coef. = F( depth ) |
---|
143 | #else |
---|
144 | ! Constant coefficients |
---|
145 | IF(lwp)WRITE(numout,*) |
---|
146 | IF(lwp)WRITE(numout,*) ' constant eddy diffusivity coef. ahtu = ahtv = ahtw = aht0 = ', aht0 |
---|
147 | IF( lk_traldf_eiv ) THEN |
---|
148 | IF(lwp)WRITE(numout,*) |
---|
149 | IF(lwp)WRITE(numout,*) ' constant eddy induced velocity coef. aeiu = aeiv = aeiw = aeiv0 = ', aeiv0 |
---|
150 | ENDIF |
---|
151 | #endif |
---|
152 | ! |
---|
153 | END SUBROUTINE ldf_tra_init |
---|
154 | |
---|
155 | #if defined key_traldf_c3d |
---|
156 | # include "ldftra_c3d.h90" |
---|
157 | #elif defined key_traldf_c2d |
---|
158 | # include "ldftra_c2d.h90" |
---|
159 | #elif defined key_traldf_c1d |
---|
160 | # include "ldftra_c1d.h90" |
---|
161 | #endif |
---|
162 | |
---|
163 | !!====================================================================== |
---|
164 | END MODULE ldftra |
---|