1 |
C $Header: /u/gcmpack/MITgcm/pkg/bling/bling_readparms.F,v 1.5 2017/01/20 00:31:49 mmazloff Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "BLING_OPTIONS.h" |
5 |
|
6 |
CBOP |
7 |
subroutine BLING_READPARMS( myThid ) |
8 |
|
9 |
C ========================================================== |
10 |
C | subroutine bling_readparms |
11 |
C | o Initialise and read parameters for BLING model |
12 |
C ========================================================== |
13 |
|
14 |
implicit none |
15 |
|
16 |
C === Global variables === |
17 |
#include "SIZE.h" |
18 |
#include "EEPARAMS.h" |
19 |
#include "PARAMS.h" |
20 |
#ifdef USE_EXFCO2 |
21 |
#include "EXF_OPTIONS.h" |
22 |
#ifdef USE_EXF_INTERPOLATION |
23 |
# ifdef ALLOW_EXCH2 |
24 |
# include "W2_EXCH2_SIZE.h" |
25 |
# include "W2_EXCH2_TOPOLOGY.h" |
26 |
# endif /* ALLOW_EXCH2 */ |
27 |
# include "SET_GRID.h" |
28 |
#endif /* USE_EXF_INTERPOLATION */ |
29 |
#include "EXF_PARAM.h" |
30 |
#include "EXF_CONSTANTS.h" |
31 |
#endif |
32 |
#include "BLING_VARS.h" |
33 |
|
34 |
C === Routine arguments === |
35 |
C myThid :: My Thread Id. number |
36 |
INTEGER myThid |
37 |
CEOP |
38 |
|
39 |
#ifdef ALLOW_BLING |
40 |
|
41 |
C === Local variables === |
42 |
C msgBuf :: Informational/error message buffer |
43 |
C iUnit :: Work variable for IO unit number |
44 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
45 |
INTEGER iUnit |
46 |
|
47 |
C ========================================================== |
48 |
C Abiotic parameters |
49 |
C ========================================================== |
50 |
|
51 |
NAMELIST /ABIOTIC_PARMS/ |
52 |
& permil, Pa2Atm |
53 |
|
54 |
C ========================================================== |
55 |
C BLING parameters |
56 |
C ========================================================== |
57 |
|
58 |
NAMELIST /BIOTIC_PARMS/ |
59 |
& pivotal, |
60 |
& Pc_0, |
61 |
& Pc_0_diaz, |
62 |
& lambda_0, |
63 |
& chl_min, |
64 |
& CtoN, |
65 |
& NO3toN, |
66 |
& HtoC, |
67 |
& O2toN, |
68 |
& CatoN, |
69 |
& masstoN, |
70 |
& alpha_photo, |
71 |
& theta_Fe_max_hi, |
72 |
& theta_Fe_max_lo, |
73 |
& gamma_irr_mem, |
74 |
& gamma_DON, |
75 |
& gamma_DOP, |
76 |
& gamma_POM, |
77 |
& k_Fe, |
78 |
& k_Fe_diaz, |
79 |
& k_O2, |
80 |
& k_NO3, |
81 |
& k_PO4, |
82 |
& k_PtoN, |
83 |
& k_FetoN, |
84 |
& kFe_eq_lig_max, |
85 |
& kFe_eq_lig_min, |
86 |
& kFe_eq_lig_Femin, |
87 |
& kFe_eq_lig_irr, |
88 |
& kFe_org, |
89 |
& kFe_inorg, |
90 |
& PtoN_min, |
91 |
& PtoN_max, |
92 |
& FetoN_min, |
93 |
& FetoN_max, |
94 |
& FetoC_sed, |
95 |
& remin_min, |
96 |
& oxic_min, |
97 |
& ligand, |
98 |
& kappa_eppley, |
99 |
& kappa_eppley_diaz, |
100 |
& kappa_remin, |
101 |
& ca_remin_depth, |
102 |
& phi_DOM, |
103 |
& phi_sm, |
104 |
& phi_lg, |
105 |
& phi_dvm, |
106 |
& sigma_dvm, |
107 |
& wsink0z, |
108 |
& wsink0, |
109 |
& wsinkacc, |
110 |
& parfrac, |
111 |
& alpfe, |
112 |
& k0, |
113 |
& epsln |
114 |
|
115 |
|
116 |
C ========================================================== |
117 |
C BLING forcing |
118 |
C ========================================================== |
119 |
|
120 |
NAMELIST /BLING_FORCING/ |
121 |
& bling_windFile, bling_atmospFile, bling_iceFile, |
122 |
& bling_ironFile, bling_silicaFile, |
123 |
& bling_psmFile, bling_plgFile, bling_PdiazFile, |
124 |
& bling_forcingPeriod, bling_forcingCycle, |
125 |
& bling_pCO2, river_conc_trac, |
126 |
& bling_Pc_2dFile, bling_Pc_2d_diazFile, |
127 |
& bling_alpha_photo2dFile,bling_phi_DOM2dFile, |
128 |
& bling_k_Fe2dFile, bling_k_Fe_diaz2dFile, |
129 |
& bling_gamma_POM2dFile, bling_wsink0_2dFile, |
130 |
& bling_phi_sm2dFile,bling_phi_lg2dFile |
131 |
#ifdef USE_EXFCO2 |
132 |
& ,apco2file |
133 |
& ,apco2startdate1, apco2startdate2, apco2period |
134 |
& ,exf_inscal_apco2, exf_outscal_apco2, apco2const, |
135 |
& apco2_exfremo_intercept, apco2_exfremo_slope |
136 |
#ifdef USE_EXF_INTERPOLATION |
137 |
& ,apco2_lon0, apco2_lon_inc, apco2_lat0, apco2_lat_inc, |
138 |
& apco2_nlon, apco2_nlat, apco2_interpMethod |
139 |
#endif /* USE_EXF_INTERPOLATION */ |
140 |
#endif |
141 |
|
142 |
C ========================================================== |
143 |
C permil :: set carbon mol/m3 <---> mol/kg conversion factor |
144 |
C default permil = 1024.5 kg/m3 |
145 |
C Pa2Atm :: Conversion factor for atmospheric pressure pLoad |
146 |
C (when coupled to atmospheric model) into Atm. |
147 |
C Default assumes pLoad in Pascal |
148 |
C 1 Atm = 1.01325e5 Pa = 1013.25 mb |
149 |
C |
150 |
C CtoP :: Carbon to phosphorus ratio in organic matter |
151 |
C NtoP :: Nitrogen to phosphorus ratio in organic matter |
152 |
C O2toP :: Oxygen to phosphorus for biological activity |
153 |
C CatoP :: Calcium to phosphorus uptake by small phyto |
154 |
C NUTfac :: If using nitrogen as macro-nutrient instead of , |
155 |
C phosphate, NUTfac is stoichiometric ratio N:P, |
156 |
C otherwise equal to 1. |
157 |
C Pstar :: Pivotal phytoplankton biomass |
158 |
C Pc_0 :: Maximum carbon-specific growth rate at 0C |
159 |
C lambda_0 :: Carbon-specific phytoplankton mortality rate |
160 |
C chl_min :: minimum chlorophyll concentration |
161 |
C theta_Fe_max_hi :: Maximum Chl:c ratio, abundant iron |
162 |
C theta_Fe_max_lo :: Maximum Chl:c ratio, extreme iron limitation |
163 |
C gamma_irr_mem :: Photoadaptation time scale |
164 |
C gamma_DOM :: Decay timescale of DOM |
165 |
C gamma_POM :: Remineralization rate of sinking POM |
166 |
C k_Fe :: Dissolved Fe uptake half-saturation constant |
167 |
C k_O2 :: Half-saturation constant for aerobic respiration |
168 |
C k_NUT :: Macro-nutrient uptake half-saturation constant |
169 |
C k_FetoN :: Half-saturation cellular Fe:N |
170 |
C FetoP_max :: Maximum Fe:P uptake ratio |
171 |
C FetoP_sed :: Fe:P in sediments |
172 |
C KFeLeq_max :: Maximum Fe-ligand stability constant |
173 |
C KFeLeq_min :: Minimum Fe-ligand stability constant |
174 |
C Fe_min :: Constant having to do with photodissociation |
175 |
C IFeL :: Iron ligand stability constant |
176 |
C kFe_org :: Organic-matter dependent scavenging rate |
177 |
C kFe_inorg :: Inorganic scavenging rate |
178 |
C remin_min :: Minimum anaerobic respiration rate |
179 |
C O2_min :: Minimum O2 concentration for aerobic respiration |
180 |
C Ligand :: Ligand concentration |
181 |
C kappa_eppley :: Temperature dependence of growth |
182 |
C kappa_remin :: Temperature dependence of remineralization |
183 |
C ca_remin_depth :: CaCO3 remineralization lengthscale |
184 |
C phi_DOM :: Fraction of non-sinking production to DOM |
185 |
C phi_sm :: Fraction of small phytoplankton biomass converted to detritus |
186 |
C phi_lg :: Fraction of large phytoplankton biomass converted to detritus |
187 |
C wsink0z :: Depth at which sinking rate starts increasing |
188 |
C wsink0 :: Initial sinking rate |
189 |
C wsinkacc :: Acceleration rate of sinking with depth |
190 |
C parfrac :: fraction of Qsw avail for photosynthesis |
191 |
C alpfe :: solubility of aeolian iron |
192 |
C k0 :: Light attentuation coefficient |
193 |
C epsln :: a very small number |
194 |
|
195 |
C secperday :: seconds in a day = 24*60*60 |
196 |
_RL secperday |
197 |
integer k |
198 |
#ifdef USE_EXF_INTERPOLATION |
199 |
INTEGER gridNx, gridNy |
200 |
INTEGER j |
201 |
_RL inp_lon0, inp_lat0, inp_dLon, inp_dLat |
202 |
#endif |
203 |
|
204 |
_BEGIN_MASTER(myThid) |
205 |
|
206 |
C ========================================================== |
207 |
C Default values |
208 |
|
209 |
secperday = 86400. _d 0 |
210 |
permil = 1. _d 0 / 1024.5 _d 0 |
211 |
Pa2Atm = 1.01325 _d 5 |
212 |
CtoN = 6.75 _d 0 |
213 |
HtoC = 48. _d 0 / 106. _d 0 |
214 |
O2toN = CtoN * (1. _d 0 + 0.25 _d 0 * HtoC) |
215 |
& + 2. _d 0 |
216 |
NO3toN = CtoN * (1. _d 0 + 0.25 _d 0 * HtoC) |
217 |
& * 0.8 _d 0 + 0.6 _d 0 |
218 |
CatoN = CtoN * 0.015 _d 0 |
219 |
masstoN = CtoN * 12.001 _d 0 |
220 |
pivotal = 1.9 _d -3 / 1028. _d 0 / CtoN / permil |
221 |
Pc_0 = 1.7 _d -5 |
222 |
Pc_0_diaz = 0.01 _d -5 |
223 |
lambda_0 = 0.19 _d 0 / secperday |
224 |
chl_min = 1. _d -5 |
225 |
Cxxx chl_min in ug kg-1 |
226 |
alpha_photo = 0.7 _d -5 * 2.77 _d 18 / 6.022 _d 17 |
227 |
Cxxx alpha_photo in g C g Chl-1 m2 W-1 s-1 |
228 |
theta_Fe_max_hi = 0.04 _d 0 |
229 |
theta_Fe_max_lo = 0.01 _d 0 |
230 |
gamma_irr_mem = 1. _d 0 / secperday |
231 |
gamma_DON = 0.25 _d 0 / (365.25 _d 0 * secperday) |
232 |
gamma_DOP = 0.5 _d 0 / (365.25 _d 0 * secperday) |
233 |
gamma_POM = 0.12 _d 0 / secperday |
234 |
cav k_Fe = 1.6 _d -10 / permil |
235 |
k_Fe = 8. _d -10 / permil |
236 |
k_Fe_diaz = 7. _d -10 / permil |
237 |
k_O2 = 20. _d -6 / permil |
238 |
k_NO3 = 2. _d -6 / permil |
239 |
cav k_PO4 = 1. _d -8 / permil |
240 |
k_PO4 = 1. _d -7 / permil |
241 |
k_PtoN = 1.5 _d -6 / permil |
242 |
k_FetoN = 8. _d -10 / permil |
243 |
PtoN_min = 1. / 28. |
244 |
PtoN_max = 1. / 9. |
245 |
FetoN_min = 2. _d -6 * 6.75 |
246 |
FetoN_max = 25. _d -6 * 6.75 |
247 |
FetoC_sed = 1. _d -4 |
248 |
kFe_eq_lig_max = 8.0 _d 10 * permil |
249 |
kFe_eq_lig_min = 8.0 _d 9 * permil |
250 |
kFe_eq_lig_Femin = 0.05 _d -9 / permil |
251 |
kFe_eq_lig_irr = 0.1 _d 0 |
252 |
kFe_org = 0.5 _d 0 / secperday * permil**(0.58) |
253 |
kFe_inorg = 1. _d 3 / secperday * permil**(0.5) |
254 |
remin_min = 0.15 _d 0 |
255 |
oxic_min = 1. _d -6 / permil |
256 |
Ligand = 1. _d -9 / permil |
257 |
kappa_eppley = 0.063 _d 0 |
258 |
kappa_eppley_diaz = 0.18 _d 0 |
259 |
kappa_remin = -0.032 _d 0 |
260 |
ca_remin_depth = 1343. _d 0 |
261 |
phi_DOM = 0.1 _d 0 |
262 |
phi_sm = 0.18 _d 0 |
263 |
phi_lg = 1. _d 0 |
264 |
phi_dvm = 0.2 _d 0 |
265 |
sigma_dvm = 40.0 _d 0 |
266 |
wsink0z = 80. _d 0 |
267 |
wsink0 = 16. _d 0 / secperday |
268 |
wsinkacc = 0.05 _d 0 / secperday |
269 |
parfrac = 0.4 _d 0 |
270 |
alpfe = 0.01 _d 0 |
271 |
k0 = 0.04 _d 0 |
272 |
epsln = 1. _d -30 |
273 |
|
274 |
bling_windFile = ' ' |
275 |
bling_atmospFile= ' ' |
276 |
bling_iceFile = ' ' |
277 |
bling_ironFile = ' ' |
278 |
bling_silicaFile= ' ' |
279 |
bling_psmFile = ' ' |
280 |
bling_plgFile = ' ' |
281 |
bling_pdiazFile = ' ' |
282 |
bling_pCO2 = 278. _d -6 |
283 |
DO k=1,8 |
284 |
river_conc_trac(k) = 0. _d 0 |
285 |
ENDDO |
286 |
bling_Pc_2dFile = ' ' |
287 |
bling_Pc_2d_diazFile = ' ' |
288 |
bling_alpha_photo2dFile= ' ' |
289 |
bling_k_Fe2dFile = ' ' |
290 |
bling_k_Fe_diaz2dFile = ' ' |
291 |
bling_gamma_POM2dFile = ' ' |
292 |
bling_wsink0_2dFile = ' ' |
293 |
bling_phi_DOM2dFile = ' ' |
294 |
bling_phi_sm2dFile = ' ' |
295 |
bling_phi_lg2dFile = ' ' |
296 |
|
297 |
#ifdef USE_EXFCO2 |
298 |
apco2startdate1 = 0 |
299 |
apco2startdate2 = 0 |
300 |
apco2period = 0.0 _d 0 |
301 |
apco2const = 0.0 _d 0 |
302 |
apco2_exfremo_intercept = 0.0 _d 0 |
303 |
apco2_exfremo_slope = 0.0 _d 0 |
304 |
apco2file = ' ' |
305 |
apco2startdate = 0. |
306 |
exf_inscal_apco2 = 1. _d 0 |
307 |
exf_outscal_apco2 = 1. _d 0 |
308 |
#ifdef USE_EXF_INTERPOLATION |
309 |
C-- set default input location to match (in case of simple Lat-Lonp |
310 |
Cgrid) |
311 |
C model grid cell-center position (leading to trivial interpolation) |
312 |
inp_lon0 = xgOrigin + delX(1)*exf_half |
313 |
inp_lat0 = ygOrigin + delY(1)*exf_half |
314 |
inp_dLon = delX(1) |
315 |
inp_dLat = delY(1) |
316 |
apco2_lon0 = inp_lon0 |
317 |
apco2_lat0 = inp_lat0 |
318 |
apco2_nlon = gridNx |
319 |
apco2_nlat = gridNy |
320 |
apco2_lon_inc = inp_dLon |
321 |
DO j=1,MAX_LAT_INC |
322 |
IF (j.LT.gridNy) THEN |
323 |
inp_dLat = (delY(j) + delY(j+1))*exf_half |
324 |
ELSE |
325 |
inp_dLat = 0. |
326 |
ENDIF |
327 |
apco2_lat_inc(j) = inp_dLat |
328 |
ENDDO |
329 |
#endif /* USE_EXF_INTERPOLATION */ |
330 |
#endif |
331 |
|
332 |
c default periodic forcing to same as for physics |
333 |
bling_forcingPeriod = externForcingPeriod |
334 |
bling_forcingCycle = externForcingCycle |
335 |
|
336 |
WRITE(msgBuf,'(A)') ' BLING_READPARMS: opening data.bling' |
337 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
338 |
I SQUEEZE_RIGHT, myThid ) |
339 |
|
340 |
CALL OPEN_COPY_DATA_FILE( 'data.bling', 'BLING_READPARMS', |
341 |
O iUnit, myThid ) |
342 |
|
343 |
C-- Read parameters from open data file: |
344 |
|
345 |
C- Abiotic parameters |
346 |
READ(UNIT=iUnit,NML=ABIOTIC_PARMS) |
347 |
|
348 |
C- BLING parameters |
349 |
READ(UNIT=iUnit,NML=BIOTIC_PARMS) |
350 |
|
351 |
C- forcing filenames and parameters |
352 |
READ(UNIT=iUnit,NML=BLING_FORCING) |
353 |
|
354 |
WRITE(msgBuf,'(A)') |
355 |
& ' BLING_READPARMS: finished reading data.BLING' |
356 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
357 |
I SQUEEZE_RIGHT, myThid ) |
358 |
|
359 |
C-- Close the open data file |
360 |
CLOSE(iUnit) |
361 |
|
362 |
C- derive other parameters: |
363 |
|
364 |
QSW_underice = .FALSE. |
365 |
#ifdef USE_QSW_UNDERICE |
366 |
QSW_underice = .TRUE. |
367 |
#elif (defined (USE_QSW)) |
368 |
C if using Qsw and seaice, then ice fraction is already |
369 |
C taken into account |
370 |
IF ( useSEAICE ) QSW_underice = .TRUE. |
371 |
IF ( useThSIce ) QSW_underice = .TRUE. |
372 |
#endif |
373 |
|
374 |
_END_MASTER(myThid) |
375 |
|
376 |
C-- Everyone else must wait for the parameters to be loaded |
377 |
_BARRIER |
378 |
|
379 |
#endif /* ALLOW_BLING */ |
380 |
|
381 |
RETURN |
382 |
END |
383 |
|