Back to home page

MITgcm

 
 

    


File indexing completed on 2025-09-17 05:08:23 UTC

view on githubraw file Latest commit e9828181 on 2025-09-16 19:00:16 UTC
c0d1c06c15 Matt*0001 #include "BLING_OPTIONS.h"
041f4605e9 Jean*0002 #ifdef ALLOW_EXF
                0003 # include "EXF_OPTIONS.h"
                0004 #endif
c0d1c06c15 Matt*0005 
                0006 CBOP
be72e7ae9e Jean*0007       SUBROUTINE BLING_READPARMS( myThid )
c0d1c06c15 Matt*0008 
be72e7ae9e Jean*0009 C     *========================================================*
c0d1c06c15 Matt*0010 C     | subroutine bling_readparms
                0011 C     | o Initialise and read parameters for BLING model
be72e7ae9e Jean*0012 C     *========================================================*
c0d1c06c15 Matt*0013 
e0f9a7ba0b Matt*0014       IMPLICIT NONE
c0d1c06c15 Matt*0015 
                0016 C     === Global variables ===
                0017 #include "SIZE.h"
                0018 #include "EEPARAMS.h"
                0019 #include "PARAMS.h"
e0f9a7ba0b Matt*0020 #ifdef ALLOW_EXF
041f4605e9 Jean*0021 # include "EXF_PARAM.h"
9f0da36f91 Jean*0022 # include "EXF_INTERP_SIZE.h"
                0023 # include "EXF_INTERP_PARAM.h"
e0f9a7ba0b Matt*0024 #endif /* ALLOW_EXF */
c0d1c06c15 Matt*0025 #include "BLING_VARS.h"
                0026 
                0027 C     === Routine arguments ===
                0028 C     myThid    :: My Thread Id. number
                0029       INTEGER myThid
                0030 CEOP
                0031 
                0032 #ifdef ALLOW_BLING
                0033 
                0034 C     === Local variables ===
                0035 C     msgBuf    :: Informational/error message buffer
530382a175 Jean*0036 C     errCount  :: error counter
c0d1c06c15 Matt*0037 C     iUnit     :: Work variable for IO unit number
                0038       CHARACTER*(MAX_LEN_MBUF) msgBuf
530382a175 Jean*0039       INTEGER errCount
c0d1c06c15 Matt*0040       INTEGER iUnit
                0041 
                0042 C ==========================================================
                0043 C   Abiotic parameters
e0f9a7ba0b Matt*0044 C  selectBTconst :: estimates borate concentration from salinity
                0045 C     selectBTconst=1 for the default formulation of Uppströ1974) i.e.
                0046 C     the same as S/R CARBON_COEFFS
                0047 C     selectBTconst=2 for the new formulation from Lee et al (2010)
                0048 C  selectFTconst :: estimates fluoride concentration from salinity
                0049 C     selectFTconst=1 for the default formulation of Riley (1965) i.e.
                0050 C     the same as S/R CARBON_COEFFS
                0051 C     selectFTconst=2 for the new formulation from Culkin (1965)
                0052 C  selectHFconst :: sets the first dissociation constant for hydrogen
                0053 C  fluoride:
                0054 C     selectHFconst=1 for the default  Dickson and Riley (1979) i.e. the
                0055 C     same as S/R CARBON_COEFFS
                0056 C     selectHFconst=2 for the formulation of Perez and Fraga (1987)
                0057 C  selectK1K2const :: sets the first and second dissociation constants
                0058 C  of carbonic acid:
                0059 C     selectK1K2const=1 for the default formulation of Millero (1995)
                0060 C     with data from Mehrbach et al. (1973),
                0061 C          i.e. the same as S/R CARBON_COEFFS
                0062 C     selectK1K2const=2 for the formulation of Roy et al. (1993)
                0063 C     selectK1K2const=3 for the "combination" formulation of Millero
                0064 C     (1995)
                0065 C     selectK1K2const=4 for the formulation of Luecker et al. (2000)
                0066 C     selectK1K2const=5 for the formulation of Millero (2010, Mar. Fresh
                0067 C     Wat. Res.)
                0068 C     selectK1K2const=6 for the formulation of Waters, Millero, Woosley
                0069 C     (2014, Mar. Chem.)
                0070 C  selectPHsolver  :: sets the pH solver to use
                0071 C     selectPHsolver=0 for Follows et al., (2006)
                0072 C     selectPHsolver=1 for Munhoven (2013) solvesaphe general
                0073 C     selectPHsolver=2 for Munhoven (2013) solvesaphe sec
                0074 C     selectPHsolver=3 for Munhoven (2013) solvesaphe fast
c0d1c06c15 Matt*0075 C ==========================================================
                0076 
