Skip to content

Commit

Permalink
Update dependencies and connections
Browse files Browse the repository at this point in the history
  • Loading branch information
ctessum committed Dec 6, 2024
1 parent 0c9feba commit a829c70
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
fail-fast: false
matrix:
version:
- '1.9'
- '1.10'
- '1.11'
os:
- ubuntu-latest
arch:
Expand Down
8 changes: 4 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "AtmosphericDeposition"
uuid = "1a52f20c-0d16-41d8-a00a-b2996d86a462"
authors = ["EarthSciML authors and contributors"]
version = "0.2.1"
version = "0.2.2"

[deps]
DataInterpolations = "82cc6244-b520-54b8-b5a6-8a565e85f1d0"
Expand All @@ -24,9 +24,9 @@ GasChemExt = "GasChem"

[compat]
DifferentialEquations = "7"
EarthSciData = "0.10"
EarthSciMLBase = "0.19"
GasChem = "0.7"
EarthSciData = "0.12"
EarthSciMLBase = "0.20"
GasChem = "0.9"
ModelingToolkit = "9"
SafeTestsets = "0.1"
StaticArrays = "1"
Expand Down
6 changes: 3 additions & 3 deletions ext/GasChemExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function EarthSciMLBase.couple2(c::GasChem.SuperFastCoupler, d::AtmosphericDepos
c, d = c.sys, d.sys

operator_compose(convert(ODESystem, c), d, Dict(
c.SO2 => d.SO2,
#c.SO2 => d.SO2, # SuperFast does not currently have SO2
c.NO2 => d.NO2,
c.O3 => d.O3,
c.H2O2 => d.H2O2,
Expand All @@ -18,12 +18,12 @@ function EarthSciMLBase.couple2(c::GasChem.SuperFastCoupler, d::AtmosphericDepos
c, d = c.sys, d.sys

operator_compose(convert(ODESystem, c), d, Dict(
c.SO2 => d.SO2,
#c.SO2 => d.SO2, # SuperFast does not currently have SO2
c.NO2 => d.NO2,
c.O3 => d.O3,
c.H2O2 => d.H2O2,
c.CH2O => d.CH2O,
))
end

end
end
17 changes: 7 additions & 10 deletions test/connector_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ domain = DomainInfo(DateTime(2022, 1, 1), DateTime(2022, 1, 3);
@testset "GasChemExt" begin
start = Dates.datetime2unix(Dates.DateTime(2016, 5, 1))
composed_ode = couple(SuperFast(), FastJX(), DrydepositionG(), Wetdeposition())
combined_mtk = convert(ODESystem, composed_ode)
sys = structural_simplify(combined_mtk)
sys = convert(ODESystem, composed_ode)
print(unknowns(sys))
@test length(unknowns(sys)) 20
#TODO Change 20 to 18 after the latest GasChem package include species HNO3
@test length(unknowns(sys)) 15

eqs = string(equations(sys))
wanteqs = ["Differential(t)(SuperFast₊O3(t)) ~ SuperFast₊DrydepositionG_ddt_O3ˍt(t) + SuperFast₊Wetdeposition_ddt_O3ˍt(t)"]
Expand All @@ -27,18 +25,17 @@ end
@parameters lev = 1

geosfp = GEOSFP("4x5", domain)

model = couple(SuperFast(), FastJX(), geosfp, Wetdeposition(), DrydepositionG())

sys = structural_simplify(convert(ODESystem, model))
@test length(unknowns(sys)) 20
#TODO Change 20 to 18 after the latest GasChem package include species HNO3
sys = convert(ODESystem, model)
@test length(unknowns(sys)) 15

eqs = string(equations(convert(ODESystem, model)))
eqs = string(observed(sys))
wanteq = "DrydepositionG₊G(t) ~ GEOSFP₊A1₊SWGDN(t)"
@test contains(eqs, wanteq)
wanteq = "Wetdeposition₊cloudFrac(t) ~ GEOSFP₊A3cld₊CLOUD(t)"
@test contains(eqs, wanteq)
wanted = "Wetdeposition₊ρA(t) ~ GEOSFP₊P/(GEOSFP₊I3₊T*R)*kgperg*MW_air"
@test contains(eqs, wanteq)
end
end

2 comments on commit a829c70

@ctessum
Copy link
Member Author

@ctessum ctessum commented on a829c70 Dec 9, 2024

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/121033

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.2.2 -m "<description of version>" a829c703633301f59e23bfc9291ed5612a17c1d1
git push origin v0.2.2

Please sign in to comment.