1 |
C $Header:$ |
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 useCoriolis - Flag which turns the coriolis terms on and off. |
76 |
C tempDiffusion - Flag which turns diffusion of temperature on |
77 |
C and off. |
78 |
C tempAdvection - Flag which turns advection of temperature on |
79 |
C and off. |
80 |
C tempForcing - Flag which turns external forcing of temperature on |
81 |
C and off. |
82 |
C saltDiffusion - Flag which turns diffusion of salinit on |
83 |
C and off. |
84 |
C saltAdvection - Flag which turns advection of salinit on |
85 |
C and off. |
86 |
C saltForcing - Flag which turns external forcing of salinit on |
87 |
C and off. |
88 |
COMMON /PARM_L/ usingCartesianGrid, usingSphericalPolarGrid, |
89 |
& momViscosity, momAdvection, momForcing, useCoriolis, |
90 |
& tempDiffusion, tempAdvection, tempForcing, |
91 |
& saltDiffusion, saltAdvection, saltForcing |
92 |
LOGICAL usingCartesianGrid |
93 |
LOGICAL usingSphericalPolarGrid |
94 |
LOGICAL momViscosity |
95 |
LOGICAL momAdvection |
96 |
LOGICAL momForcing |
97 |
LOGICAL useCoriolis |
98 |
LOGICAL tempDiffusion |
99 |
LOGICAL tempAdvection |
100 |
LOGICAL tempForcing |
101 |
LOGICAL saltDiffusion |
102 |
LOGICAL saltAdvection |
103 |
LOGICAL saltForcing |
104 |
|
105 |
C-- COMMON /PARM_R/ "Real" valued parameters used by the model. |
106 |
C cg2dTargetResidual |
107 |
C - Target residual for cg2d solver. |
108 |
C cg2dpcOffDFac - Averaging weight for preconditioner off-diagonal. |
109 |
C Note. 20th May 1998 |
110 |
C I made a weird discovery! In the model paper we argue |
111 |
C for the form of the preconditioner used here ( see |
112 |
C A Finite-volume, Incompressible Navier-Stokes Model |
113 |
C ...., Marshall et. al ). The algebra gives a simple |
114 |
C 0.5 factor for the averaging of ac and aCw to get a |
115 |
C symmettric pre-conditioner. By using a factor of 0.51 |
116 |
C i.e. scaling the off-diagonal terms in the |
117 |
C preconditioner down slightly I managed to get the |
118 |
C number of iterations for convergence in a test case to |
119 |
C drop form 192 -> 134! Need to investigate this further! |
120 |
C For now I have introduced a parameter cg2dpcOffDFac which |
121 |
C defaults to 0.51 but can be set at runtime. |
122 |
C delZ - Vertical grid spacing ( m ) - delZ is the distance |
123 |
C between "w" surfaces. |
124 |
C delX - Separation between cell faces (m) or (deg), depending |
125 |
C delY on input flags. |
126 |
C gravity - Accel. due to gravity ( m/s^2 ) |
127 |
C ronil - Reference density |
128 |
C startTime - Start time for model ( s ) |
129 |
C phiMin - Latitude of southern most cell face. |
130 |
C thetaMin - Longitude of western most cell face (this |
131 |
C is an "inert" parameter but it is included |
132 |
C to make geographical references simple.) |
133 |
C rSphere - Radius of sphere for a spherical polar grid ( m ). |
134 |
C f0 - Reference coriolis parameter ( 1/s ) |
135 |
C ( Southern edge f for beta plane ) |
136 |
C beta - df/dy ( s^-1.m^-1 ) |
137 |
C viscAh - Eddy viscosity coeff. for mixing of |
138 |
C momentum laterally ( m^2/s ) |
139 |
C viscAz - Eddy viscosity coeff. for mixing of |
140 |
C momentum vertically ( m^2/s ) |
141 |
C viscA4 - Biharmonic viscosity coeff. for mixing of |
142 |
C momentum laterally ( m^4/s ) |
143 |
C diffKhT - Laplacian diffusion coeff. for mixing of |
144 |
C heat laterally ( m^2/s ) |
145 |
C diffKzT - Laplacian diffusion coeff. for mixing of |
146 |
C heat vertically ( m^2/s ) |
147 |
C diffK4T - Biharmonic diffusion coeff. for mixing of |
148 |
C heat laterally ( m^4/s ) |
149 |
C diffKhS - Laplacian diffusion coeff. for mixing of |
150 |
C salt laterally ( m^2/s ) |
151 |
C diffKzS - Laplacian diffusion coeff. for mixing of |
152 |
C salt vertically ( m^2/s ) |
153 |
C diffK4S - Biharmonic diffusion coeff. for mixing of |
154 |
C salt laterally ( m^4/s ) |
155 |
C deltaT - Default timestep ( s ) |
156 |
C deltaTClock - Timestep used as model "clock". This determines the |
157 |
C IO frequencies and is used in tagging output. It can |
158 |
C be totally different to the dynamical time. Typically |
159 |
C it will be the deep-water timestep for accelerated runs. |
160 |
C Frequency of checkpointing and dumping of the model state |
161 |
C are referenced to this clock. ( s ) |
162 |
C deltaTMom - Timestep for momemtum equations ( s ) |
163 |
C deltaTtracer - Timestep for tracer equations ( s ) |
164 |
C tauCD - CD scheme coupling timescale ( 1/s ) |
165 |
C rCD - CD scheme normalised coupling parameter ( 0-1 ) |
166 |
C GMmaxslope - max. slope allowed in GM/Redi tensor |
167 |
C GMlength - Length to use in Visbeck et al. formula for K |
168 |
C GMalpha - alpha to use in Visbeck et al. formula for K |
169 |
C GMdepth - Depth over which to integrate Richardson # (Visbeck et al.) |
170 |
C GMbackground - background value of GM/Redi coefficient |
171 |
C startTime - Starting time for this integration ( s ). |
172 |
C endTime - Ending time for this integration ( s ). |
173 |
C chkPtFreq - Frequency of rolling check pointing ( s ). |
174 |
C pChkPtFreq - Frequency of permanent check pointing ( s ). |
175 |
C dumpFreq - Frequency with which model state is written to |
176 |
C post-processing files ( s ). |
177 |
COMMON /PARM_R/ cg2dTargetResidual, cg2dpcOffDFac, delZ, delX, delY, |
178 |
& deltaT,deltaTmom, deltaTtracer, deltaTClock,abeps, startTime, phiMin, |
179 |
& thetaMin, rSphere, f0, fCori, beta, viscAh, viscAz, viscA4, |
180 |
& diffKhT, diffKzT, diffK4T, diffKhS, diffKzS, diffK4S, delT, |
181 |
& tauCD, rCD, |
182 |
& GMmaxslope,GMlength,GMalpha,GMdepth,GMkbackground, |
183 |
& gravity, rhonil, tRef, sRef, |
184 |
& endTime, chkPtFreq, pchkPtFreq, dumpFreq |
185 |
_RL cg2dTargetResidual |
186 |
_RL cg2dpcOffDFac |
187 |
_RL delZ(Nz) |
188 |
_RL delX(Nx) |
189 |
_RL delY(Ny) |
190 |
_RL deltaT |
191 |
_RL deltaTClock |
192 |
_RL deltaTmom |
193 |
_RL deltaTtracer |
194 |
_RL abeps |
195 |
_RL phiMin |
196 |
_RL thetaMin |
197 |
_RL rSphere |
198 |
_RL f0 |
199 |
_RL beta |
200 |
_RL viscAh |
201 |
_RL viscAz |
202 |
_RL viscA4 |
203 |
_RL diffKhT |
204 |
_RL diffKzT |
205 |
_RL diffK4T |
206 |
_RL diffKhS |
207 |
_RL diffKzS |
208 |
_RL diffK4S |
209 |
_RL delt |
210 |
_RL tauCD |
211 |
_RL rCD |
212 |
_RL GMmaxslope |
213 |
_RL GMlength |
214 |
_RL GMalpha |
215 |
_RL GMdepth |
216 |
_RL GMkbackground |
217 |
_RL gravity |
218 |
_RL rhonil |
219 |
_RL tRef(Nz) |
220 |
_RL sRef(Nz) |
221 |
_RL Fcori(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
222 |
_RL startTime |
223 |
_RL endTime |
224 |
_RL chkPtFreq |
225 |
_RL pChkPtFreq |
226 |
_RL dumpFreq |
227 |
|
228 |
COMMON /PARM_A/ HeatCapacity_Cp, |
229 |
& Lamba_theta |
230 |
_RL HeatCapacity_Cp |
231 |
_RL Lamba_theta |
232 |
|
233 |
C Equation of State (polynomial coeffients) |
234 |
COMMON /PARM_EOS_NL/ eosC,eosSig0,eosRefT,eosRefS |
235 |
_RL eosC(Nz+1,9),eosSig0(Nz+1),eosRefT(Nz+1),eosRefS(Nz+1) |
236 |
C Linear equation of state |
237 |
C tAlpha - Linear EOS thermal expansion coefficient ( 1/degree ). |
238 |
C sBeta - Linear EOS haline contraction coefficient. |
239 |
COMMON /PARM_EOS_LIN/ tAlpha,sBeta |
240 |
_RL tAlpha |
241 |
_RL sBeta |
242 |
|