1 |
C $Header: /u/gcmpack/MITgcm/pkg/gmredi/GMREDI.h,v 1.22 2013/06/27 14:51:40 m_bates Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#ifdef ALLOW_GMREDI |
5 |
|
6 |
C--- GM/Redi package parameters |
7 |
|
8 |
C-- Numerical Constant |
9 |
_RL op5 |
10 |
_RL op25 |
11 |
PARAMETER( op5 = 0.5 _d 0 ) |
12 |
PARAMETER( op25 = 0.25 _d 0 ) |
13 |
|
14 |
C-- COMMON /GM_PARAMS_L/ GM/Redi Logical-type parameters |
15 |
C GM_AdvForm :: use Advective Form (instead of Skew-Flux form) |
16 |
C GM_AdvSeparate :: do separately advection by Eulerian and Bolus velocity |
17 |
C GM_useBVP :: use Boundary-Value-Problem method for Bolus transport |
18 |
C GM_useSubMeso :: use parameterization of mixed layer (Sub-Mesoscale) eddies |
19 |
C GM_ExtraDiag :: select extra diagnostics |
20 |
C GM_InMomAsStress :: apply GM as a stress in momentum Eq. |
21 |
C GM_MNC :: |
22 |
C GM_MDSIO :: |
23 |
C GM_useK3D :: use the 3 dimensional calculation for K |
24 |
C GM_K3D_likeGM :: Makes the PV closure similar to the GM closure (for debugging only!) |
25 |
C GM_K3D_smooth :: Expand PV closure in terms of baroclinic modes (for debugging only!) |
26 |
LOGICAL GM_AdvForm |
27 |
LOGICAL GM_AdvSeparate |
28 |
LOGICAL GM_useBVP |
29 |
LOGICAL GM_useSubMeso |
30 |
LOGICAL GM_ExtraDiag |
31 |
LOGICAL GM_InMomAsStress |
32 |
LOGICAL GM_MNC |
33 |
LOGICAL GM_MDSIO |
34 |
LOGICAL GM_useK3D |
35 |
LOGICAL GM_K3D_likeGM |
36 |
LOGICAL GM_K3D_smooth |
37 |
COMMON /GM_PARAMS_L/ |
38 |
& GM_AdvForm, GM_AdvSeparate, |
39 |
& GM_useBVP, GM_useSubMeso, |
40 |
& GM_ExtraDiag, GM_MNC, GM_MDSIO, |
41 |
& GM_InMomAsStress, |
42 |
& GM_useK3D, GM_K3D_likeGM, GM_K3D_smooth |
43 |
|
44 |
C-- GM/Redi Integer-type parameters |
45 |
C GM_BVP_modeNumber :: vertical mode number used for speed "c" in BVP transport |
46 |
C GM_K3D_NModes :: number of vertical modes used for calculating Xi in K3D |
47 |
INTEGER GM_BVP_modeNumber |
48 |
INTEGER GM_K3D_NModes |
49 |
PARAMETER (GM_K3D_NModes=6) |
50 |
COMMON /GM_PARAMS_I/ |
51 |
& GM_BVP_modeNumber |
52 |
|
53 |
C-- COMMON /GM_PARAMS_C/ GM/Redi Character-type parameters |
54 |
C GM_taper_scheme :: select which tapering/clipping scheme to use |
55 |
C GM_iso2dFile :: input file for 2.D horiz scaling of Isopycnal diffusivity |
56 |
C GM_iso1dFile :: input file for 1.D vert. scaling of Isopycnal diffusivity |
57 |
C GM_bol2dFile :: input file for 2.D horiz scaling of Thickness diffusivity |
58 |
C GM_bol1dFile :: input file for 1.D vert. scaling of Thickness diffusivity |
59 |
CHARACTER*(40) GM_taper_scheme |
60 |
CHARACTER*(MAX_LEN_FNAM) GM_iso2dFile |
61 |
CHARACTER*(MAX_LEN_FNAM) GM_iso1dFile |
62 |
CHARACTER*(MAX_LEN_FNAM) GM_bol2dFile |
63 |
CHARACTER*(MAX_LEN_FNAM) GM_bol1dFile |
64 |
COMMON /GM_PARAMS_C/ |
65 |
& GM_taper_scheme, |
66 |
& GM_iso2dFile, GM_iso1dFile, |
67 |
& GM_bol2dFile, GM_bol1dFile |
68 |
|
69 |
C-- COMMON /GM_PARAMS_R/ GM/Redi real-type parameters |
70 |
C GM_isopycK :: Isopycnal diffusivity [m^2/s] (Redi-tensor) |
71 |
C GM_background_K :: Thickness diffusivity [m^2/s] (GM bolus transport) |
72 |
C GM_maxSlope :: maximum slope (tapering/clipping) [-] |
73 |
C GM_Kmin_horiz :: minimum horizontal diffusivity [m^2/s] |
74 |
C GM_Small_Number :: epsilon used in computing the slope |
75 |
C GM_slopeSqCutoff :: slope^2 cut-off value |
76 |
C- Transition layer thickness definition: |
77 |
C GM_facTrL2dz :: minimum Trans. Layer Thick. as a factor of local dz |
78 |
C GM_facTrL2ML :: maximum Trans. Layer Thick. as a factor of Mix-Layer Depth |
79 |
C GM_maxTransLay :: maximum Trans. Layer Thick. [m] |
80 |
C- Boundary-Value-Problem method parameters: |
81 |
C GM_BVP_cMin :: minimum value for wave speed parameter "c" in BVP [m/s] |
82 |
C- mixed layer (Sub-Mesoscale) eddies parameterization: |
83 |
C subMeso_Ceff :: efficiency coefficient of Mixed-Layer Eddies [-] |
84 |
C subMeso_invTau :: inverse of mixing time-scale in sub-meso parameteriz. [s^-1] |
85 |
C subMeso_LfMin :: minimum value for length-scale "Lf" [m] |
86 |
C subMeso_Lmax :: maximum horizontal grid-scale length [m] |
87 |
C Variable K with PV diffusion parameters: |
88 |
C GM_K3D_gamma :: mixing efficiency for 3D eddy diffusivity [-] |
89 |
C GM_K3D_EadyMinDepth :: upper depth for Eady calculation |
90 |
C GM_K3D_EadyMaxDepth :: lower depth for Eady calculation |
91 |
C GM_maxK3D :: Upper bound on the diffusivity |
92 |
C GM_K3D_constK :: Constant diffusivity to use when GM_useK3D=.TRUE. and GM_K3D_likeGM=.TRUE. |
93 |
C GM_K3D_maxLurms:: Upper bound on th length scale used for calculating urms |
94 |
C GM_K3D_minCori :: minimum value for f (to stop things blowing up near the equator) |
95 |
C GM_K3D_minN2 :: minimum value for the square of the buoyancy frequency |
96 |
C GM_K3D_surfMinDepth :: minimum value for the depth of the surface layer |
97 |
C GM_K3D_vecFreq :: Frequency at which to update the baroclinic modes |
98 |
|
99 |
_RL GM_isopycK |
100 |
_RL GM_background_K |
101 |
_RL GM_maxSlope |
102 |
_RL GM_Kmin_horiz |
103 |
_RL GM_Small_Number |
104 |
_RL GM_slopeSqCutoff |
105 |
_RL GM_Visbeck_alpha |
106 |
_RL GM_Visbeck_length |
107 |
_RL GM_Visbeck_depth |
108 |
_RL GM_Visbeck_minDepth |
109 |
_RL GM_Visbeck_maxSlope |
110 |
_RL GM_Visbeck_minVal_K |
111 |
_RL GM_Visbeck_maxVal_K |
112 |
_RL GM_K3D_gamma |
113 |
_RL GM_K3D_EadyMinDepth |
114 |
_RL GM_K3D_EadyMaxDepth |
115 |
_RL GM_K3D_Lambda |
116 |
_RL GM_K3D_smallK |
117 |
_RL GM_K3D_maxSlope |
118 |
_RL GM_K3D_maxC |
119 |
_RL GM_maxK3D |
120 |
_RL GM_K3D_constK |
121 |
_RL GM_K3D_maxLurms |
122 |
_RL GM_K3D_minCori |
123 |
_RL GM_K3D_minN2 |
124 |
_RL GM_K3D_surfMinDepth |
125 |
_RL GM_K3D_vecFreq |
126 |
_RL GM_facTrL2dz |
127 |
_RL GM_facTrL2ML |
128 |
_RL GM_maxTransLay |
129 |
_RL GM_Scrit |
130 |
_RL GM_Sd |
131 |
_RL GM_BVP_cMin |
132 |
_RL subMeso_Ceff |
133 |
_RL subMeso_invTau |
134 |
_RL subMeso_LfMin |
135 |
_RS subMeso_Lmax |
136 |
COMMON /GM_PARAMS_RL/ |
137 |
& GM_isopycK, GM_background_K, |
138 |
& GM_maxSlope, |
139 |
& GM_Kmin_horiz, |
140 |
& GM_Small_Number, GM_slopeSqCutoff, |
141 |
& GM_Visbeck_alpha, GM_Visbeck_length, |
142 |
& GM_Visbeck_depth, |
143 |
& GM_Visbeck_minDepth, GM_Visbeck_maxSlope, |
144 |
& GM_Visbeck_minVal_K, GM_Visbeck_maxVal_K, |
145 |
& GM_K3D_gamma, GM_K3D_EadyMinDepth, |
146 |
& GM_K3D_EadyMaxDepth, GM_K3D_Lambda, |
147 |
& GM_K3D_smallK, GM_K3D_maxSlope, GM_K3D_maxC, |
148 |
& GM_maxK3D, GM_K3D_minCori, GM_K3D_minN2, |
149 |
& GM_K3D_surfMinDepth, GM_K3D_maxLurms, |
150 |
& GM_K3D_constK, GM_K3D_vecFreq, |
151 |
& GM_facTrL2dz, GM_facTrL2ML, GM_maxTransLay, |
152 |
& GM_Scrit, GM_Sd, GM_BVP_cMin, |
153 |
& subMeso_Ceff, subMeso_invTau, subMeso_LfMin |
154 |
COMMON /GM_PARAMS_RS/ |
155 |
& subMeso_Lmax |
156 |
|
157 |
C-- COMMON /GM_DERIVED_PAR/ other GM/Redi parameters |
158 |
C (derived from previous block and not directly user configured) |
159 |
_RL GM_rMaxSlope |
160 |
_RL GM_skewflx |
161 |
_RL GM_advect |
162 |
_RL GM_BVP_rModeNumber |
163 |
_RL GM_BVP_cHat2Min |
164 |
COMMON /GM_DERIVED_PAR/ |
165 |
& GM_rMaxSlope, |
166 |
& GM_skewflx, GM_advect, |
167 |
& GM_BVP_rModeNumber, GM_BVP_cHat2Min |
168 |
|
169 |
|
170 |
C-- COMMON /GM_COEFFICIENTS/ GM/Redi scaling coefficients |
171 |
C defined at grid-cell center (tracer location) |
172 |
C GM_isoFac2d :: 2.D horiz scaling factor [-] of Isopycnal diffusivity |
173 |
C GM_bolFac2d :: 2.D horiz scaling factor [-] of Thickness diffusivity |
174 |
C GM_isoFac1d :: 1.D vert. scaling factor [-] of Isopycnal diffusivity |
175 |
C GM_bolFac1d :: 1.D vert. scaling factor [-] of Thickness diffusivity |
176 |
_RS GM_isoFac2d(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
177 |
_RS GM_bolFac2d(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
178 |
_RS GM_isoFac1d(Nr) |
179 |
_RS GM_bolFac1d(Nr) |
180 |
COMMON /GM_COEFFICIENTS/ |
181 |
& GM_isoFac2d, GM_bolFac2d, GM_isoFac1d, GM_bolFac1d |
182 |
|
183 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
184 |
C--- GM/Redi tensor elements |
185 |
|
186 |
C Bottom row of tensor corresponds to W points |
187 |
C Kwx :: K_31 element of GM/Redi tensor, X direction at W point |
188 |
C Kwy :: K_32 element of GM/Redi tensor, Y direction at W point |
189 |
C Kwz :: K_33 element of GM/Redi tensor, Z direction at W point |
190 |
_RL Kwx(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
191 |
_RL Kwy(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
192 |
_RL Kwz(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
193 |
COMMON /GM_Wtensor/ Kwx,Kwy,Kwz |
194 |
|
195 |
#ifdef GM_NON_UNITY_DIAGONAL |
196 |
C Horizontal part of the tensor |
197 |
C Kux :: K_11 element of GM/Redi tensor, X direction at U point |
198 |
C Kvy :: K_22 element of GM/Redi tensor, Y direction at V point |
199 |
_RL Kux(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
200 |
_RL Kvy(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
201 |
COMMON /GM_HorTensor/ Kux,Kvy |
202 |
#else |
203 |
_RL Kux,Kvy |
204 |
PARAMETER(Kux=1.,Kvy=1.) |
205 |
#endif |
206 |
|
207 |
#ifdef GM_EXTRA_DIAGONAL |
208 |
C First/second rows of tensor corresponds to U/V points |
209 |
C Kuz :: K_13 element of GM/Redi tensor, Z direction at U point |
210 |
C Kvz :: K_23 element of GM/Redi tensor, Z direction at V point |
211 |
_RL Kuz(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
212 |
_RL Kvz(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
213 |
COMMON /GM_UVtensor/ Kuz,Kvz |
214 |
#else |
215 |
_RL Kuz,Kvz |
216 |
PARAMETER(Kuz=1.,Kvz=1.) |
217 |
#endif |
218 |
|
219 |
#ifdef GM_BOLUS_ADVEC |
220 |
C GM advection formulation: bolus velocities are derived from 2 |
221 |
C streamfunctions PsiX and PsiY : |
222 |
_RL GM_PsiX(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
223 |
_RL GM_PsiY(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
224 |
COMMON /GM_BOLUS/ GM_PsiX,GM_PsiY |
225 |
#endif |
226 |
|
227 |
#ifdef GM_VISBECK_VARIABLE_K |
228 |
C GM mixing/stirring coefficient (spatially variable in horizontal |
229 |
C for Visbeck et al. parameterization) |
230 |
_RL VisbeckK(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
231 |
COMMON /GM_Visbeck/ VisbeckK |
232 |
#endif |
233 |
|
234 |
#ifdef GM_K3D |
235 |
C K3D :: The three dimensional eddy mixing coeffixint [m**2/s] |
236 |
_RL K3D(1-Olx:sNx+Olx,1-Oly:sNy+Oly,1:Nr,nSx,nSy) |
237 |
_RL modesC(1,1-Olx:sNx+Olx,1-Oly:sNy+Oly,1:Nr,nSx,nSy) |
238 |
_RL modesW(GM_K3D_NModes,1-Olx:sNx+Olx, |
239 |
& 1-Oly:sNy+Oly,1:Nr,nSx,nSy) |
240 |
_RL modesS(GM_K3D_NModes,1-Olx:sNx+Olx, |
241 |
& 1-Oly:sNy+Oly,1:Nr,nSx,nSy) |
242 |
_RL Rdef(1-Olx:sNx+Olx,1-Oly:sNy+Oly,nSx,nSy) |
243 |
|
244 |
|
245 |
COMMON /GM_K3D/ K3D, modesC, modesW, modesS, Rdef |
246 |
#endif |
247 |
#endif /* ALLOW_GMREDI */ |
248 |
|
249 |
CEH3 ;;; Local Variables: *** |
250 |
CEH3 ;;; mode:fortran *** |
251 |
CEH3 ;;; End: *** |