be72e7ae9e Jean*0077       NAMELIST /ABIOTIC_PARMS/
e0f9a7ba0b Matt*0078      &                      permil,
                0079      &                      Pa2Atm,
                0080      &                      epsln
                0081 #ifdef CARBONCHEM_SOLVESAPHE
                0082      & ,selectBTconst,selectFTconst,
                0083      &  selectHFconst,selectK1K2const,
                0084      &  selectPHsolver
                0085 #endif
c0d1c06c15 Matt*0086 
                0087 C ==========================================================
                0088 C   BLING parameters
                0089 C ==========================================================
                0090 
                0091       NAMELIST /BIOTIC_PARMS/
                0092      &                     CtoN,
e0f9a7ba0b Matt*0093      &                     CtoP,
                0094      &                     NtoP,
c0d1c06c15 Matt*0095      &                     HtoC,
e0f9a7ba0b Matt*0096      &                     NO3toN,
c0d1c06c15 Matt*0097      &                     O2toN,
e0f9a7ba0b Matt*0098      &                     O2toP,
c0d1c06c15 Matt*0099      &                     CatoN,
e0f9a7ba0b Matt*0100      &                     CatoP,
c0d1c06c15 Matt*0101      &                     masstoN,
e0f9a7ba0b Matt*0102 #ifndef USE_BLING_V1
                0103      &                     Pc_0_diaz,
c0d1c06c15 Matt*0104      &                     alpha_photo,
e0f9a7ba0b Matt*0105      &                     gamma_DON,
                0106      &                     k_Fe_diaz,
                0107      &                     k_NO3,
                0108      &                     k_PtoN,
                0109      &                     k_FetoN,
9edc0e3a85 aver*0110      &                     k_NO3_sm,
                0111      &                     k_NO3_lg,
                0112      &                     k_PO4_sm,
                0113      &                     k_PO4_lg,
                0114      &                     k_Fe_sm,
                0115      &                     k_Fe_lg,
e0f9a7ba0b Matt*0116      &                     PtoN_min,
                0117      &                     PtoN_max,
                0118      &                     FetoN_min,
                0119      &                     FetoN_max,
                0120      &                     kappa_eppley_diaz,
                0121      &                     phi_dvm,
                0122      &                     sigma_dvm,
                0123 #ifdef USE_SIBLING
                0124      &                     k_Si,
                0125      &                     gamma_Si_0,
                0126      &                     kappa_remin_Si,
                0127      &                     wsink_Si,
00fa2d4ddd mmaz*0128      &                     SitoN_uptake_min,
                0129      &                     SitoN_uptake_max,
                0130      &                     SitoN_uptake_scale,
                0131      &                     SitoN_uptake_exp,
e0f9a7ba0b Matt*0132      &                     q_SitoN_diss,
                0133 #endif
                0134 #else
                0135      &                     alpha_max,
                0136      &                     alpha_min,
                0137      &                     gamma_biomass,
                0138      &                     k_FetoP,
                0139      &                     FetoP_max,
                0140      &                     Fe_lim_min,
                0141 #endif
                0142      &                     pivotal,
                0143      &                     Pc_0,
                0144      &                     lambda_0,
                0145      &                     resp_frac,
                0146      &                     chl_min,
c0d1c06c15 Matt*0147      &                     theta_Fe_max_hi,
                0148      &                     theta_Fe_max_lo,
                0149      &                     gamma_irr_mem,
                0150      &                     gamma_DOP,
                0151      &                     gamma_POM,
                0152      &                     k_Fe,
                0153      &                     k_O2,
                0154      &                     k_PO4,
                0155      &                     kFe_eq_lig_max,
                0156      &                     kFe_eq_lig_min,
                0157      &                     kFe_eq_lig_Femin,
be72e7ae9e Jean*0158      &                     kFe_eq_lig_irr,
c0d1c06c15 Matt*0159      &                     kFe_org,
                0160      &                     kFe_inorg,
                0161      &                     FetoC_sed,
                0162      &                     remin_min,
                0163      &                     oxic_min,
                0164      &                     ligand,
                0165      &                     kappa_eppley,
                0166      &                     kappa_remin,
                0167      &                     ca_remin_depth,
                0168      &                     phi_DOM,
                0169      &                     phi_sm,
                0170      &                     phi_lg,
                0171      &                     wsink0z,
                0172      &                     wsink0,
                0173      &                     wsinkacc,
                0174      &                     parfrac,
                0175      &                     alpfe,
                0176      &                     k0,
e0f9a7ba0b Matt*0177      &                     MLmix_max,
82e538d851 aver*0178      &                     chlsat_locTimWindow,
e0f9a7ba0b Matt*0179      &                     river_conc_po4,
                0180      &                     river_dom_to_nut
c0d1c06c15 Matt*0181 
                0182 C ==========================================================
                0183 C   BLING forcing
                0184 C ==========================================================
                0185 
                0186       NAMELIST /BLING_FORCING/
                0187      &          bling_windFile, bling_atmospFile, bling_iceFile,
