1 |
cnh |
1.9 |
C $Header: /u/gcmpack/models/MITgcmUV/model/inc/PARAMS.h,v 1.8 1998/05/25 16:17:36 cnh Exp $ |
2 |
cnh |
1.1 |
C |
3 |
|
|
C /==========================================================\ |
4 |
|
|
C | PARAMS.h | |
5 |
|
|
C | o Header file defining model "parameters". | |
6 |
|
|
C |==========================================================| |
7 |
|
|
C | The values from the model's standard input file are | |
8 |
|
|
C | stored into the variables held here. Notes describing | |
9 |
|
|
C | the parameters can also be found here. | |
10 |
|
|
C \==========================================================/ |
11 |
|
|
|
12 |
|
|
C-- Contants |
13 |
|
|
C Useful physical values |
14 |
|
|
Real*8 PI |
15 |
|
|
PARAMETER ( PI = 3.14159265358979323844D0 ) |
16 |
|
|
Real*8 deg2rad |
17 |
|
|
PARAMETER ( deg2rad = 2.D0*PI/360.D0 ) |
18 |
|
|
|
19 |
cnh |
1.7 |
C Symbolic values |
20 |
|
|
C precXXXX - Used to indicate what precision to use for |
21 |
|
|
C dumping model state. |
22 |
|
|
INTEGER precFloat32 |
23 |
|
|
PARAMETER ( precFloat32 = 0 ) |
24 |
|
|
INTEGER precFloat64 |
25 |
|
|
PARAMETER ( precFloat64 = 1 ) |
26 |
|
|
|
27 |
|
|
C Checkpoint data |
28 |
|
|
INTEGER maxNoChkptLev |
29 |
|
|
PARAMETER ( maxNoChkptLev = 2 ) |
30 |
|
|
|
31 |
cnh |
1.1 |
C-- COMMON /PARM_C/ Character valued parameters used by the model. |
32 |
cnh |
1.7 |
C checkPtSuff - List of checkpoint file suffices |
33 |
|
|
COMMON /PARM_C/ checkPtSuff |
34 |
|
|
CHARACTER*(5) checkPtSuff(maxNoChkptLev) |
35 |
|
|
|
36 |
cnh |
1.1 |
C-- COMMON /PARM_I/ Integer valued parameters used by the model. |
37 |
|
|
C cg2dMaxIters - Maximum number of iterations in the |
38 |
|
|
C two-dimensional con. grad solver. |
39 |
|
|
C cg2dChkResFreq - Frequency with which to check residual |
40 |
|
|
C in con. grad solver. |
41 |
|
|
C nIter0 - Start time-step number of for this run |
42 |
|
|
C nTimeSteps - Number of timesteps to execute |
43 |
|
|
C numStepsPerPickup - For offline setup. Frequency of pickup |
44 |
|
|
C of flow fields. |
45 |
cnh |
1.7 |
C writeStatePrec - Precision used for writing model state. |
46 |
|
|
C writeBinaryPrec - Precision used for writing binary files |
47 |
|
|
C readBinaryPrec - Precision used for reading binary files |
48 |
|
|
C nCheckLev - Holds current checkpoint level |
49 |
cnh |
1.1 |
COMMON /PARM_I/ |
50 |
|
|
& cg2dMaxIters, |
51 |
|
|
& cg2dChkResFreq, |
52 |
|
|
& nIter0, nTimeSteps, |
53 |
cnh |
1.7 |
& numStepsPerPickup, |
54 |
|
|
& writeStatePrec, nCheckLev, |
55 |
|
|
& writeBinaryPrec, readBinaryPrec |
56 |
cnh |
1.1 |
INTEGER cg2dMaxIters |
57 |
|
|
INTEGER cg2dChkResFreq |
58 |
|
|
INTEGER nIter0 |
59 |
|
|
INTEGER nTimeSteps |
60 |
|
|
INTEGER numStepsPerPickup |
61 |
cnh |
1.7 |
INTEGER writeStatePrec |
62 |
|
|
INTEGER writeBinaryPrec |
63 |
|
|
INTEGER readBinaryPrec |
64 |
|
|
INTEGER nCheckLev |
65 |
cnh |
1.1 |
|
66 |
|
|
C-- COMMON /PARM_L/ Logical valued parameters used by the model. |
67 |
|
|
C usingCartesianGrid - If TRUE grid generation will be in a cartesian |
68 |
|
|
C coordinate frame. |
69 |
|
|
C usingSphericalPolarGrid - If TRUE grid generation will be in a |
70 |
|
|
C spherical polar frame. |
71 |
|
|
C momViscosity - Flag which turns momentum friction terms on and off. |
72 |
|
|
C momAdvection - Flag which turns advection of momentum on and off. |
73 |
|
|
C momForcing - Flag which turns external forcing of momentum on |
74 |
|
|
C and off. |
75 |
cnh |
1.9 |
C momPressureForcing - Flag which turns pressure term in momentum equation |
76 |
|
|
C on and off. |
77 |
cnh |
1.1 |
C useCoriolis - Flag which turns the coriolis terms on and off. |
78 |
|
|
C tempDiffusion - Flag which turns diffusion of temperature on |
79 |
|
|
C and off. |
80 |
|
|
C tempAdvection - Flag which turns advection of temperature on |
81 |
|
|
C and off. |
82 |
|
|
C tempForcing - Flag which turns external forcing of temperature on |
83 |
|
|
C and off. |
84 |
|
|
C saltDiffusion - Flag which turns diffusion of salinit on |
85 |
|
|
C and off. |
86 |
|
|
C saltAdvection - Flag which turns advection of salinit on |
87 |
|
|
C and off. |
88 |
|
|
C saltForcing - Flag which turns external forcing of salinit on |
89 |
|
|
C and off. |
90 |
cnh |
1.8 |
C implicitFreeSurface - Set to true to use implcit free surface |
91 |
|
|
C rigidLid - Set to true to use rigid lid |
92 |
cnh |
1.1 |
COMMON /PARM_L/ usingCartesianGrid, usingSphericalPolarGrid, |
93 |
cnh |
1.9 |
& momViscosity, momAdvection, momForcing, useCoriolis, momPressureForcing, |
94 |
cnh |
1.1 |
& tempDiffusion, tempAdvection, tempForcing, |
95 |
cnh |
1.8 |
& saltDiffusion, saltAdvection, saltForcing, |
96 |
|
|
& implicitFreeSurface, rigidLid |
97 |
cnh |
1.1 |
LOGICAL usingCartesianGrid |
98 |
|
|
LOGICAL usingSphericalPolarGrid |
99 |
|
|
LOGICAL momViscosity |
100 |
|
|
LOGICAL momAdvection |
101 |
|
|
LOGICAL momForcing |
102 |
cnh |
1.9 |
LOGICAL momPressureForcing |
103 |
cnh |
1.1 |
LOGICAL useCoriolis |
104 |
|
|
LOGICAL tempDiffusion |
105 |
|
|
LOGICAL tempAdvection |
106 |
|
|
LOGICAL tempForcing |
107 |
|
|
LOGICAL saltDiffusion |
108 |
|
|
LOGICAL saltAdvection |
109 |
|
|
LOGICAL saltForcing |
110 |
cnh |
1.8 |
LOGICAL implicitFreeSurface |
111 |
|
|
LOGICAL rigidLid |
112 |
cnh |
1.1 |
|
113 |
|
|
C-- COMMON /PARM_R/ "Real" valued parameters used by the model. |
114 |
|
|
C cg2dTargetResidual |
115 |
|
|
C - Target residual for cg2d solver. |
116 |
cnh |
1.7 |
C cg2dpcOffDFac - Averaging weight for preconditioner off-diagonal. |
117 |
|
|
C Note. 20th May 1998 |
118 |
|
|
C I made a weird discovery! In the model paper we argue |
119 |
|
|
C for the form of the preconditioner used here ( see |
120 |
|
|
C A Finite-volume, Incompressible Navier-Stokes Model |
121 |
|
|
C ...., Marshall et. al ). The algebra gives a simple |
122 |
|
|
C 0.5 factor for the averaging of ac and aCw to get a |
123 |
|
|
C symmettric pre-conditioner. By using a factor of 0.51 |
124 |
|
|
C i.e. scaling the off-diagonal terms in the |
125 |
|
|
C preconditioner down slightly I managed to get the |
126 |
|
|
C number of iterations for convergence in a test case to |
127 |
|
|
C drop form 192 -> 134! Need to investigate this further! |
128 |
|
|
C For now I have introduced a parameter cg2dpcOffDFac which |
129 |
|
|
C defaults to 0.51 but can be set at runtime. |
130 |
cnh |
1.3 |
C delZ - Vertical grid spacing ( m ) - delZ is the distance |
131 |
cnh |
1.1 |
C between "w" surfaces. |
132 |
|
|
C delX - Separation between cell faces (m) or (deg), depending |
133 |
|
|
C delY on input flags. |
134 |
|
|
C gravity - Accel. due to gravity ( m/s^2 ) |
135 |
cnh |
1.8 |
C gBaro - Accel. due to gravity used in barotropic equation ( m/s^2 ) |
136 |
cnh |
1.1 |
C ronil - Reference density |
137 |
cnh |
1.3 |
C startTime - Start time for model ( s ) |
138 |
cnh |
1.1 |
C phiMin - Latitude of southern most cell face. |
139 |
|
|
C thetaMin - Longitude of western most cell face (this |
140 |
|
|
C is an "inert" parameter but it is included |
141 |
|
|
C to make geographical references simple.) |
142 |
cnh |
1.3 |
C rSphere - Radius of sphere for a spherical polar grid ( m ). |
143 |
cnh |
1.1 |
C f0 - Reference coriolis parameter ( 1/s ) |
144 |
|
|
C ( Southern edge f for beta plane ) |
145 |
|
|
C beta - df/dy ( s^-1.m^-1 ) |
146 |
|
|
C viscAh - Eddy viscosity coeff. for mixing of |
147 |
|
|
C momentum laterally ( m^2/s ) |
148 |
|
|
C viscAz - Eddy viscosity coeff. for mixing of |
149 |
|
|
C momentum vertically ( m^2/s ) |
150 |
|
|
C viscA4 - Biharmonic viscosity coeff. for mixing of |
151 |
|
|
C momentum laterally ( m^4/s ) |
152 |
|
|
C diffKhT - Laplacian diffusion coeff. for mixing of |
153 |
|
|
C heat laterally ( m^2/s ) |
154 |
|
|
C diffKzT - Laplacian diffusion coeff. for mixing of |
155 |
|
|
C heat vertically ( m^2/s ) |
156 |
|
|
C diffK4T - Biharmonic diffusion coeff. for mixing of |
157 |
|
|
C heat laterally ( m^4/s ) |
158 |
|
|
C diffKhS - Laplacian diffusion coeff. for mixing of |
159 |
|
|
C salt laterally ( m^2/s ) |
160 |
|
|
C diffKzS - Laplacian diffusion coeff. for mixing of |
161 |
|
|
C salt vertically ( m^2/s ) |
162 |
|
|
C diffK4S - Biharmonic diffusion coeff. for mixing of |
163 |
|
|
C salt laterally ( m^4/s ) |
164 |
cnh |
1.3 |
C deltaT - Default timestep ( s ) |
165 |
cnh |
1.7 |
C deltaTClock - Timestep used as model "clock". This determines the |
166 |
|
|
C IO frequencies and is used in tagging output. It can |
167 |
|
|
C be totally different to the dynamical time. Typically |
168 |
|
|
C it will be the deep-water timestep for accelerated runs. |
169 |
|
|
C Frequency of checkpointing and dumping of the model state |
170 |
|
|
C are referenced to this clock. ( s ) |
171 |
cnh |
1.3 |
C deltaTMom - Timestep for momemtum equations ( s ) |
172 |
|
|
C deltaTtracer - Timestep for tracer equations ( s ) |
173 |
cnh |
1.8 |
C freesurfFac - Parameter to turn implicit free surface term on or off |
174 |
|
|
C freesurfac = 1. uses implicit free surface |
175 |
|
|
C freesurfac = 0. uses rigid lid |
176 |
cnh |
1.1 |
C tauCD - CD scheme coupling timescale ( 1/s ) |
177 |
|
|
C rCD - CD scheme normalised coupling parameter ( 0-1 ) |
178 |
adcroft |
1.6 |
C GMmaxslope - max. slope allowed in GM/Redi tensor |
179 |
cnh |
1.8 |
C GMlength - Length to use in Visbeck et al. formula for K (m) |
180 |
adcroft |
1.6 |
C GMalpha - alpha to use in Visbeck et al. formula for K |
181 |
|
|
C GMdepth - Depth over which to integrate Richardson # (Visbeck et al.) |
182 |
cnh |
1.8 |
C GMkbackground - background value of GM/Redi coefficient |
183 |
cnh |
1.1 |
C startTime - Starting time for this integration ( s ). |
184 |
|
|
C endTime - Ending time for this integration ( s ). |
185 |
cnh |
1.7 |
C chkPtFreq - Frequency of rolling check pointing ( s ). |
186 |
|
|
C pChkPtFreq - Frequency of permanent check pointing ( s ). |
187 |
cnh |
1.1 |
C dumpFreq - Frequency with which model state is written to |
188 |
|
|
C post-processing files ( s ). |
189 |
cnh |
1.9 |
C afFacMom - Advection of momentum term scaling parameter |
190 |
|
|
C vfFacMom - Momentum viscosity scaling parameter |
191 |
|
|
C pfFacMom - Momentum pressure forcing parameter |
192 |
|
|
C cfFacMom - Coriolis term scaling parameter |
193 |
|
|
C foFacMom - Momentum forcing scaling parameter |
194 |
|
|
C cAdjFreq - Frequency of convective adjustment |
195 |
cnh |
1.7 |
COMMON /PARM_R/ cg2dTargetResidual, cg2dpcOffDFac, delZ, delX, delY, |
196 |
|
|
& deltaT,deltaTmom, deltaTtracer, deltaTClock,abeps, startTime, phiMin, |
197 |
|
|
& thetaMin, rSphere, f0, fCori, beta, viscAh, viscAz, viscA4, |
198 |
|
|
& diffKhT, diffKzT, diffK4T, diffKhS, diffKzS, diffK4S, delT, |
199 |
cnh |
1.8 |
& tauCD, rCD, freeSurfFac, |
200 |
adcroft |
1.6 |
& GMmaxslope,GMlength,GMalpha,GMdepth,GMkbackground, |
201 |
cnh |
1.8 |
& gravity, gBaro, rhonil, tRef, sRef, |
202 |
cnh |
1.9 |
& endTime, chkPtFreq, pchkPtFreq, dumpFreq, |
203 |
|
|
& afFacMom, vfFacMom, pfFacMom, cfFacMom, foFacMom, |
204 |
|
|
& cAdjFreq |
205 |
adcroft |
1.6 |
_RL cg2dTargetResidual |
206 |
cnh |
1.7 |
_RL cg2dpcOffDFac |
207 |
adcroft |
1.6 |
_RL delZ(Nz) |
208 |
|
|
_RL delX(Nx) |
209 |
|
|
_RL delY(Ny) |
210 |
|
|
_RL deltaT |
211 |
cnh |
1.7 |
_RL deltaTClock |
212 |
adcroft |
1.6 |
_RL deltaTmom |
213 |
|
|
_RL deltaTtracer |
214 |
|
|
_RL abeps |
215 |
|
|
_RL phiMin |
216 |
|
|
_RL thetaMin |
217 |
|
|
_RL rSphere |
218 |
|
|
_RL f0 |
219 |
cnh |
1.8 |
_RL freeSurfFac |
220 |
adcroft |
1.6 |
_RL beta |
221 |
|
|
_RL viscAh |
222 |
|
|
_RL viscAz |
223 |
|
|
_RL viscA4 |
224 |
|
|
_RL diffKhT |
225 |
|
|
_RL diffKzT |
226 |
|
|
_RL diffK4T |
227 |
|
|
_RL diffKhS |
228 |
|
|
_RL diffKzS |
229 |
|
|
_RL diffK4S |
230 |
|
|
_RL delt |
231 |
|
|
_RL tauCD |
232 |
|
|
_RL rCD |
233 |
|
|
_RL GMmaxslope |
234 |
|
|
_RL GMlength |
235 |
|
|
_RL GMalpha |
236 |
|
|
_RL GMdepth |
237 |
|
|
_RL GMkbackground |
238 |
|
|
_RL gravity |
239 |
cnh |
1.8 |
_RL gBaro |
240 |
adcroft |
1.6 |
_RL rhonil |
241 |
|
|
_RL tRef(Nz) |
242 |
|
|
_RL sRef(Nz) |
243 |
|
|
_RL Fcori(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
244 |
|
|
_RL startTime |
245 |
|
|
_RL endTime |
246 |
|
|
_RL chkPtFreq |
247 |
cnh |
1.7 |
_RL pChkPtFreq |
248 |
adcroft |
1.6 |
_RL dumpFreq |
249 |
cnh |
1.9 |
_RL afFacMom |
250 |
|
|
_RL vfFacMom |
251 |
|
|
_RL pfFacMom |
252 |
|
|
_RL cfFacMom |
253 |
|
|
_RL foFacMom |
254 |
|
|
_RL cAdjFreq |
255 |
adcroft |
1.6 |
|
256 |
cnh |
1.1 |
COMMON /PARM_A/ HeatCapacity_Cp, |
257 |
|
|
& Lamba_theta |
258 |
adcroft |
1.6 |
_RL HeatCapacity_Cp |
259 |
|
|
_RL Lamba_theta |
260 |
adcroft |
1.5 |
|
261 |
|
|
C Equation of State (polynomial coeffients) |
262 |
|
|
COMMON /PARM_EOS_NL/ eosC,eosSig0,eosRefT,eosRefS |
263 |
adcroft |
1.6 |
_RL eosC(Nz+1,9),eosSig0(Nz+1),eosRefT(Nz+1),eosRefS(Nz+1) |
264 |
adcroft |
1.5 |
C Linear equation of state |
265 |
|
|
C tAlpha - Linear EOS thermal expansion coefficient ( 1/degree ). |
266 |
|
|
C sBeta - Linear EOS haline contraction coefficient. |
267 |
|
|
COMMON /PARM_EOS_LIN/ tAlpha,sBeta |
268 |
adcroft |
1.6 |
_RL tAlpha |
269 |
|
|
_RL sBeta |
270 |
cnh |
1.7 |
|