Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ClimaUtilities FileReading/Inputs/Regridding #560

Merged
merged 4 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ ClimaLand.jl Release Notes
main
--------

- ![][badge-✨feature] Use [ClimaUtilities](https://github.com/CliMA/ClimaUtilities.jl) for `Space`
and `Time` `VaryingInputs`. This adds support to non-conservative MPI/GPU compatible regridding of NetCDF input. PR [#560](https://github.com/CliMA/ClimaLand.jl/pull/560)

v0.11.1
-------
- ![][badge-✨feature] Add option to profile albedo job. PR
Expand Down
8 changes: 5 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ version = "0.11.1"
[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
ArtifactWrappers = "a14bc488-3040-4b00-9dc1-f6467924858a"
CFTime = "179af706-886a-5703-950a-314cd64e0468"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
ClimaComms = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d"
ClimaCore = "d414da3d-4745-48bb-8d80-42e94e092884"
ClimaCoreTempestRemap = "d934ef94-cdd4-4710-83d6-720549644b70"
ClimaUtilities = "b3f4f4ca-9299-4f7f-bd9b-81e1242a7513"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
Insolation = "e98cc03f-d57e-4e3c-b70c-8d51efe9e0d8"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
Expand All @@ -37,19 +38,20 @@ CreateParametersExt = "ClimaParams"
[compat]
Adapt = "3, 4"
ArtifactWrappers = "0.2"
CFTime = "0.1"
ClimaParams = "0.10.2"
CSV = "0.10"
CUDA = "5"
ClimaComms = "0.5.6"
ClimaCore = "0.13.2"
ClimaCoreTempestRemap = "0.3"
ClimaParams = "0.10.2"
ClimaUtilities = "0.1.2"
DataFrames = "1"
Dates = "1"
DocStringExtensions = "0.8, 0.9"
Flux = "0.14"
HTTP = "1.10"
Insolation = "0.9.2"
Interpolations = "0.15"
IntervalSets = "0.5, 0.6, 0.7"
LinearAlgebra = "1"
NCDatasets = "0.11, 0.12, 0.13, 0.14"
Expand Down
47 changes: 32 additions & 15 deletions docs/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.10.2"
manifest_format = "2.0"
project_hash = "5f713b750235cf07465e21e92a6bd2f152ad3358"
project_hash = "36bd85e1aba82f32f7f1a0894fd2191ef63bed32"

[[deps.ADTypes]]
git-tree-sha1 = "016833eb52ba2d6bea9fcb50ca295980e728ee24"
Expand Down Expand Up @@ -267,9 +267,9 @@ weakdeps = ["SparseArrays"]

[[deps.ClimaComms]]
deps = ["CUDA", "MPI"]
git-tree-sha1 = "f0350e34c91c8f3b5a11b5e39990439303d727b1"
git-tree-sha1 = "ef5d206be51fdf62cd0cbd63058e237128652cf7"
uuid = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d"
version = "0.5.7"
version = "0.5.8"

[[deps.ClimaCore]]
deps = ["Adapt", "BandedMatrices", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "KrylovKit", "LinearAlgebra", "PkgVersion", "RecursiveArrayTools", "RootSolvers", "SparseArrays", "Static", "StaticArrays", "Statistics", "Unrolled"]
Expand All @@ -288,7 +288,7 @@ uuid = "d934ef94-cdd4-4710-83d6-720549644b70"
version = "0.3.14"

[[deps.ClimaLand]]
deps = ["Adapt", "ArtifactWrappers", "CFTime", "CSV", "CUDA", "ClimaComms", "ClimaCore", "ClimaCoreTempestRemap", "DataFrames", "Dates", "DocStringExtensions", "Flux", "HTTP", "Insolation", "IntervalSets", "LinearAlgebra", "NCDatasets", "SciMLBase", "StaticArrays", "StatsBase", "SurfaceFluxes", "Thermodynamics", "cuDNN"]
deps = ["Adapt", "ArtifactWrappers", "CSV", "CUDA", "ClimaComms", "ClimaCore", "ClimaCoreTempestRemap", "ClimaUtilities", "DataFrames", "Dates", "DocStringExtensions", "Flux", "HTTP", "Insolation", "Interpolations", "IntervalSets", "LinearAlgebra", "NCDatasets", "SciMLBase", "StaticArrays", "StatsBase", "SurfaceFluxes", "Thermodynamics", "cuDNN"]
path = ".."
uuid = "08f4d4ce-cf43-44bb-ad95-9d2d5f413532"
version = "0.11.1"
Expand All @@ -309,6 +309,23 @@ git-tree-sha1 = "9c203f39784c968700c55f555754a7771b3410df"
uuid = "595c0a79-7f3d-439a-bc5a-b232dc3bde79"
version = "0.7.19"

[[deps.ClimaUtilities]]
deps = ["Artifacts", "CFTime", "Dates"]
git-tree-sha1 = "2b42b44a95245e2920bbb3ec4b5ca643a5f13b9a"
uuid = "b3f4f4ca-9299-4f7f-bd9b-81e1242a7513"
version = "0.1.2"
weakdeps = ["Adapt", "ClimaComms", "ClimaCore", "ClimaCoreTempestRemap", "Interpolations", "NCDatasets"]

[deps.ClimaUtilities.extensions]
ClimaArtifactsExt = ["ClimaComms"]
DataHandlingExt = ["ClimaCore", "NCDatasets"]
InterpolationsRegridderExt = ["Interpolations", "ClimaCore"]
NCFileReaderExt = "NCDatasets"
SpaceVaryingInputsExt = ["ClimaCore", "NCDatasets"]
TempestRegridderExt = "ClimaCoreTempestRemap"
TimeVaryingInputs0DExt = "ClimaCore"
TimeVaryingInputsExt = ["ClimaCore", "NCDatasets"]

[[deps.CloseOpenIntervals]]
deps = ["Static", "StaticArrayInterface"]
git-tree-sha1 = "70232f82ffaab9dc52585e0dd043b5e0c6b714f1"
Expand Down Expand Up @@ -725,9 +742,9 @@ uuid = "a3f928ae-7b40-5064-980b-68af3947d34b"
version = "2.13.93+0"

[[deps.Format]]
git-tree-sha1 = "f3cf88025f6d03c194d73f5d13fee9004a108329"
git-tree-sha1 = "9c68794ef81b08086aeb32eeaf33531668d5f5fc"
uuid = "1fa38f19-a742-5d3f-a2b9-30dd87b9d5f8"
version = "1.3.6"
version = "1.3.7"

[[deps.Formatting]]
deps = ["Logging", "Printf"]
Expand Down Expand Up @@ -889,9 +906,9 @@ version = "1.14.3+1"

[[deps.HTTP]]
deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"]
git-tree-sha1 = "995f762e0182ebc50548c434c171a5bb6635f8e4"
git-tree-sha1 = "8e59b47b9dc525b70550ca082ce85bcd7f5477cd"
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
version = "1.10.4"
version = "1.10.5"

[[deps.HarfBuzz_jll]]
deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"]
Expand Down Expand Up @@ -1745,9 +1762,9 @@ version = "0.6.12"

[[deps.RecursiveArrayTools]]
deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "SparseArrays", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"]
git-tree-sha1 = "a94d22ca9ad49a7a169ecbc5419c59b9793937cc"
git-tree-sha1 = "d8f131090f2e44b145084928856a561c83f43b27"
uuid = "731186ca-8d62-57ce-b412-fbd966d074cd"
version = "3.12.0"
version = "3.13.0"

[deps.RecursiveArrayTools.extensions]
RecursiveArrayToolsFastBroadcastExt = "FastBroadcast"
Expand Down Expand Up @@ -1813,9 +1830,9 @@ version = "0.1.0"

[[deps.SciMLBase]]
deps = ["ADTypes", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"]
git-tree-sha1 = "3daaea955c0905200943175637f184a968574a2d"
git-tree-sha1 = "d15c65e25615272e1b1c5edb1d307484c7942824"
uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
version = "2.30.3"
version = "2.31.0"

[deps.SciMLBase.extensions]
SciMLBaseChainRulesCoreExt = "ChainRulesCore"
Expand Down Expand Up @@ -2025,10 +2042,10 @@ weakdeps = ["ClimaParams"]
CreateParametersExt = "ClimaParams"

[[deps.SymbolicIndexingInterface]]
deps = ["MacroTools", "RuntimeGeneratedFunctions"]
git-tree-sha1 = "f7b1fc9fc2bc938436b7684c243be7d317919056"
deps = ["ArrayInterface", "MacroTools", "RuntimeGeneratedFunctions", "StaticArraysCore"]
git-tree-sha1 = "dd94edee1542e9da422cb2f12494ef09ea823e48"
uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5"
version = "0.3.11"
version = "0.3.13"

[[deps.TOML]]
deps = ["Dates"]
Expand Down
3 changes: 2 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[deps]
ArtifactWrappers = "a14bc488-3040-4b00-9dc1-f6467924858a"
ClimaParams = "5c42b081-d73a-476f-9059-fd94b934656c"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
ClimaCore = "d414da3d-4745-48bb-8d80-42e94e092884"
ClimaLand = "08f4d4ce-cf43-44bb-ad95-9d2d5f413532"
ClimaParams = "5c42b081-d73a-476f-9059-fd94b934656c"
ClimaTimeSteppers = "595c0a79-7f3d-439a-bc5a-b232dc3bde79"
ClimaUtilities = "b3f4f4ca-9299-4f7f-bd9b-81e1242a7513"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
Expand Down
11 changes: 0 additions & 11 deletions docs/src/APIs/shared_utilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,3 @@ ClimaLand.surface_resistance
ClimaLand.surface_specific_humidity
ClimaLand.make_update_drivers
```

## TimeVaryingInput
```@docs
ClimaLand.TimeVaryingInput
ClimaLand.evaluate!
```

## SpaceVaryingInput
```@docs
ClimaLand.SpaceVaryingInput
```
3 changes: 2 additions & 1 deletion docs/tutorials/standalone/Bucket/bucket_tutorial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ using ClimaLand:
make_set_initial_cache,
PrescribedAtmosphere,
PrescribedRadiativeFluxes
using ClimaLand.TimeVaryingInputs
using ClimaUtilities.TimeVaryingInputs: TimeVaryingInput

# We also want to plot the solution
using Plots

Expand Down
4 changes: 3 additions & 1 deletion docs/tutorials/standalone/Soil/layered_soil.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This shows how to run single colum soil model, in standalone mode
# This shows how to run single column soil model, in standalone mode
# with spatially varying properties. We are mimicking the experiment
# carried out in Huang et. al.
# Can. J. Soil Sci. (2011) 91: 169183 doi:10.4141/CJSS09118,
Expand All @@ -9,6 +9,8 @@
# publication.

using Plots
import ClimaUtilities.SpaceVaryingInputs: SpaceVaryingInput
import NCDatasets
import SciMLBase
import ClimaTimeSteppers as CTS
using ClimaCore
Expand Down
Loading
Loading