/[MITgcm]/MITgcm/pkg/bling/bling_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/bling/bling_readparms.F

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


Revision 1.4 - (show annotations) (download)
Thu Oct 27 17:55:31 2016 UTC (7 years, 7 months ago) by mmazloff
Branch: MAIN
CVS Tags: checkpoint66c, checkpoint66b
Changes since 1.3: +6 -2 lines
Allow for ICs of phytoplankton abundance. (BLING_VARS.h bling_init_varia.F bling_readparms.F)
Reduce default Fe sediment flux. (bling_remineralization.F)
Remove unnecessary apco2 read call. (bling_main.F)

1 C $Header: /u/gcmpack/MITgcm/pkg/bling/bling_readparms.F,v 1.3 2016/10/20 15:32:34 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 #ifdef USE_EXFCO2
127 & ,apco2file
128 & ,apco2startdate1, apco2startdate2, apco2period
129 & ,exf_inscal_apco2, exf_outscal_apco2, apco2const,
130 & apco2_exfremo_intercept, apco2_exfremo_slope
131 #ifdef USE_EXF_INTERPOLATION
132 & ,apco2_lon0, apco2_lon_inc, apco2_lat0, apco2_lat_inc,
133 & apco2_nlon, apco2_nlat, apco2_interpMethod
134 #endif /* USE_EXF_INTERPOLATION */
135 #endif
136
137 C ==========================================================
138 C permil :: set carbon mol/m3 <---> mol/kg conversion factor
139 C default permil = 1024.5 kg/m3
140 C Pa2Atm :: Conversion factor for atmospheric pressure pLoad
141 C (when coupled to atmospheric model) into Atm.
142 C Default assumes pLoad in Pascal
143 C 1 Atm = 1.01325e5 Pa = 1013.25 mb
144 C
145 C CtoP :: Carbon to phosphorus ratio in organic matter
146 C NtoP :: Nitrogen to phosphorus ratio in organic matter
147 C O2toP :: Oxygen to phosphorus for biological activity
148 C CatoP :: Calcium to phosphorus uptake by small phyto
149 C NUTfac :: If using nitrogen as macro-nutrient instead of ,
150 C phosphate, NUTfac is stoichiometric ratio N:P,
151 C otherwise equal to 1.
152 C Pstar :: Pivotal phytoplankton biomass
153 C Pc_0 :: Maximum carbon-specific growth rate at 0C
154 C lambda_0 :: Carbon-specific phytoplankton mortality rate
155 C chl_min :: minimum chlorophyll concentration
156 C theta_Fe_max_hi :: Maximum Chl:c ratio, abundant iron
157 C theta_Fe_max_lo :: Maximum Chl:c ratio, extreme iron limitation
158 C gamma_irr_mem :: Photoadaptation time scale
159 C gamma_DOM :: Decay timescale of DOM
160 C gamma_POM :: Remineralization rate of sinking POM
161 C k_Fe :: Dissolved Fe uptake half-saturation constant
162 C k_O2 :: Half-saturation constant for aerobic respiration
163 C k_NUT :: Macro-nutrient uptake half-saturation constant
164 C k_FetoN :: Half-saturation cellular Fe:N
165 C FetoP_max :: Maximum Fe:P uptake ratio
166 C FetoP_sed :: Fe:P in sediments
167 C KFeLeq_max :: Maximum Fe-ligand stability constant
168 C KFeLeq_min :: Minimum Fe-ligand stability constant
169 C Fe_min :: Constant having to do with photodissociation
170 C IFeL :: Iron ligand stability constant
171 C kFe_org :: Organic-matter dependent scavenging rate
172 C kFe_inorg :: Inorganic scavenging rate
173 C remin_min :: Minimum anaerobic respiration rate
174 C O2_min :: Minimum O2 concentration for aerobic respiration
175 C Ligand :: Ligand concentration
176 C kappa_eppley :: Temperature dependence of growth
177 C kappa_remin :: Temperature dependence of remineralization
178 C ca_remin_depth :: CaCO3 remineralization lengthscale
179 C phi_DOM :: Fraction of non-sinking production to DOM
180 C phi_sm :: Fraction of small phytoplankton biomass converted to detritus
181 C phi_lg :: Fraction of large phytoplankton biomass converted to detritus
182 C wsink0z :: Depth at which sinking rate starts increasing
183 C wsink0 :: Initial sinking rate
184 C wsinkacc :: Acceleration rate of sinking with depth
185 C parfrac :: fraction of Qsw avail for photosynthesis
186 C alpfe :: solubility of aeolian iron
187 C k0 :: Light attentuation coefficient
188 C epsln :: a very small number
189
190 C secperday :: seconds in a day = 24*60*60
191 _RL secperday
192 integer k
193 #ifdef USE_EXF_INTERPOLATION
194 INTEGER gridNx, gridNy
195 INTEGER j
196 _RL inp_lon0, inp_lat0, inp_dLon, inp_dLat
197 #endif
198
199 _BEGIN_MASTER(myThid)
200
201 C ==========================================================
202 C Default values
203
204 secperday = 86400. _d 0
205 permil = 1. _d 0 / 1024.5 _d 0
206 Pa2Atm = 1.01325 _d 5
207 CtoN = 6.75 _d 0
208 HtoC = 48. _d 0 / 106. _d 0
209 O2toN = CtoN * (1. _d 0 + 0.25 _d 0 * HtoC)
210 & + 2. _d 0
211 NO3toN = CtoN * (1. _d 0 + 0.25 _d 0 * HtoC)
212 & * 0.8 _d 0 + 0.6 _d 0
213 CatoN = CtoN * 0.015 _d 0
214 masstoN = CtoN * 12.001 _d 0
215 pivotal = 1.9 _d -3 / 1028. _d 0 / CtoN / permil
216 Pc_0 = 1.7 _d -5
217 Pc_0_diaz = 0.01 _d -5
218 lambda_0 = 0.19 _d 0 / secperday
219 chl_min = 1. _d -5
220 Cxxx chl_min in ug kg-1
221 alpha_photo = 0.7 _d -5 * 2.77 _d 18 / 6.022 _d 17
222 Cxxx alpha_photo in g C g Chl-1 m2 W-1 s-1
223 theta_Fe_max_hi = 0.04 _d 0
224 theta_Fe_max_lo = 0.01 _d 0
225 gamma_irr_mem = 1. _d 0 / secperday
226 gamma_DON = 0.25 _d 0 / (365.25 _d 0 * secperday)
227 gamma_DOP = 0.5 _d 0 / (365.25 _d 0 * secperday)
228 gamma_POM = 0.12 _d 0 / secperday
229 cav k_Fe = 1.6 _d -10 / permil
230 k_Fe = 8. _d -10 / permil
231 k_Fe_diaz = 7. _d -10 / permil
232 k_O2 = 20. _d -6 / permil
233 k_NO3 = 2. _d -6 / permil
234 cav k_PO4 = 1. _d -8 / permil
235 k_PO4 = 1. _d -7 / permil
236 k_PtoN = 1.5 _d -6 / permil
237 k_FetoN = 8. _d -10 / permil
238 PtoN_min = 1. / 28.
239 PtoN_max = 1. / 9.
240 FetoN_min = 2. _d -6 * 6.75
241 FetoN_max = 25. _d -6 * 6.75
242 FetoC_sed = 1. _d -4
243 kFe_eq_lig_max = 8.0 _d 10 * permil
244 kFe_eq_lig_min = 8.0 _d 9 * permil
245 kFe_eq_lig_Femin = 0.05 _d -9 / permil
246 kFe_eq_lig_irr = 0.1 _d 0
247 kFe_org = 0.5 _d 0 / secperday * permil**(0.58)
248 kFe_inorg = 1. _d 3 / secperday * permil**(0.5)
249 remin_min = 0.15 _d 0
250 oxic_min = 1. _d -6 / permil
251 Ligand = 1. _d -9 / permil
252 kappa_eppley = 0.063 _d 0
253 kappa_eppley_diaz = 0.18 _d 0
254 kappa_remin = -0.032 _d 0
255 ca_remin_depth = 1343. _d 0
256 phi_DOM = 0.1 _d 0
257 phi_sm = 0.18 _d 0
258 phi_lg = 1. _d 0
259 phi_dvm = 0.2 _d 0
260 sigma_dvm = 40.0 _d 0
261 wsink0z = 80. _d 0
262 wsink0 = 16. _d 0 / secperday
263 wsinkacc = 0.05 _d 0 / secperday
264 parfrac = 0.4 _d 0
265 alpfe = 0.01 _d 0
266 k0 = 0.04 _d 0
267 epsln = 1. _d -30
268
269 bling_windFile = ' '
270 bling_atmospFile= ' '
271 bling_iceFile = ' '
272 bling_ironFile = ' '
273 bling_silicaFile= ' '
274 bling_psmFile= ' '
275 bling_plgFile= ' '
276 bling_pdiazFile= ' '
277 bling_pCO2 = 278. _d -6
278 DO k=1,8
279 river_conc_trac(k) = 0. _d 0
280 ENDDO
281
282 #ifdef USE_EXFCO2
283 apco2startdate1 = 0
284 apco2startdate2 = 0
285 apco2period = 0.0 _d 0
286 apco2const = 0.0 _d 0
287 apco2_exfremo_intercept = 0.0 _d 0
288 apco2_exfremo_slope = 0.0 _d 0
289 apco2file = ' '
290 apco2startdate = 0.
291 exf_inscal_apco2 = 1. _d 0
292 exf_outscal_apco2 = 1. _d 0
293 #ifdef USE_EXF_INTERPOLATION
294 C-- set default input location to match (in case of simple Lat-Lonp
295 Cgrid)
296 C model grid cell-center position (leading to trivial interpolation)
297 inp_lon0 = xgOrigin + delX(1)*exf_half
298 inp_lat0 = ygOrigin + delY(1)*exf_half
299 inp_dLon = delX(1)
300 inp_dLat = delY(1)
301 apco2_lon0 = inp_lon0
302 apco2_lat0 = inp_lat0
303 apco2_nlon = gridNx
304 apco2_nlat = gridNy
305 apco2_lon_inc = inp_dLon
306 DO j=1,MAX_LAT_INC
307 IF (j.LT.gridNy) THEN
308 inp_dLat = (delY(j) + delY(j+1))*exf_half
309 ELSE
310 inp_dLat = 0.
311 ENDIF
312 apco2_lat_inc(j) = inp_dLat
313 ENDDO
314 #endif /* USE_EXF_INTERPOLATION */
315 #endif
316
317 c default periodic forcing to same as for physics
318 bling_forcingPeriod = externForcingPeriod
319 bling_forcingCycle = externForcingCycle
320
321 WRITE(msgBuf,'(A)') ' BLING_READPARMS: opening data.bling'
322 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
323 I SQUEEZE_RIGHT, myThid )
324
325 CALL OPEN_COPY_DATA_FILE( 'data.bling', 'BLING_READPARMS',
326 O iUnit, myThid )
327
328 C-- Read parameters from open data file:
329
330 C- Abiotic parameters
331 READ(UNIT=iUnit,NML=ABIOTIC_PARMS)
332
333 C- BLING parameters
334 READ(UNIT=iUnit,NML=BIOTIC_PARMS)
335
336 C- forcing filenames and parameters
337 READ(UNIT=iUnit,NML=BLING_FORCING)
338
339 WRITE(msgBuf,'(A)')
340 & ' BLING_READPARMS: finished reading data.BLING'
341 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
342 I SQUEEZE_RIGHT, myThid )
343
344 C-- Close the open data file
345 CLOSE(iUnit)
346
347 C- derive other parameters:
348
349 QSW_underice = .FALSE.
350 #ifdef USE_QSW_UNDERICE
351 QSW_underice = .TRUE.
352 #elif (defined (USE_QSW))
353 C if using Qsw and seaice, then ice fraction is already
354 C taken into account
355 IF ( useSEAICE ) QSW_underice = .TRUE.
356 IF ( useThSIce ) QSW_underice = .TRUE.
357 #endif
358
359 _END_MASTER(myThid)
360
361 C-- Everyone else must wait for the parameters to be loaded
362 _BARRIER
363
364 #endif /* ALLOW_BLING */
365
366 RETURN
367 END
368

  ViewVC Help
Powered by ViewVC 1.1.22