/[MITgcm]/MITgcm/pkg/gmredi/GMREDI.h
ViewVC logotype

Annotation of /MITgcm/pkg/gmredi/GMREDI.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.34 - (hide annotations) (download)
Mon Apr 3 17:09:01 2017 UTC (7 years, 2 months ago) by ou.wang
Branch: MAIN
CVS Tags: checkpoint66g, checkpoint66f, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, HEAD
Changes since 1.33: +8 -2 lines
File MIME type: text/plain
Add a capability to read in 3D KapGM and KapRedi from a file

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

  ViewVC Help
Powered by ViewVC 1.1.22