54b6d6aa91 Matt*0188      &          bling_ironFile, bling_silicaFile,
                0189      &          bling_psmFile, bling_plgFile, bling_PdiazFile,
c0d1c06c15 Matt*0190      &          bling_forcingPeriod, bling_forcingCycle,
47de7c1e0e Matt*0191      &          bling_Pc_2dFile, bling_Pc_2d_diazFile,
e9828181c3 Yixi*0192      &          bling_k0_2dFile,
af8f3b9ffc Matt*0193      &          bling_alpha_photo2dFile,bling_phi_DOM2dFile,
                0194      &          bling_k_Fe2dFile, bling_k_Fe_diaz2dFile,
                0195      &          bling_gamma_POM2dFile, bling_wsink0_2dFile,
e0f9a7ba0b Matt*0196      &          bling_phi_sm2dFile,bling_phi_lg2dFile,
                0197      &          bling_pCO2,
                0198      &          river_conc_po4, river_dom_to_nut
                0199 #ifdef ALLOW_EXF
                0200      &         ,apco2file, apco2startdate1, apco2startdate2,
041f4605e9 Jean*0201      &          apco2RepCycle, apco2period, apco2StartTime,
530382a175 Jean*0202      &          exf_inscal_apco2, exf_outscal_apco2, apco2const,
079948e6a6 Matt*0203      &          apco2_exfremo_intercept, apco2_exfremo_slope
                0204 #ifdef USE_EXF_INTERPOLATION
e0f9a7ba0b Matt*0205      &         ,apco2_lon0, apco2_lon_inc, apco2_lat0, apco2_lat_inc,
079948e6a6 Matt*0206      &          apco2_nlon, apco2_nlat, apco2_interpMethod
                0207 #endif /* USE_EXF_INTERPOLATION */
e0f9a7ba0b Matt*0208 #endif /* ALLOW_EXF */
c0d1c06c15 Matt*0209 
                0210 C ==========================================================
e0f9a7ba0b Matt*0211 C   secperday        :: Seconds in a day = 24*60*60
                0212 C   permil           :: Set carbon mol/m3 <---> mol/kg conversion factor
                0213 C                       Default permil = 1024.5 kg/m3
                0214 C   Pa2Atm           :: Conversion factor for atmospheric pressure from EXF
cab777d667 Matt*0215 C                       1 Atm = 1.01325e5 Pa = 1013.25 mb
e0f9a7ba0b Matt*0216 C   epsln            :: A very small number
                0217 C   CtoN             :: Carbon to nitrogen ratio in organic matter
                0218 C   CtoP             :: Carbon to phosphorus ratio in organic matter
                0219 C   NtoP             :: Nitrogen to phosphorus ratio in organic matter
                0220 C   HtoC             :: Reduced hydrogen to carbon ratio in organic matter
                0221 C   NO3toN           :: Nitrate to organic nitrogen ratio for denitrification
                0222 C   O2toN            :: Oxygen to nitrogen for biological activity
                0223 C   O2toP            :: Oxygen to phosphorus for biological activity
                0224 C   CatoN            :: Calcium to nitrogen uptake by small phyto
                0225 C   CatoP            :: Calcium to phosphorus uptake by small phyto
                0226 C   masstoN          :: Organic matter mass to nitrogen ratio
                0227 C   pivotal          :: Pivotal phytoplankton biomass, for grazing law
                0228 C                       [mol P m-3  or  mol N m-3]
cab777d667 Matt*0229 C   Pc_0             :: Maximum phytoplankton carbon-specific growth rate at 0C
                0230 C   Pc_0_diaz        :: Maximum diazotroph carbon-specific growth rate at 0C
