Private types and functions

Documentation for ClimaOceanBiogeochemistry.jl's internal interface.

ClimaOceanBiogeochemistry

ClimaOceanBiogeochemistry.CarbonAlkalinityNutrientsMethod
CarbonAlkalinityNutrients(; reference_density                           = 1024,
                            maximum_net_community_production_rate       = 1 / day,
                            phosphate_half_saturation                   = 1e-7 * reference_density,
                            nitrate_half_saturation                     = 1.6e-6 * reference_density,
                            iron_half_saturation                        = 1e-10 * reference_density,
                            incident_PAR                                = 700.0,
                            PAR_half_saturation                         = 10.0,
                            PAR_attenuation_scale                       = 25.0,
                            fraction_of_particulate_export              = 0.33
                            dissolved_organic_phosphorus_remin_timescale = 1 / 30day,
                            stoichoimetric_ratio_carbon_to_phosphate    = 106.0
                            stoichoimetric_ratio_nitrate_to_phosphate   = 16.0
                            stoichoimetric_ratio_phosphate_to_oxygen    = 170.0,
                            stoichoimetric_ratio_phosphate_to_iron      = 4.68e-4
                            stoichoimetric_ratio_carbon_to_nitrate      = 106 / 16
                            stoichoimetric_ratio_carbon_to_oxygen       = 106 / 170,
                            stoichoimetric_ratio_carbon_to_iron         = 106 / 1.e-3
                            stoichoimetric_ratio_silicate_to_phosphate  = 15.0
                            rain_ratio_inorganic_to_organic_carbon      = 1e-1
                            martin_curve_exponent                       = 0.84,
                            iron_scavenging_rate                        = 5e-4 / day,
                            ligand_concentration                        = 1e-9 * reference_density,
                            ligand_stability_coefficient                = 1e8)

Return a six-tracer biogeochemistry model for the interaction of carbon, alkalinity, and nutrients.

Keyword Arguments

Tracer names

  • DIC: Dissolved Inorganic Carbon

  • Alk: Alkalinity

  • PO₄: Phosphate (macronutrient)

  • NO₃: Nitrate (macronutrient)

  • DOP: Dissolved Organic Phosphate (macronutrient)

  • Fe: Dissolved Iron (micronutrient)

Biogeochemical functions

  • transitions for DIC, Alk, PO₄, NO₃, DOP, and Fe

  • biogeochemical_drift_velocity for D, modeling the sinking of detritus at a constant detritus_sinking_speed.

source
ClimaOceanBiogeochemistry.NutrientsPlanktonBacteriaDetritusMethod
NutrientsPlanktonBacteriaDetritus(; grid,
                                    maximum_plankton_growth_rate = 1/day,
                                    maximum_bacteria_growth_rate = 1/day
                                    maximum_grazing_rate         = 3/day
                                    bacteria_yield               = 0.2
                                    zooplankton_yield            = 0.3
                                    linear_remineralization_rate = 0.03/day,
                                    linear_mortality_rate        = 0.01/day,
                                    quadratic_mortality_rate     = 0.1/day,
                                    quadratic_mortality_rate_Z   = 1/day,
                                    nutrient_half_saturation     = 0.1,
                                    detritus_half_saturation     = 0.1,
                                    grazing_half_saturation      = 3.0,
                                    PAR_half_saturation          = 10.0,
                                    PAR_attenuation_scale        = 25.0,
                                    detritus_vertical_velocity   = -10/day)

Return a six-tracer biogeochemistry model for the interaction of nutrients (N), phytoplankton (P), zooplankton(Z), bacteria (B), dissolved detritus (D1), and particulate detritus (D2).

