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