1 |
mlosch |
1.217 |
C $Header: /u/gcmpack/MITgcm/model/src/ini_parms.F,v 1.216 2008/08/24 21:32:17 jmc Exp $ |
2 |
heimbach |
1.58 |
C $Name: $ |
3 |
cnh |
1.1 |
|
4 |
jmc |
1.181 |
c #include "PACKAGES_CONFIG.h" |
5 |
adcroft |
1.22 |
#include "CPP_OPTIONS.h" |
6 |
cnh |
1.1 |
|
7 |
edhill |
1.121 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
8 |
cnh |
1.70 |
CBOP |
9 |
|
|
C !ROUTINE: INI_PARMS |
10 |
|
|
C !INTERFACE: |
11 |
cnh |
1.1 |
SUBROUTINE INI_PARMS( myThid ) |
12 |
cnh |
1.70 |
|
13 |
edhill |
1.121 |
C !DESCRIPTION: |
14 |
jmc |
1.181 |
C Routine to load model "parameters" from parameter file "data" |
15 |
|
|
|
16 |
cnh |
1.70 |
C !USES: |
17 |
adcroft |
1.38 |
IMPLICIT NONE |
18 |
cnh |
1.1 |
#include "SIZE.h" |
19 |
|
|
#include "EEPARAMS.h" |
20 |
|
|
#include "PARAMS.h" |
21 |
jmc |
1.188 |
c#include "GRID.h" |
22 |
mlosch |
1.82 |
#include "EOS.h" |
23 |
cnh |
1.1 |
|
24 |
cnh |
1.70 |
C !INPUT/OUTPUT PARAMETERS: |
25 |
jmc |
1.188 |
C myThid :: Number of this instance of INI_PARMS |
26 |
cnh |
1.1 |
INTEGER myThid |
27 |
|
|
|
28 |
cnh |
1.70 |
C !LOCAL VARIABLES: |
29 |
jmc |
1.188 |
C dxSpacing, dySpacing :: Default spacing in X and Y. |
30 |
|
|
C :: Units are that of coordinate system |
31 |
|
|
C :: i.e. cartesian => metres |
32 |
|
|
C :: s. polar => degrees |
33 |
jmc |
1.207 |
C SadournyCoriolis :: for backward compatibility |
34 |
jmc |
1.188 |
C deltaTtracer :: Timestep for tracer equations ( s ) |
35 |
|
|
C forcing_In_AB :: flag to put all forcings (Temp,Salt,Tracers,Momentum) |
36 |
|
|
C :: contribution in (or out of) Adams-Bashforth time stepping. |
37 |
|
|
C goptCount :: Used to count the nuber of grid options (only one is allowed!) |
38 |
|
|
C msgBuf :: Informational/error meesage buffer |
39 |
|
|
C errIO :: IO error flag |
40 |
|
|
C iUnit :: Work variable for IO unit number |
41 |
|
|
C record :: Work variable for IO buffer |
42 |
|
|
C K, I, J :: Loop counters |
43 |
|
|
C xxxDefault :: Default value for variable xxx |
44 |
cnh |
1.28 |
_RL dxSpacing |
45 |
|
|
_RL dySpacing |
46 |
jmc |
1.139 |
_RL deltaTtracer |
47 |
cnh |
1.1 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
48 |
|
|
CHARACTER*(MAX_LEN_PREC) record |
49 |
jmc |
1.207 |
LOGICAL SadournyCoriolis |
50 |
jmc |
1.180 |
LOGICAL forcing_In_AB |
51 |
cnh |
1.1 |
INTEGER goptCount |
52 |
jmc |
1.202 |
INTEGER K, i, j, IL, iUnit |
53 |
cnh |
1.1 |
INTEGER errIO |
54 |
|
|
INTEGER IFNBLNK |
55 |
|
|
EXTERNAL IFNBLNK |
56 |
|
|
INTEGER ILNBLNK |
57 |
|
|
EXTERNAL ILNBLNK |
58 |
cnh |
1.28 |
C Default values for variables which have vertical coordinate system |
59 |
|
|
C dependency. |
60 |
|
|
_RL viscArDefault |
61 |
|
|
_RL diffKrTDefault |
62 |
|
|
_RL diffKrSDefault |
63 |
|
|
_RL hFacMinDrDefault |
64 |
adcroft |
1.39 |
_RL delRDefault(Nr) |
65 |
adcroft |
1.41 |
_RS rkFacDefault |
66 |
cnh |
1.75 |
C zCoordInputData :: Variables used to select between different coordinate systems. |
67 |
jmc |
1.188 |
C pCoordInputData :: The vertical coordinate system in the rest of the model is |
68 |
|
|
C rCoordInputData :: written in terms of r. In the model "data" file input data |
69 |
|
|
C coordsSet :: can be interms of z, p or r. |
70 |
cnh |
1.75 |
C :: e.g. delZ or delP or delR for the vertical grid spacing. |
71 |
|
|
C :: The following rules apply: |
72 |
|
|
C :: All parameters must use the same vertical coordinate system. |
73 |
|
|
C :: e.g. delZ and viscAz is legal but |
74 |
|
|
C :: delZ and viscAr is an error. |
75 |
jmc |
1.188 |
C :: Similarly specifying delZ and delP is an error. |
76 |
|
|
C :: zCoord..., pCoord..., rCoord... are used to flag when |
77 |
|
|
C :: z, p or r are used. |
78 |
|
|
C :: coordsSet counts how many vertical coordinate systems have |
79 |
|
|
C :: been used to specify variables. coordsSet > 1 is an error. |
80 |
cnh |
1.28 |
C |
81 |
jmc |
1.100 |
|
82 |
cnh |
1.28 |
LOGICAL zCoordInputData |
83 |
|
|
LOGICAL pCoordInputData |
84 |
|
|
LOGICAL rCoordInputData |
85 |
|
|
INTEGER coordsSet |
86 |
jmc |
1.131 |
LOGICAL diffKrSet |
87 |
jmc |
1.100 |
|
88 |
|
|
C Variables which have vertical coordinate system dependency. |
89 |
jmc |
1.188 |
C delZ :: Vertical grid spacing ( m ). |
90 |
|
|
C delP :: Vertical grid spacing ( Pa ). |
91 |
|
|
C viscAz :: Eddy viscosity coeff. for mixing of momentum vertically ( m^2/s ) |
92 |
|
|
C viscAp :: Eddy viscosity coeff. for mixing of momentum vertically ( Pa^2/s ) |
93 |
|
|
C diffKzT :: Laplacian diffusion coeff. for mixing of heat vertically ( m^2/s ) |
94 |
|
|
C diffKpT :: Laplacian diffusion coeff. for mixing of heat vertically ( Pa^2/s ) |
95 |
|
|
C diffKzS :: Laplacian diffusion coeff. for mixing of salt vertically ( m^2/s ) |
96 |
|
|
C diffKpS :: Laplacian diffusion coeff. for mixing of salt vertically ( Pa^2/s ) |
97 |
jmc |
1.100 |
_RL delZ(Nr) |
98 |
|
|
_RL delP(Nr) |
99 |
|
|
_RL viscAz |
100 |
|
|
_RL viscAp |
101 |
|
|
_RL diffKzT |
102 |
|
|
_RL diffKpT |
103 |
jmc |
1.131 |
_RL diffKrT |
104 |
jmc |
1.100 |
_RL diffKzS |
105 |
|
|
_RL diffKpS |
106 |
jmc |
1.131 |
_RL diffKrS |
107 |
cnh |
1.75 |
|
108 |
|
|
C Retired main data file parameters. Kept here to trap use of old data files. |
109 |
jmc |
1.184 |
C Namelist PARM01: |
110 |
jmc |
1.136 |
C tracerAdvScheme :: tracer advection scheme (old passive tracer code) |
111 |
|
|
C trac_EvPrRn :: tracer conc. in Rain & Evap (old passive tracer code) |
112 |
|
|
C saltDiffusion :: diffusion of salinity on/off (flag not used) |
113 |
|
|
C tempDiffusion :: diffusion of temperature on/off (flag not used) |
114 |
|
|
C zonal_filt_lat :: Moved to package "zonal_filt" |
115 |
jmc |
1.188 |
C gravitySign :: direction of gravity relative to R direction |
116 |
|
|
C :: (removed from namelist and set according to z/p coordinate) |
117 |
jmc |
1.167 |
C viscAstrain :: replaced by standard viscosity coeff & useStrainTensionVisc |
118 |
|
|
C viscAtension :: replaced by standard viscosity coeff & useStrainTensionVisc |
119 |
jmc |
1.179 |
C useAnisotropicViscAgridMax :: Changed to be default behavior. Can |
120 |
|
|
C use old method by setting useAreaViscLength=.true. |
121 |
jmc |
1.191 |
C usePickupBeforeC35 :: to restart from old-pickup files (generated with code |
122 |
|
|
C from before checkpoint-35, Feb 08, 2001): disabled (Jan 2007) |
123 |
jmc |
1.184 |
C Namelist PARM03: |
124 |
jmc |
1.179 |
C tauThetaClimRelax3Dim :: replaced by pkg/rbcs (3.D Relaxation B.Cs) |
125 |
|
|
C tauSaltClimRelax3Dim :: replaced by pkg/rbcs (3.D Relaxation B.Cs) |
126 |
jmc |
1.184 |
C calendarDumps :: moved to package "cal" (calendar) |
127 |
|
|
C Namelist PARM04: |
128 |
|
|
C groundAtK1 :: put the surface(k=1) at the ground (replaced by usingPCoords) |
129 |
|
|
C rkFac :: removed from namelist ; replaced by -rkSign |
130 |
jmc |
1.179 |
C nRetired :: Counter used to trap gracefully namelists containing "retired" |
131 |
cnh |
1.75 |
C :: parameters. These are parameters that are either no-longer used |
132 |
|
|
C or that have moved to a different input file and/or namelist. |
133 |
mlosch |
1.217 |
C Namelist PARM05: |
134 |
|
|
C shelfIceFile :: File containing the topography of the shelfice draught |
135 |
|
|
C (replaced by SHELFICEtopoFile in SHELFICE.h) |
136 |
|
|
|
137 |
jmc |
1.136 |
LOGICAL tempDiffusion, saltDiffusion |
138 |
|
|
INTEGER tracerAdvScheme |
139 |
|
|
_RL trac_EvPrRn |
140 |
jmc |
1.188 |
_RL zonal_filt_lat, gravitySign |
141 |
jmc |
1.167 |
_RL viscAstrain, viscAtension |
142 |
jmc |
1.191 |
LOGICAL useAnisotropicViscAgridMax |
143 |
|
|
LOGICAL usePickupBeforeC35 |
144 |
jmc |
1.184 |
C- |
145 |
jmc |
1.179 |
_RL tauThetaClimRelax3Dim, tauSaltClimRelax3Dim |
146 |
jmc |
1.184 |
LOGICAL calendarDumps |
147 |
|
|
C- |
148 |
|
|
LOGICAL groundAtK1 |
149 |
|
|
_RL rkFac |
150 |
mlosch |
1.217 |
CHARACTER*(MAX_LEN_FNAM) shelfIceFile |
151 |
cnh |
1.75 |
INTEGER nRetired |
152 |
cnh |
1.1 |
|
153 |
|
|
C-- Continuous equation parameters |
154 |
|
|
NAMELIST /PARM01/ |
155 |
adcroft |
1.156 |
& gravitySign, nh_Am2, |
156 |
jmc |
1.188 |
& gravity, gBaro, rhonil, tAlpha, sBeta, |
157 |
jmc |
1.93 |
& f0, beta, omega, rotationPeriod, |
158 |
baylor |
1.149 |
& viscAh, viscAhW, viscAhMax, |
159 |
|
|
& viscAhGrid, viscAhGridMax, viscAhGridMin, |
160 |
|
|
& viscC2leith, viscC4leith, |
161 |
jmc |
1.191 |
& useFullLeith, useAnisotropicViscAgridMax, useStrainTensionVisc, |
162 |
baylor |
1.169 |
& useAreaViscLength, |
163 |
jmc |
1.207 |
& viscC2leithD, viscC4leithD, viscC2smag, viscC4smag, |
164 |
jmc |
1.134 |
& viscAhD, viscAhZ, viscA4D, viscA4Z, |
165 |
mlosch |
1.140 |
& viscA4, viscA4W, |
166 |
|
|
& viscA4Max, viscA4Grid, viscA4GridMax, viscA4GridMin, |
167 |
baylor |
1.168 |
& viscA4ReMax, viscAhReMax, |
168 |
jmc |
1.167 |
& viscAz, cosPower, viscAstrain, viscAtension, |
169 |
dimitri |
1.135 |
& diffKhT, diffKzT, diffK4T, |
170 |
adcroft |
1.51 |
& diffKhS, diffKzS, diffK4S, |
171 |
jmc |
1.188 |
& tRef, sRef, tRefFile, sRefFile, rhoRefFile, |
172 |
|
|
& eosType, integr_GeoPot, selectFindRoSurf, |
173 |
jmc |
1.215 |
& atm_Cp, atm_Rd, atm_Rq, atm_Po, |
174 |
jmc |
1.172 |
& no_slip_sides, sideDragFactor, |
175 |
|
|
& no_slip_bottom, bottomDragLinear, bottomDragQuadratic, |
176 |
cnh |
1.1 |
& momViscosity, momAdvection, momForcing, useCoriolis, |
177 |
jmc |
1.187 |
& useConstantF, useBetaPlaneF, useSphereF, use3dCoriolis, |
178 |
adcroft |
1.66 |
& momPressureForcing, metricTerms, vectorInvariantMomentum, |
179 |
cnh |
1.1 |
& tempDiffusion, tempAdvection, tempForcing, |
180 |
cnh |
1.8 |
& saltDiffusion, saltAdvection, saltForcing, |
181 |
jmc |
1.216 |
& implicSurfPress, implicDiv2Dflow, |
182 |
adcroft |
1.24 |
& implicitFreeSurface, rigidLid, freeSurfFac, hFacMin, hFacMinDz, |
183 |
dfer |
1.190 |
& exactConserv, linFSConserveTr, uniformLin_PhiSurf, |
184 |
|
|
& nonlinFreeSurf, hFacInf, hFacSup, select_rStar, |
185 |
jmc |
1.174 |
& implicitIntGravWave, staggerTimeStep, |
186 |
heimbach |
1.123 |
& tempStepping, saltStepping, momStepping, |
187 |
adcroft |
1.45 |
& implicitDiffusion, implicitViscosity, |
188 |
jmc |
1.104 |
& tempImplVertAdv, saltImplVertAdv, momImplVertAdv, |
189 |
jmc |
1.131 |
& viscAr, diffKrT, diffKrS, diffKrNrT, diffKrNrS, hFacMinDr, |
190 |
cnh |
1.29 |
& viscAp, diffKpT, diffKpS, hFacMinDp, |
191 |
adcroft |
1.112 |
& diffKrBL79surf, diffKrBL79deep, diffKrBL79scl, diffKrBL79Ho, |
192 |
dimitri |
1.195 |
& BL79LatVary, |
193 |
dimitri |
1.194 |
& diffKrBLEQsurf, diffKrBLEQdeep, diffKrBLEQscl, diffKrBLEQHo, |
194 |
mlosch |
1.84 |
& rhoConst, rhoConstFresh, buoyancyRelation, HeatCapacity_Cp, |
195 |
adcroft |
1.40 |
& writeBinaryPrec, readBinaryPrec, writeStatePrec, |
196 |
dimitri |
1.91 |
& nonHydrostatic, quasiHydrostatic, globalFiles, useSingleCpuIO, |
197 |
jmc |
1.197 |
& allowFreezing, useOldFreezing, ivdc_kappa, hMixCriteria, |
198 |
jmc |
1.116 |
& usePickupBeforeC35, usePickupBeforeC54, debugMode, debugLevel, |
199 |
jmc |
1.187 |
& tempAdvScheme, tempVertAdvScheme, |
200 |
jmc |
1.115 |
& saltAdvScheme, saltVertAdvScheme, tracerAdvScheme, |
201 |
adcroft |
1.73 |
& multiDimAdvection, useEnergyConservingCoriolis, |
202 |
adcroft |
1.113 |
& useCDscheme, useJamartWetPoints, useJamartMomAdv, useNHMTerms, |
203 |
jmc |
1.207 |
& selectVortScheme, upwindVorticity, highOrderVorticity, |
204 |
jmc |
1.208 |
& SadournyCoriolis, useAbsVorticity, upwindShear, selectKEscheme, |
205 |
jmc |
1.216 |
& selectAddFluid, useRealFreshWaterFlux, convertFW2Salt, |
206 |
jmc |
1.76 |
& temp_EvPrRn, salt_EvPrRn, trac_EvPrRn, |
207 |
heimbach |
1.146 |
& zonal_filt_lat, |
208 |
jmc |
1.188 |
& inAdExact, smoothAbsFuncRange, |
209 |
mlosch |
1.177 |
& balanceEmPmR, balanceQnet, balancePrintMean |
210 |
cnh |
1.1 |
|
211 |
|
|
C-- Elliptic solver parameters |
212 |
|
|
NAMELIST /PARM02/ |
213 |
jmc |
1.188 |
& cg2dMaxIters, cg2dChkResFreq, cg2dTargetResidual, |
214 |
jmc |
1.117 |
& cg2dTargetResWunit, cg2dpcOffDFac, cg2dPreCondFreq, |
215 |
cnh |
1.34 |
& cg3dMaxIters, cg3dChkResFreq, cg3dTargetResidual |
216 |
cnh |
1.1 |
|
217 |
|
|
C-- Time stepping parammeters |
218 |
|
|
NAMELIST /PARM03/ |
219 |
jmc |
1.203 |
& nIter0, nTimeSteps, nEndIter, |
220 |
jmc |
1.204 |
& baseTime, startTime, endTime, |
221 |
jmc |
1.188 |
& deltaT, deltaTClock, deltaTmom, |
222 |
jmc |
1.165 |
& deltaTtracer, dTtracerLev, deltaTfreesurf, |
223 |
jmc |
1.188 |
& forcing_In_AB, momForcingOutAB, tracForcingOutAB, |
224 |
jmc |
1.180 |
& momDissip_In_AB, doAB_onGtGs, |
225 |
jmc |
1.188 |
& abEps, alph_AB, beta_AB, startFromPickupAB2, |
226 |
jmc |
1.204 |
& tauCD, rCD, cAdjFreq, |
227 |
|
|
& chkPtFreq, pChkPtFreq, pickupSuff, pickupStrictlyMatch, |
228 |
mlosch |
1.206 |
& writePickupAtEnd, |
229 |
jmc |
1.165 |
& dumpFreq, dumpInitAndLast, adjDumpFreq, taveFreq, tave_lastIter, |
230 |
jmc |
1.204 |
& diagFreq, monitorFreq, adjMonitorFreq, monitorSelect, |
231 |
jmc |
1.188 |
& outputTypesInclusive, |
232 |
|
|
& tauThetaClimRelax, tauSaltClimRelax, latBandClimRelax, |
233 |
jmc |
1.210 |
& tauThetaClimRelax3Dim, tauSaltClimRelax3Dim, |
234 |
dimitri |
1.147 |
& periodicExternalForcing, externForcingPeriod, externForcingCycle, |
235 |
jmc |
1.165 |
& calendarDumps |
236 |
cnh |
1.1 |
|
237 |
|
|
C-- Gridding parameters |
238 |
|
|
NAMELIST /PARM04/ |
239 |
jmc |
1.188 |
& usingCartesianGrid, usingCylindricalGrid, |
240 |
|
|
& dxSpacing, dySpacing, delX, delY, delXFile, delYFile, |
241 |
cnh |
1.1 |
& usingSphericalPolarGrid, phiMin, thetaMin, rSphere, |
242 |
jmc |
1.189 |
& usingCurvilinearGrid, horizGridFile, deepAtmosphere, |
243 |
jmc |
1.188 |
& Ro_SeaLevel, delZ, delP, delR, delRc, delRFile, delRcFile, |
244 |
mlosch |
1.205 |
& rkFac, groundAtK1, |
245 |
|
|
& phiEuler, thetaEuler, psiEuler |
246 |
cnh |
1.1 |
|
247 |
cnh |
1.15 |
C-- Input files |
248 |
|
|
NAMELIST /PARM05/ |
249 |
jmc |
1.188 |
& bathyFile, topoFile, shelfIceFile, |
250 |
dimitri |
1.193 |
& hydrogThetaFile, hydrogSaltFile, diffKrFile, |
251 |
adcroft |
1.41 |
& zonalWindFile, meridWindFile, |
252 |
|
|
& thetaClimFile, saltClimFile, |
253 |
jmc |
1.143 |
& surfQfile, surfQnetFile, surfQswFile, EmPmRfile, saltFluxFile, |
254 |
heimbach |
1.152 |
& lambdaThetaFile, lambdaSaltFile, |
255 |
heimbach |
1.57 |
& uVelInitFile, vVelInitFile, pSurfInitFile, |
256 |
afe |
1.144 |
& dQdTFile, ploadFile,tCylIn,tCylOut, |
257 |
cnh |
1.214 |
& eddyPsiXFile, eddyPsiYFile, |
258 |
edhill |
1.119 |
& mdsioLocalDir, |
259 |
|
|
& the_run_name |
260 |
edhill |
1.121 |
CEOP |
261 |
cnh |
1.15 |
|
262 |
cnh |
1.1 |
C |
263 |
|
|
_BEGIN_MASTER(myThid) |
264 |
|
|
|
265 |
adcroft |
1.39 |
C Defaults values for input parameters |
266 |
|
|
CALL SET_DEFAULTS( |
267 |
|
|
O viscArDefault, diffKrTDefault, diffKrSDefault, |
268 |
jmc |
1.188 |
O hFacMinDrDefault, delRDefault, rkFacDefault, |
269 |
adcroft |
1.39 |
I myThid ) |
270 |
jmc |
1.207 |
SadournyCoriolis = .FALSE. |
271 |
adcroft |
1.39 |
|
272 |
cnh |
1.28 |
C-- Initialise "which vertical coordinate system used" flags. |
273 |
|
|
zCoordInputData = .FALSE. |
274 |
|
|
pCoordInputData = .FALSE. |
275 |
|
|
rCoordInputData = .FALSE. |
276 |
|
|
coordsSet = 0 |
277 |
|
|
|
278 |
jmc |
1.131 |
C-- Initialise retired parameters to unlikely value |
279 |
cnh |
1.75 |
nRetired = 0 |
280 |
jmc |
1.136 |
tempDiffusion = .TRUE. |
281 |
|
|
saltDiffusion = .TRUE. |
282 |
|
|
tracerAdvScheme = UNSET_I |
283 |
|
|
trac_EvPrRn = UNSET_RL |
284 |
cnh |
1.75 |
zonal_filt_lat = UNSET_RL |
285 |
jmc |
1.99 |
gravitySign = UNSET_RL |
286 |
jmc |
1.167 |
viscAstrain = UNSET_RL |
287 |
|
|
viscAtension = UNSET_RL |
288 |
jmc |
1.184 |
useAnisotropicViscAgridMax=.TRUE. |
289 |
jmc |
1.191 |
usePickupBeforeC35 = .FALSE. |
290 |
jmc |
1.179 |
tauThetaClimRelax3Dim = UNSET_RL |
291 |
|
|
tauSaltClimRelax3Dim = UNSET_RL |
292 |
jmc |
1.184 |
calendarDumps = .FALSE. |
293 |
|
|
rkFac = UNSET_RL |
294 |
|
|
groundAtK1 = .FALSE. |
295 |
mlosch |
1.217 |
shelfIceFile = ' ' |
296 |
cnh |
1.75 |
|
297 |
cnh |
1.1 |
C-- Open the parameter file |
298 |
heimbach |
1.211 |
#if defined (TARGET_BGL) || defined (TARGET_CRAYXT) |
299 |
ce107 |
1.163 |
OPEN(UNIT=scrUnit1,FILE='scratch1',STATUS='UNKNOWN') |
300 |
|
|
OPEN(UNIT=scrUnit2,FILE='scratch2',STATUS='UNKNOWN') |
301 |
|
|
#else |
302 |
cnh |
1.1 |
OPEN(UNIT=scrUnit1,STATUS='SCRATCH') |
303 |
|
|
OPEN(UNIT=scrUnit2,STATUS='SCRATCH') |
304 |
ce107 |
1.163 |
#endif |
305 |
cnh |
1.34 |
OPEN(UNIT=modelDataUnit,FILE='data',STATUS='OLD', |
306 |
cnh |
1.35 |
& IOSTAT=errIO) |
307 |
|
|
IF ( errIO .LT. 0 ) THEN |
308 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') |
309 |
|
|
& 'S/R INI_PARMS' |
310 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
311 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') |
312 |
|
|
& 'Unable to open model parameter' |
313 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
314 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') |
315 |
|
|
& 'file "data"' |
316 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
317 |
cnh |
1.1 |
CALL MODELDATA_EXAMPLE( myThid ) |
318 |
|
|
STOP 'ABNORMAL END: S/R INI_PARMS' |
319 |
jmc |
1.181 |
ENDIF |
320 |
cnh |
1.1 |
|
321 |
cnh |
1.35 |
DO WHILE ( .TRUE. ) |
322 |
|
|
READ(modelDataUnit,FMT='(A)',END=1001) RECORD |
323 |
|
|
IL = MAX(ILNBLNK(RECORD),1) |
324 |
cnh |
1.107 |
IF ( RECORD(1:1) .NE. commentCharacter ) THEN |
325 |
|
|
CALL NML_SET_TERMINATOR( RECORD ) |
326 |
|
|
WRITE(UNIT=scrUnit1,FMT='(A)') RECORD(:IL) |
327 |
|
|
ENDIF |
328 |
|
|
WRITE(UNIT=scrUnit2,FMT='(A)') RECORD(:IL) |
329 |
cnh |
1.35 |
ENDDO |
330 |
cnh |
1.1 |
1001 CONTINUE |
331 |
|
|
CLOSE(modelDataUnit) |
332 |
|
|
|
333 |
|
|
C-- Report contents of model parameter file |
334 |
jmc |
1.188 |
WRITE(msgBuf,'(A)') |
335 |
cnh |
1.1 |
&'// =======================================================' |
336 |
jmc |
1.188 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
337 |
|
|
& SQUEEZE_RIGHT, myThid ) |
338 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') '// Model parameter file "data"' |
339 |
jmc |
1.188 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
340 |
|
|
& SQUEEZE_RIGHT, myThid ) |
341 |
|
|
WRITE(msgBuf,'(A)') |
342 |
cnh |
1.1 |
&'// =======================================================' |
343 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
344 |
jmc |
1.188 |
& SQUEEZE_RIGHT, myThid ) |
345 |
cnh |
1.1 |
iUnit = scrUnit2 |
346 |
|
|
REWIND(iUnit) |
347 |
cnh |
1.35 |
DO WHILE ( .TRUE. ) |
348 |
cnh |
1.1 |
READ(UNIT=iUnit,FMT='(A)',END=2001) RECORD |
349 |
|
|
IL = MAX(ILNBLNK(RECORD),1) |
350 |
|
|
WRITE(msgBuf,'(A,A)') '>',RECORD(:IL) |
351 |
jmc |
1.188 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
352 |
|
|
& SQUEEZE_RIGHT, myThid ) |
353 |
cnh |
1.35 |
ENDDO |
354 |
cnh |
1.1 |
2001 CONTINUE |
355 |
|
|
CLOSE(iUnit) |
356 |
|
|
WRITE(msgBuf,'(A)') ' ' |
357 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
358 |
jmc |
1.188 |
& SQUEEZE_RIGHT, myThid ) |
359 |
cnh |
1.1 |
|
360 |
|
|
|
361 |
|
|
C-- Read settings from model parameter file "data". |
362 |
|
|
iUnit = scrUnit1 |
363 |
|
|
REWIND(iUnit) |
364 |
|
|
|
365 |
|
|
C-- Set default "physical" parameters |
366 |
mlosch |
1.126 |
viscAhW = UNSET_RL |
367 |
mlosch |
1.140 |
viscA4W = UNSET_RL |
368 |
jmc |
1.134 |
viscAhD = UNSET_RL |
369 |
|
|
viscAhZ = UNSET_RL |
370 |
|
|
viscA4D = UNSET_RL |
371 |
|
|
viscA4Z = UNSET_RL |
372 |
jmc |
1.181 |
viscAz = UNSET_RL |
373 |
cnh |
1.28 |
viscAr = UNSET_RL |
374 |
|
|
viscAp = UNSET_RL |
375 |
|
|
diffKzT = UNSET_RL |
376 |
|
|
diffKpT = UNSET_RL |
377 |
|
|
diffKrT = UNSET_RL |
378 |
|
|
diffKzS = UNSET_RL |
379 |
|
|
diffKpS = UNSET_RL |
380 |
|
|
diffKrS = UNSET_RL |
381 |
jmc |
1.131 |
DO k=1,Nr |
382 |
|
|
diffKrNrT(k) = UNSET_RL |
383 |
|
|
diffKrNrS(k) = UNSET_RL |
384 |
jmc |
1.171 |
tRef(k) = UNSET_RL |
385 |
|
|
sRef(k) = UNSET_RL |
386 |
jmc |
1.131 |
ENDDO |
387 |
adcroft |
1.39 |
gBaro = UNSET_RL |
388 |
|
|
rhoConst = UNSET_RL |
389 |
jmc |
1.93 |
omega = UNSET_RL |
390 |
cnh |
1.28 |
hFacMinDr = UNSET_RL |
391 |
|
|
hFacMinDz = UNSET_RL |
392 |
|
|
hFacMinDp = UNSET_RL |
393 |
jmc |
1.102 |
rhoConstFresh = UNSET_RL |
394 |
jmc |
1.76 |
convertFW2Salt = UNSET_RL |
395 |
mlosch |
1.82 |
tAlpha = UNSET_RL |
396 |
|
|
sBeta = UNSET_RL |
397 |
jmc |
1.115 |
tempVertAdvScheme = 0 |
398 |
|
|
saltVertAdvScheme = 0 |
399 |
|
|
C-- z,p,r coord input switching. |
400 |
jmc |
1.124 |
WRITE(msgBuf,'(A)') 'S/R INI_PARMS ; starts to read PARM01' |
401 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
402 |
jmc |
1.188 |
& SQUEEZE_RIGHT, myThid ) |
403 |
adcroft |
1.41 |
READ(UNIT=iUnit,NML=PARM01) !,IOSTAT=errIO) |
404 |
cnh |
1.35 |
IF ( errIO .LT. 0 ) THEN |
405 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') |
406 |
|
|
& 'S/R INI_PARMS' |
407 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
408 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') |
409 |
|
|
& 'Error reading numerical model ' |
410 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
411 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') |
412 |
|
|
& 'parameter file "data"' |
413 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
414 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') |
415 |
|
|
& 'Problem in namelist PARM01' |
416 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
417 |
cnh |
1.1 |
CALL MODELDATA_EXAMPLE( myThid ) |
418 |
|
|
STOP 'ABNORMAL END: S/R INI_PARMS' |
419 |
jmc |
1.72 |
ELSE |
420 |
|
|
WRITE(msgBuf,'(A)') 'S/R INI_PARMS ; read PARM01 : OK' |
421 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
422 |
jmc |
1.188 |
& SQUEEZE_RIGHT, myThid ) |
423 |
cnh |
1.35 |
ENDIF |
424 |
jmc |
1.89 |
|
425 |
jmc |
1.198 |
C- set the type of vertical coordinate and type of fluid |
426 |
jmc |
1.133 |
C according to buoyancyRelation |
427 |
|
|
usingPCoords = .FALSE. |
428 |
|
|
usingZCoords = .FALSE. |
429 |
|
|
fluidIsAir = .FALSE. |
430 |
|
|
fluidIsWater = .FALSE. |
431 |
|
|
IF ( buoyancyRelation.EQ.'ATMOSPHERIC' ) THEN |
432 |
|
|
usingPCoords = .TRUE. |
433 |
|
|
fluidIsAir = .TRUE. |
434 |
|
|
ELSEIF ( buoyancyRelation.EQ.'OCEANICP') THEN |
435 |
|
|
usingPCoords = .TRUE. |
436 |
|
|
fluidIsWater = .TRUE. |
437 |
|
|
ELSEIF ( buoyancyRelation.EQ.'OCEANIC' ) THEN |
438 |
|
|
usingZCoords = .TRUE. |
439 |
|
|
fluidIsWater = .TRUE. |
440 |
|
|
ELSE |
441 |
|
|
WRITE(msgBuf,'(2A)') 'S/R INI_PARMS:', |
442 |
|
|
& ' Bad value of buoyancyRelation ' |
443 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
444 |
jmc |
1.133 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
445 |
|
|
ENDIF |
446 |
|
|
|
447 |
jmc |
1.161 |
IF ( .NOT.rigidLid .AND. |
448 |
|
|
& .NOT.implicitFreeSurface ) THEN |
449 |
|
|
C- No barotropic solver selected => use implicitFreeSurface as default |
450 |
|
|
WRITE(msgBuf,'(A)') |
451 |
jmc |
1.162 |
& 'S/R INI_PARMS: No request for barotropic solver' |
452 |
jmc |
1.161 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
453 |
jmc |
1.188 |
& SQUEEZE_RIGHT, myThid ) |
454 |
jmc |
1.161 |
WRITE(msgBuf,'(A)') |
455 |
|
|
& 'S/R INI_PARMS: => Use implicitFreeSurface as default' |
456 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
457 |
jmc |
1.188 |
& SQUEEZE_RIGHT, myThid ) |
458 |
jmc |
1.161 |
implicitFreeSurface = .TRUE. |
459 |
|
|
ENDIF |
460 |
cnh |
1.28 |
IF ( implicitFreeSurface ) freeSurfFac = 1.D0 |
461 |
|
|
IF ( rigidLid ) freeSurfFac = 0.D0 |
462 |
adcroft |
1.39 |
IF ( gBaro .EQ. UNSET_RL ) gBaro=gravity |
463 |
|
|
IF ( rhoConst .EQ. UNSET_RL ) rhoConst=rhoNil |
464 |
jmc |
1.102 |
IF ( rhoConstFresh .EQ. UNSET_RL ) rhoConstFresh=rhoConst |
465 |
jmc |
1.93 |
IF ( omega .EQ. UNSET_RL ) THEN |
466 |
jmc |
1.94 |
omega = 0. _d 0 |
467 |
jmc |
1.188 |
IF ( rotationPeriod .NE. 0. _d 0 ) |
468 |
jmc |
1.94 |
& omega = 2.D0 * PI / rotationPeriod |
469 |
|
|
ELSEIF ( omega .EQ. 0. _d 0 ) THEN |
470 |
|
|
rotationPeriod = 0. _d 0 |
471 |
jmc |
1.93 |
ELSE |
472 |
|
|
rotationPeriod = 2.D0 * PI / omega |
473 |
|
|
ENDIF |
474 |
jmc |
1.89 |
IF (atm_Rd .EQ. UNSET_RL) THEN |
475 |
|
|
atm_Rd = atm_Cp * atm_kappa |
476 |
|
|
ELSE |
477 |
|
|
atm_kappa = atm_Rd / atm_Cp |
478 |
|
|
ENDIF |
479 |
adcroft |
1.88 |
C-- Non-hydrostatic/quasi-hydrostatic |
480 |
|
|
IF (nonHydrostatic.AND.quasiHydrostatic) THEN |
481 |
|
|
WRITE(msgBuf,'(A)') |
482 |
|
|
& 'Illegal: both nonHydrostatic = quasiHydrostatic = TRUE' |
483 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
484 |
adcroft |
1.88 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
485 |
cnh |
1.14 |
ENDIF |
486 |
jmc |
1.181 |
C-- Advection and Forcing for Temp and salt |
487 |
jmc |
1.115 |
IF (tempVertAdvScheme.EQ.0) tempVertAdvScheme = tempAdvScheme |
488 |
|
|
IF (saltVertAdvScheme.EQ.0) saltVertAdvScheme = saltAdvScheme |
489 |
mlosch |
1.126 |
C-- horizontal viscosity for vertical moments |
490 |
|
|
IF ( viscAhW .EQ. UNSET_RL ) viscAhW = viscAh |
491 |
mlosch |
1.140 |
IF ( viscA4W .EQ. UNSET_RL ) viscA4W = viscA4 |
492 |
jmc |
1.134 |
C-- horizontal viscosity (acting on Divergence or Vorticity) |
493 |
|
|
IF ( viscAhD .EQ. UNSET_RL ) viscAhD = viscAh |
494 |
|
|
IF ( viscAhZ .EQ. UNSET_RL ) viscAhZ = viscAh |
495 |
|
|
IF ( viscA4D .EQ. UNSET_RL ) viscA4D = viscA4 |
496 |
|
|
IF ( viscA4Z .EQ. UNSET_RL ) viscA4Z = viscA4 |
497 |
cnh |
1.28 |
C-- z,p,r coord input switching. |
498 |
|
|
IF ( viscAz .NE. UNSET_RL ) zCoordInputData = .TRUE. |
499 |
|
|
IF ( viscAp .NE. UNSET_RL ) pCoordInputData = .TRUE. |
500 |
|
|
IF ( viscAr .NE. UNSET_RL ) rCoordInputData = .TRUE. |
501 |
|
|
IF ( viscAr .EQ. UNSET_RL ) viscAr = viscAz |
502 |
|
|
IF ( viscAr .EQ. UNSET_RL ) viscAr = viscAp |
503 |
|
|
IF ( viscAr .EQ. UNSET_RL ) viscAr = viscArDefault |
504 |
|
|
|
505 |
|
|
IF ( diffKzT .NE. UNSET_RL ) zCoordInputData = .TRUE. |
506 |
|
|
IF ( diffKpT .NE. UNSET_RL ) pCoordInputData = .TRUE. |
507 |
|
|
IF ( diffKrT .NE. UNSET_RL ) rCoordInputData = .TRUE. |
508 |
|
|
IF ( diffKrT .EQ. UNSET_RL ) diffKrT = diffKzT |
509 |
|
|
IF ( diffKrT .EQ. UNSET_RL ) diffKrT = diffKpT |
510 |
|
|
IF ( diffKrT .EQ. UNSET_RL ) diffKrT = diffKrTDefault |
511 |
jmc |
1.131 |
diffKrSet = .TRUE. |
512 |
|
|
DO k=1,Nr |
513 |
|
|
IF ( diffKrNrT(k).EQ. UNSET_RL ) diffKrSet = .FALSE. |
514 |
|
|
ENDDO |
515 |
|
|
IF ( .NOT.diffKrSet ) THEN |
516 |
|
|
DO k=1,Nr |
517 |
|
|
diffKrNrT(k) = diffKrT |
518 |
|
|
ENDDO |
519 |
|
|
ELSEIF ( diffKrT.NE.diffKrTDefault ) THEN |
520 |
|
|
WRITE(msgBuf,'(2A)') 'S/R INI_PARMS: Cannot set both ', |
521 |
|
|
& 'diffKrNrT and diffKrT (or Kp,Kz) in input file data' |
522 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
523 |
jmc |
1.131 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
524 |
|
|
ENDIF |
525 |
cnh |
1.28 |
|
526 |
|
|
IF ( diffKzS .NE. UNSET_RL ) zCoordInputData = .TRUE. |
527 |
|
|
IF ( diffKpS .NE. UNSET_RL ) pCoordInputData = .TRUE. |
528 |
|
|
IF ( diffKrS .NE. UNSET_RL ) rCoordInputData = .TRUE. |
529 |
|
|
IF ( diffKrS .EQ. UNSET_RL ) diffKrS = diffKzS |
530 |
|
|
IF ( diffKrS .EQ. UNSET_RL ) diffKrS = diffKpS |
531 |
|
|
IF ( diffKrS .EQ. UNSET_RL ) diffKrS = diffKrSDefault |
532 |
jmc |
1.131 |
diffKrSet = .TRUE. |
533 |
|
|
DO k=1,Nr |
534 |
|
|
IF ( diffKrNrS(k).EQ. UNSET_RL ) diffKrSet = .FALSE. |
535 |
|
|
ENDDO |
536 |
|
|
IF ( .NOT.diffKrSet ) THEN |
537 |
|
|
DO k=1,Nr |
538 |
|
|
diffKrNrS(k) = diffKrS |
539 |
|
|
ENDDO |
540 |
|
|
ELSEIF ( diffKrS.NE.diffKrSDefault ) THEN |
541 |
|
|
WRITE(msgBuf,'(2A)') 'S/R INI_PARMS: Cannot set both ', |
542 |
|
|
& 'diffKrNrS and diffKrS (or Kp,Kz) in input file data' |
543 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
544 |
jmc |
1.131 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
545 |
|
|
ENDIF |
546 |
cnh |
1.28 |
|
547 |
dimitri |
1.195 |
IF (diffKrBLEQsurf .EQ. UNSET_RL) diffKrBLEQsurf = diffKrBL79surf |
548 |
|
|
IF (diffKrBLEQdeep .EQ. UNSET_RL) diffKrBLEQdeep = diffKrBL79deep |
549 |
|
|
IF (diffKrBLEQscl .EQ. UNSET_RL) diffKrBLEQscl = diffKrBL79scl |
550 |
|
|
IF (diffKrBLEQHo .EQ. UNSET_RL) diffKrBLEQHo = diffKrBL79Ho |
551 |
|
|
|
552 |
cnh |
1.28 |
IF ( hFacMinDz .NE. UNSET_RL ) zCoordInputData = .TRUE. |
553 |
|
|
IF ( hFacMinDp .NE. UNSET_RL ) pCoordInputData = .TRUE. |
554 |
|
|
IF ( hFacMinDr .NE. UNSET_RL ) rCoordInputData = .TRUE. |
555 |
adcroft |
1.50 |
IF ( hFacMinDr .EQ. UNSET_RL ) hFacMinDr = hFacMinDz |
556 |
|
|
IF ( hFacMinDr .EQ. UNSET_RL ) hFacMinDr = hFacMinDp |
557 |
cnh |
1.28 |
IF ( hFacMinDr .EQ. UNSET_RL ) hFacMinDr = hFacMinDrDefault |
558 |
cnh |
1.8 |
|
559 |
jmc |
1.76 |
IF (convertFW2Salt.EQ.UNSET_RL) THEN |
560 |
|
|
convertFW2Salt = 35. |
561 |
|
|
IF (useRealFreshWaterFlux) convertFW2Salt=-1 |
562 |
jmc |
1.216 |
IF ( selectAddFluid.GE.1 ) convertFW2Salt=-1 |
563 |
jmc |
1.76 |
ENDIF |
564 |
|
|
|
565 |
jmc |
1.207 |
IF ( SadournyCoriolis ) THEN |
566 |
|
|
C-- for backward compatibility : |
567 |
|
|
IF ( selectVortScheme.EQ.UNSET_I ) selectVortScheme = 2 |
568 |
|
|
IF ( selectVortScheme.NE.2 ) THEN |
569 |
jmc |
1.209 |
WRITE(msgBuf,'(A,I5,A)') |
570 |
|
|
& 'S/R INI_PARMS: selectVortScheme=', selectVortScheme, |
571 |
|
|
& ' conflicts with "SadournyCoriolis"' |
572 |
jmc |
1.207 |
CALL PRINT_ERROR( msgBuf, myThid ) |
573 |
|
|
STOP 'ABNORMAL END: S/R INI_PARMS' |
574 |
|
|
ENDIF |
575 |
|
|
ENDIF |
576 |
|
|
|
577 |
adcroft |
1.46 |
IF ( ivdc_kappa .NE. 0. .AND. .NOT. implicitDiffusion ) THEN |
578 |
jmc |
1.79 |
WRITE(msgBuf,'(A,A)') |
579 |
adcroft |
1.46 |
& 'S/R INI_PARMS: To use ivdc_kappa you must enable implicit', |
580 |
|
|
& ' vertical diffusion.' |
581 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
582 |
jmc |
1.55 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
583 |
|
|
ENDIF |
584 |
|
|
|
585 |
cnh |
1.28 |
coordsSet = 0 |
586 |
|
|
IF ( zCoordInputData ) coordsSet = coordsSet + 1 |
587 |
|
|
IF ( pCoordInputData ) coordsSet = coordsSet + 1 |
588 |
|
|
IF ( rCoordInputData ) coordsSet = coordsSet + 1 |
589 |
|
|
IF ( coordsSet .GT. 1 ) THEN |
590 |
|
|
WRITE(msgBuf,'(A)') |
591 |
|
|
& 'S/R INI_PARMS: Cannot mix z, p and r in the input data.' |
592 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
593 |
cnh |
1.8 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
594 |
|
|
ENDIF |
595 |
cnh |
1.28 |
IF ( rhoConst .LE. 0. ) THEN |
596 |
|
|
WRITE(msgBuf,'(A)') |
597 |
|
|
& 'S/R INI_PARMS: rhoConst must be greater than 0.' |
598 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
599 |
cnh |
1.28 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
600 |
|
|
ELSE |
601 |
|
|
recip_rhoConst = 1.D0 / rhoConst |
602 |
adcroft |
1.38 |
ENDIF |
603 |
|
|
IF ( rhoNil .LE. 0. ) THEN |
604 |
|
|
WRITE(msgBuf,'(A)') |
605 |
|
|
& 'S/R INI_PARMS: rhoNil must be greater than 0.' |
606 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
607 |
adcroft |
1.38 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
608 |
|
|
ELSE |
609 |
|
|
recip_rhoNil = 1.D0 / rhoNil |
610 |
cnh |
1.33 |
ENDIF |
611 |
adcroft |
1.39 |
IF ( HeatCapacity_Cp .LE. 0. ) THEN |
612 |
|
|
WRITE(msgBuf,'(A)') |
613 |
|
|
& 'S/R INI_PARMS: HeatCapacity_Cp must be greater than 0.' |
614 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
615 |
adcroft |
1.39 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
616 |
|
|
ELSE |
617 |
|
|
recip_Cp = 1.D0 / HeatCapacity_Cp |
618 |
|
|
ENDIF |
619 |
cnh |
1.33 |
IF ( gravity .LE. 0. ) THEN |
620 |
|
|
WRITE(msgBuf,'(A)') |
621 |
|
|
& 'S/R INI_PARMS: gravity must be greater than 0.' |
622 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
623 |
cnh |
1.33 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
624 |
|
|
ELSE |
625 |
|
|
recip_gravity = 1.D0 / gravity |
626 |
cnh |
1.28 |
ENDIF |
627 |
adcroft |
1.109 |
C This flags are now passed to RW and MDSIO packages in ini_model_io.F |
628 |
adcroft |
1.42 |
C Set globalFiles flag for READ_WRITE_FLD package |
629 |
adcroft |
1.109 |
c CALL SET_WRITE_GLOBAL_FLD( globalFiles ) |
630 |
adcroft |
1.42 |
C Set globalFiles flag for READ_WRITE_REC package |
631 |
adcroft |
1.109 |
c CALL SET_WRITE_GLOBAL_REC( globalFiles ) |
632 |
adcroft |
1.42 |
C Set globalFiles flag for READ_WRITE_REC package |
633 |
adcroft |
1.109 |
c CALL SET_WRITE_GLOBAL_PICKUP( globalFiles ) |
634 |
cnh |
1.1 |
|
635 |
cnh |
1.75 |
C Check for retired parameters still being used |
636 |
|
|
nRetired = 0 |
637 |
|
|
IF ( zonal_filt_lat .NE. UNSET_RL ) THEN |
638 |
|
|
nRetired = nRetired+1 |
639 |
|
|
WRITE(msgBuf,'(A,A)') |
640 |
|
|
& 'S/R INI_PARMS: Paramater "zonal_filt_lat" is', |
641 |
|
|
& ' no longer allowed in file "data".' |
642 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
643 |
cnh |
1.75 |
WRITE(msgBuf,'(A,A)') |
644 |
|
|
& 'S/R INI_PARMS: Paramater "zonal_filt_lat" is', |
645 |
|
|
& ' now read from file "data.zonfilt".' |
646 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
647 |
cnh |
1.75 |
ENDIF |
648 |
jmc |
1.99 |
IF ( gravitySign .NE. UNSET_RL ) THEN |
649 |
|
|
nRetired = nRetired+1 |
650 |
|
|
WRITE(msgBuf,'(A,A)') |
651 |
|
|
& 'S/R INI_PARMS: "gravitySign" is set according to vertical ', |
652 |
|
|
& ' coordinate and is no longer allowed in file "data".' |
653 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
654 |
jmc |
1.99 |
ENDIF |
655 |
jmc |
1.136 |
IF ( tracerAdvScheme .NE. UNSET_I ) THEN |
656 |
|
|
nRetired = nRetired+1 |
657 |
|
|
WRITE(msgBuf,'(A,A)') 'S/R INI_PARMS: "tracerAdvScheme" ', |
658 |
|
|
& '(old passive tracer code) is no longer allowed in file "data"' |
659 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
660 |
jmc |
1.136 |
ENDIF |
661 |
|
|
IF ( trac_EvPrRn .NE. UNSET_RL ) THEN |
662 |
|
|
nRetired = nRetired+1 |
663 |
|
|
WRITE(msgBuf,'(A,A)') 'S/R INI_PARMS: "trac_EvPrRn" ', |
664 |
|
|
& '(old passive tracer code) is no longer allowed in file "data"' |
665 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
666 |
jmc |
1.136 |
ENDIF |
667 |
|
|
IF ( .NOT. tempDiffusion ) THEN |
668 |
|
|
nRetired = nRetired+1 |
669 |
|
|
WRITE(msgBuf,'(A,A)') 'S/R INI_PARMS: "tempDiffusion" ', |
670 |
|
|
& 'is no longer allowed in file "data"' |
671 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
672 |
jmc |
1.136 |
WRITE(msgBuf,'(A,A)') 'S/R INI_PARMS: to turn off diffusion', |
673 |
|
|
& ' => set diffusivity to zero' |
674 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
675 |
jmc |
1.136 |
ENDIF |
676 |
|
|
IF ( .NOT. saltDiffusion ) THEN |
677 |
|
|
nRetired = nRetired+1 |
678 |
|
|
WRITE(msgBuf,'(A,A)') 'S/R INI_PARMS: "saltDiffusion" ', |
679 |
|
|
& 'is no longer allowed in file "data"' |
680 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
681 |
jmc |
1.136 |
WRITE(msgBuf,'(A,A)') 'S/R INI_PARMS: to turn off diffusion', |
682 |
|
|
& ' => set diffusivity to zero' |
683 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
684 |
jmc |
1.136 |
ENDIF |
685 |
jmc |
1.167 |
IF ( viscAstrain .NE. UNSET_RL ) THEN |
686 |
|
|
nRetired = nRetired+1 |
687 |
|
|
WRITE(msgBuf,'(A,A)') |
688 |
|
|
& 'S/R INI_PARMS: "viscAstrain" ', |
689 |
|
|
& 'is no longer allowed in file "data"' |
690 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
691 |
jmc |
1.167 |
WRITE(msgBuf,'(A,A)') 'S/R INI_PARMS: to use Strain & Tension', |
692 |
|
|
& ' formulation => set useStrainTensionVisc to TRUE' |
693 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
694 |
jmc |
1.167 |
ENDIF |
695 |
|
|
IF ( viscAtension .NE. UNSET_RL ) THEN |
696 |
|
|
nRetired = nRetired+1 |
697 |
|
|
WRITE(msgBuf,'(A,A)') |
698 |
|
|
& 'S/R INI_PARMS: "viscAtension" ', |
699 |
|
|
& 'is no longer allowed in file "data"' |
700 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
701 |
jmc |
1.167 |
WRITE(msgBuf,'(A,A)') 'S/R INI_PARMS: to use Strain & Tension', |
702 |
|
|
& ' formulation => set useStrainTensionVisc to TRUE' |
703 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
704 |
jmc |
1.167 |
ENDIF |
705 |
jmc |
1.191 |
IF ( .NOT.useAnisotropicViscAgridMax ) THEN |
706 |
baylor |
1.169 |
nRetired = nRetired+1 |
707 |
|
|
WRITE(msgBuf,'(A,A)') |
708 |
|
|
& 'S/R INI_PARMS: "useAnisotropicViscAgridMax" ', |
709 |
|
|
& 'is not allowed in "data" substitute useAreaViscLength=true' |
710 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
711 |
baylor |
1.169 |
ENDIF |
712 |
jmc |
1.191 |
IF ( usePickupBeforeC35 ) THEN |
713 |
|
|
nRetired = nRetired+1 |
714 |
|
|
WRITE(msgBuf,'(A,A)') |
715 |
|
|
& 'S/R INI_PARMS: "usePickupBeforeC35" ', |
716 |
|
|
& 'is no longer supported & not longer allowed in file "data"' |
717 |
|
|
CALL PRINT_ERROR( msgBuf, myThid ) |
718 |
|
|
ENDIF |
719 |
cnh |
1.75 |
|
720 |
cnh |
1.1 |
C-- Elliptic solver parameters |
721 |
jmc |
1.124 |
WRITE(msgBuf,'(A)') 'S/R INI_PARMS ; starts to read PARM02' |
722 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
723 |
jmc |
1.188 |
& SQUEEZE_RIGHT, myThid ) |
724 |
adcroft |
1.41 |
READ(UNIT=iUnit,NML=PARM02) !,IOSTAT=errIO) |
725 |
cnh |
1.35 |
IF ( errIO .LT. 0 ) THEN |
726 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') |
727 |
|
|
& 'S/R INI_PARMS' |
728 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
729 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') |
730 |
|
|
& 'Error reading numerical model ' |
731 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
732 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') |
733 |
|
|
& 'parameter file "data".' |
734 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
735 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') |
736 |
|
|
& 'Problem in namelist PARM02' |
737 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
738 |
cnh |
1.1 |
CALL MODELDATA_EXAMPLE( myThid ) |
739 |
|
|
STOP 'ABNORMAL END: S/R INI_PARMS' |
740 |
jmc |
1.72 |
ELSE |
741 |
|
|
WRITE(msgBuf,'(A)') 'S/R INI_PARMS ; read PARM02 : OK' |
742 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
743 |
jmc |
1.188 |
& SQUEEZE_RIGHT, myThid ) |
744 |
jmc |
1.181 |
ENDIF |
745 |
cnh |
1.1 |
|
746 |
|
|
C-- Time stepping parameters |
747 |
cnh |
1.28 |
rCD = -1.D0 |
748 |
jmc |
1.99 |
latBandClimRelax = UNSET_RL |
749 |
jmc |
1.139 |
deltaTtracer = 0. _d 0 |
750 |
jmc |
1.180 |
forcing_In_AB = .TRUE. |
751 |
jmc |
1.124 |
WRITE(msgBuf,'(A)') 'S/R INI_PARMS ; starts to read PARM03' |
752 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
753 |
jmc |
1.188 |
& SQUEEZE_RIGHT, myThid ) |
754 |
adcroft |
1.41 |
READ(UNIT=iUnit,NML=PARM03) !,IOSTAT=errIO) |
755 |
cnh |
1.35 |
IF ( errIO .LT. 0 ) THEN |
756 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') |
757 |
|
|
& 'S/R INI_PARMS' |
758 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
759 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') |
760 |
|
|
& 'Error reading numerical model ' |
761 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
762 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') |
763 |
|
|
& 'parameter file "data"' |
764 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
765 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') |
766 |
|
|
& 'Problem in namelist PARM03' |
767 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
768 |
cnh |
1.1 |
CALL MODELDATA_EXAMPLE( myThid ) |
769 |
|
|
STOP 'ABNORMAL END: S/R INI_PARMS' |
770 |
jmc |
1.72 |
ELSE |
771 |
|
|
WRITE(msgBuf,'(A)') 'S/R INI_PARMS ; read PARM03 : OK' |
772 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
773 |
jmc |
1.188 |
& SQUEEZE_RIGHT, myThid ) |
774 |
jmc |
1.181 |
ENDIF |
775 |
jmc |
1.179 |
C Check for retired parameters still being used |
776 |
|
|
IF ( tauThetaClimRelax3Dim .NE. UNSET_RL ) THEN |
777 |
|
|
nRetired = nRetired+1 |
778 |
|
|
WRITE(msgBuf,'(A,A)') 'S/R INI_PARMS: "tauThetaClimRelax3Dim" ', |
779 |
|
|
& 'is no longer allowed in file "data"' |
780 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
781 |
jmc |
1.179 |
WRITE(msgBuf,'(A,A)') 'S/R INI_PARMS: 3-dim. relaxation code', |
782 |
|
|
& ' has moved to separate pkg/rbcs.' |
783 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
784 |
jmc |
1.179 |
ENDIF |
785 |
|
|
IF ( tauSaltClimRelax3Dim .NE. UNSET_RL ) THEN |
786 |
|
|
nRetired = nRetired+1 |
787 |
|
|
WRITE(msgBuf,'(A,A)') 'S/R INI_PARMS: "tauSaltClimRelax3Dim" ', |
788 |
|
|
& 'is no longer allowed in file "data"' |
789 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
790 |
jmc |
1.179 |
WRITE(msgBuf,'(A,A)') 'S/R INI_PARMS: 3-dim. relaxation code', |
791 |
|
|
& ' has moved to separate pkg/rbcs.' |
792 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
793 |
jmc |
1.179 |
ENDIF |
794 |
jmc |
1.184 |
IF ( calendarDumps ) THEN |
795 |
|
|
nRetired = nRetired+1 |
796 |
|
|
WRITE(msgBuf,'(A,A)') 'S/R INI_PARMS: "calendarDumps" ', |
797 |
|
|
& 'is no longer allowed in file "data"' |
798 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
799 |
jmc |
1.184 |
WRITE(msgBuf,'(A,A)') 'S/R INI_PARMS: calendarDumps', |
800 |
|
|
& ' has moved to "data.cal"' |
801 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
802 |
jmc |
1.184 |
ENDIF |
803 |
jmc |
1.179 |
|
804 |
cnh |
1.4 |
C Process "timestepping" params |
805 |
|
|
C o Time step size |
806 |
jmc |
1.139 |
IF ( deltaTtracer .NE. dTtracerLev(1) .AND. |
807 |
|
|
& deltaTtracer .NE. 0. .AND. dTtracerLev(1) .NE. 0. ) THEN |
808 |
|
|
WRITE(msgBuf,'(A)') |
809 |
|
|
& 'S/R INI_PARMS: deltaTtracer & dTtracerLev(1) not equal' |
810 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
811 |
jmc |
1.139 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
812 |
|
|
ELSEIF ( dTtracerLev(1) .NE. 0. ) THEN |
813 |
|
|
deltaTtracer = dTtracerLev(1) |
814 |
|
|
ENDIF |
815 |
jmc |
1.186 |
IF ( deltaT .EQ. 0. ) deltaT = deltaTClock |
816 |
|
|
IF ( deltaT .EQ. 0. ) deltaT = deltaTtracer |
817 |
cnh |
1.4 |
IF ( deltaT .EQ. 0. ) deltaT = deltaTmom |
818 |
jmc |
1.186 |
IF ( deltaT .EQ. 0. ) deltaT = deltaTfreesurf |
819 |
cnh |
1.4 |
IF ( deltaTmom .EQ. 0. ) deltaTmom = deltaT |
820 |
|
|
IF ( deltaTtracer .EQ. 0. ) deltaTtracer = deltaT |
821 |
cnh |
1.7 |
IF ( deltaTClock .EQ. 0. ) deltaTClock = deltaT |
822 |
jmc |
1.139 |
DO k=1,Nr |
823 |
|
|
IF (dTtracerLev(k).EQ.0.) dTtracerLev(k)= deltaTtracer |
824 |
|
|
ENDDO |
825 |
jmc |
1.186 |
C Note that this line should set deltaFreesurf=deltaTtracer |
826 |
adcroft |
1.80 |
C but this would change a lot of existing set-ups so we are |
827 |
|
|
C obliged to set the default inappropriately. |
828 |
|
|
C Be advised that when using asynchronous time stepping |
829 |
|
|
C it is better to set deltaTreesurf=deltaTtracer |
830 |
|
|
IF ( deltaTfreesurf .EQ. 0. ) deltaTfreesurf = deltaTmom |
831 |
adcroft |
1.19 |
IF ( periodicExternalForcing ) THEN |
832 |
|
|
IF ( externForcingCycle*externForcingPeriod .EQ. 0. ) THEN |
833 |
|
|
WRITE(msgBuf,'(A)') |
834 |
|
|
& 'S/R INI_PARMS: externForcingCycle,externForcingPeriod =0' |
835 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
836 |
adcroft |
1.19 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
837 |
|
|
ENDIF |
838 |
|
|
IF ( INT(externForcingCycle/externForcingPeriod) .NE. |
839 |
|
|
& externForcingCycle/externForcingPeriod ) THEN |
840 |
|
|
WRITE(msgBuf,'(A)') |
841 |
|
|
& 'S/R INI_PARMS: externForcingCycle <> N*externForcingPeriod' |
842 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
843 |
adcroft |
1.19 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
844 |
|
|
ENDIF |
845 |
heimbach |
1.137 |
IF ( externForcingCycle.lt.externForcingPeriod ) THEN |
846 |
adcroft |
1.19 |
WRITE(msgBuf,'(A)') |
847 |
|
|
& 'S/R INI_PARMS: externForcingCycle < externForcingPeriod' |
848 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
849 |
adcroft |
1.19 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
850 |
|
|
ENDIF |
851 |
|
|
IF ( externForcingPeriod.lt.deltaTclock ) THEN |
852 |
|
|
WRITE(msgBuf,'(A)') |
853 |
|
|
& 'S/R INI_PARMS: externForcingPeriod < deltaTclock' |
854 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
855 |
adcroft |
1.19 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
856 |
|
|
ENDIF |
857 |
|
|
ENDIF |
858 |
jmc |
1.180 |
C o Adams-Bashforth time stepping: |
859 |
jmc |
1.188 |
IF ( momForcingOutAB .EQ. UNSET_I ) THEN |
860 |
jmc |
1.180 |
momForcingOutAB = 1 |
861 |
|
|
IF ( forcing_In_AB ) momForcingOutAB = 0 |
862 |
|
|
ENDIF |
863 |
jmc |
1.188 |
IF ( tracForcingOutAB .EQ. UNSET_I ) THEN |
864 |
jmc |
1.180 |
tracForcingOutAB = 1 |
865 |
|
|
IF ( forcing_In_AB ) tracForcingOutAB = 0 |
866 |
|
|
ENDIF |
867 |
cnh |
1.9 |
C o Convection frequency |
868 |
|
|
IF ( cAdjFreq .LT. 0. ) THEN |
869 |
|
|
cAdjFreq = deltaTClock |
870 |
|
|
ENDIF |
871 |
adcroft |
1.46 |
IF ( ivdc_kappa .NE. 0. .AND. cAdjFreq .NE. 0. ) THEN |
872 |
|
|
WRITE(msgBuf,'(A,A)') |
873 |
|
|
& 'S/R INI_PARMS: You have enabled both ivdc_kappa and', |
874 |
|
|
& ' convective adjustment.' |
875 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
876 |
adcroft |
1.46 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
877 |
|
|
ENDIF |
878 |
jmc |
1.95 |
IF (useCDscheme) THEN |
879 |
|
|
C o CD coupling (CD scheme): |
880 |
|
|
IF ( tauCD .EQ. 0.D0 ) tauCD = deltaTmom |
881 |
|
|
IF ( rCD .LT. 0. ) rCD = 1. _d 0 - deltaTMom/tauCD |
882 |
cnh |
1.14 |
ENDIF |
883 |
cnh |
1.18 |
C o Temperature climatology relaxation time scale |
884 |
cnh |
1.28 |
IF ( tauThetaClimRelax .EQ. 0.D0 ) THEN |
885 |
cnh |
1.18 |
doThetaClimRelax = .FALSE. |
886 |
|
|
ELSE |
887 |
|
|
doThetaClimRelax = .TRUE. |
888 |
|
|
ENDIF |
889 |
|
|
C o Salinity climatology relaxation time scale |
890 |
cnh |
1.28 |
IF ( tauSaltClimRelax .EQ. 0.D0 ) THEN |
891 |
cnh |
1.18 |
doSaltClimRelax = .FALSE. |
892 |
|
|
ELSE |
893 |
|
|
doSaltClimRelax = .TRUE. |
894 |
heimbach |
1.64 |
ENDIF |
895 |
adcroft |
1.41 |
|
896 |
jmc |
1.151 |
C o Base time |
897 |
|
|
IF ( nIter0.NE.0 .AND. startTime.NE.0. .AND. baseTime.EQ.0. ) |
898 |
|
|
& baseTime = startTime - deltaTClock*float(nIter0) |
899 |
adcroft |
1.41 |
C o Start time |
900 |
|
|
IF ( nIter0 .NE. 0 .AND. startTime .EQ. 0. ) |
901 |
jmc |
1.151 |
& startTime = baseTime + deltaTClock*float(nIter0) |
902 |
adcroft |
1.41 |
C o nIter0 |
903 |
jmc |
1.151 |
IF ( nIter0 .EQ. 0 .AND. startTime .NE. baseTime ) |
904 |
|
|
& nIter0 = NINT( (startTime-baseTime)/deltaTClock ) |
905 |
adcroft |
1.46 |
|
906 |
|
|
C o nTimeSteps 1 |
907 |
|
|
IF ( nTimeSteps .EQ. 0 .AND. nEndIter .NE. 0 ) |
908 |
|
|
& nTimeSteps = nEndIter-nIter0 |
909 |
|
|
C o nTimeSteps 2 |
910 |
adcroft |
1.41 |
IF ( nTimeSteps .EQ. 0 .AND. endTime .NE. 0. ) |
911 |
jmc |
1.151 |
& nTimeSteps = NINT((endTime-startTime)/deltaTclock) |
912 |
adcroft |
1.46 |
C o nEndIter 1 |
913 |
|
|
IF ( nEndIter .EQ. 0 .AND. nTimeSteps .NE. 0 ) |
914 |
|
|
& nEndIter = nIter0+nTimeSteps |
915 |
|
|
C o nEndIter 2 |
916 |
|
|
IF ( nEndIter .EQ. 0 .AND. endTime .NE. 0. ) |
917 |
jmc |
1.151 |
& nEndIter = NINT((endTime-baseTime)/deltaTclock) |
918 |
adcroft |
1.46 |
C o End Time 1 |
919 |
|
|
IF ( endTime .EQ. 0. .AND. nTimeSteps .NE. 0 ) |
920 |
|
|
& endTime = startTime + deltaTClock*float(nTimeSteps) |
921 |
|
|
C o End Time 2 |
922 |
|
|
IF ( endTime .EQ. 0. .AND. nEndIter .NE. 0 ) |
923 |
jmc |
1.151 |
& endTime = baseTime + deltaTClock*float(nEndIter) |
924 |
adcroft |
1.46 |
|
925 |
adcroft |
1.41 |
C o Consistent? |
926 |
jmc |
1.151 |
IF ( startTime .NE. baseTime+deltaTClock*float(nIter0) ) THEN |
927 |
|
|
WRITE(msgBuf,'(A)') |
928 |
|
|
& 'S/R INI_PARMS: startTime, baseTime and nIter0 are inconsistent' |
929 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
930 |
jmc |
1.151 |
WRITE(msgBuf,'(A)') |
931 |
|
|
& 'S/R INI_PARMS: Perhaps more than two were set at once' |
932 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
933 |
jmc |
1.151 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
934 |
|
|
ENDIF |
935 |
adcroft |
1.46 |
IF ( nEndIter .NE. nIter0+nTimeSteps ) THEN |
936 |
|
|
WRITE(msgBuf,'(A)') |
937 |
|
|
& 'S/R INI_PARMS: nIter0, nTimeSteps and nEndIter are inconsistent' |
938 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
939 |
adcroft |
1.46 |
WRITE(msgBuf,'(A)') |
940 |
|
|
& 'S/R INI_PARMS: Perhaps more than two were set at once' |
941 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
942 |
adcroft |
1.46 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
943 |
|
|
ENDIF |
944 |
jmc |
1.188 |
IF ( nTimeSteps .NE. NINT((endTime-startTime)/deltaTClock) |
945 |
|
|
& ) THEN |
946 |
|
|
WRITE(msgBuf,'(A)') |
947 |
|
|
& 'S/R INI_PARMS: both endTime and nTimeSteps have been set' |
948 |
|
|
CALL PRINT_ERROR( msgBuf, myThid ) |
949 |
|
|
WRITE(msgBuf,'(A)') |
950 |
|
|
& 'S/R INI_PARMS: but are inconsistent' |
951 |
|
|
CALL PRINT_ERROR( msgBuf, myThid ) |
952 |
|
|
STOP 'ABNORMAL END: S/R INI_PARMS' |
953 |
adcroft |
1.60 |
ENDIF |
954 |
|
|
|
955 |
|
|
C o Monitor (should also add CPP flag for monitor?) |
956 |
|
|
IF (monitorFreq.LT.0.) THEN |
957 |
|
|
monitorFreq=0. |
958 |
adcroft |
1.62 |
IF (dumpFreq.NE.0.) monitorFreq=dumpFreq |
959 |
adcroft |
1.67 |
IF (diagFreq.NE.0..AND.diagFreq.LT.monitorFreq) |
960 |
|
|
& monitorFreq=diagFreq |
961 |
adcroft |
1.62 |
IF (taveFreq.NE.0..AND.taveFreq.LT.monitorFreq) |
962 |
|
|
& monitorFreq=taveFreq |
963 |
|
|
IF (chkPtFreq.NE.0..AND.chkPtFreq.LT.monitorFreq) |
964 |
|
|
& monitorFreq=chkPtFreq |
965 |
|
|
IF (pChkPtFreq.NE.0..AND.pChkPtFreq.LT.monitorFreq) |
966 |
|
|
& monitorFreq=pChkPtFreq |
967 |
adcroft |
1.60 |
IF (monitorFreq.EQ.0.) monitorFreq=deltaTclock |
968 |
cnh |
1.4 |
ENDIF |
969 |
jmc |
1.204 |
IF ( monitorSelect.EQ.UNSET_I ) THEN |
970 |
|
|
monitorSelect = 2 |
971 |
|
|
IF ( fluidIsWater ) monitorSelect = 3 |
972 |
|
|
ENDIF |
973 |
adcroft |
1.21 |
|
974 |
cnh |
1.1 |
C-- Grid parameters |
975 |
|
|
C In cartesian coords distances are in metres |
976 |
cnh |
1.26 |
DO K =1,Nr |
977 |
cnh |
1.28 |
delZ(K) = UNSET_RL |
978 |
|
|
delP(K) = UNSET_RL |
979 |
|
|
delR(K) = UNSET_RL |
980 |
cnh |
1.1 |
ENDDO |
981 |
|
|
C In spherical polar distances are in degrees |
982 |
adcroft |
1.39 |
dxSpacing = UNSET_RL |
983 |
|
|
dySpacing = UNSET_RL |
984 |
jmc |
1.124 |
WRITE(msgBuf,'(A)') 'S/R INI_PARMS ; starts to read PARM04' |
985 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
986 |
jmc |
1.188 |
& SQUEEZE_RIGHT, myThid ) |
987 |
mlosch |
1.82 |
READ(UNIT=iUnit,NML=PARM04,IOSTAT=errIO) |
988 |
cnh |
1.35 |
IF ( errIO .LT. 0 ) THEN |
989 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') |
990 |
|
|
& 'S/R INI_PARMS' |
991 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
992 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') |
993 |
|
|
& 'Error reading numerical model ' |
994 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
995 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') |
996 |
|
|
& 'parameter file "data"' |
997 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
998 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') |
999 |
|
|
& 'Problem in namelist PARM04' |
1000 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
1001 |
cnh |
1.1 |
CALL MODELDATA_EXAMPLE( myThid ) |
1002 |
|
|
STOP 'ABNORMAL END: S/R INI_PARMS' |
1003 |
jmc |
1.72 |
ELSE |
1004 |
|
|
WRITE(msgBuf,'(A)') 'S/R INI_PARMS ; read PARM04 : OK' |
1005 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
1006 |
jmc |
1.188 |
& SQUEEZE_RIGHT, myThid ) |
1007 |
jmc |
1.181 |
ENDIF |
1008 |
adcroft |
1.48 |
|
1009 |
jmc |
1.158 |
C Check for retired parameters still being used |
1010 |
|
|
IF ( rkFac .NE. UNSET_RL ) THEN |
1011 |
|
|
nRetired = nRetired+1 |
1012 |
|
|
WRITE(msgBuf,'(A,A)') |
1013 |
|
|
& 'S/R INI_PARMS: "rkFac" has been replaced by -rkSign ', |
1014 |
|
|
& ' and is no longer allowed in file "data".' |
1015 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
1016 |
jmc |
1.158 |
ENDIF |
1017 |
|
|
IF ( groundAtK1 ) THEN |
1018 |
|
|
c nRetired = nRetired+1 |
1019 |
|
|
WRITE(msgBuf,'(A,A)') |
1020 |
|
|
& 'S/R INI_PARMS: "groundAtK1" is set according to vertical ', |
1021 |
|
|
& ' coordinate and is no longer allowed in file "data".' |
1022 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
1023 |
jmc |
1.158 |
ENDIF |
1024 |
|
|
|
1025 |
jmc |
1.162 |
C X coordinate : Check for multiple definitions |
1026 |
|
|
goptCount = 0 |
1027 |
|
|
IF ( delX(1) .NE. UNSET_RL ) goptCount = goptCount + 1 |
1028 |
|
|
IF ( dxSpacing .NE. UNSET_RL ) goptCount = goptCount + 1 |
1029 |
|
|
IF ( delXFile .NE. ' ' ) goptCount = goptCount + 1 |
1030 |
|
|
IF ( goptCount.GT.1 ) THEN |
1031 |
jmc |
1.188 |
WRITE(msgBuf,'(A,A)') 'Too many specifications for delX:', |
1032 |
adcroft |
1.48 |
& 'Specify only one of delX, dxSpacing or delXfile' |
1033 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
1034 |
|
|
STOP 'ABNORMAL END: S/R INI_PARMS' |
1035 |
adcroft |
1.48 |
ENDIF |
1036 |
adcroft |
1.39 |
IF ( dxSpacing .NE. UNSET_RL ) THEN |
1037 |
|
|
DO i=1,Nx |
1038 |
|
|
delX(i) = dxSpacing |
1039 |
|
|
ENDDO |
1040 |
|
|
ENDIF |
1041 |
jmc |
1.162 |
C Y coordinate : Check for multiple definitions |
1042 |
|
|
goptCount = 0 |
1043 |
|
|
IF ( delY(1) .NE. UNSET_RL ) goptCount = goptCount + 1 |
1044 |
|
|
IF ( dySpacing .NE. UNSET_RL ) goptCount = goptCount + 1 |
1045 |
|
|
IF ( delYFile .NE. ' ' ) goptCount = goptCount + 1 |
1046 |
|
|
IF ( goptCount.GT.1 ) THEN |
1047 |
jmc |
1.188 |
WRITE(msgBuf,'(A,A)') 'Too many specifications for delY:', |
1048 |
adcroft |
1.48 |
& 'Specify only one of delY, dySpacing or delYfile' |
1049 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
1050 |
|
|
STOP 'ABNORMAL END: S/R INI_PARMS' |
1051 |
adcroft |
1.48 |
ENDIF |
1052 |
adcroft |
1.39 |
IF ( dySpacing .NE. UNSET_RL ) THEN |
1053 |
jmc |
1.162 |
DO j=1,Ny |
1054 |
|
|
delY(j) = dySpacing |
1055 |
adcroft |
1.39 |
ENDDO |
1056 |
|
|
ENDIF |
1057 |
adcroft |
1.48 |
C |
1058 |
jmc |
1.188 |
IF ( rSphere .NE. 0. ) THEN |
1059 |
|
|
recip_rSphere = 1. _d 0/rSphere |
1060 |
cnh |
1.14 |
ELSE |
1061 |
cnh |
1.26 |
recip_rSphere = 0. |
1062 |
adcroft |
1.11 |
ENDIF |
1063 |
cnh |
1.28 |
C-- Check for conflicting grid definitions. |
1064 |
cnh |
1.1 |
goptCount = 0 |
1065 |
|
|
IF ( usingCartesianGrid ) goptCount = goptCount+1 |
1066 |
|
|
IF ( usingSphericalPolarGrid ) goptCount = goptCount+1 |
1067 |
adcroft |
1.59 |
IF ( usingCurvilinearGrid ) goptCount = goptCount+1 |
1068 |
afe |
1.114 |
IF ( usingCylindricalGrid ) goptCount = goptCount+1 |
1069 |
adcroft |
1.59 |
IF ( goptCount .GT. 1 ) THEN |
1070 |
cnh |
1.1 |
WRITE(msgBuf,'(A)') |
1071 |
|
|
& 'S/R INI_PARMS: More than one coordinate system requested' |
1072 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
1073 |
cnh |
1.1 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
1074 |
cnh |
1.14 |
ENDIF |
1075 |
adcroft |
1.59 |
IF ( goptCount .LT. 1 ) THEN |
1076 |
jmc |
1.103 |
C- No horizontal grid is specified => use Cartesian grid as default: |
1077 |
adcroft |
1.59 |
WRITE(msgBuf,'(A)') |
1078 |
jmc |
1.103 |
& 'S/R INI_PARMS: No horizontal grid requested' |
1079 |
|
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
1080 |
jmc |
1.188 |
& SQUEEZE_RIGHT, myThid ) |
1081 |
jmc |
1.103 |
WRITE(msgBuf,'(A)') |
1082 |
|
|
& 'S/R INI_PARMS: => Use Cartesian Grid as default' |
1083 |
|
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
1084 |
jmc |
1.188 |
& SQUEEZE_RIGHT, myThid ) |
1085 |
jmc |
1.103 |
usingCartesianGrid = .TRUE. |
1086 |
adcroft |
1.59 |
ENDIF |
1087 |
jmc |
1.187 |
C-- Make metric term & Coriolis settings consistent with underlying grid. |
1088 |
cnh |
1.14 |
IF ( usingCartesianGrid ) THEN |
1089 |
jmc |
1.187 |
metricTerms = .FALSE. |
1090 |
|
|
useNHMTerms = .FALSE. |
1091 |
cnh |
1.18 |
useBetaPlaneF = .TRUE. |
1092 |
cnh |
1.14 |
ENDIF |
1093 |
jmc |
1.187 |
IF ( usingCylindricalGrid ) THEN |
1094 |
|
|
useNHMTerms = .FALSE. |
1095 |
afe |
1.114 |
useBetaPlaneF = .TRUE. |
1096 |
|
|
WRITE(msgBuf,'(A)') 'S/R INI_PARMS ; Cylinder OK' |
1097 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
1098 |
jmc |
1.188 |
& SQUEEZE_RIGHT, myThid ) |
1099 |
afe |
1.114 |
ENDIF |
1100 |
adcroft |
1.59 |
IF ( usingCurvilinearGrid ) THEN |
1101 |
jmc |
1.187 |
metricTerms = .FALSE. |
1102 |
cnh |
1.1 |
ENDIF |
1103 |
jmc |
1.187 |
IF ( useConstantF ) useBetaPlaneF = .FALSE. |
1104 |
|
|
IF ( useConstantF ) useSphereF = .FALSE. |
1105 |
|
|
IF ( useBetaPlaneF ) useSphereF = .FALSE. |
1106 |
|
|
IF ( usingCartesianGrid .OR. usingCylindricalGrid |
1107 |
|
|
& .OR. .NOT.(nonHydrostatic.OR.quasiHydrostatic) ) |
1108 |
|
|
& use3dCoriolis = .FALSE. |
1109 |
jmc |
1.183 |
|
1110 |
mlosch |
1.205 |
C-- Grid rotation |
1111 |
|
|
IF ( phiEuler .NE. 0. _d 0 .OR. thetaEuler .NE. 0. _d 0 |
1112 |
|
|
& .OR. psiEuler .NE. 0. _d 0 ) rotateGrid = .TRUE. |
1113 |
|
|
|
1114 |
jmc |
1.99 |
C-- Set default for latitude-band where relaxation to climatology applies |
1115 |
jmc |
1.162 |
C note: done later (once domain size is known) if using CartesianGrid |
1116 |
jmc |
1.99 |
IF ( latBandClimRelax .EQ. UNSET_RL) THEN |
1117 |
|
|
IF ( usingSphericalPolarGrid ) latBandClimRelax= 180. _d 0 |
1118 |
|
|
IF ( usingCurvilinearGrid ) latBandClimRelax= 180. _d 0 |
1119 |
|
|
ENDIF |
1120 |
jmc |
1.78 |
C-- set cell Center depth and put Interface at the middle between 2 C |
1121 |
|
|
setCenterDr = .FALSE. |
1122 |
|
|
DO K=1,Nr+1 |
1123 |
jmc |
1.188 |
IF ( delRc(K).EQ.UNSET_RL ) THEN |
1124 |
|
|
IF ( setCenterDr ) THEN |
1125 |
|
|
WRITE(msgBuf,'(A,I4)') |
1126 |
|
|
& 'S/R INI_PARMS: No value for delRc at K =', K |
1127 |
|
|
CALL PRINT_ERROR( msgBuf, myThid ) |
1128 |
|
|
STOP 'ABNORMAL END: S/R INI_PARMS' |
1129 |
|
|
ENDIF |
1130 |
|
|
ELSE |
1131 |
|
|
IF ( k.EQ.1 ) setCenterDr = .TRUE. |
1132 |
|
|
IF ( .NOT.setCenterDr ) THEN |
1133 |
|
|
WRITE(msgBuf,'(A,I4)') |
1134 |
|
|
& 'S/R INI_PARMS: No value for delRc at K <', K |
1135 |
|
|
CALL PRINT_ERROR( msgBuf, myThid ) |
1136 |
|
|
STOP 'ABNORMAL END: S/R INI_PARMS' |
1137 |
|
|
ENDIF |
1138 |
|
|
ENDIF |
1139 |
jmc |
1.78 |
ENDDO |
1140 |
jmc |
1.188 |
IF ( setCenterDr ) rCoordInputData = .TRUE. |
1141 |
cnh |
1.28 |
C-- p, z, r coord parameters |
1142 |
jmc |
1.188 |
setInterFDr = .FALSE. |
1143 |
cnh |
1.28 |
DO K = 1, Nr |
1144 |
|
|
IF ( delZ(K) .NE. UNSET_RL ) zCoordInputData = .TRUE. |
1145 |
|
|
IF ( delP(K) .NE. UNSET_RL ) pCoordInputData = .TRUE. |
1146 |
|
|
IF ( delR(K) .NE. UNSET_RL ) rCoordInputData = .TRUE. |
1147 |
|
|
IF ( delR(K) .EQ. UNSET_RL ) delR(K) = delZ(K) |
1148 |
|
|
IF ( delR(K) .EQ. UNSET_RL ) delR(K) = delP(K) |
1149 |
jmc |
1.188 |
IF ( delR(K) .EQ. UNSET_RL ) THEN |
1150 |
|
|
IF ( setInterFDr ) THEN |
1151 |
adcroft |
1.41 |
WRITE(msgBuf,'(A,I4)') |
1152 |
jmc |
1.188 |
& 'S/R INI_PARMS: No value for delZ/delP/delR at K =', K |
1153 |
|
|
CALL PRINT_ERROR( msgBuf, myThid ) |
1154 |
jmc |
1.78 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
1155 |
jmc |
1.188 |
ENDIF |
1156 |
|
|
ELSE |
1157 |
|
|
IF ( k.EQ.1 ) setInterFDr = .TRUE. |
1158 |
|
|
IF ( .NOT.setInterFDr ) THEN |
1159 |
|
|
WRITE(msgBuf,'(A,I4)') |
1160 |
|
|
& 'S/R INI_PARMS: No value for delZ/delP/delR at K <', K |
1161 |
|
|
CALL PRINT_ERROR( msgBuf, myThid ) |
1162 |
adcroft |
1.41 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
1163 |
jmc |
1.188 |
ENDIF |
1164 |
adcroft |
1.41 |
ENDIF |
1165 |
cnh |
1.28 |
ENDDO |
1166 |
|
|
C Check for multiple coordinate systems |
1167 |
jmc |
1.188 |
coordsSet = 0 |
1168 |
cnh |
1.28 |
IF ( zCoordInputData ) coordsSet = coordsSet + 1 |
1169 |
|
|
IF ( pCoordInputData ) coordsSet = coordsSet + 1 |
1170 |
|
|
IF ( rCoordInputData ) coordsSet = coordsSet + 1 |
1171 |
|
|
IF ( coordsSet .GT. 1 ) THEN |
1172 |
|
|
WRITE(msgBuf,'(A)') |
1173 |
|
|
& 'S/R INI_PARMS: Cannot mix z, p and r in the input data.' |
1174 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
1175 |
cnh |
1.28 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
1176 |
|
|
ENDIF |
1177 |
jmc |
1.188 |
C- Check for double definition (file & namelist) |
1178 |
|
|
IF ( delRcFile.NE.' ' ) THEN |
1179 |
|
|
IF ( setCenterDr ) THEN |
1180 |
|
|
WRITE(msgBuf,'(A)') |
1181 |
|
|
& 'S/R INI_PARMS: Cannot set both delRc and delRcFile' |
1182 |
|
|
CALL PRINT_ERROR( msgBuf, myThid ) |
1183 |
|
|
STOP 'ABNORMAL END: S/R INI_PARMS' |
1184 |
|
|
ENDIF |
1185 |
|
|
setCenterDr = .TRUE. |
1186 |
|
|
ENDIF |
1187 |
|
|
IF ( delRFile.NE.' ' ) THEN |
1188 |
|
|
IF ( setInterFDr ) THEN |
1189 |
|
|
WRITE(msgBuf,'(A)') |
1190 |
|
|
& 'S/R INI_PARMS: Cannot set both delR and delRFile' |
1191 |
|
|
CALL PRINT_ERROR( msgBuf, myThid ) |
1192 |
|
|
STOP 'ABNORMAL END: S/R INI_PARMS' |
1193 |
|
|
ENDIF |
1194 |
|
|
setInterFDr = .TRUE. |
1195 |
|
|
ENDIF |
1196 |
|
|
c IF ( setInterFDr .AND. setCenterDr ) THEN |
1197 |
|
|
c WRITE(msgBuf,'(2A)') 'S/R INI_PARMS:', |
1198 |
|
|
c & ' Cannot specify both delRc and delZ/delP/delR' |
1199 |
|
|
c CALL PRINT_ERROR( msgBuf, myThid ) |
1200 |
|
|
c STOP 'ABNORMAL END: S/R INI_PARMS' |
1201 |
|
|
c ENDIF |
1202 |
jmc |
1.92 |
|
1203 |
cnh |
1.15 |
C-- Input files |
1204 |
jmc |
1.124 |
WRITE(msgBuf,'(A)') 'S/R INI_PARMS ; starts to read PARM05' |
1205 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
1206 |
jmc |
1.188 |
& SQUEEZE_RIGHT, myThid ) |
1207 |
adcroft |
1.41 |
READ(UNIT=iUnit,NML=PARM05) !,IOSTAT=errIO) |
1208 |
jmc |
1.181 |
IF ( errIO .LT. 0 ) THEN |
1209 |
cnh |
1.15 |
WRITE(msgBuf,'(A)') |
1210 |
|
|
& 'Error reading numerical model ' |
1211 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
1212 |
cnh |
1.15 |
WRITE(msgBuf,'(A)') |
1213 |
|
|
& 'parameter file "data"' |
1214 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
1215 |
cnh |
1.15 |
WRITE(msgBuf,'(A)') |
1216 |
|
|
& 'Problem in namelist PARM05' |
1217 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
1218 |
cnh |
1.15 |
CALL MODELDATA_EXAMPLE( myThid ) |
1219 |
|
|
STOP 'ABNORMAL END: S/R INI_PARMS' |
1220 |
jmc |
1.72 |
ELSE |
1221 |
|
|
WRITE(msgBuf,'(A)') 'S/R INI_PARMS ; read PARM05 : OK' |
1222 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
1223 |
jmc |
1.188 |
& SQUEEZE_RIGHT, myThid ) |
1224 |
jmc |
1.181 |
ENDIF |
1225 |
mlosch |
1.217 |
C Check for retired parameters still being used |
1226 |
|
|
IF ( shelfIceFile .NE. ' ' ) THEN |
1227 |
|
|
nRetired = nRetired+1 |
1228 |
|
|
WRITE(msgBuf,'(A,A)') |
1229 |
|
|
& 'S/R INI_PARMS: "shelfIceFile" is not allowed in "data", ', |
1230 |
|
|
& 'substitute "SHELFICEtopoFile" in data.shelfice' |
1231 |
|
|
CALL PRINT_ERROR( msgBuf, myThid ) |
1232 |
|
|
ENDIF |
1233 |
cnh |
1.25 |
|
1234 |
jmc |
1.198 |
C-- Set Units conversion factor required to incorporate |
1235 |
|
|
C surface forcing into z-p isomorphic equations: |
1236 |
|
|
C mass2rUnit: from mass per unit area [kg/m2] to r-coordinate (z:=1/rho;p:=g) |
1237 |
|
|
C rUnit2mass: from r-coordinate to mass per unit area [kg/m2] (z:=rho;p:=1/g) |
1238 |
jmc |
1.133 |
IF ( usingPCoords ) THEN |
1239 |
jmc |
1.198 |
mass2rUnit = gravity |
1240 |
|
|
rUnit2mass = recip_gravity |
1241 |
|
|
ELSE |
1242 |
|
|
mass2rUnit = recip_rhoConst |
1243 |
|
|
rUnit2mass = rhoConst |
1244 |
jmc |
1.85 |
ENDIF |
1245 |
adcroft |
1.37 |
|
1246 |
heimbach |
1.97 |
c-- gradually replacing debugMode by debugLevel |
1247 |
jmc |
1.142 |
IF ( debugMode ) debugLevel = debLevB |
1248 |
dimitri |
1.201 |
IF ( debugLevel .GE. debLevB ) debugMode = .TRUE. |
1249 |
jmc |
1.142 |
|
1250 |
heimbach |
1.146 |
c-- flag for approximate adjoint |
1251 |
|
|
IF ( inAdExact ) THEN |
1252 |
|
|
inAdTrue = .FALSE. |
1253 |
|
|
inAdFALSE = .FALSE. |
1254 |
|
|
ELSE |
1255 |
|
|
inAdTrue = .TRUE. |
1256 |
|
|
inAdFALSE = .FALSE. |
1257 |
|
|
ENDIF |
1258 |
|
|
C |
1259 |
cnh |
1.25 |
CLOSE(iUnit) |
1260 |
cnh |
1.75 |
|
1261 |
|
|
C-- Check whether any retired parameters were found. |
1262 |
|
|
C-- Stop if they were |
1263 |
jmc |
1.179 |
IF ( nRetired .GT. 0 ) THEN |
1264 |
cnh |
1.75 |
WRITE(msgBuf,'(A)') |
1265 |
jmc |
1.167 |
& 'Error reading parameter file "data"' |
1266 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
1267 |
cnh |
1.75 |
WRITE(msgBuf,'(A)') |
1268 |
|
|
& 'some out of date parameters were found in the namelist' |
1269 |
jmc |
1.188 |
CALL PRINT_ERROR( msgBuf, myThid ) |
1270 |
cnh |
1.75 |
STOP 'ABNORMAL END: S/R INI_PARMS' |
1271 |
|
|
ENDIF |
1272 |
cnh |
1.1 |
|
1273 |
|
|
_END_MASTER(myThid) |
1274 |
|
|
|
1275 |
|
|
C-- Everyone else must wait for the parameters to be loaded |
1276 |
|
|
_BARRIER |
1277 |
|
|
C |
1278 |
|
|
RETURN |
1279 |
|
|
END |