-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into jsw/fix-fields-in-sinking-setup
- Loading branch information
Showing
10 changed files
with
79 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.0" | ||
version = "0.11.1" | ||
|
||
[deps] | ||
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
""" | ||
PartiallySolubleGas(; air_concentration, solubility) | ||
Parameterises the available concentration of a gas dissolving in water in the form ``\\alpha C_a`` | ||
where ``\alpha`` is the Ostwald solubility coeffieient and ``C_a`` is the concentration in the air. | ||
""" | ||
struct PartiallySolubleGas{AC, S} | ||
air_concentration :: AC | ||
solubility :: S | ||
end | ||
|
||
|
||
@inline surface_value(gs::PartiallySolubleGas, i, j, grid, clock, model_fields) = | ||
surface_value(gs.air_concentration, i, j, grid, clock) * surface_value(gs.solubility, i, j, grid, clock, model_fields) | ||
|
||
""" | ||
Wanninkhof92Solubility | ||
Parameterises the Ostwald solubility coefficient as given in Wanninkhof, 1992. | ||
""" | ||
struct Wanninkhof92Solubility{FT} | ||
A1 :: FT | ||
A2 :: FT | ||
A3 :: FT | ||
B1 :: FT | ||
B2 :: FT | ||
B3 :: FT | ||
end | ||
|
||
function surface_value(sol::Wanninkhof92Solubility, i, j, grid, clock, model_fields) | ||
Tk = @inbounds model_fields.T[i, j, grid.Nz] + 273.15 | ||
S = @inbounds model_fields.S[i, j, grid.Nz] | ||
|
||
Tk_100 = Tk / 100 | ||
|
||
β = exp(sol.A1 + sol.A2 /Tk_100 + sol.A3 * log(Tk_100) + S * (sol.B1 + sol.B2 * Tk_100 + sol.B2 * Tk_100^2)) | ||
|
||
return β / Tk | ||
end | ||
|
||
OxygenSolubility(; A1 = -58.3877, A2 = 85.8079, A3 = 23.8439, B1 = -0.034892, B2 = 0.015578, B3 = -0.0019387) = | ||
Wanninkhof92Solubility(A1, A2, A3, B1, B2, B3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters