Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(0.12.0) Implements PISCES model #178

Merged
merged 353 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
353 commits
Select commit Hold shift + click to select a range
d2868f1
added oxygen args
ciadht Jul 19, 2024
4b004bc
changed oxy args
hannahmw1 Jul 19, 2024
f607325
changed functions
hannahmw1 Jul 19, 2024
37cca54
typo
hannahmw1 Jul 19, 2024
94d2849
subscript typo
hannahmw1 Jul 19, 2024
c9b5d71
Its alive!
hannahmw1 Jul 19, 2024
cfe0751
Added constant Fields
ciadht Jul 19, 2024
476fc04
changed definition of L_lim^CaCO3
hannahmw1 Jul 19, 2024
b019d2a
carbonate limitation term not a parameter
hannahmw1 Jul 19, 2024
06a9782
Changes to PISCES module
hannahmw1 Jul 22, 2024
9370a32
Changed final equations so that all are on the same line
ciadht Jul 23, 2024
ad7d8a3
New BoxPISCES mods
ciadht Jul 23, 2024
03827fe
Modified units using redfield ratios
hannahmw1 Jul 23, 2024
2a041f0
Documentation for tracers added
hannahmw1 Jul 23, 2024
f5b100b
Documentation added
hannahmw1 Jul 24, 2024
15532a2
\Omega as an auxiliary field
hannahmw1 Jul 24, 2024
89de5b5
Latest initial conditions
ciadht Jul 24, 2024
4b48378
Change of definition for remin and denit
hannahmw1 Jul 24, 2024
fd73b93
Fixed some divide by zero errors
ciadht Jul 25, 2024
39cbbde
removed prints and removed /86400
ciadht Jul 26, 2024
9295128
updated boxPISCES
ciadht Jul 26, 2024
6ae160c
Commenting investigating why drop off in iron
hannahmw1 Jul 26, 2024
029da12
Removed print functions checking iron output
hannahmw1 Jul 26, 2024
eeb7157
Merge pull request #191 from ciadht/hmw-ct-jsw/PISCES
ciadht Jul 26, 2024
e03fd9e
Merge pull request #192 from OceanBioME/main
ciadht Jul 26, 2024
5866aed
Merge pull request #3 from OceanBioME/hmw-ct-jsw/PISCES
ciadht Jul 26, 2024
f6d1d15
edited box model fixes
ciadht Jul 29, 2024
e97a9b8
fix zero errors
hannahmw1 Jul 29, 2024
e91530f
Various modifications
ciadht Jul 31, 2024
3fe55d1
Merge pull request #194 from ciadht/hmw-ct-jsw/PISCES
ciadht Jul 31, 2024
539be48
Changed order of aux tracers
ciadht Aug 1, 2024
6c905a9
Tweaked various equations with Hannah's edits and fixed problems
ciadht Aug 1, 2024
22d5337
modifications to R_up and P_up
hannahmw1 Aug 2, 2024
a28f640
equation corrections
ciadht Aug 2, 2024
743d262
O\_2 terms
ciadht Aug 2, 2024
7d89964
Correction to Delta_O2
hannahmw1 Aug 5, 2024
79edf8a
added .0 and kelvin conversion
ciadht Aug 6, 2024
d89ea65
Small edits to commenting
hannahmw1 Aug 6, 2024
1805a7c
Typo in SFe
hannahmw1 Aug 6, 2024
f25005b
Changes to scaling of iron to model in nmolCL-1
hannahmw1 Aug 6, 2024
cd61bea
reedited the parameter values
ciadht Aug 6, 2024
b20e245
Merge pull request #198 from ciadht/hmw-ct-jsw/PISCES
ciadht Aug 6, 2024
a8e26de
added Carbon Checke
ciadht Aug 6, 2024
e7e3a04
Added sh to equations
hannahmw1 Aug 6, 2024
db7c3ec
added parameter scaling
ciadht Aug 6, 2024
0f67f49
Merge pull request #199 from ciadht/hmw-ct-jsw/PISCES
ciadht Aug 6, 2024
316257f
Made Tweaks to Keq^Fe
ciadht Aug 7, 2024
7a08b4e
Added 3\DeltaO_2 to linear mortality terms
hannahmw1 Aug 7, 2024
c699dbb
Added \Delta O_2, and changes to e_N^Z for Fe
hannahmw1 Aug 7, 2024
889f98b
Checked and commenting
hannahmw1 Aug 7, 2024
55b97ae
changed lines
ciadht Aug 7, 2024
49bd89b
Minor edits and tidying
ciadht Aug 7, 2024
c8156bf
Removed Scav temporary 0.0
ciadht Aug 7, 2024
31aabce
Merge pull request #201 from ciadht/hmw-ct-jsw/PISCES
ciadht Aug 7, 2024
94d5b8d
Changed function names
ciadht Aug 8, 2024
840d6fd
Merge pull request #202 from ciadht/hmw-ct-jsw/PISCES
ciadht Aug 8, 2024
23a6d8b
Added a columnPISCES model
ciadht Aug 9, 2024
926d71f
Commenting changes, and removed \theta^Sid factor
hannahmw1 Aug 9, 2024
75b256d
Box and Column models, as well as modifying parameters
ciadht Aug 12, 2024
c396bee
Box and Column models, as well as modifying parameters
ciadht Aug 13, 2024
b8e46d4
Some changes to commenting
hannahmw1 Aug 13, 2024
aaaecee
moving columnPISCES
ciadht Aug 13, 2024
1389dc9
deleted files
ciadht Aug 13, 2024
9aff55c
Commenting changes
hannahmw1 Aug 13, 2024
965c4b6
Merge pull request #203 from ciadht/hmw-ct-jsw/PISCES
ciadht Aug 13, 2024
84ca5f5
Commenting and dimension changes in nitrates and ammonium
hannahmw1 Aug 15, 2024
03f4513
PISCES RUNS!!
ciadht Aug 16, 2024
97ef373
Changed function names and added some redfield ratio and conservation…
ciadht Aug 16, 2024
9c9af47
Merge pull request #204 from ciadht/hmw-ct-jsw/PISCES
ciadht Aug 16, 2024
b1a6f60
Column model latest changes
ciadht Aug 22, 2024
bb74df9
Changes to documentation
hannahmw1 Aug 22, 2024
241c442
Merge pull request #207 from ciadht/hmw-ct-jsw/PISCES
ciadht Aug 22, 2024
25e01f6
Added changes to PISCES.jl to change mixed layer depth
ciadht Aug 23, 2024
60079a7
Last changes allowing euphotic layer to be time dependent
ciadht Aug 23, 2024
26bdea5
Fixed oopsie
ciadht Aug 23, 2024
8d82cb4
Merge branch 'main' into hmw-ct-jsw/PISCES
jagoosw Aug 23, 2024
677fa88
Merge pull request #4 from OceanBioME/hmw-ct-jsw/PISCES
ciadht Aug 23, 2024
8be66d1
Changed PAR names and added chlorophyll function
ciadht Aug 23, 2024
9a34b35
fixed boundaries thing
jagoosw Aug 23, 2024
978eef9
super to sub script for par names
jagoosw Aug 23, 2024
7051614
made column script run again
jagoosw Aug 23, 2024
4df7c8e
Changed PAR names and added chlorophyll function
ciadht Aug 24, 2024
5860655
Merge branch 'hmw-ct-jsw/PISCES' into hmw-ct-jsw/PISCES
ciadht Aug 24, 2024
6be900a
Merge pull request #5 from OceanBioME/hmw-ct-jsw/PISCES
ciadht Aug 24, 2024
ead9f27
Merge branch 'hmw-ct-jsw/PISCES' of https://github.com/ciadht/OceanBi…
ciadht Aug 24, 2024
e72c87b
Fixed bugs in columnPISCES
ciadht Aug 26, 2024
ff959df
Commenting changes
ciadht Sep 4, 2024
a322b21
Calcite comment
ciadht Sep 4, 2024
a0be564
Commenting BoxPISCES
ciadht Sep 4, 2024
28ca76c
Merge pull request #209 from ciadht/hmw-ct-jsw/PISCES
ciadht Sep 4, 2024
69509c6
merged local changes
jagoosw Sep 10, 2024
30ca28a
fixed column validation script
jagoosw Sep 10, 2024
5661e0a
changed names to conform with rules
jagoosw Sep 10, 2024
4169ad1
fixed latitude, day length, and shear
jagoosw Sep 10, 2024
d2815ef
renamed things for clarity
jagoosw Sep 10, 2024
0089527
phi to varphi
jagoosw Sep 10, 2024
f58a3f6
oops
jagoosw Sep 10, 2024
9a454f1
made euphotic depth computation work + variuos bugs
jagoosw Sep 10, 2024
57812fe
Merge branch 'main' into hmw-ct-jsw/PISCES
jagoosw Sep 10, 2024
07ed875
added dark residence time computation
jagoosw Sep 10, 2024
3596675
made euphotic depth more accurate
jagoosw Sep 10, 2024
1ff4865
Merge remote-tracking branch 'refs/remotes/origin/hmw-ct-jsw/PISCES' …
jagoosw Sep 10, 2024
0edd897
type
jagoosw Sep 10, 2024
264b254
added calcite saturation
jagoosw Sep 11, 2024
76e45a5
began restructering PISCES, done phytoplankton
jagoosw Sep 11, 2024
ea0befe
added zooplankton
jagoosw Sep 12, 2024
c0d73a7
moved phytoplankton as not module
jagoosw Sep 12, 2024
5ef89d1
added DOM
jagoosw Sep 12, 2024
2c1bb99
added POC/GOC
jagoosw Sep 12, 2024
5485eac
added particle iron
jagoosw Sep 12, 2024
4b6d2e3
added PSi
jagoosw Sep 12, 2024
2d7f93c
added nitrogen
jagoosw Sep 12, 2024
16275de
phosphate
jagoosw Sep 13, 2024
15b5188
iron
jagoosw Sep 13, 2024
5dfd038
silicate
jagoosw Sep 13, 2024
3e69a1a
calcite
jagoosw Sep 13, 2024
f08d127
carbonate system
jagoosw Sep 13, 2024
b3bd0f8
oxygen
jagoosw Sep 13, 2024
ea77231
put it together
jagoosw Sep 13, 2024
dc17662
works (at least makes a model)
jagoosw Sep 13, 2024
aa8353d
bunch of mistakes
jagoosw Sep 13, 2024
d99b149
many bugs
jagoosw Sep 13, 2024
e0247d8
box model stuff
jagoosw Sep 13, 2024
6f602a6
light fallbacks for box model
jagoosw Sep 13, 2024
0b8b0e3
working except the functional sinking speed
jagoosw Sep 14, 2024
e680e60
carbon conserves!
jagoosw Sep 16, 2024
789efb6
iron actually conserved, carbon actually not
jagoosw Sep 16, 2024
098bc78
fixed conservations and added tests
jagoosw Sep 16, 2024
ab1928e
vairous bug fixes + remove dust
jagoosw Sep 17, 2024
c2619fd
support `TracerAdvection` in `sinking_flux`
jagoosw Sep 17, 2024
e2ba12c
correct euphotic depth computation
jagoosw Sep 17, 2024
66e950b
fix tests
jagoosw Sep 17, 2024
91e158e
update validaiton scripts
jagoosw Sep 17, 2024
ee039d3
fix light limitation for growth, rmeoved dust
jagoosw Sep 18, 2024
74772b7
changed box model default behaviour
jagoosw Sep 18, 2024
2d88171
updated validation examples
jagoosw Sep 18, 2024
bc6e05b
closed the oxygen budget hopeflly
jagoosw Sep 18, 2024
78fe71a
rename Si′ to be less missleading
jagoosw Sep 18, 2024
8f2d9d7
Merge branch 'main' into hmw-ct-jsw/PISCES
jagoosw Sep 18, 2024
ec337d8
added possibility for low light adaptation
jagoosw Sep 18, 2024
1a59b8d
Merge branch 'hmw-ct-jsw/PISCES' into jsw/refactor-PISCES
jagoosw Sep 18, 2024
5354fac
Merge remote-tracking branch 'origin/hmw-ct-jsw/PISCES' into jsw/refa…
jagoosw Sep 18, 2024
d20bbe6
Merge remote-tracking branch 'origin/jsw/refactor-PISCES' into jsw/re…
jagoosw Sep 18, 2024
1dcc18d
fix for constant fields etc.
jagoosw Sep 18, 2024
580aca0
guess we needed some of those things
jagoosw Sep 18, 2024
c34d010
some fixes for mixed layer mean computations
jagoosw Sep 18, 2024
1c2167a
oopsie
jagoosw Sep 18, 2024
4bfc83c
minor
jagoosw Sep 18, 2024
0cb630a
corrected Z iron ratio
jagoosw Sep 18, 2024
e1c83df
changed `Phytoplankton` to `MixedMondoPhytoplankton` and added docstring
jagoosw Sep 18, 2024
96463d2
fixed iron constants and docstrings
jagoosw Sep 19, 2024
bd0295b
fixed growth stuff
jagoosw Sep 19, 2024
2d37cc2
fixed validation
jagoosw Sep 19, 2024
fb87afa
fix oceananigans compat
jagoosw Sep 19, 2024
34fa419
added tests to runtest
jagoosw Sep 19, 2024
584d577
added docstrings and changed default growth rate
jagoosw Sep 19, 2024
6ee08ae
Merge branch 'main' into hmw-ct-jsw/PISCES
jagoosw Sep 19, 2024
c5f9c24
Merge branch 'hmw-ct-jsw/PISCES' into jsw/refactor-PISCES
jagoosw Sep 19, 2024
474347e
Merge remote-tracking branch 'origin/jsw/refactor-PISCES' into jsw/re…
jagoosw Sep 19, 2024
d8f5965
some improvements to sinking velocity setup
jagoosw Sep 19, 2024
fedb9cd
export some useful things from PISCES
jagoosw Sep 19, 2024
e05c91b
oopsies in calcite saturation
jagoosw Sep 19, 2024
e160c0e
added negative scaling for multiple group conservation
jagoosw Sep 19, 2024
d391530
turns out negative scaling was broken
jagoosw Sep 19, 2024
2176415
fixed negative tracers for multiple scalings (doesn't strictly conserve)
jagoosw Sep 19, 2024
1a6b2b1
added multiple neg conservation test for PISCES
jagoosw Sep 19, 2024
5521ed5
fixed a bug
jagoosw Sep 19, 2024
9b650ee
we love abstraction
jagoosw Sep 19, 2024
e25fa23
I forgot about numerical errors oops
jagoosw Sep 19, 2024
86c3183
oops
jagoosw Sep 19, 2024
b21376e
add docstrings to docs
jagoosw Sep 19, 2024
0be8d59
turns out you still need the flat dimension index on GPU
jagoosw Sep 20, 2024
c61a3df
moved sinking speeds to auxiliary fields so we don't have to deal wit…
jagoosw Sep 20, 2024
8c61d22
runs on GPU! except neg proteciton which will fix now
jagoosw Sep 20, 2024
666b8bc
fixed neg scalilng on GPU
jagoosw Sep 20, 2024
e64f63d
oops
jagoosw Sep 20, 2024
467b2a9
Merge remote-tracking branch 'origin/jsw/refactor-PISCES' into jsw/re…
jagoosw Sep 20, 2024
cc8f3e5
added docstrings to lib
jagoosw Sep 20, 2024
095ede1
added docs pages
jagoosw Sep 20, 2024
a442458
missed bib entry
jagoosw Sep 20, 2024
d10cc76
something
jagoosw Sep 20, 2024
6a34f2a
fix mean...
jagoosw Sep 20, 2024
835462f
Merge remote-tracking branch 'origin/jsw/refactor-PISCES' into jsw/re…
jagoosw Sep 20, 2024
3ee0ade
removed branch
jagoosw Sep 20, 2024
84af6ae
fixed the horrible GPU errors that hurt my feelings
jagoosw Sep 20, 2024
f72f9da
Merge remote-tracking branch 'origin/jsw/refactor-PISCES' into jsw/re…
jagoosw Sep 20, 2024
429f133
1billion typos
jagoosw Sep 20, 2024
4902b8d
no warnings thank you
jagoosw Sep 20, 2024
a70237f
oops forgot to add the timestepping
jagoosw Sep 20, 2024
9b55f83
add docs page to docs
jagoosw Sep 20, 2024
fa56518
Merge pull request #212 from OceanBioME/jsw/refactor-PISCES
jagoosw Sep 22, 2024
4d54ebf
Update dissolved_organic_matter.jl
jagoosw Sep 23, 2024
72ed210
Update calcite.jl
jagoosw Sep 23, 2024
ab7c6f4
Update nitrate_ammonia.jl
jagoosw Sep 23, 2024
20d712d
update column
jagoosw Sep 24, 2024
c7505cb
refactored add src/Models/AdvectedPopulations/PISCES/!
jagoosw Sep 24, 2024
9d3082f
so so many changes, mainly to make box models work with discrete models
jagoosw Sep 24, 2024
e964fe7
conservation works now
jagoosw Sep 24, 2024
b71fd02
had to reduce tollerances
jagoosw Sep 24, 2024
b164835
fixed the things
jagoosw Sep 24, 2024
bbf64b2
oops
jagoosw Sep 24, 2024
e0a2d73
oops pt 2
jagoosw Sep 24, 2024
c6b2a6e
oops pt 3
jagoosw Sep 24, 2024
7b0f75e
oops pt 4
jagoosw Sep 25, 2024
793ae04
Update common.jl
jagoosw Sep 25, 2024
243f8e5
Update common.jl
jagoosw Sep 25, 2024
992229c
fixed a bunch of things and conservations actually correct now
jagoosw Sep 25, 2024
e5f8e30
made the box model seem to work again
jagoosw Sep 25, 2024
efac74a
fixed oxygen
jagoosw Sep 25, 2024
0923727
changed validation initial conditions
jagoosw Sep 25, 2024
5c025ad
hopeflly fixed for gpu
jagoosw Sep 25, 2024
acf4a5d
oops
jagoosw Sep 25, 2024
535ba2d
I have no idea how this worked for the GPU tests
jagoosw Sep 25, 2024
5c72e7c
fix light
jagoosw Sep 25, 2024
74a4d69
Change timestep
jagoosw Sep 25, 2024
099ded4
some optimisations... we shall see if they work
jagoosw Sep 26, 2024
34cef20
oops
jagoosw Sep 26, 2024
eeb24ba
more oops
jagoosw Sep 26, 2024
f50e6cb
fix some gpu issues
jagoosw Sep 26, 2024
cc158a8
seems very slow...
jagoosw Sep 26, 2024
ddb3858
might need to revert this
jagoosw Sep 26, 2024
3ed229c
spurious project/manifest changes
jagoosw Sep 27, 2024
eb8beea
typo
jagoosw Sep 30, 2024
899aaf0
fixed prescribed light for one field
jagoosw Sep 30, 2024
32025db
fixed runtest deps
jagoosw Sep 30, 2024
9e9e8d1
more light fix:
jagoosw Sep 30, 2024
e264842
fixed docs
jagoosw Sep 30, 2024
9d8f1d1
oops
jagoosw Oct 1, 2024
f0565ea
Merge remote-tracking branch 'origin/hmw-ct-jsw/PISCES' into jsw/rewr…
jagoosw Oct 1, 2024
5c1b692
minor change
jagoosw Oct 1, 2024
5900bcc
Merge pull request #217 from OceanBioME/jsw/rewrite-PISCES-again
jagoosw Oct 1, 2024
57ce2a2
added show/summary methods
jagoosw Oct 2, 2024
b2250b0
docs and formatting
jagoosw Oct 2, 2024
bca2349
spelling and grammar
jagoosw Oct 2, 2024
29af2f8
Merge branch 'main' into hmw-ct-jsw/PISCES
jagoosw Oct 2, 2024
e500e5e
iron correction
jagoosw Oct 2, 2024
c299f71
oops
jagoosw Oct 2, 2024
45b7e7d
type in doctest filter
jagoosw Oct 3, 2024
9bdd3a3
need to filter warning things
jagoosw Oct 3, 2024
2f6ceb2
I don't understand regex
jagoosw Oct 3, 2024
d7affd0
maybe it will work...
jagoosw Oct 4, 2024
1616b72
looks like filters dont work for repl versions?
jagoosw Oct 4, 2024
5a84b4d
updated dependencies
jagoosw Oct 4, 2024
c96bb6c
drop structarray dependency
jagoosw Oct 4, 2024
be18752
I give up
jagoosw Oct 4, 2024
6a47ef7
moved day length to utils
jagoosw Oct 5, 2024
ce6bb9e
Update Utils.jl
jagoosw Oct 7, 2024
1f8a022
bump minor version
jagoosw Oct 8, 2024
df7d35d
broke something
jagoosw Oct 8, 2024
b3df658
fixed test
jagoosw Oct 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
256 changes: 111 additions & 145 deletions Manifest.toml

Large diffs are not rendered by default.

9 changes: 5 additions & 4 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 <[email protected]> and contributors"]
version = "0.11.2"
version = "0.12.0"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand All @@ -12,17 +12,17 @@ KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
Oceananigans = "9e8cae18-63c1-5223-a75c-80ca9d6e9a09"
Roots = "f2b01f46-fcfa-551c-844a-d8ac1e96c665"
SeawaterPolynomials = "d496a93d-167e-4197-9f49-d3af4ff8fe40"
StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"


[compat]
Adapt = "3, 4"
CUDA = "5"
Documenter = "1"
EnsembleKalmanProcesses = "1"
GibbsSeaWater = "0.1"
JLD2 = "0.4"
JLD2 = "0.4, 0.5"
KernelAbstractions = "0.9"
Oceananigans = "0.91"
Oceananigans = "0.91.9, 0.92"
Roots = "2"
SeawaterPolynomials = "0.3"
StructArrays = "0.4, 0.5, 0.6"
Expand All @@ -40,6 +40,7 @@ JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
NetCDF = "30363a11-5582-574a-97bb-aa9a979735b9"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
Expand Down
6 changes: 5 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,14 @@ end

parameter_pages = ["$name" => "generated/$(name)_parameters.md" for name in model_names]

pisces_pages = ["PISCES" => "model_components/biogeochemical/PISCES/PISCES.md",
"Queries" => "model_components/biogeochemical/PISCES/notable_differences.md"]

bgc_pages = [
"Overview" => "model_components/biogeochemical/index.md",
"LOBSTER" => "model_components/biogeochemical/LOBSTER.md",
"NPZD" => "model_components/biogeochemical/NPZ.md"
"NPZD" => "model_components/biogeochemical/NPZ.md",
"PISCES" => pisces_pages
]

sediments_pages = [
Expand Down
15 changes: 14 additions & 1 deletion docs/oceanbiome.bib
Original file line number Diff line number Diff line change
Expand Up @@ -396,4 +396,17 @@ @article{Weiss1974
bdsk-url-2 = {https://doi.org/10.1016/0304-4203(74)90015-2}
}


@article{Aumont2015,
abstract = {PISCES-v2 (Pelagic Interactions Scheme for Carbon and Ecosystem Studies volume 2) is a biogeochemical model which simulates the lower trophic levels of marine ecosystems (phytoplankton, microzooplankton and mesozooplankton) and the biogeochemical cycles of carbon and of the main nutrients (P, N, Fe, and Si). The model is intended to be used for both regional and global configurations at high or low spatial resolutions as well as for short-term (seasonal, interannual) and long-term (climate change, paleoceanography) analyses. There are 24 prognostic variables (tracers) including two phytoplankton compartments (diatoms and nanophytoplankton), two zooplankton size classes (microzooplankton and mesozooplankton) and a description of the carbonate chemistry. Formulations in PISCES-v2 are based on a mixed Monod-quota formalism. On the one hand, stoichiometry of C / N / P is fixed and growth rate of phytoplankton is limited by the external availability in N, P and Si. On the other hand, the iron and silicon quotas are variable and the growth rate of phytoplankton is limited by the internal availability in Fe. Various parameterizations can be activated in PISCES-v2, setting, for instance, the complexity of iron chemistry or the description of particulate organic materials. So far, PISCES-v2 has been coupled to the Nucleus for European Modelling of the Ocean (NEMO) and Regional Ocean Modeling System (ROMS) systems. A full description of PISCES-v2 and of its optional functionalities is provided here. The results of a quasi-steady-state simulation are presented and evaluated against diverse observational and satellite-derived data. Finally, some of the new functionalities of PISCES-v2 are tested in a series of sensitivity experiments.},
author = {O. Aumont and C. Ethé and A. Tagliabue and L. Bopp and M. Gehlen},
doi = {10.5194/gmd-8-2465-2015},
issn = {19919603},
issue = {8},
journal = {Geoscientific Model Development},
month = {8},
pages = {2465-2513},
publisher = {Copernicus GmbH},
title = {PISCES-v2: An ocean biogeochemical model for carbon and ecosystem studies},
volume = {8},
year = {2015},
}
44 changes: 43 additions & 1 deletion docs/src/appendix/library.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Modules = [OceanBioME]

## Biogeochemical Models

### Nutrient Phytoplankton Zooplankton Detritus
### Nutrient Phytoplankton Zooplankton Detritus (NPZD)

```@autodocs
Modules = [OceanBioME.Models.NPZDModel]
Expand All @@ -21,6 +21,48 @@ Modules = [OceanBioME.Models.NPZDModel]
Modules = [OceanBioME.Models.LOBSTERModel]
```

### Pelagic Interactions Scheme for Carbon and Ecosystem Studies (PISCES)

```@autodocs
Modules = [OceanBioME.Models.PISCESModel]
```

```@autodocs
Modules = [OceanBioME.Models.PISCESModel.DissolvedOrganicMatter]
```

```@autodocs
Modules = [OceanBioME.Models.PISCESModel.ParticulateOrganicMatter]
```

```@autodocs
Modules = [OceanBioME.Models.PISCESModel.Iron]
```

```@autodocs
Modules = [OceanBioME.Models.PISCESModel.InorganicCarbons]
```

```@autodocs
Modules = [OceanBioME.Models.PISCESModel.Zooplankton]
```

```@autodocs
Modules = [OceanBioME.Models.PISCESModel.Phytoplankton]
```

```@autodocs
Modules = [OceanBioME.Models.PISCESModel.Phosphates]
```

```@autodocs
Modules = [OceanBioME.Models.PISCESModel.Silicates]
```

```@autodocs
Modules = [OceanBioME.Models.PISCESModel.Nitrogen]
```

### Sugar kelp (Saccharina latissima)

```@autodocs
Expand Down
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](@ref NPZD)), [LOBSTER](https://doi.org/10.1029/2004JC002588), a medium complexity model, and an early implementation of [PISCES](https://www.pisces-community.org/), a complex model. It also provides essential utilities like air-sea gas exchange models to provide appropriate top boundary conditions, a carbon chemistry model for computing the pCO₂, and sediment models to for the benthic boundary.

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
37 changes: 37 additions & 0 deletions docs/src/model_components/biogeochemical/PISCES/PISCES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# [PISCES (Pelagic Interactions Scheme for Carbon and Ecosystem Studies) model](@id PISCES)
PISCES ([PEES-kays, /ˈpiːs.keːs/](https://forvo.com/word/pisc%C4%93s/#la)) is a high complexity ocean biogeochemical model with 24 prognostic tracers.
It has previously been used with the [NEMO](https://www.nemo-ocean.eu/) transport model in the [IPSL-CM5A-LR](https://doi.org/10.1007/s00382-012-1636-1) and [CNRM-CM5](https://doi.org/10.1007/s00382-011-1259-y) CMIP-5 earth system models (ESM).
This is an early attempt to implement PISCES for use as a test bed in a more flexible environment to allow rapid prototyping and testing of new parametrisations as well as use in idealised experiments, additionally we want to be able to replicate the dynamics of the operational model for possible future use in a Julia based ESM as the ecosystem matures.

An overview of the model structure is available from the [PISCES community website](https://www.pisces-community.org):

![PISCES model structure](https://www.pisces-community.org/wp-content/uploads/2021/12/PISCES_Operational-1.png)

The default configuration of PISCES in OceanBioME is the operational/standard version with 24 tracers and can be set up by writing:

```@example
using OceanBioME, Oceananigans

grid = RectilinearGrid(size=(1, 1, 1), extent=(1, 1, 1));

biogeochemistry = PISCES(; grid)

show(biogeochemistry)

Oceananigans.Biogeochemistry.required_biogeochemical_tracers(biogeochemistry)

(:P, :PChl, :PFe, :D, :DChl, :DFe, :DSi, :Z, :M, :DOC, :POC, :GOC, :SFe, :BFe, :PSi, :CaCO₃, :NO₃, :NH₄, :PO₄, :Fe, :Si, :DIC, :Alk, :O₂, :T, :S)
```

The parametrisations can easily be switched out when the `biogeochemistry` is constructed by setting the key word parameter, see the [API documentation](@ref library_api), although we currently do not have any of the other configurations implemented. Note that `PISCES-simple` is very similar to [`LOBSTER`](@ref LOBSTER) if that is what you are looking for.

More documentation will follow but for now the equations can be found in [Aumont2015](@citet) read along side our notes [here](@ref PISCES_queries).

## Model conservation
When the permanent scavenging of iron, nitrogen fixation, and particle sinking are turned off, PISCES conserves:

- Carbon: ``\partial_tP + \partial_tD + \partial_tZ + \partial_tM + \partial_tDOC + \partial_tPOC + \partial_tGOC + \partial_tDIC + \partial_tCaCO_3=0``
- Iron: ``\partial_tPFe + \partial_tDFe + \theta^{Fe}\left(\partial_tZ + \partial_tM + \partial_tDOC\right) + \partial_tSFe + \partial_tBFe + \partial_tFe=0``
- Phosphate: ``\theta^P\left(\partial_tPFe + \partial_tDFe + \partial_tZ + \partial_tM + \partial_tDOC + \partial_tPOC + \partial_tGOC\right) + \partial_tPO_4=0``
- Silicon: ``\partial_tDSi + \partial_tPSi + \partial_tSi=0``
- Nitrogen: ``\theta^N\left(\partial_tPFe + \partial_tDFe + \partial_tZ + \partial_tM + \partial_tDOC + \partial_tPOC + \partial_tGOC\right) + \partial_tNH_4 + \partial_tNO_3=0``
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# [Notes](@id PISCES_queries)

While most of the function formula can be found in [Aumont2015](@citet), we have compiled the following list of minor errors in the paper, as well as changes that are present in the [NEMO](https://www.nemo-ocean.eu/) implementation.

## Preface
This implementation of PISCES varies from NEMO and CROC in a few regards:
- Our standard unit of concentration in mmol / m³ which is equivalent to μmol / L, so we have retained these units all the tracers except iron
- Iron is modelled in μmol / m³ which is equivalent to nmol / L
- In other implementations of PISCES nitrogen is tracked in carbon units (i.e. the concentration of nitrogen divided by the Redfield ratio), we instead opted to track in nitrogen units and so multiply most terms by the Redfield ratio (TODO: check that constants are in the correct units)
- [Aumont2015](@citet) refers to the concentrations in μmol / L and nmol / L the NEMO and CROC source code actually track everything in mol/L, therefore many units were converted, but some were missed (listed below)
- [Aumont2015](@citet) includes the "yearly maximum silicate", `Si′` but it appears that the NEMO source code actually uses the surface silicate in this roll, so we have renamed it to `silicate_climatology`
- Other implementations of PISCES compute the dark residence time (the time spent below the euphotic depth due to mixing within the mixed layer) assuming a constant diffusivity, we replace this with the actual diffusivity (or it can be set to a `ConstantField` to replicate other results)
- We have removed dust from PISCES since it can be implemented as a more generic (and easily more sophisticated) model elsewhere, and doesn't actually appear in PISCES except in the iron scavenging term which would need to be added as a forcing if iron scavenging from dust was desired in a model
- The bacterial remineralisation of DOC is split into the oxic and anoxic parts which are referred to as ``Remin`` and ``Denit``, but we have renamed these as `oxic_remineralisation` and `anoxic_remineralisation` for clarity
- We would also like to note for future developers that ``\theta^{Chl}`` is mg Chl / mg C so needs to be computed as ``IChl / 12I``

## Constant disparities
Constant units were sometimes incorrect in [Aumont2015](@citet), all units are now all noted in the code and may vary.
The values vary for:
- Aggregation factors (``a_1, a_2, ...``), found in `TwoCompartementCarbonIronParticles` and `DissolvedOrganicCarbon` `aggregation_parameters`: from the NEMO source code, all of these parameters need a factor of ``10^{-6}`` to convert them from units of 1 / (mol / L) to 1 / (μmol / L). Additionally, all the parameters require a factor of ``1 / 86400``, for the parameters not multiplied by shear this straight forwardly is because they have time units of 1 / day in the NEMO code, but for those multiplied by shear this is because they implicitly have a factor of seconds per day in them to result in an aggregation in mmol C / day
- In a similar vein, the flux feeding rate for zooplankton ``g_{FF}^M`` is in 1 / (m mol / L) where that `m` in `m`eters, so we need to multiply by a factor of ``10^{-6}`` to get 1 / (m μmol / L)
- The fraction of bacterially consumed iron going to small and big particles, ``\kappa^{BFe}_{Bact}`` and ``\kappa^{SFe}_{Bact}``, in equations 48 and 49 are not recorded but from the NEMO source code we can see that they are `0.04` and `0.12` respectively. Additionally, we need to multiply by a factor of `0.16` (``bacterial_iron_uptake_efficiency``) to the drawdown from the iron pool due to the instantaneous return (as per the NEMO version)
- ``\theta_{max}^{Fe, Bact}`` is not recorded so the value `0.06` μmol Fe / mmol C is taken from the NEMO source code
- ``\theta^{Fe, Z}`` and ``\theta^{Fe, M}`` are taken from the NEMO source code to be 0.01 and 0.015 μmol Fe / mmol C
- ``\theta_{max}^{Fe, P}`` is taken from the NEMO source code to be `0.06` μmol Fe / mmol C, we note that this isn't actually the maximum in the sense that the ratio could (probably) go above this value
- ``K^{B, 1}_{Fe}`` is not recorded so the value `0.3` μmol Fe / m³ is taken from the NEMO source code
- ``\eta^Z`` and ``\eta^M`` in equation 76 are incorrectly labelled as ``\nu^I`` in parameter table
- Iron ratios are often given as mol Fe / mol C, so we have converted to μmol Fe / mmol C

## Equation disparities
- The calcite production limitation, ``L^{CaCO_3}_{lim}`` in equation 77, is not documented. From the NEMO source code it appears to take the form ``L^{CaCO_3}_{lim} = min(L_N^P, L_{PO_4}^P, L_{Fe})`` where ``L_{Fe} = Fe / (Fe + 0.05)``. Additionally, in the NEMO source code ``L_{PO_4}`` is ``PO_4 / (PO_4 + K^{P, min}_{NH_4})`` but that didn't make sense to us so we assumed it was ``L_{PO_4}^P``
- The temperature factor in calcite production is supposed to bring the production to zero when the temperature goes below 0°C but in the documented form does not, it was changed to ``max(0, T / (T + 0.1))``
- We think there is an additional factor of ``Diss_{Si}`` in the ``PSi`` equation (51) so have neglected it
- A factor of ``R_{NH_4}`` appears in the nitrate equation which is undefined, and we did not track down in the NEMO source code so have neglected
- The form of ``K^{Fe}_{eq}`` in equation 65 is not given, so we took the form ``\exp\left(16.27 - 1565.7 / max(T + 273.15, 5)\right)`` from the NEMO source code
- Equation 32 contains a typo, the second term should be ``(1 - \gamma ^M)(1 - e^M - \sigma^M)(\sum \textcolor{red}{g^M (I)} + g_{FF}^M(GOC))M``
- Equation 37 is missing a factor of ``3\Delta O_2`` in the third term, and ``sh`` in the fifth term
- Equation 40 is missing a factor of ``sh`` in the third and fourth terms, and is missing a ``+`` in the fourth term which should read ``0.5m^D \frac{D}{D+K_m}D + sh \times w^D D^2``
- Equation 48 is missing a factor of ``3\Delta O_2`` in the second term, and a factor of ``Z`` in the penultimate term
- Equation 49 is missing a factor of ``3\Delta O_2`` in the second term
- Equations 54 and 55 are missing factors of the Redfield ratio in all terms except nitrification, nitrogen fixation. Additionally, we think that the term ``R_{NH_4}\lambda_{NH_4}\Delta(O_2)NH_4`` is not meant to be present and can not work out its utility or parameter values so have neglected
- Equation 60 is missing a factor of ``e^Z`` in the first term and ``e^M``, but for clarity we have rewritten it as:
```math
\frac{\partial Fe}{\partial t} += \sum_J^{Z, M}\left[J\max\left(0, (1 - \sigma)\sum_I{g^J(I)\theta^{Fe, I}} - e^J\theta^{Fe, J}\sum_I{g^J(I)} \right)\right],
```
which is the total iron grazed, minus the amount which is routed to particles, minus the amount stored in the zooplankton (and is identical with different simplification to the original)
- Equation 19 has a typo and ``L^{I^Fe}_{lim, 2}`` should read ``4 - 4.5 LFe / (LFe + 1)``
- In equation 33, the `min` parts did not make sense (and we don't think are present in the NEMO source code), and so have been neglected
- The first term in equation 14 should read ``(1-\delta^I)12 (\theta_{min}^{Chl, I} + \rho(\theta_{max}^{Chl, I}-\theta_{min}^{Chl, I}))\mu^I I`` and ``\rho`` should be given by ``L_{day}\frac{\mu I}{f_1}L\frac{12I}{IChl}\frac{L_P}{\alpha PAR}``, maybe this is what it says, but it was not clear

## Changes since [Aumont2015](@citet) in NEMO
- Diatom quadratic mortality has changed forms to ``w^D=w^P + 0.25 w^D_{max} \frac{1 - (L^D_{lim})^2}{0.25 + (L^D_{lim})^2}``
- The P-I slope, ``\alpha``, can vary for adaptation to depth, but the default is no enhancement. This can be included in our version by setting `low_light_adaptation` to be non-zero in the growth rate parameterisations
6 changes: 3 additions & 3 deletions docs/src/model_components/carbon-chemistry.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ carbon_chemistry(; DIC, Alk, T, S, lon = -31.52, lat = 33.75)
The default uses the polynomial approximation described in [roquet2015](@citet) as provided by [`SeawaterPolynomials.jl`](https://github.com/CliMA/SeawaterPolynomials.jl/).

### Computing the carbonate concentration
So that this model can be used in calcite dissolution models it can also return the carbonate saturation by calling the function `carbonate_saturation`
So that this model can be used in calcite dissolution models it can also return the carbonate saturation by calling the function `calcite_saturation`
```@example carbon-chem
using OceanBioME.Models.CarbonChemistryModel: carbonate_saturation
using OceanBioME.Models.CarbonChemistryModel: calcite_saturation

carbonate_saturation(carbon_chemistry; DIC, Alk, T, S)
calcite_saturation(carbon_chemistry; DIC, Alk, T, S)
```
This function takes all of the same arguments (e.g. `boron`) as `carbon_chemistry` above.

Expand Down
Loading
Loading