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
Changes from 1 commit
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
Prev Previous commit
Next Next commit
added tests to runtest
jagoosw committed Sep 19, 2024
commit 34fa419482ffb6aabfd965d92199ca215279bbbb
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ include("test_light.jl")
include("test_slatissima.jl")
include("test_LOBSTER.jl")
include("test_NPZD.jl")
include("test_PISCES.jl")
include("test_gasexchange_carbon_chem.jl")
include("test_sediments.jl")

13 changes: 6 additions & 7 deletions test/test_PISCES.jl
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ end
value(field; indices = (1, 1, 1)) = on_architecture(CPU(), interior(field, indices...))[1]

function test_PISCES_conservation() # only on CPU please
validation_warning = "This implementation of PISCES is in early development and has not yet been fully validated"
validation_warning = "This implementation of PISCES is in early development and has not yet been validated"

grid = BoxModelGrid(; z = -5)

@@ -51,7 +51,7 @@ function test_PISCES_conservation() # only on CPU please
mean_mixed_layer_vertical_diffusivity,
# turn off permanent iron removal and nitrogen fixaiton
iron = SimpleIron(0),
nitrogen = NitrateAmmonia(maximum_fixation_rate = .00))
nitrogen = NitrateAmmonia(maximum_fixation_rate = 0.0))

model = BoxModel(; grid, biogeochemistry)

@@ -79,6 +79,7 @@ function test_PISCES_conservation() # only on CPU please
@test isapprox(total_iron_tendencies, 0, atol = 10^-21)
@test isapprox(total_silicon_tendencies, 0, atol = 10^-21)
@test isapprox(total_phosphate_tendencies, 0, atol = 10^-21)
@test isapprox(total_nitrogen_tendencies, 0, atol = 10^-21)

return nothing
end
@@ -115,16 +116,14 @@ function test_PISCES_update_state(arch)
end

@testset "PISCES" begin
if arch isa CPU
if architecture isa CPU
@info "Testing PISCES element conservation (C, Fe, P, Si)"
test_PISCES_conservation()
end

@info "Testing PISCES auxiliary field computation"
test_PISCES_update_state(arch)
test_PISCES_update_state(architecture)


test_PISCES_setup(grid)


#test_PISCES_setup(grid)
end