e0f9a7ba0b Matt*0231 C   lambda_0         :: Total mortality rate constant
                0232 C   resp_frac        :: Fraction of production that is respired
                0233 C   chl_min          :: Minimum chl concentration allowed (for numerical stability)
                0234 C   alpha_photo      :: Quantum yield under low light, Fe-replete
                0235 C                       [g C g Chl-1 m2 W-1 s-1]
                0236 C   alpha_max        :: Quantum yield under low light, abundant iron
                0237 C   alpha_min        :: Quantum yield under low light, iron limited
                0238 C   theta_Fe_max_hi  :: Maximum Chl:C ratio when iron-replete
                0239 C   theta_Fe_max_lo  :: Maximum Chl:C ratio when iron-limited
                0240 C   gamma_irr_mem    :: Photoadaptation timescale
                0241 C   gamma_DON        :: Dissolved organic nitrogen decay timescale
                0242 C   gamma_DOP        :: Dissolved organic phosphorus decay timescale
                0243 C   gamma_POM        :: Particulate Organic Matter decay timescale
                0244 C   gamma_biomass    :: Biomass adjustment time scale
                0245 C   gamma_Si_0       :: Opal dissolution timescale
                0246 C   k_Fe             :: Iron half-saturation concentration
                0247 C   k_Fe_diaz        :: Iron half-saturation concentration for diazotrophs
                0248 C   k_O2             :: Oxygen half-saturation concentration for aerobic respiration
                0249 C   k_PO4            :: Phosphate half-saturation concentration
                0250 C   k_NO3            :: Nitrate half-saturation concentration
                0251 C   k_Si             :: Silicate half-saturation concentration
                0252 C   k_PtoN           :: Phosphate half-saturation concentration for uptake ratio
                0253 C   k_FetoN          :: Iron half-saturation concentration for uptake ratio
                0254 C   k_FetoP          :: Iron half-saturation concentration for uptake ratio
                0255 C   kFe_eq_lig_max   :: Maximum light-dependent iron ligand stability constant
                0256 C   kFe_eq_lig_min   :: Minimum light-dependent iron ligand stability constant
                0257 C   kFe_eq_lig_Femin :: Low-iron threshold for ligand stability constant
                0258 C   kFe_eq_lig_irr   :: Irradiance scaling for iron ligand stability constant
                0259 C   kFe_org          :: Iron scavenging, 1st order
                0260 C   kFe_inorg        :: Iron scavenging, 2nd order
                0261 C   PtoN_max         :: Phosphorus to Nitrogen uptake ratio maximum
                0262 C   PtoN_min         :: Phosphorus to Nitrogen uptake ratio minimum
                0263 C   FetoN_max        :: Iron to Nitrogen uptake ratio maximum
                0264 C   FetoN_min        :: Iron to Nitrogen uptake ratio minimum
                0265 C   FetoC_sed        :: Iron released per organic carbon delivery to sediments
                0266 C   FetoP_max        :: Iron to Phosphorus uptake ratio maximum
                0267 C   Fe_lim_min       :: Minimum iron limitation
00fa2d4ddd mmaz*0268 C   SitoN_uptake_max :: Silica to Nitrogen uptake ratio maximum
                0269 C   SitoN_uptake_min :: Silica to Nitrogen uptake ratio minimum
                0270 C   SitoN_uptake_scale:: Scale factor for Silica to Nitrogen uptake ratio
                0271 C   SitoN_uptake_exp :: Exponent for Silica to Nitrogen uptake ratio
e0f9a7ba0b Matt*0272 C   remin_min        :: Minimum remineralization under anoxia
                0273 C   oxic_min         :: Anaerobic respiration threshold
                0274 C   ligand           :: Iron ligand concentration
                0275 C   kappa_eppley     :: Temperature dependence of growth
cab777d667 Matt*0276 C   kappa_eppley_diaz:: Temperature dependence of growth for diazotrophs
e0f9a7ba0b Matt*0277 C   kappa_remin      :: Temperature dependence for particle fractionation
                0278 C   kappa_remin_Si   :: Temperature dependence for silica
                0279 C   ca_remin_depth   :: CaCO3 dissolution length scale (subject to omega)
                0280 C   q_SitoN_diss     :: Stoichiometric role in opal dissolution, following TOPAZ
                0281 C   phi_DOM          :: Fraction of uptake/consumption that becomes DOM
cab777d667 Matt*0282 C   phi_sm           :: Fraction of small phytoplankton biomass converted to detritus
                0283 C   phi_lg           :: Fraction of large phytoplankton biomass converted to detritus
e0f9a7ba0b Matt*0284 C   phi_dvm          :: Fraction of particate production exported by animals
                0285 C   sigma_dvm        :: Standard deviation of vertical migrator resting depth range
                0286 C   wsink0           :: Sinking rate at surface
                0287 C   wsink0z          :: Depth to which sinking rate remains constant
                0288 C   wsinkacc         :: Sinking rate acceleration with depth
                0289 C   wsink_si         :: Opal sinking velocity
                0290 C   parfrac          :: Fraction of Qsw available for photosynthesis
                0291 C   alpfe            :: Solubility of aeolian iron
                0292 C   k0               :: Light attentuation coefficient
                0293 C   MLmix_max        :: Maximum depth over which light and biomass can be mixed
                0294 C   river_conc_po4   :: Phosphate concentration in river runoff
                0295 C   river_dom_to_nut :: DOM to PO4 ratio in river runoff
82e538d851 aver*0296 C   chlsat_locTimWindow(1:2) :: local-time window (in h) for
                0297 C                       satellite-equivalent chlorophyll diagnostic (and cost)
e0f9a7ba0b Matt*0298 
c0d1c06c15 Matt*0299       _RL secperday
e0f9a7ba0b Matt*0300 #ifdef ALLOW_EXF
                0301 #ifdef USE_EXF_INTERPOLATION
079948e6a6 Matt*0302       INTEGER j
e0f9a7ba0b Matt*0303 #endif /* USE_EXF_INTERPOLATION */
                0304 #endif /* ALLOW_EXF */
c0d1c06c15 Matt*0305 
                0306       _BEGIN_MASTER(myThid)
530382a175 Jean*0307       errCount = 0
c0d1c06c15 Matt*0308 
                0309 C ==========================================================
                0310 C     Default values
                0311 
                0312       secperday            = 86400. _d 0
                0313       permil               = 1. _d 0 / 1024.5 _d 0
                0314       Pa2Atm               = 1.01325 _d 5
e0f9a7ba0b Matt*0315       epsln                = 1. _d -30
                0316 #ifdef CARBONCHEM_SOLVESAPHE
                0317        selectBTconst   = 1
                0318        selectFTconst   = 1
                0319        selectHFconst   = 1
                0320        selectK1K2const = 1
                0321        selectPHsolver  = 0
                0322 #endif
                0323 
c0d1c06c15 Matt*0324       CtoN                 = 6.75 _d 0
e0f9a7ba0b Matt*0325       CtoP                 = 106. _d 0
                0326       NtoP                 = 16. _d 0
c0d1c06c15 Matt*0327       HtoC                 = 48. _d 0 / 106. _d 0
be72e7ae9e Jean*0328       NO3toN               = CtoN * (1. _d 0 + 0.25 _d 0 * HtoC)
c0d1c06c15 Matt*0329      &                        * 0.8 _d 0 + 0.6 _d 0
e0f9a7ba0b Matt*0330       O2toN                = CtoN * (1. _d 0 + 0.25 _d 0 * HtoC)
                0331      &                        + 2. _d 0
                0332       O2toP                = 150. _d 0
c0d1c06c15 Matt*0333       CatoN                = CtoN * 0.015 _d 0
e0f9a7ba0b Matt*0334       CatoP                = 106.0 _d 0 * 0.015 _d 0
c0d1c06c15 Matt*0335       masstoN              = CtoN * 12.001 _d 0
e0f9a7ba0b Matt*0336 #ifndef USE_BLING_V1
c0d1c06c15 Matt*0337       pivotal              = 1.9 _d -3 / 1028. _d 0 / CtoN / permil
                0338       Pc_0                 = 1.7 _d -5
                0339       Pc_0_diaz            = 0.01 _d -5
be72e7ae9e Jean*0340       alpha_photo          = 0.7 _d -5 * 2.77 _d 18 / 6.022 _d 17
c0d1c06c15 Matt*0341       gamma_DON            = 0.25 _d 0 / (365.25 _d 0 * secperday)
                0342       gamma_DOP            = 0.5 _d 0 / (365.25 _d 0 * secperday)
e0f9a7ba0b Matt*0343       PtoN_min             = 1. / 28.
                0344       PtoN_max             = 1. / 9.
                0345       FetoN_min            = 2. _d -6 * 6.75
                0346       FetoN_max            = 25. _d -6 * 6.75
cab777d667 Matt*0347       k_Fe                 = 1.6 _d -10 / permil
c0d1c06c15 Matt*0348       k_Fe_diaz            = 7. _d -10 / permil
                0349       k_NO3                = 2. _d -6 / permil
cab777d667 Matt*0350       k_PO4                = 1. _d -8 / permil
9edc0e3a85 aver*0351       k_NO3_sm             = 2.0 _d -6 / permil
                0352       k_NO3_lg             = 6.0 _d -6 / permil
                0353       k_PO4_sm             = 1.0 _d -8 / permil
                0354       k_PO4_lg             = 3.0 _d -8 / permil
                0355       k_Fe_sm              = 1.6 _d -10 / permil
                0356       k_Fe_lg              = 4.8 _d -10 / permil
be72e7ae9e Jean*0357       k_PtoN               = 1.5 _d -6 / permil
                0358       k_FetoN              = 8. _d -10 / permil
e0f9a7ba0b Matt*0359       remin_min            = 0.15 _d 0
                0360       kappa_eppley_diaz    = 0.18 _d 0
                0361       sigma_dvm            = 40.0 _d 0
                0362       phi_dvm              = 0.2 _d 0
                0363 #ifdef USE_SIBLING
                0364       k_Si                 = 2.0 _d -6 / permil
                0365       gamma_Si_0           = 0.05 / secperday
                0366       kappa_remin_Si       = 0.075
                0367       wsink_Si             = 100. / secperday
6ffd1aa797 Jean*0368       SitoN_uptake_min     = 4
                0369       SitoN_uptake_max     = 1
00fa2d4ddd mmaz*0370       SitoN_uptake_scale   = 0.6
                0371       SitoN_uptake_exp     = 3.887
