diff --git a/README.md b/README.md index 4f369ccc..35ca2eee 100644 --- a/README.md +++ b/README.md @@ -94,11 +94,11 @@ And our first YAXArray is built with: ds = YAXArray(axlist, data, props) ``` ``` -YAXArray with the following dimensions -time Axis with 20 Elements from 1.0 to 20.0 -x Axis with 10 Elements from 1.0 to 10.0 -y Axis with 15 Elements from 1.0 to 5.0 -Variable Axis with 2 elements: var1 var2 +20×10×15×2 YAXArray{Float64,4} with dimensions: + Dim{:time} Sampled{Float64} 1.0:1.0:20.0 ForwardOrdered Regular Points, + X Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points, + Y Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points, + Dim{:Variable} Categorical{String} String["var1", "var2"] ForwardOrdered Total size: 46.88 KB ``` @@ -107,16 +107,44 @@ Total size: 46.88 KB For axis can be via `.` ```julia -ds.x.values +ds.X +``` +``` +X Sampled{Float64} ForwardOrdered Regular Points +wrapping: 1.0:1.0:10.0 +``` + +or better yet via `lookup` + +```julia +lookup(ds, :X) +``` +``` +Sampled{Float64} ForwardOrdered Regular Points +wrapping: 1.0:1.0:10.0 +``` + +note that also the `.data` field can be use +```julia +lookup(ds, :X).data ``` ``` 1.0:1.0:10.0 ``` -and the complete data for one of our variables, i.e. `var1` can be accessed via: +The data for one variables, i.e. `var1` can be accessed via: ```julia -ds[variable = "var1"].data +ds[Variable=At("var1")] ``` +``` +20×10×15 YAXArray{Float64,3} with dimensions: + Dim{:time} Sampled{Float64} 1.0:1.0:20.0 ForwardOrdered Regular Points, + X Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points, + Y Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points +Total size: 23.44 KB +``` +and again, you can use the `.data` field to actually get the data. + For more please take a look at the documentation. diff --git a/docs/Manifest.toml b/docs/Manifest.toml index 0242ceb2..2bf7d428 100644 --- a/docs/Manifest.toml +++ b/docs/Manifest.toml @@ -1,8 +1,8 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.9.0" +julia_version = "1.9.2" manifest_format = "2.0" -project_hash = "b8bd84d048e5c8798694353d3a2a1ee2841dea18" +project_hash = "e18cc0fe4d9afd9d2eb46389f66fe2261ad168ab" [[deps.ANSIColoredPrinters]] git-tree-sha1 = "574baf8110975760d391c710b6341da1afa48d8c" @@ -11,9 +11,9 @@ version = "0.0.1" [[deps.AWS]] deps = ["Base64", "Compat", "Dates", "Downloads", "GitHub", "HTTP", "IniFile", "JSON", "MbedTLS", "Mocking", "OrderedCollections", "Random", "SHA", "Sockets", "URIs", "UUIDs", "XMLDict"] -git-tree-sha1 = "4f93e0dbdf4ac1a9f934c2d6e9f78d4736347599" +git-tree-sha1 = "9efa8450bf5d15f50739c9c20210ab48e70dcf5a" uuid = "fbe9abb3-538b-5e4e-ba9e-bc94f4f92ebc" -version = "1.89.1" +version = "1.90.3" [[deps.AWSS3]] deps = ["AWS", "ArrowTypes", "Base64", "Compat", "Dates", "EzXML", "FilePathsBase", "MbedTLS", "Mocking", "OrderedCollections", "Retry", "SymDict", "URIs", "UUIDs", "XMLDict"] @@ -23,13 +23,19 @@ version = "0.10.4" [[deps.AbstractFFTs]] deps = ["LinearAlgebra"] -git-tree-sha1 = "8bc0aaec0ca548eb6cf5f0d7d16351650c1ee956" +git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" -version = "1.3.2" -weakdeps = ["ChainRulesCore"] +version = "1.5.0" +weakdeps = ["ChainRulesCore", "Test"] [deps.AbstractFFTs.extensions] AbstractFFTsChainRulesCoreExt = "ChainRulesCore" + AbstractFFTsTestExt = "Test" + +[[deps.AbstractLattices]] +git-tree-sha1 = "f35684b7349da49fcc8a9e520e30e45dbb077166" +uuid = "398f06c4-4d28-53ec-89ca-5b2656b7603d" +version = "0.2.1" [[deps.AbstractTrees]] git-tree-sha1 = "faa260e4cb5aba097a73fab382dd4b5819d8ec8c" @@ -90,12 +96,6 @@ version = "7.4.11" StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" -[[deps.ArrayInterfaceCore]] -deps = ["LinearAlgebra", "SnoopPrecompile", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "e5f08b5689b1aad068e01751889f2f615c7db36d" -uuid = "30b0a656-2188-435a-8636-2ec0e6a096e2" -version = "0.1.29" - [[deps.ArrowTypes]] deps = ["Sockets", "UUIDs"] git-tree-sha1 = "8c37bfdf1b689c6677bbfc8986968fe641f6a299" @@ -119,9 +119,9 @@ version = "1.0.1" [[deps.AxisArrays]] deps = ["Dates", "IntervalSets", "IterTools", "RangeArrays"] -git-tree-sha1 = "1dd4d9f5beebac0c03446918741b1a03dc5e5788" +git-tree-sha1 = "16351be62963a67ac4083f748fdb3cca58bfd52f" uuid = "39de3d68-74b9-583c-8d2d-e117c070f3a9" -version = "0.4.6" +version = "0.4.7" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" @@ -163,6 +163,18 @@ version = "0.1.2" [[deps.CRC32c]] uuid = "8bf52ea8-c179-5cab-976a-9e18b702a9bc" +[[deps.CRlibm]] +deps = ["CRlibm_jll"] +git-tree-sha1 = "32abd86e3c2025db5172aa182b982debed519834" +uuid = "96374032-68de-5a5b-8d9e-752f78720389" +version = "1.0.1" + +[[deps.CRlibm_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e329286945d0cfc04456972ea732551869af1cfc" +uuid = "4e9b3aee-d8a1-5a3d-ad8b-7d824db253f0" +version = "1.0.1+0" + [[deps.Cairo]] deps = ["Cairo_jll", "Colors", "Glib_jll", "Graphics", "Libdl", "Pango_jll"] git-tree-sha1 = "d0b3f8b4ad16cb0a2988c6788646a5e6a17b6b1b" @@ -171,9 +183,9 @@ version = "1.0.5" [[deps.CairoMakie]] deps = ["Base64", "Cairo", "Colors", "FFTW", "FileIO", "FreeType", "GeometryBasics", "LinearAlgebra", "Makie", "PrecompileTools", "SHA"] -git-tree-sha1 = "bfc7d54b3c514f8015055e6ad0d5997da64d99fc" +git-tree-sha1 = "e041782fed7614b1726fa250f2bf24fd5c789689" uuid = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" -version = "0.10.6" +version = "0.10.7" [[deps.Cairo_jll]] deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] @@ -195,9 +207,9 @@ version = "1.16.0" [[deps.CodecZlib]] deps = ["TranscodingStreams", "Zlib_jll"] -git-tree-sha1 = "9c209fb7536406834aa938fb149964b985de6c83" +git-tree-sha1 = "02aa26a4cf76381be7f66e020a3eddeb27b0a092" uuid = "944b1d66-785c-5afd-91f1-9de20f533193" -version = "0.7.1" +version = "0.7.2" [[deps.ColorBrewer]] deps = ["Colors", "JSON", "Test"] @@ -207,9 +219,9 @@ version = "0.4.0" [[deps.ColorSchemes]] deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "PrecompileTools", "Random"] -git-tree-sha1 = "be6ab11021cd29f0344d5c4357b163af05a48cba" +git-tree-sha1 = "dd3000d954d483c1aad05fe1eb9e6a715c97013e" uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" -version = "3.21.0" +version = "3.22.0" [[deps.ColorTypes]] deps = ["FixedPointNumbers", "Random"] @@ -229,6 +241,11 @@ git-tree-sha1 = "fc08e5930ee9a4e03f84bfb5211cb54e7769758a" uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" version = "0.12.10" +[[deps.Combinatorics]] +git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" +uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" +version = "1.0.2" + [[deps.CommonSubexpressions]] deps = ["MacroTools", "Test"] git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" @@ -237,9 +254,9 @@ version = "0.3.0" [[deps.Compat]] deps = ["UUIDs"] -git-tree-sha1 = "4e88377ae7ebeaf29a047aa1ee40826e0b708a5d" +git-tree-sha1 = "5ce999a19f4ca23ea484e92a1774a61b8ca4cf8e" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.7.0" +version = "4.8.0" weakdeps = ["Dates", "LinearAlgebra"] [deps.Compat.extensions] @@ -248,19 +265,19 @@ weakdeps = ["Dates", "LinearAlgebra"] [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.2+0" +version = "1.0.5+0" [[deps.ConcurrentUtilities]] deps = ["Serialization", "Sockets"] -git-tree-sha1 = "96d823b94ba8d187a6d8f0826e731195a74b90e9" +git-tree-sha1 = "5372dbbf8f0bdb8c700db5367132925c0771ef7e" uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" -version = "2.2.0" +version = "2.2.1" [[deps.ConstructionBase]] deps = ["LinearAlgebra"] -git-tree-sha1 = "738fec4d684a9a6ee9598a8bfee305b26831f28c" +git-tree-sha1 = "fe2838a593b5f776e1597e086dcd47560d94e816" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.2" +version = "1.5.3" weakdeps = ["IntervalSets", "StaticArrays"] [deps.ConstructionBase.extensions] @@ -289,10 +306,10 @@ uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" version = "1.15.0" [[deps.DataFrames]] -deps = ["Compat", "DataAPI", "Future", "InlineStrings", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrettyTables", "Printf", "REPL", "Random", "Reexport", "SentinelArrays", "SnoopPrecompile", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] -git-tree-sha1 = "aa51303df86f8626a962fccb878430cdb0a97eee" +deps = ["Compat", "DataAPI", "DataStructures", "Future", "InlineStrings", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrecompileTools", "PrettyTables", "Printf", "REPL", "Random", "Reexport", "SentinelArrays", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] +git-tree-sha1 = "04c738083f29f86e62c8afc341f0967d8717bdb8" uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" -version = "1.5.0" +version = "1.6.1" [[deps.DataStructures]] deps = ["Compat", "InteractiveUtils", "OrderedCollections"] @@ -309,6 +326,22 @@ version = "1.0.0" deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +[[deps.DelaunayTriangulation]] +deps = ["DataStructures", "EnumX", "ExactPredicates", "Random", "SimpleGraphs"] +git-tree-sha1 = "a1d8532de83f8ce964235eff1edeff9581144d02" +uuid = "927a84f5-c5f4-47a5-9785-b46e178433df" +version = "0.7.2" +weakdeps = ["MakieCore"] + + [deps.DelaunayTriangulation.extensions] + DelaunayTriangulationMakieCoreExt = "MakieCore" + +[[deps.Deno_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "cd6756e833c377e0ce9cd63fb97689a255f12323" +uuid = "04572ae6-984a-583e-9378-9577a1c2574d" +version = "1.33.4+0" + [[deps.DiffResults]] deps = ["StaticArraysCore"] git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" @@ -322,10 +355,10 @@ uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" version = "1.15.1" [[deps.DimensionalData]] -deps = ["Adapt", "ArrayInterfaceCore", "ConstructionBase", "Dates", "Extents", "IntervalSets", "IteratorInterfaceExtensions", "LinearAlgebra", "Random", "RecipesBase", "SnoopPrecompile", "SparseArrays", "Statistics", "TableTraits", "Tables"] -git-tree-sha1 = "dda58a378971eabba69c526ca159ee9ca6715f4f" +deps = ["Adapt", "ArrayInterface", "ConstructionBase", "Dates", "Extents", "IntervalSets", "IteratorInterfaceExtensions", "LinearAlgebra", "PrecompileTools", "Random", "RecipesBase", "SparseArrays", "Statistics", "TableTraits", "Tables"] +git-tree-sha1 = "8a6e9c0ac3a861b983af862cefabc12519884a13" uuid = "0703355e-b756-11e9-17c0-8b28908087d0" -version = "0.24.12" +version = "0.24.13" [[deps.DiskArrayTools]] deps = ["DiskArrays", "Interpolations", "IterTools", "OffsetArrays"] @@ -335,9 +368,9 @@ version = "0.1.6" [[deps.DiskArrays]] deps = ["OffsetArrays"] -git-tree-sha1 = "cef3f9fdce9026de917240a7669e92b35fd07e7d" +git-tree-sha1 = "52253d45971d96d24c33e0cf89bba41c127ee3b9" uuid = "3c3547ce-8d99-4f5e-a174-61eb10b00ae3" -version = "0.3.13" +version = "0.3.14" [[deps.Distributed]] deps = ["Random", "Serialization", "Sockets"] @@ -392,6 +425,28 @@ git-tree-sha1 = "e3290f2d49e661fbd94046d7e3726ffcb2d41053" uuid = "5ae413db-bbd1-5e63-b57d-d24a61df00f5" version = "2.2.4+0" +[[deps.EarthDataLab]] +deps = ["CFTime", "Dates", "DimensionalData", "DiskArrayTools", "DiskArrays", "Distributed", "FFTW", "Markdown", "NetCDF", "OnlineStats", "Polynomials", "Statistics", "StatsBase", "Tables", "WeightedOnlineStats", "YAXArrays", "Zarr"] +git-tree-sha1 = "e442c0313a2a4f40aaff0fd4116df4a973f75916" +uuid = "359177bc-a543-11e8-11b7-bb015dba3358" +version = "0.13.0" + +[[deps.EnumX]] +git-tree-sha1 = "bdb1942cd4c45e3c678fd11569d5cccd80976237" +uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" +version = "1.0.4" + +[[deps.ErrorfreeArithmetic]] +git-tree-sha1 = "d6863c556f1142a061532e79f611aa46be201686" +uuid = "90fa49ef-747e-5e6f-a989-263ba693cf1a" +version = "0.5.2" + +[[deps.ExactPredicates]] +deps = ["IntervalArithmetic", "Random", "StaticArraysCore", "Test"] +git-tree-sha1 = "276e83bc8b21589b79303b9985c321024ffdf59c" +uuid = "429591f6-91af-11e9-00e2-59fbe8cec110" +version = "2.2.5" + [[deps.ExceptionUnwrapping]] deps = ["Test"] git-tree-sha1 = "e90caa41f5a86296e014e148ee061bd6c3edec96" @@ -405,9 +460,9 @@ uuid = "2e619515-83b5-522b-bb60-26c02a35a201" version = "2.5.0+0" [[deps.ExprTools]] -git-tree-sha1 = "c1d06d129da9f55715c6c212866f5b1bddc5fa00" +git-tree-sha1 = "27415f162e6028e81c72b82ef756bf321213b6ec" uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" -version = "0.1.9" +version = "0.1.10" [[deps.Extents]] git-tree-sha1 = "5e1e4c53fa39afe63a7d356e30452249365fba99" @@ -427,10 +482,10 @@ uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a" version = "0.4.1" [[deps.FFMPEG_jll]] -deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] -git-tree-sha1 = "74faea50c1d007c85837327f6775bea60b5492dd" +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] +git-tree-sha1 = "b8660105ccaff705c70894c5f1e24f5c18974220" uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" -version = "4.4.2+2" +version = "4.4.4+0" [[deps.FFTW]] deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] @@ -444,6 +499,12 @@ git-tree-sha1 = "c6033cc3892d0ef5bb9cd29b7f2f0331ea5184ea" uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a" version = "3.3.10+0" +[[deps.FastRounding]] +deps = ["ErrorfreeArithmetic", "LinearAlgebra"] +git-tree-sha1 = "6344aa18f654196be82e62816935225b3b9abe44" +uuid = "fa42c844-2597-5d31-933b-ebd51ab2693f" +version = "0.3.1" + [[deps.FileIO]] deps = ["Pkg", "Requires", "UUIDs"] git-tree-sha1 = "299dc33549f68299137e51e6d49a13b5b1da9673" @@ -461,9 +522,9 @@ uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" [[deps.FillArrays]] deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"] -git-tree-sha1 = "0b3b52afd0f87b0a3f5ada0466352d125c9db458" +git-tree-sha1 = "f372472e8672b1d993e93dada09e23139b509f9e" uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.2.1" +version = "1.5.0" [[deps.FiniteDiff]] deps = ["ArrayInterface", "LinearAlgebra", "Requires", "Setfield", "SparseArrays"] @@ -551,9 +612,9 @@ version = "3.3.8+0" [[deps.GLMakie]] deps = ["ColorTypes", "Colors", "FileIO", "FixedPointNumbers", "FreeTypeAbstraction", "GLFW", "GeometryBasics", "LinearAlgebra", "Makie", "Markdown", "MeshIO", "ModernGL", "Observables", "PrecompileTools", "Printf", "ShaderAbstractions", "StaticArrays"] -git-tree-sha1 = "6e3ff93abf0f3ec09989359067a4575e72471981" +git-tree-sha1 = "7b8cd5699523079908fd19048828bd5442004ed9" uuid = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" -version = "0.8.6" +version = "0.8.7" [[deps.GPUArraysCore]] deps = ["Adapt"] @@ -579,22 +640,22 @@ uuid = "0329782f-3d07-4b52-b9f6-d3137cf03c7a" version = "1.0.1" [[deps.GeoJSON]] -deps = ["Extents", "GeoFormatTypes", "GeoInterface", "GeoInterfaceRecipes", "JSON3", "Tables"] -git-tree-sha1 = "624eb2bb45428b1ca3f6b5428aa105028912c71c" +deps = ["Extents", "GeoFormatTypes", "GeoInterface", "GeoInterfaceRecipes", "JSON3", "StructTypes", "Tables"] +git-tree-sha1 = "1f0c4175e8e612437afc88127c6789cb8f0ffff8" uuid = "61d90e0f-e114-555e-ac52-39dfb47a3ef9" -version = "0.6.4" +version = "0.7.2" [[deps.GeoMakie]] deps = ["Colors", "Downloads", "GeoInterface", "GeoJSON", "GeometryBasics", "ImageIO", "LinearAlgebra", "Makie", "Proj", "Reexport", "Statistics", "StructArrays"] -git-tree-sha1 = "bd2f9bcf2a5cb949cf13993a3cf53cc8d1d99c23" +git-tree-sha1 = "06753d663f23fd344b70b972c98d2f4fe65252c5" uuid = "db073c08-6b98-4ee5-b6a4-5efafb3259c6" -version = "0.5.0" +version = "0.5.1" [[deps.GeometryBasics]] -deps = ["EarCut_jll", "GeoInterface", "IterTools", "LinearAlgebra", "StaticArrays", "StructArrays", "Tables"] -git-tree-sha1 = "659140c9375afa2f685e37c1a0b9c9a60ef56b40" +deps = ["EarCut_jll", "Extents", "GeoInterface", "IterTools", "LinearAlgebra", "StaticArrays", "StructArrays", "Tables"] +git-tree-sha1 = "424a5a6ce7c5d97cca7bcc4eac551b97294c54af" uuid = "5c1252a2-5f33-56bf-86c9-59e7332b4326" -version = "0.4.7" +version = "0.4.9" [[deps.Gettext_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"] @@ -649,16 +710,16 @@ uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" version = "1.0.2" [[deps.HDF5_jll]] -deps = ["Artifacts", "JLLWrappers", "LibCURL_jll", "Libdl", "OpenSSL_jll", "Pkg", "Zlib_jll"] -git-tree-sha1 = "4cc2bb72df6ff40b055295fdef6d92955f9dede8" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "LazyArtifacts", "LibCURL_jll", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "OpenSSL_jll", "TOML", "Zlib_jll", "libaec_jll"] +git-tree-sha1 = "592e1c427983a465831fc73c5ae0ca5d0ac13a9e" uuid = "0234f1f7-429e-5d53-9886-15a909be8d59" -version = "1.12.2+2" +version = "1.14.1+0" [[deps.HTTP]] deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "7f5ef966a02a8fdf3df2ca03108a88447cb3c6f0" +git-tree-sha1 = "cb56ccdd481c0dd7f975ad2b3b62d9eda088f7e2" uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.9.8" +version = "1.9.14" [[deps.HarfBuzz_ICU_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "HarfBuzz_jll", "ICU_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] @@ -674,9 +735,15 @@ version = "2.8.1+1" [[deps.HypergeometricFunctions]] deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] -git-tree-sha1 = "0ec02c648befc2f94156eaef13b0f38106212f3f" +git-tree-sha1 = "f218fe3736ddf977e0e772bc9a586b2383da2685" uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" -version = "0.3.17" +version = "0.3.23" + +[[deps.Hyperscript]] +deps = ["Test"] +git-tree-sha1 = "8d511d5b81240fc8e6802386302675bdf47737b9" +uuid = "47d2ed2b-36de-50cf-bf87-49c2cf4b8b91" +version = "0.0.4" [[deps.ICU_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -692,9 +759,9 @@ version = "0.2.3" [[deps.ImageAxes]] deps = ["AxisArrays", "ImageBase", "ImageCore", "Reexport", "SimpleTraits"] -git-tree-sha1 = "c54b581a83008dc7f292e205f4c409ab5caa0f04" +git-tree-sha1 = "2e4520d67b0cef90865b3ef727594d2a58e0e1f8" uuid = "2803e5a7-5153-5ecf-9a86-9b4c37f5f5ac" -version = "0.6.10" +version = "0.6.11" [[deps.ImageBase]] deps = ["ImageCore", "Reexport"] @@ -710,15 +777,15 @@ version = "0.9.4" [[deps.ImageIO]] deps = ["FileIO", "IndirectArrays", "JpegTurbo", "LazyModules", "Netpbm", "OpenEXR", "PNGFiles", "QOI", "Sixel", "TiffImages", "UUIDs"] -git-tree-sha1 = "342f789fd041a55166764c351da1710db97ce0e0" +git-tree-sha1 = "bca20b2f5d00c4fbc192c3212da8fa79f4688009" uuid = "82e4d734-157c-48bb-816b-45c225c6df19" -version = "0.6.6" +version = "0.6.7" [[deps.ImageMetadata]] deps = ["AxisArrays", "ImageAxes", "ImageBase", "ImageCore"] -git-tree-sha1 = "36cbaebed194b292590cba2593da27b34763804a" +git-tree-sha1 = "355e2b974f2e3212a75dfb60519de21361ad3cb7" uuid = "bc367c6b-8a6b-528e-b4bd-a4b897500b49" -version = "0.9.8" +version = "0.9.9" [[deps.Imath_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -747,6 +814,11 @@ git-tree-sha1 = "9cc2baf75c6d09f9da536ddf58eb2f29dedaf461" uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" version = "1.4.0" +[[deps.IntegerMathUtils]] +git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" +uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" +version = "0.1.2" + [[deps.IntelOpenMP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "0cb9352ef2e01574eeebdb102948a58740dcaf83" @@ -763,11 +835,21 @@ git-tree-sha1 = "721ec2cf720536ad005cb38f50dbba7b02419a15" uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" version = "0.14.7" +[[deps.IntervalArithmetic]] +deps = ["CRlibm", "FastRounding", "LinearAlgebra", "Markdown", "Random", "RecipesBase", "RoundingEmulator", "SetRounding", "StaticArrays"] +git-tree-sha1 = "5ab7744289be503d76a944784bac3f2df7b809af" +uuid = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253" +version = "0.20.9" + [[deps.IntervalSets]] -deps = ["Dates", "Random", "Statistics"] -git-tree-sha1 = "16c0cc91853084cb5f58a78bd209513900206ce6" +deps = ["Dates", "Random"] +git-tree-sha1 = "8e59ea773deee525c99a8018409f64f19fb719e6" uuid = "8197267c-284f-5f27-9208-e0e47529a953" -version = "0.7.4" +version = "0.7.7" +weakdeps = ["Statistics"] + + [deps.IntervalSets.extensions] + IntervalSetsStatisticsExt = "Statistics" [[deps.InvertedIndices]] git-tree-sha1 = "0dc7b50b8d436461be01300fd8cd45aa0274b038" @@ -813,11 +895,17 @@ git-tree-sha1 = "5b62d93f2582b09e469b3099d839c2d2ebf5066d" uuid = "0f8b85d8-7281-11e9-16c2-39a750bddbf1" version = "1.13.1" +[[deps.JSServe]] +deps = ["Base64", "CodecZlib", "Colors", "Dates", "Deno_jll", "HTTP", "Hyperscript", "LinearAlgebra", "Markdown", "MsgPack", "Observables", "RelocatableFolders", "SHA", "Sockets", "Tables", "Test", "ThreadPools", "URIs", "UUIDs", "WidgetsBase"] +git-tree-sha1 = "399dadbc635e14d9c7aae9f8949f37090c16bb5a" +uuid = "824d6782-a2ef-11e9-3a09-e5662e0c26f9" +version = "2.2.8" + [[deps.JpegTurbo]] deps = ["CEnum", "FileIO", "ImageCore", "JpegTurbo_jll", "TOML"] -git-tree-sha1 = "106b6aa272f294ba47e96bd3acbabdc0407b5c60" +git-tree-sha1 = "327713faef2a3e5c80f96bf38d1fa26f7a6ae29e" uuid = "b835a17e-a41a-41e7-81f0-2f016b05efe0" -version = "0.1.2" +version = "0.1.3" [[deps.JpegTurbo_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -944,6 +1032,12 @@ git-tree-sha1 = "7f3efec06033682db852f8b3bc3c1d2b0a0ab066" uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" version = "2.36.0+0" +[[deps.LightXML]] +deps = ["Libdl", "XML2_jll"] +git-tree-sha1 = "e129d9391168c677cd4800f5c0abb1ed8cb3794f" +uuid = "9c8b4983-aa76-5018-a973-4c85ecc9e179" +version = "0.9.0" + [[deps.LineSearches]] deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "Printf"] git-tree-sha1 = "7bbea35cec17305fc70a0e5b4641477dc0789d9d" @@ -954,6 +1048,12 @@ version = "7.2.0" deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +[[deps.LinearAlgebraX]] +deps = ["LinearAlgebra", "Mods", "Permutations", "Primes", "SimplePolynomials"] +git-tree-sha1 = "558a338f1eeabe933f9c2d4052aa7c2c707c3d52" +uuid = "9b3f67b0-2d00-526e-9884-9e4938f8fb88" +version = "0.1.12" + [[deps.Literate]] deps = ["Base64", "IOCapture", "JSON", "REPL"] git-tree-sha1 = "1c4418beaa6664041e0f9b48f0710f57bff2fcbe" @@ -1003,6 +1103,24 @@ git-tree-sha1 = "154d7aaa82d24db6d8f7e4ffcfe596f40bff214b" uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" version = "2023.1.0+0" +[[deps.MPICH_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "8a5b4d2220377d1ece13f49438d71ad20cf1ba83" +uuid = "7cb0a576-ebde-5e09-9194-50597f1243b4" +version = "4.1.2+0" + +[[deps.MPIPreferences]] +deps = ["Libdl", "Preferences"] +git-tree-sha1 = "781916a2ebf2841467cda03b6f1af43e23839d85" +uuid = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267" +version = "0.1.9" + +[[deps.MPItrampoline_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "6979eccb6a9edbbb62681e158443e79ecc0d056a" +uuid = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748" +version = "5.3.1+0" + [[deps.MacroTools]] deps = ["Markdown", "Random"] git-tree-sha1 = "42324d08725e200c23d4dfb549e0d5d89dede2d2" @@ -1010,16 +1128,16 @@ uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" version = "0.5.10" [[deps.Makie]] -deps = ["Animations", "Base64", "ColorBrewer", "ColorSchemes", "ColorTypes", "Colors", "Contour", "Distributions", "DocStringExtensions", "Downloads", "FFMPEG", "FileIO", "FixedPointNumbers", "Formatting", "FreeType", "FreeTypeAbstraction", "GeometryBasics", "GridLayoutBase", "ImageIO", "InteractiveUtils", "IntervalSets", "Isoband", "KernelDensity", "LaTeXStrings", "LinearAlgebra", "MacroTools", "MakieCore", "Markdown", "Match", "MathTeXEngine", "MiniQhull", "Observables", "OffsetArrays", "Packing", "PlotUtils", "PolygonOps", "PrecompileTools", "Printf", "REPL", "Random", "RelocatableFolders", "Setfield", "Showoff", "SignedDistanceFields", "SparseArrays", "StableHashTraits", "Statistics", "StatsBase", "StatsFuns", "StructArrays", "TriplotBase", "UnicodeFun"] -git-tree-sha1 = "a6695a632992a2e19ae1a1d0c9bee0e137e2f3cb" +deps = ["Animations", "Base64", "ColorBrewer", "ColorSchemes", "ColorTypes", "Colors", "Contour", "DelaunayTriangulation", "Distributions", "DocStringExtensions", "Downloads", "FFMPEG", "FileIO", "FixedPointNumbers", "Formatting", "FreeType", "FreeTypeAbstraction", "GeometryBasics", "GridLayoutBase", "ImageIO", "InteractiveUtils", "IntervalSets", "Isoband", "KernelDensity", "LaTeXStrings", "LinearAlgebra", "MacroTools", "MakieCore", "Markdown", "Match", "MathTeXEngine", "Observables", "OffsetArrays", "Packing", "PlotUtils", "PolygonOps", "PrecompileTools", "Printf", "REPL", "Random", "RelocatableFolders", "Setfield", "ShaderAbstractions", "Showoff", "SignedDistanceFields", "SparseArrays", "StableHashTraits", "Statistics", "StatsBase", "StatsFuns", "StructArrays", "TriplotBase", "UnicodeFun"] +git-tree-sha1 = "729640354756782c89adba8857085a69e19be7ab" uuid = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" -version = "0.19.6" +version = "0.19.7" [[deps.MakieCore]] deps = ["Observables"] -git-tree-sha1 = "9926529455a331ed73c19ff06d16906737a876ed" +git-tree-sha1 = "87a85ff81583bd392642869557cb633532989517" uuid = "20f20a25-4f0e-4fdf-b5d1-57303727442b" -version = "0.6.3" +version = "0.6.4" [[deps.MakieTeX]] deps = ["Cairo", "CairoMakie", "Colors", "DocStringExtensions", "Ghostscript_jll", "Glib_jll", "LaTeXStrings", "Makie", "Perl_jll", "Poppler_jll", "tectonic_jll"] @@ -1064,11 +1182,11 @@ git-tree-sha1 = "8be09d84a2d597c7c0c34d7d604c039c9763e48c" uuid = "7269a6da-0436-5bbc-96c2-40638cbb6118" version = "0.4.10" -[[deps.MiniQhull]] -deps = ["QhullMiniWrapper_jll"] -git-tree-sha1 = "9dc837d180ee49eeb7c8b77bb1c860452634b0d1" -uuid = "978d7f02-9e05-4691-894f-ae31a51d76ca" -version = "0.4.0" +[[deps.MicrosoftMPI_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "a8027af3d1743b3bfae34e54872359fdebb31422" +uuid = "9237b28f-5490-5468-be7b-bb81f5f5e6cf" +version = "10.1.3+4" [[deps.Missings]] deps = ["DataAPI"] @@ -1091,6 +1209,11 @@ git-tree-sha1 = "b76ea40b5c0f45790ae09492712dd326208c28b2" uuid = "66fc600b-dfda-50eb-8b99-91cfa97b1301" version = "1.1.7" +[[deps.Mods]] +git-tree-sha1 = "61be59e4daffff43a8cec04b5e0dc773cbb5db3a" +uuid = "7475f97c-0381-53b1-977b-4c60186c8d62" +version = "1.3.3" + [[deps.MosaicViews]] deps = ["MappedArrays", "OffsetArrays", "PaddedViews", "StackViews"] git-tree-sha1 = "7b86a5d4d70a9f5cdf2dacb3cbe6d251d1a61dbe" @@ -1101,6 +1224,17 @@ version = "0.3.4" uuid = "14a3606d-f60d-562e-9121-12d972cd8159" version = "2022.10.11" +[[deps.MsgPack]] +deps = ["Serialization"] +git-tree-sha1 = "fc8c15ca848b902015bd4a745d350f02cf791c2a" +uuid = "99f44e22-a591-53d1-9472-aa23ef4bd671" +version = "1.2.0" + +[[deps.Multisets]] +git-tree-sha1 = "8d852646862c96e226367ad10c8af56099b4047e" +uuid = "3b2b4ff1-bcff-5658-a3ee-dbcf1ce5ac09" +version = "0.4.4" + [[deps.MultivariateStats]] deps = ["Arpack", "LinearAlgebra", "SparseArrays", "Statistics", "StatsAPI", "StatsBase"] git-tree-sha1 = "68bf5103e002c44adfd71fea6bd770b3f0586843" @@ -1121,9 +1255,9 @@ version = "1.0.2" [[deps.Ncurses_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "9aae9f6fb4fe064f0441de1a451503345d7893f5" +git-tree-sha1 = "bd4eb207e17878ceec404e74130639b6dda8b63b" uuid = "68e3532b-a499-55ff-9963-d1c0c0748b3a" -version = "6.4.0+0" +version = "6.4.1+0" [[deps.NetCDF]] deps = ["DiskArrays", "Formatting", "NetCDF_jll"] @@ -1132,16 +1266,16 @@ uuid = "30363a11-5582-574a-97bb-aa9a979735b9" version = "0.11.7" [[deps.NetCDF_jll]] -deps = ["Artifacts", "HDF5_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "XML2_jll", "Zlib_jll"] -git-tree-sha1 = "7f5a03e6712f5447c9c344430b8d1927a4777483" +deps = ["Artifacts", "Bzip2_jll", "HDF5_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "XML2_jll", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "10c612c81eaffdd6b7c28a45a554cdd9d2f40ff1" uuid = "7243133f-43d8-5620-bbf4-c2c921802cf3" -version = "400.902.206+0" +version = "400.902.208+0" [[deps.Netpbm]] deps = ["FileIO", "ImageCore", "ImageMetadata"] -git-tree-sha1 = "5ae7ca23e13855b3aba94550f26146c01d259267" +git-tree-sha1 = "d92b107dbb887293622df7697a2223f9f8176fcd" uuid = "f09324ee-3d7c-5217-9330-fc30815ba969" -version = "1.1.0" +version = "1.1.1" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" @@ -1166,9 +1300,9 @@ version = "1.3.5+1" [[deps.OnlineStats]] deps = ["AbstractTrees", "Dates", "Distributions", "LinearAlgebra", "OnlineStatsBase", "OrderedCollections", "Random", "RecipesBase", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns"] -git-tree-sha1 = "ccbed5b6aa0d819621d1e0637d90c8020fea7428" +git-tree-sha1 = "d3f41f18b9abaa2c64e8e0c43921df9b61ec8d02" uuid = "a15396b6-48d5-5d58-9928-6d29437db91e" -version = "1.6.2" +version = "1.6.3" [[deps.OnlineStatsBase]] deps = ["AbstractTrees", "Dates", "LinearAlgebra", "OrderedCollections", "Statistics", "StatsBase"] @@ -1204,6 +1338,12 @@ deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" version = "0.8.1+0" +[[deps.OpenMPI_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "f3080f4212a8ba2ceb10a34b938601b862094314" +uuid = "fe0851c0-eecd-5654-98d4-656369965a5c" +version = "4.1.5+0" + [[deps.OpenSSL]] deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] git-tree-sha1 = "51901a49222b09e3743c65b8847687ae5fc78eb2" @@ -1212,9 +1352,9 @@ version = "1.4.1" [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1aa4b74f80b01c6bc2b89992b861b5f210e665b5" +git-tree-sha1 = "cae3153c7f6cf3f069a853883fd1919a6e5bab5b" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "1.1.21+0" +version = "3.0.9+0" [[deps.OpenSpecFun_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] @@ -1235,9 +1375,9 @@ uuid = "91d4177d-7536-5919-b921-800302f37372" version = "1.3.2+0" [[deps.OrderedCollections]] -git-tree-sha1 = "d321bf2de576bf25ec4d3e4360faca399afca282" +git-tree-sha1 = "2e73fe17cac3c62ad1aebe70d44c963c3cfdc3e3" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.6.0" +version = "1.6.2" [[deps.PCRE2_jll]] deps = ["Artifacts", "Libdl"] @@ -1294,9 +1434,9 @@ version = "0.12.3" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "4b2e829ee66d4218e0cef22c0a64ee37cf258c29" +git-tree-sha1 = "716e24b21538abc91f6205fd1d8363f39b442851" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.7.1" +version = "2.7.2" [[deps.Perl_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Readline_jll"] @@ -1304,6 +1444,12 @@ git-tree-sha1 = "7ab65a258bcf6da373cab49af462aead452d3960" uuid = "83958c19-0796-5285-893e-a1267f8ec499" version = "5.34.1+0" +[[deps.Permutations]] +deps = ["Combinatorics", "LinearAlgebra", "Random"] +git-tree-sha1 = "6e6cab1c54ae2382bcc48866b91cf949cea703a1" +uuid = "2ae35dd2-176d-5d53-8349-f30d82d94d4f" +version = "0.4.16" + [[deps.Pixman_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "Libdl"] git-tree-sha1 = "64779bc4c9784fee475689a1752ef4d5747c5e87" @@ -1313,7 +1459,7 @@ version = "0.42.2+0" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.9.0" +version = "1.9.2" [[deps.PkgVersion]] deps = ["Pkg"] @@ -1332,6 +1478,22 @@ git-tree-sha1 = "77b3d3605fc1cd0b42d95eba87dfcd2bf67d5ff6" uuid = "647866c9-e3ac-4575-94e7-e3d426903924" version = "0.1.2" +[[deps.Polynomials]] +deps = ["LinearAlgebra", "RecipesBase"] +git-tree-sha1 = "3aa2bb4982e575acd7583f01531f241af077b163" +uuid = "f27b6e38-b328-58d1-80ce-0feddd5e7a45" +version = "3.2.13" + + [deps.Polynomials.extensions] + PolynomialsChainRulesCoreExt = "ChainRulesCore" + PolynomialsMakieCoreExt = "MakieCore" + PolynomialsMutableArithmeticsExt = "MutableArithmetics" + + [deps.Polynomials.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + MakieCore = "20f20a25-4f0e-4fdf-b5d1-57303727442b" + MutableArithmetics = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" + [[deps.PooledArrays]] deps = ["DataAPI", "Future"] git-tree-sha1 = "a6062fe4063cdafe78f4a0a81cfffb89721b30e7" @@ -1363,10 +1525,16 @@ uuid = "21216c6a-2e73-6563-6e65-726566657250" version = "1.4.0" [[deps.PrettyTables]] -deps = ["Crayons", "Formatting", "LaTeXStrings", "Markdown", "Reexport", "StringManipulation", "Tables"] -git-tree-sha1 = "213579618ec1f42dea7dd637a42785a608b1ea9c" +deps = ["Crayons", "LaTeXStrings", "Markdown", "Printf", "Reexport", "StringManipulation", "Tables"] +git-tree-sha1 = "ee094908d720185ddbdc58dbe0c1cbe35453ec7a" uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" -version = "2.2.4" +version = "2.2.7" + +[[deps.Primes]] +deps = ["IntegerMathUtils"] +git-tree-sha1 = "4c9f306e5d6603ae203c2000dd460d81a5251489" +uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" +version = "0.5.4" [[deps.Printf]] deps = ["Unicode"] @@ -1390,18 +1558,6 @@ git-tree-sha1 = "18e8f4d1426e965c7b532ddd260599e1510d26ce" uuid = "4b34888f-f399-49d4-9bb3-47ed5cae4e65" version = "1.0.0" -[[deps.QhullMiniWrapper_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Qhull_jll"] -git-tree-sha1 = "607cf73c03f8a9f83b36db0b86a3a9c14179621f" -uuid = "460c41e3-6112-5d7f-b78c-b6823adb3f2d" -version = "1.0.0+1" - -[[deps.Qhull_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "be2449911f4d6cfddacdf7efc895eceda3eee5c1" -uuid = "784f63db-0788-585a-bace-daefebcd302b" -version = "8.0.1003+0" - [[deps.QuadGK]] deps = ["DataStructures", "LinearAlgebra"] git-tree-sha1 = "6ec7ac8412e83d57e313393220879ede1740f9ee" @@ -1432,10 +1588,10 @@ weakdeps = ["FixedPointNumbers"] RatiosFixedPointNumbersExt = "FixedPointNumbers" [[deps.Readline_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Ncurses_jll", "Pkg"] -git-tree-sha1 = "7cfd44e2889fcabf8ee80dad89bccb3756d4e778" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Ncurses_jll"] +git-tree-sha1 = "9d70e0c890a6c7ca3eb1ca0eaabba4d34795b7fb" uuid = "05236dd9-4125-5232-aa7c-9ec0c9b2c25a" -version = "8.1.1+1" +version = "8.2.1+0" [[deps.RecipesBase]] deps = ["PrecompileTools"] @@ -1465,6 +1621,12 @@ git-tree-sha1 = "41ac127cd281bb33e42aba46a9d3b25cd35fc6d5" uuid = "20febd7b-183b-5ae2-ac4a-720e7ce64774" version = "0.4.1" +[[deps.RingLists]] +deps = ["Random"] +git-tree-sha1 = "9712ebc42e91850f35272b48eb840e60c0270ec0" +uuid = "286e9d63-9694-5540-9e3c-4e6708fa07b2" +version = "0.2.7" + [[deps.Rmath]] deps = ["Random", "Rmath_jll"] git-tree-sha1 = "f65dcb5fa46aee0cf9ed6274ccbd597adc49aa7b" @@ -1477,6 +1639,11 @@ git-tree-sha1 = "6ed52fdd3382cf21947b15e8870ac0ddbff736da" uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" version = "0.4.0+0" +[[deps.RoundingEmulator]] +git-tree-sha1 = "40b9edad2e5287e05bd413a38f61a8ff55b9557b" +uuid = "5eaf0fd0-dfba-4ccb-bf02-d820a40db705" +version = "0.2.1" + [[deps.SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" version = "0.7.0" @@ -1514,6 +1681,11 @@ version = "1.4.0" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +[[deps.SetRounding]] +git-tree-sha1 = "d7a25e439d07a17b7cdf97eecee504c50fedf5f6" +uuid = "3cc68bcd-71a2-5612-b932-767ffbe40ab0" +version = "0.2.1" + [[deps.Setfield]] deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] git-tree-sha1 = "e2cc6d8c88613c05e1defb55170bf5ff211fbeac" @@ -1547,6 +1719,30 @@ git-tree-sha1 = "874e8867b33a00e784c8a7e4b60afe9e037b74e1" uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" version = "1.1.0" +[[deps.SimpleGraphs]] +deps = ["AbstractLattices", "Combinatorics", "DataStructures", "IterTools", "LightXML", "LinearAlgebra", "LinearAlgebraX", "Optim", "Primes", "Random", "RingLists", "SimplePartitions", "SimplePolynomials", "SimpleRandom", "SparseArrays", "Statistics"] +git-tree-sha1 = "b608903049d11cc557c45e03b3a53e9260579c19" +uuid = "55797a34-41de-5266-9ec1-32ac4eb504d3" +version = "0.8.4" + +[[deps.SimplePartitions]] +deps = ["AbstractLattices", "DataStructures", "Permutations"] +git-tree-sha1 = "dcc02923a53f316ab97da8ef3136e80b4543dbf1" +uuid = "ec83eff0-a5b5-5643-ae32-5cbf6eedec9d" +version = "0.3.0" + +[[deps.SimplePolynomials]] +deps = ["Mods", "Multisets", "Polynomials", "Primes"] +git-tree-sha1 = "ac7b9bd0d2d2ee86e9c7016fb76ff7c1037838e9" +uuid = "cc47b68c-3164-5771-a705-2bc0097375a0" +version = "0.2.12" + +[[deps.SimpleRandom]] +deps = ["Distributions", "LinearAlgebra", "Random"] +git-tree-sha1 = "3a6fb395e37afab81aeea85bae48a4db5cd7244a" +uuid = "a6525b86-64cd-54fa-8f65-62fc48bdc0e8" +version = "0.3.1" + [[deps.SimpleTraits]] deps = ["InteractiveUtils", "MacroTools"] git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231" @@ -1555,21 +1751,15 @@ version = "0.9.4" [[deps.Sixel]] deps = ["Dates", "FileIO", "ImageCore", "IndirectArrays", "OffsetArrays", "REPL", "libsixel_jll"] -git-tree-sha1 = "8fb59825be681d451c246a795117f317ecbcaa28" +git-tree-sha1 = "2da10356e31327c7096832eb9cd86307a50b1eb6" uuid = "45858cf5-a6b0-47a3-bbea-62219f50df47" -version = "0.1.2" +version = "0.1.3" [[deps.SkipNan]] git-tree-sha1 = "b07be17ad1c4dd3e2d11aff5aa06157838ee6a6a" uuid = "aed68c70-c8b0-4309-8cd1-d392a74f991a" version = "0.2.0" -[[deps.SnoopPrecompile]] -deps = ["Preferences"] -git-tree-sha1 = "e760a70afdcd461cf01a575947738d359234665c" -uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c" -version = "1.0.3" - [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" @@ -1618,15 +1808,19 @@ uuid = "cae243ae-269e-4f55-b966-ac2d0dc13c15" version = "0.1.1" [[deps.StaticArrays]] -deps = ["LinearAlgebra", "Random", "StaticArraysCore", "Statistics"] -git-tree-sha1 = "832afbae2a45b4ae7e831f86965469a24d1d8a83" +deps = ["LinearAlgebra", "Random", "StaticArraysCore"] +git-tree-sha1 = "9cabadf6e7cd2349b6cf49f1915ad2028d65e881" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.5.26" +version = "1.6.2" +weakdeps = ["Statistics"] + + [deps.StaticArrays.extensions] + StaticArraysStatisticsExt = "Statistics" [[deps.StaticArraysCore]] -git-tree-sha1 = "6b7ba252635a5eff6a0b0664a41ee140a1c9e72a" +git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.0" +version = "1.4.2" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] @@ -1723,6 +1917,12 @@ version = "0.1.1" deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +[[deps.ThreadPools]] +deps = ["Printf", "RecipesBase", "Statistics"] +git-tree-sha1 = "50cb5f85d5646bc1422aa0238aa5bfca99ca9ae7" +uuid = "b189fb0b-2eb5-4ed4-bc0c-d34c51242431" +version = "2.1.1" + [[deps.TiffImages]] deps = ["ColorTypes", "DataStructures", "DocStringExtensions", "FileIO", "FixedPointNumbers", "IndirectArrays", "Inflate", "Mmap", "OffsetArrays", "PkgVersion", "ProgressMeter", "UUIDs"] git-tree-sha1 = "8621f5c499a8aa4aa970b1ae381aae0ef1576966" @@ -1768,12 +1968,24 @@ git-tree-sha1 = "53915e50200959667e78a92a418594b428dffddf" uuid = "1cfade01-22cf-5700-b092-accc4b62d6e1" version = "0.4.1" +[[deps.WGLMakie]] +deps = ["Colors", "FileIO", "FreeTypeAbstraction", "GeometryBasics", "Hyperscript", "JSServe", "LinearAlgebra", "Makie", "Observables", "PNGFiles", "PrecompileTools", "RelocatableFolders", "ShaderAbstractions", "StaticArrays"] +git-tree-sha1 = "3975f4325a7c8a16e347fe6ff97c2f615c344124" +uuid = "276b4fcb-3e11-5398-bf8b-a0c2d153d008" +version = "0.8.11" + [[deps.WeightedOnlineStats]] deps = ["LinearAlgebra", "MultivariateStats", "OnlineStats", "OnlineStatsBase", "Statistics", "StatsBase"] git-tree-sha1 = "b2dba91e787e710881b57dd70c52948beb036e70" uuid = "bbac0a1f-7c9d-5672-960b-c6ca726e5d5d" version = "0.6.1" +[[deps.WidgetsBase]] +deps = ["Observables"] +git-tree-sha1 = "30a1d631eb06e8c868c559599f915a62d55c2601" +uuid = "eead4739-05f7-45a1-878c-cee36b57321c" +version = "0.1.4" + [[deps.WoodburyMatrices]] deps = ["LinearAlgebra", "SparseArrays"] git-tree-sha1 = "de67fa59e33ad156a590055375a30b23c40299d3" @@ -1886,7 +2098,7 @@ version = "0.6.1" deps = ["CFTime", "DataStructures", "Dates", "DimensionalData", "DiskArrayTools", "DiskArrays", "Distributed", "DocStringExtensions", "Glob", "Interpolations", "IntervalSets", "IterTools", "Markdown", "OffsetArrays", "OnlineStats", "Optim", "OrderedCollections", "ParallelUtilities", "ProgressMeter", "Reexport", "Requires", "Statistics", "StatsBase", "Tables", "WeightedOnlineStats", "YAXArrayBase"] path = ".." uuid = "c21b50f5-aa40-41ea-b809-c0f5e47bfa5c" -version = "0.4.6" +version = "0.5.0" [[deps.Zarr]] deps = ["AWSS3", "Blosc", "CodecZlib", "DataStructures", "Dates", "DiskArrays", "HTTP", "JSON", "LRUCache", "OffsetArrays", "OpenSSL", "Pkg", "URIs"] @@ -1911,6 +2123,12 @@ git-tree-sha1 = "51b5eeb3f98367157a7a12a1fb0aa5328946c03c" uuid = "9a68df92-36a6-505f-a73e-abb412b6bfb4" version = "0.2.3+0" +[[deps.libaec_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "eddd19a8dea6b139ea97bdc8a0e2667d4b661720" +uuid = "477f73a3-ac25-53e9-8cc3-50b2fa2566f0" +version = "1.0.6+1" + [[deps.libaom_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "3a2ea60308f0996d26f1e5354e10c24e9ef905d4" @@ -1926,7 +2144,7 @@ version = "0.15.1+0" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.7.0+0" +version = "5.8.0+0" [[deps.libfdk_aac_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -1970,9 +2188,9 @@ version = "17.4.0+0" [[deps.tectonic_jll]] deps = ["Artifacts", "Fontconfig_jll", "FreeType2_jll", "Graphite2_jll", "HarfBuzz_ICU_jll", "HarfBuzz_jll", "ICU_jll", "JLLWrappers", "Libdl", "OpenSSL_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "54867b00af20c70b52a1f9c00043864d8b926a21" +git-tree-sha1 = "34e306e658f1e566e03e53dd08991931a76b6be2" uuid = "d7dd28d6-a5e6-559c-9131-7eb760cdacc5" -version = "0.13.1+0" +version = "0.14.1+0" [[deps.x264_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] diff --git a/docs/Project.toml b/docs/Project.toml index 927ac5d9..0a39edcf 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -7,11 +7,13 @@ DiskArrays = "3c3547ce-8d99-4f5e-a174-61eb10b00ae3" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" DocumenterMarkdown = "997ab1e6-3595-5248-9280-8efb232c3433" Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +EarthDataLab = "359177bc-a543-11e8-11b7-bb015dba3358" GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" GeoInterface = "cf35fbd7-0cd7-5166-be24-54bfbe79505f" GeoJSON = "61d90e0f-e114-555e-ac52-39dfb47a3ef9" GeoMakie = "db073c08-6b98-4ee5-b6a4-5efafb3259c6" Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" +JSServe = "824d6782-a2ef-11e9-3a09-e5662e0c26f9" LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306" MakieTeX = "6d554a22-29e7-47bd-aee5-0c5f06619414" @@ -21,6 +23,7 @@ OnlineStats = "a15396b6-48d5-5d58-9928-6d29437db91e" PlotUtils = "995b91a9-d308-5afd-9ec6-746e21dbc043" SkipNan = "aed68c70-c8b0-4309-8cd1-d392a74f991a" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +WGLMakie = "276b4fcb-3e11-5398-bf8b-a0c2d153d008" WeightedOnlineStats = "bbac0a1f-7c9d-5672-960b-c6ca726e5d5d" YAXArrayBase = "90b8fcef-0c2d-428d-9c56-5f86629e9d14" YAXArrays = "c21b50f5-aa40-41ea-b809-c0f5e47bfa5c" diff --git a/docs/examples/Gallery/simplemaps.jl b/docs/examples/Gallery/simplemaps.jl index 429cabf8..3801e565 100644 --- a/docs/examples/Gallery/simplemaps.jl +++ b/docs/examples/Gallery/simplemaps.jl @@ -9,8 +9,8 @@ c = g["tas"] # Subset, first time step ct1 = c[Ti = Near(Date("2015-01-01"))] -lon = ct1.lon.val -lat = ct1.lat.val +lon = lookup(ct1, :lon) +lat = lookup(ct1, :lat) data = ct1.data[:,:]; # ## Heatmap plot @@ -46,16 +46,16 @@ fig # ## 3D sphere plot -#using JSServe, WGLMakie -#WGLMakie.activate!() -#Page(exportable=true, offline=true) +using JSServe, WGLMakie +WGLMakie.activate!() +Page(exportable=true, offline=true) ds = replace(ndata, missing =>NaN) sphere = uv_normal_mesh(Tesselation(Sphere(Point3f(0), 1), 128)) -fig = Figure() +fig = Figure(backgroundcolor=:grey25, resolution=(800,800)) ax = LScene(fig[1,1], show_axis=false) -mesh!(ax, sphere; color = ds'[end:-1:1,:], +mesh!(ax, sphere; color = ds'[end:-1:1,:], shading=false, colormap = :seaborn_icefire_gradient) zoom!(ax.scene, cameracontrols(ax.scene), 0.65) rotate!(ax.scene, 2.5) diff --git a/docs/examples/HowdoI/howdoi.jl b/docs/examples/HowdoI/howdoi.jl index b4807be7..7d8648be 100644 --- a/docs/examples/HowdoI/howdoi.jl +++ b/docs/examples/HowdoI/howdoi.jl @@ -49,7 +49,6 @@ ds2 = YAXArray(axlist, data2) # Now we can concatenate ```ds1``` and ```ds2``` cubes: dsfinal = concatenatecubes([ds1, ds2], Dim{:Variables}(["var1", "var2"])) - dsfinal @@ -105,18 +104,72 @@ classes = YAXArray((getAxis("lon", dsfinal), getAxis("lat", dsfinal)), rand(1:3, using CairoMakie CairoMakie.activate!() # This is how our classification map looks like -heatmap(classes.data[:, :]) +fig, ax, obj = heatmap(classes.data[:, :]; + colormap = cgrad([:black, :orange, :dodgerblue], 3, categorical=true)) +cbar = Colorbar(fig[1,2], obj) +mn, mx, N = 1,3,3 +δn = (mx - mn)/N +ticks_position = [mn + δn/2 + (i-1)*δn for i in 1:N] +cbar.ticks = (ticks_position, string.(mn:mx)) +fig # Now we define the input cubes that will be considered for the iterable table t = CubeTable(values=ds1, classes=classes) using DataFrames using OnlineStats -## visualiztion of the CubeTable -DataFrame(t[1]) +## visualization of the CubeTable +c_tbl = DataFrame(t[1]) +first(c_tbl, 5) # In this line we calculate the `Mean` for each class fitcube = cubefittable(t, Mean, :values, by=(:classes)) # We can also use more than one criteria for grouping the values. In the next example, the mean is calculated for each class and timestep. fitcube = cubefittable(t, Mean, :values, by=(:classes, :time)) + +# !!! question + +# ## convertions types `DimArray` & `YAXArray` + +using YAXArrays, YAXArrayBase +using DimensionalData + +# ### `DimArray` to `YAXArray` +dim_arr = rand(X(1:5), Y(10.0:15.0), metadata = Dict{String, Any}()) + +# !!! warning "metadata" +# Note the `metadata` argument. Needed by `yaxconvert`. + +yax_arr = yaxconvert(YAXArray, dim_arr) + +# And saving it: +using Zarr, NetCDF +savecube(yax_arr, "yax_arr.nc", driver=:netcdf) + +# or as a `zarr` file + +savecube(yax_arr, "yax_arr.zarr", driver=:zarr) + + +# And going back to the DimArray type is also possible. + +# ### `YAXArray` into a `DimArray` +dim_arr = yaxconvert(DimArray, yax_arr) + +# at the moment there is no support to save a DimArray directly into disk as a `NetCDF` or a `Zarr` file. + +# !!! question + +# ## Assing variable names to `YAXArrays` in a `Dataset` + +# ### One variable name + +ds = YAXArrays.Dataset(; (:a => YAXArray(rand(10)),)...) + +# ### Multiple variable names +keylist = (:a, :b, :c) +varlist = (YAXArray(rand(10)), YAXArray(rand(10,5)), YAXArray(rand(2,5))) + +ds = YAXArrays.Dataset(; (keylist .=> varlist)...) + diff --git a/docs/examples/HowdoI/switchtodimarray.jl b/docs/examples/HowdoI/switchtodimarray.jl index bd23ae19..184e753f 100644 --- a/docs/examples/HowdoI/switchtodimarray.jl +++ b/docs/examples/HowdoI/switchtodimarray.jl @@ -1,4 +1,4 @@ -# The purpose of this section is to show how to switch from the native YAXArray type to the new type based on DimensionalData.jl +# The purpose of this section is to show how to switch from the native `YAXArray` type to the new type based on `DimensionalData.jl` # ## Axis lists have to be Tuples instead of Vector @@ -18,14 +18,13 @@ using YAXArrays axes = (Dim{:Lon}(1:10), Dim{:Lat}(1:10), Dim{:Time}(1:100)) arr = YAXArray(axes, reshape(1:10000, (10,10,100))) - dims(arr) # ## Copy an axes with the same name but different values -# Use DD.rebuild(ax, values) instead of axcopy(ax, values) +# Use __`DD.rebuild(ax, values)`__ instead of `axcopy(ax, values)`. -# ## Subsetting is including not excluding +# ## Subsetting is **including** not excluding # Beware that the subsets in DimensionalData include the bounds. -# Thereby the size of the subset can differ by one on every bound. -# a[X=1..4] +# Thereby the size of the subset can differ by one on every bound +# `a[X=1..4]`. diff --git a/docs/examples/UserGuide/create_from_func.jl b/docs/examples/UserGuide/create_from_func.jl index df199cf4..0892bdc4 100644 --- a/docs/examples/UserGuide/create_from_func.jl +++ b/docs/examples/UserGuide/create_from_func.jl @@ -3,10 +3,6 @@ using Dates # Define function in space and time -# !!! warning This is currently broken. -# This is broken after the switch to DimensionalData - - f(lo, la, t) = (lo + la + Dates.dayofyear(t)) # ## Wrap function for mapCube output @@ -15,8 +11,7 @@ function g(xout,lo,la,t) xout .= f.(lo,la,t) end -# Note the applied `.` after `f`, this is because we will slice across time, -# hence the application is broadcasted along this dimension. +# Note the applied `.` after `f`, this is because we will slice/broadcasted across time. # ## Create Cube's Axes diff --git a/docs/examples/UserGuide/creating.jl b/docs/examples/UserGuide/creating.jl index dcf5ec8e..90981ba0 100644 --- a/docs/examples/UserGuide/creating.jl +++ b/docs/examples/UserGuide/creating.jl @@ -13,6 +13,9 @@ a.Dim_1 # or with getproperty(a, :Dim_1) +# or even better with the `DD` `lookup` function +lookup(a, :Dim_1) + # ## Creating a YAXArray with named axis # The two most used axis are `RangeAxis` and `CategoricalAxis`. Here, we use a combination of them @@ -34,47 +37,17 @@ ds = YAXArray(axlist, data) ds[Variable = At("var1"), lon = DD.Between(1,2.1)] -# ### Indexing and subsetting -# -# As for most array types, YAXArray also provides special indexing behavior -# when using the square brackets for indexing. Assuming that `c` is a YAXArray, -# there are 3 different semantics to use the square brackets with, depending on -# the types of the arguments provided to getindex. -# 1. **Ranges and Integers only** as for example `c[1,4:8,:]` will access the underlying data according to the provided index in index space and read the -# data *into memory* as a plain Julia Array. It is equivalent to `c.data[1,4:8,:]`. -# 2. **Keyword arguments with values or Intervals** as for example `c[longitude = 30..50, time=Date(2005,6,1), variable="air_temperature"]`. -# This always creates a *view* into the specified subset of the data and -# return a new YAXArray with new axes without reading the data. Intervals and -# values are always interpreted in the units as provided by the axis values. -# 3. **A Tables.jl-compatible object** for irregular extraction of a list of points or sub-arrays and random locations. -# For example calling `c[[(lon=30,lat=42),(lon=-50,lat=2.5)]]` will extract data at the specified coordinates and along all additional axes into memory. -# It returns a new YAXArray with a new Multi-Index axis along the selected -# longitudes and latitudes. - # !!! info -# Overall, selecting elements in YAXArrays is brittle. -# Hence using DimensionalData.jl and YAXArrayBase.jl is recomended. - -# ## Select variables with DimensionalData.jl - -using DimensionalData, YAXArrayBase -# First we wrap the yaxarray into a DimArray via +# Please note that selecting elements in YAXArrays is done via the `DimensionalData.jl` syntax. +# For more information checkout the (docs)[https://rafaqz.github.io/DimensionalData.jl/]. -dim = yaxconvert(DimArray, ds) -# Now, the syntax from DimensionalData.jl just works - -subset = dim[ +subset = ds[ time = DD.Between( Date("2022-01-01"), Date("2022-01-10")), lon=DD.Between(1,2), Variable = At("var2") ] -# And going back to our YAXArray view is done with - -yax = yaxconvert(YAXArray, subset) - -# This will be supported by default in the next release. # ### Properties / Attributes diff --git a/docs/examples/UserGuide/examples_from_esdl_study_2.jl b/docs/examples/UserGuide/examples_from_esdl_study_2.jl index 85a2d79a..0732b5aa 100644 --- a/docs/examples/UserGuide/examples_from_esdl_study_2.jl +++ b/docs/examples/UserGuide/examples_from_esdl_study_2.jl @@ -25,7 +25,7 @@ using Pkg ## for operating data cubes using Zarr, YAXArrays - +using DimensionalData ## for operating the Earth system data lab using EarthDataLab @@ -38,20 +38,26 @@ CairoMakie.activate!() using GeoMakie -# In this study we investigate the redundancy of the different variables in each pixel. Therefore we calculate a linear dimensionality reduction (PCA) and check how many dimensions are needed to explain 90% of the variance of a cube that contained originally 11 variables. +# In this study we investigate the redundancy of the different variables in each pixel. +# Therefore we calculate a linear dimensionality reduction (PCA) and check how many dimensions +# are needed to explain 90% of the variance of a cube that contained originally 11 variables. # ### Select and prepare (subset/gapfill) an Earth system data cube. -# We need to choose a cube and here select a monthly, 2.5° resolution global cube. This very low resolution cube aims at rapid processing for the safe of time and computational resources. +# We need to choose a cube and here select a monthly, 2.5° resolution global cube. +# This very low resolution cube aims at rapid processing for the safe of time and computational resources. + cube_handle = esdc(res="tiny") # Check which variables are avaiable in the data cube: ## if we want the names of the variables: -println(getAxis("Var", cube_handle).values) +println.(getAxis("Var", cube_handle)); -# Having the variable names allows us to make a selection, such that we can subset the global cube. We should also take care that the variables are as complete as possible in the time window we analyze. This has been explored a priori. +# Having the variable names allows us to make a selection, such that we can subset the global cube. +# We should also take care that the variables are as complete as possible in the time window we analyze. +# This has been explored a priori. ## vector of variables we will work with vars = ["evaporative_stress", @@ -71,11 +77,13 @@ vars = ["evaporative_stress", timespan = Date("2003-01-01")..Date("2011-12-31") ## subset the grand cube and get the cube we will analyse here -cube_subset = subsetcube(cube_handle, time = timespan, variable = vars) +cube_subset = cube_handle[time = timespan, variable = At(vars)] -println(getAxis("Var", cube_subset).values) +println.(getAxis("Var", cube_subset)); -# An important preprocessing step is gapfilling. We do not want to enter the debate on the optimal gapfilling method. What we do here is gapfilling first with the mean seasonal cycle (where it can be estimated), and interpolating long-recurrent gaps (typically in winter seasons). +# An important preprocessing step is gapfilling. We do not want to enter the debate on the optimal gapfilling method. +# What we do here is gapfilling first with the mean seasonal cycle (where it can be estimated), and interpolating +# long-recurrent gaps (typically in winter seasons). # use the EarthDataLab buit-in function @time cube_fill = gapFillMSC(cube_subset) @@ -113,11 +121,15 @@ end # f_{\{time\}}^{\{time}\} : \mathcal{C}(\{lat, lon, time, var\}) \rightarrow \mathcal{C}(\{lat, lon, time, var\}). # \end{equation} -# For operations of this kind, the best is to use the `mapslices` function. In the EarthDataLab package, this function needs the input function, the cube handle, and an indication on which dimension we would apply it. The function can then infer that the output dimension here is also an axis of type `Time`: +# For operations of this kind, the best is to use the `mapslices` function. In the EarthDataLab package, +# this function needs the input function, the cube handle, and an indication on which dimension we would apply it. +# The function can then infer that the output dimension here is also an axis of type `Time`: cube_fill_itp = mapslices(LinInterp, cube_fill, dims = "Time") -# As we describe in the paper, we estimate the intrinsic dimensions from the raw, yet gapfilled, data cube (`cube_fill_itp`), but also based on spectrally decomposed data. The decomposition via discrete FFTs is an atomic operation of the following form (Eq. 12), +# As we describe in the paper, we estimate the intrinsic dimensions from the raw, yet gapfilled, +# data cube (`cube_fill_itp`), but also based on spectrally decomposed data. The decomposition via discrete FFTs +# is an atomic operation of the following form (Eq. 12), # \begin{equation} # f_{\{time\}}^{\{time, freq\}} : \mathcal{C}(\{lat, lon, time, var\}) \rightarrow \mathcal{C}(\{lat, lon, time, var, freq\}). @@ -129,18 +141,23 @@ cube_decomp = filterTSFFT(cube_fill_itp) # ### Estimate intrinsic dimension via PCA -# For estimating the intrinsic estimation via PCA from a multivariate time series we need essentially two atomic functions. First, dimensionality reduction, +# For estimating the intrinsic estimation via PCA from a multivariate time series we need essentially +# two atomic functions. First, dimensionality reduction, # \begin{equation} # f_{\{time, var\}}^{\{time, princomp \}} : \mathcal{C}(\{time, var\}) \rightarrow \mathcal{C}(\{time, princomp\}) # \end{equation} -# And second estimating from the reduced space the number of dimensions that represent more variance than the threshold (for details see paper): +# And second estimating from the reduced space the number of dimensions that represent more variance than +# the threshold (for details see paper): + # \begin{equation} # f_{\{time, princomp\}}^{\{ \}} : \mathcal{C}(\{time, var\}) \rightarrow \mathcal{C}(\{int dim\}) # \end{equation} -# However, we as both steps emerge from the same analysis it is more efficient to wrap these two steps in a single atomic functions which has the structure: +# However, we as both steps emerge from the same analysis it is more efficient to wrap these two steps +# in a single atomic functions which has the structure: + # \begin{equation} # f_{\{time, var\}}^{\{ \}} : \mathcal{C}(\{time, var\}) \rightarrow \mathcal{C}(\{\}) # \end{equation} diff --git a/docs/examples/UserGuide/examples_from_esdl_study_3.jl b/docs/examples/UserGuide/examples_from_esdl_study_3.jl index e4bed6bd..4ab34df9 100644 --- a/docs/examples/UserGuide/examples_from_esdl_study_3.jl +++ b/docs/examples/UserGuide/examples_from_esdl_study_3.jl @@ -1,5 +1,5 @@ # # Examples from the ESDL paper -# ## Earth Syst. Dynam., 11, 201–234, 2020 (https://doi.org/10.5194/esd-11-201-2020) +# ## Earth Syst. Dynam., 11, 201–234, 2020 [doi](https://doi.org/10.5194/esd-11-201-2020) # **NOTE:** This section is based on the case studies from the paper "Earth system data cubes unravel global multivariate dynamics" by Mahecha, Gans et al. (2019), available [here](https://github.com/esa-esdl/ESDLPaperCode.jl). # - We have slightly adjusted the scripts. A few differences are that these new scripts are updated to Julia 1.9, and the YAXArrays.jl package is used. @@ -26,6 +26,7 @@ using Pkg ## for operating data cubes using EarthDataLab +using DimensionalData using Zarr, YAXArrays, NetCDF, DiskArrays ## other relevant packages @@ -36,41 +37,53 @@ using Statistics, Dates, SkipNan # We have to choose a cube and here we select a monthly global cube of 2.5° resolution. This very low-resolution cube aims at fast processing for the safety of computational time and resources. cube_handle = esdc(res="tiny") -## In this case it is better to have one cube for the Tair and one for terrestrial ecosystem respiration R$_{eco}$ -world_tair = subsetcube(cube_handle, variable = "air_temperature_2m") -world_resp = subsetcube(cube_handle, variable = "terrestrial_ecosystem_respiration") +# In this case it is better to have one cube for the Tair and one for terrestrial ecosystem respiration `R$_{eco}$`. +world_tair = cube_handle[variable = At("air_temperature_2m")] +world_resp = cube_handle[variable = At("terrestrial_ecosystem_respiration")] -## Find overlapping time between variables + +# Find overlapping time between variables span_starts = first(findall(i-> !ismissing(i), world_tair[:,:,:])) axtime = collect(cube_handle.axes[3]); println("Data span of `air_temperature_2m` starts on ", axtime[span_starts[3]]) +# similarly + span_starts = first(findall(i-> !ismissing(i), world_resp[:,:,:])) axtime = collect(cube_handle.axes[3]); println("Data span of `terrestrial_ecosystem_respiration` starts on ", axtime[span_starts[3]]) -## susbet again based on overlapping period -world_tair = subsetcube(world_tair, time=2001:2015) -world_resp = subsetcube(world_resp, time=2001:2015) -# The objective is to estimate $Q_{10}$ from the decomposed time series. For details we refere the reader to Mahecha, M.D. et al. (2010) *Global convergence in the temperature sensitivity of respiration at ecosystem level.* Science, 329, 838-840. +# susbet again based on overlapping period +world_tair = world_tair[time=2001:2015] +world_resp = world_resp[time=2001:2015] + +# The objective is to estimate $Q_{10}$ from the decomposed time series. +# For details we refere the reader to Mahecha, M.D. et al. (2010) *Global convergence +# in the temperature sensitivity of respiration at ecosystem level.* Science, 329, 838-840. # The first step is the transformation of both variables, so that the $Q_{10}$ model becomes linear and Tair the exponent: ## Element-wise transformations using `map` are done in a lazy manner, so the ## transformation will be applied only when the data is read or further processed -## We forced `world_τ` output format as Float32 to assure the output data type is equal , and to avoid further incompatibilities +## We forced `world_τ` output format as Float32 to assure the output data type is equal, and to avoid further incompatibilities world_τ = map(tair -> (tair - Float32(273.15+15))/10, world_tair) world_ρ = map(log, world_resp) -## ... and we combine them into a Data Cube again using `concatenatecubes` -world_new = concatenatecubes([world_τ, world_ρ], CategoricalAxis("Variable", ["τ","ρ"])) +# ... and we combine them into a Data Cube again using `concatenatecubes` +world_new = concatenatecubes([world_τ, world_ρ], Dim{:Variable}(["τ","ρ"])) + + +# First we need a function for time-series filtering. Using a moving average filter is the simplest way +# to decomposes a signal into fast and slow oscillations by caluclating a moving average over a window of points. +# This creates a smoothed curve (slow osc.) which can be subtracted from the original signal to obtain +# fast oscillations separately. We could have likewise used FFTs, SSA, EMD, or any other method for +# discrete time-series decomposition. +# Moving Average decomposes a signal into fast and slow oscillations +# by calculating a moving average over a window of points. +# This creates a smoothed curve (slow osc.) which can be subtracted from the original signal, +# to obtain fast oscillations separately. -## First we need a function for time-series filtering. Using a moving average filter is the simplest way to decomposes a signal into fast and slow oscillations by caluclating a moving average over a window of points. This creates a smoothed curve (slow osc.) which can be subtracted from the original singlal to obtain fast oscillations separately. We could have likewise used FFTs, SSA, EMD, or any other method for discrete time-series decomposition. -## Moving Average decomposes a singal into fast and slow oscillations -## by calculating a moving average over a window of points. -## This creates a smoothed curve (slow osc.) which can be subtracted from the original signal, -## to obtain fast oscillations separately. function movingAverage(xout, xin; windowsize = 4) Z = length(xin) ## calculate moving average over window @@ -87,7 +100,7 @@ end ## here we define the input and output dimensions for the decomposition indims = InDims("Time") -outdims = OutDims("Time", CategoricalAxis("Scale",["Slow","Fast"])) +outdims = OutDims("Time", Dim{:Scale}(["Slow","Fast"])) cube_decomp = mapCube(movingAverage, world_new, indims=indims, outdims=outdims) # ### For estimating the temperature sensitivities @@ -152,15 +165,16 @@ using MakieTeX using LaTeXStrings function geoplotsfx(xin, titlein, labelin, crange, cmap) - fig = GeoMakie.Figure(fontsize=19) - ax = GeoAxis(fig[1,1]; coastlines = false, - lonlims=(-180, 180), latlims = (-90,90) - ) - sf = GeoMakie.surface!(ax, -180:2.5:180, -90:2.5:90, xin; shading = false, - colormap = (cmap, 1,), colorrange=crange) - cb1 = Colorbar(fig[2,1], sf; label=labelin, width = Relative(0.5), vertical=false, highclip=RGBA{Float32}(0.03125f0,0.25f0,0.5f0,1f0)) + fig = Figure(fontsize=19) + ax = GeoAxis(fig[1,1]; coastlines = false,lonlims=(-180, 180), latlims = (-90,90)) + sf = surface!(ax, -180:2.5:180, -90:2.5:90, xin; shading = false, + colormap = (cmap, 1,), + colorrange=crange, + highclip=:red + ) + Colorbar(fig[2,1], sf; label=labelin, width = Relative(0.5), vertical=false) Label(fig[0,1], titlein, fontsize=25, width = Relative(0.5)) - return(fig) + fig end label_direct = L"$Q_{10}$" @@ -168,11 +182,11 @@ label_scape = L"$SCAPE Q_{10}$" crange = (0,3) cmap = :GnBu -fig1 = geoplotsfx(q10_direct[:,:], "a) Confounded Parameter Estimation", label_direct, crange, cmap) +fig1 = geoplotsfx(q10_direct[:,:].data, "a) Confounded Parameter Estimation", label_direct, crange, cmap) # and for the other case -fig2 = geoplotsfx(q10_scape[:,:], "b) Scale Dependent Parameter Estimation", label_scape, crange, cmap) +fig2 = geoplotsfx(q10_scape[:,:].data, "b) Scale Dependent Parameter Estimation", label_scape, crange, cmap) # ## The following are some additional analyses, not included in the paper. # For this analysis we need to construct a new cube by concatenating a couple of previous cube outputs. @@ -181,36 +195,50 @@ fig2 = geoplotsfx(q10_scape[:,:], "b) Scale Dependent Parameter Estimation", lab ## checking cubes axes order world_tair.axes + +# and + rb_scape.axes + # Now we need to sort the rb_scape axes order. Axes order must be the same for the cubes concatenation. data_reshaped = permutedims(rb_scape.data,(2,3,1)) rb_scape_reshaped = YAXArray(rb_scape.axes[[2,3,1]],data_reshaped) -## checking cubes chunking +# checking cubes chunking eachchunk(world_tair) + + +# and + eachchunk(rb_scape_reshaped) -## setting up the same chunking + +# setting up the same chunking rb_scape_reshaped = setchunks(rb_scape_reshaped, Dict("lon"=>144, "lat"=>72, "time"=>44)) rb_chunking = eachchunk(rb_scape_reshaped); first(rb_chunking) + +# and + world_tair = setchunks(world_tair, Dict("lon"=>144, "lat"=>72, "time"=>44)) tair_chunking = eachchunk(world_tair); first(tair_chunking) -## concatenate the cubes -ds = concatenatecubes([world_tair, rb_scape_reshaped], CategoricalAxis("Variables", ["tair", "rb"])) -## And compute the correlation between Air temperature and Base respiration +# concatenate the cubes +ds = concatenatecubes([world_tair, rb_scape_reshaped], Dim{:Variables}(["tair", "rb"])) + + +# And compute the correlation between Air temperature and Base respiration cor_tair_rb = mapslices(i->cor(eachcol(i)...),ds, dims=("Time","Variable")) q10_diff = map((x,y)->x-y, q10_direct, q10_scape) crange = (-1,1) cmap = :PRGn -fig3 = geoplotsfx(cor_tair_rb[:,:], "Correlation Tair and Rb", "Coefficient", crange, cmap) +fig3 = geoplotsfx(cor_tair_rb[:,:].data, "Correlation Tair and Rb", "Coefficient", crange, cmap) # and also -fig4 = geoplotsfx(q10_diff[:,:], string("Ratio of Q10 conv and Q10 Scape"), "Ratio", crange, cmap) \ No newline at end of file +fig4 = geoplotsfx(q10_diff[:,:].data, string("Ratio of Q10 conv and Q10 Scape"), "Ratio", crange, cmap) \ No newline at end of file diff --git a/docs/examples/UserGuide/examples_from_esdl_study_4.jl b/docs/examples/UserGuide/examples_from_esdl_study_4.jl index cc4aaa7c..a51f93fa 100644 --- a/docs/examples/UserGuide/examples_from_esdl_study_4.jl +++ b/docs/examples/UserGuide/examples_from_esdl_study_4.jl @@ -13,7 +13,7 @@ # * Normal text are explanations referring to notation and equations in the paper -# * `# comments in the code are itended explain specific aspects of the coding` +# * `# comments in the code are intended to explain specific aspects of the coding` # * **New steps in workflows are introduced with bold headers** @@ -21,7 +21,8 @@ using Pkg ## for operating data cubes -using Zarr, YAXArrays, NetCDF +using Zarr, YAXArrays, NetCDF +using DimensionalData using EarthDataLab ## for data analysis @@ -33,21 +34,30 @@ using DataFrames, Downloads cube_handle = esdc(res="tiny") # Here we define two subcubes for gross primary productivity and for surface moisture -gpp = subsetcube(cube_handle, variable = "gross_primary_productivity", time = 2003:2012) -moisture = subsetcube(cube_handle, variable = "surface_moisture", time = 2003:2012) +gpp = cube_handle[variable = At("gross_primary_productivity"), time = 2003:2012] +moisture = cube_handle[variable = At("surface_moisture"), time = 2003:2012] -# The objective is to estimate histograms of gross primary productivity and surface moisture and split them by AR5 region. We first download a shapefile defining these regions. +# The objective is to estimate histograms of gross primary productivity and +# surface moisture and split them by AR5 region. We first download a shapefile defining these regions. regions = Cube("https://s3.bgc-jena.mpg.de:9000/misc/IPCCregions_2d5.zarr") -# In order to compute some aggregate statistics over our datasets we join the 3 data cubes into a single iterable table. The data is not loaded but can be iterated over in an efficient manner which is chunk-aware. Additionally we need the latitude values of the Table to compute the weights of our aggregation which represent the grid cell size. +# In order to compute some aggregate statistics over our datasets we join the +# 3 data cubes into a single iterable table. The data is not loaded but can be iterated +# over in an efficient manner which is chunk-aware. Additionally we need the latitude values +# of the Table to compute the weights of our aggregation which represent the grid cell size. t = CubeTable(gpp=gpp, moisture=moisture, region=regions) # If the concept of this table is still a bit opaque, we can visualize the table. using DataFrames, Base.Iterators df = DataFrame(t[1]) +summary(df) -# here we define the climare reference from the "Report on Managing the Risks of Extreme Events and Disasters to Advance Climate Adaptation (SREX)"SERX regions" by IPCC +first(df,5) + +# here we define the climare reference from the "Report on Managing the Risks of +# Extreme Events and Disasters to Advance Climate Adaptation (SREX)"SERX regions" by IPCC + ## reigions' table with names, labels (abbreviations), ID, and coordinates regions_df = ["region" "label" "id" "lon" "lat"; "Alaska/N.W. Canada" "ALA" 1 -136.5 60.3; @@ -87,29 +97,33 @@ regions_df = ["region" "label" "id" "lon" "lat"; ## subset solely the region labels for further use labels_ipcc = regions_df[2:end,2] -# Now comes the actual aggregation. First we generate an empty `WeightedHist` for every SREX region. Then we loop through all the entries in our table and fit the gpp/moisture pair into the respective histogram. Never will the whole cube be loaded into memory, but only one chunk is read at a time. In the end we create a new (in-memory) data cube from the resulting histograms. +# Now comes the actual aggregation. First we generate an empty `WeightedHist` for every SREX region. +# Then we loop through all the entries in our table and fit the gpp/moisture pair into the respective histogram. +# Never will the whole cube be loaded into memory, but only one chunk is read at a time. +# In the end we create a new (in-memory) data cube from the resulting histograms. + # Here we create an empty 2d histogram for every SREX region -function weightedhistograms_by_region(df,labels) +function weightedhistograms_by_region(df, labels) hists = [WeightedHist((0.0:0.1:12,0:0.01:1)) for _ in eachindex(labels_ipcc)] for row in Tables.rows(df) - ## if all data are there - if !any(ismissing, (row.gpp, row.moisture, row.region)) - ## we select the appropriate histogram according to the region the data point belongs to - h = hists[Int(row.region)] - ## and we fit the two data points to the histogram, weight by cos of lat - fit!(h, (row.gpp, row.moisture), cosd(row.lat)) - end + ## if all data are there + if !any(ismissing, (row.gpp, row.moisture, row.region)) + ## we select the appropriate histogram according to the region the data point belongs to + h = hists[Int(row.region)] + ## and we fit the two data points to the histogram, weight by cos of lat + fit!(h, (row.gpp, row.moisture), cosd(row.lat)) end + end ## we create the axes for the new output data cube midpointsgpp = 0.05:0.1:11.95 midpointsmoist = 0.005:0.01:0.995 - newaxes = CubeAxis[ - CategoricalAxis("SREX",[labels[i] for i in 1:33]), - RangeAxis("GPP",midpointsgpp), - RangeAxis("Moisture",midpointsmoist), - ] + newaxes = ( + Dim{:SREX}([labels[i] for i in 1:33]), + Dim{:GPP}(midpointsgpp), + Dim{:Moisture}(midpointsmoist) + ) ## and create the new cube object data = [WeightedOnlineStats.pdf(hists[reg],(g,m)) for reg in 1:33, g in midpointsgpp, m in midpointsmoist] data = replace(data,NaN => missing, 0 => missing) @@ -134,70 +148,69 @@ ygpp = 0.05:0.1:11.95 xmoist = 0.005:0.01:0.995 crange = (0,1) -f = CairoMakie.Figure(resolution = (1200, 1000)) -gtop = f[1,1] = GridLayout() -gcen = f[2:3,1] = GridLayout() -gbot = f[4,1] = GridLayout() - ## top row - gx = gtop - for col in 1:7 +fig = Figure(resolution = (1200, 1000)) +gtop = fig[1,1] = GridLayout() +gcen = fig[2:3,1] = GridLayout() +gbot = fig[4,1] = GridLayout() +## top row +gx = gtop +for col in 1:7 id = [26 8 16 6 12 25 13] ax = Axis(gx[1, col], title=labels_ipcc[id[col]], - xticklabelsvisible=false, xticks=0:0.2:0.9, - ylabel="", yticks=0:2:10, - xgridvisible=false, ygridvisible=false, - width = 105, height = 185) - ## note that we inverted the data matrix to plot surface moisture on the x-axis and gpp on the y-axis - CairoMakie.heatmap!(ax, xmoist, ygpp, sqrt.(rdata[:,:,id[col]]'), - colormap=Reverse(:seaborn_rocket_gradient), colorrange=crange) - end - ## bottom row - gx = gbot - for col in 1:7 + xticklabelsvisible=false, xticks=0:0.2:0.9, ylabel="", yticks=0:2:10, + xgridvisible=false, ygridvisible=false, + width = 105, height = 185) + ## note that we inverted the data matrix to plot surface moisture on the x-axis + ## and gpp on the y-axis + heatmap!(ax, xmoist, ygpp, sqrt.(rdata[:,:,id[col]].data'); + colormap=Reverse(:seaborn_rocket_gradient), colorrange=crange) +end +## bottom row +gx = gbot +for col in 1:7 id = [27 15 19 24 17 9 20] ax = Axis(gx[1, col], title=labels_ipcc[id[col]], - xlabel="", xticks=0:0.2:0.9, xticklabelrotation = pi/2, xtickformat="{:.1f}", - ylabel="", yticks=0:2:12, - xgridvisible=false, ygridvisible=false, - width = 105, height = 185) - CairoMakie.heatmap!(ax, xmoist, ygpp, sqrt.(rdata[:,:,id[col]]'), - colormap=Reverse(:seaborn_rocket_gradient), colorrange=crange) - end - ## central rows - gx = gcen - for col in (1,7) + xlabel="", xticks=0:0.2:0.9, xticklabelrotation = pi/2, + xtickformat="{:.1f}", ylabel="", yticks=0:2:12, + xgridvisible=false, ygridvisible=false, + width = 105, height = 185) + heatmap!(ax, xmoist, ygpp, sqrt.(rdata[:,:,id[col]].data'); + colormap=Reverse(:seaborn_rocket_gradient), colorrange=crange) +end +## central rows +gx = gcen +for col in (1,7) ## central top row id1 = [3 0 0 0 0 0 10] - ax = Axis(gx[1, col], title=labels_ipcc[id1[col]], xticklabelsvisible=false, xticks=0:0.2:0.9, - ylabel="", yticks=0:2:10, - xgridvisible=false, ygridvisible=false, - width = 105, height = 185) - ht = CairoMakie.heatmap!(ax, xmoist, ygpp, sqrt.(rdata[:,:,id1[col]]'), - colormap=Reverse(:seaborn_rocket_gradient), colorrange=crange) + ax = Axis(gx[1, col], title=labels_ipcc[id1[col]], xticklabelsvisible=false, + xticks=0:0.2:0.9, ylabel="", yticks=0:2:10, + xgridvisible=false, ygridvisible=false, + width = 105, height = 185) + ht = heatmap!(ax, xmoist, ygpp, sqrt.(rdata[:,:,id1[col]].data'); + colormap=Reverse(:seaborn_rocket_gradient), colorrange=crange) ## central bottom row id2 = [2 0 0 0 0 0 19] ax2 = Axis(gx[2, col], title=labels_ipcc[id2[col]], xticklabelsvisible=false, - xlabel="", xticks=0:0.2:1.9, xticklabelrotation = pi/2, xtickformat="{:.1f}", - ylabel="", yticks=0:2:12, - xgridvisible=false, ygridvisible=false, - width = 105, height = 185) - ht = CairoMakie.heatmap!(ax2, xmoist, ygpp, sqrt.(rdata[:,:,id2[col]]'), - colormap=Reverse(:seaborn_rocket_gradient), colorrange=crange) - cb = Colorbar(f[3:4,0], ht; width=20, height=Relative(0.95),flipaxis = false) + xlabel="", xticks=0:0.2:1.9, xticklabelrotation = pi/2, + xtickformat="{:.1f}", ylabel="", yticks=0:2:12, + xgridvisible=false, ygridvisible=false, + width = 105, height = 185) + ht = heatmap!(ax2, xmoist, ygpp, sqrt.(rdata[:,:,id2[col]].data'); + colormap=Reverse(:seaborn_rocket_gradient), colorrange=crange) + cb = Colorbar(fig[3:4,0], ht; width=20, height=Relative(0.95),flipaxis = false) end ## map of SREX regions titlein = "SREX reference regions" -gx[1:2,2:6] -ax = GeoAxis(gx[1:2,2:6]; coastlines = true, -lonlims=(-180, 180), latlims = (-90,90)) -sf = GeoMakie.surface!(ax, -180:2.5:180, -90:2.5:90, regions[:,:]; shading = false, -colormap = (:grays, 0.85,), colorrange=(0,33), rev=true) -Label(gx[0,3], titlein, fontsize=25, width = Relative(0.5), - padding=(80, 100, -55, 0), valign=:bottom, font=:bold) - for i in 2:size(regions_df)[1] - tex = text!(regions_df[i,4], regions_df[i,5], text=regions_df[i,2], color=:red, fontsize=19, font=:bold) - CairoMakie.translate!(tex, 0,0,100) +ax = GeoAxis(gx[1:2,2:6]; coastlines = true, lonlims=(-180, 180), latlims = (-90,90)) +sf = GeoMakie.surface!(ax, -180:2.5:180, -90:2.5:90, regions[:,:].data; shading = false, + colormap = (:grays, 0.85,), colorrange=(0,33), rev=true) +Label(gx[0,3], titlein, fontsize=25, width = Relative(0.5), padding=(80, 100, -55, 0), + valign=:bottom, font=:bold) +for i in 2:size(regions_df)[1] + tex = text!(regions_df[i,4], regions_df[i,5], text=regions_df[i,2], + color=:red, fontsize=19, font=:bold) + translate!(tex, 0,0,100) end ## additional labels @@ -205,9 +218,9 @@ label_gpp = L"Gross primary Production [$gC/m^{2}day$]" label_soil = L"Surface moisture []" Label(gbot[1, 4:7, Bottom()], label_soil, valign=:bottom, fontsize=25, font=:bold, padding=(0, 0, 10, 40)) -Label(f[1:2,0, Bottom()], label_gpp, valign=:top, halign =:center, +Label(fig[1:2,0, Bottom()], label_gpp, valign=:top, halign =:center, fontsize=25, font=:bold, padding=(0, 0, 0, -375), rotation=pi/2) -save("study4.png", f) # hide # because something is off [bug!] with the default output file format +save("study4.png", fig) # hide # because something is off [bug!] with the default output file format # ![](study4.png) ## separate function for plotting only the map diff --git a/docs/examples/UserGuide/openNetCDF.jl b/docs/examples/UserGuide/openNetCDF.jl index dd62d2a3..a006a4b8 100644 --- a/docs/examples/UserGuide/openNetCDF.jl +++ b/docs/examples/UserGuide/openNetCDF.jl @@ -1,8 +1,26 @@ # In this example we are going to use a `NetCDF` file but this should be very similar for other data backends. # To open a single data file we first need to load the appropriate backend package via `using NetCDF`. +# ## One variable using YAXArrays, NetCDF using Downloads url = "https://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc" filename = Downloads.download(url, "tos_O1_2001-2002.nc") # you pick your own path -c = Cube(filename) \ No newline at end of file +c = Cube(filename) + +# ## Multiple variables, mixed dimensions + +# When the dataset contains variables with different dimensions you should use `open_dataset` as in + +path2file = "https://www.unidata.ucar.edu/software/netcdf/examples/sresa1b_ncar_ccsm3-example.nc" +filename = Downloads.download(path2file, "sresa1b_ncar_ccsm3-example.nc") +c = open_dataset(filename) + +# Afterwards, selecting a variable as usual works, i.e. +c["ua"] + +# or + +c["tas"] + +# Note that their output is a YAXArray. diff --git a/docs/genfiles.jl b/docs/genfiles.jl index e8c536e2..6bab21e0 100644 --- a/docs/genfiles.jl +++ b/docs/genfiles.jl @@ -12,7 +12,11 @@ function getfiles() srcsfiles = [] for f in folders names = readdir(joinpath(@__DIR__, ".", "examples", f)) - setdiff!(names, [".DS_Store", "examples_from_esdl_study_1.jl","examples_from_esdl_study_2.jl","examples_from_esdl_study_3.jl","examples_from_esdl_study_4.jl", "create_from_func.jl"]) + setdiff!(names, [".DS_Store", + "examples_from_esdl_study_1.jl", + "examples_from_esdl_study_2.jl", + ] + ) fpaths = "$(f)/" .* names srcsfiles = vcat(srcsfiles, fpaths...) end diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 34b1447c..26336e06 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -108,7 +108,7 @@ nav: - "Saving YAXArrays and Datasets" : "examples/generated/UserGuide/saving.md" - "Setting chunks's size": "examples/generated/UserGuide/setchuncks.md" - "Apply functions on YAXArrays": "examples/generated/UserGuide/applyfunctions.md" - #- "Generate a cube from function": "examples/generated/UserGuide/create_from_func.md" + - "Generate a cube from function": "examples/generated/UserGuide/create_from_func.md" - "Open NetCDF" : "examples/generated/UserGuide/openNetCDF.md" - "Open Zarr (Store)" : "examples/generated/UserGuide/openZarr.md" - "Distributed processes" : "examples/generated/UserGuide/distributed.md" @@ -119,8 +119,8 @@ nav: - "How do I ...": "examples/generated/HowdoI/howdoi.md" #- "Examples from ESDL study 1": "examples/generated/UserGuide/examples_from_esdl_study_1.md" #- "Examples from ESDL study 2": "examples/generated/UserGuide/examples_from_esdl_study_2.md" - #- "Examples from ESDL study 3": "examples/generated/UserGuide/examples_from_esdl_study_3.md" - #- "Examples from ESDL study 4": "examples/generated/UserGuide/examples_from_esdl_study_4.md" + - "Examples from ESDL study 3": "examples/generated/UserGuide/examples_from_esdl_study_3.md" + - "Examples from ESDL study 4": "examples/generated/UserGuide/examples_from_esdl_study_4.md" - "Contribute to docs": "examples/generated/contribute/contribute.md" - "API" : "api.md" \ No newline at end of file diff --git a/docs/src/stylesheets/custom.css b/docs/src/stylesheets/custom.css index 38524c5b..b9d91cf8 100644 --- a/docs/src/stylesheets/custom.css +++ b/docs/src/stylesheets/custom.css @@ -117,4 +117,41 @@ html { background-color: var(--doc-heading-color-alt); border-radius: 2pt; padding: 0pt 5pt 2pt 5pt; - } \ No newline at end of file + } + + /* From Pretty Pandas Dataframes */ +/* Supports mkdocs-material color variables */ +.data-frame { + border: 0; + font-size: smaller; +} +.data-frame tr { + border: none; + background: var(--md-code-bg-color, #ffffff); +} +.data-frame tr:nth-child(even) { + background: var(--md-default-bg-color, #f5f5f5); +} +.data-frame tr:hover { + background-color: var(--md-footer-bg-color--dark, #e1f5fe); +} + +.data-frame thead th { + background: var(--md-default-bg-color, #ffffff); + border-bottom: 1px solid #aaa; + font-weight: bold; +} +.data-frame th { + border: none; + padding-left: 10px; + padding-right: 10px; +} + +.data-frame td{ + /* background: #fff; */ + border: none; + text-align: right; + min-width:5em; + padding-left: 10px; + padding-right: 10px; +} \ No newline at end of file