Keyword Arguments

  • grid (required): An Oceananigans' grid.

  • maximum_plankton_growth_rate: (s⁻¹) Growth rate of plankton P unlimited by the availability of nutrients and light. Default: 1/day.

  • maximum_bacteria_growth_rate: (s⁻¹) Growth rate of plankton B unlimited by the availability of nutrients and light. Default = 0.5/day.

  • maximum_grazing_rate: (s⁻¹) Maximum grazing rate of phytoplankton by zooplankton.

  • bacteria_yield: Determines fractional nutrient production by bacteria production relative to consumption of detritus such that $∂_t N / ∂_t D = 1 - y$, where y = bacteria_yield. Default: 0.2.

  • linear_remineralization_rate: (s⁻¹) Remineralization rate constant of detritus 'D', assuming linear remineralization of 'D', while implicitly modeling bacteria 'B'. Default = 0.3/day.

  • linear_mortality_rate: (s⁻¹) Linear term of the mortality rate of both plankton and bacteria.

  • quadratic_mortality_rate: (s⁻¹) Quadratic term of the mortality rate of both plankton and bacteria.

  • nutrient_half_saturation: (mmol m⁻³) Half-saturation of nutrients for plankton production.

  • detritus_half_saturation: (mmol m⁻³) Half-saturation of nutrients for bacteria production. Default = 10.0 mmol m⁻³.

  • phytoplankton_half_saturation: (mmol m⁻³) Half-saturation of phytoplankton for zooplankton production.

  • zooplankton_assimilation: Fractional assimilation efficiency for zooplankton.

  • PAR_half_saturation: (W m⁻²) Half-saturation of photosynthetically available radiation (PAR) for plankton production.

  • PAR_attenuation_scale: (m) Depth scale over which photosynthetically available radiation (PAR) attenuates exponentially.

  • detritus_sinking_speed: (m s⁻¹) Sinking velocity of particulate detritus.

Tracer names

  • N: nutrients

  • P: phytoplankton

  • Z: zooplankton

  • B: bacteria

  • D: detritus

Biogeochemical functions

  • transitions for N, P, Z, B, D

  • biogeochemical_drift_velocity for D2, modeling the sinking of detritus at a constant detritus_sinking_speed.

source
ClimaOceanBiogeochemistry.PARMethod
PAR(surface_photosynthetically_active_ratiation, 
    photosynthetically_active_ratiation_attenuation_scale, 
    depth)

Calculate the photosynthetically active radiation (PAR) at a given depth due to attenuation.

source
ClimaOceanBiogeochemistry.iron_scavengingMethod
iron_scavenging(iron_scavenging_rate, iron_concentration, ligand_concentration, ligand_stability_coefficient)

Calculate the scavenging loss of iron. Iron scavenging depends on free iron, which involves solving a quadratic equation in terms of ligand concentration and stability coefficient. Ligand-complexed iron is safe from being scavenged.

source
ClimaOceanBiogeochemistry.net_community_productionMethod
net_community_production(maximum_net_community_production_rate,
                         light_half_saturation, 
                         phosphate_half_saturation, 
                         nitrate_half_saturation, 
                         iron_half_saturation, 
                         photosynthetically_active_radiation, 
                         phosphate_concentration, 
                         nitrate_concentration, 
                         iron_concentration)
source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.Fˢⁱᵗₖ₁Function
Fˢⁱᵗₖ₁(Θᴷ, Sᵖ, Δpᵦₐᵣ, Pˢⁱᵗₖ₁)

Return the first dissociation constant of silicic acid (H4SiO4) in seawater, given temperature in K, Θᴷ, practical salinity, Sᵖ, applied pressure, Δpᵦₐᵣ, and coefficients, Pˢⁱᵗₖ₁.

References: Yao and Millero (1995) cited by Millero (1995) pH scale : SWS (according to Dickson et al, 2007) Note : No pressure correction available Note : converted here from mol/kg-H2O to mol/kg-sw

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.Fᴴ²ˢₖ₁Function
Fᴴ²ˢₖ₁(Θᴷ, Sᵖ, Δpᵦₐᵣ, Pᴴ²ˢₖ₁)

Return the dissociation constant of hydrogen sulfide in sea-water, given temperature in K, Θᴷ, practical salinity, Sᵖ, applied pressure, Δpᵦₐᵣ, and coefficients, Pᴴ²ˢₖ₁.

