Skip to content

Commit

Permalink
Merge pull request #155 from pitmonticone/main
Browse files Browse the repository at this point in the history
(0.9.0) Fix typos in code, docs, and docstrings
  • Loading branch information
navidcy authored Nov 8, 2023
2 parents 8d3a355 + 74cdc73 commit be8c0be
Show file tree
Hide file tree
Showing 18 changed files with 81 additions and 82 deletions.
3 changes: 1 addition & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "OceanBioME"
uuid = "a49af516-9db8-4be4-be45-1dad61c5a376"
authors = ["Jago Strong-Wright <js2430@damtp.cam.ac.uk> and contributors"]
version = "0.8.0"
version = "0.9.0"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
8 changes: 4 additions & 4 deletions docs/src/model_components/biogeochemical/LOBSTER.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,18 +140,18 @@ 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` | - |
| ``R_P`` | `phytoplankton_redfield` | mmol C / mmol N |
| ``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.
Expand Down
6 changes: 3 additions & 3 deletions docs/src/model_components/individuals/slatissima.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/src/model_implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 8 additions & 8 deletions src/Boundaries/Sediments/instant_remineralization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@
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
bottom_indices :: B

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)
Expand All @@ -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.
Expand All @@ -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"

Expand All @@ -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)
Expand All @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion src/Boundaries/Sediments/simple_multi_G.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

2 comments on commit be8c0be

@navidcy
Copy link
Collaborator Author

@navidcy navidcy commented on be8c0be Nov 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/95018

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.0 -m "<description of version>" be8c0bebe935df2877edaedd2e6535ff2cc830ca
git push origin v0.9.0

Please sign in to comment.