diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index d6f435a180..b3656db972 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -134,6 +134,15 @@ steps: env: CLIMACOMMS_DEVICE: "CUDA" + - label: "Canopy Implicit Stepping GPU" + command: "julia --color=yes --project=.buildkite experiments/standalone/Vegetation/timestep_test.jl" + artifact_paths: "experiments/standalone/Vegetation/errors.png" + agents: + slurm_ntasks: 1 + slurm_gres: "gpu:1" + env: + CLIMACOMMS_DEVICE: "CUDA" + - group: "ClimaLandSimulations" steps: - label: "Ozark figures Makie" diff --git a/docs/Manifest.toml b/docs/Manifest.toml index f6da9f57f8..939d31cf9c 100644 --- a/docs/Manifest.toml +++ b/docs/Manifest.toml @@ -5,9 +5,9 @@ manifest_format = "2.0" project_hash = "6c3f79ccae513840cc13b9ac947575c2305b507f" [[deps.ADTypes]] -git-tree-sha1 = "7a6b285f217ba92b5b474b783b4c2e8cf8218aaa" +git-tree-sha1 = "99a6f5d0ce1c7c6afdb759daa30226f71c54f6b0" uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -version = "1.5.3" +version = "1.7.1" weakdeps = ["ChainRulesCore", "EnzymeCore"] [deps.ADTypes.extensions] @@ -37,9 +37,9 @@ version = "0.4.5" [[deps.Accessors]] deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Test"] -git-tree-sha1 = "c0d491ef0b135fd7d63cbc6404286bc633329425" +git-tree-sha1 = "f61b15be1d76846c0ce31d3fcfac5380ae53db6a" uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" -version = "0.1.36" +version = "0.1.37" [deps.Accessors.extensions] AccessorsAxisKeysExt = "AxisKeys" @@ -66,6 +66,11 @@ weakdeps = ["StaticArrays"] [deps.Adapt.extensions] AdaptStaticArraysExt = "StaticArrays" +[[deps.AdaptivePredicates]] +git-tree-sha1 = "7d5da5dd472490d048b081ca1bda4a7821b06456" +uuid = "35492f91-a3bd-45ad-95db-fcad7dcfedb7" +version = "1.1.1" + [[deps.AliasTables]] deps = ["PtrArrays", "Random"] git-tree-sha1 = "9876e1e164b144ca45e9e3198d0b689cadfed9ff" @@ -94,10 +99,10 @@ uuid = "ec485272-7323-5ecc-a04f-4719b315124d" version = "0.4.0" [[deps.ArrayInterface]] -deps = ["Adapt", "LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "5c9b74c973181571deb6442d41e5c902e6b9f38e" +deps = ["Adapt", "LinearAlgebra"] +git-tree-sha1 = "f54c23a5d304fb87110de62bace7777d59088c34" uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.12.0" +version = "7.15.0" [deps.ArrayInterface.extensions] ArrayInterfaceBandedMatricesExt = "BandedMatrices" @@ -107,6 +112,7 @@ version = "7.12.0" ArrayInterfaceChainRulesExt = "ChainRules" ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" ArrayInterfaceReverseDiffExt = "ReverseDiff" + ArrayInterfaceSparseArraysExt = "SparseArrays" ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" ArrayInterfaceTrackerExt = "Tracker" @@ -118,14 +124,15 @@ version = "7.12.0" ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" [[deps.ArrayLayouts]] deps = ["FillArrays", "LinearAlgebra"] -git-tree-sha1 = "8556500c18fcad8b4c44058e23fbc4a36143f6be" +git-tree-sha1 = "ce2ca959f932f5dad70697dd93133d1167cf1e4e" uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" -version = "1.10.1" +version = "1.10.2" weakdeps = ["SparseArrays"] [deps.ArrayLayouts.extensions] @@ -221,9 +228,13 @@ version = "0.1.6" [[deps.BlockArrays]] deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] -git-tree-sha1 = "9a9610fbe5779636f75229e423e367124034af41" +git-tree-sha1 = "5c0ffe1dff8cb7112de075f1b1cb32191675fcba" uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" -version = "0.16.43" +version = "1.1.0" +weakdeps = ["BandedMatrices"] + + [deps.BlockArrays.extensions] + BlockArraysBandedMatricesExt = "BandedMatrices" [[deps.Blosc_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Lz4_jll", "Zlib_jll", "Zstd_jll"] @@ -277,9 +288,9 @@ version = "0.10.14" [[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 = "6e945e876652f2003e6ca74e19a3c45017d3e9f6" +git-tree-sha1 = "fdd9dfb67dfefd548f51000cc400bb51003de247" uuid = "052768ef-5323-5732-b1bb-66c8b64840ba" -version = "5.4.2" +version = "5.4.3" weakdeps = ["ChainRulesCore", "EnzymeCore", "SpecialFunctions"] [deps.CUDA.extensions] @@ -288,10 +299,10 @@ weakdeps = ["ChainRulesCore", "EnzymeCore", "SpecialFunctions"] SpecialFunctionsExt = "SpecialFunctions" [[deps.CUDA_Driver_jll]] -deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] -git-tree-sha1 = "97df9d4d6be8ac6270cb8fd3b8fc413690820cbd" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "325058b426c2b421e3d2df3d5fa646d72d2e3e7e" uuid = "4ee394cb-3365-5eb0-8335-949819d2adfc" -version = "0.9.1+1" +version = "0.9.2+0" [[deps.CUDA_Runtime_Discovery]] deps = ["Libdl"] @@ -313,15 +324,15 @@ version = "9.0.0+1" [[deps.Cairo]] deps = ["Cairo_jll", "Colors", "Glib_jll", "Graphics", "Libdl", "Pango_jll"] -git-tree-sha1 = "d0b3f8b4ad16cb0a2988c6788646a5e6a17b6b1b" +git-tree-sha1 = "7b6ad8c35f4bc3bca8eb78127c8b99719506a5fb" uuid = "159f3aea-2a34-519c-b102-8c37f9878175" -version = "1.0.5" +version = "1.1.0" [[deps.CairoMakie]] deps = ["CRC32c", "Cairo", "Cairo_jll", "Colors", "FileIO", "FreeType", "GeometryBasics", "LinearAlgebra", "Makie", "PrecompileTools"] -git-tree-sha1 = "f84837ccd1411ba059bb0b752dab9c7f1b0b0826" +git-tree-sha1 = "3a6f8462053d199e6c81a83c7d22a9b8314c716a" uuid = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" -version = "0.12.4" +version = "0.12.6" [[deps.Cairo_jll]] deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] @@ -329,12 +340,6 @@ git-tree-sha1 = "a2f1c8c668c8e3cb4cca4e57a8efdb09067bb3fd" uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" version = "1.18.0+2" -[[deps.Calculus]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" -uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" -version = "0.5.1" - [[deps.ChainRules]] deps = ["Adapt", "ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "SparseInverseSubset", "Statistics", "StructArrays", "SuiteSparse"] git-tree-sha1 = "227985d885b4dbce5e18a96f9326ea1e836e5a03" @@ -352,9 +357,9 @@ weakdeps = ["SparseArrays"] ChainRulesCoreSparseArraysExt = "SparseArrays" [[deps.ClimaComms]] -git-tree-sha1 = "2ca8c9ca6131a7be8ca262e6db79bc7aa94ab597" +git-tree-sha1 = "ec303a4a66dc0a0ebe15a639a7e685afeaa0daef" uuid = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d" -version = "0.6.3" +version = "0.6.4" [deps.ClimaComms.extensions] ClimaCommsCUDAExt = "CUDA" @@ -366,9 +371,9 @@ version = "0.6.3" [[deps.ClimaCore]] deps = ["Adapt", "BandedMatrices", "BlockArrays", "ClimaComms", "CubedSphere", "DataStructures", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "KrylovKit", "LinearAlgebra", "MultiBroadcastFusion", "NVTX", "PkgVersion", "RecursiveArrayTools", "RootSolvers", "SparseArrays", "StaticArrays", "Statistics", "Unrolled"] -git-tree-sha1 = "fa5335ad4b4596c70882c42366172b52aad7a499" +git-tree-sha1 = "3c05a897d67276ff8cfbdac4c92a5ad1da599c00" uuid = "d414da3d-4745-48bb-8d80-42e94e092884" -version = "0.14.10" +version = "0.14.11" weakdeps = ["CUDA", "Krylov"] [deps.ClimaCore.extensions] @@ -385,7 +390,7 @@ version = "0.2.3" deps = ["Adapt", "ArtifactWrappers", "ClimaComms", "ClimaCore", "ClimaDiagnostics", "ClimaUtilities", "DataFrames", "Dates", "DocStringExtensions", "Insolation", "Interpolations", "IntervalSets", "LazyArtifacts", "LinearAlgebra", "NCDatasets", "SciMLBase", "StaticArrays", "SurfaceFluxes", "Thermodynamics", "UnrolledUtilities"] path = ".." uuid = "08f4d4ce-cf43-44bb-ad95-9d2d5f413532" -version = "0.14.0" +version = "0.14.2" weakdeps = ["CSV", "CUDA", "ClimaParams", "Flux", "HTTP", "StatsBase", "cuDNN"] [deps.ClimaLand.extensions] @@ -394,15 +399,15 @@ weakdeps = ["CSV", "CUDA", "ClimaParams", "Flux", "HTTP", "StatsBase", "cuDNN"] [[deps.ClimaParams]] deps = ["DocStringExtensions", "TOML", "Test"] -git-tree-sha1 = "b9ab261e1e35437b5a2afdd86c734f40b89fc641" +git-tree-sha1 = "db02457512fec610ff9225bd0be9cab9952ad718" uuid = "5c42b081-d73a-476f-9059-fd94b934656c" -version = "0.10.9" +version = "0.10.11" [[deps.ClimaTimeSteppers]] deps = ["ClimaComms", "Colors", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "KernelAbstractions", "Krylov", "LinearAlgebra", "LinearOperators", "NVTX", "SciMLBase", "StaticArrays"] -git-tree-sha1 = "d996079d35a7724ead861a3392b1df364f158a22" +git-tree-sha1 = "56d5c0e5181281e86d4cc4b109b980882c30af3d" uuid = "595c0a79-7f3d-439a-bc5a-b232dc3bde79" -version = "0.7.32" +version = "0.7.33" [deps.ClimaTimeSteppers.extensions] ClimaTimeSteppersBenchmarkToolsExt = ["CUDA", "BenchmarkTools", "OrderedCollections", "StatsBase", "PrettyTables"] @@ -416,9 +421,9 @@ version = "0.7.32" [[deps.ClimaUtilities]] deps = ["Artifacts", "Dates"] -git-tree-sha1 = "2e171face2f5ee218ebaa9aee7b5e14a28b14366" +git-tree-sha1 = "fee5ec9953a1ec950c992a29bd92576ad566b82d" uuid = "b3f4f4ca-9299-4f7f-bd9b-81e1242a7513" -version = "0.1.10" +version = "0.1.12" [deps.ClimaUtilities.extensions] ClimaUtilitiesClimaCommsCUDAExt = ["ClimaComms", "CUDA"] @@ -446,9 +451,9 @@ version = "0.1.13" [[deps.CodecZlib]] deps = ["TranscodingStreams", "Zlib_jll"] -git-tree-sha1 = "b8fe8546d52ca154ac556809e10c75e6e7430ac8" +git-tree-sha1 = "bce6804e5e6044c6daab27bb533d1295e4a2e759" uuid = "944b1d66-785c-5afd-91f1-9de20f533193" -version = "0.7.5" +version = "0.7.6" [[deps.ColorBrewer]] deps = ["Colors", "JSON", "Test"] @@ -458,9 +463,9 @@ version = "0.4.0" [[deps.ColorSchemes]] deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "PrecompileTools", "Random"] -git-tree-sha1 = "4b270d6465eb21ae89b732182c20dc165f8bf9f2" +git-tree-sha1 = "b5278586822443594ff615963b0c09755771b3e0" uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" -version = "3.25.0" +version = "3.26.0" [[deps.ColorTypes]] deps = ["FixedPointNumbers", "Random"] @@ -501,11 +506,16 @@ git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" version = "0.3.0" +[[deps.CommonWorldInvalidations]] +git-tree-sha1 = "ae52d1c52048455e85a387fbee9be553ec2b68d0" +uuid = "f70d9fcc-98c5-4d4a-abd7-e4cdeebd8ca8" +version = "1.0.0" + [[deps.Compat]] deps = ["TOML", "UUIDs"] -git-tree-sha1 = "b1c55339b7c6c350ee89f2c1604299660525b248" +git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.15.0" +version = "4.16.0" weakdeps = ["Dates", "LinearAlgebra"] [deps.Compat.extensions] @@ -538,9 +548,9 @@ version = "2.4.2" [[deps.ConstructionBase]] deps = ["LinearAlgebra"] -git-tree-sha1 = "260fd2400ed2dab602a7c15cf10c1933c59930a2" +git-tree-sha1 = "d8a9c0b6ac2d9081bf76324b39c78ca3ce4f0c98" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.5" +version = "1.5.6" weakdeps = ["IntervalSets", "StaticArrays"] [deps.ConstructionBase.extensions] @@ -601,16 +611,22 @@ version = "1.0.0" deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +[[deps.Dbus_jll]] +deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "fc173b380865f70627d7dd1190dc2fce6cc105af" +uuid = "ee1fde0b-3d02-5ea6-8484-8dfef6360eab" +version = "1.14.10+0" + [[deps.DefineSingletons]] git-tree-sha1 = "0fba8b706d0178b4dc7fd44a96a92382c9065c2c" uuid = "244e2a9f-e319-4986-a169-4d1fe445cd52" version = "0.1.2" [[deps.DelaunayTriangulation]] -deps = ["EnumX", "ExactPredicates", "Random"] -git-tree-sha1 = "b0cb128d2e100646573e1da8565b02491fddb5ef" +deps = ["AdaptivePredicates", "EnumX", "ExactPredicates", "Random"] +git-tree-sha1 = "b5f1c6532d2ea71e99b74231b0a3d53fba846ced" uuid = "927a84f5-c5f4-47a5-9785-b46e178433df" -version = "1.0.4" +version = "1.1.3" [[deps.DelimitedFiles]] deps = ["Mmap"] @@ -619,10 +635,10 @@ uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" 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 = "d1e8a4642e28b0945bde6e2e1ac569b9e0abd728" +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", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces"] +git-tree-sha1 = "72950e082d2241a1da1c924147943e2918471af9" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" -version = "6.151.5" +version = "6.152.2" [deps.DiffEqBase.extensions] DiffEqBaseCUDAExt = "CUDA" @@ -634,6 +650,7 @@ version = "6.151.5" DiffEqBaseMeasurementsExt = "Measurements" DiffEqBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements" DiffEqBaseReverseDiffExt = "ReverseDiff" + DiffEqBaseSparseArraysExt = "SparseArrays" DiffEqBaseTrackerExt = "Tracker" DiffEqBaseUnitfulExt = "Unitful" @@ -647,14 +664,15 @@ version = "6.151.5" Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [[deps.DiffEqCallbacks]] deps = ["DataStructures", "DiffEqBase", "ForwardDiff", "Functors", "LinearAlgebra", "Markdown", "NonlinearSolve", "Parameters", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"] -git-tree-sha1 = "c959cfd2657d16beada157a74d52269e8556500e" +git-tree-sha1 = "91e10deadcf1e33168bac3140eb0ea8cc4dfa5d7" uuid = "459566f4-90b8-5000-8ac3-15dfb0a30def" -version = "3.6.2" +version = "3.7.0" [deps.DiffEqCallbacks.weakdeps] OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" @@ -674,9 +692,9 @@ version = "1.15.1" [[deps.DifferentiationInterface]] deps = ["ADTypes", "Compat", "DocStringExtensions", "FillArrays", "LinearAlgebra", "PackageExtensionCompat", "SparseArrays", "SparseMatrixColorings"] -git-tree-sha1 = "695217e97ee1ce0248f4a56c14af88ba33c585fd" +git-tree-sha1 = "5fd57942dde7449335f585b3a4236e1fa2de0fd5" uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" -version = "0.5.7" +version = "0.5.12" [deps.DifferentiationInterface.extensions] DifferentiationInterfaceChainRulesCoreExt = "ChainRulesCore" @@ -720,9 +738,9 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[deps.Distributions]] deps = ["AliasTables", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] -git-tree-sha1 = "9c405847cc7ecda2dc921ccf18b47ca150d7317e" +git-tree-sha1 = "0e0a1264b0942f1f3abb2b30891f2a590cc652ac" uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.109" +version = "0.25.110" [deps.Distributions.extensions] DistributionsChainRulesCoreExt = "ChainRulesCore" @@ -751,12 +769,6 @@ deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" version = "1.6.0" -[[deps.DualNumbers]] -deps = ["Calculus", "NaNMath", "SpecialFunctions"] -git-tree-sha1 = "5837a837389fccf076445fce071c8ddaea35a566" -uuid = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74" -version = "0.6.8" - [[deps.EarCut_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "e3290f2d49e661fbd94046d7e3726ffcb2d41053" @@ -774,9 +786,9 @@ uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" version = "1.0.4" [[deps.EnzymeCore]] -git-tree-sha1 = "3a3177ba05b4763234819060fb6c2e1613379ca6" +git-tree-sha1 = "8f205a601760f4798a10f138c3940f0451d95188" uuid = "f151be2c-9106-41f4-ab19-57ee4f262869" -version = "0.7.6" +version = "0.7.8" weakdeps = ["Adapt"] [deps.EnzymeCore.extensions] @@ -816,6 +828,12 @@ git-tree-sha1 = "27415f162e6028e81c72b82ef756bf321213b6ec" uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" version = "0.1.10" +[[deps.Expronicon]] +deps = ["MLStyle", "Pkg", "TOML"] +git-tree-sha1 = "fc3951d4d398b5515f91d7fe5d45fc31dccb3c9b" +uuid = "6b7a57c9-7cc1-4fdf-b7f5-e857abae3636" +version = "0.8.5" + [[deps.Extents]] git-tree-sha1 = "94997910aca72897524d2237c41eb852153b0f65" uuid = "411431e0-e8b7-467b-b5e0-f676ba4f2910" @@ -847,9 +865,9 @@ version = "3.3.10+0" [[deps.FLoops]] deps = ["BangBang", "Compat", "FLoopsBase", "InitialValues", "JuliaVariables", "MLStyle", "Serialization", "Setfield", "Transducers"] -git-tree-sha1 = "ffb97765602e3cbe59a0589d237bf07f245a8576" +git-tree-sha1 = "0a2e5873e9a5f54abb06418d57a8df689336a660" uuid = "cc61a311-1640-44b5-9fba-1b764f453329" -version = "0.2.1" +version = "0.2.2" [[deps.FLoopsBase]] deps = ["ContextVariablesX"] @@ -859,9 +877,9 @@ version = "0.1.1" [[deps.FastBroadcast]] deps = ["ArrayInterface", "LinearAlgebra", "Polyester", "Static", "StaticArrayInterface", "StrideArraysCore"] -git-tree-sha1 = "bd19de6fe8a3b18888f35e79832f97544684caa7" +git-tree-sha1 = "ab1b34570bcdf272899062e1a56285a53ecaae08" uuid = "7034ab61-46d4-4ed7-9d0f-46aef9175898" -version = "0.3.4" +version = "0.3.5" [[deps.FastClosures]] git-tree-sha1 = "acebe244d53ee1b461970f8910c235b259e772ef" @@ -914,10 +932,10 @@ weakdeps = ["PDMats", "SparseArrays", "Statistics"] FillArraysStatisticsExt = "Statistics" [[deps.FiniteDiff]] -deps = ["ArrayInterface", "LinearAlgebra", "Requires", "Setfield", "SparseArrays"] -git-tree-sha1 = "2de436b72c3422940cbe1367611d137008af7ec3" +deps = ["ArrayInterface", "LinearAlgebra", "Setfield", "SparseArrays"] +git-tree-sha1 = "f9219347ebf700e77ca1d48ef84e4a82a6701882" uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" -version = "2.23.1" +version = "2.24.0" [deps.FiniteDiff.extensions] FiniteDiffBandedMatricesExt = "BandedMatrices" @@ -937,19 +955,21 @@ version = "0.8.5" [[deps.Flux]] deps = ["Adapt", "ChainRulesCore", "Compat", "Functors", "LinearAlgebra", "MLUtils", "MacroTools", "NNlib", "OneHotArrays", "Optimisers", "Preferences", "ProgressLogging", "Random", "Reexport", "SparseArrays", "SpecialFunctions", "Statistics", "Zygote"] -git-tree-sha1 = "edacf029ed6276301e455e34d7ceeba8cc34078a" +git-tree-sha1 = "fbf100b4bed74c9b6fac0ebd1031e04977d35b3b" uuid = "587475ba-b771-5e3f-ad9e-33799f191a9c" -version = "0.14.16" +version = "0.14.19" [deps.Flux.extensions] FluxAMDGPUExt = "AMDGPU" FluxCUDAExt = "CUDA" FluxCUDAcuDNNExt = ["CUDA", "cuDNN"] + FluxEnzymeExt = "Enzyme" FluxMetalExt = "Metal" [deps.Flux.weakdeps] AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" Metal = "dde4c033-4e86-420c-a63e-0dd931031962" cuDNN = "02a925ec-e4fe-4b08-9a7e-0d78e3d38ccd" @@ -1017,19 +1037,19 @@ version = "0.1.3" [[deps.Functors]] deps = ["LinearAlgebra"] -git-tree-sha1 = "8a66c07630d6428eaab3506a0eabfcf4a9edea05" +git-tree-sha1 = "64d8e93700c7a3f28f717d265382d52fac9fa1c1" uuid = "d9f16b24-f501-4c13-a1f2-28368ffc5196" -version = "0.4.11" +version = "0.4.12" [[deps.Future]] deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" [[deps.GLFW_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll", "xkbcommon_jll"] -git-tree-sha1 = "3f74912a156096bd8fdbef211eff66ab446e7297" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll", "libdecor_jll", "xkbcommon_jll"] +git-tree-sha1 = "532f9126ad901533af1d4f5c198867227a7bb077" uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" -version = "3.4.0+0" +version = "3.4.0+1" [[deps.GMP_jll]] deps = ["Artifacts", "Libdl"] @@ -1038,9 +1058,9 @@ version = "6.2.1+6" [[deps.GPUArrays]] deps = ["Adapt", "GPUArraysCore", "LLVM", "LinearAlgebra", "Printf", "Random", "Reexport", "Serialization", "Statistics"] -git-tree-sha1 = "04661708f5301394a1f1be86a07a89e835900db6" +git-tree-sha1 = "a74c3f1cf56a3dfcdef0605f8cdb7015926aae30" uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" -version = "10.2.3" +version = "10.3.0" [[deps.GPUArraysCore]] deps = ["Adapt"] @@ -1049,22 +1069,22 @@ uuid = "46192b85-c4d5-4398-a991-12ede77f4527" version = "0.1.6" [[deps.GPUCompiler]] -deps = ["ExprTools", "InteractiveUtils", "LLVM", "Libdl", "Logging", "Scratch", "TimerOutputs", "UUIDs"] -git-tree-sha1 = "518ebd058c9895de468a8c255797b0c53fdb44dd" +deps = ["ExprTools", "InteractiveUtils", "LLVM", "Libdl", "Logging", "Preferences", "Scratch", "Serialization", "TOML", "TimerOutputs", "UUIDs"] +git-tree-sha1 = "ab29216184312f99ff957b32cd63c2fe9c928b91" uuid = "61eb1bfa-7361-4325-ad38-22787b887f55" -version = "0.26.5" +version = "0.26.7" [[deps.GR]] -deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Preferences", "Printf", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "p7zip_jll"] -git-tree-sha1 = "3e527447a45901ea392fe12120783ad6ec222803" +deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Preferences", "Printf", "Qt6Wayland_jll", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "p7zip_jll"] +git-tree-sha1 = "629693584cef594c3f6f99e76e7a7ad17e60e8d5" uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" -version = "0.73.6" +version = "0.73.7" [[deps.GR_jll]] deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "FreeType2_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "182c478a179b267dd7a741b6f8f4c3e0803795d6" +git-tree-sha1 = "a8863b69c2a0859f2c2c87ebdc4c6712e88bdf0d" uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" -version = "0.73.6+0" +version = "0.73.7+0" [[deps.GaussQuadrature]] deps = ["SpecialFunctions"] @@ -1186,15 +1206,15 @@ version = "0.1.17" [[deps.Hwloc_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1d334207121865ac8c1c97eb7f42d0339e4635bf" +git-tree-sha1 = "5e19e1e4fa3e71b774ce746274364aef0234634e" uuid = "e33a78d0-f292-5ffc-b300-72abe9b543c8" -version = "2.11.0+0" +version = "2.11.1+0" [[deps.HypergeometricFunctions]] -deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] -git-tree-sha1 = "f218fe3736ddf977e0e772bc9a586b2383da2685" +deps = ["LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] +git-tree-sha1 = "7c4195be1649ae622304031ed46a2f4df989f1eb" uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" -version = "0.3.23" +version = "0.3.24" [[deps.IOCapture]] deps = ["Logging", "Random"] @@ -1265,16 +1285,17 @@ uuid = "22cec73e-a1b8-11e9-2c92-598750a2cf9c" version = "0.3.1" [[deps.InlineStrings]] -deps = ["Parsers"] -git-tree-sha1 = "86356004f30f8e737eff143d57d41bd580e437aa" +git-tree-sha1 = "45521d31238e87ee9f9732561bfee12d4eebd52d" uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" -version = "1.4.1" +version = "1.4.2" [deps.InlineStrings.extensions] ArrowTypesExt = "ArrowTypes" + ParsersExt = "Parsers" [deps.InlineStrings.weakdeps] ArrowTypes = "31f734f8-188a-4ce0-8406-c8a06bd891cd" + Parsers = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" [[deps.Insolation]] deps = ["Artifacts", "Dates", "DelimitedFiles", "Interpolations"] @@ -1288,9 +1309,9 @@ weakdeps = ["ClimaParams"] [[deps.IntelOpenMP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "be50fe8df3acbffa0274a744f1a99d29c45a57f4" +git-tree-sha1 = "14eb2b542e748570b56446f4c50fbfb2306ebc45" uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" -version = "2024.1.0+0" +version = "2024.2.0+0" [[deps.InteractiveUtils]] deps = ["Markdown"] @@ -1324,14 +1345,14 @@ weakdeps = ["Random", "RecipesBase", "Statistics"] IntervalSetsStatisticsExt = "Statistics" [[deps.InverseFunctions]] -deps = ["Test"] -git-tree-sha1 = "e7cbed5032c4c397a6ac23d1493f3289e01231c4" +git-tree-sha1 = "2787db24f4e03daf859c6509ff87764e4182f7d1" uuid = "3587e190-3f89-42d0-90ee-14403ec27112" -version = "0.1.14" -weakdeps = ["Dates"] +version = "0.1.16" +weakdeps = ["Dates", "Test"] [deps.InverseFunctions.extensions] - DatesExt = "Dates" + InverseFunctionsDatesExt = "Dates" + InverseFunctionsTestExt = "Test" [[deps.InvertedIndices]] git-tree-sha1 = "0dc7b50b8d436461be01300fd8cd45aa0274b038" @@ -1409,9 +1430,9 @@ version = "0.6.0" [[deps.KernelAbstractions]] deps = ["Adapt", "Atomix", "InteractiveUtils", "LinearAlgebra", "MacroTools", "PrecompileTools", "Requires", "SparseArrays", "StaticArrays", "UUIDs", "UnsafeAtomics", "UnsafeAtomicsLLVM"] -git-tree-sha1 = "d0448cebd5919e06ca5edc7a264631790de810ec" +git-tree-sha1 = "0fac59881e91c7233a9b0d47f4b7d9432e534f0f" uuid = "63c18a36-062a-441e-b654-da1e3ab1ce7c" -version = "0.9.22" +version = "0.9.23" weakdeps = ["EnzymeCore"] [deps.KernelAbstractions.extensions] @@ -1430,10 +1451,14 @@ uuid = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7" version = "0.9.6" [[deps.KrylovKit]] -deps = ["ChainRulesCore", "GPUArraysCore", "LinearAlgebra", "Printf", "VectorInterface"] -git-tree-sha1 = "3f3a92bbe8f568b689a7f7bc193f7c717d793751" +deps = ["GPUArraysCore", "LinearAlgebra", "PackageExtensionCompat", "Printf", "VectorInterface"] +git-tree-sha1 = "3c2a016489c38f35160a246c91a3f3353c47bb68" uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" -version = "0.7.1" +version = "0.8.1" +weakdeps = ["ChainRulesCore"] + + [deps.KrylovKit.extensions] + KrylovKitChainRulesCoreExt = "ChainRulesCore" [[deps.LAME_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1449,9 +1474,9 @@ version = "3.0.0+1" [[deps.LLVM]] deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Preferences", "Printf", "Requires", "Unicode"] -git-tree-sha1 = "389aea28d882a40b5e1747069af71bdbd47a1cae" +git-tree-sha1 = "2470e69781ddd70b8878491233cd09bc1bd7fc96" uuid = "929cbde3-209d-540e-8aea-75f648917ca0" -version = "7.2.1" +version = "8.1.0" weakdeps = ["BFloat16s"] [deps.LLVM.extensions] @@ -1459,9 +1484,9 @@ weakdeps = ["BFloat16s"] [[deps.LLVMExtra_jll]] deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl", "TOML"] -git-tree-sha1 = "88b916503aac4fb7f701bb625cd84ca5dd1677bc" +git-tree-sha1 = "597d1c758c9ae5d985ba4202386a607c675ee700" uuid = "dad2f222-ce93-54a1-a47d-0025e8a3acab" -version = "0.0.29+0" +version = "0.0.31+0" [[deps.LLVMLoopInfo]] git-tree-sha1 = "2e5c102cfc41f48ae4740c7eca7743cc7e7b75ea" @@ -1496,16 +1521,18 @@ version = "1.3.1" [[deps.Latexify]] deps = ["Format", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Requires"] -git-tree-sha1 = "5b0d630f3020b82c0775a51d05895852f8506f50" +git-tree-sha1 = "ce5f5621cac23a86011836badfedf664a612cee4" uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" -version = "0.16.4" +version = "0.16.5" [deps.Latexify.extensions] DataFramesExt = "DataFrames" + SparseArraysExt = "SparseArrays" SymEngineExt = "SymEngine" [deps.Latexify.weakdeps] DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" SymEngine = "123dc426-2d89-5057-bbad-38513e3affd8" [[deps.LayoutPointers]] @@ -1520,15 +1547,23 @@ uuid = "0e77f7df-68c5-4e49-93ce-4cd80f5598bf" version = "1.2.2" [[deps.LazyArrays]] -deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "MacroTools", "MatrixFactorizations", "SparseArrays"] -git-tree-sha1 = "35079a6a869eecace778bcda8641f9a54ca3a828" +deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "MacroTools", "SparseArrays"] +git-tree-sha1 = "507b423197fdd9e77b74aa2532c0a05eb7eb4004" uuid = "5078a376-72f3-5289-bfd5-ec5146d43c02" -version = "1.10.0" -weakdeps = ["StaticArrays"] +version = "2.2.0" [deps.LazyArrays.extensions] + LazyArraysBandedMatricesExt = "BandedMatrices" + LazyArraysBlockArraysExt = "BlockArrays" + LazyArraysBlockBandedMatricesExt = "BlockBandedMatrices" LazyArraysStaticArraysExt = "StaticArrays" + [deps.LazyArrays.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + [[deps.LazyArtifacts]] deps = ["Artifacts", "Pkg"] uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" @@ -1615,9 +1650,9 @@ version = "2.40.1+0" [[deps.LineSearches]] deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "Printf"] -git-tree-sha1 = "7bbea35cec17305fc70a0e5b4641477dc0789d9d" +git-tree-sha1 = "e4c3be53733db1051cc15ecf573b1042b3a712a1" uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" -version = "7.2.0" +version = "7.3.0" [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] @@ -1640,10 +1675,10 @@ version = "2.8.0" LDLFactorizations = "40e66cde-538c-5869-a4ad-c39174c6795b" [[deps.LinearSolve]] -deps = ["ArrayInterface", "ChainRulesCore", "ConcreteStructs", "DocStringExtensions", "EnumX", "FastLapackInterface", "GPUArraysCore", "InteractiveUtils", "KLU", "Krylov", "LazyArrays", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "PrecompileTools", "Preferences", "RecursiveFactorization", "Reexport", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Sparspak", "StaticArraysCore", "UnPack"] -git-tree-sha1 = "7648cc20100504f4b453917aacc8520e9c0ecfb3" +deps = ["ArrayInterface", "ChainRulesCore", "ConcreteStructs", "CpuId", "DocStringExtensions", "EnumX", "FastLapackInterface", "GPUArraysCore", "InteractiveUtils", "KLU", "Krylov", "LazyArrays", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "PrecompileTools", "Preferences", "RecursiveFactorization", "Reexport", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Sparspak", "StaticArraysCore", "UnPack"] +git-tree-sha1 = "ee625f4053362526950661ce3022c7a483c6f8e5" uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -version = "2.30.1" +version = "2.32.0" [deps.LinearSolve.extensions] LinearSolveBandedMatricesExt = "BandedMatrices" @@ -1678,9 +1713,9 @@ version = "2.30.1" [[deps.Literate]] deps = ["Base64", "IOCapture", "JSON", "REPL"] -git-tree-sha1 = "596df2daea9c27da81eee63ef2cf101baf10c24c" +git-tree-sha1 = "eef2e1fc1dc38af90a18eb16e519e06d1fd10c2a" uuid = "98b081ad-f1c9-55d3-8b20-4c87d4299306" -version = "2.18.0" +version = "2.19.0" [[deps.LogExpFunctions]] deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] @@ -1720,15 +1755,15 @@ weakdeps = ["ChainRulesCore", "ForwardDiff", "SpecialFunctions"] [[deps.Lz4_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "6c26c5e8a4203d43b5497be3ec5d4e0c3cde240a" +git-tree-sha1 = "7f26c8fc5229e68484e0b3447312c98e16207d11" uuid = "5ced341a-0733-55b8-9ab6-a4889d929147" -version = "1.9.4+0" +version = "1.10.0+0" [[deps.MKL_jll]] deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "oneTBB_jll"] -git-tree-sha1 = "80b2833b56d466b3858d565adcd16a4a05f2089b" +git-tree-sha1 = "f046ccd0c6db2832a9f639e2c669c6fe867e5f4f" uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" -version = "2024.1.0+0" +version = "2024.2.0+0" [[deps.MLStyle]] git-tree-sha1 = "bc38dff0548128765760c79eb7388a4b37fae2c8" @@ -1743,9 +1778,9 @@ version = "0.4.4" [[deps.MPICH_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] -git-tree-sha1 = "4099bb6809ac109bfc17d521dad33763bcf026b7" +git-tree-sha1 = "19d4bd098928a3263693991500d05d74dbdc2004" uuid = "7cb0a576-ebde-5e09-9194-50597f1243b4" -version = "4.2.1+1" +version = "4.2.2+0" [[deps.MPIPreferences]] deps = ["Libdl", "Preferences"] @@ -1767,15 +1802,15 @@ version = "0.5.13" [[deps.Makie]] deps = ["Animations", "Base64", "CRC32c", "ColorBrewer", "ColorSchemes", "ColorTypes", "Colors", "Contour", "Dates", "DelaunayTriangulation", "Distributions", "DocStringExtensions", "Downloads", "FFMPEG_jll", "FileIO", "FilePaths", "FixedPointNumbers", "Format", "FreeType", "FreeTypeAbstraction", "GeometryBasics", "GridLayoutBase", "ImageIO", "InteractiveUtils", "IntervalSets", "Isoband", "KernelDensity", "LaTeXStrings", "LinearAlgebra", "MacroTools", "MakieCore", "Markdown", "MathTeXEngine", "Observables", "OffsetArrays", "Packing", "PlotUtils", "PolygonOps", "PrecompileTools", "Printf", "REPL", "Random", "RelocatableFolders", "Scratch", "ShaderAbstractions", "Showoff", "SignedDistanceFields", "SparseArrays", "Statistics", "StatsBase", "StatsFuns", "StructArrays", "TriplotBase", "UnicodeFun", "Unitful"] -git-tree-sha1 = "57a1a2b3d12e04f9e9fb77d61cd12571d5541c5f" +git-tree-sha1 = "2fe1a9e0cfb8ffe846dc08b78a0cfd4746c99949" uuid = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" -version = "0.21.4" +version = "0.21.6" [[deps.MakieCore]] deps = ["ColorTypes", "GeometryBasics", "IntervalSets", "Observables"] -git-tree-sha1 = "638bc817096742e8302f7b0b972ee5701fe00e97" +git-tree-sha1 = "1753d72dcf82beb1c582826d0a51a8253a719613" uuid = "20f20a25-4f0e-4fdf-b5d1-57303727442b" -version = "0.8.3" +version = "0.8.5" [[deps.ManualMemory]] git-tree-sha1 = "bcaef4fc7a0cfe2cba636d84cda54b5e4e4ca3cd" @@ -1799,15 +1834,9 @@ version = "0.1.2" [[deps.MathTeXEngine]] deps = ["AbstractTrees", "Automa", "DataStructures", "FreeTypeAbstraction", "GeometryBasics", "LaTeXStrings", "REPL", "RelocatableFolders", "UnicodeFun"] -git-tree-sha1 = "1865d0b8a2d91477c8b16b49152a32764c7b1f5f" +git-tree-sha1 = "e1641f32ae592e415e3dbae7f4a188b5316d4b62" uuid = "0a4f8689-d25c-4efe-a92b-7142dfc1aa53" -version = "0.6.0" - -[[deps.MatrixFactorizations]] -deps = ["ArrayLayouts", "LinearAlgebra", "Printf", "Random"] -git-tree-sha1 = "6731e0574fa5ee21c02733e397beb133df90de35" -uuid = "a3b82374-2e81-5b9e-98ce-41277c0e4c87" -version = "2.2.0" +version = "0.6.1" [[deps.MaybeInplace]] deps = ["ArrayInterface", "LinearAlgebra", "MacroTools", "SparseArrays"] @@ -1890,9 +1919,9 @@ version = "7.8.3" [[deps.NNlib]] deps = ["Adapt", "Atomix", "ChainRulesCore", "GPUArraysCore", "KernelAbstractions", "LinearAlgebra", "Pkg", "Random", "Requires", "Statistics"] -git-tree-sha1 = "1288e6db94d98f7d194454452176b82edb25b32c" +git-tree-sha1 = "ae52c156a63bb647f80c26319b104e99e5977e51" uuid = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" -version = "0.9.19" +version = "0.9.22" [deps.NNlib.extensions] NNlibAMDGPUExt = "AMDGPU" @@ -1956,9 +1985,9 @@ version = "1.2.0" [[deps.NonlinearSolve]] deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "DiffEqBase", "FastBroadcast", "FastClosures", "FiniteDiff", "ForwardDiff", "LazyArrays", "LineSearches", "LinearAlgebra", "LinearSolve", "MaybeInplace", "PrecompileTools", "Preferences", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SparseArrays", "SparseDiffTools", "StaticArraysCore", "SymbolicIndexingInterface", "TimerOutputs"] -git-tree-sha1 = "3adb1e5945b5a6b1eaee754077f25ccc402edd7f" +git-tree-sha1 = "bcd8812e751326ff1d4b2dd50764b93df51f143b" uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" -version = "3.13.1" +version = "3.14.0" [deps.NonlinearSolve.extensions] NonlinearSolveBandedMatricesExt = "BandedMatrices" @@ -2036,9 +2065,9 @@ version = "0.8.1+2" [[deps.OpenMPI_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML", "Zlib_jll"] -git-tree-sha1 = "a9de2f1fc98b92f8856c640bf4aec1ac9b2a0d86" +git-tree-sha1 = "bfce6d523861a6c562721b262c0d1aaeead2647f" uuid = "fe0851c0-eecd-5654-98d4-656369965a5c" -version = "5.0.3+0" +version = "5.0.5+0" [[deps.OpenSSL]] deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] @@ -2189,10 +2218,10 @@ version = "1.40.5" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [[deps.Polyester]] -deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Requires", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] -git-tree-sha1 = "9ff799e8fb8ed6717710feee3be3bc20645daa97" +deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] +git-tree-sha1 = "6d38fea02d983051776a856b7df75b30cf9a3c1f" uuid = "f517fe37-dbe3-4b94-8317-1923a5111588" -version = "0.7.15" +version = "0.7.16" [[deps.PolyesterWeave]] deps = ["BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "Static", "ThreadingUtilities"] @@ -2213,9 +2242,9 @@ version = "1.4.3" [[deps.PreallocationTools]] deps = ["Adapt", "ArrayInterface", "ForwardDiff"] -git-tree-sha1 = "406c29a7f46706d379a3bce45671b4e3a39ddfbc" +git-tree-sha1 = "d7f3f63331c7c8c81245b4ee2815b7d496365833" uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46" -version = "0.4.22" +version = "0.4.23" [deps.PreallocationTools.extensions] PreallocationToolsReverseDiffExt = "ReverseDiff" @@ -2264,9 +2293,9 @@ version = "0.1.4" [[deps.ProgressMeter]] deps = ["Distributed", "Printf"] -git-tree-sha1 = "763a8ceb07833dd51bb9e3bbca372de32c0605ad" +git-tree-sha1 = "8f6bc219586aef8baf0ff9a5fe16ee9c70cb65e4" uuid = "92933f4c-e287-5a05-a399-4b506db050ca" -version = "1.10.0" +version = "1.10.2" [[deps.PtrArrays]] git-tree-sha1 = "f011fbb92c4d401059b2212c05c0601b70f8b759" @@ -2285,11 +2314,29 @@ git-tree-sha1 = "492601870742dcd38f233b23c3ec629628c1d724" uuid = "c0090381-4147-56d7-9ebc-da0b1113ec56" version = "6.7.1+1" +[[deps.Qt6Declarative_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll", "Qt6ShaderTools_jll"] +git-tree-sha1 = "e5dd466bf2569fe08c91a2cc29c1003f4797ac3b" +uuid = "629bc702-f1f5-5709-abd5-49b8460ea067" +version = "6.7.1+2" + +[[deps.Qt6ShaderTools_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll"] +git-tree-sha1 = "1a180aeced866700d4bebc3120ea1451201f16bc" +uuid = "ce943373-25bb-56aa-8eca-768745ed7b5a" +version = "6.7.1+1" + +[[deps.Qt6Wayland_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll", "Qt6Declarative_jll"] +git-tree-sha1 = "729927532d48cf79f49070341e1d918a65aba6b0" +uuid = "e99dba38-086e-5de3-a5b1-6e4c66e897c3" +version = "6.7.1+1" + [[deps.QuadGK]] deps = ["DataStructures", "LinearAlgebra"] -git-tree-sha1 = "9b23c31e76e333e6fb4c1595ae6afa74966a729e" +git-tree-sha1 = "e237232771fdafbae3db5c31275303e056afaa9f" uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" -version = "2.9.4" +version = "2.10.1" [[deps.REPL]] deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] @@ -2306,10 +2353,10 @@ uuid = "74087812-796a-5b5d-8853-05524746bad3" version = "1.7.0" [[deps.RandomNumbers]] -deps = ["Random", "Requires"] -git-tree-sha1 = "043da614cc7e95c703498a491e2c21f58a2b8111" +deps = ["Random"] +git-tree-sha1 = "c6ec94d2aaba1ab2ff983052cf6a606ca5985902" uuid = "e6cf234a-135c-5ec9-84dd-332b85af5143" -version = "1.5.3" +version = "1.6.0" [[deps.RangeArrays]] git-tree-sha1 = "b9039e93773ddcfc828f12aadf7115b4b4d225f5" @@ -2345,10 +2392,10 @@ uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" version = "0.6.12" [[deps.RecursiveArrayTools]] -deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "SparseArrays", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] -git-tree-sha1 = "76a35763102e16c97d7302f5dc67837d24802035" +deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] +git-tree-sha1 = "b034171b93aebc81b3e1890a036d13a9c4a9e3e0" uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" -version = "3.25.0" +version = "3.27.0" [deps.RecursiveArrayTools.extensions] RecursiveArrayToolsFastBroadcastExt = "FastBroadcast" @@ -2356,6 +2403,7 @@ version = "3.25.0" RecursiveArrayToolsMeasurementsExt = "Measurements" RecursiveArrayToolsMonteCarloMeasurementsExt = "MonteCarloMeasurements" RecursiveArrayToolsReverseDiffExt = ["ReverseDiff", "Zygote"] + RecursiveArrayToolsSparseArraysExt = ["SparseArrays"] RecursiveArrayToolsTrackerExt = "Tracker" RecursiveArrayToolsZygoteExt = "Zygote" @@ -2365,6 +2413,7 @@ version = "3.25.0" Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" @@ -2405,9 +2454,9 @@ version = "0.7.1" [[deps.Rmath_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "d483cd324ce5cf5d61b77930f0bbd6cb61927d21" +git-tree-sha1 = "e60724fd3beea548353984dc61c943ecddb0e29a" uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" -version = "0.4.2+0" +version = "0.4.3+0" [[deps.RootSolvers]] deps = ["ForwardDiff"] @@ -2448,10 +2497,10 @@ uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa" version = "0.6.43" [[deps.SciMLBase]] -deps = ["ADTypes", "Accessors", "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 = "281e82f2ae2b73262fed9e7a518711eb7feb7e59" +deps = ["ADTypes", "Accessors", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "Expronicon", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] +git-tree-sha1 = "7f0e208db50f5fee2386b6d8dc9608d580059331" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "2.42.0" +version = "2.48.1" [deps.SciMLBase.extensions] SciMLBaseChainRulesCoreExt = "ChainRulesCore" @@ -2473,16 +2522,17 @@ version = "2.42.0" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [[deps.SciMLOperators]] -deps = ["ArrayInterface", "DocStringExtensions", "LinearAlgebra", "MacroTools", "Setfield", "SparseArrays", "StaticArraysCore"] -git-tree-sha1 = "10499f619ef6e890f3f4a38914481cc868689cd5" +deps = ["ArrayInterface", "DocStringExtensions", "LinearAlgebra", "MacroTools", "Setfield", "StaticArraysCore"] +git-tree-sha1 = "23b02c588ac9a17ecb276cc62ab37f3e4fe37b32" uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" -version = "0.3.8" +version = "0.3.9" +weakdeps = ["SparseArrays"] [[deps.SciMLStructures]] deps = ["ArrayInterface"] -git-tree-sha1 = "cfdd1200d150df1d3c055cc72ee6850742e982d7" +git-tree-sha1 = "20ad3e7c137156c50c93c888d0f2bc5b7883c729" uuid = "53ae85a6-f571-4167-b2af-e1d143709226" -version = "1.4.1" +version = "1.4.2" [[deps.Scratch]] deps = ["Dates"] @@ -2492,9 +2542,9 @@ version = "1.2.1" [[deps.SentinelArrays]] deps = ["Dates", "Random"] -git-tree-sha1 = "6bb314cb1aacfa37ef58e5a0ccf4a1ec0311f495" +git-tree-sha1 = "ff11acffdb082493657550959d4feb4b6149e73a" uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" -version = "1.4.4" +version = "1.4.5" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" @@ -2544,9 +2594,9 @@ version = "1.1.0" [[deps.SimpleNonlinearSolve]] deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "DiffEqBase", "DiffResults", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "MaybeInplace", "PrecompileTools", "Reexport", "SciMLBase", "Setfield", "StaticArraysCore"] -git-tree-sha1 = "58b144f34e44252b2de0acb5a9dbbb7ea5cd75d7" +git-tree-sha1 = "4d7a7c177bcb4c6dc465f09db91bfdb28c578919" uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7" -version = "1.10.1" +version = "1.12.0" [deps.SimpleNonlinearSolve.extensions] SimpleNonlinearSolveChainRulesCoreExt = "ChainRulesCore" @@ -2588,9 +2638,9 @@ version = "1.10.0" [[deps.SparseDiffTools]] deps = ["ADTypes", "Adapt", "ArrayInterface", "Compat", "DataStructures", "FiniteDiff", "ForwardDiff", "Graphs", "LinearAlgebra", "PackageExtensionCompat", "Random", "Reexport", "SciMLOperators", "Setfield", "SparseArrays", "StaticArrayInterface", "StaticArrays", "Tricks", "UnPack", "VertexSafeGraphs"] -git-tree-sha1 = "469f51f8c4741ce944be2c0b65423b518b1405b0" +git-tree-sha1 = "c9e5d7ee75cf6a1ca3a22c9a6a4ef451792cf62b" uuid = "47a9eef4-7e08-11e9-0b38-333d64bd3804" -version = "2.19.0" +version = "2.20.0" [deps.SparseDiffTools.extensions] SparseDiffToolsEnzymeExt = "Enzyme" @@ -2614,9 +2664,9 @@ version = "0.1.2" [[deps.SparseMatrixColorings]] deps = ["ADTypes", "Compat", "DocStringExtensions", "LinearAlgebra", "Random", "SparseArrays"] -git-tree-sha1 = "eed2446b3c3dd58f6ded3168998b8b2cb3fc9229" +git-tree-sha1 = "ad048e784b816e4de5553a13f1daf148412f3dbd" uuid = "0a514795-09f3-496d-8182-132a7b665d35" -version = "0.3.3" +version = "0.3.6" [[deps.Sparspak]] deps = ["Libdl", "LinearAlgebra", "Logging", "OffsetArrays", "Printf", "SparseArrays", "Test"] @@ -2647,16 +2697,16 @@ uuid = "cae243ae-269e-4f55-b966-ac2d0dc13c15" version = "0.1.1" [[deps.Static]] -deps = ["IfElse"] -git-tree-sha1 = "d2fdac9ff3906e27f7a618d47b676941baa6c80c" +deps = ["CommonWorldInvalidations", "IfElse", "PrecompileTools"] +git-tree-sha1 = "87d51a3ee9a4b0d2fe054bdd3fc2436258db2603" uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" -version = "0.8.10" +version = "1.1.1" [[deps.StaticArrayInterface]] -deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "PrecompileTools", "Requires", "SparseArrays", "Static", "SuiteSparse"] -git-tree-sha1 = "8963e5a083c837531298fc41599182a759a87a6d" +deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "PrecompileTools", "Static"] +git-tree-sha1 = "96381d50f1ce85f2663584c8e886a6ca97e60554" uuid = "0d7ed370-da01-4f52-bd93-41d350b8b718" -version = "1.5.1" +version = "1.8.0" weakdeps = ["OffsetArrays", "StaticArrays"] [deps.StaticArrayInterface.extensions] @@ -2753,9 +2803,9 @@ weakdeps = ["ClimaParams"] [[deps.SymbolicIndexingInterface]] deps = ["Accessors", "ArrayInterface", "RuntimeGeneratedFunctions", "StaticArraysCore"] -git-tree-sha1 = "9c490ee01823dc443da25bf9225827e3cdd2d7e9" +git-tree-sha1 = "c9fce29fb41a10677e24f74421ebe31220b81ad0" uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" -version = "0.3.26" +version = "0.3.28" [[deps.TOML]] deps = ["Dates"] @@ -2769,10 +2819,10 @@ uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" version = "1.0.1" [[deps.Tables]] -deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits"] -git-tree-sha1 = "cb76cf677714c095e535e3501ac7954732aeea2d" +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.11.1" +version = "1.12.0" [[deps.Tar]] deps = ["ArgTools", "SHA"] @@ -2801,9 +2851,9 @@ uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [[deps.Thermodynamics]] deps = ["DocStringExtensions", "KernelAbstractions", "Random", "RootSolvers"] -git-tree-sha1 = "deac04ad36638b10fde82470d5f128419f627e9a" +git-tree-sha1 = "80b13ddc5ae7b8605ef5a055e7f23c5b5f4775cf" uuid = "b60c26fb-14c3-4610-9d3e-2d17fe7ff00c" -version = "0.12.6" +version = "0.12.7" weakdeps = ["ClimaParams"] [deps.Thermodynamics.extensions] @@ -2828,13 +2878,9 @@ uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" version = "0.5.24" [[deps.TranscodingStreams]] -git-tree-sha1 = "60df3f8126263c0d6b357b9a1017bb94f53e3582" +git-tree-sha1 = "e84b3a11b9bece70d14cce63406bbc79ed3464d2" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" -version = "0.11.0" -weakdeps = ["Random", "Test"] - - [deps.TranscodingStreams.extensions] - TestExt = ["Test", "Random"] +version = "0.11.2" [[deps.Transducers]] deps = ["Adapt", "ArgCheck", "BangBang", "Baselet", "CompositionsBase", "ConstructionBase", "DefineSingletons", "Distributed", "InitialValues", "Logging", "Markdown", "MicroCollections", "Requires", "Setfield", "SplittablesBase", "Tables"] @@ -2863,9 +2909,9 @@ uuid = "d5829a12-d9aa-46ab-831f-fb7c9ab06edf" version = "0.2.1" [[deps.Tricks]] -git-tree-sha1 = "eae1bb484cd63b36999ee58be2de6c178105112f" +git-tree-sha1 = "7822b97e99a1672bfb1b49b668a6d46d58d8cbcb" uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" -version = "0.1.8" +version = "0.1.9" [[deps.TriplotBase]] git-tree-sha1 = "4d4ed7f294cda19382ff7de4c137d24d16adc89b" @@ -2903,9 +2949,9 @@ version = "0.4.1" [[deps.Unitful]] deps = ["Dates", "LinearAlgebra", "Random"] -git-tree-sha1 = "dd260903fdabea27d9b6021689b3cd5401a57748" +git-tree-sha1 = "d95fe458f26209c66a187b1114df96fd70839efd" uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" -version = "1.20.0" +version = "1.21.0" weakdeps = ["ConstructionBase", "InverseFunctions"] [deps.Unitful.extensions] @@ -2936,9 +2982,9 @@ version = "0.2.1" [[deps.UnsafeAtomicsLLVM]] deps = ["LLVM", "UnsafeAtomics"] -git-tree-sha1 = "bf2c553f25e954a9b38c9c0593a59bb13113f9e5" +git-tree-sha1 = "4073c836c2befcb041e5fe306cb6abf621eb3140" uuid = "d80eeb9a-aca5-4d75-85e5-170c8b632249" -version = "0.1.5" +version = "0.2.0" [[deps.Unzip]] git-tree-sha1 = "ca0969166a028236229f63514992fc073799bb78" @@ -3246,6 +3292,12 @@ deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" version = "5.8.0+1" +[[deps.libdecor_jll]] +deps = ["Artifacts", "Dbus_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pango_jll", "Wayland_jll", "xkbcommon_jll"] +git-tree-sha1 = "9bf7903af251d2050b467f76bdbe57ce541f7f4f" +uuid = "1183f4f0-6f2a-5f1a-908b-139f9cdfea6f" +version = "0.2.2+0" + [[deps.libevdev_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "141fe65dc3efabb0b1d5ba74e91f6ad26f84cc22" @@ -3278,9 +3330,9 @@ version = "1.10.3+0" [[deps.libvorbis_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll", "Pkg"] -git-tree-sha1 = "b910cb81ef3fe6e78bf6acee440bda86fd6ae00c" +git-tree-sha1 = "490376214c4721cdaca654041f635213c6165cb3" uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" -version = "1.3.7+1" +version = "1.3.7+2" [[deps.libzip_jll]] deps = ["Artifacts", "Bzip2_jll", "GnuTLS_jll", "JLLWrappers", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"] diff --git a/experiments/benchmarks/land.jl b/experiments/benchmarks/land.jl index 85368220be..579996c8a8 100644 --- a/experiments/benchmarks/land.jl +++ b/experiments/benchmarks/land.jl @@ -603,7 +603,7 @@ function setup_simulation(; greet = false) Δt = 900.0 nelements = (101, 15) if greet - @info "Run: Global RichardsModel" + @info "Run: Global Land Model" @info "Resolution: $nelements" @info "Timestep: $Δt s" @info "Duration: $(tf - t0) s" @@ -612,12 +612,12 @@ function setup_simulation(; greet = false) prob, cb = setup_prob(t0, tf, Δt; nelements) # Define timestepper and ODE algorithm - stepper = CTS.ARS343() + stepper = CTS.ARS111() ode_algo = CTS.IMEXAlgorithm( stepper, CTS.NewtonsMethod( - max_iters = 1, - update_j = CTS.UpdateEvery(CTS.NewTimeStep), + max_iters = 6, + update_j = CTS.UpdateEvery(CTS.NewNewtonIteration), ), ) return prob, ode_algo, Δt, cb @@ -629,7 +629,7 @@ SciMLBase.solve(prob, ode_algo; dt = Δt, callback = cb) @info "Starting profiling" # Stop when we profile for MAX_PROFILING_TIME_SECONDS or MAX_PROFILING_SAMPLES -MAX_PROFILING_TIME_SECONDS = 1000 +MAX_PROFILING_TIME_SECONDS = 500 MAX_PROFILING_SAMPLES = 100 time_now = time() timings_s = Float64[] diff --git a/experiments/integrated/fluxnet/US-Ha1/US-Ha1_simulation.jl b/experiments/integrated/fluxnet/US-Ha1/US-Ha1_simulation.jl index 6afcd4670d..0241f7f925 100644 --- a/experiments/integrated/fluxnet/US-Ha1/US-Ha1_simulation.jl +++ b/experiments/integrated/fluxnet/US-Ha1/US-Ha1_simulation.jl @@ -20,7 +20,4 @@ h_stem = FT(14) # m t0 = Float64(120 * 3600 * 24)# start mid year to avoid snow # Time step size: -dt = Float64(40) - -# Number of timesteps between saving output: -n = 45 +dt = Float64(450) diff --git a/experiments/integrated/fluxnet/US-MOz/US-MOz_simulation.jl b/experiments/integrated/fluxnet/US-MOz/US-MOz_simulation.jl index b229ab5024..6299ab1d63 100644 --- a/experiments/integrated/fluxnet/US-MOz/US-MOz_simulation.jl +++ b/experiments/integrated/fluxnet/US-MOz/US-MOz_simulation.jl @@ -20,7 +20,4 @@ h_leaf = FT(9.5) # m t0 = Float64(120 * 3600 * 24)# start mid year to avoid snow # Time step size: -dt = Float64(450) - -# Number of timesteps between saving output: -n = 4 +dt = Float64(900) diff --git a/experiments/integrated/fluxnet/US-NR1/US-NR1_simulation.jl b/experiments/integrated/fluxnet/US-NR1/US-NR1_simulation.jl index e27c0b4827..644b836bfa 100644 --- a/experiments/integrated/fluxnet/US-NR1/US-NR1_simulation.jl +++ b/experiments/integrated/fluxnet/US-NR1/US-NR1_simulation.jl @@ -20,7 +20,4 @@ h_stem = FT(7.5) # m t0 = Float64(120 * 3600 * 24)# start mid year to avoid snow # Time step size: -dt = Float64(40) - -# Number of timesteps between saving output: -n = 45 +dt = Float64(450) diff --git a/experiments/integrated/fluxnet/US-Var/US-Var_simulation.jl b/experiments/integrated/fluxnet/US-Var/US-Var_simulation.jl index 1ba85752a1..563cf22bc6 100644 --- a/experiments/integrated/fluxnet/US-Var/US-Var_simulation.jl +++ b/experiments/integrated/fluxnet/US-Var/US-Var_simulation.jl @@ -20,7 +20,4 @@ h_stem = FT(0) # m t0 = Float64(21 * 3600 * 24)# start day 21 of the year # Time step size: -dt = Float64(20) - -# Number of timesteps between saving output: -n = 45 +dt = Float64(900) diff --git a/experiments/integrated/fluxnet/fluxnet_simulation.jl b/experiments/integrated/fluxnet/fluxnet_simulation.jl index 818e9af174..cdf16b8c90 100644 --- a/experiments/integrated/fluxnet/fluxnet_simulation.jl +++ b/experiments/integrated/fluxnet/fluxnet_simulation.jl @@ -6,14 +6,15 @@ N_spinup_days = 30 N_days = N_spinup_days + 30 tf = Float64(t0 + 3600 * 24 * N_days) t_spinup = Float64(t0 + N_spinup_days * 3600 * 24) -saveat = Array(t_spinup:(n * dt):tf) +dt_save = 3600.0 +saveat = Array(t_spinup:dt_save:tf) # Set up timestepper -timestepper = CTS.ARS343(); +timestepper = CTS.ARS111(); ode_algo = CTS.IMEXAlgorithm( timestepper, CTS.NewtonsMethod( - max_iters = 1, + max_iters = 6, update_j = CTS.UpdateEvery(CTS.NewNewtonIteration), ), ); diff --git a/experiments/integrated/fluxnet/ozark_pft.jl b/experiments/integrated/fluxnet/ozark_pft.jl index 92f5ba968b..24d4ed7c04 100644 --- a/experiments/integrated/fluxnet/ozark_pft.jl +++ b/experiments/integrated/fluxnet/ozark_pft.jl @@ -347,7 +347,7 @@ num_days = N_days - N_spinup_days # Time series of model and data outputs data_times = [0:DATA_DT:(num_days * S_PER_DAY);] -model_times = [0:(n * dt):(num_days * S_PER_DAY);] +model_times = [0:dt_save:(num_days * S_PER_DAY);] # Plot model diurnal cycles without data comparisons # Autotrophic Respiration @@ -356,7 +356,15 @@ AR = parent(sv.saveval[k].canopy.autotrophic_respiration.Ra)[1] for k in 1:length(sv.saveval) ] .* 1e6 -plot_daily_avg("AutoResp", AR, dt * n, num_days, "μmol/m^2/s", savedir, "Model") +plot_daily_avg( + "AutoResp", + AR, + dt_save, + num_days, + "μmol/m^2/s", + savedir, + "Model", +) # Plot all comparisons of model diurnal cycles to data diurnal cycles # GPP @@ -370,7 +378,7 @@ if drivers.GPP.status == absent plot_daily_avg( "GPP", model_GPP, - dt * n, + dt_save, num_days, "μmol/m^2/s", savedir, @@ -382,7 +390,7 @@ else plot_avg_comp( "GPP", model_GPP, - dt * n, + dt_save, GPP_data, FT(DATA_DT), num_days, @@ -397,7 +405,7 @@ if drivers.SW_OUT.status == absent plot_daily_avg( "SW OUT", SW_out_model, - dt * n, + dt_save, num_days, "w/m^2", savedir, @@ -410,7 +418,7 @@ else plot_avg_comp( "SW OUT", SW_out_model, - dt * n, + dt_save, SW_out_data, FT(DATA_DT), num_days, @@ -425,7 +433,7 @@ if drivers.LW_OUT.status == absent plot_daily_avg( "LW OUT", LW_out_model, - dt * n, + dt_save, num_days, "w/m^2", savedir, @@ -438,7 +446,7 @@ else plot_avg_comp( "LW OUT", LW_out_model, - dt * n, + dt_save, LW_out_data, FT(DATA_DT), num_days, @@ -460,7 +468,15 @@ E = ] .* (1e3 * 24 * 3600) ET_model = T .+ E if drivers.LE.status == absent - plot_daily_avg("ET", ET_model, dt * n, num_days, "mm/day", savedir, "Model") + plot_daily_avg( + "ET", + ET_model, + dt_save, + num_days, + "mm/day", + savedir, + "Model", + ) else measured_T = drivers.LE.values ./ (LP.LH_v0(earth_param_set) * 1000) .* @@ -469,7 +485,7 @@ else plot_avg_comp( "ET", ET_model, - dt * n, + dt_save, ET_data, FT(DATA_DT), num_days, @@ -489,7 +505,7 @@ if drivers.H.status == absent plot_daily_avg( "SHF", SHF_model, - dt * n, + dt_save, num_days, "w/m^2", savedir, @@ -500,7 +516,7 @@ else plot_avg_comp( "SHF", SHF_model, - dt * n, + dt_save, SHF_data, FT(DATA_DT), N_days - N_spinup_days, @@ -517,13 +533,13 @@ LHF_canopy = [parent(sv.saveval[k].canopy.energy.lhf)[1] for k in 1:length(sol.t)] LHF_model = LHF_soil + LHF_canopy if drivers.LE.status == absent - plot_daily_avg("LHF", LHF_model, dt * n, num_days, "w/m^2", savedir) + plot_daily_avg("LHF", LHF_model, dt_save, num_days, "w/m^2", savedir) else LHF_data = drivers.LE.values[Int64(t_spinup ÷ DATA_DT):Int64(tf ÷ DATA_DT)] plot_avg_comp( "LHF", LHF_model, - dt * n, + dt_save, LHF_data, FT(DATA_DT), N_days - N_spinup_days, diff --git a/experiments/integrated/fluxnet/run_fluxnet.jl b/experiments/integrated/fluxnet/run_fluxnet.jl index 1dfc7cd645..5893d62a68 100644 --- a/experiments/integrated/fluxnet/run_fluxnet.jl +++ b/experiments/integrated/fluxnet/run_fluxnet.jl @@ -291,7 +291,7 @@ num_days = N_days - N_spinup_days # Time series of model and data outputs data_times = [0:DATA_DT:(num_days * S_PER_DAY);] -model_times = [0:(n * dt):(num_days * S_PER_DAY);] +model_times = [0:dt_save:(num_days * S_PER_DAY);] # Plot model diurnal cycles without data comparisons # Autotrophic Respiration @@ -300,7 +300,15 @@ AR = parent(sv.saveval[k].canopy.autotrophic_respiration.Ra)[1] for k in 1:length(sv.saveval) ] .* 1e6 -plot_daily_avg("AutoResp", AR, dt * n, num_days, "μmol/m^2/s", savedir, "Model") +plot_daily_avg( + "AutoResp", + AR, + dt_save, + num_days, + "μmol/m^2/s", + savedir, + "Model", +) # Plot all comparisons of model diurnal cycles to data diurnal cycles # GPP @@ -314,7 +322,7 @@ if drivers.GPP.status == absent plot_daily_avg( "GPP", model_GPP, - dt * n, + dt_save, num_days, "μmol/m^2/s", savedir, @@ -326,7 +334,7 @@ else plot_avg_comp( "GPP", model_GPP, - dt * n, + dt_save, GPP_data, FT(DATA_DT), num_days, @@ -341,7 +349,7 @@ if drivers.SW_OUT.status == absent plot_daily_avg( "SW OUT", SW_out_model, - dt * n, + dt_save, num_days, "w/m^2", savedir, @@ -354,7 +362,7 @@ else plot_avg_comp( "SW OUT", SW_out_model, - dt * n, + dt_save, SW_out_data, FT(DATA_DT), num_days, @@ -369,7 +377,7 @@ if drivers.LW_OUT.status == absent plot_daily_avg( "LW OUT", LW_out_model, - dt * n, + dt_save, num_days, "w/m^2", savedir, @@ -382,7 +390,7 @@ else plot_avg_comp( "LW OUT", LW_out_model, - dt * n, + dt_save, LW_out_data, FT(DATA_DT), num_days, @@ -404,7 +412,15 @@ E = ] .* (1e3 * 24 * 3600) ET_model = T .+ E if drivers.LE.status == absent - plot_daily_avg("ET", ET_model, dt * n, num_days, "mm/day", savedir, "Model") + plot_daily_avg( + "ET", + ET_model, + dt_save, + num_days, + "mm/day", + savedir, + "Model", + ) else measured_T = drivers.LE.values ./ (LP.LH_v0(earth_param_set) * 1000) .* @@ -413,7 +429,7 @@ else plot_avg_comp( "ET", ET_model, - dt * n, + dt_save, ET_data, FT(DATA_DT), num_days, @@ -433,7 +449,7 @@ if drivers.H.status == absent plot_daily_avg( "SHF", SHF_model, - dt * n, + dt_save, num_days, "w/m^2", savedir, @@ -444,7 +460,7 @@ else plot_avg_comp( "SHF", SHF_model, - dt * n, + dt_save, SHF_data, FT(DATA_DT), N_days - N_spinup_days, @@ -461,13 +477,13 @@ LHF_canopy = [parent(sv.saveval[k].canopy.energy.lhf)[1] for k in 1:length(sol.t)] LHF_model = LHF_soil + LHF_canopy if drivers.LE.status == absent - plot_daily_avg("LHF", LHF_model, dt * n, num_days, "w/m^2", savedir) + plot_daily_avg("LHF", LHF_model, dt_save, num_days, "w/m^2", savedir) else LHF_data = drivers.LE.values[Int64(t_spinup ÷ DATA_DT):Int64(tf ÷ DATA_DT)] plot_avg_comp( "LHF", LHF_model, - dt * n, + dt_save, LHF_data, FT(DATA_DT), N_days - N_spinup_days, diff --git a/experiments/integrated/performance/profile_allocations.jl b/experiments/integrated/performance/profile_allocations.jl index 0236b9248f..075f59b162 100644 --- a/experiments/integrated/performance/profile_allocations.jl +++ b/experiments/integrated/performance/profile_allocations.jl @@ -331,15 +331,15 @@ imp_tendency! = make_imp_tendency(land); jacobian! = make_jacobian(land); # Set up timestepping and simulation callbacks -dt = Float64(150) +dt = Float64(900) tf = Float64(t0 + 100dt) saveat = Array(t0:dt:tf) updateat = Array(t0:dt:tf) -timestepper = CTS.ARS343() +timestepper = CTS.ARS111() ode_algo = CTS.IMEXAlgorithm( timestepper, CTS.NewtonsMethod( - max_iters = 1, + max_iters = 6, update_j = CTS.UpdateEvery(CTS.NewNewtonIteration), ), ); diff --git a/experiments/long_runs/land.jl b/experiments/long_runs/land.jl index f9a79ce126..826036dea2 100644 --- a/experiments/long_runs/land.jl +++ b/experiments/long_runs/land.jl @@ -10,9 +10,9 @@ # Soil depth: 50 m # Simulation duration: 365 d # Timestep: 900 s -# Timestepper: ARS343 -# Fixed number of iterations: 1 -# Jacobian update: every new timestep +# Timestepper: ARS111 +# Fixed number of iterations: 6 +# Jacobian update: every new Newton iteration # Atmos forcing update: every 3 hours import SciMLBase import ClimaComms @@ -363,7 +363,7 @@ function setup_prob(t0, tf, Δt; outdir = outdir, nelements = (101, 15)) τ_NIR_leaf = FT(0.25) # Energy Balance model - ac_canopy = FT(2.5e4) # this will likely be 10x smaller! + ac_canopy = FT(2.5e3) # Conductance Model g1 = FT(141) # Wang et al: 141 sqrt(Pa) for Medlyn model; Natan used 300. @@ -631,12 +631,12 @@ function setup_and_solve_problem(; greet = false) prob, cb = setup_prob(t0, tf, Δt; nelements) # Define timestepper and ODE algorithm - stepper = CTS.ARS343() + stepper = CTS.ARS111() ode_algo = CTS.IMEXAlgorithm( stepper, CTS.NewtonsMethod( - max_iters = 1, - update_j = CTS.UpdateEvery(CTS.NewTimeStep), + max_iters = 6, + update_j = CTS.UpdateEvery(CTS.NewNewtonIteration), ), ) SciMLBase.solve(prob, ode_algo; dt = Δt, callback = cb, adaptive = false) diff --git a/experiments/standalone/Vegetation/timestep_test.jl b/experiments/standalone/Vegetation/timestep_test.jl new file mode 100644 index 0000000000..255348abf0 --- /dev/null +++ b/experiments/standalone/Vegetation/timestep_test.jl @@ -0,0 +1,249 @@ +import SciMLBase +import ClimaComms +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends +using CairoMakie +using Statistics +using Dates +using Insolation + +# Load CliMA Packages and ClimaLand Modules: + +using ClimaCore +import ClimaParams as CP +import ClimaTimeSteppers as CTS +using StaticArrays +using ClimaLand +using ClimaLand.Domains: Point +using ClimaLand.Canopy +using ClimaLand.Canopy.PlantHydraulics +import ClimaLand +import ClimaLand.Parameters as LP +const FT = Float32; +earth_param_set = LP.LandParameters(FT); +f_root_to_shoot = FT(3.5) +plant_ν = FT(2.46e-4) # kg/m^2 +n_stem = Int64(1) +n_leaf = Int64(1) +h_leaf = FT(9.5) +h_stem = FT(9) +compartment_midpoints = [h_stem / 2, h_stem + h_leaf / 2] +compartment_surfaces = [FT(0), h_stem, h_stem + h_leaf] +land_domain = Point(; z_sfc = FT(0.0)) +include( + joinpath(pkgdir(ClimaLand), "experiments/integrated/fluxnet/data_tools.jl"), +); +time_offset = 7 +lat = FT(38.7441) # degree +long = FT(-92.2000) # degree +atmos_h = FT(32) +site_ID = "US-MOz" +data_link = "https://caltech.box.com/shared/static/7r0ci9pacsnwyo0o9c25mhhcjhsu6d72.csv" + +include( + joinpath( + pkgdir(ClimaLand), + "experiments/integrated/fluxnet/met_drivers_FLUXNET.jl", + ), +); + +z0_m = FT(2) +z0_b = FT(0.2) + +shared_params = SharedCanopyParameters{FT, typeof(earth_param_set)}( + z0_m, + z0_b, + earth_param_set, +); +ψ_soil0 = FT(0.0) + +soil_driver = PrescribedSoil( + FT; + root_depths = SVector{10, FT}(-(10:-1:1.0) ./ 10.0 * 2.0 .+ 0.2 / 2.0), + ψ = t -> ψ_soil0, + α_PAR = FT(0.2), + α_NIR = FT(0.4), + T = t -> 298.0, + ϵ = FT(0.99), +); + +rt_params = TwoStreamParameters( + FT; + G_Function = ConstantGFunction(FT(0.5)), + α_PAR_leaf = FT(0.1), + α_NIR_leaf = FT(0.45), + τ_PAR_leaf = FT(0.05), + τ_NIR_leaf = FT(0.25), + Ω = FT(0.69), + λ_γ_PAR = FT(5e-7), + λ_γ_NIR = FT(1.65e-6), +) + +rt_model = TwoStreamModel{FT}(rt_params); + +cond_params = MedlynConductanceParameters(FT; g1 = FT(141.0)) + +stomatal_model = MedlynConductanceModel{FT}(cond_params); + + +photo_params = FarquharParameters(FT, Canopy.C3(); Vcmax25 = FT(5e-5)) + +photosynthesis_model = FarquharModel{FT}(photo_params); + +AR_params = AutotrophicRespirationParameters(FT) +AR_model = AutotrophicRespirationModel{FT}(AR_params); + +f_root_to_shoot = FT(3.5) +SAI = FT(1.0) +RAI = FT(3 * f_root_to_shoot) +ai_parameterization = PrescribedSiteAreaIndex{FT}(LAIfunction, SAI, RAI) + +function root_distribution(z::T) where {T} + rooting_depth = T(1.0) + return T(1.0 / rooting_depth) * exp(z / T(rooting_depth)) +end; + +K_sat_plant = FT(1.8e-6) +ψ63 = FT(-4 / 0.0098) +Weibull_param = FT(4) +a = FT(0.05 * 0.0098) + +conductivity_model = + PlantHydraulics.Weibull{FT}(K_sat_plant, ψ63, Weibull_param) + +retention_model = PlantHydraulics.LinearRetentionCurve{FT}(a); + +ν = FT(0.7) +S_s = FT(1e-2 * 0.0098) + +plant_hydraulics_ps = PlantHydraulics.PlantHydraulicsParameters(; + ai_parameterization = ai_parameterization, + ν = ν, + S_s = S_s, + root_distribution = root_distribution, + conductivity_model = conductivity_model, + retention_model = retention_model, +); + + +plant_hydraulics = PlantHydraulics.PlantHydraulicsModel{FT}(; + parameters = plant_hydraulics_ps, + n_stem = n_stem, + n_leaf = n_leaf, + compartment_surfaces = compartment_surfaces, + compartment_midpoints = compartment_midpoints, +); + +energy_model = ClimaLand.Canopy.BigLeafEnergyModel{FT}( + BigLeafEnergyParameters{FT}(FT(1e3)), +) + +canopy = ClimaLand.Canopy.CanopyModel{FT}(; + parameters = shared_params, + domain = land_domain, + autotrophic_respiration = AR_model, + radiative_transfer = rt_model, + photosynthesis = photosynthesis_model, + conductance = stomatal_model, + energy = energy_model, + hydraulics = plant_hydraulics, + soil_driver = soil_driver, + atmos = atmos, + radiation = radiation, +); + + +Y, p, coords = ClimaLand.initialize(canopy) +exp_tendency! = make_exp_tendency(canopy) +imp_tendency! = make_imp_tendency(canopy) +jacobian! = make_jacobian(canopy); +jac_kwargs = + (; jac_prototype = ClimaLand.ImplicitEquationJacobian(Y), Wfact = jacobian!); + + +ψ_leaf_0 = FT(-2e5 / 9800) +ψ_stem_0 = FT(-1e5 / 9800) + +S_l_ini = + inverse_water_retention_curve.( + retention_model, + [ψ_stem_0, ψ_leaf_0], + ν, + S_s, + ) + +Y.canopy.hydraulics.ϑ_l.:1 .= augmented_liquid_fraction.(ν, S_l_ini[1]) +Y.canopy.hydraulics.ϑ_l.:2 .= augmented_liquid_fraction.(ν, S_l_ini[2]) + + + +t0 = 150 * 3600 * 24.0 +N_days = 100 +tf = t0 + 3600 * 24 * N_days +evaluate!(Y.canopy.energy.T, atmos.T, t0) +set_initial_cache! = make_set_initial_cache(canopy) +set_initial_cache!(p, Y, t0); + +saveat = Array(t0:(3 * 3600):tf) +updateat = Array(t0:(3600 * 3):tf) +drivers = ClimaLand.get_drivers(canopy) +updatefunc = ClimaLand.make_update_drivers(drivers) +cb = ClimaLand.DriverUpdateCallback(updateat, updatefunc) + +timestepper = CTS.ARS111(); +ode_algo = CTS.IMEXAlgorithm( + timestepper, + CTS.NewtonsMethod( + max_iters = 6, + update_j = CTS.UpdateEvery(CTS.NewNewtonIteration), + ), +); + +prob = SciMLBase.ODEProblem( + CTS.ClimaODEFunction( + T_exp! = exp_tendency!, + T_imp! = SciMLBase.ODEFunction(imp_tendency!; jac_kwargs...), + dss! = ClimaLand.dss!, + ), + Y, + (t0, tf), + p, +); + +ref_dt = 6.0 +ref_sol = + SciMLBase.solve(prob, ode_algo; dt = ref_dt, callback = cb, saveat = saveat); +ref_T = [parent(ref_sol.u[k].canopy.energy.T)[1] for k in 1:length(ref_sol.t)] +mean_err = [] +p95_err = [] +p99_err = [] +dts = [225.0, 450.0, 900.0, 1800.0, 3600.0] +for dt in dts + saveat = Array(t0:(3 * 3600):tf) + evaluate!(Y.canopy.energy.T, atmos.T, t0) + updateat = Array(t0:(3600 * 3):tf) + updatefunc = ClimaLand.make_update_drivers(drivers) + cb = ClimaLand.DriverUpdateCallback(updateat, updatefunc) + + @time sol = + SciMLBase.solve(prob, ode_algo; dt = dt, callback = cb, saveat = saveat) + T = [parent(sol.u[k].canopy.energy.T)[1] for k in 1:length(sol.t)] + ΔT = abs.(T .- ref_T) + push!(mean_err, mean(ΔT)) + push!(p95_err, percentile(ΔT, 95)) + push!(p99_err, percentile(ΔT, 99)) +end +savedir = joinpath(pkgdir(ClimaLand), "experiments/standalone/Vegetation"); +fig = Figure() +ax = Axis( + fig[1, 1], + xlabel = "Time (minutes)", + ylabel = "Temperature (K)", + xscale = log10, + yscale = log10, +) +dts = dts ./ 60 +lines!(ax, dts, FT.(mean_err), label = "Mean Error") +lines!(ax, dts, FT.(p95_err), label = "95th% Error") +lines!(ax, dts, FT.(p99_err), label = "99th% Error") +axislegend(ax) +save(joinpath(savedir, "errors.png"), fig) diff --git a/src/shared_utilities/implicit_timestepping.jl b/src/shared_utilities/implicit_timestepping.jl index 8ed224df1c..35d0bf4666 100644 --- a/src/shared_utilities/implicit_timestepping.jl +++ b/src/shared_utilities/implicit_timestepping.jl @@ -1,5 +1,6 @@ using ClimaCore.MatrixFields import ClimaCore.MatrixFields: @name, ⋅ +using ClimaCore: Spaces import LinearAlgebra import LinearAlgebra: I @@ -107,53 +108,63 @@ to the `explicit_names` tuple. """ function ImplicitEquationJacobian(Y::ClimaCore.Fields.FieldVector) FT = eltype(Y) - center_space = axes(Y.soil.ϑ_l) - - # Construct a tridiagonal matrix that will be used as the Jacobian - tridiag_type = MatrixFields.TridiagonalMatrixRow{FT} - # Create a field containing a `TridiagonalMatrixRow` at each point - tridiag_field = Fields.Field(tridiag_type, center_space) - fill!(parent(tridiag_field), NaN) - # Only add jacobian blocks for fields that are in Y for this model - is_in_Y(name) = MatrixFields.has_field(Y, name) + is_in_Y(var) = MatrixFields.has_field(Y, var) # Define the implicit and explicit variables of any model we use - implicit_names = (@name(soil.ϑ_l), @name(soil.ρe_int)) - explicit_names = ( + implicit_vars = + (@name(soil.ϑ_l), @name(soil.ρe_int), @name(canopy.energy.T)) + explicit_vars = ( @name(soilco2.C), @name(soil.θ_i), @name(canopy.hydraulics.ϑ_l), - @name(canopy.energy.T), @name(snow.S), @name(snow.U) ) # Filter out the variables that are not in this model's state, `Y` - available_implicit_names = - MatrixFields.unrolled_filter(is_in_Y, implicit_names) - available_explicit_names = - MatrixFields.unrolled_filter(is_in_Y, explicit_names) + available_implicit_vars = + MatrixFields.unrolled_filter(is_in_Y, implicit_vars) + available_explicit_vars = + MatrixFields.unrolled_filter(is_in_Y, explicit_vars) + + get_jac_type( + space::Union{ + Spaces.FiniteDifferenceSpace, + Spaces.ExtrudedFiniteDifferenceSpace, + }, + FT, + ) = MatrixFields.TridiagonalMatrixRow{FT} + get_jac_type( + space::Union{Spaces.PointSpace, Spaces.SpectralElementSpace2D}, + FT, + ) = MatrixFields.DiagonalMatrixRow{FT} + + function get_j_field(space, FT) + jac_type = get_jac_type(space, FT) + # Create a field containing a `TridiagonalMatrixRow` at each point + field = ClimaCore.Fields.Field(jac_type, space) + fill!(parent(field), 0) + return field + end + implicit_blocks = MatrixFields.unrolled_map( + var -> + (var, var) => + get_j_field(axes(MatrixFields.get_field(Y, var)), FT), + available_implicit_vars, + ) # For explicitly-stepped variables, use the negative identity matrix # Note: We have to use FT(-1) * I instead of -I because inv(-1) == -1.0, # which means that multiplying inv(-1) by a Float32 will yield a Float64. - identity_blocks = MatrixFields.unrolled_map( - name -> (name, name) => FT(-1) * I, - available_explicit_names, + explicit_blocks = MatrixFields.unrolled_map( + var -> (var, var) => FT(-1) * I, + available_explicit_vars, ) - # For implicitly-stepped variables, use a tridiagonal matrix - tridiagonal_blocks = MatrixFields.unrolled_map( - name -> - (name, name) => Fields.Field( - tridiag_type, - axes(MatrixFields.get_field(Y, name)), - ), - available_implicit_names, - ) - matrix = MatrixFields.FieldMatrix(identity_blocks..., tridiagonal_blocks...) + + matrix = MatrixFields.FieldMatrix(implicit_blocks..., explicit_blocks...) # Set up block diagonal solver for block Jacobian alg = MatrixFields.BlockDiagonalSolve() diff --git a/src/standalone/Vegetation/Canopy.jl b/src/standalone/Vegetation/Canopy.jl index 41dd15ea71..c2cf9559cd 100644 --- a/src/standalone/Vegetation/Canopy.jl +++ b/src/standalone/Vegetation/Canopy.jl @@ -3,6 +3,9 @@ using DocStringExtensions using Thermodynamics using ClimaLand using ClimaCore +using ClimaCore.MatrixFields +import ClimaCore.MatrixFields: @name, ⋅ +import LinearAlgebra: I using ClimaLand: AbstractRadiativeDrivers, AbstractAtmosphericDrivers import ..Parameters as LP @@ -20,6 +23,8 @@ import ClimaLand: make_update_boundary_fluxes, make_update_aux, make_compute_exp_tendency, + make_compute_imp_tendency, + make_compute_jacobian, get_drivers using ClimaLand.Domains: Point, Plane, SphericalSurface @@ -627,6 +632,68 @@ function make_compute_exp_tendency( end return compute_exp_tendency! end + +""" + make_compute_imp_tendency(canopy::CanopyModel) + +Creates and returns the compute_imp_tendency! for the `CanopyModel`. +""" +function make_compute_imp_tendency( + canopy::CanopyModel{ + FT, + <:AutotrophicRespirationModel, + <:Union{BeerLambertModel, TwoStreamModel}, + <:Union{FarquharModel, OptimalityFarquharModel}, + <:MedlynConductanceModel, + <:PlantHydraulicsModel, + <:Union{PrescribedCanopyTempModel, BigLeafEnergyModel}, + }, +) where {FT} + components = canopy_components(canopy) + compute_imp_tendency_list = map( + x -> make_compute_imp_tendency(getproperty(canopy, x), canopy), + components, + ) + function compute_imp_tendency!(dY, Y, p, t) + for f! in compute_imp_tendency_list + f!(dY, Y, p, t) + end + + end + return compute_imp_tendency! +end + +""" + ClimaLand.make_compute_jacobian(canopy::CanopyModel) + +Creates and returns the compute_jacobian! for the `CanopyModel`. +""" +function ClimaLand.make_compute_jacobian( + canopy::CanopyModel{ + FT, + <:AutotrophicRespirationModel, + <:Union{BeerLambertModel, TwoStreamModel}, + <:Union{FarquharModel, OptimalityFarquharModel}, + <:MedlynConductanceModel, + <:PlantHydraulicsModel, + <:Union{PrescribedCanopyTempModel, BigLeafEnergyModel}, + }, +) where {FT} + components = canopy_components(canopy) + update_jacobian_list = map( + x -> make_compute_jacobian(getproperty(canopy, x), canopy), + components, + ) + function compute_jacobian!(W, Y, p, dtγ, t) + for f! in update_jacobian_list + f!(W, Y, p, dtγ, t) + end + + end + return compute_jacobian! +end + + function ClimaLand.get_drivers(model::CanopyModel) return (model.atmos, model.radiation) end diff --git a/src/standalone/Vegetation/canopy_boundary_fluxes.jl b/src/standalone/Vegetation/canopy_boundary_fluxes.jl index 9ee9518227..314bd15ce4 100644 --- a/src/standalone/Vegetation/canopy_boundary_fluxes.jl +++ b/src/standalone/Vegetation/canopy_boundary_fluxes.jl @@ -173,7 +173,8 @@ function canopy_boundary_fluxes!( shf .= canopy_tf.shf lhf .= canopy_tf.lhf r_ae .= canopy_tf.r_ae - + p.canopy.energy.∂LHF∂qc .= canopy_tf.∂LHF∂qc + p.canopy.energy.∂SHF∂Tc .= canopy_tf.∂SHF∂Tc # Transpiration is per unit ground area, not leaf area (mult by LAI) fa.:($i_end) .= PlantHydraulics.transpiration_per_ground_area( canopy.hydraulics.transpiration, @@ -334,7 +335,7 @@ function canopy_turbulent_fluxes_at_a_point( T_in::FT = Thermodynamics.air_temperature(thermo_params, ts_in) ΔT = T_in - T_sfc r_ae::FT = 1 / (conditions.Ch * SurfaceFluxes.windspeed(sc)) - ρ_air::FT = Thermodynamics.air_density(thermo_params, ts_in) + ρ_sfc::FT = Thermodynamics.air_density(thermo_params, ts_sfc) ustar::FT = conditions.ustar r_b::FT = FT(1 / 0.01 * (ustar / 0.04)^(-1 / 2)) # CLM 5, tech note Equation 5.122 leaf_r_b = r_b / LAI @@ -342,7 +343,17 @@ function canopy_turbulent_fluxes_at_a_point( E0::FT = SurfaceFluxes.evaporation(surface_flux_params, sc, conditions.Ch) E = E0 * r_ae / (leaf_r_b + leaf_r_stomata + r_ae) # CLM 5, tech note Equation 5.101, and fig 5.2b, assuming all sunlit, f_wet = 0 Ẽ = E / _ρ_liq - H = -ρ_air * cp_m * ΔT / (canopy_r_b + r_ae) # CLM 5, tech note Equation 5.88, setting H_v = H and solving to remove T_s + H = -ρ_sfc * cp_m * ΔT / (canopy_r_b + r_ae) # CLM 5, tech note Equation 5.88, setting H_v = H and solving to remove T_s LH = _LH_v0 * E - return (lhf = LH, shf = H, vapor_flux = Ẽ, r_ae = r_ae) + # We ignore ∂r_ae/∂T_sfc, ∂u*/∂T_sfc + ∂LHF∂qc = ρ_sfc * _LH_v0 / (leaf_r_b + leaf_r_stomata + r_ae) # Note that our estimate of ρ_sfc depends on T_sfc, but we ignore the derivative here. + ∂SHF∂Tc = ρ_sfc * cp_m / (canopy_r_b + r_ae) # Same approximation re: ρ_sfc(T_sfc) + return ( + lhf = LH, + shf = H, + vapor_flux = Ẽ, + r_ae = r_ae, + ∂LHF∂qc = ∂LHF∂qc, + ∂SHF∂Tc = ∂SHF∂Tc, + ) end diff --git a/src/standalone/Vegetation/canopy_energy.jl b/src/standalone/Vegetation/canopy_energy.jl index c3950225c7..04be57ebe4 100644 --- a/src/standalone/Vegetation/canopy_energy.jl +++ b/src/standalone/Vegetation/canopy_energy.jl @@ -10,12 +10,28 @@ abstract type AbstractCanopyEnergyModel{FT} <: AbstractCanopyComponent{FT} end ClimaLand.name(model::AbstractCanopyEnergyModel) = :energy -ClimaLand.auxiliary_vars(model::AbstractCanopyEnergyModel) = - (:shf, :lhf, :fa_energy_roots, :r_ae) +ClimaLand.auxiliary_vars(model::AbstractCanopyEnergyModel) = ( + :shf, + :lhf, + :fa_energy_roots, + :r_ae, + :∂SHF∂Tc, + :∂LHF∂qc, + :∂LW_n∂Tc, + :∂qc∂Tc, +) ClimaLand.auxiliary_types(model::AbstractCanopyEnergyModel{FT}) where {FT} = - (FT, FT, FT, FT) -ClimaLand.auxiliary_domain_names(model::AbstractCanopyEnergyModel) = - (:surface, :surface, :surface, :surface) + (FT, FT, FT, FT, FT, FT, FT, FT) +ClimaLand.auxiliary_domain_names(model::AbstractCanopyEnergyModel) = ( + :surface, + :surface, + :surface, + :surface, + :surface, + :surface, + :surface, + :surface, +) """ PrescribedCanopyTempModel{FT} <: AbstractCanopyEnergyModel{FT} @@ -87,11 +103,11 @@ where the canopy temperature is modeled prognostically. canopy_temperature(model::BigLeafEnergyModel, canopy, Y, p, t) = Y.canopy.energy.T -function make_compute_exp_tendency( +function make_compute_imp_tendency( model::BigLeafEnergyModel{FT}, canopy, ) where {FT} - function compute_exp_tendency!(dY, Y, p, t) + function compute_imp_tendency!(dY, Y, p, t) area_index = p.canopy.hydraulics.area_index ac_canopy = model.parameters.ac_canopy # Energy Equation: @@ -117,7 +133,7 @@ function make_compute_exp_tendency( p.canopy.energy.lhf - p.canopy.energy.fa_energy_roots ) / c_per_ground_area end - return compute_exp_tendency! + return compute_imp_tendency! end """ @@ -154,3 +170,67 @@ function root_energy_flux_per_ground_area!( ) where {FT} fa_energy .= FT(0) end + +function ClimaLand.make_compute_jacobian( + model::BigLeafEnergyModel{FT}, + canopy, +) where {FT} + function compute_jacobian!(jacobian::ImplicitEquationJacobian, Y, p, dtγ, t) + (; matrix) = jacobian + + # The derivative of the residual with respect to the prognostic variable + ∂Tres∂T = matrix[@name(canopy.energy.T), @name(canopy.energy.T)] + ∂LHF∂qc = p.canopy.energy.∂LHF∂qc + ∂SHF∂Tc = p.canopy.energy.∂SHF∂Tc + ∂LW_n∂Tc = p.canopy.energy.∂LW_n∂Tc + ∂qc∂Tc = p.canopy.energy.∂qc∂Tc + ϵ_c = p.canopy.radiative_transfer.ϵ + area_index = p.canopy.hydraulics.area_index + ac_canopy = model.parameters.ac_canopy + earth_param_set = canopy.parameters.earth_param_set + _T_freeze = FT(LP.T_freeze(earth_param_set)) + _σ = FT(LP.Stefan(earth_param_set)) + @. ∂LW_n∂Tc = -2 * 4 * _σ * ϵ_c * Y.canopy.energy.T^3 # ≈ ϵ_ground = 1 + @. ∂qc∂Tc = partial_q_sat_partial_T_liq( + p.drivers.P, + Y.canopy.energy.T - _T_freeze, + )# use atmos air pressure as approximation for surface air pressure + @. ∂Tres∂T = + dtγ * MatrixFields.DiagonalMatrixRow( + (∂LW_n∂Tc - ∂SHF∂Tc - ∂LHF∂qc * ∂qc∂Tc) / + (ac_canopy * max(area_index.leaf + area_index.stem, eps(FT))), + ) - (I,) + end + return compute_jacobian! +end + +""" + partial_q_sat_partial_T_liq(P::FT, T::FT) where {FT} + +Computes the quantity ∂q_sat∂T at temperature T and pressure P, +over liquid water. The temperature must be in Celsius. + +Uses the polynomial approximation from Flatau et al. (1992). +""" +function partial_q_sat_partial_T_liq(P::FT, T::FT) where {FT} + esat = FT( + 6.11213476e2 + + 4.44007856e1 * T + + 1.43064234 * T^2 + + 2.64461437e-2 * T^3 + + 3.05903558e-4 * T^4 + + 1.96237241e-6 * T^5 + + 8.92344772e-9 * T^6 - 3.73208410e-11 * T^7 + 2.09339997e-14 * T^8, + ) + desatdT = FT( + 4.44017302e1 + + 2.86064092 * T + + 7.94683137e-2 * T^2 + + 1.21211669e-3 * T^3 + + 1.03354611e-5 * T^4 + + 4.04125005e-8 * T^5 - 7.88037859e-11 * T^6 - 1.14596802e-12 * T^7 + + 3.81294516e-15 * T^8, + ) + + return FT(0.622) * P / (P - FT(0.378) * esat)^2 * desatdT +end diff --git a/src/standalone/Vegetation/component_models.jl b/src/standalone/Vegetation/component_models.jl index 3697e0ce7c..f936e83916 100644 --- a/src/standalone/Vegetation/component_models.jl +++ b/src/standalone/Vegetation/component_models.jl @@ -123,11 +123,48 @@ may be needed and passed in (via the `canopy` model itself). The right hand side for the entire canopy model can make use of these functions for the individual components. """ -function ClimaLand.make_compute_exp_tendency(::AbstractCanopyComponent, canopy) - function compute_exp_tendency!(dY, Y, p, t) end +function ClimaLand.make_compute_exp_tendency( + component::AbstractCanopyComponent, + canopy, +) + function compute_exp_tendency!(dY, Y, p, t) + vars = prognostic_vars(component) + if vars != () + getproperty(getproperty(dY, name(canopy)), name(component)) .= 0 + end + end return compute_exp_tendency! end +""" + ClimaLand.make_compute_imp_tendency(component::AbstractCanopyComponent, canopy) + +Creates the compute_imp_tendency!(dY,Y,p,t) function for the canopy `component`. + +Since component models are not standalone models, other information +may be needed and passed in (via the `canopy` model itself). +The right hand side for the entire canopy model can make use of +these functions for the individual components. +""" +function ClimaLand.make_compute_imp_tendency( + component::AbstractCanopyComponent, + canopy, +) + function compute_imp_tendency!(dY, Y, p, t) + vars = prognostic_vars(component) + if vars != () + getproperty(getproperty(dY, name(canopy)), name(component)) .= 0 + end + + end + return compute_imp_tendency! +end + + +function make_compute_jacobian(component::AbstractCanopyComponent, canopy) + function compute_jacobian!(W, Y, p, dtγ, t) end + return compute_jacobian! +end """ set_canopy_prescribed_field!(component::AbstractCanopyComponent, diff --git a/test/standalone/Vegetation/canopy_model.jl b/test/standalone/Vegetation/canopy_model.jl index e71edc13c7..376ba61e07 100644 --- a/test/standalone/Vegetation/canopy_model.jl +++ b/test/standalone/Vegetation/canopy_model.jl @@ -13,7 +13,7 @@ using ClimaLand.Canopy using ClimaLand.Canopy.PlantHydraulics using ClimaLand.Domains: Point import Insolation - +using ClimaCore.MatrixFields: @name import ClimaLand import ClimaLand.Parameters as LP import ClimaParams @@ -27,7 +27,6 @@ import ClimaParams RTparams = BeerLambertParameters(FT) photosynthesis_params = FarquharParameters(FT, C3()) stomatal_g_params = MedlynConductanceParameters(FT) - AR_model = AutotrophicRespirationModel{FT}(AR_params) stomatal_model = MedlynConductanceModel{FT}(stomatal_g_params) photosynthesis_model = FarquharModel{FT}(photosynthesis_params) @@ -727,6 +726,12 @@ end t0 = FT(0.0) set_initial_cache!(p, Y, t0) exp_tendency! = make_exp_tendency(canopy) + imp_tendency! = ClimaLand.make_imp_tendency(canopy) + jacobian! = ClimaLand.make_jacobian(canopy) + # set up jacobian info + jac_kwargs = + (; jac_prototype = ImplicitEquationJacobian(Y), Wfact = jacobian!) + dY = similar(Y) exp_tendency!(dY, Y, p, t0) turb_fluxes = ClimaLand.Canopy.canopy_turbulent_fluxes( @@ -760,7 +765,276 @@ end ) end end +@testset "Jacobian for Temperature" begin + for FT in (Float32, Float64) + + domain = Point(; z_sfc = FT(0.0)) + + RTparams = BeerLambertParameters(FT) + photosynthesis_params = FarquharParameters(FT, C3()) + stomatal_g_params = MedlynConductanceParameters(FT) + + stomatal_model = MedlynConductanceModel{FT}(stomatal_g_params) + photosynthesis_model = FarquharModel{FT}(photosynthesis_params) + rt_model = BeerLambertModel{FT}(RTparams) + energy_model = BigLeafEnergyModel{FT}(BigLeafEnergyParameters{FT}()) + earth_param_set = LP.LandParameters(FT) + LAI = FT(8.0) # m2 [leaf] m-2 [ground] + z_0m = FT(2.0) # m, Roughness length for momentum - value from tall forest ChatGPT + z_0b = FT(0.1) # m, Roughness length for scalars - value from tall forest ChatGPT + h_int = FT(30.0) # m, "where measurements would be taken at a typical flux tower of a 20m canopy" + shared_params = SharedCanopyParameters{FT, typeof(earth_param_set)}( + z_0m, + z_0b, + earth_param_set, + ) + lat = FT(0.0) # degree + long = FT(-180) # degree + function zenith_angle( + t, + ref_time; + latitude = lat, + longitude = long, + insol_params = earth_param_set.insol_params, + ) + current_datetime = ref_time + Dates.Second(round(t)) + d, δ, η_UTC = + FT.( + Insolation.helper_instantaneous_zenith_angle( + current_datetime, + ref_time, + insol_params, + ) + ) + return Insolation.instantaneous_zenith_angle( + d, + δ, + η_UTC, + longitude, + latitude, + )[1] + end + + function shortwave_radiation( + t; + latitude = lat, + longitude = long, + insol_params = earth_param_set.insol_params, + ) + return 1000 # W/m^2 + end + + function longwave_radiation(t) + return 200 # W/m^2 + end + + u_atmos = t -> 10 #m.s-1 + + liquid_precip = (t) -> 0 # m + snow_precip = (t) -> 0 # m + T_atmos = t -> 290 # Kelvin + q_atmos = t -> 0.001 # kg/kg + P_atmos = t -> 1e5 # Pa + h_atmos = h_int # m + c_atmos = (t) -> 4.11e-4 # mol/mol + ref_time = DateTime(2005) + atmos = PrescribedAtmosphere( + TimeVaryingInput(liquid_precip), + TimeVaryingInput(snow_precip), + TimeVaryingInput(T_atmos), + TimeVaryingInput(u_atmos), + TimeVaryingInput(q_atmos), + TimeVaryingInput(P_atmos), + ref_time, + h_atmos, + earth_param_set; + c_co2 = TimeVaryingInput(c_atmos), + ) + radiation = PrescribedRadiativeFluxes( + FT, + TimeVaryingInput(shortwave_radiation), + TimeVaryingInput(longwave_radiation), + ref_time; + θs = zenith_angle, + ) + + # Plant Hydraulics + RAI = FT(1) + SAI = FT(0) + lai_fun = t -> LAI + ai_parameterization = PlantHydraulics.PrescribedSiteAreaIndex{FT}( + TimeVaryingInput(lai_fun), + SAI, + RAI, + ) + K_sat_plant = FT(1.8e-8) # m/s + ψ63 = FT(-4 / 0.0098) # / MPa to m, Holtzman's original parameter value + 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 + plant_ν = FT(0.7) # m3/m3 + plant_S_s = FT(1e-2 * 0.0098) # m3/m3/MPa to m3/m3/m + conductivity_model = + PlantHydraulics.Weibull{FT}(K_sat_plant, ψ63, Weibull_param) + retention_model = PlantHydraulics.LinearRetentionCurve{FT}(a) + root_depths = SVector{10, FT}(-(10:-1:1.0) ./ 10.0 * 2.0 .+ 0.2 / 2.0) # 1st element is the deepest root depth + function root_distribution(z::T) where {T} + return T(1.0 / 0.5) * exp(z / T(0.5)) # (1/m) + end + param_set = PlantHydraulics.PlantHydraulicsParameters(; + ai_parameterization = ai_parameterization, + ν = plant_ν, + S_s = plant_S_s, + root_distribution = root_distribution, + conductivity_model = conductivity_model, + retention_model = retention_model, + ) + Δz = FT(1.0) # height of compartments + n_stem = Int64(0) # number of stem elements + n_leaf = Int64(1) # number of leaf elements + compartment_centers = + FT.( + Vector( + range( + start = Δz / 2, + step = Δz, + stop = Δz * (n_stem + n_leaf) - (Δz / 2), + ), + ), + ) + compartment_faces = + FT.( + Vector( + range( + start = 0.0, + step = Δz, + stop = Δz * (n_stem + n_leaf), + ), + ) + ) + + ψ_soil0 = FT(0.0) + T_soil0 = FT(290) + soil_driver = PrescribedSoil( + root_depths, + (t) -> ψ_soil0, + (t) -> T_soil0, + FT(0.2), + FT(0.4), + FT(0.98), + ) + + plant_hydraulics = PlantHydraulics.PlantHydraulicsModel{FT}(; + parameters = param_set, + n_stem = n_stem, + n_leaf = n_leaf, + compartment_surfaces = compartment_faces, + compartment_midpoints = compartment_centers, + ) + autotrophic_parameters = AutotrophicRespirationParameters(FT) + autotrophic_respiration_model = + AutotrophicRespirationModel{FT}(autotrophic_parameters) + + canopy = ClimaLand.Canopy.CanopyModel{FT}(; + parameters = shared_params, + domain = domain, + radiative_transfer = rt_model, + photosynthesis = photosynthesis_model, + conductance = stomatal_model, + autotrophic_respiration = autotrophic_respiration_model, + energy = energy_model, + hydraulics = plant_hydraulics, + soil_driver = soil_driver, + atmos = atmos, + radiation = radiation, + ) + + Y, p, coords = ClimaLand.initialize(canopy) + + Y.canopy.hydraulics .= plant_ν + Y.canopy.energy.T = FT(289) + + set_initial_cache! = make_set_initial_cache(canopy) + t0 = FT(0.0) + imp_tendency! = ClimaLand.make_imp_tendency(canopy) + jacobian! = ClimaLand.make_jacobian(canopy) + + set_initial_cache!(p, Y, t0) + T_sfc = ClimaLand.surface_temperature(canopy, Y, p, t0) + ρ_sfc = + ClimaLand.surface_air_density(canopy.atmos, canopy, Y, p, t0, T_sfc) + q_sfc = ClimaLand.surface_specific_humidity(canopy, Y, p, T_sfc, ρ_sfc) + dY = similar(Y) + imp_tendency!(dY, Y, p, t0) + jac = ImplicitEquationJacobian(Y) + jacobian!(jac, Y, p, FT(1), t0) + jac_value = + parent(jac.matrix[@name(canopy.energy.T), @name(canopy.energy.T)]) + ΔT = FT(0.01) + + Y_2 = deepcopy(Y) + Y_2.canopy.energy.T = FT(289 + ΔT) + p_2 = deepcopy(p) + set_initial_cache!(p_2, Y_2, t0) + T_sfc2 = ClimaLand.surface_temperature(canopy, Y_2, p_2, t0) + ρ_sfc2 = ClimaLand.surface_air_density( + canopy.atmos, + canopy, + Y_2, + p_2, + t0, + T_sfc2, + ) + q_sfc2 = ClimaLand.surface_specific_humidity( + canopy, + Y_2, + p_2, + T_sfc2, + ρ_sfc2, + ) + dY_2 = similar(Y_2) + imp_tendency!(dY_2, Y_2, p_2, t0) + + finitediff_LW = + ( + p_2.canopy.radiative_transfer.LW_n .- + p.canopy.radiative_transfer.LW_n + ) ./ ΔT + estimated_LW = p.canopy.energy.∂LW_n∂Tc + @test parent(abs.(finitediff_LW .- estimated_LW) ./ finitediff_LW)[1] < + 0.05 + + finitediff_SHF = (p_2.canopy.energy.shf .- p.canopy.energy.shf) ./ ΔT + estimated_SHF = p.canopy.energy.∂SHF∂Tc + @test parent(abs.(finitediff_SHF .- estimated_SHF) ./ finitediff_SHF)[1] < + 0.05 + + finitediff_LHF = (p_2.canopy.energy.lhf .- p.canopy.energy.lhf) ./ ΔT + estimated_LHF = p.canopy.energy.∂LHF∂qc .* p.canopy.energy.∂qc∂Tc + @test parent(abs.(finitediff_LHF .- estimated_LHF) ./ finitediff_LHF)[1] < + 0.5 + + # Error in `q` derivative is large + finitediff_q = (q_sfc2 .- q_sfc) ./ ΔT + estimated_q = p.canopy.energy.∂qc∂Tc + @test parent(abs.(finitediff_q .- estimated_q) ./ finitediff_q)[1] < + 0.25 + + # Im not sure why this is not smaller! There must be an error in ∂LHF∂qc also. + estimated_LHF_with_correct_q = p.canopy.energy.∂LHF∂qc .* finitediff_q + @test parent( + abs.(finitediff_LHF .- estimated_LHF_with_correct_q) ./ + finitediff_LHF, + )[1] < 0.5 + + # Recall jac = ∂Ṫ∂T - 1 [dtγ = 1] + ∂Ṫ∂T = jac_value .+ 1 + @test (abs.( + parent((dY_2.canopy.energy.T .- dY.canopy.energy.T) ./ ΔT) - ∂Ṫ∂T + ) / ∂Ṫ∂T)[1] < 0.25 # Error propagates here from ∂LHF∂T + + end +end @testset "Zero LAI;" begin for FT in (Float32, Float64)