/[MITgcm]/MITgcm/pkg/seaice/seaice_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/seaice/seaice_readparms.F

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


Revision 1.146 - (show annotations) (download)
Thu May 30 14:07:19 2013 UTC (10 years, 11 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64t, checkpoint64i, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n
Changes since 1.145: +6 -2 lines
add Adams-Bashforth2 time discretization for ice dynamics;
so far only for JFNK-solver
 - requires an additional time level that is stored in the pickup
 - you can start with AB2 from a pickup without this time level with
   pickupStrictlyMatch = .false.

1 C $Header: /u/gcmpack/MITgcm/pkg/seaice/seaice_readparms.F,v 1.145 2013/04/23 08:40:06 mlosch Exp $
2 C $Name: $
3
4 #include "SEAICE_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: SEAICE_READPARMS
8 C !INTERFACE:
9 SUBROUTINE SEAICE_READPARMS( myThid )
10
11 C !DESCRIPTION: \bv
12 C *==========================================================*
13 C | S/R SEAICE_READPARMS
14 C | o Routine to read in file data.seaice
15 C *==========================================================*
16 C \ev
17
18 C !USES:
19 IMPLICIT NONE
20
21 C === Global variables ===
22 #include "SIZE.h"
23 #include "EEPARAMS.h"
24 #include "PARAMS.h"
25 #include "GRID.h"
26 #include "SEAICE_SIZE.h"
27 #include "SEAICE_PARAMS.h"
28 #include "SEAICE_TRACER.h"
29 #ifdef ALLOW_COST
30 # include "SEAICE_COST.h"
31 #endif
32 #ifdef ALLOW_MNC
33 # include "MNC_PARAMS.h"
34 #endif
35 #ifdef ALLOW_EXF
36 # include "EXF_CONSTANTS.h"
37 #endif /* ALLOW_EXF */
38 #ifdef ALLOW_AUTODIFF
39 # include "AUTODIFF_PARAMS.h"
40 #endif
41
42 C !INPUT/OUTPUT PARAMETERS:
43 C === Routine arguments ===
44 C myThid :: my Thread Id. number
45 INTEGER myThid
46 CEOP
47
48 C !LOCAL VARIABLES:
49 C === Local variables ===
50 C msgBuf :: Informational/error message buffer
51 C iUnit :: Work variable for IO unit number
52 CHARACTER*(MAX_LEN_MBUF) msgBuf
53 LOGICAL chkFlag
54 INTEGER iUnit
55 #ifdef ALLOW_SITRACER
56 INTEGER iTracer
57 #endif
58 #ifdef ALLOW_COST
59 INTEGER locDate(4)
60 #endif /* ALLOW_COST */
61 INTEGER nRetired
62
63 C- Old parameters (to be retired one day):
64 _RL SEAICE_availHeatTaper
65 _RL SEAICE_gamma_t, SEAICE_gamma_t_frz, SEAICE_availHeatFracFrz
66
67 C- Retired parameters:
68 C MAX_TICE :: maximum ice temperature (deg C)
69 C LAD :: time stepping used for sea-ice advection:
70 C 1 = LEAPFROG, 2 = BACKWARD EULER.
71 C SEAICE_freeze :: FREEZING TEMP. OF SEA WATER
72 _RL SEAICE_sensHeat, SEAICE_latentWater, SEAICE_latentIce
73 _RL SEAICE_salinity, SIsalFRAC, SIsal0
74 _RL SEAICE_lhSublim, SEAICE_freeze, MAX_HEFF
75 _RL areaMin, areaMax, A22, hiceMin, MAX_TICE
76 LOGICAL SEAICEadvAge
77 INTEGER SEAICEadvSchAge, LAD, SEAICEturbFluxFormula
78 _RL SEAICEdiffKhAge
79 CHARACTER*(MAX_LEN_MBUF) IceAgeFile, IceAgeTrFile(4)
80
81 C-- SEAICE parameters
82 NAMELIST /SEAICE_PARM01/
83 & SEAICEuseDYNAMICS, SEAICEuseFREEDRIFT,
84 & SEAICEuseTEM, SEAICEuseMetricTerms, SEAICEuseTilt,
85 & useHB87stressCoupling, SEAICEuseFlooding,
86 & usePW79thermodynamics, useMaykutSatVapPoly,
87 & SEAICErestoreUnderIce, SEAICE_growMeltByConv,
88 & SEAICE_salinityTracer, SEAICE_ageTracer,
89 & SEAICEadvHeff, SEAICEadvArea, SEAICEadvSnow,
90 & SEAICEadvSalt, SEAICEadvAge,
91 & SEAICE_clipVelocities, SEAICE_maskRHS, SEAICE_no_slip,
92 & SEAICEetaZmethod, LAD, IMAX_TICE, postSolvTempIter,
93 & SEAICEuseFluxForm, SEAICEadvScheme, SEAICEadvSchArea,
94 & SEAICEadvSchHeff, SEAICEadvSchSnow,
95 & SEAICEadvSchSalt, SEAICEadvSchAge,
96 & SEAICEdiffKhHeff, SEAICEdiffKhSnow, SEAICEdiffKhArea,
97 & SEAICEdiffKhSalt, SEAICEdiffKhAge, DIFF1,
98 & SEAICE_deltaTtherm, SEAICE_deltaTdyn,
99 & SEAICE_LSRrelaxU, SEAICE_LSRrelaxV,
100 & SOLV_MAX_ITERS, SOLV_NCHECK, NPSEUDOTIMESTEPS,
101 & LSR_ERROR, LSR_mixIniGuess, SEAICEuseMultiTileSolver,
102 & SEAICE_deltaTevp, SEAICE_elasticParm, SEAICE_evpTauRelax,
103 & SEAICE_evpDampC, SEAICEnEVPstarSteps,
104 & SEAICE_zetaMin, SEAICE_zetaMaxFac,
105 & SEAICEuseJFNK, SEAICEnewtonIterMax, SEAICEkrylovIterMax,
106 & SEAICE_JFNK_lsIter, SEAICE_JFNK_tolIter, JFNKres_t,JFNKres_tFac,
107 & JFNKgamma_nonlin,JFNKgamma_lin_min,JFNKgamma_lin_max,
108 & SEAICE_JFNKepsilon, SEAICE_OLx, SEAICE_OLy,
109 & SEAICE_JFNKphi, SEAICE_JFNKalpha, SEAICEuseIMEX, SEAICEuseAB2,
110 & SEAICE_abEps,
111 & SEAICEpresH0, SEAICEpresPow0, SEAICEpresPow1,
112 & SEAICE_initialHEFF, SEAICEturbFluxFormula,
113 & SEAICE_areaGainFormula, SEAICE_areaLossFormula,
114 & SEAICE_doOpenWaterGrowth, SEAICE_doOpenWaterMelt,
115 & SEAICE_rhoAir, SEAICE_rhoIce, SEAICE_rhoSnow, ICE2WATR,
116 & SEAICE_cpAir,
117 & SEAICE_drag, SEAICE_waterDrag, SEAICE_dryIceAlb,
118 & SEAICE_wetIceAlb, SEAICE_drySnowAlb, SEAICE_wetSnowAlb, HO,
119 & SEAICE_drag_south, SEAICE_waterDrag_south,
120 & SEAICE_dryIceAlb_south, SEAICE_wetIceAlb_south,
121 & SEAICE_drySnowAlb_south, SEAICE_wetSnowAlb_south, HO_south,
122 & SEAICE_wetAlbTemp, SEAICE_waterAlbedo,
123 & SEAICE_strength, SEAICE_eccen,
124 & SEAICE_lhFusion, SEAICE_lhEvap, SEAICE_dalton,
125 & SEAICE_sensHeat, SEAICE_latentWater, SEAICE_latentIce,
126 & SEAICE_salinity, SIsalFRAC, SIsal0,
127 & areaMin, areaMax, A22, hiceMin,
128 & SEAICE_iceConduct, SEAICE_snowConduct,
129 & SEAICE_emissivity, SEAICE_ice_emiss, SEAICE_snow_emiss,
130 & SEAICE_snowThick, SEAICE_shortwave, SEAICE_freeze, OCEAN_drag,
131 & SEAICE_tempFrz0, SEAICE_dTempFrz_dS, SEAICE_salt0,
132 & SEAICE_saltFrac, SEAICEstressFactor, SEAICE_availHeatTaper,
133 & SEAICE_mcPheePiston, SEAICE_frazilFrac, SEAICE_mcPheeTaper,
134 & SEAICE_mcPheeStepFunc, SEAICE_gamma_t, SEAICE_gamma_t_frz,
135 & SEAICE_availHeatFrac, SEAICE_availHeatFracFrz,
136 & AreaFile, HeffFile, uIceFile, vIceFile, HsnowFile, HsaltFile,
137 & SEAICEheatConsFix, SEAICE_multDim, SEAICE_useMultDimSnow,
138 & SEAICE_area_reg, SEAICE_hice_reg,
139 & SEAICE_area_floor, SEAICE_area_max, SEAICE_tauAreaObsRelax,
140 & SEAICE_airTurnAngle, SEAICE_waterTurnAngle,
141 & MAX_HEFF, MIN_ATEMP, MIN_LWDOWN, MAX_TICE, MIN_TICE,
142 & SEAICE_EPS, SEAICE_EPS_SQ,
143 & SEAICEwriteState, SEAICEuseEVPpickup, SEAICEuseEVPstar,
144 & SEAICE_monFreq, SEAICE_dumpFreq, SEAICE_taveFreq,
145 & SEAICE_tave_mnc, SEAICE_dump_mnc, SEAICE_mon_mnc,
146 #ifdef SEAICE_ITD
147 & Hlimit_c1, Hlimit_c2, Hlimit_c3,
148 #endif
149 & SEAICE_debugPointI, SEAICE_debugPointJ
150
151 #ifdef ALLOW_COST
152 NAMELIST /SEAICE_PARM02/
153 & mult_ice_export, mult_ice, cost_ice_flag,
154 & costIceStart1, costIceStart2,
155 & costIceEnd1, costIceEnd2,
156 & cost_ice_flag,
157 & SEAICE_clamp_salt, SEAICE_clamp_theta,
158 & mult_smrsst, smrsstbarfile,
159 & mult_smrsss, smrsssbarfile,
160 & mult_smrarea, smrareabarfile, smrareadatfile,
161 & wsmrarea0, wmean_smrarea, smrarea_errfile,
162 & smrareastartdate1, smrareastartdate2, smrareaperiod
163 #endif
164
165 #ifdef ALLOW_SITRACER
166 NAMELIST /SEAICE_PARM03/
167 & SItrFile, SItrName, SItrNameLong, SItrUnit, SItrMate,
168 & SItrFromOcean0, SItrFromOceanFrac, SItrFromFlood0,
169 & SItrFromFloodFrac, SItrExpand0,
170 & IceAgeTrFile, SItrNumInUse
171 #endif
172
173 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
174
175 _BEGIN_MASTER(myThid)
176
177 C-- set default sea ice parameters
178 #ifdef SEAICE_ALLOW_DYNAMICS
179 SEAICEuseDYNAMICS = .TRUE.
180 #else
181 SEAICEuseDYNAMICS = .FALSE.
182 #endif
183 SEAICEadjMODE = 0
184 SEAICEuseFREEDRIFT = .FALSE.
185 SEAICEuseTilt = .TRUE.
186 SEAICEheatConsFix = .FALSE.
187 SEAICEuseTEM = .FALSE.
188 SEAICEuseMetricTerms = .TRUE.
189 SEAICEuseEVPpickup = .TRUE.
190 SEAICEuseEVPstar = .FALSE.
191 SEAICErestoreUnderIce = .FALSE.
192 SEAICE_growMeltByConv = .FALSE.
193 SEAICE_salinityTracer = .FALSE.
194 SEAICE_ageTracer = .FALSE.
195 useHB87stressCoupling = .FALSE.
196 usePW79thermodynamics = .TRUE.
197 useMaykutSatVapPoly = .FALSE.
198 SEAICEuseFluxForm = .TRUE.
199 SEAICEadvHeff = .TRUE.
200 SEAICEadvArea = .TRUE.
201 SEAICEadvSnow = .TRUE.
202 #ifdef SEAICE_VARIABLE_SALINITY
203 SEAICEadvSalt = .TRUE.
204 #else
205 SEAICEadvSalt = .FALSE.
206 #endif
207 SEAICEuseFlooding = .TRUE.
208 SEAICE_no_slip = .FALSE.
209 SEAICE_clipVelocities = .FALSE.
210 SEAICE_maskRHS = .FALSE.
211 SEAICEetaZmethod = 0
212 SEAICEadvScheme = 2
213 SEAICEadvSchArea = UNSET_I
214 SEAICEadvSchHeff = UNSET_I
215 SEAICEadvSchSnow = UNSET_I
216 SEAICEadvSchSalt = UNSET_I
217 SEAICEdiffKhArea = UNSET_RL
218 SEAICEdiffKhHeff = UNSET_RL
219 SEAICEdiffKhSnow = UNSET_RL
220 SEAICEdiffKhSalt = UNSET_RL
221 DIFF1 = UNSET_RL
222 C-- old DIFF1 default:
223 c DIFF1 = .004 _d 0
224 SEAICE_deltaTtherm = dTtracerLev(1)
225 SEAICE_deltaTdyn = dTtracerLev(1)
226 SEAICE_deltaTevp = UNSET_RL
227 SEAICEuseAB2 = .FALSE.
228 SEAICE_abEps = 0. _d 0
229 C JFNK stuff
230 SEAICEuseJFNK = .FALSE.
231 SEAICEuseIMEX = .FALSE.
232 SEAICEnewtonIterMax = 10
233 SEAICEkrylovIterMax = 10
234 SEAICE_JFNK_lsIter = UNSET_I
235 SEAICE_JFNK_tolIter = 100
236 SEAICE_OLx = OLx-2
237 SEAICE_OLy = OLy-2
238 JFNKgamma_nonlin = 1. _d -05
239 JFNKgamma_lin_min = 0.10 _d 0
240 JFNKgamma_lin_max = 0.99 _d 0
241 JFNKres_t = UNSET_RL
242 JFNKres_tFac = UNSET_RL
243 SEAICE_JFNKepsilon = 1. _d -06
244 C factor for inexact Newton forcing, .gt. 0 and .le. 1
245 SEAICE_JFNKphi = 1. _d 0
246 C exponent for inexact Newton forcing .gt. 1 and .le. 2
247 SEAICE_JFNKalpha = 1. _d 0
248 C Hunke, JCP, 2001 use 615 kg/m^2 for this, but does not recommend using it
249 SEAICE_evpDampC = -1. _d 0
250 SEAICE_zetaMin = 0. _d 0
251 SEAICE_zetaMaxFac = 2.5 _d 8
252 SEAICEpresH0 = 1. _d 0
253 SEAICEpresPow0 = 1
254 SEAICEpresPow1 = 1
255 SEAICE_evpTauRelax = -1. _d 0
256 SEAICE_elasticParm = 0.33333333333333333333333333 _d 0
257 SEAICE_evpAlpha = UNSET_RL
258 SEAICE_evpBeta = UNSET_RL
259 SEAICEnEVPstarSteps = UNSET_I
260 SEAICE_initialHEFF = ZERO
261 #ifdef SEAICE_ITD
262 C Coefficients used to calculate sea ice thickness category limits
263 C after Lipscomb et al. (2001, JGR), Equ. 22
264 C choose between
265 C - original parameters of Lipscomb et al. (2001):
266 C c1=3.0/N, c2=15*c1, c3=3.0
267 C - and a higher resolution of thin end of ITD:
268 C c1=1.5/N, c2=42*c1, c3=3.3
269 Hlimit_c1 = 3.0
270 Hlimit_c2 = 15.
271 Hlimit_c3 = 3.0
272 #endif
273 SEAICE_rhoIce = 0.91 _d +03
274 SEAICE_rhoSnow = 330. _d 0
275 ICE2WATR = UNSET_RL
276 SEAICE_drag = 0.002 _d 0
277 OCEAN_drag = 0.001 _d 0
278 SEAICE_waterDrag = 5.5 _d 0
279 SEAICE_dryIceAlb = 0.75 _d 0
280 SEAICE_wetIceAlb = 0.66 _d 0
281 SEAICE_drySnowAlb = 0.84 _d 0
282 SEAICE_wetSnowAlb = 0.7 _d 0
283 HO = 0.5 _d 0
284 SEAICE_drag_south = UNSET_RL
285 SEAICE_waterDrag_south = UNSET_RL
286 SEAICE_dryIceAlb_south = UNSET_RL
287 SEAICE_wetIceAlb_south = UNSET_RL
288 SEAICE_drySnowAlb_south = UNSET_RL
289 SEAICE_wetSnowAlb_south = UNSET_RL
290 HO_south = UNSET_RL
291 SEAICE_wetAlbTemp = -1. _d -3
292 #ifdef SEAICE_EXTERNAL_FLUXES
293 SEAICE_waterAlbedo = UNSET_RL
294 #else /* if undef SEAICE_EXTERNAL_FLUXES */
295 SEAICE_waterAlbedo = 0.1 _d +00
296 #endif /* SEAICE_EXTERNAL_FLUXES */
297 SEAICE_strength = 2.75 _d +04
298 SEAICE_eccen = 2. _d 0
299 C coefficients for flux computations/bulk formulae
300 SEAICE_dalton = 1.75 _d -03
301 #ifdef ALLOW_EXF
302 IF ( useEXF ) THEN
303 C Use parameters that have already been set in data.exf
304 C to be consistent
305 SEAICE_rhoAir = atmrho
306 SEAICE_cpAir = atmcp
307 SEAICE_lhEvap = flamb
308 SEAICE_lhFusion = flami
309 SEAICE_boltzmann = stefanBoltzmann
310 SEAICE_emissivity = ocean_emissivity
311 SEAICE_ice_emiss = ice_emissivity
312 SEAICE_snow_emiss = snow_emissivity
313 ELSE
314 #else
315 IF ( .TRUE. ) THEN
316 #endif /* ALLOW_EXF */
317 SEAICE_rhoAir = 1.3 _d 0
318 SEAICE_cpAir = 1004. _d 0
319 SEAICE_lhEvap = 2.50 _d 6
320 SEAICE_lhFusion = 3.34 _d 5
321 SEAICE_boltzmann = 5.670 _d -08
322 C old default value of 0.97001763668430343479
323 SEAICE_emissivity = 5.5 _d -08/5.670 _d -08
324 SEAICE_ice_emiss = SEAICE_emissivity
325 SEAICE_snow_emiss = SEAICE_emissivity
326 ENDIF
327 SEAICE_iceConduct = 2.1656 _d +00
328 SEAICE_snowConduct = 3.1 _d -01
329 SEAICE_snowThick = 0.15 _d 0
330 SEAICE_shortwave = 0.30 _d 0
331 SEAICE_salt0 = 0.0 _d 0
332 SEAICE_saltFrac = 0.0 _d 0
333 #ifdef SEAICE_ITD
334 C in case defined(SEAICE_ITD) MULTDIM = nITD (see SEAICE_SIZE.h)
335 c SEAICE_multDim = MULTDIM
336 C the switch MULTICATEGORY (and with it parameter MULTDIM) has been retired
337 C and SEAICE_multDim is now a runtime parameter;
338 C in case SEAICE_multDim is given in data.seaice it needs to be overwritten
339 C after PARM01 was read (see below)
340 SEAICE_multDim = nITD
341 #else
342 SEAICE_multDim = 1
343 #endif
344 SEAICE_useMultDimSnow = .FALSE.
345 C default to be set later (ocean-seaice turbulent flux coeff):
346 SEAICE_mcPheeStepFunc = .FALSE.
347 SEAICE_mcPheeTaper = UNSET_RL
348 SEAICE_availHeatTaper = UNSET_RL
349 SEAICE_mcPheePiston = UNSET_RL
350 SEAICE_frazilFrac = UNSET_RL
351 SEAICE_gamma_t = UNSET_RL
352 SEAICE_gamma_t_frz = UNSET_RL
353 SEAICE_availHeatFrac = UNSET_RL
354 SEAICE_availHeatFracFrz = UNSET_RL
355 SEAICE_doOpenWaterGrowth=.TRUE.
356 SEAICE_doOpenWaterMelt=.FALSE.
357 SEAICE_areaLossFormula=1
358 SEAICE_areaGainFormula=1
359 SEAICE_tempFrz0 = 0.0901 _d 0
360 SEAICE_dTempFrz_dS = -0.0575 _d 0
361 C old default for constant freezing point
362 c SEAICE_tempFrz0 = -1.96 _d 0
363 c SEAICE_dTempFrz_dS = 0. _d 0
364 SEAICEstressFactor = 1. _d 0
365 SEAICE_tauAreaObsRelax = -999. _d 0
366 AreaFile = ' '
367 HsnowFile = ' '
368 HsaltFile = ' '
369 HeffFile = ' '
370 uIceFile = ' '
371 vIceFile = ' '
372 IMAX_TICE = 10
373 postSolvTempIter = 2
374 C LSR parameters
375 SEAICE_LSRrelaxU = 0.95 _d 0
376 SEAICE_LSRrelaxV = 0.95 _d 0
377 SOLV_MAX_ITERS = UNSET_I
378 SOLV_NCHECK= 2
379 C two pseudo time steps correspond to the original modified
380 C Euler time stepping scheme of Zhang+Hibler (1997)
381 NPSEUDOTIMESTEPS = 2
382 #ifdef SEAICE_ALLOW_FREEDRIFT
383 LSR_mixIniGuess = 0
384 #else
385 LSR_mixIniGuess = -1
386 #endif
387 LSR_ERROR = 0.0001 _d 0
388 SEAICEuseMultiTileSolver = .FALSE.
389
390 SEAICE_area_floor = siEPS
391 SEAICE_area_reg = siEPS
392 SEAICE_hice_reg = 0.05 _d 0
393 SEAICE_area_max = 1.00 _d 0
394
395 SEAICE_airTurnAngle = 0.0 _d 0
396 SEAICE_waterTurnAngle = 0.0 _d 0
397 MIN_ATEMP = -50. _d 0
398 MIN_LWDOWN = 60. _d 0
399 MIN_TICE = -50. _d 0
400 SEAICE_EPS = 1. _d -10
401 SEAICE_EPS_SQ = -99999.
402
403 SEAICEwriteState = .FALSE.
404 SEAICE_monFreq = monitorFreq
405 SEAICE_dumpFreq = dumpFreq
406 SEAICE_taveFreq = taveFreq
407 #ifdef ALLOW_MNC
408 SEAICE_tave_mnc = timeave_mnc
409 SEAICE_dump_mnc = snapshot_mnc
410 SEAICE_mon_mnc = monitor_mnc
411 #else
412 SEAICE_tave_mnc = .FALSE.
413 SEAICE_dump_mnc = .FALSE.
414 SEAICE_mon_mnc = .FALSE.
415 #endif
416 SEAICE_debugPointI = UNSET_I
417 SEAICE_debugPointJ = UNSET_I
418
419 C- Retired parameters:
420 c LAD = 2
421 LAD = UNSET_I
422 c SEAICE_sensHeat = 1.75 _d -03 * 1004 * 1.3
423 c SEAICE_sensHeat = 2.284 _d +00
424 SEAICE_sensHeat = UNSET_RL
425 c SEAICE_latentWater = 1.75 _d -03 * 2.500 _d 06 * 1.3
426 c SEAICE_latentWater = 5.6875 _d +03
427 SEAICE_latentWater = UNSET_RL
428 c SEAICE_latentIce = 1.75 _d -03 * 2.834 _d 06 * 1.3
429 c SEAICE_latentIce = 6.4474 _d +03
430 SEAICE_latentIce = UNSET_RL
431 SEAICE_salinity = UNSET_RL
432 SIsalFRAC = UNSET_RL
433 SIsal0 = UNSET_RL
434 IceAgeFile = ' '
435 c MAX_TICE = 30. _d 0
436 MAX_TICE = UNSET_RL
437 areaMin = UNSET_RL
438 hiceMin = UNSET_RL
439 A22 = UNSET_RL
440 areaMax = UNSET_RL
441 SEAICE_lhSublim = UNSET_RL
442 SEAICEadvAge = .TRUE.
443 SEAICEadvSchAge = UNSET_I
444 SEAICEdiffKhAge = UNSET_RL
445 IceAgeTrFile(1) = ' '
446 IceAgeTrFile(2) = ' '
447 IceAgeTrFile(3) = ' '
448 IceAgeTrFile(4) = ' '
449 SEAICEturbFluxFormula =UNSET_I
450 SEAICE_freeze = UNSET_RL
451 MAX_HEFF = UNSET_RL
452 C- end retired parameters
453
454 #ifdef ALLOW_COST
455 locDate(1) = 0
456 locDate(2) = 0
457 # ifdef ALLOW_CAL
458 CALL CAL_GETDATE( -1, startTime, locDate, myThid )
459 # endif /* ALLOW_CAL */
460 mult_ice_export = 0. _d 0
461 mult_ice = 0. _d 0
462 costIceStart1 = locDate(1)
463 costIceStart2 = locDate(2)
464 costIceEnd1 = 0
465 costIceEnd2 = 0
466 cost_ice_flag = 1
467 SEAICE_clamp_salt = 27.5 _d 0
468 SEAICE_clamp_theta = 0.0001 _d 0
469 c
470 mult_smrsst = 0. _d 0
471 mult_smrsss = 0. _d 0
472 mult_smrarea = 0. _d 0
473 wsmrarea0 = 0.5 _d 0
474 wmean_smrarea = 0.5 _d 0
475 smrsstbarfile = 'smrsstbar'
476 smrsssbarfile = 'smrsssbar'
477 smrareabarfile = 'smrareabar'
478 smrareadatfile = ' '
479 smrarea_errfile = ' '
480 smrareastartdate1 = locDate(1)
481 smrareastartdate2 = locDate(2)
482 #endif /* ALLOW_COST */
483
484 #ifdef ALLOW_SITRACER
485 SItrNumInUse=SItrMaxNum
486 DO iTracer = 1, SItrMaxNum
487 SItrFile(iTracer) = ' '
488 SItrName(iTracer) = ' '
489 SItrNameLong(iTracer) = ' '
490 SItrUnit(iTracer) = ' '
491 SItrMate(iTracer) = 'HEFF'
492 SItrFromOcean0(iTracer) = ZERO
493 SItrFromOceanFrac(iTracer) = ZERO
494 SItrFromFlood0(iTracer) = ZERO
495 SItrFromFloodFrac(iTracer) = ZERO
496 SItrExpand0(iTracer) = ZERO
497 ENDDO
498 #endif /* ALLOW_SITRACER */
499 nRetired = 0
500
501 C Open and read the data.seaice file
502 WRITE(msgBuf,'(A)')
503 &' '
504 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
505 & SQUEEZE_RIGHT , myThid)
506 WRITE(msgBuf,'(A)') ' SEAICE_READPARMS: opening data.seaice'
507 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
508 & SQUEEZE_RIGHT , myThid)
509
510 CALL OPEN_COPY_DATA_FILE(
511 I 'data.seaice', 'SEAICE_READPARMS',
512 O iUnit,
513 I myThid )
514
515 C-- Read settings from model parameter file "data.seaice".
516 READ(UNIT=iUnit,NML=SEAICE_PARM01)
517
518 #ifdef ALLOW_COST
519 READ(UNIT=iUnit,NML=SEAICE_PARM02)
520 #endif /* ALLOW_COST */
521
522 #ifdef ALLOW_SITRACER
523 READ(UNIT=iUnit,NML=SEAICE_PARM03)
524 #endif /* ALLOW_SITRACER */
525
526 CLOSE(iUnit)
527
528 #ifdef SEAICE_ITD
529 C SEAICE_multDim has become a runtime parameter but if SEAICE_ITD is defined
530 C it needs to equal nITD because of shared code (mostly in seaice_growth.F).
531 C nITD is set in SEAICE_SIZE.h
532 SEAICE_multDim = nITD
533 #endif
534
535 WRITE(msgBuf,'(A)')
536 & ' SEAICE_READPARMS: finished reading data.seaice'
537 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
538 & SQUEEZE_RIGHT , myThid)
539
540 C-- Set default values (if not specified in data.seaice namelist)
541 IF (ICE2WATR.EQ.UNSET_RL) ICE2WATR = SEAICE_rhoIce*recip_rhoConst
542 IF (SEAICE_drag_south .EQ. UNSET_RL)
543 & SEAICE_drag_south = SEAICE_drag
544 IF (SEAICE_waterDrag_south .EQ. UNSET_RL)
545 & SEAICE_waterDrag_south = SEAICE_waterDrag
546 IF (SEAICE_dryIceAlb_south .EQ. UNSET_RL)
547 & SEAICE_dryIceAlb_south = SEAICE_dryIceAlb
548 IF (SEAICE_wetIceAlb_south .EQ. UNSET_RL)
549 & SEAICE_wetIceAlb_south = SEAICE_wetIceAlb
550 IF (SEAICE_drySnowAlb_south .EQ. UNSET_RL)
551 & SEAICE_drySnowAlb_south = SEAICE_drySnowAlb
552 IF (SEAICE_wetSnowAlb_south .EQ. UNSET_RL)
553 & SEAICE_wetSnowAlb_south = SEAICE_wetSnowAlb
554 IF (HO_south .EQ. UNSET_RL)
555 & HO_south = HO
556
557 C Check that requested time step size is supported. The combination
558 C below is the only one that is supported at this time. Does not
559 C mean that something fancier will not work, just that it has not
560 C yet been tried nor thought through.
561 IF ( SEAICE_deltaTtherm .NE. dTtracerLev(1) .OR.
562 & SEAICE_deltaTdyn .LT. SEAICE_deltaTtherm .OR.
563 & (SEAICE_deltaTdyn/SEAICE_deltaTtherm) .NE.
564 & INT(SEAICE_deltaTdyn/SEAICE_deltaTtherm) ) THEN
565 WRITE(msgBuf,'(A)')
566 & 'Unsupported combination of SEAICE_deltaTtherm,'
567 CALL PRINT_ERROR( msgBuf , myThid)
568 WRITE(msgBuf,'(A)')
569 & ' SEAICE_deltaTdyn, and dTtracerLev(1)'
570 CALL PRINT_ERROR( msgBuf , myThid)
571 STOP 'ABNORMAL END: S/R SEAICE_READPARMS'
572 ENDIF
573 SEAICEuseEVP = .FALSE.
574 #ifdef SEAICE_ALLOW_EVP
575 IF ( SEAICE_deltaTevp .NE. UNSET_RL ) SEAICEuseEVP = .TRUE.
576 IF ( SEAICEuseEVP ) THEN
577 IF ( (SEAICE_deltaTdyn/SEAICE_deltaTevp) .NE.
578 & INT(SEAICE_deltaTdyn/SEAICE_deltaTevp) .AND.
579 & .NOT. SEAICEuseEVPstar ) THEN
580 WRITE(msgBuf,'(A)')
581 & 'SEAICE_deltaTevp must be a factor of SEAICE_deltaTdyn.'
582 CALL PRINT_ERROR( msgBuf , myThid)
583 STOP 'ABNORMAL END: S/R SEAICE_READPARMS'
584 ENDIF
585 IF ( SEAICE_elasticParm .LE. 0. _d 0 ) THEN
586 WRITE(msgBuf,'(A)')
587 & 'SEAICE_elasticParm must greater than 0.'
588 CALL PRINT_ERROR( msgBuf , myThid)
589 STOP 'ABNORMAL END: S/R SEAICE_READPARMS'
590 ENDIF
591 IF ( SEAICE_evpTauRelax .LE. 0. _d 0 )
592 & SEAICE_evpTauRelax = SEAICE_deltaTdyn*SEAICE_elasticParm
593 IF ( SEAICE_evpBeta .EQ. UNSET_RL ) THEN
594 SEAICE_evpBeta = SEAICE_deltaTdyn/SEAICE_deltaTevp
595 ELSE
596 SEAICE_deltaTevp = SEAICE_deltaTdyn/SEAICE_evpBeta
597 ENDIF
598 IF ( SEAICE_evpAlpha .EQ. UNSET_RL ) THEN
599 SEAICE_evpAlpha = 2. _d 0 * SEAICE_evpTauRelax/SEAICE_deltaTevp
600 ELSE
601 SEAICE_evpTauRelax = 0.5 _d 0 *SEAICE_evpAlpha*SEAICE_deltaTevp
602 ENDIF
603 C Check if all parameters are set.
604 ENDIF
605 #endif /* SEAICE_ALLOW_EVP */
606
607 #ifdef SEAICE_ALLOW_FREEDRIFT
608 IF ( SEAICEuseFREEDRIFT ) SEAICEuseEVP = .FALSE.
609 IF ( SEAICEuseFREEDRIFT ) THEN
610 WRITE(msgBuf,'(A,A)')
611 & 'WARNING FROM S/R SEAICE_READPARMS:',
612 & ' switch seaice from LSR or EVP to "free drift"'
613 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
614 & SQUEEZE_RIGHT , myThid)
615 ENDIF
616 #endif /* SEAICE_ALLOW_FREEDRIFT */
617
618 C Make sure that we have least two pseudo time steps
619 NPSEUDOTIMESTEPS = MAX(NPSEUDOTIMESTEPS,2)
620
621 C- limit preconditioner steps
622 IF ( SOLV_MAX_ITERS .EQ. UNSET_I ) THEN
623 C maximum number of LSOR steps in default Picard solver
624 SOLV_MAX_ITERS = 1500
625 C maximum number of LSOR steps as preconditioner in JFNK solver
626 IF ( SEAICEuseJFNK ) SOLV_MAX_ITERS = 10
627 ENDIF
628 C Turn line search with JFNK solver off by default by making this
629 C number much larger than the maximum allowed Newton iterations
630 IF ( SEAICE_JFNK_lsIter .EQ. UNSET_I )
631 & SEAICE_JFNK_lsIter = 2*SEAICEnewtonIterMax
632
633 C- The old ways of specifying mcPheeTaper, mcPheePiston & frazilFrac:
634 C a) prevent multiple specification of the same coeff;
635 C b) if specified, then try to recover old way of setting & default.
636 IF ( SEAICE_mcPheeTaper .EQ. UNSET_RL ) THEN
637 IF ( SEAICE_availHeatTaper.EQ.UNSET_RL ) THEN
638 SEAICE_mcPheeTaper = 0.0 _d 0
639 ELSE
640 SEAICE_mcPheeTaper = SEAICE_availHeatTaper
641 ENDIF
642 ELSEIF ( SEAICE_availHeatTaper.NE.UNSET_RL ) THEN
643 WRITE(msgBuf,'(2A)') 'S/R SEAICE_READPARMS: Cannot specify ',
644 & 'both SEAICE_mcPheeTaper & SEAICE_availHeatTaper'
645 CALL PRINT_ERROR( msgBuf , myThid)
646 STOP 'ABNORMAL END: S/R SEAICE_READPARMS'
647 ENDIF
648
649 C- set SEAICE_frazilFrac if not yet done
650 IF ( SEAICE_gamma_t_frz .NE. UNSET_RL ) THEN
651 IF ( SEAICE_frazilFrac .EQ. UNSET_RL ) THEN
652 SEAICE_frazilFrac = SEAICE_deltaTtherm/SEAICE_gamma_t_frz
653 ELSE
654 WRITE(msgBuf,'(2A)') 'S/R SEAICE_READPARMS: Cannot specify ',
655 & 'both SEAICE_frazilFrac & SEAICE_gamma_t_frz'
656 CALL PRINT_ERROR( msgBuf , myThid)
657 STOP 'ABNORMAL END: S/R SEAICE_READPARMS'
658 ENDIF
659 ENDIF
660 IF ( SEAICE_availHeatFracFrz.NE.UNSET_RL ) THEN
661 IF ( SEAICE_frazilFrac .EQ. UNSET_RL ) THEN
662 SEAICE_frazilFrac = SEAICE_availHeatFracFrz
663 ELSE
664 IF ( SEAICE_gamma_t_frz .EQ. UNSET_RL ) THEN
665 WRITE(msgBuf,'(2A)') 'S/R SEAICE_READPARMS: Cannot specify ',
666 & 'both SEAICE_frazilFrac & SEAICE_availHeatFracFrz'
667 ELSE
668 WRITE(msgBuf,'(2A)') 'S/R SEAICE_READPARMS: Cannot specify ',
669 & 'both SEAICE_gamma_t_frz & SEAICE_availHeatFracFrz'
670 ENDIF
671 CALL PRINT_ERROR( msgBuf , myThid)
672 STOP 'ABNORMAL END: S/R SEAICE_READPARMS'
673 ENDIF
674 ENDIF
675 C the default for SEAICE_gamma_t_frz use to be SEAICE_gamma_t:
676 IF ( SEAICE_gamma_t .NE. UNSET_RL .AND.
677 & SEAICE_frazilFrac .EQ. UNSET_RL ) THEN
678 SEAICE_frazilFrac = SEAICE_deltaTtherm/SEAICE_gamma_t
679 ENDIF
680 C the default for SEAICE_availHeatFracFrz use to be SEAICE_availHeatFrac:
681 IF ( SEAICE_availHeatFrac.NE.UNSET_RL .AND.
682 & SEAICE_frazilFrac .EQ. UNSET_RL ) THEN
683 SEAICE_frazilFrac = SEAICE_availHeatFrac
684 ENDIF
685 IF ( SEAICE_frazilFrac .EQ. UNSET_RL ) THEN
686 SEAICE_frazilFrac = 1. _d 0
687 ENDIF
688
689 C- start by setting SEAICE_availHeatFrac (used in seaice_init_fixed.F
690 C to set SEAICE_mcPheePiston once drF is known)
691 IF ( SEAICE_gamma_t .NE. UNSET_RL ) THEN
692 IF ( SEAICE_availHeatFrac.EQ.UNSET_RL ) THEN
693 SEAICE_availHeatFrac = SEAICE_deltaTtherm/SEAICE_gamma_t
694 ELSE
695 WRITE(msgBuf,'(2A)') 'S/R SEAICE_READPARMS: Cannot specify ',
696 & 'both SEAICE_gamma_t & SEAICE_availHeatFrac'
697 CALL PRINT_ERROR( msgBuf , myThid)
698 STOP 'ABNORMAL END: S/R SEAICE_READPARMS'
699 ENDIF
700 ENDIF
701 IF ( SEAICE_mcPheePiston .NE. UNSET_RL .AND.
702 & SEAICE_availHeatFrac.NE. UNSET_RL ) THEN
703 IF ( SEAICE_gamma_t .EQ. UNSET_RL ) THEN
704 WRITE(msgBuf,'(2A)') 'S/R SEAICE_READPARMS: Cannot specify ',
705 & 'both SEAICE_mcPheePiston & SEAICE_availHeatFrac'
706 ELSE
707 WRITE(msgBuf,'(2A)') 'S/R SEAICE_READPARMS: Cannot specify ',
708 & 'both SEAICE_mcPheePiston & SEAICE_gamma_t'
709 ENDIF
710 CALL PRINT_ERROR( msgBuf , myThid)
711 STOP 'ABNORMAL END: S/R SEAICE_READPARMS'
712 ENDIF
713
714 #ifdef SEAICE_ITD
715 C The ice thickness distribution (ITD) module can only be used with
716 C package seaice thermodynamics (seaice_growth)
717 C SEAICE_ADVDIFF and
718 C SEAICE_GROWTH, i.e. needs usePW79thermodynamics = .TRUE.
719 useTHSice = .FALSE.
720 #endif
721 IF ( useThSice ) THEN
722 C If the thsice package with the Winton thermodynamics is used
723 C is does not make sense to have the following parameters defined,
724 C so we reset them here
725 usePW79thermodynamics = .FALSE.
726 SEAICEadvHeff = .FALSE.
727 SEAICEadvArea = .FALSE.
728 SEAICEadvSnow = .FALSE.
729 SEAICEadvSalt = .FALSE.
730 ENDIF
731 C Set advection schemes to some sensible values if not done in data.seaice
732 IF ( SEAICEadvSchArea .EQ. UNSET_I )
733 & SEAICEadvSchArea = SEAICEadvSchHeff
734 IF ( SEAICEadvSchArea .EQ. UNSET_I )
735 & SEAICEadvSchArea = SEAICEadvScheme
736 IF ( SEAICEadvScheme .NE. SEAICEadvSchArea )
737 & SEAICEadvScheme = SEAICEadvSchArea
738 IF ( SEAICEadvSchHeff .EQ. UNSET_I )
739 & SEAICEadvSchHeff = SEAICEadvSchArea
740 IF ( SEAICEadvSchSnow .EQ. UNSET_I )
741 & SEAICEadvSchSnow = SEAICEadvSchHeff
742 IF ( SEAICEadvSchSalt .EQ. UNSET_I )
743 & SEAICEadvSchSalt = SEAICEadvSchHeff
744 C Set diffusivity to some sensible values if not done in data.seaice
745 IF ( SEAICEdiffKhArea .EQ. UNSET_RL )
746 & SEAICEdiffKhArea = SEAICEdiffKhHeff
747 IF ( SEAICEdiffKhArea .EQ. UNSET_RL )
748 & SEAICEdiffKhArea = 0. _d 0
749 IF ( SEAICEdiffKhHeff .EQ. UNSET_RL )
750 & SEAICEdiffKhHeff = SEAICEdiffKhArea
751 IF ( SEAICEdiffKhSnow .EQ. UNSET_RL )
752 & SEAICEdiffKhSnow = SEAICEdiffKhHeff
753 IF ( SEAICEdiffKhSalt .EQ. UNSET_RL )
754 & SEAICEdiffKhSalt = SEAICEdiffKhHeff
755 IF ( SEAICE_EPS_SQ .EQ. -99999. )
756 & SEAICE_EPS_SQ = SEAICE_EPS * SEAICE_EPS
757
758 C- Retired parameters
759 IF ( SEAICE_sensHeat .NE. UNSET_RL ) THEN
760 nRetired = nRetired + 1
761 WRITE(msgBuf,'(A,A)')
762 & 'S/R SEAICE_READPARMS: "SEAICE_sensHeat" ',
763 & 'is no longer allowed in file "data.seaice"'
764 CALL PRINT_ERROR( msgBuf, myThid )
765 WRITE(msgBuf,'(A,A)')
766 & 'S/R SEAICE_READPARMS: set "SEAICE_cpAir", ',
767 & '"SEAICE_dalton", and "SEAICE_rhoAir" instead'
768 CALL PRINT_ERROR( msgBuf, myThid )
769 ENDIF
770 IF ( SEAICE_latentWater .NE. UNSET_RL ) THEN
771 nRetired = nRetired + 1
772 WRITE(msgBuf,'(A,A)')
773 & 'S/R SEAICE_READPARMS: "SEAICE_latentWater" ',
774 & 'is no longer allowed in file "data.seaice"'
775 CALL PRINT_ERROR( msgBuf, myThid )
776 WRITE(msgBuf,'(A,A)')
777 & 'S/R SEAICE_READPARMS: set "SEAICE_lhEvap", ',
778 & '"SEAICE_dalton", and "SEAICE_rhoAir" instead'
779 CALL PRINT_ERROR( msgBuf, myThid )
780 ENDIF
781 IF ( SEAICE_latentIce .NE. UNSET_RL ) THEN
782 nRetired = nRetired + 1
783 WRITE(msgBuf,'(A,A)')
784 & 'S/R SEAICE_READPARMS: "SEAICE_latentIce" ',
785 & 'is no longer allowed in file "data.seaice"'
786 CALL PRINT_ERROR( msgBuf, myThid )
787 WRITE(msgBuf,'(A,A)')
788 & 'S/R SEAICE_READPARMS: set "SEAICE_lhFusion", ',
789 & '"SEAICE_dalton", and "SEAICE_rhoAir" instead'
790 CALL PRINT_ERROR( msgBuf, myThid )
791 ENDIF
792 IF ( SEAICE_freeze .NE. UNSET_RL ) THEN
793 WRITE(msgBuf,'(A,A)')'S/R SEAICE_READPARMS: ',
794 & '"SEAICE_freeze" no longer allowed in file "data.seaice"'
795 CALL PRINT_ERROR( msgBuf, myThid )
796 WRITE(msgBuf,'(A,A)')'S/R SEAICE_READPARMS: ',
797 & 'set instead "SEAICE_tempFrz0" and "SEAICE_dTempFrz_dS"'
798 CALL PRINT_ERROR( msgBuf, myThid )
799 ENDIF
800 IF ( SEAICE_salinity .NE. UNSET_RL ) THEN
801 nRetired = nRetired + 1
802 WRITE(msgBuf,'(A,A)') 'S/R SEAICE_READPARMS: ',
803 & '"SEAICE_salinity" is no longer allowed in file "data.seaice"'
804 CALL PRINT_ERROR( msgBuf, myThid )
805 WRITE(msgBuf,'(A,A)') 'S/R SEAICE_READPARMS: ',
806 & 'set "SEAICE_saltFrac" instead'
807 CALL PRINT_ERROR( msgBuf, myThid )
808 ENDIF
809 IF ( SIsalFrac .NE. UNSET_RL ) THEN
810 nRetired = nRetired + 1
811 WRITE(msgBuf,'(A,A)') 'S/R SEAICE_READPARMS: ',
812 & '"SIsalFrac" is no longer allowed in file "data.seaice"'
813 CALL PRINT_ERROR( msgBuf, myThid )
814 WRITE(msgBuf,'(A,A)') 'S/R SEAICE_READPARMS: ',
815 & 'set "SEAICE_saltFrac" instead'
816 CALL PRINT_ERROR( msgBuf, myThid )
817 ENDIF
818 IF ( SIsal0 .NE. UNSET_RL ) THEN
819 nRetired = nRetired + 1
820 WRITE(msgBuf,'(A,A)') 'S/R SEAICE_READPARMS: ',
821 & '"SIsal0" is no longer allowed in file "data.seaice"'
822 CALL PRINT_ERROR( msgBuf, myThid )
823 WRITE(msgBuf,'(A,A)') 'S/R SEAICE_READPARMS: ',
824 & 'set "SEAICE_salt0" instead'
825 CALL PRINT_ERROR( msgBuf, myThid )
826 ENDIF
827 IF ( IceAgeFile .NE. ' ' ) THEN
828 nRetired = nRetired + 1
829 WRITE(msgBuf,'(A,A)')
830 & 'S/R SEAICE_READPARMS: "IceAgeFile" ',
831 & 'is no longer allowed in file "data.seaice"'
832 CALL PRINT_ERROR( msgBuf, myThid )
833 WRITE(msgBuf,'(A,A)')
834 & 'S/R SEAICE_READPARMS: replaced by ',
835 & '"IceAgeTrFile(SEAICE_num)" array '
836 CALL PRINT_ERROR( msgBuf, myThid )
837 ENDIF
838 IF ( areaMax .NE. UNSET_RL ) THEN
839 nRetired = nRetired + 1
840 WRITE(msgBuf,'(A,A)')
841 & 'S/R SEAICE_READPARMS: "areaMax" ',
842 & 'is no longer allowed in file "data.seaice"'
843 CALL PRINT_ERROR( msgBuf, myThid )
844 WRITE(msgBuf,'(A,A)')
845 & 'S/R SEAICE_READPARMS: replaced by ',
846 & '"SEAICE_area_max"'
847 CALL PRINT_ERROR( msgBuf, myThid )
848 ENDIF
849 IF ( areaMin .NE. UNSET_RL ) THEN
850 nRetired = nRetired + 1
851 WRITE(msgBuf,'(A,A)')
852 & 'S/R SEAICE_READPARMS: "areaMin" ',
853 & 'is no longer allowed in file "data.seaice"'
854 CALL PRINT_ERROR( msgBuf, myThid )
855 WRITE(msgBuf,'(A,A)')
856 & 'S/R SEAICE_READPARMS: replaced by ',
857 & '"SEAICE_area_reg" for regularization and ',
858 & '"SEAICE_area_floor" setting a lower bound'
859 CALL PRINT_ERROR( msgBuf, myThid )
860 ENDIF
861 IF (SEAICE_lhSublim .NE. UNSET_RL ) THEN
862 nRetired = nRetired + 1
863 WRITE(msgBuf,'(A,A)')
864 & 'S/R SEAICE_READPARMS: "SEAICE_lhSublim" ',
865 & 'is no longer allowed in file "data.seaice"'
866 CALL PRINT_ERROR( msgBuf, myThid )
867 WRITE(msgBuf,'(A,A)')
868 & 'S/R SEAICE_READPARMS: specify ',
869 & '"SEAICE_lhFusion" and "SEAICE_lhEvap" instead'
870 CALL PRINT_ERROR( msgBuf, myThid )
871 ENDIF
872 IF ( A22 .NE. UNSET_RL ) THEN
873 nRetired = nRetired + 1
874 WRITE(msgBuf,'(A,A)')
875 & 'S/R SEAICE_READPARMS: "A22" ',
876 & 'is no longer allowed in file "data.seaice"'
877 CALL PRINT_ERROR( msgBuf, myThid )
878 WRITE(msgBuf,'(A,A)')
879 & 'S/R SEAICE_READPARMS: replaced by ',
880 & '"SEAICE_area_reg" for regularization'
881 CALL PRINT_ERROR( msgBuf, myThid )
882 ENDIF
883 IF ( LAD .NE. UNSET_I ) THEN
884 nRetired = nRetired + 1
885 WRITE(msgBuf,'(A,A)') 'S/R SEAICE_READPARMS: "LAD" ',
886 & 'is no longer allowed in file "data.seaice"'
887 CALL PRINT_ERROR( msgBuf, myThid )
888 WRITE(msgBuf,'(A,A)') 'always use modified Euler step ',
889 & '(LAD==2) since Leap frog code (LAD==1) is gone.'
890 CALL PRINT_ERROR( msgBuf, myThid )
891 ENDIF
892 IF ( MAX_TICE .NE. UNSET_RL ) THEN
893 nRetired = nRetired + 1
894 WRITE(msgBuf,'(A,A)')
895 & 'S/R SEAICE_READPARMS: "MAX_TICE" ',
896 & 'is no longer allowed in file "data.seaice"'
897 CALL PRINT_ERROR( msgBuf, myThid )
898 ENDIF
899 IF ( hiceMin .NE. UNSET_RL ) THEN
900 nRetired = nRetired + 1
901 WRITE(msgBuf,'(A,A)')
902 & 'S/R SEAICE_READPARMS: "hiceMin" ',
903 & 'is no longer allowed in file "data.seaice"'
904 CALL PRINT_ERROR( msgBuf, myThid )
905 WRITE(msgBuf,'(A,A)')
906 & 'S/R SEAICE_READPARMS: replaced by ',
907 & '"SEAICE_hice_reg" for regularization'
908 CALL PRINT_ERROR( msgBuf, myThid )
909 ENDIF
910 IF ( .NOT. SEAICEadvAge ) THEN
911 nRetired = nRetired + 1
912 WRITE(msgBuf,'(A,A)')
913 & 'S/R SEAICE_READPARMS: "SEAICEadvAge" ',
914 & 'is no longer allowed in file "data.seaice"'
915 CALL PRINT_ERROR( msgBuf, myThid )
916 WRITE(msgBuf,'(A,A)')
917 & 'S/R SEAICE_READPARMS: since ALLOW_SITRACER ',
918 & 'replaced and extended SEAICE_AGE'
919 CALL PRINT_ERROR( msgBuf, myThid )
920 ENDIF
921 IF ( SEAICEadvSchAge .NE. UNSET_I ) THEN
922 nRetired = nRetired + 1
923 WRITE(msgBuf,'(A,A)')
924 & 'S/R SEAICE_READPARMS: "SEAICEadvSchAge" ',
925 & 'is no longer allowed in file "data.seaice"'
926 CALL PRINT_ERROR( msgBuf, myThid )
927 WRITE(msgBuf,'(A,A)')
928 & 'S/R SEAICE_READPARMS: since ALLOW_SITRACER ',
929 & 'replaced and extended SEAICE_AGE'
930 CALL PRINT_ERROR( msgBuf, myThid )
931 ENDIF
932 IF ( SEAICEdiffKhAge .NE. UNSET_RL ) THEN
933 nRetired = nRetired + 1
934 WRITE(msgBuf,'(A,A)')
935 & 'S/R SEAICE_READPARMS: "SEAICEdiffKhAge" ',
936 & 'is no longer allowed in file "data.seaice"'
937 CALL PRINT_ERROR( msgBuf, myThid )
938 WRITE(msgBuf,'(A,A)')
939 & 'S/R SEAICE_READPARMS: since ALLOW_SITRACER ',
940 & 'replaced and extended SEAICE_AGE'
941 CALL PRINT_ERROR( msgBuf, myThid )
942 ENDIF
943 IF ( ( IceAgeTrFile(1) .NE. ' ' ).OR.
944 & ( IceAgeTrFile(2) .NE. ' ' ).OR.
945 & ( IceAgeTrFile(3) .NE. ' ' ).OR.
946 & ( IceAgeTrFile(4) .NE. ' ' ) ) THEN
947 nRetired = nRetired + 1
948 WRITE(msgBuf,'(A,A)')
949 & 'S/R SEAICE_READPARMS: "IceAgeTrFile" ',
950 & 'is no longer allowed in file "data.seaice"'
951 CALL PRINT_ERROR( msgBuf, myThid )
952 WRITE(msgBuf,'(A,A)')
953 & 'S/R SEAICE_READPARMS: since ALLOW_SITRACER ',
954 & 'replaced and extended SEAICE_AGE'
955 CALL PRINT_ERROR( msgBuf, myThid )
956 ENDIF
957 IF ( SEAICEturbFluxFormula .NE. UNSET_I ) THEN
958 WRITE(msgBuf,'(A,A)')'S/R SEAICE_READPARMS: ',
959 & '"SEAICEturbFluxFormula" no longer allowed in "data.seaice"'
960 CALL PRINT_ERROR( msgBuf, myThid )
961 WRITE(msgBuf,'(A,A)')'S/R SEAICE_READPARMS: ',
962 & ' Set instead "SEAICE_mcPheePiston" and "SEAICE_frazilFrac"'
963 CALL PRINT_ERROR( msgBuf, myThid )
964 ENDIF
965 IF ( MAX_HEFF .NE. UNSET_RL ) THEN
966 nRetired = nRetired + 1
967 WRITE(msgBuf,'(A,A)')
968 & 'S/R SEAICE_READPARMS: "MAX_HEFF" ',
969 & 'is no longer allowed in file "data.seaice"'
970 CALL PRINT_ERROR( msgBuf, myThid )
971 ENDIF
972 IF ( nRetired .GT. 0 ) THEN
973 WRITE(msgBuf,'(2A)') 'S/R SEAICE_READPARMS: ',
974 & 'Error reading parameter file "data.seaice"'
975 CALL PRINT_ERROR( msgBuf, myThid )
976 WRITE(msgBuf,'(A)')
977 & 'some out of date parameters were found in the namelist'
978 CALL PRINT_ERROR( msgBuf, myThid )
979 STOP 'ABNORMAL END: S/R SEAICE_READPARMS'
980 ENDIF
981
982 C-- Now set-up any remaining parameters that result from other params
983
984 C- convert SEAICE_doOpenWaterGrowth/Melt logical switch to numerical
985 C facOpenGrow/facOpenMelt
986 facOpenGrow = 0. _d 0
987 facOpenMelt = 0. _d 0
988 IF (SEAICE_doOpenWaterGrowth) facOpenGrow = 1. _d 0
989 IF (SEAICE_doOpenWaterMelt) facOpenMelt = 1. _d 0
990
991 C- Set Output type flags :
992 SEAICE_tave_mdsio = .TRUE.
993 SEAICE_dump_mdsio = .TRUE.
994 SEAICE_mon_stdio = .TRUE.
995 #ifdef ALLOW_MNC
996 IF (useMNC) THEN
997 IF ( .NOT.outputTypesInclusive
998 & .AND. SEAICE_tave_mnc ) SEAICE_tave_mdsio = .FALSE.
999 IF ( .NOT.outputTypesInclusive
1000 & .AND. SEAICE_dump_mnc ) SEAICE_dump_mdsio = .FALSE.
1001 IF ( .NOT.outputTypesInclusive
1002 & .AND. SEAICE_mon_mnc ) SEAICE_mon_stdio = .FALSE.
1003 ENDIF
1004 #endif
1005
1006 C- store value of logical flag which might be changed in AD mode
1007 #ifdef ALLOW_AUTODIFF
1008 SEAICEuseFREEDRIFTinFwdMode = SEAICEuseFREEDRIFT
1009 SEAICEuseDYNAMICSinFwdMode = SEAICEuseDYNAMICS
1010 #endif /* ALLOW_AUTODIFF */
1011
1012 C Check the consitency of a few parameters
1013 IF ( SEAICE_emissivity .LT. 1. _d -04 ) THEN
1014 WRITE(msgBuf,'(2A)')
1015 & 'SEAICE_emissivity is no longer emissivity*(boltzmann ',
1016 & 'constant) but really an emissivity.'
1017 CALL PRINT_ERROR( msgBuf , myThid)
1018 WRITE(msgBuf,'(2A)')
1019 & 'Typical values are near 1 ',
1020 & '(default is 5.5/5.67=0.9700176...).'
1021 CALL PRINT_ERROR( msgBuf , myThid)
1022 WRITE(msgBuf,'(A,E13.6,A)')
1023 & 'Please change SEAICE_emissivity in data.seaice to ',
1024 & SEAICE_emissivity, '/5.67e-8.'
1025 CALL PRINT_ERROR( msgBuf , myThid)
1026 STOP 'ABNORMAL END: S/R SEAICE_READPARMS'
1027 ENDIF
1028
1029 IF ( DIFF1 .EQ. UNSET_RL ) THEN
1030 DIFF1 = 0. _d 0
1031 chkFlag = .FALSE.
1032 IF ( SEAICEadvScheme.EQ.2 ) THEN
1033 C-- Since DIFF1 default value has been changed (2011/05/29), issue a warning
1034 C in case using centered avection scheme without any diffusion:
1035 IF ( SEAICEadvHeff .AND. SEAICEdiffKhHeff .EQ. 0. _d 0 ) THEN
1036 WRITE(msgBuf,'(2A)') '** WARNING ** SEAICE_READPARMS: ',
1037 & 'will use AdvScheme = 2 for HEFF without any diffusion'
1038 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
1039 & SQUEEZE_RIGHT, myThid )
1040 chkFlag = .TRUE.
1041 ENDIF
1042 IF ( SEAICEadvArea .AND. SEAICEdiffKhArea .EQ. 0. _d 0 ) THEN
1043 WRITE(msgBuf,'(2A)') '** WARNING ** SEAICE_READPARMS: ',
1044 & 'will use AdvScheme = 2 for AREA without any diffusion'
1045 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
1046 & SQUEEZE_RIGHT, myThid )
1047 chkFlag = .TRUE.
1048 ENDIF
1049 IF ( SEAICEadvSnow .AND. SEAICEdiffKhSnow .EQ. 0. _d 0 ) THEN
1050 WRITE(msgBuf,'(2A)') '** WARNING ** SEAICE_READPARMS: ',
1051 & 'will use AdvScheme = 2 for HSNOW without any diffusion'
1052 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
1053 & SQUEEZE_RIGHT, myThid )
1054 chkFlag = .TRUE.
1055 ENDIF
1056 IF ( SEAICEadvSalt .AND. SEAICEdiffKhSalt .EQ. 0. _d 0 ) THEN
1057 WRITE(msgBuf,'(2A)') '** WARNING ** SEAICE_READPARMS: ',
1058 & 'will use AdvScheme = 2 for HSALT without any diffusion'
1059 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
1060 & SQUEEZE_RIGHT, myThid )
1061 chkFlag = .TRUE.
1062 ENDIF
1063 IF ( chkFlag ) THEN
1064 WRITE(msgBuf,'(2A)') '** WARNING ** SEAICE_READPARMS: ',
1065 & 'since DIFF1 is set to 0 (= new DIFF1 default value)'
1066 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
1067 & SQUEEZE_RIGHT, myThid )
1068 ENDIF
1069 ENDIF
1070 ENDIF
1071
1072 _END_MASTER(myThid)
1073
1074 C-- Everyone else must wait for the parameters to be loaded
1075 _BARRIER
1076
1077 RETURN
1078 END

  ViewVC Help
Powered by ViewVC 1.1.22