From 9525d2fa24a630754503034d2a6fbe2f84c3c985 Mon Sep 17 00:00:00 2001 From: kmdeck Date: Wed, 24 Jul 2024 13:52:38 -0700 Subject: [PATCH] fixingbugs --- docs/tutorials/integrated/soil_canopy_tutorial.jl | 1 + experiments/benchmarks/land.jl | 1 + experiments/integrated/fluxnet/ozark_pft.jl | 2 +- experiments/integrated/fluxnet/run_fluxnet.jl | 2 +- .../performance/conservation/ozark_conservation_setup.jl | 1 + experiments/integrated/performance/profile_allocations.jl | 1 + src/shared_utilities/drivers.jl | 2 +- 7 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/tutorials/integrated/soil_canopy_tutorial.jl b/docs/tutorials/integrated/soil_canopy_tutorial.jl index e754de8b47..15e9865dc4 100644 --- a/docs/tutorials/integrated/soil_canopy_tutorial.jl +++ b/docs/tutorials/integrated/soil_canopy_tutorial.jl @@ -178,6 +178,7 @@ soilco2_ps = SoilCO2ModelParameters(FT); # Specify the spatially varying soil organic carbon as a ClimaCore field. # One can also specify SOC using a TimeVaryingInput, or SpaceVaryingInput (reading data from files) +subsurface_space = soil_domain.space.subsurface Csom = ClimaLand.PrescribedSoilOrganicCarbon{FT}( ClimaCore.Fields.zeros(subsurface_space) .+ 5, ) diff --git a/experiments/benchmarks/land.jl b/experiments/benchmarks/land.jl index 646c6b0599..9b8786d201 100644 --- a/experiments/benchmarks/land.jl +++ b/experiments/benchmarks/land.jl @@ -30,6 +30,7 @@ import Interpolations using Insolation import ClimaUtilities.TimeVaryingInputs: TimeVaryingInput +import ClimaUtilities.SpaceVaryingInputs: SpaceVaryingInput import ClimaUtilities.Regridders: InterpolationsRegridder import ClimaUtilities.ClimaArtifacts: @clima_artifact import ClimaParams as CP diff --git a/experiments/integrated/fluxnet/ozark_pft.jl b/experiments/integrated/fluxnet/ozark_pft.jl index 8b853c83bb..cd722e04a5 100644 --- a/experiments/integrated/fluxnet/ozark_pft.jl +++ b/experiments/integrated/fluxnet/ozark_pft.jl @@ -136,7 +136,7 @@ soil_model_type = Soil.EnergyHydrology{FT} soilco2_type = Soil.Biogeochemistry.SoilCO2Model{FT} soilco2_ps = SoilCO2ModelParameters(FT) - +subsurface_space = soil_domain.space.subsurface Csom = ClimaLand.PrescribedSoilOrganicCarbon{FT}( ClimaCore.Fields.zeros(subsurface_space) .+ 5, ) diff --git a/experiments/integrated/fluxnet/run_fluxnet.jl b/experiments/integrated/fluxnet/run_fluxnet.jl index b4e51db601..5cefcc556a 100644 --- a/experiments/integrated/fluxnet/run_fluxnet.jl +++ b/experiments/integrated/fluxnet/run_fluxnet.jl @@ -95,7 +95,7 @@ soil_model_type = Soil.EnergyHydrology{FT} soilco2_type = Soil.Biogeochemistry.SoilCO2Model{FT} soilco2_ps = SoilCO2ModelParameters(FT) - +subsurface_space = soil_domain.space.subsurface Csom = ClimaLand.PrescribedSoilOrganicCarbon{FT}( ClimaCore.Fields.zeros(subsurface_space) .+ 5, ) diff --git a/experiments/integrated/performance/conservation/ozark_conservation_setup.jl b/experiments/integrated/performance/conservation/ozark_conservation_setup.jl index 7c13162ae3..4c1412d4e8 100644 --- a/experiments/integrated/performance/conservation/ozark_conservation_setup.jl +++ b/experiments/integrated/performance/conservation/ozark_conservation_setup.jl @@ -82,6 +82,7 @@ soilco2_type = Soil.Biogeochemistry.SoilCO2Model{FT} soilco2_ps = SoilCO2ModelParameters(FT) # soil microbes args +subsurface_space = soil_domain.space.subsurface Csom = ClimaLand.PrescribedSoilOrganicCarbon{FT}( ClimaCore.Fields.zeros(subsurface_space) .+ 5, ) diff --git a/experiments/integrated/performance/profile_allocations.jl b/experiments/integrated/performance/profile_allocations.jl index 69f8dbca89..3536d72261 100644 --- a/experiments/integrated/performance/profile_allocations.jl +++ b/experiments/integrated/performance/profile_allocations.jl @@ -229,6 +229,7 @@ soilco2_type = Soil.Biogeochemistry.SoilCO2Model{FT} soilco2_ps = SoilCO2ModelParameters(FT) # soil microbes args +subsurface_space = soil_domain.space.subsurface Csom = ClimaLand.PrescribedSoilOrganicCarbon{FT}( ClimaCore.Fields.zeros(subsurface_space) .+ 5, ) diff --git a/src/shared_utilities/drivers.jl b/src/shared_utilities/drivers.jl index d8b3e03b23..a18bded06b 100644 --- a/src/shared_utilities/drivers.jl +++ b/src/shared_utilities/drivers.jl @@ -911,7 +911,7 @@ Creates and returns a function which updates the driver variables in the case of a PrescribedSoilOrganicCarbon. """ function make_update_drivers( - d::PrescribedSoilOrganicCarbon{FT, AbstractTimeVaryingInput}, + d::PrescribedSoilOrganicCarbon{FT, <:AbstractTimeVaryingInput}, ) where {FT} function update_drivers!(p, t) evaluate!(p.drivers.soc, d.soc, t)