e0f9a7ba0b Matt*0372       q_SitoN_diss         = 1.0 _d 0
                0373 #endif
                0374 #else
                0375       pivotal              = 1.9 _d -3 / 1028. _d 0 / CtoP / permil
                0376       Pc_0                 = 1 _d -5
                0377       alpha_max            = 1.6 _d -5 * 2.77 _d 18 / 6.022 _d 17
                0378       alpha_min            = 0.4 _d -5 * 2.77 _d 18 / 6.022 _d 17
                0379       gamma_biomass        = 0.5 _d 0 / secperday
                0380       gamma_DOP            = 0.25 _d 0 / (365.25 _d 0 * secperday)
                0381       k_Fe                 = 8. _d -10 / permil
                0382       k_PO4                = 1. _d -7 / permil
                0383       k_FetoP              = 7. _d -6 * CtoP
                0384       FetoP_max            = 28. _d -6 * CtoP
                0385       Fe_lim_min           = 0. _d 0
                0386       remin_min            = 0.3 _d 0
                0387 #endif
                0388       lambda_0             = 0.19 _d 0 / secperday
                0389       resp_frac            = 0. _d 0
                0390       chl_min              = 1. _d -5
                0391       theta_Fe_max_hi      = 0.04 _d 0
                0392       theta_Fe_max_lo      = 0.01 _d 0
                0393       gamma_irr_mem        = 1. _d 0 / secperday
                0394       gamma_POM            = 0.12 _d 0 / secperday
                0395       k_O2                 = 20. _d -6 / permil
c0d1c06c15 Matt*0396       kFe_eq_lig_max       = 8.0 _d 10 * permil
                0397       kFe_eq_lig_min       = 8.0 _d 9 * permil
                0398       kFe_eq_lig_Femin     = 0.05 _d -9 / permil
                0399       kFe_eq_lig_irr       = 0.1 _d 0
                0400       kFe_org              = 0.5 _d 0 / secperday * permil**(0.58)
                0401       kFe_inorg            = 1. _d 3 / secperday * permil**(0.5)
e0f9a7ba0b Matt*0402       FetoC_sed            = 1. _d -4
c0d1c06c15 Matt*0403       oxic_min             = 1. _d -6 / permil
                0404       Ligand               = 1. _d -9 / permil
                0405       kappa_eppley         = 0.063 _d 0
be72e7ae9e Jean*0406       kappa_remin          = -0.032 _d 0
c0d1c06c15 Matt*0407       ca_remin_depth       = 1343. _d 0
                0408       phi_DOM              = 0.1 _d 0
                0409       phi_sm               = 0.18 _d 0
                0410       phi_lg               = 1. _d 0
                0411       wsink0               = 16. _d 0 / secperday
e0f9a7ba0b Matt*0412       wsink0z              = 80. _d 0
c0d1c06c15 Matt*0413       wsinkacc             = 0.05 _d 0 / secperday
                0414       parfrac              = 0.4 _d 0
                0415       alpfe                = 0.01 _d 0
                0416       k0                   = 0.04 _d 0
e0f9a7ba0b Matt*0417       MLmix_max            = 200.0 _d 0
82e538d851 aver*0418       chlsat_locTimWindow(1) = 12.0 _d 0
                0419       chlsat_locTimWindow(2) = 13.5 _d 0
e0f9a7ba0b Matt*0420 
                0421       bling_windFile         = ' '
                0422       bling_atmospFile       = ' '
                0423       bling_iceFile          = ' '
                0424       bling_ironFile         = ' '
                0425       bling_silicaFile       = ' '
                0426       bling_psmFile          = ' '
                0427       bling_plgFile          = ' '
                0428       bling_pdiazFile        = ' '
47de7c1e0e Matt*0429       bling_Pc_2dFile        = ' '
                0430       bling_Pc_2d_diazFile   = ' '
e9828181c3 Yixi*0431       bling_k0_2dFile        = ' '
47de7c1e0e Matt*0432       bling_alpha_photo2dFile= ' '
                0433       bling_k_Fe2dFile       = ' '
                0434       bling_k_Fe_diaz2dFile  = ' '
af8f3b9ffc Matt*0435       bling_gamma_POM2dFile  = ' '
                0436       bling_wsink0_2dFile    = ' '
                0437       bling_phi_DOM2dFile    = ' '
                0438       bling_phi_sm2dFile     = ' '
                0439       bling_phi_lg2dFile     = ' '
c0d1c06c15 Matt*0440 
e0f9a7ba0b Matt*0441       bling_pCO2             = 278. _d -6
                0442       river_conc_po4         = 0.007 _d 0
                0443       river_dom_to_nut       = 0. _d 0
                0444 
                0445 #ifdef ALLOW_EXF
                0446       apco2startdate1         = 0
                0447       apco2startdate2         = 0
                0448       apco2StartTime          = UNSET_RL
                0449       apco2period             = 0.0 _d 0
                0450       apco2RepCycle           = repeatPeriod
                0451       apco2const              = 0.0 _d 0
079948e6a6 Matt*0452       apco2_exfremo_intercept = 0.0 _d 0
e0f9a7ba0b Matt*0453       apco2_exfremo_slope     = 0.0 _d 0
                0454       apco2file               = ' '
                0455       exf_inscal_apco2        =  1. _d 0
                0456       exf_outscal_apco2       =  1. _d 0
