From a829c703633301f59e23bfc9291ed5612a17c1d1 Mon Sep 17 00:00:00 2001 From: Christopher Tessum Date: Fri, 6 Dec 2024 17:59:00 -0600 Subject: [PATCH] Update dependencies and connections --- .github/workflows/CI.yml | 2 +- Project.toml | 8 ++++---- ext/GasChemExt.jl | 6 +++--- test/connector_test.jl | 17 +++++++---------- 4 files changed, 15 insertions(+), 18 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 65810317..da0cff09 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,8 +10,8 @@ jobs: fail-fast: false matrix: version: - - '1.9' - '1.10' + - '1.11' os: - ubuntu-latest arch: diff --git a/Project.toml b/Project.toml index 4970a66a..bb00117c 100644 --- a/Project.toml +++ b/Project.toml @@ -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" @@ -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" diff --git a/ext/GasChemExt.jl b/ext/GasChemExt.jl index 0e9f96a3..e81e6dc0 100644 --- a/ext/GasChemExt.jl +++ b/ext/GasChemExt.jl @@ -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, @@ -18,7 +18,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, @@ -26,4 +26,4 @@ function EarthSciMLBase.couple2(c::GasChem.SuperFastCoupler, d::AtmosphericDepos )) end -end \ No newline at end of file +end diff --git a/test/connector_test.jl b/test/connector_test.jl index 90752cf4..d4d08e79 100644 --- a/test/connector_test.jl +++ b/test/connector_test.jl @@ -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)"] @@ -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 \ No newline at end of file +end