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

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

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

revision 1.3 by cnh, Sun Apr 26 23:41:54 1998 UTC revision 1.20 by adcroft, Thu Jun 18 13:56:06 1998 UTC
# Line 9  C     | stored into the variables held h Line 9  C     | stored into the variables held h
9  C     | the parameters can also be found here.                   |  C     | the parameters can also be found here.                   |
10  C     \==========================================================/  C     \==========================================================/
11    
12    C     Macros for special grid options
13    #include "PARAMS_MACROS.h"
14    
15  C--   Contants  C--   Contants
 C     nOBands - No. of offline data time bands  
       INTEGER nOBands  
       PARAMETER ( nOBands = 12 )  
16  C     Useful physical values  C     Useful physical values
17        Real*8 PI        Real*8 PI
18        PARAMETER ( PI    = 3.14159265358979323844D0   )        PARAMETER ( PI    = 3.14159265358979323844D0   )
19        Real*8 deg2rad        Real*8 deg2rad
20        PARAMETER ( deg2rad = 2.D0*PI/360.D0           )        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    
30    C     Checkpoint data
31          INTEGER maxNoChkptLev
32          PARAMETER ( maxNoChkptLev = 2 )
33    
34  C--   COMMON /PARM_C/ Character valued parameters used by the model.  C--   COMMON /PARM_C/ Character valued parameters used by the model.
35  C     oBandId  - Offline dataset identifiers for different periods.  C     checkPtSuff - List of checkpoint file suffices
36        COMMON /PARM_C/ oBandId  C     bathyFile   - File containing bathymetry. If not defined bathymetry
37        CHARACTER*3 oBandId(nOBands)  C                   is taken from inline function.
38    C     hydrogThetaFile - File containing initial hydrographic data for potential
39    C                       temperature.
40    C     hydrogSaltFile  - File containing initial hydrographic data for salinity.
41    C     zonalWindFile   - File containing zonal wind data
42    C     meridWindFile   - File containing meridional wind data
43    C     thetaClimFile   - File containing theta climataology used
44    C                       in relaxation term -lambda(theta-theta*)
45    C     saltClimFile    - File containing salt climataology used
46    C                       in relaxation term -lambda(salt-salt*)
47          COMMON /PARM_C/ checkPtSuff,
48         &                bathyFile, hydrogThetaFile, hydrogSaltFile,
49         &                zonalWindFile, meridWindFile, thetaClimFile,
50         &                saltClimFile
51          CHARACTER*(5) checkPtSuff(maxNoChkptLev)
52          CHARACTER*(MAX_LEN_FNAM) bathyFile
53          CHARACTER*(MAX_LEN_FNAM) hydrogThetaFile
54          CHARACTER*(MAX_LEN_FNAM) hydrogSaltFile
55          CHARACTER*(MAX_LEN_FNAM) zonalWindFile
56          CHARACTER*(MAX_LEN_FNAM) meridWindFile
57          CHARACTER*(MAX_LEN_FNAM) thetaClimFile
58          CHARACTER*(MAX_LEN_FNAM) saltClimFile
59    
60  C--   COMMON /PARM_I/ Integer valued parameters used by the model.  C--   COMMON /PARM_I/ Integer valued parameters used by the model.
61  C     cg2dMaxIters        - Maximum number of iterations in the  C     cg2dMaxIters        - Maximum number of iterations in the
62  C                           two-dimensional con. grad solver.  C                           two-dimensional con. grad solver.
# Line 32  C     nIter0              - Start time-s Line 66  C     nIter0              - Start time-s
66  C     nTimeSteps          - Number of timesteps to execute  C     nTimeSteps          - Number of timesteps to execute
67  C     numStepsPerPickup   - For offline setup. Frequency of pickup  C     numStepsPerPickup   - For offline setup. Frequency of pickup
68  C                           of flow fields.  C                           of flow fields.
69    C     writeStatePrec      - Precision used for writing model state.
70    C     writeBinaryPrec     - Precision used for writing binary files
71    C     readBinaryPrec      - Precision used for reading binary files
72    C     nCheckLev           - Holds current checkpoint level
73        COMMON /PARM_I/        COMMON /PARM_I/
74       &        cg2dMaxIters,       &        cg2dMaxIters,
75       &        cg2dChkResFreq,       &        cg2dChkResFreq,
76       &        nIter0, nTimeSteps,       &        nIter0, nTimeSteps,
77       &        numStepsPerPickup       &        numStepsPerPickup,
78         &        writeStatePrec, nCheckLev,
79         &        writeBinaryPrec, readBinaryPrec
80        INTEGER cg2dMaxIters        INTEGER cg2dMaxIters
81        INTEGER cg2dChkResFreq        INTEGER cg2dChkResFreq
82        INTEGER nIter0        INTEGER nIter0
83        INTEGER nTimeSteps        INTEGER nTimeSteps
84        INTEGER numStepsPerPickup        INTEGER numStepsPerPickup
85          INTEGER writeStatePrec
86          INTEGER writeBinaryPrec
87          INTEGER readBinaryPrec
88          INTEGER nCheckLev
89    
90  C--   COMMON /PARM_L/ Logical valued parameters used by the model.  C--   COMMON /PARM_L/ Logical valued parameters used by the model.
91  C     usingCartesianGrid - If TRUE grid generation will be in a cartesian  C     usingCartesianGrid - If TRUE grid generation will be in a cartesian
# Line 52  C     momViscosity  - Flag which turns m Line 96  C     momViscosity  - Flag which turns m
96  C     momAdvection  - Flag which turns advection of momentum on and off.  C     momAdvection  - Flag which turns advection of momentum on and off.
97  C     momForcing    - Flag which turns external forcing of momentum on  C     momForcing    - Flag which turns external forcing of momentum on
98  C                     and off.  C                     and off.
99    C     momPressureForcing - Flag which turns pressure term in momentum equation
100    C                          on and off.
101    C     metricTerms   - Flag which turns metric terms on or off.
102    C     usingSphericalPolarMTerms - If TRUE use spherical polar metric terms.
103  C     useCoriolis   - Flag which turns the coriolis terms on and off.  C     useCoriolis   - Flag which turns the coriolis terms on and off.
104  C     tempDiffusion - Flag which turns diffusion of temperature on  C     tempDiffusion - Flag which turns diffusion of temperature on
105  C                     and off.  C                     and off.
# Line 65  C     saltAdvection - Flag which turns a Line 113  C     saltAdvection - Flag which turns a
113  C                     and off.  C                     and off.
114  C     saltForcing   - Flag which turns external forcing of salinit on  C     saltForcing   - Flag which turns external forcing of salinit on
115  C                     and off.  C                     and off.
116    C     implicitFreeSurface - Set to true to use implcit free surface
117    C     rigidLid            - Set to true to use rigid lid
118    C     momStepping   - Turns momentum equation time-stepping off
119    C     tempStepping  - Turns temperature equation time-stepping off
120    C     saltStepping  - Turns salinity equation time-stepping off
121    C     useConstantF  - Coriolis parameter set to f0
122    C     useBetaPlaneF - Coriolis parameter set to f0 + beta.y
123    C     useSphereF    - Coriolis parameter set to 2.omega.sin(phi)
124    C     implicitDiffusion - Turns implicit vertical diffusion on
125    C     doThetaClimRelax - Set true if relaxation to temperature
126    C                        climatology is required.
127    C     doSaltClimRelax  - Set true if relaxation to salinity
128    C                        climatology is required.
129    C     periodicExternalForcing - Set true if forcing is time-dependant
130        COMMON /PARM_L/ usingCartesianGrid, usingSphericalPolarGrid,        COMMON /PARM_L/ usingCartesianGrid, usingSphericalPolarGrid,
131       & momViscosity, momAdvection, momForcing, useCoriolis,       & momViscosity, momAdvection, momForcing, useCoriolis, momPressureForcing,
132       & tempDiffusion, tempAdvection, tempForcing,       & tempDiffusion, tempAdvection, tempForcing,
133       & saltDiffusion, saltAdvection, saltForcing       & saltDiffusion, saltAdvection, saltForcing,
134         & implicitFreeSurface, rigidLid,
135         & momStepping, tempStepping, saltStepping,
136         & metricTerms, usingSphericalPolarMTerms,
137         & useConstantF, useBetaPlaneF, useSphereF,
138         & implicitDiffusion, doThetaClimRelax, doSaltClimRelax,
139         & periodicExternalForcing
140        LOGICAL usingCartesianGrid        LOGICAL usingCartesianGrid
141        LOGICAL usingSphericalPolarGrid        LOGICAL usingSphericalPolarGrid
142          LOGICAL usingSphericalPolarMTerms
143        LOGICAL momViscosity        LOGICAL momViscosity
144        LOGICAL momAdvection        LOGICAL momAdvection
145        LOGICAL momForcing        LOGICAL momForcing
146          LOGICAL momPressureForcing
147        LOGICAL useCoriolis        LOGICAL useCoriolis
148        LOGICAL tempDiffusion        LOGICAL tempDiffusion
149        LOGICAL tempAdvection        LOGICAL tempAdvection
# Line 81  C                     and off. Line 151  C                     and off.
151        LOGICAL saltDiffusion        LOGICAL saltDiffusion
152        LOGICAL saltAdvection        LOGICAL saltAdvection
153        LOGICAL saltForcing        LOGICAL saltForcing
154          LOGICAL implicitFreeSurface
155          LOGICAL rigidLid
156          LOGICAL momStepping
157          LOGICAL tempStepping
158          LOGICAL saltStepping
159          LOGICAL metricTerms
160          LOGICAL useConstantF
161          LOGICAL useBetaPlaneF
162          LOGICAL useSphereF
163          LOGICAL implicitDiffusion
164          LOGICAL doThetaClimRelax
165          LOGICAL doSaltClimRelax
166          LOGICAL periodicExternalForcing
167    
168  C--   COMMON /PARM_R/ "Real" valued parameters used by the model.  C--   COMMON /PARM_R/ "Real" valued parameters used by the model.
169  C     cg2dTargetResidual  C     cg2dTargetResidual
170  C               - Target residual for cg2d solver.  C               - Target residual for cg2d solver.
171    C     cg2dpcOffDFac - Averaging weight for preconditioner off-diagonal.
172    C     Note. 20th May 1998
173    C           I made a weird discovery! In the model paper we argue
174    C           for the form of the preconditioner used here ( see
175    C           A Finite-volume, Incompressible Navier-Stokes Model
176    C           ...., Marshall et. al ). The algebra gives a simple
177    C           0.5 factor for the averaging of ac and aCw to get a
178    C           symmettric pre-conditioner. By using a factor of 0.51
179    C           i.e. scaling the off-diagonal terms in the
180    C           preconditioner down slightly I managed to get the
181    C           number of iterations for convergence in a test case to
182    C           drop form 192 -> 134! Need to investigate this further!
183    C           For now I have introduced a parameter cg2dpcOffDFac which
184    C           defaults to 0.51 but can be set at runtime.
185  C     delZ      - Vertical grid spacing ( m ) - delZ is the distance  C     delZ      - Vertical grid spacing ( m ) - delZ is the distance
186  C                 between "w" surfaces.  C                 between "w" surfaces.
187  C     delX      - Separation between cell faces (m) or (deg), depending  C     delX      - Separation between cell faces (m) or (deg), depending
188  C     delY        on input flags.  C     delY        on input flags.
189  C     gravity   - Accel. due to gravity ( m/s^2 )  C     gravity   - Accel. due to gravity ( m/s^2 )
190    C     gBaro     - Accel. due to gravity used in barotropic equation ( m/s^2 )
191  C     ronil     - Reference density  C     ronil     - Reference density
192  C     startTime - Start time for model ( s )  C     startTime - Start time for model ( s )
193  C     phiMin    - Latitude of southern most cell face.  C     phiMin    - Latitude of southern most cell face.
# Line 97  C     thetaMin  - Longitude of western m Line 195  C     thetaMin  - Longitude of western m
195  C                 is an "inert" parameter but it is included  C                 is an "inert" parameter but it is included
196  C                 to make geographical references simple.)  C                 to make geographical references simple.)
197  C     rSphere   - Radius of sphere for a spherical polar grid ( m ).  C     rSphere   - Radius of sphere for a spherical polar grid ( m ).
198    C     rRSphere  - Reciprocal radius of sphere for a spherical polar grid ( m ).
199  C     f0        - Reference coriolis parameter ( 1/s )  C     f0        - Reference coriolis parameter ( 1/s )
200  C                 ( Southern edge f for beta plane )  C                 ( Southern edge f for beta plane )
201  C     beta      - df/dy ( s^-1.m^-1 )  C     beta      - df/dy ( s^-1.m^-1 )
202    C     omega     - Angular velocity ( rad/s )
203  C     viscAh    - Eddy viscosity coeff. for mixing of  C     viscAh    - Eddy viscosity coeff. for mixing of
204  C                 momentum laterally ( m^2/s )  C                 momentum laterally ( m^2/s )
205  C     viscAz    - Eddy viscosity coeff. for mixing of  C     viscAz    - Eddy viscosity coeff. for mixing of
# Line 119  C                 salt vertically ( m^2/ Line 219  C                 salt vertically ( m^2/
219  C     diffK4S   - Biharmonic diffusion coeff. for mixing of  C     diffK4S   - Biharmonic diffusion coeff. for mixing of
220  C                 salt laterally ( m^4/s )  C                 salt laterally ( m^4/s )
221  C     deltaT    - Default timestep ( s )  C     deltaT    - Default timestep ( s )
222    C     deltaTClock  - Timestep used as model "clock". This determines the
223    C                    IO frequencies and is used in tagging output. It can
224    C                    be totally different to the dynamical time. Typically
225    C                    it will be the deep-water timestep for accelerated runs.
226    C                    Frequency of checkpointing and dumping of the model state
227    C                    are referenced to this clock. ( s )
228  C     deltaTMom    - Timestep for momemtum equations ( s )  C     deltaTMom    - Timestep for momemtum equations ( s )
229  C     deltaTtracer - Timestep for tracer equations ( s )  C     deltaTtracer - Timestep for tracer equations ( s )
230    C     freesurfFac  - Parameter to turn implicit free surface term on or off
231    C                    freesurfac = 1. uses implicit free surface
232    C                    freesurfac = 0. uses rigid lid
233  C     tauCD     - CD scheme coupling timescale ( 1/s )  C     tauCD     - CD scheme coupling timescale ( 1/s )
234  C     rCD       - CD scheme normalised coupling parameter ( 0-1 )  C     rCD       - CD scheme normalised coupling parameter ( 0-1 )
235    C     GMmaxslope  - max. slope allowed in GM/Redi tensor
236    C     GMlength  - Length to use in Visbeck et al. formula for K (m)
237    C     GMalpha   - alpha to use in Visbeck et al. formula for K
238    C     GMdepth   - Depth over which to integrate Richardson # (Visbeck et al.)
239    C     GMkbackground - background value of GM/Redi coefficient
240  C     startTime - Starting time for this integration ( s ).  C     startTime - Starting time for this integration ( s ).
241  C     endTime   - Ending time for this integration ( s ).  C     endTime   - Ending time for this integration ( s ).
242  C     chkPtFreq - Frequency of check pointing ( s ).  C     chkPtFreq  - Frequency of rolling check pointing ( s ).
243    C     pChkPtFreq - Frequency of permanent check pointing ( s ).
244  C     dumpFreq  - Frequency with which model state is written to  C     dumpFreq  - Frequency with which model state is written to
245  C                 post-processing files ( s ).  C                 post-processing files ( s ).
246        COMMON /PARM_R/ cg2dTargetResidual, delZ, delX, delY, deltaT,  C     taveFreq  - Frequency with which time-averaged model state is written to
247       & deltaTmom, deltaTtracer, abeps, startTime, phiMin, thetaMin,  C                 post-processing files ( s ).
248       & rSphere, f0, fCori, beta, viscAh, viscAz, viscA4, diffKhT, diffKzT,  C     afFacMom  - Advection of momentum term scaling parameter
249       & diffK4T, diffKhS, diffKzS, diffK4S, delT, tauCD, rCD,  C     vfFacMom  - Momentum viscosity scaling parameter
250       & tAlpha, sBeta, gravity, rhonil, tRef, sRef,  C     pfFacMom  - Momentum pressure forcing parameter
251       & endTime, chkPtFreq, dumpFreq  C     cfFacMom  - Coriolis term scaling parameter
252        REAL cg2dTargetResidual  C     foFacMom  - Momentum forcing scaling parameter
253        REAL delZ(Nz)  C     mtFacMom  - Metric terms scaling parameter
254        REAL delX(Nx)  C     cAdjFreq  - Frequency of convective adjustment
255        REAL delY(Ny)  C     tauThetaClimRelax - Relaxation to climatology time scale ( s ).
256        REAL deltaT  C     lambdaThetaClimRelax - Inverse time scale for relaxation ( 1/s ).
257        REAL deltaTmom  C     tauSaltClimRelax - Relaxation to climatology time scale ( s ).
258        REAL deltaTtracer  C     lambdaSaltClimRelax - Inverse time scale for relaxation ( 1/s ).
259        REAL abeps  C     externForcingPeriod - Is the period of which forcing varies (eg. 1 month)
260        REAL phiMin  C     externForcingCycle - Is the repeat time of the forcing (eg. 1 year)
261        REAL thetaMin  C                          (note: externForcingCycle must be an integer
262        REAL rSphere  C                           number times externForcingPeriod)
263        REAL f0        COMMON /PARM_R/ cg2dTargetResidual, cg2dpcOffDFac, delZ, delX, delY,
264        _RL  beta       & deltaT,deltaTmom, deltaTtracer, deltaTClock,abeps, startTime, phiMin,
265        REAL viscAh       & thetaMin, rSphere, rRSphere, f0, fCori, beta, viscAh, viscAz, viscA4,
266        REAL viscAz       & diffKhT, diffKzT, diffK4T, diffKhS, diffKzS, diffK4S, delT,
267        REAL viscA4       & tauCD, rCD, freeSurfFac,
268        REAL diffKhT       & GMmaxslope,GMlength,GMalpha,GMdepth,GMkbackground,
269        REAL diffKzT       & gravity, gBaro, rhonil, tRef, sRef,
270        REAL diffK4T       & endTime, chkPtFreq, pchkPtFreq, dumpFreq, taveFreq,
271        REAL diffKhS       & afFacMom, vfFacMom, pfFacMom, cfFacMom, foFacMom, mtFacMom,
272        REAL diffKzS       & cAdjFreq, omega, tauThetaClimRelax, lambdaThetaClimRelax,
273        REAL diffK4S       & tauSaltClimRelax, lambdaSaltClimRelax,
274        REAL delt       & externForcingCycle, externForcingPeriod
275        REAL tauCD        _RL cg2dTargetResidual
276        REAL rCD        _RL cg2dpcOffDFac
277        REAL tAlpha        _RL delZ(Nz)
278        REAL sBeta        _RL delX(Nx)
279        REAL gravity        _RL delY(Ny)
280        REAL rhonil        _RL deltaT
281        REAL tRef(Nz)        _RL deltaTClock
282        REAL sRef(Nz)        _RL deltaTmom
283        real Fcori(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RL deltaTtracer
284        REAL startTime        _RL abeps
285        REAL endTime        _RL phiMin
286        REAL chkPtFreq        _RL thetaMin
287        REAL dumpFreq        _RL rSphere
288          _RL rRSphere
289          _RL f0
290          _RL freeSurfFac
291          _RL beta
292          _RL viscAh
293          _RL viscAz
294          _RL viscA4
295          _RL diffKhT
296          _RL diffKzT
297          _RL diffK4T
298          _RL diffKhS
299          _RL diffKzS
300          _RL diffK4S
301          _RL delt
302          _RL tauCD
303          _RL rCD
304          _RL GMmaxslope
305          _RL GMlength
306          _RL GMalpha
307          _RL GMdepth
308          _RL GMkbackground
309          _RL gravity
310          _RL gBaro
311          _RL rhonil
312          _RL tRef(Nz)
313          _RL sRef(Nz)
314          _RS Fcori(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
315          _RL startTime
316          _RL endTime
317          _RL chkPtFreq
318          _RL pChkPtFreq
319          _RL dumpFreq
320          _RL taveFreq
321          _RL afFacMom
322          _RL vfFacMom
323          _RL pfFacMom
324          _RL cfFacMom
325          _RL foFacMom
326          _RL mTFacMom
327          _RL cAdjFreq
328          _RL omega
329          _RL tauThetaClimRelax
330          _RL lambdaThetaClimRelax
331          _RL tauSaltClimRelax
332          _RL lambdaSaltClimRelax
333          _RL externForcingCycle
334          _RL externForcingPeriod
335    
336        COMMON /PARM_A/ HeatCapacity_Cp,        COMMON /PARM_A/ HeatCapacity_Cp,
337       &                Lamba_theta       &                Lamba_theta
338        REAL HeatCapacity_Cp        _RL HeatCapacity_Cp
339        REAL Lamba_theta        _RL Lamba_theta
340    
341    C Equation of State (polynomial coeffients)
342          COMMON /PARM_EOS_NL/ eosC,eosSig0,eosRefT,eosRefS
343          _RL eosC(9,Nz+1),eosSig0(Nz+1),eosRefT(Nz+1),eosRefS(Nz+1)
344    C Linear equation of state
345    C     tAlpha    - Linear EOS thermal expansion coefficient ( 1/degree ).
346    C     sBeta     - Linear EOS haline contraction coefficient.
347          COMMON /PARM_EOS_LIN/ tAlpha,sBeta,eosType
348          _RL tAlpha
349          _RL sBeta
350          character*(6) eosType
351    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.20

  ViewVC Help
Powered by ViewVC 1.1.22