079948e6a6 Matt*0457 #ifdef USE_EXF_INTERPOLATION
530382a175 Jean*0458 C--   set default input location to match (in case of simple Lat-Long grid)
079948e6a6 Matt*0459 C     model grid cell-center position (leading to trivial interpolation)
e0f9a7ba0b Matt*0460       apco2_lon0         = inp_lon0
                0461       apco2_lat0         = inp_lat0
9f0da36f91 Jean*0462       apco2_nlon         = inp_gNx
                0463       apco2_nlat         = inp_gNy
e0f9a7ba0b Matt*0464       apco2_lon_inc      = inp_dLon
079948e6a6 Matt*0465       DO j=1,MAX_LAT_INC
9f0da36f91 Jean*0466         apco2_lat_inc(j) = inp_dLat(j)
079948e6a6 Matt*0467       ENDDO
8125504ce6 Matt*0468       apco2_interpMethod = 1
079948e6a6 Matt*0469 #endif /* USE_EXF_INTERPOLATION */
e0f9a7ba0b Matt*0470 #endif /* ALLOW_EXF */
c0d1c06c15 Matt*0471 
be72e7ae9e Jean*0472 C     default periodic forcing to same as for physics
e0f9a7ba0b Matt*0473       bling_forcingPeriod = externForcingPeriod
                0474       bling_forcingCycle  = externForcingCycle
c0d1c06c15 Matt*0475 
                0476       WRITE(msgBuf,'(A)') ' BLING_READPARMS: opening data.bling'
                0477       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0478      I                    SQUEEZE_RIGHT, myThid )
                0479 
                0480       CALL OPEN_COPY_DATA_FILE( 'data.bling', 'BLING_READPARMS',
                0481      O                          iUnit, myThid )
                0482 
                0483 C--   Read parameters from open data file:
                0484 
                0485 C-    Abiotic parameters
                0486       READ(UNIT=iUnit,NML=ABIOTIC_PARMS)
                0487 
                0488 C-    BLING parameters
                0489       READ(UNIT=iUnit,NML=BIOTIC_PARMS)
                0490 
                0491 C-    forcing filenames and parameters
                0492       READ(UNIT=iUnit,NML=BLING_FORCING)
                0493 
                0494       WRITE(msgBuf,'(A)')
                0495      &   ' BLING_READPARMS: finished reading data.BLING'
                0496       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0497      I                    SQUEEZE_RIGHT, myThid )
                0498 
                0499 C--   Close the open data file
7a77863887 Mart*0500 #ifdef SINGLE_DISK_IO
c0d1c06c15 Matt*0501       CLOSE(iUnit)
7a77863887 Mart*0502 #else
                0503       CLOSE(iUnit,STATUS='DELETE')
                0504 #endif /* SINGLE_DISK_IO */
c0d1c06c15 Matt*0505 
e0f9a7ba0b Matt*0506       iUnit = standardMessageUnit
                0507 C Record the solver to calculate pH and evaluate surface ocean pCO2
                0508 #ifdef CARBONCHEM_SOLVESAPHE
                0509       IF ( selectPHsolver.GT.0 ) THEN
                0510          WRITE(msgBuf,'(A)')
                0511      &  'Using Munhoven (2013) Solvesaphe for pH/pCO2'
                0512          CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
                0513       ELSEIF ( selectPHsolver.EQ.0 ) THEN
                0514          WRITE(msgBuf,'(A)')
                0515      &  'Using Follows et al. (2006) for pH/pCO2'
                0516          CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
                0517       ENDIF
                0518 #endif
