/[MITgcm]/MITgcm/model/inc/PARAMS.h
ViewVC logotype

Contents of /MITgcm/model/inc/PARAMS.h

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


Revision 1.32 - (show annotations) (download)
Wed Sep 9 15:19:07 1998 UTC (25 years, 8 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint15, checkpoint14
Changes since 1.31: +4 -2 lines
File MIME type: text/plain
Consistent isomorphism changes

1 C $Header: /u/gcmpack/models/MITgcmUV/model/inc/PARAMS.h,v 1.31 1998/09/09 15:04:43 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 Macros for special grid options
13 #include "PARAMS_MACROS.h"
14
15 C-- Contants
16 C Useful physical values
17 Real*8 PI
18 PARAMETER ( PI = 3.14159265358979323844D0 )
19 Real*8 deg2rad
20 PARAMETER ( deg2rad = 2.D0*PI/360.D0 )
21
22 C Symbolic values
23 C precXXXX - Used to indicate what precision to use for
24 C dumping model state.
25 INTEGER precFloat32
26 PARAMETER ( precFloat32 = 0 )
27 INTEGER precFloat64
28 PARAMETER ( precFloat64 = 1 )
29 C UNSET_xxx - Used to indicate variables that have not been given a value
30 Real*8 UNSET_FLOAT8
31 PARAMETER ( UNSET_FLOAT8 = 1.234567D5 )
32 Real*4 UNSET_FLOAT4
33 PARAMETER ( UNSET_FLOAT4 = 1.234567E5 )
34 _RL UNSET_RL
35 PARAMETER ( UNSET_RL = 1.234567D5 )
36 _RS UNSET_RS
37 PARAMETER ( UNSET_RS = 1.234567E5 )
38 INTEGER UNSET_I
39 PARAMETER ( UNSET_I = 123456789 )
40
41 C Checkpoint data
42 INTEGER maxNoChkptLev
43 PARAMETER ( maxNoChkptLev = 2 )
44
45 C-- COMMON /PARM_C/ Character valued parameters used by the model.
46 C checkPtSuff - List of checkpoint file suffices
47 C bathyFile - File containing bathymetry. If not defined bathymetry
48 C is taken from inline function.
49 C hydrogThetaFile - File containing initial hydrographic data for potential
50 C temperature.
51 C hydrogSaltFile - File containing initial hydrographic data for salinity.
52 C zonalWindFile - File containing zonal wind data
53 C meridWindFile - File containing meridional wind data
54 C thetaClimFile - File containing theta climataology used
55 C in relaxation term -lambda(theta-theta*)
56 C saltClimFile - File containing salt climataology used
57 C in relaxation term -lambda(salt-salt*)
58 C buoyancyRelation - Flag used to indicate which relation to use to
59 C get buoyancy.
60 COMMON /PARM_C/ checkPtSuff,
61 & bathyFile, hydrogThetaFile, hydrogSaltFile,
62 & zonalWindFile, meridWindFile, thetaClimFile,
63 & saltClimFile, buoyancyRelation
64 CHARACTER*(5) checkPtSuff(maxNoChkptLev)
65 CHARACTER*(MAX_LEN_FNAM) bathyFile
66 CHARACTER*(MAX_LEN_FNAM) hydrogThetaFile
67 CHARACTER*(MAX_LEN_FNAM) hydrogSaltFile
68 CHARACTER*(MAX_LEN_FNAM) zonalWindFile
69 CHARACTER*(MAX_LEN_FNAM) meridWindFile
70 CHARACTER*(MAX_LEN_FNAM) thetaClimFile
71 CHARACTER*(MAX_LEN_FNAM) saltClimFile
72 CHARACTER*(MAX_LEN_FNAM) buoyancyRelation
73
74 C-- COMMON /PARM_I/ Integer valued parameters used by the model.
75 C cg2dMaxIters - Maximum number of iterations in the
76 C two-dimensional con. grad solver.
77 C cg2dChkResFreq - Frequency with which to check residual
78 C in con. grad solver.
79 C nIter0 - Start time-step number of for this run
80 C nTimeSteps - Number of timesteps to execute
81 C numStepsPerPickup - For offline setup. Frequency of pickup
82 C of flow fields.
83 C writeStatePrec - Precision used for writing model state.
84 C writeBinaryPrec - Precision used for writing binary files
85 C readBinaryPrec - Precision used for reading binary files
86 C nCheckLev - Holds current checkpoint level
87 COMMON /PARM_I/
88 & cg2dMaxIters,
89 & cg2dChkResFreq,
90 & nIter0, nTimeSteps,
91 & numStepsPerPickup,
92 & writeStatePrec, nCheckLev,
93 & writeBinaryPrec, readBinaryPrec
94 INTEGER cg2dMaxIters
95 INTEGER cg2dChkResFreq
96 INTEGER nIter0
97 INTEGER nTimeSteps
98 INTEGER numStepsPerPickup
99 INTEGER writeStatePrec
100 INTEGER writeBinaryPrec
101 INTEGER readBinaryPrec
102 INTEGER nCheckLev
103
104 C-- COMMON /PARM_L/ Logical valued parameters used by the model.
105 C usingCartesianGrid - If TRUE grid generation will be in a cartesian
106 C coordinate frame.
107 C usingSphericalPolarGrid - If TRUE grid generation will be in a
108 C spherical polar frame.
109 C momViscosity - Flag which turns momentum friction terms on and off.
110 C momAdvection - Flag which turns advection of momentum on and off.
111 C momForcing - Flag which turns external forcing of momentum on
112 C and off.
113 C momPressureForcing - Flag which turns pressure term in momentum equation
114 C on and off.
115 C metricTerms - Flag which turns metric terms on or off.
116 C usingSphericalPolarMTerms - If TRUE use spherical polar metric terms.
117 C useCoriolis - Flag which turns the coriolis terms on and off.
118 C tempDiffusion - Flag which turns diffusion of temperature on
119 C and off.
120 C tempAdvection - Flag which turns advection of temperature on
121 C and off.
122 C tempForcing - Flag which turns external forcing of temperature on
123 C and off.
124 C saltDiffusion - Flag which turns diffusion of salinit on
125 C and off.
126 C saltAdvection - Flag which turns advection of salinit on
127 C and off.
128 C saltForcing - Flag which turns external forcing of salinit on
129 C and off.
130 C implicitFreeSurface - Set to true to use implcit free surface
131 C rigidLid - Set to true to use rigid lid
132 C momStepping - Turns momentum equation time-stepping off
133 C tempStepping - Turns temperature equation time-stepping off
134 C saltStepping - Turns salinity equation time-stepping off
135 C useConstantF - Coriolis parameter set to f0
136 C useBetaPlaneF - Coriolis parameter set to f0 + beta.y
137 C useSphereF - Coriolis parameter set to 2.omega.sin(phi)
138 C implicitDiffusion - Turns implicit vertical diffusion on
139 C doThetaClimRelax - Set true if relaxation to temperature
140 C climatology is required.
141 C doSaltClimRelax - Set true if relaxation to salinity
142 C climatology is required.
143 C periodicExternalForcing - Set true if forcing is time-dependant
144 C usingPCoords - Set to indicate that we are working in pressure
145 C coords.
146 C usingZCoords - Set to indicate that we are working in height
147 C coords.
148 COMMON /PARM_L/ usingCartesianGrid, usingSphericalPolarGrid,
149 & momViscosity, momAdvection, momForcing, useCoriolis, momPressureForcing,
150 & tempDiffusion, tempAdvection, tempForcing,
151 & saltDiffusion, saltAdvection, saltForcing,
152 & implicitFreeSurface, rigidLid,
153 & momStepping, tempStepping, saltStepping,
154 & metricTerms, usingSphericalPolarMTerms,
155 & useConstantF, useBetaPlaneF, useSphereF,
156 & implicitDiffusion, doThetaClimRelax, doSaltClimRelax,
157 & periodicExternalForcing, usingPCoords, usingZCoords
158 LOGICAL usingCartesianGrid
159 LOGICAL usingSphericalPolarGrid
160 LOGICAL usingSphericalPolarMTerms
161 LOGICAL momViscosity
162 LOGICAL momAdvection
163 LOGICAL momForcing
164 LOGICAL momPressureForcing
165 LOGICAL useCoriolis
166 LOGICAL tempDiffusion
167 LOGICAL tempAdvection
168 LOGICAL tempForcing
169 LOGICAL saltDiffusion
170 LOGICAL saltAdvection
171 LOGICAL saltForcing
172 LOGICAL implicitFreeSurface
173 LOGICAL rigidLid
174 LOGICAL momStepping
175 LOGICAL tempStepping
176 LOGICAL saltStepping
177 LOGICAL metricTerms
178 LOGICAL useConstantF
179 LOGICAL useBetaPlaneF
180 LOGICAL useSphereF
181 LOGICAL implicitDiffusion
182 LOGICAL doThetaClimRelax
183 LOGICAL doSaltClimRelax
184 LOGICAL periodicExternalForcing
185 LOGICAL usingPCoords
186 LOGICAL usingZCoords
187
188 C-- COMMON /PARM_R/ "Real" valued parameters used by the model.
189 C cg2dTargetResidual
190 C - Target residual for cg2d solver.
191 C cg2dpcOffDFac - Averaging weight for preconditioner off-diagonal.
192 C Note. 20th May 1998
193 C I made a weird discovery! In the model paper we argue
194 C for the form of the preconditioner used here ( see
195 C A Finite-volume, Incompressible Navier-Stokes Model
196 C ...., Marshall et. al ). The algebra gives a simple
197 C 0.5 factor for the averaging of ac and aCw to get a
198 C symmettric pre-conditioner. By using a factor of 0.51
199 C i.e. scaling the off-diagonal terms in the
200 C preconditioner down slightly I managed to get the
201 C number of iterations for convergence in a test case to
202 C drop form 192 -> 134! Need to investigate this further!
203 C For now I have introduced a parameter cg2dpcOffDFac which
204 C defaults to 0.51 but can be set at runtime.
205 C delP - Vertical grid spacing ( Pa ).
206 C delZ - Vertical grid spacing ( m ).
207 C delR - Vertical grid spacing ( units of r ).
208 C delX - Separation between cell faces (m) or (deg), depending
209 C delY on input flags.
210 C gravity - Accel. due to gravity ( m/s^2 )
211 C recip_gravity and its inverse
212 C gBaro - Accel. due to gravity used in barotropic equation ( m/s^2 )
213 C ronil - Reference density
214 C rhoConst - Vertically constant reference density
215 C startTime - Start time for model ( s )
216 C phiMin - Latitude of southern most cell face.
217 C thetaMin - Longitude of western most cell face (this
218 C is an "inert" parameter but it is included
219 C to make geographical references simple.)
220 C rSphere - Radius of sphere for a spherical polar grid ( m ).
221 C recip_RSphere - Reciprocal radius of sphere ( m ).
222 C f0 - Reference coriolis parameter ( 1/s )
223 C ( Southern edge f for beta plane )
224 C beta - df/dy ( s^-1.m^-1 )
225 C omega - Angular velocity ( rad/s )
226 C viscAh - Eddy viscosity coeff. for mixing of
227 C momentum laterally ( m^2/s )
228 C viscAz - Eddy viscosity coeff. for mixing of
229 C momentum vertically ( m^2/s )
230 C viscAp - Eddy viscosity coeff. for mixing of
231 C momentum vertically ( Pa^2/s )
232 C viscAr - Eddy viscosity coeff. for mixing of
233 C momentum vertically ( units of r^2/s )
234 C viscA4 - Biharmonic viscosity coeff. for mixing of
235 C momentum laterally ( m^4/s )
236 C diffKhT - Laplacian diffusion coeff. for mixing of
237 C heat laterally ( m^2/s )
238 C diffKzT - Laplacian diffusion coeff. for mixing of
239 C heat vertically ( m^2/s )
240 C diffKpT - Laplacian diffusion coeff. for mixing of
241 C heat vertically ( Pa^2/s )
242 C diffKrT - Laplacian diffusion coeff. for mixing of
243 C heat vertically ( units of r^2/s )
244 C diffK4T - Biharmonic diffusion coeff. for mixing of
245 C heat laterally ( m^4/s )
246 C diffKhS - Laplacian diffusion coeff. for mixing of
247 C salt laterally ( m^2/s )
248 C diffKzS - Laplacian diffusion coeff. for mixing of
249 C salt vertically ( m^2/s )
250 C diffKpS - Laplacian diffusion coeff. for mixing of
251 C salt vertically ( Pa^2/s )
252 C diffKrS - Laplacian diffusion coeff. for mixing of
253 C salt vertically ( units of r^2/s )
254 C diffK4S - Biharmonic diffusion coeff. for mixing of
255 C salt laterally ( m^4/s )
256 C deltaT - Default timestep ( s )
257 C deltaTClock - Timestep used as model "clock". This determines the
258 C IO frequencies and is used in tagging output. It can
259 C be totally different to the dynamical time. Typically
260 C it will be the deep-water timestep for accelerated runs.
261 C Frequency of checkpointing and dumping of the model state
262 C are referenced to this clock. ( s )
263 C deltaTMom - Timestep for momemtum equations ( s )
264 C deltaTtracer - Timestep for tracer equations ( s )
265 C freesurfFac - Parameter to turn implicit free surface term on or off
266 C freesurfac = 1. uses implicit free surface
267 C freesurfac = 0. uses rigid lid
268 C hFacMin - Minimum fraction size of a cell (affects hFacC etc...)
269 C hFacMinDz - Minimum dimesional size of a cell (affects hFacC etc..., m)
270 C hFacMinDp - Minimum dimesional size of a cell (affects hFacC etc..., Pa)
271 C hFacMinDr - Minimum dimesional size of a cell (affects hFacC etc..., units of r)
272 C tauCD - CD scheme coupling timescale ( 1/s )
273 C rCD - CD scheme normalised coupling parameter ( 0-1 )
274 C GMmaxslope - max. slope allowed in GM/Redi tensor
275 C GMlength - Length to use in Visbeck et al. formula for K (m)
276 C GMalpha - alpha to use in Visbeck et al. formula for K
277 C GMdepth - Depth over which to integrate Richardson # (Visbeck et al.)
278 C GMkbackground - background value of GM/Redi diffusion coefficient ( m^2/s )
279 C GMmaxval - max. value of KapGM allowed in GM/Redi scheme ( m^2/s )
280 C startTime - Starting time for this integration ( s ).
281 C endTime - Ending time for this integration ( s ).
282 C chkPtFreq - Frequency of rolling check pointing ( s ).
283 C pChkPtFreq - Frequency of permanent check pointing ( s ).
284 C dumpFreq - Frequency with which model state is written to
285 C post-processing files ( s ).
286 C afFacMom - Advection of momentum term tracer parameter
287 C vfFacMom - Momentum viscosity tracer parameter
288 C pfFacMom - Momentum pressure forcing tracer parameter
289 C cfFacMom - Coriolis term tracer parameter
290 C foFacMom - Momentum forcing tracer parameter
291 C mtFacMom - Metric terms tracer parameter
292 C cAdjFreq - Frequency of convective adjustment
293 C
294 C taveFreq - Frequency with which time-averaged model state is written to
295 C post-processing files ( s ).
296 C tauThetaClimRelax - Relaxation to climatology time scale ( s ).
297 C lambdaThetaClimRelax - Inverse time scale for relaxation ( 1/s ).
298 C tauSaltClimRelax - Relaxation to climatology time scale ( s ).
299 C lambdaSaltClimRelax - Inverse time scale for relaxation ( 1/s ).
300 C externForcingPeriod - Is the period of which forcing varies (eg. 1 month)
301 C externForcingCycle - Is the repeat time of the forcing (eg. 1 year)
302 C (note: externForcingCycle must be an integer
303 C number times externForcingPeriod)
304 C horiVertRatio - Ratio on units in vertical to units in horizontal.
305 C recip_horiVertRatio ( 1 if horiz in m and vertical in m ).
306 C ( g*rho if horiz in m and vertical in Pa ).
307 COMMON /PARM_R/ cg2dTargetResidual, cg2dpcOffDFac,
308 & delP, delZ, delR, delX, delY,
309 & deltaT,deltaTmom, deltaTtracer, deltaTClock,abeps, startTime, phiMin,
310 & thetaMin, rSphere, recip_RSphere, f0, fCori, beta,
311 & viscAh, viscAz, viscA4, viscAr,
312 & diffKhT, diffKzT, diffK4T, diffKrT,
313 & diffKhS, diffKzS, diffK4S, diffKrS,
314 & delT, tauCD, rCD, freeSurfFac, hFacMin, hFacMinDz,
315 & GMmaxslope,GMlength,GMalpha,GMdepth,GMkbackground,GMmaxval,
316 & gravity, recip_Gravity, gBaro, rhonil, recip_rhonil,
317 & recip_rhoConst, rhoConst, tRef, sRef,
318 & endTime, chkPtFreq, pchkPtFreq, dumpFreq, taveFreq,
319 & afFacMom, vfFacMom, pfFacMom, cfFacMom, foFacMom, mtFacMom,
320 & cAdjFreq, omega, tauThetaClimRelax, lambdaThetaClimRelax,
321 & tauSaltClimRelax, lambdaSaltClimRelax,
322 & externForcingCycle, externForcingPeriod,
323 & viscAp, diffKpT, diffKpS, hFacMinDr, hFacMinDp,
324 & theta_S, specVol_S, horiVertRatio, recip_horiVertRatio
325
326 _RL cg2dTargetResidual
327 _RL cg2dpcOffDFac
328 _RL delZ(Nr)
329 _RL delP(Nr)
330 _RL delR(Nr)
331 _RL delX(Nx)
332 _RL delY(Ny)
333 _RL deltaT
334 _RL deltaTClock
335 _RL deltaTmom
336 _RL deltaTtracer
337 _RL abeps
338 _RL phiMin
339 _RL thetaMin
340 _RL rSphere
341 _RL recip_RSphere
342 _RL f0
343 _RL freeSurfFac
344 _RL hFacMin
345 _RL hFacMinDz
346 _RL hFacMinDp
347 _RL hFacMinDr
348 _RL beta
349 _RL viscAh
350 _RL viscAz
351 _RL viscAp
352 _RL viscAr
353 _RL viscA4
354 _RL diffKhT
355 _RL diffKrT
356 _RL diffKzT
357 _RL diffKpT
358 _RL diffK4T
359 _RL diffKhS
360 _RL diffKrS
361 _RL diffKzS
362 _RL diffKpS
363 _RL diffK4S
364 _RL delt
365 _RL tauCD
366 _RL rCD
367 _RL GMmaxslope
368 _RL GMlength
369 _RL GMalpha
370 _RL GMdepth
371 _RL GMkbackground
372 _RL GMmaxval
373 _RL gravity
374 _RL recip_gravity
375 _RL gBaro
376 _RL rhonil
377 _RL recip_rhonil
378 _RL rhoConst
379 _RL recip_rhoConst
380 _RL specVol_S(Nr)
381 _RL tRef(Nr)
382 _RL theta_S(Nr)
383 _RL sRef(Nr)
384 _RS Fcori(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
385 _RL startTime
386 _RL endTime
387 _RL chkPtFreq
388 _RL pChkPtFreq
389 _RL dumpFreq
390 _RL taveFreq
391 _RL afFacMom
392 _RL vfFacMom
393 _RL pfFacMom
394 _RL cfFacMom
395 _RL foFacMom
396 _RL mTFacMom
397 _RL cAdjFreq
398 _RL omega
399 _RL tauThetaClimRelax
400 _RL lambdaThetaClimRelax
401 _RL tauSaltClimRelax
402 _RL lambdaSaltClimRelax
403 _RL externForcingCycle
404 _RL externForcingPeriod
405 _RL horiVertRatio
406 _RL recip_horiVertRatio
407
408 COMMON /PARM_A/ HeatCapacity_Cp,
409 & Lamba_theta
410 _RL HeatCapacity_Cp
411 _RL Lamba_theta
412
413 C Equation of State (polynomial coeffients)
414 COMMON /PARM_EOS_NL/ eosC,eosSig0,eosRefT,eosRefS
415 _RL eosC(9,Nr+1),eosSig0(Nr+1),eosRefT(Nr+1),eosRefS(Nr+1)
416 C Linear equation of state
417 C tAlpha - Linear EOS thermal expansion coefficient ( 1/degree ).
418 C sBeta - Linear EOS haline contraction coefficient.
419 COMMON /PARM_EOS_LIN/ tAlpha,sBeta,eosType
420 _RL tAlpha
421 _RL sBeta
422 character*(6) eosType
423

  ViewVC Help
Powered by ViewVC 1.1.22