From 1ad34d00241abfc54f5b5d263ae288aea86ba9ba Mon Sep 17 00:00:00 2001 From: "Katherine M. Deck" Date: Wed, 3 Apr 2024 11:33:42 -0700 Subject: [PATCH] wip [skip ci] --- experiments/Manifest.toml | 281 ++++++---- .../integrated/global/global_parameters.jl | 201 +++++++ .../integrated/global/global_soil_canopy.jl | 491 ++++++++++++++++++ .../Bucket/global_bucket_staticmap.jl | 1 + .../standalone/Soil/richards_runoff.jl | 4 +- ext/CreateParametersExt.jl | 2 +- src/integrated/soil_canopy_model.jl | 11 +- 7 files changed, 878 insertions(+), 113 deletions(-) create mode 100644 experiments/integrated/global/global_parameters.jl create mode 100644 experiments/integrated/global/global_soil_canopy.jl diff --git a/experiments/Manifest.toml b/experiments/Manifest.toml index b1b75c571d..40a9ff8068 100644 --- a/experiments/Manifest.toml +++ b/experiments/Manifest.toml @@ -1,13 +1,18 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.10.2" +julia_version = "1.10.1" manifest_format = "2.0" project_hash = "4616031e611fded1c2ac1e5271a5018186edc260" [[deps.ADTypes]] -git-tree-sha1 = "016833eb52ba2d6bea9fcb50ca295980e728ee24" +git-tree-sha1 = "fcdb00b4d412b80ab08e39978e3bdef579e5e224" uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -version = "0.2.7" +version = "1.0.0" +weakdeps = ["ChainRulesCore", "EnzymeCore"] + + [deps.ADTypes.extensions] + ADTypesChainRulesCoreExt = "ChainRulesCore" + ADTypesEnzymeCoreExt = "EnzymeCore" [[deps.AMD]] deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse_jll"] @@ -67,6 +72,12 @@ weakdeps = ["StaticArrays"] [deps.Adapt.extensions] AdaptStaticArraysExt = "StaticArrays" +[[deps.AliasTables]] +deps = ["Random"] +git-tree-sha1 = "ca95b2220ef440817963baa71525a8f2f4ae7f8f" +uuid = "66dad0bd-aa9a-41b7-9441-69ab47430ed8" +version = "1.0.0" + [[deps.Animations]] deps = ["Colors"] git-tree-sha1 = "e81c509d2c8e49592413bfb0bb3b08150056c79d" @@ -79,14 +90,15 @@ version = "1.1.1" [[deps.ArrayInterface]] deps = ["Adapt", "LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "44691067188f6bd1b2289552a23e4b7572f4528d" +git-tree-sha1 = "133a240faec6e074e07c31ee75619c90544179cf" uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.9.0" +version = "7.10.0" [deps.ArrayInterface.extensions] ArrayInterfaceBandedMatricesExt = "BandedMatrices" ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" ArrayInterfaceCUDAExt = "CUDA" + ArrayInterfaceCUDSSExt = "CUDSS" ArrayInterfaceChainRulesExt = "ChainRules" ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" ArrayInterfaceReverseDiffExt = "ReverseDiff" @@ -97,6 +109,7 @@ version = "7.9.0" BandedMatrices = "aae01518-5342-5314-be14-df237901396f" BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" @@ -105,9 +118,9 @@ version = "7.9.0" [[deps.ArrayLayouts]] deps = ["FillArrays", "LinearAlgebra"] -git-tree-sha1 = "0330bc3e828a05d1073553fb56f9695d73077370" +git-tree-sha1 = "33207a8be6267bc389d0701e97a9bce6a4de68eb" uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" -version = "1.9.1" +version = "1.9.2" weakdeps = ["SparseArrays"] [deps.ArrayLayouts.extensions] @@ -182,6 +195,12 @@ git-tree-sha1 = "9a9610fbe5779636f75229e423e367124034af41" uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" version = "0.16.43" +[[deps.Blosc_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Lz4_jll", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "19b98ee7e3db3b4eff74c5c9c72bf32144e24f10" +uuid = "0b7ba130-8d10-5ba8-a3d6-c5182647fed9" +version = "1.21.5+0" + [[deps.Bzip2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "9e2a6b69137e6969bab0152632dcb3bc108c8bdd" @@ -222,9 +241,9 @@ version = "1.0.1+0" [[deps.CUDA]] deps = ["AbstractFFTs", "Adapt", "BFloat16s", "CEnum", "CUDA_Driver_jll", "CUDA_Runtime_Discovery", "CUDA_Runtime_jll", "Crayons", "DataFrames", "ExprTools", "GPUArrays", "GPUCompiler", "KernelAbstractions", "LLVM", "LLVMLoopInfo", "LazyArtifacts", "Libdl", "LinearAlgebra", "Logging", "NVTX", "Preferences", "PrettyTables", "Printf", "Random", "Random123", "RandomNumbers", "Reexport", "Requires", "SparseArrays", "StaticArrays", "Statistics"] -git-tree-sha1 = "baa8ea7a1ea63316fa3feb454635215773c9c845" +git-tree-sha1 = "dd1c682b372b6791b69f6823afe364fc92a0146c" uuid = "052768ef-5323-5732-b1bb-66c8b64840ba" -version = "5.2.0" +version = "5.3.1" weakdeps = ["ChainRulesCore", "SpecialFunctions"] [deps.CUDA.extensions] @@ -233,21 +252,21 @@ weakdeps = ["ChainRulesCore", "SpecialFunctions"] [[deps.CUDA_Driver_jll]] deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] -git-tree-sha1 = "d01bfc999768f0a31ed36f5d22a76161fc63079c" +git-tree-sha1 = "dc172b558adbf17952001e15cf0d6364e6d78c2f" uuid = "4ee394cb-3365-5eb0-8335-949819d2adfc" -version = "0.7.0+1" +version = "0.8.1+0" [[deps.CUDA_Runtime_Discovery]] deps = ["Libdl"] -git-tree-sha1 = "2cb12f6b2209f40a4b8967697689a47c50485490" +git-tree-sha1 = "38f830504358e9972d2a0c3e5d51cb865e0733df" uuid = "1af6417a-86b4-443c-805f-a4643ffb695f" -version = "0.2.3" +version = "0.2.4" [[deps.CUDA_Runtime_jll]] deps = ["Artifacts", "CUDA_Driver_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "TOML"] -git-tree-sha1 = "8e25c009d2bf16c2c31a70a6e9e8939f7325cc84" +git-tree-sha1 = "4ca7d6d92075906c2ce871ea8bba971fff20d00c" uuid = "76a88914-d11a-5bdc-97e0-2f5a05c973a2" -version = "0.11.1+0" +version = "0.12.1+0" [[deps.Cairo]] deps = ["Cairo_jll", "Colors", "Glib_jll", "Graphics", "Libdl", "Pango_jll"] @@ -290,10 +309,10 @@ uuid = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d" 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"] -git-tree-sha1 = "3c8ba2a248d30aaa7f0e72a3516b142521447377" +deps = ["Adapt", "BandedMatrices", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "KrylovKit", "LinearAlgebra", "MultiBroadcastFusion", "PkgVersion", "RecursiveArrayTools", "RootSolvers", "SparseArrays", "Static", "StaticArrays", "Statistics", "Unrolled"] +git-tree-sha1 = "ce60e793254676e4ff0121997bae6fc4b78ebd09" uuid = "d414da3d-4745-48bb-8d80-42e94e092884" -version = "0.13.3" +version = "0.13.4" weakdeps = ["Krylov"] [deps.ClimaCore.extensions] @@ -325,15 +344,15 @@ version = "0.11.2" [[deps.ClimaParams]] deps = ["DocStringExtensions", "TOML", "Test"] -git-tree-sha1 = "1a3d2455fff201bcf130bbd5a71ac16fc3c21fd1" +git-tree-sha1 = "528aadfaae6f447df3879eab224625ecceec5982" uuid = "5c42b081-d73a-476f-9059-fd94b934656c" -version = "0.10.4" +version = "0.10.5" [[deps.ClimaTimeSteppers]] deps = ["ClimaComms", "Colors", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "KernelAbstractions", "Krylov", "LinearAlgebra", "LinearOperators", "NVTX", "SciMLBase", "StaticArrays"] -git-tree-sha1 = "9c203f39784c968700c55f555754a7771b3410df" +git-tree-sha1 = "5e9df5522c1a5259c913a54ad842edb11f0cdeb5" uuid = "595c0a79-7f3d-439a-bc5a-b232dc3bde79" -version = "0.7.19" +version = "0.7.20" [[deps.ClimaUtilities]] deps = ["Artifacts", "Dates"] @@ -378,9 +397,9 @@ version = "3.24.0" [[deps.ColorTypes]] deps = ["FixedPointNumbers", "Random"] -git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4" +git-tree-sha1 = "b10d0b65641d57b8b4d5e234446582de5047050d" uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" -version = "0.11.4" +version = "0.11.5" [[deps.ColorVectorSpace]] deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "Requires", "Statistics", "TensorCore"] @@ -501,9 +520,9 @@ version = "1.6.1" [[deps.DataStructures]] deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "0f4b5d62a88d8f59003e43c25a8a90de9eb76317" +git-tree-sha1 = "1d0a14036acb104d9e89698bd408f63ab58cdc82" uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.18" +version = "0.18.20" [[deps.DataValueInterfaces]] git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" @@ -528,9 +547,9 @@ version = "1.9.1" [[deps.DiffEqBase]] deps = ["ArrayInterface", "ConcreteStructs", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "FastClosures", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces"] -git-tree-sha1 = "4fa023dbb15b3485426bbc6c43e030c14250d664" +git-tree-sha1 = "531c53fd0405716712a8b4960216c3b7b5ec89b9" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" -version = "6.149.0" +version = "6.149.1" [deps.DiffEqBase.extensions] DiffEqBaseChainRulesCoreExt = "ChainRulesCore" @@ -600,10 +619,10 @@ deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[deps.Distributions]] -deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] -git-tree-sha1 = "7c302d7a5fec5214eb8a5a4c466dcf7a51fcf169" +deps = ["AliasTables", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] +git-tree-sha1 = "22c595ca4146c07b16bcf9c8bea86f731f7109d2" uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.107" +version = "0.25.108" [deps.Distributions.extensions] DistributionsChainRulesCoreExt = "ChainRulesCore" @@ -703,10 +722,10 @@ uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a" version = "0.4.1" [[deps.FFMPEG_jll]] -deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] -git-tree-sha1 = "74faea50c1d007c85837327f6775bea60b5492dd" +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] +git-tree-sha1 = "466d45dc38e15794ec7d5d63ec03d776a9aff36e" uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" -version = "4.4.2+2" +version = "4.4.4+1" [[deps.FFTW]] deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] @@ -760,9 +779,9 @@ uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" [[deps.FillArrays]] deps = ["LinearAlgebra"] -git-tree-sha1 = "bfe82a708416cf00b73a3198db0859c82f741558" +git-tree-sha1 = "881275fc6b8c6f0dfb9cfa4a878979a33cb26be3" uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.10.0" +version = "1.10.1" weakdeps = ["PDMats", "SparseArrays", "Statistics"] [deps.FillArrays.extensions] @@ -772,9 +791,9 @@ weakdeps = ["PDMats", "SparseArrays", "Statistics"] [[deps.FiniteDiff]] deps = ["ArrayInterface", "LinearAlgebra", "Requires", "Setfield", "SparseArrays"] -git-tree-sha1 = "bc0c5092d6caaea112d3c8e3b238d61563c58d5f" +git-tree-sha1 = "2de436b72c3422940cbe1367611d137008af7ec3" uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" -version = "2.23.0" +version = "2.23.1" [deps.FiniteDiff.extensions] FiniteDiffBandedMatricesExt = "BandedMatrices" @@ -833,9 +852,9 @@ version = "2.13.1+0" [[deps.FreeTypeAbstraction]] deps = ["ColorVectorSpace", "Colors", "FreeType", "GeometryBasics"] -git-tree-sha1 = "4b0af18ba7b34e3007f960217028502ff1dfda00" +git-tree-sha1 = "2493cdfd0740015955a8e46de4ef28f49460d8bc" uuid = "663a7486-cb36-511b-a19d-713bb74d65c9" -version = "0.10.2" +version = "0.10.3" [[deps.FriBidi_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -856,9 +875,9 @@ version = "0.1.3" [[deps.Functors]] deps = ["LinearAlgebra"] -git-tree-sha1 = "fa8d8fcfa6c38a9a7aa07233e35b3d9a39ec751a" +git-tree-sha1 = "d3e63d9fa13f8eaa2f06f64949e2afc593ff52c2" uuid = "d9f16b24-f501-4c13-a1f2-28368ffc5196" -version = "0.4.9" +version = "0.4.10" [[deps.Future]] deps = ["Random"] @@ -870,11 +889,16 @@ git-tree-sha1 = "ff38ba61beff76b8f4acad8ab0c97ef73bb670cb" uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" version = "3.3.9+0" +[[deps.GMP_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" +version = "6.2.1+6" + [[deps.GPUArrays]] deps = ["Adapt", "GPUArraysCore", "LLVM", "LinearAlgebra", "Printf", "Random", "Reexport", "Serialization", "Statistics"] -git-tree-sha1 = "47e4686ec18a9620850bad110b79966132f14283" +git-tree-sha1 = "68e8ff56a4a355a85d2784b94614491f8c900cde" uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" -version = "10.0.2" +version = "10.1.0" [[deps.GPUArraysCore]] deps = ["Adapt"] @@ -884,9 +908,9 @@ version = "0.1.6" [[deps.GPUCompiler]] deps = ["ExprTools", "InteractiveUtils", "LLVM", "Libdl", "Logging", "Scratch", "TimerOutputs", "UUIDs"] -git-tree-sha1 = "a846f297ce9d09ccba02ead0cae70690e072a119" +git-tree-sha1 = "1600477fba37c9fc067b9be21f5e8101f24a8865" uuid = "61eb1bfa-7361-4325-ad38-22787b887f55" -version = "0.25.0" +version = "0.26.4" [[deps.GR]] deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Pkg", "Preferences", "Printf", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "UUIDs", "p7zip_jll"] @@ -908,9 +932,9 @@ version = "0.5.8" [[deps.GeoInterface]] deps = ["Extents"] -git-tree-sha1 = "d4f85701f569584f2cff7ba67a137d03f0cfb7d0" +git-tree-sha1 = "801aef8228f7f04972e596b09d4dba481807c913" uuid = "cf35fbd7-0cd7-5166-be24-54bfbe79505f" -version = "1.3.3" +version = "1.3.4" [[deps.GeometryBasics]] deps = ["EarCut_jll", "Extents", "GeoInterface", "IterTools", "LinearAlgebra", "StaticArrays", "StructArrays", "Tables"] @@ -935,6 +959,12 @@ git-tree-sha1 = "359a1ba2e320790ddbe4ee8b4d54a305c0ea2aff" uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" version = "2.80.0+0" +[[deps.GnuTLS_jll]] +deps = ["Artifacts", "GMP_jll", "JLLWrappers", "Libdl", "Nettle_jll", "P11Kit_jll", "Zlib_jll"] +git-tree-sha1 = "383db7d3f900f4c1f47a8a04115b053c095e48d3" +uuid = "0951126a-58fd-58f1-b5b3-b08c7c4a876d" +version = "3.8.4+0" + [[deps.Graphics]] deps = ["Colors", "LinearAlgebra", "NaNMath"] git-tree-sha1 = "d61890399bc535850c4bf08e4e0d3a7ad0f21cbd" @@ -969,16 +999,16 @@ weakdeps = ["MPI"] MPIExt = "MPI" [[deps.HDF5_jll]] -deps = ["Artifacts", "JLLWrappers", "LibCURL_jll", "Libdl", "OpenSSL_jll", "Pkg", "Zlib_jll"] -git-tree-sha1 = "4cc2bb72df6ff40b055295fdef6d92955f9dede8" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "LibCURL_jll", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "OpenSSL_jll", "TOML", "Zlib_jll", "libaec_jll"] +git-tree-sha1 = "82a471768b513dc39e471540fdadc84ff80ff997" uuid = "0234f1f7-429e-5d53-9886-15a909be8d59" -version = "1.12.2+2" +version = "1.14.3+3" [[deps.HTTP]] deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "8e59b47b9dc525b70550ca082ce85bcd7f5477cd" +git-tree-sha1 = "2c3ec1f90bb4a8f7beafb0cffea8a4c3f4e636ab" uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.10.5" +version = "1.10.6" [[deps.HarfBuzz_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] @@ -1072,9 +1102,9 @@ version = "0.1.2" [[deps.IntelOpenMP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "5fdf2fe6724d8caabf43b557b84ce53f3b7e2f6b" +git-tree-sha1 = "be50fe8df3acbffa0274a744f1a99d29c45a57f4" uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" -version = "2024.0.2+0" +version = "2024.1.0+0" [[deps.InteractiveUtils]] deps = ["Markdown"] @@ -1274,9 +1304,9 @@ version = "1.3.1" [[deps.Latexify]] deps = ["Format", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Requires"] -git-tree-sha1 = "cad560042a7cc108f5a4c24ea1431a9221f22c1b" +git-tree-sha1 = "e0b5cd21dc1b44ec6e64f351976f961e6f31d6c4" uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" -version = "0.16.2" +version = "0.16.3" [deps.Latexify.extensions] DataFramesExt = "DataFrames" @@ -1335,10 +1365,10 @@ uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" version = "3.2.2+1" [[deps.Libgcrypt_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll", "Pkg"] -git-tree-sha1 = "64613c82a59c120435c067c2b809fc61cf5166ae" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll"] +git-tree-sha1 = "9fd170c4bbfd8b935fdc5f8b7aa33532c991a673" uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" -version = "1.8.7+0" +version = "1.8.11+0" [[deps.Libglvnd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"] @@ -1433,11 +1463,17 @@ git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" version = "1.0.3" +[[deps.Lz4_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "6c26c5e8a4203d43b5497be3ec5d4e0c3cde240a" +uuid = "5ced341a-0733-55b8-9ab6-a4889d929147" +version = "1.9.4+0" + [[deps.MKL_jll]] -deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl"] -git-tree-sha1 = "72dc3cf284559eb8f53aa593fe62cb33f83ed0c0" +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "oneTBB_jll"] +git-tree-sha1 = "80b2833b56d466b3858d565adcd16a4a05f2089b" uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" -version = "2024.0.0+0" +version = "2024.1.0+0" [[deps.MPI]] deps = ["Distributed", "DocStringExtensions", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "PkgVersion", "PrecompileTools", "Requires", "Serialization", "Sockets"] @@ -1455,9 +1491,9 @@ version = "0.20.19" [[deps.MPICH_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] -git-tree-sha1 = "656036b9ed6f942d35e536e249600bc31d0f9df8" +git-tree-sha1 = "d8a7bf80c88326ebc98b7d38437208c3a0f20725" uuid = "7cb0a576-ebde-5e09-9194-50597f1243b4" -version = "4.2.0+0" +version = "4.2.1+0" [[deps.MPIPreferences]] deps = ["Libdl", "Preferences"] @@ -1466,10 +1502,10 @@ uuid = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267" version = "0.1.10" [[deps.MPItrampoline_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] -git-tree-sha1 = "77c3bd69fdb024d75af38713e883d0f249ce19c2" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "3f884417b47a96d87e7c6219f8f7b30ce67f4f2c" uuid = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748" -version = "5.3.2+0" +version = "5.3.3+0" [[deps.MacroTools]] deps = ["Markdown", "Random"] @@ -1533,9 +1569,9 @@ version = "10.1.4+2" [[deps.Missings]] deps = ["DataAPI"] -git-tree-sha1 = "f66bdc5de519e8f8ae43bdc598782d35a25b1272" +git-tree-sha1 = "ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d" uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" -version = "1.1.0" +version = "1.2.0" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" @@ -1560,6 +1596,11 @@ git-tree-sha1 = "cac9cc5499c25554cba55cd3c30543cff5ca4fab" uuid = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221" version = "0.2.4" +[[deps.MultiBroadcastFusion]] +git-tree-sha1 = "cb2fb12bdd092eea393b4bd3252815cc8a395f7f" +uuid = "c3c07f87-98de-43f2-a76f-835b330b2cbb" +version = "0.2.0" + [[deps.Multisets]] git-tree-sha1 = "8d852646862c96e226367ad10c8af56099b4047e" uuid = "3b2b4ff1-bcff-5658-a3ee-dbcf1ce5ac09" @@ -1567,9 +1608,9 @@ version = "0.4.4" [[deps.NCDatasets]] deps = ["CFTime", "CommonDataModel", "DataStructures", "Dates", "DiskArrays", "NetCDF_jll", "NetworkOptions", "Printf"] -git-tree-sha1 = "d40d24d12f710c39d3a66be99c567ce0032f28a7" +git-tree-sha1 = "a640912695952b074672edb5f9aaee2f7f9fd59a" uuid = "85f8d34a-cbdd-5861-8df4-14fed0d494ab" -version = "0.14.3" +version = "0.14.4" [[deps.NLSolversBase]] deps = ["DiffResults", "Distributed", "FiniteDiff", "ForwardDiff"] @@ -1602,10 +1643,10 @@ uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" version = "1.0.2" [[deps.NetCDF_jll]] -deps = ["Artifacts", "HDF5_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Pkg", "XML2_jll", "Zlib_jll"] -git-tree-sha1 = "072f8371f74c3b9e1b26679de7fbf059d45ea221" +deps = ["Artifacts", "Blosc_jll", "Bzip2_jll", "HDF5_jll", "JLLWrappers", "LazyArtifacts", "LibCURL_jll", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "TOML", "XML2_jll", "Zlib_jll", "Zstd_jll", "libzip_jll"] +git-tree-sha1 = "ef30054d4e6eab74228cc7beae0c0873129bc078" uuid = "7243133f-43d8-5620-bbf4-c2c921802cf3" -version = "400.902.5+1" +version = "400.902.211+0" [[deps.Netpbm]] deps = ["FileIO", "ImageCore", "ImageMetadata"] @@ -1613,6 +1654,12 @@ git-tree-sha1 = "d92b107dbb887293622df7697a2223f9f8176fcd" uuid = "f09324ee-3d7c-5217-9330-fc30815ba969" version = "1.1.1" +[[deps.Nettle_jll]] +deps = ["Artifacts", "GMP_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "eca63e3847dad608cfa6a3329b95ef674c7160b4" +uuid = "4c82536e-c426-54e4-b420-14f461c4ed8b" +version = "3.7.2+0" + [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" @@ -1623,9 +1670,9 @@ uuid = "510215fc-4207-5dde-b226-833fc4488ee2" version = "0.5.5" [[deps.OffsetArrays]] -git-tree-sha1 = "6a731f2b5c03157418a20c12195eb4b74c8f8621" +git-tree-sha1 = "e64b4f5ea6b7389f6f046d13d4896a8f9c1ba71e" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" -version = "1.13.0" +version = "1.14.0" weakdeps = ["Adapt"] [deps.OffsetArrays.extensions] @@ -1673,15 +1720,15 @@ version = "4.1.6+0" [[deps.OpenSSL]] deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] -git-tree-sha1 = "af81a32750ebc831ee28bdaaba6e1067decef51e" +git-tree-sha1 = "38cb508d080d21dc1128f7fb04f20387ed4c0af4" uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" -version = "1.4.2" +version = "1.4.3" [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "a12e56c72edee3ce6b96667745e6cbbe5498f200" +git-tree-sha1 = "3da7367955dcc5c54c1ba4d402ccdc09a1a3e046" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "1.1.23+0" +version = "3.0.13+1" [[deps.OpenSpecFun_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] @@ -1712,6 +1759,12 @@ git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" version = "1.6.3" +[[deps.P11Kit_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "2cd396108e178f3ae8dedbd8e938a18726ab2fbf" +uuid = "c2071276-7c44-58a7-b746-946036e04d0a" +version = "0.24.1+0" + [[deps.PCRE2_jll]] deps = ["Artifacts", "Libdl"] uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" @@ -1743,9 +1796,9 @@ version = "0.5.12" [[deps.Pango_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "526f5a03792669e4187e584e8ec9d534248ca765" +git-tree-sha1 = "cb5a2ab6763464ae0f19c86c56c63d4a2b0f5bda" uuid = "36c8627f-9965-5494-a995-c6b170f724f3" -version = "1.52.1+0" +version = "1.52.2+0" [[deps.Parameters]] deps = ["OrderedCollections", "UnPack"] @@ -1801,9 +1854,9 @@ version = "1.4.1" [[deps.Plots]] deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs", "UnicodeFun", "UnitfulLatexify", "Unzip"] -git-tree-sha1 = "3bdfa4fa528ef21287ef659a89d686e8a1bcb1a9" +git-tree-sha1 = "442e1e7ac27dd5ff8825c3fa62fbd1e86397974b" uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -version = "1.40.3" +version = "1.40.4" [deps.Plots.extensions] FileIOExt = "FileIO" @@ -1821,9 +1874,9 @@ version = "1.40.3" [[deps.Polyester]] deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Requires", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] -git-tree-sha1 = "09f59c6dda37c7f73efddc5bdf6f92bc940eb484" +git-tree-sha1 = "2ba5f33cbb51a85ef58a850749492b08f9bf2193" uuid = "f517fe37-dbe3-4b94-8317-1923a5111588" -version = "0.7.12" +version = "0.7.13" [[deps.PolyesterWeave]] deps = ["BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "Static", "ThreadingUtilities"] @@ -1838,9 +1891,9 @@ version = "0.1.2" [[deps.Polynomials]] deps = ["LinearAlgebra", "RecipesBase", "Setfield", "SparseArrays"] -git-tree-sha1 = "a9c7a523d5ed375be3983db190f6a5874ae9286d" +git-tree-sha1 = "81a2a9462003a423fdc59e2a3ff84cde93c4637b" uuid = "f27b6e38-b328-58d1-80ce-0feddd5e7a45" -version = "4.0.6" +version = "4.0.7" [deps.Polynomials.extensions] PolynomialsChainRulesCoreExt = "ChainRulesCore" @@ -1868,9 +1921,9 @@ version = "0.2.4" [[deps.PreallocationTools]] deps = ["Adapt", "ArrayInterface", "ForwardDiff"] -git-tree-sha1 = "b6665214f2d0739f2d09a17474dd443b9139784a" +git-tree-sha1 = "a660e9daab5db07adf3dedfe09b435cc530d855e" uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46" -version = "0.4.20" +version = "0.4.21" [deps.PreallocationTools.extensions] PreallocationToolsReverseDiffExt = "ReverseDiff" @@ -1926,9 +1979,9 @@ version = "1.0.0" [[deps.Qt6Base_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Vulkan_Loader_jll", "Xorg_libSM_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_cursor_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "libinput_jll", "xkbcommon_jll"] -git-tree-sha1 = "7c29f0e8c575428bd84dc3c72ece5178caa67336" +git-tree-sha1 = "37b7bb7aabf9a085e0044307e1717436117f2b3b" uuid = "c0090381-4147-56d7-9ebc-da0b1113ec56" -version = "6.5.2+2" +version = "6.5.3+1" [[deps.QuadGK]] deps = ["DataStructures", "LinearAlgebra"] @@ -2055,9 +2108,9 @@ version = "0.2.1" [[deps.RuntimeGeneratedFunctions]] deps = ["ExprTools", "SHA", "Serialization"] -git-tree-sha1 = "6aacc5eefe8415f47b3e34214c1d79d2674a0ba2" +git-tree-sha1 = "04c968137612c4a5629fa531334bb81ad5680f00" uuid = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" -version = "0.5.12" +version = "0.5.13" [[deps.SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" @@ -2070,9 +2123,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 = "d15c65e25615272e1b1c5edb1d307484c7942824" +git-tree-sha1 = "beb1f94b08c4976ed1db0ca01b9e6bac89706faf" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "2.31.0" +version = "2.35.0" [deps.SciMLBase.extensions] SciMLBaseChainRulesCoreExt = "ChainRulesCore" @@ -2285,10 +2338,10 @@ weakdeps = ["ChainRulesCore", "InverseFunctions"] StatsFunsInverseFunctionsExt = "InverseFunctions" [[deps.StrideArraysCore]] -deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface", "ThreadingUtilities"] -git-tree-sha1 = "d6415f66f3d89c615929af907fdc6a3e17af0d8c" +deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface", "ThreadingUtilities"] +git-tree-sha1 = "25349bf8f63aa36acbff5e3550a86e9f5b0ef682" uuid = "7792a7ef-975c-4747-a70f-980b88e8d1da" -version = "0.5.2" +version = "0.5.6" [[deps.StringManipulation]] deps = ["PrecompileTools"] @@ -2330,9 +2383,9 @@ weakdeps = ["ClimaParams"] [[deps.SymbolicIndexingInterface]] deps = ["Accessors", "ArrayInterface", "MacroTools", "RuntimeGeneratedFunctions", "StaticArraysCore"] -git-tree-sha1 = "4b7f4c80449d8baae8857d55535033981862619c" +git-tree-sha1 = "40ea524431a92328cd73582d1820a5b08247a40f" uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" -version = "0.3.15" +version = "0.3.16" [[deps.TOML]] deps = ["Dates"] @@ -2367,10 +2420,10 @@ weakdeps = ["IntervalArithmetic"] TaylorSeriesIAExt = "IntervalArithmetic" [[deps.TempestRemap_jll]] -deps = ["Artifacts", "HDF5_jll", "JLLWrappers", "Libdl", "NetCDF_jll", "OpenBLAS32_jll", "Pkg"] -git-tree-sha1 = "88c3818a492ad1a94b1aa440b01eab5d133209ff" +deps = ["Artifacts", "HDF5_jll", "JLLWrappers", "Libdl", "NetCDF_jll", "OpenBLAS32_jll"] +git-tree-sha1 = "723112218783928a20e0d865932694acfb7a7571" uuid = "8573a8c5-1df0-515e-a024-abad257ee284" -version = "2.1.6+1" +version = "2.2.0+0" [[deps.TensorCore]] deps = ["LinearAlgebra"] @@ -2718,6 +2771,12 @@ git-tree-sha1 = "51b5eeb3f98367157a7a12a1fb0aa5328946c03c" uuid = "9a68df92-36a6-505f-a73e-abb412b6bfb4" version = "0.2.3+0" +[[deps.libaec_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "46bf7be2917b59b761247be3f317ddf75e50e997" +uuid = "477f73a3-ac25-53e9-8cc3-50b2fa2566f0" +version = "1.1.2+0" + [[deps.libaom_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "3a2ea60308f0996d26f1e5354e10c24e9ef905d4" @@ -2771,6 +2830,12 @@ git-tree-sha1 = "b910cb81ef3fe6e78bf6acee440bda86fd6ae00c" uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" version = "1.3.7+1" +[[deps.libzip_jll]] +deps = ["Artifacts", "Bzip2_jll", "GnuTLS_jll", "JLLWrappers", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "3282b7d16ae7ac3e57ec2f3fa8fafb564d8f9f7f" +uuid = "337d8026-41b4-5cde-a456-74a10e5b31d1" +version = "1.10.1+0" + [[deps.mtdev_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "814e154bdb7be91d78b6802843f76b6ece642f11" @@ -2782,6 +2847,12 @@ deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" version = "1.52.0+1" +[[deps.oneTBB_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "7d0ea0f4895ef2f5cb83645fa689e52cb55cf493" +uuid = "1317d2d5-d96f-522e-a858-c73665f53c3e" +version = "2021.12.0+0" + [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" diff --git a/experiments/integrated/global/global_parameters.jl b/experiments/integrated/global/global_parameters.jl new file mode 100644 index 0000000000..c81885e970 --- /dev/null +++ b/experiments/integrated/global/global_parameters.jl @@ -0,0 +1,201 @@ +# Read in f_max data and land sea mask +topmodel_dataset = ArtifactWrapper( + @__DIR__, + "processed_topographic_index 2.5 deg", + ArtifactFile[ArtifactFile( + url = "https://caltech.box.com/shared/static/dwa7g0uzhxd50a2z3thbx3a12n0r887s.nc", + filename = "means_2.5_new.nc", + ),], +) +infile_path = joinpath(get_data_folder(topmodel_dataset), "means_2.5_new.nc") +outfile_root = + joinpath(pkgdir(ClimaLand), "experiments/standalone/Soil/static_data_cgll") + +f_max = SpaceVaryingInput( + infile_path, + "fmax", + surface_space; + regridder_type = :InterpolationsRegridder, +) +mask = SpaceVaryingInput( + infile_path, + "landsea_mask", + surface_space; + regridder_type = :InterpolationsRegridder, +) + +oceans_to_zero(field, mask) = mask > 0.5 ? field : eltype(field)(0) +f_over = FT(3.28) # 1/m +R_sb = FT(1.484e-4 / 1000) # m/s +runoff_model = ClimaLand.Soil.Runoff.TOPMODELRunoff{FT}(; + f_over = f_over, + f_max = f_max, + R_sb = R_sb, +) +soil_params_artifact_path = "/groups/esm/ClimaArtifacts/artifacts/soil_params_Gupta2020_2022"# @clima_artifact("soil_params_Gupta2020_2022") +function mask_vg(var, value) + if var < 1e-8 + return value + else + return var + end +end +vg_α = SpaceVaryingInput( + joinpath( + soil_params_artifact_path, + "vGalpha_map_gupta_etal2020_2.5x2.5x4.nc", + ), + "α", + subsurface_space; + regridder_type = :InterpolationsRegridder, + regridder_kwargs = (; + extrapolation_bc = ( + Interpolations.Periodic(), + Interpolations.Flat(), + Interpolations.Flat(), + ), + ), +) +vg_α .= mask_vg.(vg_α, 1e-3) +function mask_vg_n(var, value) + if var < 1 + return value + else + return var + end +end +vg_n = SpaceVaryingInput( + joinpath(soil_params_artifact_path, "vGn_map_gupta_etal2020_2.5x2.5x4.nc"), + "n", + subsurface_space; + regridder_type = :InterpolationsRegridder, + regridder_kwargs = (; + extrapolation_bc = ( + Interpolations.Periodic(), + Interpolations.Flat(), + Interpolations.Flat(), + ), + ), +) +vg_n .= mask_vg_n.(vg_n, 1.001) +vg_fields_to_hcm_field(α::FT, n::FT) where {FT} = + ClimaLand.Soil.vanGenuchten{FT}(; @NamedTuple{α::FT, n::FT}((α, n))...) +hydrology_cm = vg_fields_to_hcm_field.(vg_α, vg_n) + +θ_r = SpaceVaryingInput( + joinpath( + soil_params_artifact_path, + "residual_map_gupta_etal2020_2.5x2.5x4.nc", + ), + "θ_r", + subsurface_space; + regridder_type = :InterpolationsRegridder, + regridder_kwargs = (; + extrapolation_bc = ( + Interpolations.Periodic(), + Interpolations.Flat(), + Interpolations.Flat(), + ), + ), +) + +ν = SpaceVaryingInput( + joinpath( + soil_params_artifact_path, + "porosity_map_gupta_etal2020_2.5x2.5x4.nc", + ), + "ν", + subsurface_space; + regridder_type = :InterpolationsRegridder, + regridder_kwargs = (; + extrapolation_bc = ( + Interpolations.Periodic(), + Interpolations.Flat(), + Interpolations.Flat(), + ), + ), +) +ν .= mask_vg.(ν, 1.0) +K_sat = SpaceVaryingInput( + joinpath(soil_params_artifact_path, "ksat_map_gupta_etal2020_2.5x2.5x4.nc"), + "Ksat", + subsurface_space; + regridder_type = :InterpolationsRegridder, + regridder_kwargs = (; + extrapolation_bc = ( + Interpolations.Periodic(), + Interpolations.Flat(), + Interpolations.Flat(), + ), + ), +) +S_s = ClimaCore.Fields.zeros(subsurface_space) .+ FT(1e-3) +ν_ss_om = ClimaCore.Fields.zeros(subsurface_space) .+ FT(0.1) +ν_ss_quartz = ClimaCore.Fields.zeros(subsurface_space) .+ FT(0.1) +ν_ss_gravel = ClimaCore.Fields.zeros(subsurface_space) .+ FT(0.1) +PAR_albedo = ClimaCore.Fields.zeros(surface_space) .+ FT(0.2) +NIR_albedo = ClimaCore.Fields.zeros(surface_space) .+ FT(0.2) +soil_params = Soil.EnergyHydrologyParameters( + FT; + ν, + ν_ss_om, + ν_ss_quartz, + ν_ss_gravel, + hydrology_cm, + K_sat, + S_s, + θ_r, + PAR_albedo, + NIR_albedo, +); + + +# TwoStreamModel parameters +Ω = FT(0.69) +ld = FT(0.5) +α_PAR_leaf = FT(0.1) +τ_PAR_leaf = FT(0.05) +α_NIR_leaf = FT(0.45) +τ_NIR_leaf = FT(0.25) + +# Energy Balance model +ac_canopy = FT(2.5e3) + +# Conductance Model +g1 = FT(141) # Wang et al: 141 sqrt(Pa) for Medlyn model; Natan used 300. + +#Photosynthesis model +Vcmax25 = FT(9e-5) # from Yujie's paper 4.5e-5 , Natan used 9e-5 + +# Plant Hydraulics and general plant parameters +SAI = FT(1.0) # m2/m2 or: estimated from Wang et al, FT(0.00242) ? +f_root_to_shoot = FT(3.5) +RAI = f_root_to_shoot * SAI +K_sat_plant = 5e-9 # m/s # seems much too small? +ψ63 = FT(-4 / 0.0098) # / MPa to m, Holtzman's original parameter value is -4 MPa +Weibull_param = FT(4) # unitless, Holtzman's original c param value +a = FT(0.05 * 0.0098) # Holtzman's original parameter for the bulk modulus of elasticity +conductivity_model = + Canopy.PlantHydraulics.Weibull{FT}(K_sat_plant, ψ63, Weibull_param) +retention_model = Canopy.PlantHydraulics.LinearRetentionCurve{FT}(a) +plant_ν = FT(1.44e-4) +plant_S_s = FT(1e-2 * 0.0098) # m3/m3/MPa to m3/m3/m +rooting_depth = FT(0.5) # from Natan +n_stem = 1 +n_leaf = 1 +h_stem = 1.0 +h_leaf = 1.0 +zmax = 0.0 +h_canopy = h_stem + h_leaf +compartment_midpoints = + n_stem > 0 ? [h_stem / 2, h_stem + h_leaf / 2] : [h_leaf / 2] +compartment_surfaces = n_stem > 0 ? [zmax, h_stem, h_canopy] : [zmax, h_leaf] + +z0_m = FT(0.13) * h_canopy +z0_b = FT(0.1) * z0_m + + +soilco2_ps = Soil.Biogeochemistry.SoilCO2ModelParameters( + FT; + ν = 1.0,# INCORRECT! +) diff --git a/experiments/integrated/global/global_soil_canopy.jl b/experiments/integrated/global/global_soil_canopy.jl new file mode 100644 index 0000000000..f9fc368a89 --- /dev/null +++ b/experiments/integrated/global/global_soil_canopy.jl @@ -0,0 +1,491 @@ +using CairoMakie +using Statistics +using ArtifactWrappers +using Dates +import SciMLBase +import ClimaTimeSteppers as CTS +using ClimaCore +using ClimaUtilities.ClimaArtifacts +import Interpolations + +import ClimaUtilities.TimeVaryingInputs: TimeVaryingInput +import ClimaUtilities.SpaceVaryingInputs: SpaceVaryingInput +import ClimaUtilities.Regridders: InterpolationsRegridder +import ClimaUtilities.DataHandling +import NCDatasets +import ClimaParams as CP +using ClimaComms + +using ClimaLand +using ClimaLand.Soil +using ClimaLand.Canopy +import ClimaLand +import ClimaLand.Parameters as LP + +context = ClimaComms.context() +outdir = joinpath(pkgdir(ClimaLand), "experiments/standalone/Soil/artifacts") +!ispath(outdir) && mkpath(outdir) +FT = Float64 +radius = FT(6378.1e3); +depth = FT(50) +domain = ClimaLand.Domains.SphericalShell(; + radius = radius, + depth = depth, + nelements = (101, 10), + npolynomial = 1, + dz_tuple = FT.((10.0, 0.1)), +); +surface_space = domain.space.surface +subsurface_space = domain.space.subsurface + +ref_time = DateTime(2021); +t_start = 0.0 + +# Forcing data +era5_artifact_path = "/groups/esm/ClimaArtifacts/artifacts/era5_land_forcing_data2021"# @clima_artifact("era5_land_forcing_data2021") +# Precipitation: +precip = TimeVaryingInput( + joinpath(era5_artifact_path, "era5_2021_0.9x1.25_clima.nc"), + "rf", + surface_space; + reference_date = ref_time, + t_start, + regridder_type = :InterpolationsRegridder, + file_reader_kwargs = (; preprocess_func = (data) -> -data / 3600,), +) + +snow_precip = TimeVaryingInput( + joinpath(era5_artifact_path, "era5_2021_0.9x1.25.nc"), + "sf", + surface_space; + reference_date = ref_time, + t_start, + regridder_type = :InterpolationsRegridder, + file_reader_kwargs = (; preprocess_func = (data) -> -data / 3600,), +) + +u_atmos = TimeVaryingInput( + joinpath(era5_artifact_path, "era5_2021_0.9x1.25_clima.nc"), + "ws", + surface_space; + reference_date = ref_time, + t_start, + regridder_type = :InterpolationsRegridder, +) +q_atmos = TimeVaryingInput( + joinpath(era5_artifact_path, "era5_2021_0.9x1.25_clima.nc"), + "q", + surface_space; + reference_date = ref_time, + t_start, + regridder_type = :InterpolationsRegridder, +) +P_atmos = TimeVaryingInput( + joinpath(era5_artifact_path, "era5_2021_0.9x1.25.nc"), + "sp", + surface_space; + reference_date = ref_time, + t_start, + regridder_type = :InterpolationsRegridder, +) + +T_atmos = TimeVaryingInput( + joinpath(era5_artifact_path, "era5_2021_0.9x1.25.nc"), + "t2m", + surface_space; + reference_date = ref_time, + t_start, + regridder_type = :InterpolationsRegridder, +) +h_atmos = FT(10); + +atmos = PrescribedAtmosphere( + precip, + snow_precip, + T_atmos, + u_atmos, + q_atmos, + P_atmos, + ref_time, + h_atmos, +); + +# Prescribed radiation -- a prescribed downwelling SW diurnal cycle, with a +# peak at local noon, and a prescribed downwelling LW radiative +# flux, assuming the air temperature is on average 275 degrees +# K with a diurnal amplitude of 5 degrees K: +SW_d = TimeVaryingInput( + joinpath(era5_artifact_path, "era5_2021_0.9x1.25.nc"), + "ssrd", + surface_space; + reference_date = ref_time, + t_start, + regridder_type = :InterpolationsRegridder, + file_reader_kwargs = (; preprocess_func = (data) -> data / 3600,), +) +LW_d = TimeVaryingInput( + joinpath(era5_artifact_path, "era5_2021_0.9x1.25.nc"), + "strd", + surface_space; + reference_date = ref_time, + t_start, + regridder_type = :InterpolationsRegridder, + file_reader_kwargs = (; preprocess_func = (data) -> data / 3600,), +) +radiation = PrescribedRadiativeFluxes(FT, SW_d, LW_d, ref_time); + +include("./global_parameters.jl") +soil_args = (domain = domain, parameters = soil_params) +soil_model_type = Soil.EnergyHydrology{FT} + +# Soil microbes model +soilco2_type = Soil.Biogeochemistry.SoilCO2Model{FT} + +# soil microbes args +Csom = (z, t) -> eltype(z)(5.0) + +# Set the soil CO2 BC to being atmospheric CO2 +soilco2_top_bc = Soil.Biogeochemistry.AtmosCO2StateBC() +soilco2_bot_bc = Soil.Biogeochemistry.SoilCO2FluxBC((p, t) -> 0.0) # no flux +soilco2_sources = (Soil.Biogeochemistry.MicrobeProduction{FT}(),) + +soilco2_boundary_conditions = (; top = soilco2_top_bc, bottom = soilco2_bot_bc) + +soilco2_drivers = Soil.Biogeochemistry.SoilDrivers( + Soil.Biogeochemistry.PrognosticMet{FT}(), + Soil.Biogeochemistry.PrescribedSOC{FT}(Csom), + atmos, +) + +soilco2_args = (; + boundary_conditions = soilco2_boundary_conditions, + sources = soilco2_sources, + domain = domain, + parameters = soilco2_ps, + drivers = soilco2_drivers, +) + +# Now we set up the canopy model, which we set up by component: +# Component Types +canopy_component_types = (; + autotrophic_respiration = Canopy.AutotrophicRespirationModel{FT}, + radiative_transfer = Canopy.TwoStreamModel{FT}, + photosynthesis = Canopy.FarquharModel{FT}, + conductance = Canopy.MedlynConductanceModel{FT}, + hydraulics = Canopy.PlantHydraulicsModel{FT}, + energy = Canopy.BigLeafEnergyModel{FT}, +) +# Individual Component arguments +# Set up autotrophic respiration +autotrophic_respiration_args = + (; parameters = Canopy.AutotrophicRespirationParameters(FT)) +# Set up radiative transfer +radiative_transfer_args = (; + parameters = Canopy.TwoStreamParameters( + FT; + Ω, + α_PAR_leaf, + τ_PAR_leaf, + α_NIR_leaf, + τ_NIR_leaf, + ) +) +# Set up conductance +conductance_args = (; parameters = Canopy.MedlynConductanceParameters(FT; g1)) +# Set up photosynthesis +photosynthesis_args = (; + parameters = Canopy.FarquharParameters(FT, Canopy.C3(); Vcmax25 = Vcmax25) +) +# Set up plant hydraulics +# Not ideal +LAIfunction = TimeVaryingInput( + joinpath(era5_artifact_path, "era5_2021_0.9x1.25_clima.nc"), + "lai", + surface_space; + reference_date = ref_time, + t_start, + regridder_type = :InterpolationsRegridder, +) +ai_parameterization = Canopy.PrescribedSiteAreaIndex{FT}(LAIfunction, SAI, RAI) + +function root_distribution(z::T; rooting_depth = rooting_depth) where {T} + return T(1.0 / rooting_depth) * exp(z / T(rooting_depth)) # 1/m +end + +plant_hydraulics_ps = Canopy.PlantHydraulics.PlantHydraulicsParameters(; + ai_parameterization = ai_parameterization, + ν = plant_ν, + S_s = plant_S_s, + root_distribution = root_distribution, + conductivity_model = conductivity_model, + retention_model = retention_model, +) +plant_hydraulics_args = ( + parameters = plant_hydraulics_ps, + n_stem = n_stem, + n_leaf = n_leaf, + compartment_midpoints = compartment_midpoints, + compartment_surfaces = compartment_surfaces, +) + +energy_args = (parameters = Canopy.BigLeafEnergyParameters{FT}(ac_canopy),) + +# Canopy component args +canopy_component_args = (; + autotrophic_respiration = autotrophic_respiration_args, + radiative_transfer = radiative_transfer_args, + photosynthesis = photosynthesis_args, + conductance = conductance_args, + hydraulics = plant_hydraulics_args, + energy = energy_args, +) + +# Other info needed +earth_param_set = soil_params.earth_param_set +shared_params = Canopy.SharedCanopyParameters{FT, typeof(earth_param_set)}( + z0_m, + z0_b, + earth_param_set, +) + +canopy_model_args = (; + parameters = shared_params, + domain = ClimaLand.obtain_surface_domain(domain), +) + +# Integrated plant hydraulics and soil model +land_input = (atmos = atmos, radiation = radiation) +land = SoilCanopyModel{FT}(; + soilco2_type = soilco2_type, + soilco2_args = soilco2_args, + land_args = land_input, + soil_model_type = soil_model_type, + soil_args = soil_args, + canopy_component_types = canopy_component_types, + canopy_component_args = canopy_component_args, + canopy_model_args = canopy_model_args, +) + +Y, p, t = initialize(land) +z = ClimaCore.Fields.coordinate_field(domain.space.subsurface).z +lat = ClimaCore.Fields.coordinate_field(domain.space.subsurface).lat +function hydrostatic_profile( + lat::FT, + z::FT, + ν::FT, + θ_r::FT, + α::FT, + n::FT, + S_s::FT, + fmax, + ) where {FT} + m = 1 - 1 / n + zmin = FT(-50.0) + zmax = FT(0.0) + + z_∇ = FT(zmin / 5.0 *2 + (zmax - zmin) / 10.0 * (fmax - 0.35) / 0.7) + if z > z_∇ + S = FT((FT(1) + (α * (z - z_∇))^n)^(-m)) + ϑ_l = S * (ν - θ_r) + θ_r + else + ϑ_l = -S_s * (z - z_∇) + ν + end + return FT(ϑ_l) +end +t0 = 0.0 +tf = 3600.0 * 24 * 2 +dt = 450.0 + +# Initial conditions +Y.soilco2.C .= FT(0.000412) # set to atmospheric co2, mol co2 per mol air +ψ_stem_0 = FT(-1e5 / 9800) # pressure in the leaf divided by rho_liquid*gravitational acceleration [m] +ψ_leaf_0 = FT(-2e5 / 9800) +ψ_comps = n_stem > 0 ? [ψ_stem_0, ψ_leaf_0] : ψ_leaf_0 + +S_l_ini = + Canopy.PlantHydraulics.inverse_water_retention_curve.(retention_model, ψ_comps, plant_ν, plant_S_s) + +for i in 1:(n_stem + n_leaf) + Y.canopy.hydraulics.ϑ_l.:($i) .= + Canopy.PlantHydraulics.augmented_liquid_fraction.(plant_ν, S_l_ini[i]) +end + +evaluate!(Y.canopy.energy.T, atmos.T, t0) + +Y.soil.ϑ_l .= hydrostatic_profile.(lat, z, ν, θ_r, vg_α, vg_n, S_s, f_max) +Y.soil.θ_i .= FT(0.0) +T = FT(276.85) +# Next line does not run on GPU + +ρc_s = Soil.volumetric_heat_capacity.(Y.soil.ϑ_l, Y.soil.θ_i, soil_params.ρc_ds, soil_params.earth_param_set) +Y.soil.ρe_int .= + Soil.volumetric_internal_energy.(Y.soil.θ_i, ρc_s, T, soil_params.earth_param_set) +@. Y.soil.ϑ_l = oceans_to_zero(Y.soil.ϑ_l, mask) +@. Y.soil.ρe_int = oceans_to_zero(Y.soil.ρe_int, mask) +@. Y.soil.θ_i = oceans_to_zero(Y.soil.θ_i, mask) + + +set_initial_cache! = make_set_initial_cache(land) +exp_tendency! = make_exp_tendency(land) +set_initial_cache!(p, Y, t0) +timestepper = CTS.RK4() +ode_algo = CTS.ExplicitAlgorithm(timestepper) + + +prob = SciMLBase.ODEProblem( + CTS.ClimaODEFunction((T_exp!) = exp_tendency!), + Y, + (t0, tf), + p, +); +saveat = Array(t0:dt:tf) +sv = (; + t = Array{Float64}(undef, length(saveat)), + saveval = Array{NamedTuple}(undef, length(saveat)), +) +saving_cb = ClimaLand.NonInterpSavingCallback(sv, saveat) +updateat = Array(t0:dt:tf) +updatefunc = ClimaLand.make_update_drivers(atmos, nothing) +driver_cb = ClimaLand.DriverUpdateCallback(updateat, updatefunc) +cb = SciMLBase.CallbackSet(driver_cb, saving_cb) +@time sol = SciMLBase.solve( + prob, + ode_algo; + dt = dt, + callback = cb, + adaptive = false, + saveat = saveat, +) +#= +longpts = range(-180.0, 180.0, 101) +latpts = range(-90.0, 90.0, 101) +hcoords = [ + ClimaCore.Geometry.LatLongPoint(lat, long) for long in longpts, + lat in latpts +] +remapper = ClimaCore.Remapping.Remapper(surface_space, hcoords) + +h∇_end = ClimaCore.Remapping.interpolate( + remapper, + oceans_to_zero.(sv.saveval[end].soil.h∇, mask), +) +fig = Figure(size = (600, 400)) +ax = Axis( + fig[1, 1], + xlabel = "Longitude", + ylabel = "Latitude", + title = "Water table thickness", +) +clims = extrema(h∇_end) +CairoMakie.heatmap!(ax, longpts, latpts, h∇_end, colorrange = clims) +Colorbar(fig[:, end + 1], colorrange = clims) +outfile = joinpath(outdir, string("heatmap_h∇.png")) +CairoMakie.save(outfile, fig) + +R_s_end = ClimaCore.Remapping.interpolate( + remapper, + oceans_to_zero.(sv.saveval[end].soil.R_s, mask), +) +fig = Figure(size = (600, 400)) +ax = Axis( + fig[1, 1], + xlabel = "Longitude", + ylabel = "Latitude", + title = "Surface Runoff", +) +clims = extrema(R_s_end) +CairoMakie.heatmap!(ax, longpts, latpts, R_s_end, colorrange = clims) +Colorbar(fig[:, end + 1], colorrange = clims) +outfile = joinpath(outdir, string("heatmap_R_s.png")) +CairoMakie.save(outfile, fig) + +R_ss_end = ClimaCore.Remapping.interpolate( + remapper, + oceans_to_zero.(sv.saveval[end].soil.R_ss, mask), +) + +fig = Figure(size = (600, 400)) +ax = Axis( + fig[1, 1], + xlabel = "Longitude", + ylabel = "Latitude", + title = "Subsurface Runoff", +) +clims = extrema(R_ss_end) +CairoMakie.heatmap!(ax, longpts, latpts, R_ss_end, colorrange = clims) +Colorbar(fig[:, end + 1], colorrange = clims) +outfile = joinpath(outdir, string("heatmap_R_ss.png")) +CairoMakie.save(outfile, fig) + +θ_sfc_end = ClimaCore.Remapping.interpolate( + remapper, + ClimaLand.Soil.get_top_surface_field( + oceans_to_zero.(sol.u[end].soil.ϑ_l, mask), + surface_space, + ), +) +fig = Figure(size = (1000, 400)) +ax = Axis(fig[1, 1], xlabel = "Longitude", ylabel = "Latitude", title = "θ_sfc") +clims1 = extrema(θ_sfc_end) +CairoMakie.heatmap!(ax, longpts, latpts, θ_sfc_end, colorrange = clims1) +Colorbar(fig[1, 2], colorrange = clims1) + +Δθ_sfc = ClimaCore.Remapping.interpolate( + remapper, + ClimaLand.Soil.get_top_surface_field( + oceans_to_zero.(sol.u[end].soil.ϑ_l .- sol.u[1].soil.ϑ_l, mask), + surface_space, + ), +) +ax2 = Axis(fig[1, 3], xlabel = "Longitude", title = "θ_sfc Δ") +clims2 = extrema(Δθ_sfc) +CairoMakie.heatmap!(ax2, longpts, latpts, Δθ_sfc, colorrange = clims2) +Colorbar(fig[1, 4], colorrange = clims2) +outfile = joinpath(outdir, string("heatmap_θ_sfc.png")) +CairoMakie.save(outfile, fig) + + +int_ϑ_end = similar(sv.saveval[1].soil.h∇) +ClimaCore.Operators.column_integral_definite!( + int_ϑ_end, + oceans_to_zero.(sol.u[end].soil.ϑ_l, mask), +) +normalized_int_ϑ_end = + ClimaCore.Remapping.interpolate(remapper, int_ϑ_end ./ 50.0) +fig = Figure(size = (1000, 400)) +ax = Axis( + fig[1, 1], + xlabel = "Longitude", + ylabel = "Latitude", + title = "∫θ dz/Δz", +) +clims1 = extrema(normalized_int_ϑ_end) +CairoMakie.heatmap!( + ax, + longpts, + latpts, + normalized_int_ϑ_end, + colorrange = clims1, +) +Colorbar(fig[1, 2], colorrange = clims1) + +int_ϑ_1 = similar(sv.saveval[1].soil.h∇) +ClimaCore.Operators.column_integral_definite!( + int_ϑ_1, + oceans_to_zero.(sol.u[1].soil.ϑ_l, mask), +) +Δ_normalized_int_ϑ = + ClimaCore.Remapping.interpolate(remapper, (int_ϑ_end .- int_ϑ_1) ./ 50.0) +ax2 = Axis(fig[1, 3], xlabel = "Longitude", title = "Δ∫θ dz /Δz") +clims2 = extrema(Δ_normalized_int_ϑ) +CairoMakie.heatmap!( + ax2, + longpts, + latpts, + Δ_normalized_int_ϑ, + colorrange = clims2, +) +Colorbar(fig[1, 4], colorrange = clims2) +outfile = joinpath(outdir, string("heatmap_∫ϑdz.png")) +CairoMakie.save(outfile, fig) +=# diff --git a/experiments/standalone/Bucket/global_bucket_staticmap.jl b/experiments/standalone/Bucket/global_bucket_staticmap.jl index d564c76c59..a295ada480 100644 --- a/experiments/standalone/Bucket/global_bucket_staticmap.jl +++ b/experiments/standalone/Bucket/global_bucket_staticmap.jl @@ -24,6 +24,7 @@ using ClimaUtilities.ClimaArtifacts import Interpolations import ClimaUtilities.TimeVaryingInputs: TimeVaryingInput import ClimaUtilities.ClimaArtifacts: @clima_artifact + import ClimaTimeSteppers as CTS import NCDatasets using ClimaCore diff --git a/experiments/standalone/Soil/richards_runoff.jl b/experiments/standalone/Soil/richards_runoff.jl index 3e06c73450..44edc826ca 100644 --- a/experiments/standalone/Soil/richards_runoff.jl +++ b/experiments/standalone/Soil/richards_runoff.jl @@ -196,10 +196,10 @@ function hydrostatic_profile( fmax, ) where {FT} m = 1 - 1 / n - zmin = FT(-50.0) + zmin = FT(-1.0) zmax = FT(0.0) - z_∇ = FT(zmin / 5.0 + (zmax - zmin) / 2.5 * (fmax - 0.35) / 0.7) + z_∇ = FT(zmin / 5.0 * 2 + (zmax - zmin) / 10.0 * (fmax - 0.35) / 0.7) if z > z_∇ S = FT((FT(1) + (α * (z - z_∇))^n)^(-m)) ϑ_l = S * (ν - θ_r) + θ_r diff --git a/ext/CreateParametersExt.jl b/ext/CreateParametersExt.jl index 1e7a4935e3..2cdaf6ac19 100644 --- a/ext/CreateParametersExt.jl +++ b/ext/CreateParametersExt.jl @@ -300,7 +300,7 @@ function EnergyHydrologyParameters( PAR_albedo = 0.2, NIR_albedo = 0.4, kwargs..., -) where {F <: Union{<:AbstractFloat, ClimaCore.Fields.FieldVector}, C} +) where {F <: Union{<:AbstractFloat, ClimaCore.Fields.Field}, C} earth_param_set = LP.LandParameters(toml_dict) # Obtain parameters needed to calculate the derived parameters diff --git a/src/integrated/soil_canopy_model.jl b/src/integrated/soil_canopy_model.jl index fe9ead089d..f6e2fb6296 100644 --- a/src/integrated/soil_canopy_model.jl +++ b/src/integrated/soil_canopy_model.jl @@ -97,7 +97,7 @@ function SoilCanopyModel{FT}(; ), ) sources = (RootExtraction{FT}(), Soil.PhaseChange{FT}(Δz)) - # add heat BC + # How to use TOPMODEL runoff? top_bc = ClimaLand.Soil.AtmosDrivenFluxBC(atmos, CanopyRadiativeFluxes{FT}()) zero_flux = Soil.HeatFluxBC((p, t) -> 0.0) @@ -115,7 +115,7 @@ function SoilCanopyModel{FT}(; ) transpiration = Canopy.PlantHydraulics.DiagnosticTranspiration{FT}() - soil_driver = PrognosticSoil{FT}( + soil_driver = PrognosticSoil{typeof(soil.parameters.PAR_albedo)}( soil.parameters.PAR_albedo, soil.parameters.NIR_albedo, ) @@ -433,11 +433,12 @@ Concrete type of AbstractSoilDriver used for dispatch in cases where both a canopy model and soil model are run. $(DocStringExtensions.FIELDS) """ -struct PrognosticSoil{FT} <: AbstractSoilDriver +struct PrognosticSoil{F <: Union{AbstractFloat, ClimaCore.Fields.Field}} <: + AbstractSoilDriver "Soil albedo for PAR" - α_PAR::FT + α_PAR::F "Soil albedo for NIR" - α_NIR::FT + α_NIR::F end function Canopy.ground_albedo_PAR(soil_driver::PrognosticSoil, Y, p, t)