c0d1c06c15 Matt*0519 
e0f9a7ba0b Matt*0520 C Record which carbonate coefficients are used and which pH/pCO2 solver
                0521 #ifdef CARBONCHEM_SOLVESAPHE
                0522       WRITE(msgBuf,'(A)')
                0523      &  'Using Munhoven (2013) Solvesaphe carbon coefficients'
                0524       CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
                0525 C Munhoven (2013)'s "Solvesaphe" coefficients have several options:
                0526       IF ( selectK1K2const.EQ.1 ) THEN
                0527          WRITE(msgBuf,'(A)')
                0528      &  'Using Millero (1995)/Mehrbach K1 and K2 coefficients'
                0529          CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
                0530       ELSEIF ( selectK1K2const.EQ.2 ) THEN
                0531          WRITE(msgBuf,'(A)')
                0532      &  'Using Roy et al. (1993) K1 and K2 coefficients'
                0533          CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
                0534       ELSEIF ( selectK1K2const.EQ.3 ) THEN
                0535          WRITE(msgBuf,'(A)')
                0536      &  'Using Millero (1995) "consensus" K1 and K2 coefficients'
                0537          CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
                0538       ELSEIF ( selectK1K2const.EQ.4 ) THEN
                0539          WRITE(msgBuf,'(A)')
                0540      &  'Using Luecker et al. (2000) K1 and K2 coefficients'
                0541          CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
                0542       ELSEIF ( selectK1K2const.EQ.5 ) THEN
                0543          WRITE(msgBuf,'(A)')
                0544      &  'Using Millero et al. (2010) K1 and K2 coefficients'
                0545          CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
                0546       ELSEIF ( selectK1K2const.EQ.6 ) THEN
                0547          WRITE(msgBuf,'(A)')
                0548      &  'Using Waters et al. (2014) K1 and K2 coefficients'
                0549          CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
                0550       ENDIF
                0551       IF ( selectHFconst.EQ.1 ) THEN
                0552          WRITE(msgBuf,'(A)')
                0553      &  'Using Dickson and Riley (1979) KF coefficient'
                0554          CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
                0555       ELSEIF ( selectHFconst.EQ.2 ) THEN
                0556          WRITE(msgBuf,'(A)')
                0557      &  'Using Perez and Fraga (1987) KF coefficient'
                0558          CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
                0559       ENDIF
                0560       IF ( selectBTconst.EQ.1 ) THEN
                0561          WRITE(msgBuf,'(A)')
                0562      & 'Using Uppstrom (1974) BT estimation from salinity'
                0563          CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
                0564       ELSEIF ( selectBTconst.EQ.2 ) THEN
                0565          WRITE(msgBuf,'(A)')
                0566      &  'Using Lee et al (2010) BT estimation from salinity'
                0567          CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
                0568       ENDIF
                0569       IF ( selectFTconst.EQ.1 ) THEN
                0570          WRITE(msgBuf,'(A)')
                0571      &  'Using Riley (1965) FT estimation from salinity'
                0572          CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
                0573       ELSEIF ( selectBTconst.EQ.2 ) THEN
                0574          WRITE(msgBuf,'(A)')
                0575      &  'Using Culkin (1965) FT estimation from salinity'
                0576          CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
                0577       ENDIF
                0578 #else
                0579 C OCMIP2 Coefficients from S/R CARBON_COEFFS in CARBON_CHEM.F
                0580       WRITE(msgBuf,'(A)')
                0581      &  'Using Millero (1995)/Mehrbach K1 and K2 coefficients'
                0582       CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
                0583       WRITE(msgBuf,'(A)')
                0584      &  'Using Dickson and Riley (1979) KF coefficient'
                0585       CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
                0586       WRITE(msgBuf,'(A)')
                0587      &  'Using Uppstrom (1974) BT estimation from salinity'
                0588       CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
                0589       WRITE(msgBuf,'(A)')
                0590      &  'Using Riley (1965) FT estimation from salinity'
                0591       CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
c0d1c06c15 Matt*0592 #endif
                0593 
530382a175 Jean*0594       IF ( errCount.GE.1 ) THEN
                0595        WRITE(msgBuf,'(A,I3,A)')
                0596      &     'BLING_READPARMS: detected', errCount,' fatal error(s)'
                0597        CALL PRINT_ERROR( msgBuf, myThid )
                0598        CALL ALL_PROC_DIE( 0 )
                0599        STOP 'ABNORMAL END: S/R BLING_READPARMS'
                0600       ENDIF
                0601 
e0f9a7ba0b Matt*0602 #ifdef CARBONCHEM_SOLVESAPHE
                0603       IF ( selectHFconst.GT.2 .OR. selectBTconst.GT.2
                0604      & .OR. selectFTconst.GT.2 ) THEN
                0605         WRITE(msgBuf,'(A)')
                0606      &    'BLING_READPARMS: selectHF, selectBT or selectFT > 2'
                0607         CALL PRINT_ERROR( msgBuf, myThid )
                0608         STOP 'ABNORMAL END: S/R BLING_READPARMS: solvesaphe_const error'
                0609       ELSEIF ( selectK1K2const.GT.6 ) THEN
                0610         WRITE(msgBuf,'(A)')
                0611      &    'BLING_READPARMS: selectK1K2const > 6 '
                0612         CALL PRINT_ERROR( msgBuf, myThid )
                0613         STOP 'ABNORMAL END: S/R BLING_READPARMS: solvesaphe_const error'
                0614       ELSEIF ( selectPHsolver.GT.3 ) THEN
                0615         WRITE(msgBuf,'(A)')
                0616      &    'BLING_READPARMS: selectPHsolver > 3 '
                0617         CALL PRINT_ERROR( msgBuf, myThid )
                0618         STOP 'ABNORMAL END: S/R BLING_READPARMS: select pH solver error'
                0619       ENDIF
                0620 #endif
                0621 
c0d1c06c15 Matt*0622       _END_MASTER(myThid)
                0623 
                0624 C--   Everyone else must wait for the parameters to be loaded
                0625       _BARRIER
                0626 
                0627 #endif /* ALLOW_BLING */
                0628 
                0629       RETURN
                0630       END