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