diff --git a/Project.toml b/Project.toml index b325aabba..d6fd60aa3 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "OceanBioME" uuid = "a49af516-9db8-4be4-be45-1dad61c5a376" authors = ["Jago Strong-Wright and contributors"] -version = "0.8.0" +version = "0.9.0" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" @@ -29,7 +29,6 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819" NetCDF = "30363a11-5582-574a-97bb-aa9a979735b9" -Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/README.md b/README.md index c1886edc8..c9fc9c8dc 100644 --- a/README.md +++ b/README.md @@ -160,4 +160,4 @@ If you use OceanBioME as part of your research, teaching, or other activities, w } ``` -To cite a specific version of the package please also cite its [Zenode archive](https://doi.org/10.5281/zenodo.10038575). +If on top of citing the JOSS paper above, you need to cite a specific version of the package then please cite its corresponding version from the [Zenodo archive](https://zenodo.org/doi/10.5281/zenodo.8403489). diff --git a/docs/src/index.md b/docs/src/index.md index b8ff8ff54..41285d666 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -2,7 +2,7 @@ OceanBioME.jl is a fast and flexible ocean biogeochemical modelling environment. It is highly modular and is designed to make it easy to implement and use a variety of biogeochemical and physical models. OceanBioME is built to be coupled with physics models from [Oceananigans.jl](https://github.com/CliMA/Oceananigans.jl) allowing simulations across a wide range of spatial scales ranging from a global hydrostatic free surface model to non-hydrostatic large-eddy simulations. OceanBioME was designed specifically for ocean carbon dioxide removal applications. Notably, it includes active particles which allow individual-based models to be seamlessly coupled with the flow physics, ecosystem models, and carbonate chemistry. -OceanBioME.jl currently provides a core of several biogeochemical models (Nutrient--Phytoplankton--Zooplankton--Detritus (NPZD) and [LOBSTER](https://doi.org/10.1029/2004JC002588), a medium complexity model, air-sea gas exchange models to provide appropriate top boundary conditions, and sediment models to for the benthic boundary. [PISCES](https://doi.org/10.5194/gmd-8-2465-2015) and other higher complexity models are in our future development plans. +OceanBioME.jl currently provides a core of several biogeochemical models Nutrient--Phytoplankton--Zooplankton--Detritus (NPZD) and [LOBSTER](https://doi.org/10.1029/2004JC002588), a medium complexity model, air-sea gas exchange models to provide appropriate top boundary conditions, and sediment models to for the benthic boundary. [PISCES](https://doi.org/10.5194/gmd-8-2465-2015) and other higher complexity models are in our future development plans. OceanBioME.jl includes a framework for integrating the growth of biological/active Lagrangian particles which move around and can interact with the (Eulerian) tracer fields - for example, consuming nutrients and carbon dioxide while releasing dissolved organic material. A growth model for sugar kelp is currently implemented using active particles, and this model can be used in a variety of dynamical scenarios including free-floating or bottom-attached particles. diff --git a/docs/src/model_components/biogeochemical/LOBSTER.md b/docs/src/model_components/biogeochemical/LOBSTER.md index 9f904b17b..96678d61c 100644 --- a/docs/src/model_components/biogeochemical/LOBSTER.md +++ b/docs/src/model_components/biogeochemical/LOBSTER.md @@ -140,7 +140,7 @@ Additionally, the ``DIC`` and ``Alk`` equations are modified to replace each ``X | ``\mu_{sPOM}`` | `small_detritus_remineralisation_rate` | 1 / s | | ``\mu_{bPOM}`` | `large_detritus_remineralisation_rate` | 1 / s | | ``\gamma`` | `phytoplankton_exudation_fraction` | - | -| ``\mu_n`` | `nitrifcaiton_rate` | 1 / 2 | +| ``\mu_n`` | `nitrification_rate` | 1 / 2 | | ``\alpha_P`` | `ammonia_fraction_of_exudate` | - | | ``\alpha_Z`` | `ammonia_fraction_of_excriment` | - | | ``\alpha_d`` | `ammonia_fraction_of_detritus` | - | @@ -148,10 +148,10 @@ Additionally, the ``DIC`` and ``Alk`` equations are modified to replace each ``X | ``R_O`` | `organic_redfield` | mmol C / mmol N | | ``R_{Chl:N}`` | `phytoplankton_chlorophyll_ratio` | mg Chl / mmol N | | ``\rho_{CaCO_3}`` | `organic_carbon_calcate_ratio` | mmol CaCO₃/ mmol C | -| ``R_{O_2}`` | `respiraiton_oxygen_nitrogen_ratio` | mmol O / mmol N | -| ``R_{nit}`` | `nitrifcation_oxygen_nitrogen_ratio` | mmol O / mmol N | +| ``R_{O_2}`` | `respiration_oxygen_nitrogen_ratio` | mmol O / mmol N | +| ``R_{nit}`` | `nitrification_oxygen_nitrogen_ratio` | mmol O / mmol N | | ``f_s`` | `slow_sinking_mortality_fraction` | - | -| ``\mu_{DOM}`` | `disolved_organic_breakdown_rate` | 1 / s | +| ``\mu_{DOM}`` | `dissolved_organic_breakdown_rate` | 1 / s | | ``\eta`` | `zooplankton_calcite_dissolution` | - | All default parameter values are given in [Parameters](@ref parameters); and a more thorough explanation of new terms will be included in a publication that is in prep. diff --git a/docs/src/model_components/individuals/slatissima.md b/docs/src/model_components/individuals/slatissima.md index 71b1c6203..eb18809f2 100644 --- a/docs/src/model_components/individuals/slatissima.md +++ b/docs/src/model_components/individuals/slatissima.md @@ -126,7 +126,7 @@ R = \left[R_A\left(\frac{\mu}{\mu_\text{max}} + \frac{J}{J_\text{max}}\right) + | Symbol | Variable name | Units | |--------------------------|--------------------------------------|-------------------------| -| ``A_0`` | `growth_rate_adjustement` | 1 / dm² | +| ``A_0`` | `growth_rate_adjustment` | 1 / dm² | | ``\alpha`` | `photosynthetic_efficiency` | gC / dm² / s / einstein | | ``C_\text{min}`` | `minimum_carbon_reserve` | gC / gSW | | ``C_\text{struct}`` | `structural_carbon` | gC / gSW | @@ -139,8 +139,8 @@ R = \left[R_A\left(\frac{\mu}{\mu_\text{max}} + \frac{J}{J_\text{max}}\right) + | ``k_N`` | `nitrogen_reserve_per_nitrogen` | g / gN | | ``N_\text{min}`` | `minimum_nitrogen_reserve` | gN / gSW | | ``N_\text{max}`` | `maximum_nitrogen_reserve` | gN / gSW | -| ``m_2`` | `growth_adjustement_2` | - | -| ``m_1`` | `growth_adjustement_1` | - | +| ``m_2`` | `growth_adjustment_2` | - | +| ``m_1`` | `growth_adjustment_1` | - | | ``\mu_\text{max}`` | `maximum_specific_growth_rate` | 1 / s | | ``N_\text{struct}`` | `structural_nitrogen` | gN / gSW | | ``P_1`` | `photosynthesis_at_ref_temp_1` | gC / dm² / s | diff --git a/docs/src/model_components/sediments/instant_remineralisation.md b/docs/src/model_components/sediments/instant_remineralisation.md index c21644cf5..3a1fbd9e8 100644 --- a/docs/src/model_components/sediments/instant_remineralisation.md +++ b/docs/src/model_components/sediments/instant_remineralisation.md @@ -18,7 +18,7 @@ where ``F_{OC}`` is the carbon flux (in this implementation the nitrogen flux mu |---------|-------------------------------------|-----------------| | ``E_0`` | `burial_efficiency_constant1` | - | | ``E_1`` | `burial_efficiency_constant2` | - | -| ``k_B`` | `burial_efficiency_half_saturaiton` | mmol C / m² / s | +| ``k_B`` | `burial_efficiency_half_saturation` | mmol C / m² / s | ## Model conservations diff --git a/docs/src/model_implementation.md b/docs/src/model_implementation.md index 11c5428c9..85fa51553 100644 --- a/docs/src/model_implementation.md +++ b/docs/src/model_implementation.md @@ -5,7 +5,7 @@ Here we describe how OceanBioME defines biogeochemical (BGC) models, how this va ## Model structure OceanBioME BGC models are `struct`s of type `ContinuousFormBiogeochemistry`, which is of abstract type `AbstractContinuousFormBiogeochemistry` from Oceananigans. In Oceananigans this describes BGC models which are defined using continuous functions (depending continuously on ``x``, ``y``, and ``z``) rather than discrete functions (depending on ``i``, ``j``, ``k``). This allows the user to implement the BGC model equations without worrying about details of the grid or discretization, and then Oceananigans handles the rest. -OceanBioME's `ContinuousFormBiogeochemistry` adds a layer on top of this which makes it easy to add [light attenuation models](@ref light), [sediment](@ref sediment), and [biologically active particles](@ref individuals) (or indivdiual-based models). OceanBioME's `ContinuousFormBiogeochemistry` includes parameters in which the types of these components are stored. This means that these model components will automatically be integrated into the BGC model without having to add new methods to call Oceananigans functions. +OceanBioME's `ContinuousFormBiogeochemistry` adds a layer on top of this which makes it easy to add [light attenuation models](@ref light), [sediment](@ref sediment), and [biologically active particles](@ref individuals) (or individual-based models). OceanBioME's `ContinuousFormBiogeochemistry` includes parameters in which the types of these components are stored. This means that these model components will automatically be integrated into the BGC model without having to add new methods to call Oceananigans functions. ## Implementing a model diff --git a/src/Boundaries/Sediments/instant_remineralization.jl b/src/Boundaries/Sediments/instant_remineralization.jl index 3828b1629..be1f51066 100644 --- a/src/Boundaries/Sediments/instant_remineralization.jl +++ b/src/Boundaries/Sediments/instant_remineralization.jl @@ -3,14 +3,14 @@ Hold the parameters and fields the simplest benthic boundary layer where organic carbon is assumed to remineralise instantly with some portion -becoming N, and a fraction being perminantly burried. +becoming N, and a fraction being permanently buried. Burial efficiency from [RemineralisationFraction](@citet). """ struct InstantRemineralisation{FT, F, TE, B} <: FlatSediment burial_efficiency_constant1 :: FT burial_efficiency_constant2 :: FT - burial_efficiency_half_saturaiton :: FT + burial_efficiency_half_saturation :: FT fields :: F tendencies :: TE @@ -18,13 +18,13 @@ struct InstantRemineralisation{FT, F, TE, B} <: FlatSediment InstantRemineralisation(burial_efficiency_constant1::FT, burial_efficiency_constant2::FT, - burial_efficiency_half_saturaiton::FT, + burial_efficiency_half_saturation::FT, fields::F, tendencies::TE, bottom_indices::B) where {FT, F, TE, B} = new{FT, F, TE, B}(burial_efficiency_constant1, burial_efficiency_constant2, - burial_efficiency_half_saturaiton, + burial_efficiency_half_saturation, fields, tendencies, bottom_indices) @@ -34,7 +34,7 @@ end InstantRemineralisation(; grid, burial_efficiency_constant1::FT = 0.013, burial_efficiency_constant2::FT = 0.53, - burial_efficiency_half_saturaiton::FT = 7) + burial_efficiency_half_saturation::FT = 7) Return a single-layer instant remineralisaiton model for NPZD bgc models. @@ -52,7 +52,7 @@ sediment_model = InstantRemineralisation(; grid) function InstantRemineralisation(; grid, burial_efficiency_constant1 = 0.013, burial_efficiency_constant2 = 0.53, - burial_efficiency_half_saturaiton = 7.0) + burial_efficiency_half_saturation = 7.0) @warn "Sediment models are an experimental feature and have not yet been validated" @@ -67,7 +67,7 @@ function InstantRemineralisation(; grid, return InstantRemineralisation(burial_efficiency_constant1, burial_efficiency_constant2, - burial_efficiency_half_saturaiton, + burial_efficiency_half_saturation, fields, tendencies, bottom_indices) @@ -76,7 +76,7 @@ end adapt_structure(to, sediment::InstantRemineralisation) = InstantRemineralisation(adapt(to, sediment.burial_efficiency_constant1), adapt(to, sediment.burial_efficiency_constant2), - adapt(to, sediment.burial_efficiency_half_saturaiton), + adapt(to, sediment.burial_efficiency_half_saturation), adapt(to, sediment.fields), nothing, adapt(to, sediment.bottom_indices)) diff --git a/src/Boundaries/Sediments/simple_multi_G.jl b/src/Boundaries/Sediments/simple_multi_G.jl index c30192a9b..6f2cb42ee 100644 --- a/src/Boundaries/Sediments/simple_multi_G.jl +++ b/src/Boundaries/Sediments/simple_multi_G.jl @@ -65,7 +65,7 @@ can be optionally specified. The model is a single layer (i.e. does not include porous diffusion) model with three classes of sediment organic matter which decay at three different rates (fast, slow, refactory). -The nitrifcation/denitrifcation/anoxic mineralisation fractions default to the parameterisation +The nitrification/denitrification/anoxic mineralisation fractions default to the parameterisation of Soetaert et al. 2000; doi:[10.1016/S0012-8252(00)00004-0](https://doi.org/10.1016/S0012-8252(00)00004-0). This model has not yet been validated or compared to observational data. The variety of degridation diff --git a/src/Models/AdvectedPopulations/LOBSTER/LOBSTER.jl b/src/Models/AdvectedPopulations/LOBSTER/LOBSTER.jl index b83bfa403..401a4ea64 100644 --- a/src/Models/AdvectedPopulations/LOBSTER/LOBSTER.jl +++ b/src/Models/AdvectedPopulations/LOBSTER/LOBSTER.jl @@ -11,13 +11,13 @@ Tracers * Zooplankton: Z (mmol N/m³) * Small (slow sinking) particulate organic matter: sPOM (mmol N/m³) * Large (fast sinking) particulate organic matter: bPOM (mmol N/m³) -* Disolved organic matter: DOM (mmol N/m³) +* Dissolved organic matter: DOM (mmol N/m³) Optional tracers ================ Carbonate chemistry -* Disolved inorganic carbon: DIC (mmol C/m³) +* Dissolved inorganic carbon: DIC (mmol C/m³) * Alkalinity: Alk (meq/m³) Oxygen chemistry @@ -27,7 +27,7 @@ Variable redfield * Small (slow sinking) particulate organic matter carbon content: sPOC (mmol C/m³) * Large (fast sinking) particulate organic matter carbon content: bPOC (mmol C/m³) -* Disolved organic matter carbon content: DOC (mmol C/m³) +* Dissolved organic matter carbon content: DOC (mmol C/m³) * When this option is enabled then the usual sPOM and bPOM change to sPON and bPON as they explicitly represent the nitrogen contained in the particulate matter Required submodels @@ -83,7 +83,7 @@ struct LOBSTER{FT, B, W} <: AbstractContinuousFormBiogeochemistry small_detritus_remineralisation_rate :: FT large_detritus_remineralisation_rate :: FT phytoplankton_exudation_fraction :: FT - nitrifcaiton_rate :: FT + nitrification_rate :: FT ammonia_fraction_of_exudate :: FT ammonia_fraction_of_excriment :: FT ammonia_fraction_of_detritus :: FT @@ -91,11 +91,11 @@ struct LOBSTER{FT, B, W} <: AbstractContinuousFormBiogeochemistry organic_redfield :: FT phytoplankton_chlorophyll_ratio :: FT organic_carbon_calcate_ratio :: FT - respiraiton_oxygen_nitrogen_ratio :: FT - nitrifcation_oxygen_nitrogen_ratio :: FT + respiration_oxygen_nitrogen_ratio :: FT + nitrification_oxygen_nitrogen_ratio :: FT slow_sinking_mortality_fraction :: FT fast_sinking_mortality_fraction :: FT - disolved_organic_breakdown_rate :: FT + dissolved_organic_breakdown_rate :: FT zooplankton_calcite_dissolution :: FT optionals :: B @@ -117,7 +117,7 @@ struct LOBSTER{FT, B, W} <: AbstractContinuousFormBiogeochemistry small_detritus_remineralisation_rate::FT, large_detritus_remineralisation_rate::FT, phytoplankton_exudation_fraction::FT, - nitrifcaiton_rate::FT, + nitrification_rate::FT, ammonia_fraction_of_exudate::FT, ammonia_fraction_of_excriment::FT, ammonia_fraction_of_detritus::FT, @@ -125,11 +125,11 @@ struct LOBSTER{FT, B, W} <: AbstractContinuousFormBiogeochemistry organic_redfield::FT, phytoplankton_chlorophyll_ratio::FT, organic_carbon_calcate_ratio::FT, - respiraiton_oxygen_nitrogen_ratio::FT, - nitrifcation_oxygen_nitrogen_ratio::FT, + respiration_oxygen_nitrogen_ratio::FT, + nitrification_oxygen_nitrogen_ratio::FT, slow_sinking_mortality_fraction::FT, fast_sinking_mortality_fraction::FT, - disolved_organic_breakdown_rate::FT, + dissolved_organic_breakdown_rate::FT, zooplankton_calcite_dissolution::FT, optionals::B, @@ -151,7 +151,7 @@ struct LOBSTER{FT, B, W} <: AbstractContinuousFormBiogeochemistry small_detritus_remineralisation_rate, large_detritus_remineralisation_rate, phytoplankton_exudation_fraction, - nitrifcaiton_rate, + nitrification_rate, ammonia_fraction_of_exudate, ammonia_fraction_of_excriment, ammonia_fraction_of_detritus, @@ -159,11 +159,11 @@ struct LOBSTER{FT, B, W} <: AbstractContinuousFormBiogeochemistry organic_redfield, phytoplankton_chlorophyll_ratio, organic_carbon_calcate_ratio, - respiraiton_oxygen_nitrogen_ratio, - nitrifcation_oxygen_nitrogen_ratio, + respiration_oxygen_nitrogen_ratio, + nitrification_oxygen_nitrogen_ratio, slow_sinking_mortality_fraction, fast_sinking_mortality_fraction, - disolved_organic_breakdown_rate, + dissolved_organic_breakdown_rate, zooplankton_calcite_dissolution, optionals, @@ -189,7 +189,7 @@ end small_detritus_remineralisation_rate::FT = 5.88e-7, # 1/s large_detritus_remineralisation_rate::FT = 5.88e-7, # 1/s phytoplankton_exudation_fraction::FT = 0.05, - nitrifcaiton_rate::FT = 5.8e-7, # 1/s + nitrification_rate::FT = 5.8e-7, # 1/s ammonia_fraction_of_exudate::FT = 0.75, ammonia_fraction_of_excriment::FT = 0.5, ammonia_fraction_of_detritus::FT = 0.0, @@ -197,11 +197,11 @@ end organic_redfield::FT = 6.56, # mol C/mol N phytoplankton_chlorophyll_ratio::FT = 1.31, # g Chl/mol N organic_carbon_calcate_ratio::FT = 0.1, # mol CaCO₃/mol C - respiraiton_oxygen_nitrogen_ratio::FT = 10.75, # mol O/molN - nitrifcation_oxygen_nitrogen_ratio::FT = 2.0, # mol O/molN + respiration_oxygen_nitrogen_ratio::FT = 10.75, # mol O/molN + nitrification_oxygen_nitrogen_ratio::FT = 2.0, # mol O/molN slow_sinking_mortality_fraction::FT = 0.5, fast_sinking_mortality_fraction::FT = 0.5, - disolved_organic_breakdown_rate::FT = 3.86e-7, # 1/s + dissolved_organic_breakdown_rate::FT = 3.86e-7, # 1/s zooplankton_calcite_dissolution::FT = 0.3, surface_phytosynthetically_active_radiation::SPAR = default_surface_PAR, @@ -226,11 +226,11 @@ Keyword Arguments ================= - `grid`: (required) the geometry to build the model on, required to calculate sinking -- `phytoplankton_preference`, ..., `disolved_organic_breakdown_rate`: LOBSTER parameter values +- `phytoplankton_preference`, ..., `dissolved_organic_breakdown_rate`: LOBSTER parameter values - `surface_phytosynthetically_active_radiation`: funciton (or array in the future) for the photosynthetically available radiation at the surface, should be shape `f(x, y, t)` - `light_attenuation_model`: light attenuation model which integrated the attenuation of available light - `sediment_model`: slot for `AbstractSediment` -- `carbonates`, `oxygen`, and `variable_redfield`: include models for carbonate chemistry and/or oxygen chemistry and/or variable redfield ratio disolved and particulate organic matter +- `carbonates`, `oxygen`, and `variable_redfield`: include models for carbonate chemistry and/or oxygen chemistry and/or variable redfield ratio dissolved and particulate organic matter - `sinking_speed`: named tuple of constant sinking, of fields (i.e. `ZFaceField(...)`) for any tracers which sink (convention is that a sinking speed is positive, but a field will need to follow the usual down being negative) - `open_bottom`: should the sinking velocity be smoothly brought to zero at the bottom to prevent the tracers leaving the domain - `particles`: slot for `BiogeochemicalParticles` @@ -269,7 +269,7 @@ function LOBSTER(; grid, small_detritus_remineralisation_rate::FT = 5.88e-7, # 1/s large_detritus_remineralisation_rate::FT = 5.88e-7, # 1/s phytoplankton_exudation_fraction::FT = 0.05, - nitrifcaiton_rate::FT = 5.8e-7, # 1/s + nitrification_rate::FT = 5.8e-7, # 1/s ammonia_fraction_of_exudate::FT = 0.75, ammonia_fraction_of_excriment::FT = 0.5, ammonia_fraction_of_detritus::FT = 0.0, @@ -277,11 +277,11 @@ function LOBSTER(; grid, organic_redfield::FT = 6.56, # mol C/mol N phytoplankton_chlorophyll_ratio::FT = 1.31, # g Chl/mol N organic_carbon_calcate_ratio::FT = 0.1, # mol CaCO₃/mol C - respiraiton_oxygen_nitrogen_ratio::FT = 10.75, # mol O/molN - nitrifcation_oxygen_nitrogen_ratio::FT = 2.0, # mol O/molN + respiration_oxygen_nitrogen_ratio::FT = 10.75, # mol O/molN + nitrification_oxygen_nitrogen_ratio::FT = 2.0, # mol O/molN slow_sinking_mortality_fraction::FT = 0.5, fast_sinking_mortality_fraction::FT = 0.5, - disolved_organic_breakdown_rate::FT = 3.86e-7, # 1/s + dissolved_organic_breakdown_rate::FT = 3.86e-7, # 1/s zooplankton_calcite_dissolution::FT = 0.3, surface_phytosynthetically_active_radiation = default_surface_PAR, @@ -326,7 +326,7 @@ function LOBSTER(; grid, small_detritus_remineralisation_rate, large_detritus_remineralisation_rate, phytoplankton_exudation_fraction, - nitrifcaiton_rate, + nitrification_rate, ammonia_fraction_of_exudate, ammonia_fraction_of_excriment, ammonia_fraction_of_detritus, @@ -334,11 +334,11 @@ function LOBSTER(; grid, organic_redfield, phytoplankton_chlorophyll_ratio, organic_carbon_calcate_ratio, - respiraiton_oxygen_nitrogen_ratio, - nitrifcation_oxygen_nitrogen_ratio, + respiration_oxygen_nitrogen_ratio, + nitrification_oxygen_nitrogen_ratio, slow_sinking_mortality_fraction, fast_sinking_mortality_fraction, - disolved_organic_breakdown_rate, + dissolved_organic_breakdown_rate, zooplankton_calcite_dissolution, optionals, @@ -377,7 +377,7 @@ required_biogeochemical_auxiliary_fields(::LOBSTER) = (:PAR, ) const small_detritus = Union{Val{:sPON}, Val{:sPOC}} const large_detritus = Union{Val{:bPON}, Val{:bPOC}} -const disolved_organic_matter = Union{Val{:DON}, Val{:DOC}} +const dissolved_organic_matter = Union{Val{:DON}, Val{:DOC}} const sPOM = Union{Val{:sPOM}, Val{:sPON}} const bPOM = Union{Val{:bPOM}, Val{:bPON}} @@ -385,7 +385,7 @@ const DOM = Union{Val{:DOM}, Val{:DON}} @inline biogeochemical_drift_velocity(bgc::LOBSTER, ::small_detritus) = biogeochemical_drift_velocity(bgc, Val(:sPOM)) @inline biogeochemical_drift_velocity(bgc::LOBSTER, ::large_detritus) = biogeochemical_drift_velocity(bgc, Val(:bPOM)) -@inline biogeochemical_drift_velocity(bgc::LOBSTER, ::disolved_organic_matter) = biogeochemical_drift_velocity(bgc, Val(:DOM)) +@inline biogeochemical_drift_velocity(bgc::LOBSTER, ::dissolved_organic_matter) = biogeochemical_drift_velocity(bgc, Val(:DOM)) @inline function biogeochemical_drift_velocity(bgc::LOBSTER, ::Val{tracer_name}) where tracer_name if tracer_name in keys(bgc.sinking_velocities) @@ -415,7 +415,7 @@ adapt_structure(to, lobster::LOBSTER) = adapt(to, lobster.small_detritus_remineralisation_rate), adapt(to, lobster.large_detritus_remineralisation_rate), adapt(to, lobster.phytoplankton_exudation_fraction), - adapt(to, lobster.nitrifcaiton_rate), + adapt(to, lobster.nitrification_rate), adapt(to, lobster.ammonia_fraction_of_exudate), adapt(to, lobster.ammonia_fraction_of_excriment), adapt(to, lobster.ammonia_fraction_of_detritus), @@ -423,11 +423,11 @@ adapt_structure(to, lobster::LOBSTER) = adapt(to, lobster.organic_redfield), adapt(to, lobster.phytoplankton_chlorophyll_ratio), adapt(to, lobster.organic_carbon_calcate_ratio), - adapt(to, lobster.respiraiton_oxygen_nitrogen_ratio), - adapt(to, lobster.nitrifcation_oxygen_nitrogen_ratio), + adapt(to, lobster.respiration_oxygen_nitrogen_ratio), + adapt(to, lobster.nitrification_oxygen_nitrogen_ratio), adapt(to, lobster.slow_sinking_mortality_fraction), adapt(to, lobster.fast_sinking_mortality_fraction), - adapt(to, lobster.disolved_organic_breakdown_rate), + adapt(to, lobster.dissolved_organic_breakdown_rate), adapt(to, lobster.zooplankton_calcite_dissolution), adapt(to, lobster.optionals), adapt(to, lobster.sinking_velocities)) diff --git a/src/Models/AdvectedPopulations/LOBSTER/carbonate_chemistry.jl b/src/Models/AdvectedPopulations/LOBSTER/carbonate_chemistry.jl index e2edb8839..2fb78f35f 100644 --- a/src/Models/AdvectedPopulations/LOBSTER/carbonate_chemistry.jl +++ b/src/Models/AdvectedPopulations/LOBSTER/carbonate_chemistry.jl @@ -10,7 +10,7 @@ αᵈ = bgc.ammonia_fraction_of_detritus μˢᵖᵒᶜ = bgc.small_detritus_remineralisation_rate μᵇᵖᵒᶜ = bgc.large_detritus_remineralisation_rate - μᵈᵒᵐ = bgc.disolved_organic_breakdown_rate + μᵈᵒᵐ = bgc.dissolved_organic_breakdown_rate μᶻ = bgc.zooplankton_excretion_rate ρᶜᵃᶜᵒ³ = bgc.organic_carbon_calcate_ratio Rdᵖ = bgc.phytoplankton_redfield diff --git a/src/Models/AdvectedPopulations/LOBSTER/core.jl b/src/Models/AdvectedPopulations/LOBSTER/core.jl index af067b793..ed862fdf7 100644 --- a/src/Models/AdvectedPopulations/LOBSTER/core.jl +++ b/src/Models/AdvectedPopulations/LOBSTER/core.jl @@ -14,7 +14,7 @@ kₚₐᵣ = bgc.light_half_saturation ψ = bgc.nitrate_ammonia_inhibition kₙₒ₃ = bgc.nitrate_half_saturation - μₙ = bgc.nitrifcaiton_rate + μₙ = bgc.nitrification_rate return μₙ*NH₄ - μₚ*Lₚₐᵣ(PAR, kₚₐᵣ)*Lₙₒ₃(NO₃, NH₄, ψ, kₙₒ₃)*P end @@ -27,12 +27,12 @@ end ψ = bgc.nitrate_ammonia_inhibition kₙₒ₃ = bgc.nitrate_half_saturation kₙₕ₄ = bgc.ammonia_half_saturation - μₙ = bgc.nitrifcaiton_rate + μₙ = bgc.nitrification_rate αᶻ = bgc.ammonia_fraction_of_excriment αᵈ = bgc.ammonia_fraction_of_detritus μᵈ = bgc.small_detritus_remineralisation_rate μᵈᵈ = bgc.large_detritus_remineralisation_rate - μᵈᵒᵐ = bgc.disolved_organic_breakdown_rate + μᵈᵒᵐ = bgc.dissolved_organic_breakdown_rate μᶻ = bgc.zooplankton_excretion_rate return (αᵖ * γ * μₚ * Lₚₐᵣ(PAR, kₚₐᵣ) * (Lₙₒ₃(NO₃, NH₄, ψ, kₙₒ₃) + Lₙₕ₄(NH₄, kₙₕ₄)) * P @@ -56,7 +56,7 @@ end αᵈ = bgc.ammonia_fraction_of_detritus μᵈ = bgc.small_detritus_remineralisation_rate μᵈᵈ = bgc.large_detritus_remineralisation_rate - μᵈᵒᵐ = bgc.disolved_organic_breakdown_rate + μᵈᵒᵐ = bgc.dissolved_organic_breakdown_rate μᶻ = bgc.zooplankton_excretion_rate return ((1 - αᵖ) * γ * μₚ * Lₚₐᵣ(PAR, kₚₐᵣ) * (Lₙₒ₃(NO₃, NH₄, ψ, kₙₒ₃) + Lₙₕ₄(NH₄, kₙₕ₄)) * P diff --git a/src/Models/AdvectedPopulations/LOBSTER/fallbacks.jl b/src/Models/AdvectedPopulations/LOBSTER/fallbacks.jl index fd8902c26..ddb8b3873 100644 --- a/src/Models/AdvectedPopulations/LOBSTER/fallbacks.jl +++ b/src/Models/AdvectedPopulations/LOBSTER/fallbacks.jl @@ -11,7 +11,7 @@ # Carbonates and oxygen # We can't tell the difference between carbonates and oxygen, and variable redfields without specifying more -# We're lucky that the optional groups have 2, 1, 3 extra variables each so this is the only non-unique conbination +# We're lucky that the optional groups have 2, 1, 3 extra variables each so this is the only non-unique combination @inline (bgc::LOBSTER{<:Any, <:Val{(true, true, false)}, <:Any})(tracer::Val{:DIC}, x, y, z, t, NO₃, NH₄, P, Z, sPOM, bPOM, DOM, DIC, Alk, O₂, PAR) = bgc(tracer, x, y, z, t, NO₃, NH₄, P, Z, sPOM, bPOM, DOM, DIC, Alk, PAR) @inline (bgc::LOBSTER{<:Any, <:Val{(true, true, false)}, <:Any})(tracer::Val{:Alk}, x, y, z, t, NO₃, NH₄, P, Z, sPOM, bPOM, DOM, DIC, Alk, O₂, PAR) = bgc(tracer, x, y, z, t, NO₃, NH₄, P, Z, sPOM, bPOM, DOM, DIC, Alk, PAR) @inline (bgc::LOBSTER{<:Any, <:Val{(true, true, false)}, <:Any})(tracer::Val{:O₂}, x, y, z, t, NO₃, NH₄, P, Z, sPOM, bPOM, DOM, DIC, Alk, O₂, PAR) = bgc(tracer, x, y, z, t, NO₃, NH₄, P, Z, sPOM, bPOM, DOM, O₂, PAR) diff --git a/src/Models/AdvectedPopulations/LOBSTER/oxygen_chemistry.jl b/src/Models/AdvectedPopulations/LOBSTER/oxygen_chemistry.jl index 555f66bac..1b964bfb8 100644 --- a/src/Models/AdvectedPopulations/LOBSTER/oxygen_chemistry.jl +++ b/src/Models/AdvectedPopulations/LOBSTER/oxygen_chemistry.jl @@ -5,9 +5,9 @@ ψ = bgc.nitrate_ammonia_inhibition kₙₒ₃ = bgc.nitrate_half_saturation kₙₕ₄ = bgc.ammonia_half_saturation - ROᵖ = bgc.respiraiton_oxygen_nitrogen_ratio - ROⁿ = bgc.nitrifcation_oxygen_nitrogen_ratio - μₙ = bgc.nitrifcaiton_rate + ROᵖ = bgc.respiration_oxygen_nitrogen_ratio + ROⁿ = bgc.nitrification_oxygen_nitrogen_ratio + μₙ = bgc.nitrification_rate return (μₚ * Lₚₐᵣ(PAR, kₚₐᵣ) * (Lₙₒ₃(NO₃, NH₄, ψ, kₙₒ₃) + Lₙₕ₄(NH₄, kₙₕ₄)) * ROᵖ * P - (ROᵖ - ROⁿ) * bgc(Val(:NH₄), x, y, z, t, NO₃, NH₄, P, Z, sPOM, bPOM, DOM, PAR) diff --git a/src/Models/AdvectedPopulations/NPZD.jl b/src/Models/AdvectedPopulations/NPZD.jl index 05583594d..8288bb6db 100644 --- a/src/Models/AdvectedPopulations/NPZD.jl +++ b/src/Models/AdvectedPopulations/NPZD.jl @@ -127,7 +127,7 @@ Keyword Arguments - `grid`: (required) the geometry to build the model on, required to calculate sinking - `initial_photosynthetic_slope`, ..., `remineralization_rate`: NPZD parameter values -- `surface_phytosynthetically_active_radiation`: funciton (or array in the future) for the photosynthetically available radiation at the surface, should be shape `f(x, y, t)` +- `surface_phytosynthetically_active_radiation`: function (or array in the future) for the photosynthetically available radiation at the surface, should be shape `f(x, y, t)` - `light_attenuation_model`: light attenuation model which integrated the attenuation of available light - `sediment_model`: slot for `AbstractSediment` - `sinking_speed`: named tuple of constant sinking, of fields (i.e. `ZFaceField(...)`) for any tracers which sink (convention is that a sinking speed is positive, but a field will need to follow the usual down being negative) diff --git a/src/Models/Individuals/SLatissima.jl b/src/Models/Individuals/SLatissima.jl index a1397f4bd..66594deb5 100644 --- a/src/Models/Individuals/SLatissima.jl +++ b/src/Models/Individuals/SLatissima.jl @@ -40,7 +40,7 @@ import Oceananigans.Models.LagrangianParticleTracking: update_lagrangian_particl """ SLatissima(; architecture :: AR = CPU(), - growth_rate_adjustement :: FT = 4.5, + growth_rate_adjustment :: FT = 4.5, photosynthetic_efficiency :: FT = 4.15e-5 * 24 * 10^6 / (24 * 60 * 60), minimum_carbon_reserve :: FT = 0.01, structural_carbon :: FT = 0.2, @@ -53,8 +53,8 @@ import Oceananigans.Models.LagrangianParticleTracking: update_lagrangian_particl nitrogen_reserve_per_nitrogen :: FT = 2.72, minimum_nitrogen_reserve :: FT = 0.0126, maximum_nitrogen_reserve :: FT = 0.0216, - growth_adjustement_2 :: FT = 0.039 / (2 * (1 - minimum_nitrogen_reserve / maximum_nitrogen_reserve)), - growth_adjustement_1 :: FT = 0.18 / (2 * (1 - minimum_nitrogen_reserve / maximum_nitrogen_reserve)) - growth_adjustement_2, + growth_adjustment_2 :: FT = 0.039 / (2 * (1 - minimum_nitrogen_reserve / maximum_nitrogen_reserve)), + growth_adjustment_1 :: FT = 0.18 / (2 * (1 - minimum_nitrogen_reserve / maximum_nitrogen_reserve)) - growth_adjustment_2, maximum_specific_growth_rate :: FT = 0.18, structural_nitrogen :: FT = 0.0146, photosynthesis_at_ref_temp_1 :: FT = 1.22e-3 * 24, @@ -114,7 +114,7 @@ Keyword Arguments ================= - `architecture`: the architecture to adapt arrays to -- `growth_rate_adjustement`, ..., `exudation_redfield_ratio`: parameter values +- `growth_rate_adjustment`, ..., `exudation_redfield_ratio`: parameter values - `prescribed_velocity`: functions for the relative velocity `f(x, y, z, t)` - `x`,`y` and `z`: positions of the particles - `A`, `N`, and `C`: area, nitrogen, and carbon reserves @@ -125,7 +125,7 @@ Keyword Arguments """ Base.@kwdef struct SLatissima{AR, FT, U, P, F} <: BiogeochemicalParticles architecture :: AR = CPU() - growth_rate_adjustement :: FT = 4.5 + growth_rate_adjustment :: FT = 4.5 photosynthetic_efficiency :: FT = 4.15e-5 * 24 * 10^6 / (24 * 60 * 60) minimum_carbon_reserve :: FT = 0.01 structural_carbon :: FT = 0.2 @@ -138,8 +138,8 @@ Base.@kwdef struct SLatissima{AR, FT, U, P, F} <: BiogeochemicalParticles nitrogen_reserve_per_nitrogen :: FT = 2.72 minimum_nitrogen_reserve :: FT = 0.0126 maximum_nitrogen_reserve :: FT = 0.0216 - growth_adjustement_2 :: FT = 0.039 / (2 * (1 - minimum_nitrogen_reserve / maximum_nitrogen_reserve)) - growth_adjustement_1 :: FT = 0.18 / (2 * (1 - minimum_nitrogen_reserve / maximum_nitrogen_reserve)) - growth_adjustement_2 + growth_adjustment_2 :: FT = 0.039 / (2 * (1 - minimum_nitrogen_reserve / maximum_nitrogen_reserve)) + growth_adjustment_1 :: FT = 0.18 / (2 * (1 - minimum_nitrogen_reserve / maximum_nitrogen_reserve)) - growth_adjustment_2 maximum_specific_growth_rate :: FT = 0.18 structural_nitrogen :: FT = 0.0146 photosynthesis_at_ref_temp_1 :: FT = 1.22e-3 * 24 @@ -197,7 +197,7 @@ Base.@kwdef struct SLatissima{AR, FT, U, P, F} <: BiogeochemicalParticles end adapt_structure(to, kelp::SLatissima) = SLatissima(adapt(to, kelp.architecture), - adapt(to, kelp.growth_rate_adjustement), + adapt(to, kelp.growth_rate_adjustment), adapt(to, kelp.photosynthetic_efficiency), adapt(to, kelp.minimum_carbon_reserve), adapt(to, kelp.structural_carbon), @@ -210,8 +210,8 @@ adapt_structure(to, kelp::SLatissima) = SLatissima(adapt(to, kelp.architecture), adapt(to, kelp.nitrogen_reserve_per_nitrogen), adapt(to, kelp.minimum_nitrogen_reserve), adapt(to, kelp.maximum_nitrogen_reserve), - adapt(to, kelp.growth_adjustement_2), - adapt(to, kelp.growth_adjustement_1), + adapt(to, kelp.growth_adjustment_2), + adapt(to, kelp.growth_adjustment_1), adapt(to, kelp.maximum_specific_growth_rate), adapt(to, kelp.structural_nitrogen), adapt(to, kelp.photosynthesis_at_ref_temp_1), @@ -475,7 +475,7 @@ end @inline f_curr(u, p) = p.current_1 * (1 - exp(-u / p.current_3)) + p.current_2 -@inline f_area(a, p) = p.growth_adjustement_1 * exp(-(a / p.growth_rate_adjustement)^2) + p.growth_adjustement_2 +@inline f_area(a, p) = p.growth_adjustment_1 * exp(-(a / p.growth_rate_adjustment)^2) + p.growth_adjustment_2 @inline function f_temp(T, p) # should probably parameterise these limits diff --git a/src/OceanBioME.jl b/src/OceanBioME.jl index 04da4c581..4cfa8a531 100644 --- a/src/OceanBioME.jl +++ b/src/OceanBioME.jl @@ -25,7 +25,7 @@ export Boundaries, Sediments, GasExchange, FlatSediment # Utilities export column_advection_timescale, sinking_advection_timescale, Budget -# Positivity preservaiton utilities +# Positivity preservation utilities export ScaleNegativeTracers, ZeroNegativeTracers # Oceananigans extensions @@ -82,7 +82,7 @@ Keyword Arguments - `light_attenuation_model`: light attenuation model which integrated the attenuation of available light - `sediment_model`: slot for `AbstractSediment` - `particles`: slot for `BiogeochemicalParticles` -- `modifiers`: slot for components which modfiy the biogeochemistry when the tendencies have been calculated or when the state is updated +- `modifiers`: slot for components which modify the biogeochemistry when the tendencies have been calculated or when the state is updated """ Biogeochemistry(underlying_biogeochemistry; light_attenuation = nothing, diff --git a/src/Utils/makie_recipies.jl b/src/Utils/makie_recipies.jl index 6a77e1b48..1b667581e 100644 --- a/src/Utils/makie_recipies.jl +++ b/src/Utils/makie_recipies.jl @@ -69,11 +69,11 @@ function Makie.plot!(res::ResultsLOBSTER) hm_DD = heatmap!(ax_DD, res.t/years, res.z, res.DD') Colorbar(fig[2, 8], hm_DD) - ax_DOM = Axis(fig[3, 1], title = "Disolved organic matter (mmol N/m³)") + ax_DOM = Axis(fig[3, 1], title = "Dissolved organic matter (mmol N/m³)") hm_DOM = heatmap!(ax_DOM, res.t/years, res.z, res.DOM') Colorbar(fig[3, 2], hm_DOM) - ax_DIC = Axis(fig[3, 3], title = "Disolved inorganic matter (mmol N/m³)") + ax_DIC = Axis(fig[3, 3], title = "Dissolved inorganic matter (mmol N/m³)") hm_DIC = heatmap!(ax_DIC, res.t/years, res.z, res.DIC') Colorbar(fig[3, 4], hm_DIC)