References: Millero et al. (1988) (cited by Millero (1995) Millero (1995) for pressure correction pH scale : - SWS (according to Yao and Millero, 1995, p. 82: "refitted if necessary") - Total (according to Lewis and Wallace, 1998) Note : we stick to SWS here for the time being Note : the fits from Millero (1995) and Yao and Millero (1995) derive from Millero et al. (1988), with all the coefficients multiplied by -ln(10)

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.Fᴴ²ᴼₖ₁Function
Fᴴ²ᴼₖ₁(Θᴷ, Sᵖ, Δpᵦₐᵣ, Pᴴ²ᴼₖ₁)

Return dissociation constant of water in (mol/kg-SW)^2, given temperature in K, Θᴷ, practical salinity, Sᵖ, applied pressure, Δpᵦₐᵣ, and coefficients, Pᴴ²ᴼₖ₁.

References: Millero (1995) for value at p_bar = 0 Millero (pers. comm. 1996) for pressure correction pH scale : SWS

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.Fᴴˢᴼ⁴ₖ₁Function
Fᴴˢᴼ⁴ₖ₁(Θᴷ, Sᵖ, Δpᵦₐᵣ, Pᴴˢᴼ⁴ₖ₁)

Return the dissociation constant of hydrogen sulfate (bisulfate) , given temperature in K, Θᴷ, practical salinity, Sᵖ, applied pressure, Δpᵦₐᵣ, and coefficients, Pᴴˢᴼ⁴ₖ₁.

References: Dickson (1990) – also Handbook (2007) Millero (1995) for pressure correction pH scale : free Note : converted here from mol/kg-H2O to mol/kg-SW

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.Fᴴᶠᵦ₁Function
Fᴴᶠᵦ₁(Θᴷ, Sᵖ, Δpᵦₐᵣ, Pᴴᶠᵦ₁)

Return the association constant of HF in (mol/kg-SW)^-1, given temperature in K, Θᴷ, practical salinity, Sᵖ, applied pressure, Δpᵦₐᵣ, and coefficients, Pᴴᶠᵦ₁.

HF <-> H⁺ + F⁻

References: Dickson and Riley (1979) Millero (1995) for pressure correction pH scale : free Note : converted here from mol/kg-H2O to mol/kg-SW

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.Fᴴᶠₖ₁Function
Fᴴᶠₖ₁(Θᴷ, Sᵖ, Δpᵦₐᵣ, Pᴴᶠₖ₁)

Return the dissociation constant for hydrogen fluoride in mol/kg-SW, given temperature in K, Θᴷ, practical salinity, Sᵖ, applied pressure, Δpᵦₐᵣ, and coefficients, Pᴴᶠₖ₁.

HF <-> H⁺ + F⁻

References: Perez and Fraga (1987) Millero (1995) for pressure correction pH scale : Total (according to Handbook, 2007

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.Fᴺᴴ⁴ₖ₁Function
Fᴺᴴ⁴ₖ₁(Θᴷ, Sᵖ, Δpᵦₐᵣ, Pᴺᴴ⁴ₖ₁)

Return the dissociation constant of ammonium in sea-water [mol/kg-SW], given temperature in K, Θᴷ, practical salinity, Sᵖ, applied pressure, Δpᵦₐᵣ, and coefficients, Pᴺᴴ⁴ₖ₁.

References: Yao and Millero (1995) Millero (1995) for pressure correction pH scale : SWS

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.Fᴾᴼ⁴ₖ₁Function
Fᴾᴼ⁴ₖ₁(Θᴷ, Sᵖ, Δpᵦₐᵣ, Pᴾᴼ⁴ₖ₁)

Return the first dissociation constant of phosphoric acid (H3PO4) in seawater, given temperature in K, Θᴷ, practical salinity, Sᵖ, applied pressure, Δpᵦₐᵣ, and coefficients, Pᴾᴼ⁴ₖ₁.

References: Yao and Millero (1995) Millero (1995) for pressure correction pH scale : SWS

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.Fᴾᴼ⁴ₖ₂Function
Fᴾᴼ⁴ₖ₂(Θᴷ, Sᵖ, Δpᵦₐᵣ, Pᴾᴼ⁴ₖ₂)

Return the second dissociation constant of phosphoric acid (H3PO4) in seawater, given temperature in K, Θᴷ, practical salinity, Sᵖ, applied pressure, Δpᵦₐᵣ, and coefficients, Pᴾᴼ⁴ₖ₂.

References: Yao and Millero (1995) Millero (1995) for pressure correction pH scale : SWS

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.Fᴾᴼ⁴ₖ₃Function
Fᴾᴼ⁴ₖ₃(Θᴷ, Sᵖ, Δpᵦₐᵣ, Pᴾᴼ⁴ₖ₃)

Return the third dissociation constant of phosphoric acid (H3PO4) in seawater, given temperature in K, Θᴷ, practical salinity, Sᵖ, applied pressure, Δpᵦₐᵣ, and coefficients, Pᴾᴼ⁴ₖ₃.

References: Yao and Millero (1995) Millero (1995) for pressure correction pH scale : SWS

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.FᵃʳᵃᵍᵒⁿⁱᵗᵉₛₚFunction
Fᵃʳᵃᵍᵒⁿⁱᵗᵉₛₚ(Θᴷ, Sᵖ, Δpᵦₐᵣ, Pᵃʳᵃᵍᵒⁿⁱᵗᵉₛₚ)

Return stoichiometric solubility product, Ω, of aragonite in seawater, given temperature in K, Θᴷ, practical salinity, Sᵖ, applied pressure, Δpᵦₐᵣ, and coefficients, Pᵃʳᵃᵍᵒⁿⁱᵗᵉₛₚ.

References: Mucci (1983) Millero (1979) for pressure correction pH scale : N/A Units : (mol/kg-SW)^2

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.Fᵇₖ₁Function
Fᵇₖ₁(Θᴷ, Sᵖ, Δpᵦₐᵣ, Pᴮₖ₁)

Return boric acid dissociation constant in mol/kg-SW, given temperature in K, Θᴷ, practical salinity, Sᵖ, applied pressure, Δpᵦₐᵣ, and coefficients, Pᴮₖ₁.

References: Dickson (1990, eq. 23) – also Handbook (2007, eq. 37) Millero (1979) pressure correction pH scale : total

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.Fᵈⁱᶜₖ₀Function
Fᵈⁱᶜₖ₀(Θᴷ, Sᵖ, Pᵈⁱᶜₖ₀)

Return hydration constant of CO₂ in (mol/kg-SW)/atm given temperature in K, Θᴷ, practical salinity, Sᵖ, and coefficients, Pᵈⁱᶜₖ₀.

CO₂ + H₂O <-> H₂CO₃

References: Weiss (1979) pH scale : N/A Note : currently no pressure correction

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.Fᵈⁱᶜₖ₁ᵣ₉₃Function
Fᵈⁱᶜₖ₁ᵣ₉₃(Θᴷ, Sᵖ, Δpᵦₐᵣ, Pᵈⁱᶜₖ₁ᵣ₉₃)

Return the first dissociation constant of carbonic acid in mol/kg-SW, given temperature in K, Θᴷ, practical salinity, Sᵖ, applied pressure, Δpᵦₐᵣ, and coefficients, Pᵈⁱᶜₖ₁ᵣ₉₃.

H₂CO₃ <-> HCO₃⁻ + H⁺

References: Roy et al. (1993) – also Handbook (1994) Millero (1979) pressure correction pH scale : Total Valid range: T: 0-45 S: 5-45. Note : converted here from mol/kg-H2O to mol/kg-SW

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.Fᵈⁱᶜₖ₁ₗ₀₀Function
Fᵈⁱᶜₖ₁ₗ₀₀(Θᴷ, Sᵖ, Δpᵦₐᵣ, Pᵈⁱᶜₖ₁ₗ₀₀)

Return the first dissociation constant of carbonic acid in mol/kg-SW, given temperature in K, Θᴷ, practical salinity, Sᵖ, applied pressure, Δpᵦₐᵣ, and coefficients, Pᵈⁱᶜₖ₁ₗ₀₀.

H₂CO₃ <-> HCO₃⁻ + H⁺

References: Luecker et al. (2000) – also Handbook (2007) Millero (1979) pressure correction pH scale: Total

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.Fᵈⁱᶜₖ₁ₘ₉₅Function
Fᵈⁱᶜₖ₁ₘ₉₅(Θᴷ, Sᵖ, Δpᵦₐᵣ, Pᵈⁱᶜₖ₁ₘ₉₅)

Return the first dissociation constant of carbonic acid in mol/kg-SW, given temperature in K, Θᴷ, practical salinity, Sᵖ, applied pressure, Δpᵦₐᵣ, and coefficients, Pᵈⁱᶜₖ₁ₘ₉₅.

H₂CO₃ <-> HCO₃⁻ + H⁺

References: Millero (1995, eq 50 – ln K1(COM)) Millero (1982) pressure correction pH scale: SWS

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.Fᵈⁱᶜₖ₂ᵣ₉₃Function
Fᵈⁱᶜₖ₂ᵣ₉₃(Θᴷ, Sᵖ, Δpᵦₐᵣ, Pᵈⁱᶜₖ₂ᵣ₉₃)

Return the second dissociation constant of carbonic acid in mol/kg-SW, given temperature in K, Θᴷ, practical salinity, Sᵖ, applied pressure, Δpᵦₐᵣ, and coefficients, Pᵈⁱᶜₖ₂ᵣ₉₃.

HCO₃⁻ <-> CO₃²⁻ + H⁺

References: Roy et al. (1993) – also Handbook (1994) Millero (1979) pressure correction pH scale : Total Valid range: T: 0-45 S: 5-45. Note : converted here from mol/kg-H2O to mol/kg-SW

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.Fᵈⁱᶜₖ₂ₗ₀₀Function
Fᵈⁱᶜₖ₂ₗ₀₀(Θᴷ, Sᵖ, Δpᵦₐᵣ, Pᵈⁱᶜₖ₂ₗ₀₀)

Return the second dissociation constant of carbonic acid in mol/kg-SW, given temperature in K, Θᴷ, practical salinity, Sᵖ, applied pressure, Δpᵦₐᵣ, and coefficients, Pᵈⁱᶜₖ₂ₗ₀₀.

HCO₃⁻ <-> CO₃²⁻ + H⁺

References: Luecker et al. (2000) – also Handbook (2007) Millero (1979) pressure correction pH scale: Total

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.Fᵈⁱᶜₖ₂ₘ₉₅Function
Fᵈⁱᶜₖ₂ₘ₉₅(Θᴷ, Sᵖ, Δpᵦₐᵣ, Pᵈⁱᶜₖ₂ₘ₉₅)

Return the second dissociation constant of carbonic acid in mol/kg-SW, given temperature in K, Θᴷ, practical salinity, Sᵖ, applied pressure, Δpᵦₐᵣ, and coefficients, Pᵈⁱᶜₖ₂ₘ₉₅.

HCO₃⁻ <-> CO₃²⁻ + H⁺

References: Millero (1995, eq 51 – ln K2(COM)) Millero (1979) pressure correction pH scale: SWS

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.FᶜᵃˡᶜⁱᵗᵉₛₚFunction
Fᶜᵃˡᶜⁱᵗᵉₛₚ(Θᴷ, Sᵖ, Δpᵦₐᵣ, Pᶜᵃˡᶜⁱᵗᵉₛₚ)

Return the stoichiometric solubility product of calcite, Ω, in seawater, given temperature in K, Θᴷ, practical salinity, Sᵖ, applied pressure, Δpᵦₐᵣ, and coefficients, Pᶜᵃˡᶜⁱᵗᵉₛₚ

References: Mucci (1983) Millero (1995) for pressure correction pH scale : N/A Units : (mol/kg-SW)^2

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.H₂OˢʷFunction
H₂Oˢʷ(Sᵖ, Pᴴ²⁰ˢʷ)

Return the mass of pure water in one kg of seawater of practical salinity, Sᵖ. References: "libthdyct" – derived by Munhoven (1997) from data by Millero (1982) "Handbook (2007)" – Handbook (2007) pH scale: N/A

source
ClimaOceanBiogeochemistry.CarbonSystemSolvers.μₛFunction
μₛ(Sᵖ)

Return ionic strength in mol/kg-SW, for given practical salinity, Sᵖ. References: "libthdyct" – derived by Munhoven (1997) from data by Millero (1982) "Handbook (2007)" – Handbook (2007) pH scale: N/A

source