Skip to content

Commit

Permalink
Merge branch 'main' into jsw/add-some-flexibility-to-particle-interpo…
Browse files Browse the repository at this point in the history
…lation
  • Loading branch information
jagoosw authored Nov 12, 2024
2 parents 26483ba + 3a01fc1 commit faa1c92
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 97 deletions.
98 changes: 47 additions & 51 deletions Manifest.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# This file is machine-generated - editing it directly is not advised

julia_version = "1.10.2"
julia_version = "1.10.5"
manifest_format = "2.0"
project_hash = "3c5ec406d66c67a7c97dba5d81a300057adf87ab"
project_hash = "b7b68895e3965b7930805d42785ca0f68052cac9"

[[deps.AbstractFFTs]]
deps = ["LinearAlgebra"]
Expand Down Expand Up @@ -45,9 +45,9 @@ version = "0.1.38"

[[deps.Adapt]]
deps = ["LinearAlgebra", "Requires"]
git-tree-sha1 = "6a55b747d1812e699320963ffde36f1ebdda4099"
git-tree-sha1 = "d80af0733c99ea80575f612813fa6aa71022d33a"
uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
version = "4.0.4"
version = "4.1.0"
weakdeps = ["StaticArrays"]

[deps.Adapt.extensions]
Expand Down Expand Up @@ -77,15 +77,15 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[deps.Blosc_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Lz4_jll", "Zlib_jll", "Zstd_jll"]
git-tree-sha1 = "19b98ee7e3db3b4eff74c5c9c72bf32144e24f10"
git-tree-sha1 = "ef12cdd1c7fb7e1dfd6fa8fd60d4db6bc61d2f23"
uuid = "0b7ba130-8d10-5ba8-a3d6-c5182647fed9"
version = "1.21.5+0"
version = "1.21.6+0"

[[deps.Bzip2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "9e2a6b69137e6969bab0152632dcb3bc108c8bdd"
git-tree-sha1 = "8873e196c2eb87962a2048b3b8e08946535864a1"
uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0"
version = "1.0.8+1"
version = "1.0.8+2"

[[deps.CEnum]]
git-tree-sha1 = "389ad5c84de1ae7cf0e28e381131c98ea87d54fc"
Expand Down Expand Up @@ -168,7 +168,7 @@ weakdeps = ["Dates", "LinearAlgebra"]
[[deps.CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
version = "1.1.0+0"
version = "1.1.1+0"

[[deps.CompositionsBase]]
git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad"
Expand Down Expand Up @@ -239,9 +239,9 @@ version = "0.3.23"

[[deps.Distances]]
deps = ["LinearAlgebra", "Statistics", "StatsAPI"]
git-tree-sha1 = "66c4c81f259586e8f002eacebc177e1fb06363b0"
git-tree-sha1 = "c7e3a542b999843086e2f29dac96a618c105be1d"
uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
version = "0.10.11"
version = "0.10.12"

[deps.Distances.extensions]
DistancesChainRulesCoreExt = "ChainRulesCore"
Expand Down Expand Up @@ -285,9 +285,9 @@ version = "3.3.10+1"

[[deps.FileIO]]
deps = ["Pkg", "Requires", "UUIDs"]
git-tree-sha1 = "82d8afa92ecf4b52d78d869f038ebfb881267322"
git-tree-sha1 = "62ca0547a14c57e98154423419d8a342dca75ca9"
uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
version = "1.16.3"
version = "1.16.4"

[[deps.FileWatching]]
uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
Expand Down Expand Up @@ -417,15 +417,15 @@ version = "1.0.0"

[[deps.JLD2]]
deps = ["FileIO", "MacroTools", "Mmap", "OrderedCollections", "PrecompileTools", "Requires", "TranscodingStreams"]
git-tree-sha1 = "a0746c21bdc986d0dc293efa6b1faee112c37c28"
git-tree-sha1 = "783c1be5213a09609b23237a0c9e5dfd258ae6f2"
uuid = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
version = "0.4.53"
version = "0.5.7"

[[deps.JLLWrappers]]
deps = ["Artifacts", "Preferences"]
git-tree-sha1 = "f389674c99bfcde17dc57454011aa44d5a260a40"
git-tree-sha1 = "be3dc50a92e5a386872a493a10050136d4703f9b"
uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
version = "1.6.0"
version = "1.6.1"

[[deps.JuliaNVTXCallbacks_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
Expand All @@ -435,9 +435,9 @@ version = "0.2.1+0"

[[deps.KernelAbstractions]]
deps = ["Adapt", "Atomix", "InteractiveUtils", "MacroTools", "PrecompileTools", "Requires", "StaticArrays", "UUIDs", "UnsafeAtomics", "UnsafeAtomicsLLVM"]
git-tree-sha1 = "5126765c5847f74758c411c994312052eb7117ef"
git-tree-sha1 = "e73a077abc7fe798fe940deabe30ef6c66bdde52"
uuid = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
version = "0.9.27"
version = "0.9.29"

[deps.KernelAbstractions.extensions]
EnzymeExt = "EnzymeCore"
Expand All @@ -450,10 +450,10 @@ version = "0.9.27"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[deps.LLVM]]
deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Preferences", "Printf", "Requires", "Unicode"]
git-tree-sha1 = "4ad43cb0a4bb5e5b1506e1d1f48646d7e0c80363"
deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Preferences", "Printf", "Unicode"]
git-tree-sha1 = "d422dfd9707bec6617335dc2ea3c5172a87d5908"
uuid = "929cbde3-209d-540e-8aea-75f648917ca0"
version = "9.1.2"
version = "9.1.3"
weakdeps = ["BFloat16s"]

[deps.LLVM.extensions]
Expand Down Expand Up @@ -486,9 +486,9 @@ weakdeps = ["Serialization"]
SerializationExt = ["Serialization"]

[[deps.LaTeXStrings]]
git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec"
git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c"
uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
version = "1.3.1"
version = "1.4.0"

[[deps.LazyArtifacts]]
deps = ["Artifacts", "Pkg"]
Expand Down Expand Up @@ -523,9 +523,9 @@ uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[deps.Libiconv_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "f9557a255370125b405568f9767d6d195822a175"
git-tree-sha1 = "61dfdba58e585066d8bce214c5a51eaa0539f269"
uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531"
version = "1.17.0+0"
version = "1.17.0+1"

[[deps.LinearAlgebra]]
deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"]
Expand Down Expand Up @@ -574,9 +574,9 @@ version = "0.1.11"

[[deps.MPItrampoline_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"]
git-tree-sha1 = "fde81c9f9c94fe5fbeaed7b3f1330305cf9a327c"
git-tree-sha1 = "70e830dab5d0775183c99fc75e4c24c614ed7142"
uuid = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748"
version = "5.5.0+0"
version = "5.5.1+0"

[[deps.MacroTools]]
deps = ["Markdown", "Random"]
Expand Down Expand Up @@ -648,9 +648,9 @@ version = "1.2.0"

[[deps.Oceananigans]]
deps = ["Adapt", "CUDA", "Crayons", "CubedSphere", "Dates", "Distances", "DocStringExtensions", "FFTW", "Glob", "IncompleteLU", "InteractiveUtils", "IterativeSolvers", "JLD2", "KernelAbstractions", "LinearAlgebra", "Logging", "MPI", "NCDatasets", "OffsetArrays", "OrderedCollections", "Pkg", "Printf", "Random", "Rotations", "SeawaterPolynomials", "SparseArrays", "Statistics", "StructArrays"]
git-tree-sha1 = "cac4f28778a22404724ba667368f071047b513c1"
git-tree-sha1 = "cddb567fbab1c40b22914e24ad2fe917ff00d8c9"
uuid = "9e8cae18-63c1-5223-a75c-80ca9d6e9a09"
version = "0.92.0"
version = "0.93.1"

[deps.Oceananigans.extensions]
OceananigansEnzymeExt = "Enzyme"
Expand Down Expand Up @@ -833,9 +833,9 @@ version = "0.3.5"

[[deps.SentinelArrays]]
deps = ["Dates", "Random"]
git-tree-sha1 = "ff11acffdb082493657550959d4feb4b6149e73a"
git-tree-sha1 = "305becf8af67eae1dbc912ee9097f00aeeabb8d5"
uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c"
version = "1.4.5"
version = "1.4.6"

[[deps.Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
Expand All @@ -856,9 +856,9 @@ version = "1.10.0"

[[deps.StaticArrays]]
deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"]
git-tree-sha1 = "eeafab08ae20c62c44c8399ccb9354a04b80db50"
git-tree-sha1 = "777657803913ffc7e8cc20f0fd04b634f871af8f"
uuid = "90137ffa-7385-5640-81b9-e52037218182"
version = "1.9.7"
version = "1.9.8"

[deps.StaticArrays.extensions]
StaticArraysChainRulesCoreExt = "ChainRulesCore"
Expand Down Expand Up @@ -932,20 +932,16 @@ version = "1.10.0"

[[deps.TaylorSeries]]
deps = ["LinearAlgebra", "Markdown", "Requires", "SparseArrays"]
git-tree-sha1 = "90c9bc500f4c5cdd235c81503ec91b2048f06423"
git-tree-sha1 = "abc13c4d3cccd1703335ba03abdaf0dc8ecc97e2"
uuid = "6aa5eb33-94cf-58f4-a9d0-e4b2c4fc25ea"
version = "0.17.8"
version = "0.17.3"

[deps.TaylorSeries.extensions]
TaylorSeriesIAExt = "IntervalArithmetic"
TaylorSeriesJLD2Ext = "JLD2"
TaylorSeriesRATExt = "RecursiveArrayTools"
TaylorSeriesSAExt = "StaticArrays"

[deps.TaylorSeries.weakdeps]
IntervalArithmetic = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253"
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

[[deps.Test]]
Expand All @@ -954,14 +950,14 @@ uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[deps.TimerOutputs]]
deps = ["ExprTools", "Printf"]
git-tree-sha1 = "5a13ae8a41237cff5ecf34f73eb1b8f42fff6531"
git-tree-sha1 = "3a6f063d690135f5c1ba351412c82bae4d1402bf"
uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
version = "0.5.24"
version = "0.5.25"

[[deps.TranscodingStreams]]
git-tree-sha1 = "e84b3a11b9bece70d14cce63406bbc79ed3464d2"
git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742"
uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
version = "0.11.2"
version = "0.11.3"

[[deps.UUIDs]]
deps = ["Random", "SHA"]
Expand All @@ -983,15 +979,15 @@ version = "0.2.1"

[[deps.XML2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"]
git-tree-sha1 = "1165b0443d0eca63ac1e32b8c0eb69ed2f4f8127"
git-tree-sha1 = "6a451c6f33a176150f315726eba8b92fbfdb9ae7"
uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a"
version = "2.13.3+0"
version = "2.13.4+0"

[[deps.XZ_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "ac88fb95ae6447c8dda6a5503f3bafd496ae8632"
git-tree-sha1 = "15e637a697345f6743674f1322beefbc5dcd5cfc"
uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800"
version = "5.4.6+0"
version = "5.6.3+0"

[[deps.Zlib_jll]]
deps = ["Libdl"]
Expand Down Expand Up @@ -1019,13 +1015,13 @@ version = "1.1.2+0"
[[deps.libblastrampoline_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
version = "5.8.0+1"
version = "5.11.0+0"

[[deps.libzip_jll]]
deps = ["Artifacts", "Bzip2_jll", "GnuTLS_jll", "JLLWrappers", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"]
git-tree-sha1 = "3282b7d16ae7ac3e57ec2f3fa8fafb564d8f9f7f"
git-tree-sha1 = "668ac0297e6bd8f4d53dfdcd3ace71f2e00f4a35"
uuid = "337d8026-41b4-5cde-a456-74a10e5b31d1"
version = "1.10.1+0"
version = "1.11.1+0"

[[deps.nghttp2_jll]]
deps = ["Artifacts", "Libdl"]
Expand Down
4 changes: 2 additions & 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 <[email protected]> and contributors"]
version = "0.13.0"
version = "0.13.2"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand All @@ -24,7 +24,7 @@ EnsembleKalmanProcesses = "1"
GibbsSeaWater = "0.1"
JLD2 = "0.4, 0.5"
KernelAbstractions = "0.9"
Oceananigans = "0.91.9, 0.92"
Oceananigans = "^0.92.1, ^0.93.0"
OffsetArrays = "1.14"
Roots = "2"
SeawaterPolynomials = "0.3"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ biogeochemistry = NutrientPhytoplanktonZooplanktonDetritus(; grid)

model = NonhydrostaticModel(; grid, biogeochemistry,
advection = WENO(; grid),
closure = AnisotropicMinimumDissipation(),
buoyancy = SeawaterBuoyancy(constant_salinity = true))
closure = AnisotropicMinimumDissipation(),
buoyancy = SeawaterBuoyancy(constant_salinity = true))

@inline front(x, z, μ, δ) = μ + δ * tanh((x - 7000 + 4 * z) / 500)

Expand Down
4 changes: 2 additions & 2 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
CairoMakie = "0.11"
CairoMakie = "0.11, 0.12"
Documenter = "1"
DocumenterCitations = "1"
EnsembleKalmanProcesses = "1"
JLD2 = "0.4"
Literate = "≥2.9.0"
Oceananigans = "0.91"
Oceananigans = "^0.92.1"
julia = "1.10"
5 changes: 2 additions & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ biogeochemistry = NutrientPhytoplanktonZooplanktonDetritus(; grid)
model = NonhydrostaticModel(; grid, biogeochemistry,
advection = WENO(; grid),
closure = AnisotropicMinimumDissipation(),
buoyancy = SeawaterBuoyancy(constant_salinity = true))
closure = AnisotropicMinimumDissipation(),
buoyancy = SeawaterBuoyancy(constant_salinity = true))
@inline front(x, z, μ, δ) = μ + δ * tanh((x - 7000 + 4 * z) / 500)
Expand Down Expand Up @@ -158,7 +158,6 @@ If you use OceanBioME as part of your research, teaching, or other activities, w
}
```


## Funding

OceanBioME.jl is supported through grants from the [Center for Climate Repair at Cambridge](https://www.climaterepair.cam.ac.uk/) and the [Gordon and Betty Moore Foundation](https://www.moore.org/).
16 changes: 8 additions & 8 deletions src/Models/Sediments/Sediments.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ using OceanBioME: DiscreteBiogeochemistry, ContinuousBiogeochemistry, BoxModelGr
using Oceananigans
using Oceananigans.Architectures: device, architecture, on_architecture
using Oceananigans.Utils: launch!
using Oceananigans.Advection: advective_tracer_flux_z, TracerAdvection
using Oceananigans.Advection: advective_tracer_flux_z, FluxFormAdvection
using Oceananigans.Units: day
using Oceananigans.Fields: ConstantField
using Oceananigans.Biogeochemistry: biogeochemical_drift_velocity
Expand Down Expand Up @@ -38,13 +38,13 @@ function update_tendencies!(bgc, sediment::FlatSediment, model)

launch!(arch, model.grid, :xy,
calculate_sediment_tendencies!,
sediment, biogeochemistry, model.grid,
sinking_advection(biogeochemistry, model.advection),
required_tracers(sediment, biogeochemistry, model.tracers),
required_tendencies(sediment, biogeochemistry, model.timestepper.Gⁿ),
sediment, biogeochemistry, model.grid,
sinking_advection(biogeochemistry, model.advection),
required_tracers(sediment, biogeochemistry, model.tracers),
required_tendencies(sediment, biogeochemistry, model.timestepper.Gⁿ),
sediment.tendencies.Gⁿ,
model.clock.time)

return nothing
end

Expand Down Expand Up @@ -72,9 +72,9 @@ end

@inline advection_scheme(advection, val_tracer) = advection
@inline advection_scheme(advection::NamedTuple, val_tracer::Val{T}) where T = advection_scheme(advection[T], val_tracer)
@inline advection_scheme(advection::TracerAdvection, val_tracer) = advection.z
@inline advection_scheme(advection::FluxFormAdvection, val_tracer) = advection.z

@inline function sinking_flux(i, j, k, grid, advection, val_tracer::Val{T}, bgc, tracers) where T
@inline function sinking_flux(i, j, k, grid, advection, val_tracer::Val{T}, bgc, tracers) where T
return - advective_tracer_flux_z(i, j, k, grid, advection_scheme(advection, val_tracer), biogeochemical_drift_velocity(bgc, val_tracer).w, tracers[T]) /
volume(i, j, k, grid, Center(), Center(), Center())
end
Expand Down
Loading

0 comments on commit faa1c92

Please sign in to comment.