From a4e04bab207d5c0d9a3c4606f73f98d0558f7c5f Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Thu, 28 Nov 2024 13:15:14 +0000 Subject: [PATCH] build based on 54d5b02 --- previews/PR477/404.html | 25 + previews/PR477/UserGuide/cache.html | 32 ++ previews/PR477/UserGuide/chunk.html | 125 +++++ previews/PR477/UserGuide/combine.html | 55 +++ previews/PR477/UserGuide/compute.html | 433 ++++++++++++++++++ previews/PR477/UserGuide/convert.html | 105 +++++ previews/PR477/UserGuide/create.html | 75 +++ previews/PR477/UserGuide/faq.html | 406 ++++++++++++++++ previews/PR477/UserGuide/group.html | 217 +++++++++ previews/PR477/UserGuide/read.html | 145 ++++++ previews/PR477/UserGuide/select.html | 321 +++++++++++++ previews/PR477/UserGuide/types.html | 28 ++ previews/PR477/UserGuide/write.html | 99 ++++ previews/PR477/api.html | 42 ++ .../assets/UserGuide_cache.md.C8q_gcEI.js | 5 + .../UserGuide_cache.md.C8q_gcEI.lean.js | 5 + .../assets/UserGuide_chunk.md.1uXbhaU1.js | 98 ++++ .../UserGuide_chunk.md.1uXbhaU1.lean.js | 98 ++++ .../assets/UserGuide_combine.md.C1vyA2or.js | 28 ++ .../UserGuide_combine.md.C1vyA2or.lean.js | 28 ++ .../assets/UserGuide_compute.md.DcvjuWd2.js | 406 ++++++++++++++++ .../UserGuide_compute.md.DcvjuWd2.lean.js | 406 ++++++++++++++++ .../assets/UserGuide_convert.md.DfXE0j4J.js | 78 ++++ .../UserGuide_convert.md.DfXE0j4J.lean.js | 78 ++++ .../assets/UserGuide_create.md.52g4xNHB.js | 48 ++ .../UserGuide_create.md.52g4xNHB.lean.js | 48 ++ .../PR477/assets/UserGuide_faq.md.CbwaBwTY.js | 379 +++++++++++++++ .../assets/UserGuide_faq.md.CbwaBwTY.lean.js | 379 +++++++++++++++ .../assets/UserGuide_group.md.D6FXIAci.js | 190 ++++++++ .../UserGuide_group.md.D6FXIAci.lean.js | 190 ++++++++ .../assets/UserGuide_read.md.DKTQLAM5.js | 159 +++++++ .../assets/UserGuide_read.md.DKTQLAM5.lean.js | 159 +++++++ .../assets/UserGuide_select.md.4hincmqf.js | 294 ++++++++++++ .../UserGuide_select.md.4hincmqf.lean.js | 294 ++++++++++++ .../assets/UserGuide_types.md.C3SHQpVI.js | 1 + .../UserGuide_types.md.C3SHQpVI.lean.js | 1 + .../assets/UserGuide_write.md.BM33QlO-.js | 72 +++ .../UserGuide_write.md.BM33QlO-.lean.js | 72 +++ previews/PR477/assets/api.md.C6JjwH0h.js | 12 + previews/PR477/assets/api.md.C6JjwH0h.lean.js | 12 + previews/PR477/assets/app.rVAEYvbf.js | 1 + .../chunks/@localSearchIndexroot.x2g7CFsQ.js | 1 + .../chunks/VPLocalSearchBox.BOmt0h0p.js | 8 + .../PR477/assets/chunks/framework.CG45A19l.js | 18 + .../PR477/assets/chunks/theme.BCktWg-s.js | 2 + previews/PR477/assets/dadyujg.CBBZcGwj.png | Bin 0 -> 677870 bytes .../development_contribute.md.BsDNQ3F0.js | 3 + ...development_contribute.md.BsDNQ3F0.lean.js | 3 + .../development_contributors.md.D95rVXft.js | 1 + ...velopment_contributors.md.D95rVXft.lean.js | 1 + previews/PR477/assets/eycsiwg.B7KFIfDV.jpeg | Bin 0 -> 110829 bytes .../PR477/assets/get_started.md.Bwi4-TLM.js | 56 +++ .../assets/get_started.md.Bwi4-TLM.lean.js | 56 +++ previews/PR477/assets/index.md.Ugqn9MWG.js | 9 + .../PR477/assets/index.md.Ugqn9MWG.lean.js | 9 + .../inter-italic-cyrillic-ext.r48I6akx.woff2 | Bin 0 -> 43112 bytes .../inter-italic-cyrillic.By2_1cv3.woff2 | Bin 0 -> 31300 bytes .../inter-italic-greek-ext.1u6EdAuj.woff2 | Bin 0 -> 17404 bytes .../assets/inter-italic-greek.DJ8dCoTZ.woff2 | Bin 0 -> 32564 bytes .../inter-italic-latin-ext.CN1xVJS-.woff2 | Bin 0 -> 120840 bytes .../assets/inter-italic-latin.C2AdPX0b.woff2 | Bin 0 -> 74784 bytes .../inter-italic-vietnamese.BSbpV94h.woff2 | Bin 0 -> 14884 bytes .../inter-roman-cyrillic-ext.BBPuwvHQ.woff2 | Bin 0 -> 40488 bytes .../inter-roman-cyrillic.C5lxZ8CY.woff2 | Bin 0 -> 29164 bytes .../inter-roman-greek-ext.CqjqNYQ-.woff2 | Bin 0 -> 16272 bytes .../assets/inter-roman-greek.BBVDIX6e.woff2 | Bin 0 -> 29920 bytes .../inter-roman-latin-ext.4ZJIpNVo.woff2 | Bin 0 -> 110160 bytes .../assets/inter-roman-latin.Di8DUHzh.woff2 | Bin 0 -> 67792 bytes .../inter-roman-vietnamese.BjW4sHH5.woff2 | Bin 0 -> 14072 bytes previews/PR477/assets/lwcvkom.Cj9TSrtJ.png | Bin 0 -> 82251 bytes previews/PR477/assets/ocamthh.96k_BqPR.jpeg | Bin 0 -> 101963 bytes previews/PR477/assets/pvbkmme.BNwnPvkJ.jpeg | Bin 0 -> 38688 bytes previews/PR477/assets/rllxrad.xrZxBsPv.jpeg | Bin 0 -> 100995 bytes previews/PR477/assets/sdpqlwg.VVvPdzHG.png | Bin 0 -> 110252 bytes previews/PR477/assets/style.uPsy6HuN.css | 1 + ...torials_mean_seasonal_cycle.md.Bc_ZMHev.js | 72 +++ ...ls_mean_seasonal_cycle.md.Bc_ZMHev.lean.js | 72 +++ .../tutorials_other_tutorials.md.Dvsi6Te_.js | 1 + ...orials_other_tutorials.md.Dvsi6Te_.lean.js | 1 + .../tutorials_plottingmaps.md.Gh5_YLq7.js | 54 +++ ...tutorials_plottingmaps.md.Gh5_YLq7.lean.js | 54 +++ previews/PR477/development/contribute.html | 30 ++ previews/PR477/development/contributors.html | 28 ++ previews/PR477/favicon.ico | Bin 0 -> 384638 bytes previews/PR477/get_started.html | 83 ++++ previews/PR477/hashmap.json | 1 + previews/PR477/index.html | 36 ++ previews/PR477/logo.png | Bin 0 -> 384638 bytes previews/PR477/logo.svg | 324 +++++++++++++ previews/PR477/siteinfo.js | 1 + .../PR477/tutorials/mean_seasonal_cycle.html | 99 ++++ previews/PR477/tutorials/other_tutorials.html | 28 ++ previews/PR477/tutorials/plottingmaps.html | 81 ++++ previews/PR477/vp-icons.css | 1 + 94 files changed, 6783 insertions(+) create mode 100644 previews/PR477/404.html create mode 100644 previews/PR477/UserGuide/cache.html create mode 100644 previews/PR477/UserGuide/chunk.html create mode 100644 previews/PR477/UserGuide/combine.html create mode 100644 previews/PR477/UserGuide/compute.html create mode 100644 previews/PR477/UserGuide/convert.html create mode 100644 previews/PR477/UserGuide/create.html create mode 100644 previews/PR477/UserGuide/faq.html create mode 100644 previews/PR477/UserGuide/group.html create mode 100644 previews/PR477/UserGuide/read.html create mode 100644 previews/PR477/UserGuide/select.html create mode 100644 previews/PR477/UserGuide/types.html create mode 100644 previews/PR477/UserGuide/write.html create mode 100644 previews/PR477/api.html create mode 100644 previews/PR477/assets/UserGuide_cache.md.C8q_gcEI.js create mode 100644 previews/PR477/assets/UserGuide_cache.md.C8q_gcEI.lean.js create mode 100644 previews/PR477/assets/UserGuide_chunk.md.1uXbhaU1.js create mode 100644 previews/PR477/assets/UserGuide_chunk.md.1uXbhaU1.lean.js create mode 100644 previews/PR477/assets/UserGuide_combine.md.C1vyA2or.js create mode 100644 previews/PR477/assets/UserGuide_combine.md.C1vyA2or.lean.js create mode 100644 previews/PR477/assets/UserGuide_compute.md.DcvjuWd2.js create mode 100644 previews/PR477/assets/UserGuide_compute.md.DcvjuWd2.lean.js create mode 100644 previews/PR477/assets/UserGuide_convert.md.DfXE0j4J.js create mode 100644 previews/PR477/assets/UserGuide_convert.md.DfXE0j4J.lean.js create mode 100644 previews/PR477/assets/UserGuide_create.md.52g4xNHB.js create mode 100644 previews/PR477/assets/UserGuide_create.md.52g4xNHB.lean.js create mode 100644 previews/PR477/assets/UserGuide_faq.md.CbwaBwTY.js create mode 100644 previews/PR477/assets/UserGuide_faq.md.CbwaBwTY.lean.js create mode 100644 previews/PR477/assets/UserGuide_group.md.D6FXIAci.js create mode 100644 previews/PR477/assets/UserGuide_group.md.D6FXIAci.lean.js create mode 100644 previews/PR477/assets/UserGuide_read.md.DKTQLAM5.js create mode 100644 previews/PR477/assets/UserGuide_read.md.DKTQLAM5.lean.js create mode 100644 previews/PR477/assets/UserGuide_select.md.4hincmqf.js create mode 100644 previews/PR477/assets/UserGuide_select.md.4hincmqf.lean.js create mode 100644 previews/PR477/assets/UserGuide_types.md.C3SHQpVI.js create mode 100644 previews/PR477/assets/UserGuide_types.md.C3SHQpVI.lean.js create mode 100644 previews/PR477/assets/UserGuide_write.md.BM33QlO-.js create mode 100644 previews/PR477/assets/UserGuide_write.md.BM33QlO-.lean.js create mode 100644 previews/PR477/assets/api.md.C6JjwH0h.js create mode 100644 previews/PR477/assets/api.md.C6JjwH0h.lean.js create mode 100644 previews/PR477/assets/app.rVAEYvbf.js create mode 100644 previews/PR477/assets/chunks/@localSearchIndexroot.x2g7CFsQ.js create mode 100644 previews/PR477/assets/chunks/VPLocalSearchBox.BOmt0h0p.js create mode 100644 previews/PR477/assets/chunks/framework.CG45A19l.js create mode 100644 previews/PR477/assets/chunks/theme.BCktWg-s.js create mode 100644 previews/PR477/assets/dadyujg.CBBZcGwj.png create mode 100644 previews/PR477/assets/development_contribute.md.BsDNQ3F0.js create mode 100644 previews/PR477/assets/development_contribute.md.BsDNQ3F0.lean.js create mode 100644 previews/PR477/assets/development_contributors.md.D95rVXft.js create mode 100644 previews/PR477/assets/development_contributors.md.D95rVXft.lean.js create mode 100644 previews/PR477/assets/eycsiwg.B7KFIfDV.jpeg create mode 100644 previews/PR477/assets/get_started.md.Bwi4-TLM.js create mode 100644 previews/PR477/assets/get_started.md.Bwi4-TLM.lean.js create mode 100644 previews/PR477/assets/index.md.Ugqn9MWG.js create mode 100644 previews/PR477/assets/index.md.Ugqn9MWG.lean.js create mode 100644 previews/PR477/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 create mode 100644 previews/PR477/assets/inter-italic-cyrillic.By2_1cv3.woff2 create mode 100644 previews/PR477/assets/inter-italic-greek-ext.1u6EdAuj.woff2 create mode 100644 previews/PR477/assets/inter-italic-greek.DJ8dCoTZ.woff2 create mode 100644 previews/PR477/assets/inter-italic-latin-ext.CN1xVJS-.woff2 create mode 100644 previews/PR477/assets/inter-italic-latin.C2AdPX0b.woff2 create mode 100644 previews/PR477/assets/inter-italic-vietnamese.BSbpV94h.woff2 create mode 100644 previews/PR477/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 create mode 100644 previews/PR477/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 create mode 100644 previews/PR477/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 create mode 100644 previews/PR477/assets/inter-roman-greek.BBVDIX6e.woff2 create mode 100644 previews/PR477/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 create mode 100644 previews/PR477/assets/inter-roman-latin.Di8DUHzh.woff2 create mode 100644 previews/PR477/assets/inter-roman-vietnamese.BjW4sHH5.woff2 create mode 100644 previews/PR477/assets/lwcvkom.Cj9TSrtJ.png create mode 100644 previews/PR477/assets/ocamthh.96k_BqPR.jpeg create mode 100644 previews/PR477/assets/pvbkmme.BNwnPvkJ.jpeg create mode 100644 previews/PR477/assets/rllxrad.xrZxBsPv.jpeg create mode 100644 previews/PR477/assets/sdpqlwg.VVvPdzHG.png create mode 100644 previews/PR477/assets/style.uPsy6HuN.css create mode 100644 previews/PR477/assets/tutorials_mean_seasonal_cycle.md.Bc_ZMHev.js create mode 100644 previews/PR477/assets/tutorials_mean_seasonal_cycle.md.Bc_ZMHev.lean.js create mode 100644 previews/PR477/assets/tutorials_other_tutorials.md.Dvsi6Te_.js create mode 100644 previews/PR477/assets/tutorials_other_tutorials.md.Dvsi6Te_.lean.js create mode 100644 previews/PR477/assets/tutorials_plottingmaps.md.Gh5_YLq7.js create mode 100644 previews/PR477/assets/tutorials_plottingmaps.md.Gh5_YLq7.lean.js create mode 100644 previews/PR477/development/contribute.html create mode 100644 previews/PR477/development/contributors.html create mode 100644 previews/PR477/favicon.ico create mode 100644 previews/PR477/get_started.html create mode 100644 previews/PR477/hashmap.json create mode 100644 previews/PR477/index.html create mode 100644 previews/PR477/logo.png create mode 100644 previews/PR477/logo.svg create mode 100644 previews/PR477/siteinfo.js create mode 100644 previews/PR477/tutorials/mean_seasonal_cycle.html create mode 100644 previews/PR477/tutorials/other_tutorials.html create mode 100644 previews/PR477/tutorials/plottingmaps.html create mode 100644 previews/PR477/vp-icons.css diff --git a/previews/PR477/404.html b/previews/PR477/404.html new file mode 100644 index 00000000..53d23268 --- /dev/null +++ b/previews/PR477/404.html @@ -0,0 +1,25 @@ + + + + + + 404 | YAXArrays.jl + + + + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/previews/PR477/UserGuide/cache.html b/previews/PR477/UserGuide/cache.html new file mode 100644 index 00000000..9d164d8e --- /dev/null +++ b/previews/PR477/UserGuide/cache.html @@ -0,0 +1,32 @@ + + + + + + Caching YAXArrays | YAXArrays.jl + + + + + + + + + + + + + + + + + +
Skip to content

Caching YAXArrays

For some applications like interactive plotting of large datasets it can not be avoided that the same data must be accessed several times. In these cases it can be useful to store recently accessed data in a cache. In YAXArrays this can be easily achieved using the cache function. For example, if we open a large dataset from a remote source and want to keep data in a cache of size 500MB one can use:

julia
using YAXArrays, Zarr
+ds = open_dataset("path/to/source")
+cachesize = 500 #MB
+cache(ds,maxsize = cachesize)

The above will wrap every array in the dataset into its own cache, where the 500MB are distributed equally across datasets. Alternatively individual caches can be applied to single YAXArrays

julia
yax = ds.avariable
+cache(yax,maxsize = 1000)
+ + + + \ No newline at end of file diff --git a/previews/PR477/UserGuide/chunk.html b/previews/PR477/UserGuide/chunk.html new file mode 100644 index 00000000..3a6d3a9c --- /dev/null +++ b/previews/PR477/UserGuide/chunk.html @@ -0,0 +1,125 @@ + + + + + + Chunk YAXArrays | YAXArrays.jl + + + + + + + + + + + + + + + + + +
Skip to content

Chunk YAXArrays

Thinking about chunking is important when it comes to analyzing your data, because in most situations this will not fit into memory, hence having the fastest read access to it is crucial for your workflows. For example, for geo-spatial data do you want fast access on time or space, or... think about it.

To determine the chunk size of the array representation on disk, call the setchunks function prior to saving.

Chunking YAXArrays

julia
using YAXArrays, Zarr
+a = YAXArray(rand(10,20))
+a_chunked = setchunks(a, (5,10))
+a_chunked.chunks
2×2 DiskArrays.GridChunks{2, Tuple{DiskArrays.RegularChunks, DiskArrays.RegularChunks}}:
+ (1:5, 1:10)   (1:5, 11:20)
+ (6:10, 1:10)  (6:10, 11:20)

And the saved file is also splitted into Chunks.

julia
f = tempname()
+savecube(a_chunked, f, backend=:zarr)
+Cube(f).chunks
2×2 DiskArrays.GridChunks{2, Tuple{DiskArrays.RegularChunks, DiskArrays.RegularChunks}}:
+ (1:5, 1:10)   (1:5, 11:20)
+ (6:10, 1:10)  (6:10, 11:20)

Alternatively chunk sizes can be given by dimension name, so the following results in the same chunks:

julia
a_chunked = setchunks(a, (Dim_2=10, Dim_1=5))
+a_chunked.chunks
2×2 DiskArrays.GridChunks{2, Tuple{DiskArrays.RegularChunks, DiskArrays.RegularChunks}}:
+ (1:5, 1:10)   (1:5, 11:20)
+ (6:10, 1:10)  (6:10, 11:20)

Chunking Datasets

Setchunks can also be applied to a Dataset.

Set Chunks by Axis

Set chunk size for each axis occuring in a Dataset. This will be applied to all variables in the dataset:

julia
using YAXArrays, Zarr
+ds = Dataset(x = YAXArray(rand(10,20)), y = YAXArray(rand(10)), z = YAXArray(rand(10,20,5)))
+dschunked = setchunks(ds, Dict("Dim_1"=>5, "Dim_2"=>10, "Dim_3"=>2))
+Cube(dschunked).chunks
2×2×3 DiskArrays.GridChunks{3, Tuple{DiskArrays.RegularChunks, DiskArrays.RegularChunks, DiskArrays.RegularChunks}}:
+[:, :, 1] =
+ (1:5, 1:10, 1:2)   (1:5, 11:20, 1:2)
+ (6:10, 1:10, 1:2)  (6:10, 11:20, 1:2)
+
+[:, :, 2] =
+ (1:5, 1:10, 3:4)   (1:5, 11:20, 3:4)
+ (6:10, 1:10, 3:4)  (6:10, 11:20, 3:4)
+
+[:, :, 3] =
+ (1:5, 1:10, 5:5)   (1:5, 11:20, 5:5)
+ (6:10, 1:10, 5:5)  (6:10, 11:20, 5:5)

Saving...

julia
f = tempname()
+savedataset(dschunked, path=f, driver=:zarr)
YAXArray Dataset
+Shared Axes: 
+  (↓ Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points)
+
+Variables: 
+y
+
+Variables with additional axes:
+  Additional Axes: 
+  (↓ Dim_2 Sampled{Int64} Base.OneTo(20) ForwardOrdered Regular Points,
+  → Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)
+  Variables: 
+  z
+
+  Additional Axes: 
+  (↓ Dim_2 Sampled{Int64} Base.OneTo(20) ForwardOrdered Regular Points)
+  Variables: 
+  x

Set chunking by Variable

The following will set the chunk size for each Variable separately and results in exactly the same chunking as the example above

julia
using YAXArrays, Zarr
+ds = Dataset(x = YAXArray(rand(10,20)), y = YAXArray(rand(10)), z = YAXArray(rand(10,20,5)))
+dschunked = setchunks(ds,(x = (5,10), y = Dict("Dim_1"=>5), z = (Dim_1 = 5, Dim_2 = 10, Dim_3 = 2)))
+Cube(dschunked).chunks
2×2×3 DiskArrays.GridChunks{3, Tuple{DiskArrays.RegularChunks, DiskArrays.RegularChunks, DiskArrays.RegularChunks}}:
+[:, :, 1] =
+ (1:5, 1:10, 1:2)   (1:5, 11:20, 1:2)
+ (6:10, 1:10, 1:2)  (6:10, 11:20, 1:2)
+
+[:, :, 2] =
+ (1:5, 1:10, 3:4)   (1:5, 11:20, 3:4)
+ (6:10, 1:10, 3:4)  (6:10, 11:20, 3:4)
+
+[:, :, 3] =
+ (1:5, 1:10, 5:5)   (1:5, 11:20, 5:5)
+ (6:10, 1:10, 5:5)  (6:10, 11:20, 5:5)

saving...

julia
f = tempname()
+savedataset(dschunked, path=f, driver=:zarr)
YAXArray Dataset
+Shared Axes: 
+  (↓ Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points)
+
+Variables: 
+y
+
+Variables with additional axes:
+  Additional Axes: 
+  (↓ Dim_2 Sampled{Int64} Base.OneTo(20) ForwardOrdered Regular Points,
+  → Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)
+  Variables: 
+  z
+
+  Additional Axes: 
+  (↓ Dim_2 Sampled{Int64} Base.OneTo(20) ForwardOrdered Regular Points)
+  Variables: 
+  x

Set chunking for all variables

The following code snippet only works when all member variables of the dataset have the same shape and sets the output chunks for all arrays.

julia
using YAXArrays, Zarr
+ds = Dataset(x = YAXArray(rand(10,20)), y = YAXArray(rand(10,20)), z = YAXArray(rand(10,20)))
+dschunked = setchunks(ds,(5,10))
+Cube(dschunked).chunks
2×2×3 DiskArrays.GridChunks{3, Tuple{DiskArrays.RegularChunks, DiskArrays.RegularChunks, DiskArrays.RegularChunks}}:
+[:, :, 1] =
+ (1:5, 1:10, 1:1)   (1:5, 11:20, 1:1)
+ (6:10, 1:10, 1:1)  (6:10, 11:20, 1:1)
+
+[:, :, 2] =
+ (1:5, 1:10, 2:2)   (1:5, 11:20, 2:2)
+ (6:10, 1:10, 2:2)  (6:10, 11:20, 2:2)
+
+[:, :, 3] =
+ (1:5, 1:10, 3:3)   (1:5, 11:20, 3:3)
+ (6:10, 1:10, 3:3)  (6:10, 11:20, 3:3)

saving...

julia
f = tempname()
+savedataset(dschunked, path=f, driver=:zarr)
YAXArray Dataset
+Shared Axes: 
+  (↓ Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(20) ForwardOrdered Regular Points)
+
+Variables: 
+x, y, z

Suggestions on how to improve or add to these examples is welcome.

+ + + + \ No newline at end of file diff --git a/previews/PR477/UserGuide/combine.html b/previews/PR477/UserGuide/combine.html new file mode 100644 index 00000000..075f0e19 --- /dev/null +++ b/previews/PR477/UserGuide/combine.html @@ -0,0 +1,55 @@ + + + + + + Combine YAXArrays | YAXArrays.jl + + + + + + + + + + + + + + + + + +
Skip to content

Combine YAXArrays

Data is often scattered across multiple files and corresponding arrays, e.g. one file per time step. This section describes methods on how to combine them into a single YAXArray.

cat along an existing dimension

Here we use cat to combine two arrays consisting of data from the first and the second half of a year into one single array containing the whole year. We glue the arrays along the first dimension using dims = 1: The resulting array whole_year still has one dimension, i.e. time, but with 12 instead of 6 elements.

julia
using YAXArrays
+
+first_half = YAXArray((Dim{:time}(1:6),), rand(6))
+second_half = YAXArray((Dim{:time}(7:12),), rand(6))
+whole_year = cat(first_half, second_half, dims = 1)
╭────────────────────────────────╮
+│ 12-element YAXArray{Float64,1} │
+├────────────────────────────────┴──────────────────────────────── dims ┐
+  ↓ time Sampled{Int64} [1, 2, …, 11, 12] ForwardOrdered Regular Points
+├───────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├───────────────────────────────────────────────────── loaded in memory ┤
+  data size: 96.0 bytes
+└───────────────────────────────────────────────────────────────────────┘

concatenatecubes to a new dimension

Here we use concatenatecubes to combine two arrays of different variables that have the same dimensions. The resulting array combined has an additional dimension variable indicating from which array the element values originates. Note that using a Dataset instead is a more flexible approach in handling different variables.

julia
using YAXArrays
+
+temperature = YAXArray((Dim{:time}(1:6),), rand(6))
+precipitation = YAXArray((Dim{:time}(1:6),), rand(6))
+cubes = [temperature,precipitation]
+var_axis = Dim{:variable}(["temp", "prep"])
+combined = concatenatecubes(cubes, var_axis)
╭─────────────────────────╮
+│ 6×2 YAXArray{Float64,2} │
+├─────────────────────────┴──────────────────────────────── dims ┐
+  ↓ time     Sampled{Int64} 1:6 ForwardOrdered Regular Points,
+  → variable Categorical{String} ["temp", "prep"] ReverseOrdered
+├────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├───────────────────────────────────────────────── loaded lazily ┤
+  data size: 96.0 bytes
+└────────────────────────────────────────────────────────────────┘
+ + + + \ No newline at end of file diff --git a/previews/PR477/UserGuide/compute.html b/previews/PR477/UserGuide/compute.html new file mode 100644 index 00000000..3dde6c49 --- /dev/null +++ b/previews/PR477/UserGuide/compute.html @@ -0,0 +1,433 @@ + + + + + + Compute YAXArrays | YAXArrays.jl + + + + + + + + + + + + + + + + + +
Skip to content

Compute YAXArrays

This section describes how to create new YAXArrays by performing operations on them.

  • Use arithmetics to add or multiply numbers to each element of an array

  • Use map to apply a more complex functions to every element of an array

  • Use mapslices to reduce a dimension, e.g. to get the mean over all time steps

  • Use mapCube to apply complex functions on an array that may change any dimensions

Let's start by creating an example dataset:

julia
using YAXArrays
+using Dates
+
+axlist = (
+    Dim{:time}(Date("2022-01-01"):Day(1):Date("2022-01-30")),
+    Dim{:lon}(range(1, 10, length=10)),
+    Dim{:lat}(range(1, 5, length=15)),
+)
+data = rand(30, 10, 15)
+properties = Dict(:origin => "user guide")
+a = YAXArray(axlist, data, properties)
╭──────────────────────────────╮
+│ 30×10×15 YAXArray{Float64,3} │
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+  → lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, String} with 1 entry:
+  :origin => "user guide"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 35.16 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Modify elements of a YAXArray

julia
a[1,2,3]
0.519282115735095
julia
a[1,2,3] = 42
42
julia
a[1,2,3]
42.0

WARNING

Some arrays, e.g. those saved in a cloud object storage are immutable making any modification of the data impossible.

Arithmetics

Add a value to all elements of an array and save it as a new array:

julia
a2 = a .+ 5
╭──────────────────────────────╮
+│ 30×10×15 YAXArray{Float64,3} │
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+  → lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, String} with 1 entry:
+  :origin => "user guide"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 35.16 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
a2[1,2,3] == a[1,2,3] + 5
true

map

Apply a function on every element of an array individually:

julia
offset = 5
+map(a) do x
+    (x + offset) / 2 * 3
+end
╭──────────────────────────────╮
+│ 30×10×15 YAXArray{Float64,3} │
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+  → lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, String} with 1 entry:
+  :origin => "user guide"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 35.16 KB
+└──────────────────────────────────────────────────────────────────────────────┘

This keeps all dimensions unchanged. Note, that here we can not access neighboring elements. In this case, we can use mapslices or mapCube instead. Each element of the array is processed individually.

The code runs very fast, because map applies the function lazily. Actual computation will be performed only on demand, e.g. when elements were explicitly requested or further computations were performed.

mapslices

Reduce the time dimension by calculating the average value of all points in time:

julia
import Statistics: mean
+mapslices(mean, a, dims="Time")
╭───────────────────────────────────────────╮
+│ 10×15 YAXArray{Union{Missing, Float64},2} │
+├───────────────────────────────────────────┴──────────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 1.17 KB
+└──────────────────────────────────────────────────────────────────────────────┘

There is no time dimension left, because there is only one value left after averaging all time steps. We can also calculate spatial means resulting in one value per time step:

julia
mapslices(mean, a, dims=("lat", "lon"))
╭────────────────────────────────────────────────╮
+│ 30-element YAXArray{Union{Missing, Float64},1} │
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 240.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

mapCube

mapCube is the most flexible way to apply a function over subsets of an array. Dimensions may be added or removed.

Operations over several YAXArrays

Here, we will define a simple function, that will take as input several YAXArrays. But first, let's load the necessary packages.

julia
using YAXArrays, Zarr
+using Dates

Define function in space and time

julia
f(lo, la, t) = (lo + la + Dates.dayofyear(t))
f (generic function with 1 method)

now, mapCube requires this function to be wrapped as follows

julia
function g(xout, lo, la, t)
+    xout .= f.(lo, la, t)
+end
g (generic function with 1 method)

INFO

Note the . after f, this is because we will slice across time, namely, the function is broadcasted along this dimension.

Here, we do create YAXArrays only with the desired dimensions as

julia
julia> lon = YAXArray(Dim{:lon}(range(1, 15)))
╭──────────────────────────────╮
+15-element YAXArray{Int64,1}
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+lon Sampled{Int64} 1:15 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 120.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘
julia
julia> lat = YAXArray(Dim{:lat}(range(1, 10)))
╭──────────────────────────────╮
+10-element YAXArray{Int64,1}
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+lat Sampled{Int64} 1:10 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 80.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

And a time Cube's Axis

julia
tspan = Date("2022-01-01"):Day(1):Date("2022-01-30")
+time = YAXArray(Dim{:time}(tspan))
╭─────────────────────────────╮
+│ 30-element YAXArray{Date,1} │
+├─────────────────────────────┴────────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 240.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

note that the following can be extended to arbitrary YAXArrays with additional data and dimensions.

Let's generate a new cube using mapCube and saving the output directly into disk.

julia
julia> gen_cube = mapCube(g, (lon, lat, time);
+           indims = (InDims(), InDims(), InDims("time")),
+           outdims = OutDims("time", overwrite=true, path="my_gen_cube.zarr", backend=:zarr,
+           outtype = Float32)
+           # max_cache=1e9
+       )
╭──────────────────────────────────────────────╮
+30×15×10 YAXArray{Union{Missing, Float32},3}
+├──────────────────────────────────────────────┴───────────────────────── dims ┐
+time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+lon  Sampled{Int64} 1:15 ForwardOrdered Regular Points,
+lat  Sampled{Int64} 1:10 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 1 entry:
+  "missing_value" => 1.0f32
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 17.58 KB
+└──────────────────────────────────────────────────────────────────────────────┘

"time axis goes first"

Note that currently the time axis in the output cube goes first.

Check that it is working

julia
julia> gen_cube.data[1, :, :]
15×10 Matrix{Union{Missing, Float32}}:
+  3.0   4.0   5.0   6.0   7.0   8.0   9.0  10.0  11.0  12.0
+  4.0   5.0   6.0   7.0   8.0   9.0  10.0  11.0  12.0  13.0
+  5.0   6.0   7.0   8.0   9.0  10.0  11.0  12.0  13.0  14.0
+  6.0   7.0   8.0   9.0  10.0  11.0  12.0  13.0  14.0  15.0
+  7.0   8.0   9.0  10.0  11.0  12.0  13.0  14.0  15.0  16.0
+  8.0   9.0  10.0  11.0  12.0  13.0  14.0  15.0  16.0  17.0
+  9.0  10.0  11.0  12.0  13.0  14.0  15.0  16.0  17.0  18.0
+ 10.0  11.0  12.0  13.0  14.0  15.0  16.0  17.0  18.0  19.0
+ 11.0  12.0  13.0  14.0  15.0  16.0  17.0  18.0  19.0  20.0
+ 12.0  13.0  14.0  15.0  16.0  17.0  18.0  19.0  20.0  21.0
+ 13.0  14.0  15.0  16.0  17.0  18.0  19.0  20.0  21.0  22.0
+ 14.0  15.0  16.0  17.0  18.0  19.0  20.0  21.0  22.0  23.0
+ 15.0  16.0  17.0  18.0  19.0  20.0  21.0  22.0  23.0  24.0
+ 16.0  17.0  18.0  19.0  20.0  21.0  22.0  23.0  24.0  25.0
+ 17.0  18.0  19.0  20.0  21.0  22.0  23.0  24.0  25.0  26.0

but, we can generate a another cube with a different output order as follows

julia
julia> gen_cube = mapCube(g, (lon, lat, time);
+           indims = (InDims("lon"), InDims(), InDims()),
+           outdims = OutDims("lon", overwrite=true, path="my_gen_cube.zarr", backend=:zarr,
+           outtype = Float32)
+           # max_cache=1e9
+       )
╭──────────────────────────────────────────────╮
+15×10×30 YAXArray{Union{Missing, Float32},3}
+├──────────────────────────────────────────────┴───────────────────────── dims ┐
+lon  Sampled{Int64} 1:15 ForwardOrdered Regular Points,
+lat  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 1 entry:
+  "missing_value" => 1.0f32
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 17.58 KB
+└──────────────────────────────────────────────────────────────────────────────┘

INFO

Note that now the broadcasted dimension is lon.

we can see this by slicing on the last dimension now

julia
gen_cube.data[:, :, 1]
15×10 Matrix{Union{Missing, Float32}}:
+  3.0   4.0   5.0   6.0   7.0   8.0   9.0  10.0  11.0  12.0
+  4.0   5.0   6.0   7.0   8.0   9.0  10.0  11.0  12.0  13.0
+  5.0   6.0   7.0   8.0   9.0  10.0  11.0  12.0  13.0  14.0
+  6.0   7.0   8.0   9.0  10.0  11.0  12.0  13.0  14.0  15.0
+  7.0   8.0   9.0  10.0  11.0  12.0  13.0  14.0  15.0  16.0
+  8.0   9.0  10.0  11.0  12.0  13.0  14.0  15.0  16.0  17.0
+  9.0  10.0  11.0  12.0  13.0  14.0  15.0  16.0  17.0  18.0
+ 10.0  11.0  12.0  13.0  14.0  15.0  16.0  17.0  18.0  19.0
+ 11.0  12.0  13.0  14.0  15.0  16.0  17.0  18.0  19.0  20.0
+ 12.0  13.0  14.0  15.0  16.0  17.0  18.0  19.0  20.0  21.0
+ 13.0  14.0  15.0  16.0  17.0  18.0  19.0  20.0  21.0  22.0
+ 14.0  15.0  16.0  17.0  18.0  19.0  20.0  21.0  22.0  23.0
+ 15.0  16.0  17.0  18.0  19.0  20.0  21.0  22.0  23.0  24.0
+ 16.0  17.0  18.0  19.0  20.0  21.0  22.0  23.0  24.0  25.0
+ 17.0  18.0  19.0  20.0  21.0  22.0  23.0  24.0  25.0  26.0

which outputs the same as the gen_cube.data[1, :, :] called above.

OutDims and YAXArray Properties

Here, we will consider different scenarios, namely how we deal with different input cubes and how to specify the output ones. We will illustrate this with the following test example and the subsequent function definitions.

julia
using YAXArrays, Dates
+using Zarr
+using Random
+
+axlist = (
+    Dim{:time}(Date("2022-01-01"):Day(1):Date("2022-01-05")),
+    Dim{:lon}(range(1, 4, length=4)),
+    Dim{:lat}(range(1, 3, length=3)),
+    Dim{:variables}(["a", "b"])
+)
+
+Random.seed!(123)
+data = rand(1:5, 5, 4, 3, 2)
+
+properties = Dict("description" => "multi dimensional test cube")
+yax_test = YAXArray(axlist, data, properties)
╭───────────────────────────╮
+│ 5×4×3×2 YAXArray{Int64,4} │
+├───────────────────────────┴──────────────────────────────────────────── dims ┐
+  ↓ time      Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-05") ForwardOrdered Regular Points,
+  → lon       Sampled{Float64} 1.0:1.0:4.0 ForwardOrdered Regular Points,
+  ↗ lat       Sampled{Float64} 1.0:1.0:3.0 ForwardOrdered Regular Points,
+  ⬔ variables Categorical{String} ["a", "b"] ForwardOrdered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, String} with 1 entry:
+  "description" => "multi dimensional test cube"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 960.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

One InDims to many OutDims

In the following function, note how the outputs are defined first and the inputs later.

julia
function one_to_many(xout_one, xout_two, xout_flat, xin_one)
+    xout_one .= f1.(xin_one)
+    xout_two .= f2.(xin_one)
+    xout_flat .= sum(xin_one)
+    return nothing
+end
+
+f1(xin) = xin + 1
+f2(xin) = xin + 2
f2 (generic function with 1 method)

now, we define InDims and OutDims:

julia
indims_one   = InDims("Time")
+# outputs dimension
+properties_one = Dict{String, Any}("name" => "plus_one")
+properties_two = Dict{String, Any}("name" => "plus_two")
+
+outdims_one = OutDims("Time"; properties=properties_one)
+outdims_two = OutDims("Time"; properties=properties_two)
+outdims_flat = OutDims(;) # it will get the default `layer` name if open as dataset
OutDims((), :auto, Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}(), false, Array, :input, 1)
julia
ds = mapCube(one_to_many, yax_test,
+    indims = indims_one,
+    outdims = (outdims_one, outdims_two, outdims_flat));

let's see the second output

julia
ds[2]
╭───────────────────────────────────────────╮
+│ 5×4×3×2 YAXArray{Union{Missing, Int64},4} │
+├───────────────────────────────────────────┴──────────────────────────── dims ┐
+  ↓ time      Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-05") ForwardOrdered Regular Points,
+  → lon       Sampled{Float64} 1.0:1.0:4.0 ForwardOrdered Regular Points,
+  ↗ lat       Sampled{Float64} 1.0:1.0:3.0 ForwardOrdered Regular Points,
+  ⬔ variables Categorical{String} ["a", "b"] ForwardOrdered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 1 entry:
+  "name" => "plus_two"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 960.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

Many InDims to many OutDims

Let's consider a second test set

julia
properties_2d = Dict("description" => "2d dimensional test cube")
+yax_2d = YAXArray(axlist[2:end], rand(-1:1, 4, 3, 2), properties_2d)
╭─────────────────────────╮
+│ 4×3×2 YAXArray{Int64,3} │
+├─────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ lon       Sampled{Float64} 1.0:1.0:4.0 ForwardOrdered Regular Points,
+  → lat       Sampled{Float64} 1.0:1.0:3.0 ForwardOrdered Regular Points,
+  ↗ variables Categorical{String} ["a", "b"] ForwardOrdered
+├─────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, String} with 1 entry:
+  "description" => "2d dimensional test cube"
+├─────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 192.0 bytes
+└─────────────────────────────────────────────────────────────────────────┘

The function definitions operating in this case are as follows

julia
function many_to_many(xout_one, xout_two, xout_flat, xin_one, xin_two, xin_drei)
+    xout_one .= f1.(xin_one)
+    xout_two .= f2mix.(xin_one, xin_two)
+    xout_flat .= sum(xin_drei) # this will reduce the time dimension if we set outdims = OutDims()
+    return nothing
+end
+f2mix(xin_xyt, xin_xy) = xin_xyt - xin_xy
f2mix (generic function with 1 method)

Specify path in OutDims

julia
indims_one   = InDims("Time")
+indims_2d   = InDims() # ? it matches only to the other 2 dimensions and uses the same values for each time step
+properties = Dict{String, Any}("name"=> "many_to_many_two")
+outdims_one = OutDims("Time")
+outdims_two = OutDims("Time"; path = "test_mm.zarr", properties)
+outdims_flat = OutDims()
OutDims((), :auto, Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}(), false, Array, :input, 1)
julia
ds = mapCube(many_to_many, (yax_test, yax_2d, yax_test),
+    indims = (indims_one, indims_2d, indims_one),
+    outdims = (outdims_one, outdims_two, outdims_flat));

And we can open the one that was saved directly to disk.

julia
ds_mm = open_dataset("test_mm.zarr")
YAXArray Dataset
+Shared Axes: 
+  (↓ Ti  Sampled{DateTime} [2022-01-01T00:00:00, …, 2022-01-05T00:00:00] ForwardOrdered Irregular Points,
+  → lon Sampled{Float64} 1.0:1.0:4.0 ForwardOrdered Regular Points,
+  ↗ lat Sampled{Float64} 1.0:1.0:3.0 ForwardOrdered Regular Points)
+
+Variables: 
+a, b

Different InDims names

Here, the goal is to operate at the pixel level (longitude, latitude), and then apply the corresponding function to the extracted values. Consider the following toy cubes:

julia
Random.seed!(123)
+data = rand(3.0:5.0, 5, 4, 3)
+
+axlist = (Dim{:lon}(1:4), Dim{:lat}(1:3), Dim{:depth}(1:7),)
+yax_2d = YAXArray(axlist, rand(-3.0:0.0, 4, 3, 7))
╭───────────────────────────╮
+│ 4×3×7 YAXArray{Float64,3} │
+├───────────────────────────┴───────────────────────── dims ┐
+  ↓ lon   Sampled{Int64} 1:4 ForwardOrdered Regular Points,
+  → lat   Sampled{Int64} 1:3 ForwardOrdered Regular Points,
+  ↗ depth Sampled{Int64} 1:7 ForwardOrdered Regular Points
+├───────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├───────────────────────────────────────── loaded in memory ┤
+  data size: 672.0 bytes
+└───────────────────────────────────────────────────────────┘

and

julia
Random.seed!(123)
+data = rand(3.0:5.0, 5, 4, 3)
+
+axlist = (Dim{:time}(Date("2022-01-01"):Day(1):Date("2022-01-05")),
+    Dim{:lon}(1:4), Dim{:lat}(1:3),)
+
+properties = Dict("description" => "multi dimensional test cube")
+yax_test = YAXArray(axlist, data, properties)
╭───────────────────────────╮
+│ 5×4×3 YAXArray{Float64,3} │
+├───────────────────────────┴──────────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-05") ForwardOrdered Regular Points,
+  → lon  Sampled{Int64} 1:4 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Int64} 1:3 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, String} with 1 entry:
+  "description" => "multi dimensional test cube"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 480.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

and the corresponding functions

julia
function mix_time_depth(xin_xyt, xin_xyz)
+    s = sum(abs.(xin_xyz))
+    return xin_xyt.^2 .+ s
+end
+
+function time_depth(xout, xin_one, xin_two)
+    xout .= mix_time_depth(xin_one, xin_two)
+    # Note also that there is no dot anymore in the function application!
+    return nothing
+end
time_depth (generic function with 1 method)

with the final mapCube operation as follows

julia
ds = mapCube(time_depth, (yax_test, yax_2d),
+    indims = (InDims("Time"), InDims("depth")), # ? anchor dimensions and then map over the others.
+    outdims = OutDims("Time"))
╭───────────────────────────────────────────╮
+│ 5×4×3 YAXArray{Union{Missing, Float64},3} │
+├───────────────────────────────────────────┴──────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-05") ForwardOrdered Regular Points,
+  → lon  Sampled{Int64} 1:4 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Int64} 1:3 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 480.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘
  • TODO:
    • Example passing additional arguments to function.

    • MovingWindow

    • Multiple variables outputs, OutDims, in the same YAXArray

Creating a vector array

Here we transform a raster array with spatial dimension lat and lon into a vector array having just one spatial dimension i.e. region. First, create the raster array:

julia
using YAXArrays
+using DimensionalData
+using Dates
+
+axlist = (
+    Dim{:time}(Date("2022-01-01"):Day(1):Date("2022-01-30")),
+    Dim{:lon}(range(1, 10, length=10)),
+    Dim{:lat}(range(1, 5, length=15)),
+)
+data = rand(30, 10, 15)
+raster_arr = YAXArray(axlist, data)
╭──────────────────────────────╮
+│ 30×10×15 YAXArray{Float64,3} │
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+  → lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 35.16 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Then, create a Matrix with the same spatial dimensions indicating to which region each point belongs to:

julia
regions_mat = map(Iterators.product(raster_arr.lon, raster_arr.lat)) do (lon, lat)
+    1 <= lon < 10 && 1 <= lat < 5 && return "A"
+    1 <= lon < 10 && 5 <= lat < 10 && return "B"
+    10 <= lon < 15 && 1 <= lat < 5 && return "C"
+    return "D"
+end
+regions_mat = DimArray(regions_mat, (raster_arr.lon, raster_arr.lat))
╭──────────────────────────╮
+│ 10×15 DimArray{String,2} │
+├──────────────────────────┴───────────────────────────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+└──────────────────────────────────────────────────────────────────────────────┘
+  ↓ →  1.0   1.28571  1.57143  1.85714  …  4.14286  4.42857  4.71429  5.0
+  1.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  2.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  3.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  4.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  5.0   "A"   "A"      "A"      "A"     …   "A"      "A"      "A"      "B"
+  6.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  7.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  8.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  9.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+ 10.0   "C"   "C"      "C"      "C"     …   "C"      "C"      "C"      "D"

which has the same spatial dimensions as the raster array at any given point in time:

julia
DimArray(raster_arr[time = 1])
╭───────────────────────────╮
+│ 10×15 DimArray{Float64,2} │
+├───────────────────────────┴──────────────────────────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+└──────────────────────────────────────────────────────────────────────────────┘
+  ↓ →  1.0       1.28571   1.57143    …  4.42857   4.71429   5.0
+  1.0  0.17593   0.417937  0.0723492     0.178603  0.781773  0.875658
+  2.0  0.701332  0.15394   0.685454      0.372761  0.984803  0.472308
+  3.0  0.120997  0.829062  0.684389      0.463503  0.840389  0.536399
+  ⋮                                   ⋱                      ⋮
+  8.0  0.145747  0.432286  0.465103      0.889583  0.514979  0.671662
+  9.0  0.538981  0.497189  0.167676      0.595405  0.752417  0.93986
+ 10.0  0.824354  0.376135  0.551732   …  0.101524  0.121947  0.508557

Now we calculate the list of corresponding points for each region. This will be re-used for each point in time during the final mapCube. In addition, this avoids the allocation of unnecessary memory.

julia
regions = ["A", "B", "C", "D"]
+points_of_regions = map(enumerate(regions)) do (i,region)
+    region => findall(isequal(region), regions_mat)
+end |> Dict |> sort
OrderedCollections.OrderedDict{String, Vector{CartesianIndex{2}}} with 4 entries:
+  "A" => [CartesianIndex(1, 1), CartesianIndex(2, 1), CartesianIndex(3, 1), Car…
+  "B" => [CartesianIndex(1, 15), CartesianIndex(2, 15), CartesianIndex(3, 15), …
+  "C" => [CartesianIndex(10, 1), CartesianIndex(10, 2), CartesianIndex(10, 3), …
+  "D" => [CartesianIndex(10, 15)]

Finally, we can transform the entire raster array:

julia
vector_array = mapCube(
+    raster_arr,
+    indims=InDims("lon", "lat"),
+    outdims=OutDims(Dim{:region}(regions))
+) do xout, xin
+    for (region_pos, points) in enumerate(points_of_regions.vals)
+        # aggregate values of points in the current region at the current date
+        xout[region_pos] = sum(view(xin, points))
+    end
+end
╭──────────────────────────────────────────╮
+│ 4×30 YAXArray{Union{Missing, Float64},2} │
+├──────────────────────────────────────────┴───────────────────────────── dims ┐
+  ↓ region Categorical{String} ["A", "B", "C", "D"] ForwardOrdered,
+  → time   Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 960.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

This gives us a vector array with only one spatial dimension, i.e. the region. Note that we still have 30 points in time. The transformation was applied for each date separately.

Hereby, xin is a 10x15 array representing a map at a given time and xout is a 4 element vector of missing values initially representing the 4 regions at that date. Then, we set each output element by the sum of all corresponding points

Distributed Computation

All map methods apply a function on all elements of all non-input dimensions separately. This allows to run each map function call in parallel. For example, we can execute each date of a time series in a different CPU thread during spatial aggregation.

The following code does a time mean over all grid points using multiple CPUs of a local machine:

julia
using YAXArrays
+using Dates
+using Distributed
+
+axlist = (
+    Dim{:time}(Date("2022-01-01"):Day(1):Date("2022-01-30")),
+    Dim{:lon}(range(1, 10, length=10)),
+    Dim{:lat}(range(1, 5, length=15)),
+)
+data = rand(30, 10, 15)
+properties = Dict(:origin => "user guide")
+a = YAXArray(axlist, data, properties)
+
+addprocs(2)
+
+@everywhere begin
+  using YAXArrays
+  using Zarr
+  using Statistics
+end
+
+@everywhere function mymean(output, pixel)
+  @show "doing a mean"
+     output[:] .= mean(pixel)
+end
+
+mapCube(mymean, a, indims=InDims("time"), outdims=OutDims())

In the last example, mapCube was used to map the mymean function. mapslices is a convenient function that can replace mapCube, where you can omit defining an extra function with the output argument as an input (e.g. mymean). It is possible to simply use mapslice

julia
mapslices(mean  skipmissing, a, dims="time")

It is also possible to distribute easily the workload on a cluster, with little modification to the code. To do so, we use the ClusterManagers package.

julia
using Distributed
+using ClusterManagers
+addprocs(SlurmManager(10))
+ + + + \ No newline at end of file diff --git a/previews/PR477/UserGuide/convert.html b/previews/PR477/UserGuide/convert.html new file mode 100644 index 00000000..b5ae4392 --- /dev/null +++ b/previews/PR477/UserGuide/convert.html @@ -0,0 +1,105 @@ + + + + + + Convert YAXArrays | YAXArrays.jl + + + + + + + + + + + + + + + + + +
Skip to content

Convert YAXArrays

This section describes how to convert variables from types of other Julia packages into YAXArrays and vice versa.

WARNING

YAXArrays is designed to work with large datasets that are way larger than the memory. However, most types are designed to work in memory. Those conversions are only possible if the entire dataset fits into memory. In addition, metadata might be lost during conversion.

Convert Base.Array

Convert Base.Array to YAXArray:

julia
using YAXArrays
+
+m = rand(5,10)
+a = YAXArray(m)
╭──────────────────────────╮
+│ 5×10 YAXArray{Float64,2} │
+├──────────────────────────┴──────────────────────────────────── dims ┐
+  ↓ Dim_1 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points
+├─────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├─────────────────────────────────────────────────── loaded in memory ┤
+  data size: 400.0 bytes
+└─────────────────────────────────────────────────────────────────────┘

Convert YAXArray to Base.Array:

julia
m2 = collect(a.data)
5×10 Matrix{Float64}:
+ 0.265797  0.789891  0.611084  0.845983  …  0.918555  0.870826   0.348362
+ 0.665723  0.241882  0.426519  0.581312     0.949935  0.0214057  0.152534
+ 0.83556   0.456765  0.197238  0.645758     0.74732   0.652339   0.935631
+ 0.337926  0.151146  0.673373  0.169284     0.75269   0.166212   0.0358348
+ 0.594514  0.364288  0.78467   0.830391     0.128204  0.174934   0.0210077

Convert Raster

A Raster as defined in Rasters.jl has a same supertype of a YAXArray, i.e. AbstractDimArray, allowing easy conversion between those types:

julia
using Rasters
+
+lon, lat = X(25:1:30), Y(25:1:30)
+time = Ti(2000:2024)
+ras = Raster(rand(lon, lat, time))
+a = YAXArray(dims(ras), ras.data)
╭────────────────────────────╮
+│ 6×6×25 YAXArray{Float64,3} │
+├────────────────────────────┴────────────────────────── dims ┐
+  ↓ X  Sampled{Int64} 25:1:30 ForwardOrdered Regular Points,
+  → Y  Sampled{Int64} 25:1:30 ForwardOrdered Regular Points,
+  ↗ Ti Sampled{Int64} 2000:2024 ForwardOrdered Regular Points
+├─────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├─────────────────────────────────────────── loaded in memory ┤
+  data size: 7.03 KB
+└─────────────────────────────────────────────────────────────┘
julia
ras2 = Raster(a)
╭──────────────────────────╮
+│ 6×6×25 Raster{Float64,3} │
+├──────────────────────────┴──────────────────────────── dims ┐
+  ↓ X  Sampled{Int64} 25:1:30 ForwardOrdered Regular Points,
+  → Y  Sampled{Int64} 25:1:30 ForwardOrdered Regular Points,
+  ↗ Ti Sampled{Int64} 2000:2024 ForwardOrdered Regular Points
+├─────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├───────────────────────────────────────────────────── raster ┤
+  extent: Extent(X = (25, 30), Y = (25, 30), Ti = (2000, 2024))
+
+└─────────────────────────────────────────────────────────────┘
+[:, :, 1]
+  ↓ →  25         26          27          28         29         30
+ 25     0.862644   0.770949    0.0702532   0.973332   0.12568    0.938094
+ 26     0.203714   0.718667    0.916686    0.796375   0.376409   0.395234
+ 27     0.492817   0.0566881   0.617023    0.475725   0.870888   0.521991
+ 28     0.268675   0.215973    0.193109    0.687891   0.561549   0.81362
+ 29     0.540514   0.0620649   0.71314     0.225542   0.299637   0.762559
+ 30     0.872575   0.731779    0.926096    0.744521   0.21056    0.0593761

Convert DimArray

A DimArray as defined in DimensionalData.jl has a same supertype of a YAXArray, i.e. AbstractDimArray, allowing easy conversion between those types.

Convert DimArray to YAXArray:

julia
using DimensionalData
+using YAXArrayBase
+
+dim_arr = rand(X(1:5), Y(10.0:15.0), metadata = Dict{String, Any}())
+a = yaxconvert(YAXArray, dim_arr)
╭─────────────────────────╮
+│ 5×6 YAXArray{Float64,2} │
+├─────────────────────────┴────────────────────────────────── dims ┐
+  ↓ X Sampled{Int64} 1:5 ForwardOrdered Regular Points,
+  → Y Sampled{Float64} 10.0:1.0:15.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────── loaded in memory ┤
+  data size: 240.0 bytes
+└──────────────────────────────────────────────────────────────────┘

Convert YAXArray to DimArray:

julia
dim_arr2 = yaxconvert(DimArray, a)
╭─────────────────────────╮
+│ 5×6 DimArray{Float64,2} │
+├─────────────────────────┴────────────────────────────────── dims ┐
+  ↓ X Sampled{Int64} 1:5 ForwardOrdered Regular Points,
+  → Y Sampled{Float64} 10.0:1.0:15.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+└──────────────────────────────────────────────────────────────────┘
+ ↓ →  10.0       11.0       12.0        13.0       14.0       15.0
+ 1     0.340769   0.658321   0.0881736   0.630469   0.63593    0.229281
+ 2     0.536273   0.791138   0.47951     0.917969   0.686278   0.780824
+ 3     0.522262   0.237824   0.165853    0.662295   0.327439   0.793913
+ 4     0.365971   0.215988   0.520744    0.096862   0.625389   0.725765
+ 5     0.271209   0.521769   0.858065    0.162134   0.181798   0.425153

INFO

At the moment there is no support to save a DimArray directly into disk as a NetCDF or a Zarr file.

+ + + + \ No newline at end of file diff --git a/previews/PR477/UserGuide/create.html b/previews/PR477/UserGuide/create.html new file mode 100644 index 00000000..e31924c2 --- /dev/null +++ b/previews/PR477/UserGuide/create.html @@ -0,0 +1,75 @@ + + + + + + Create YAXArrays and Datasets | YAXArrays.jl + + + + + + + + + + + + + + + + + +
Skip to content

Create YAXArrays and Datasets

This section describes how to create arrays and datasets by filling values directly.

Create a YAXArray

We can create a new YAXArray by filling the values directly:

julia
using YAXArrays
+a1 = YAXArray(rand(10, 20, 5))
╭─────────────────────────────╮
+│ 10×20×5 YAXArray{Float64,3} │
+├─────────────────────────────┴────────────────────────────────── dims ┐
+  ↓ Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(20) ForwardOrdered Regular Points,
+  ↗ Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────── loaded in memory ┤
+  data size: 7.81 KB
+└──────────────────────────────────────────────────────────────────────┘

The dimensions have only generic names, e.g. Dim_1 and only integer values. We can also specify the dimensions with custom names enabling easier access:

julia
using Dates
+
+axlist = (
+    Dim{:time}(Date("2022-01-01"):Day(1):Date("2022-01-30")),
+    Dim{:lon}(range(1, 10, length=10)),
+    Dim{:lat}(range(1, 5, length=15)),
+)
+data2 = rand(30, 10, 15)
+properties = Dict(:origin => "user guide")
+a2 = YAXArray(axlist, data2, properties)
╭──────────────────────────────╮
+│ 30×10×15 YAXArray{Float64,3} │
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+  → lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, String} with 1 entry:
+  :origin => "user guide"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 35.16 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
a2.properties
Dict{Symbol, String} with 1 entry:
+  :origin => "user guide"
julia
a2.axes
(↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+→ lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points)

Create a Dataset

julia
data3 = rand(30, 10, 15)
+a3 = YAXArray(axlist, data3, properties)
+
+arrays = Dict(:a2 => a2, :a3 => a3)
+ds = Dataset(; properties, arrays...)
YAXArray Dataset
+Shared Axes: 
+  (↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+  → lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points)
+
+Variables: 
+a2, a3
+
+Properties: Dict(:origin => "user guide")
+ + + + \ No newline at end of file diff --git a/previews/PR477/UserGuide/faq.html b/previews/PR477/UserGuide/faq.html new file mode 100644 index 00000000..9bcb75a3 --- /dev/null +++ b/previews/PR477/UserGuide/faq.html @@ -0,0 +1,406 @@ + + + + + + Frequently Asked Questions (FAQ) | YAXArrays.jl + + + + + + + + + + + + + + + + + +
Skip to content

Frequently Asked Questions (FAQ)

The purpose of this section is to do a collection of small convinient pieces of code on how to do simple things.

Extract the axes names from a Cube

julia
using YAXArrays
+using DimensionalData
julia
julia> c = YAXArray(rand(10, 10, 5))
╭─────────────────────────────╮
+10×10×5 YAXArray{Float64,3}
+├─────────────────────────────┴────────────────────────────────────────── dims ┐
+Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 3.91 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
julia> caxes(c) # former way of doing it
(Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)

WARNING

To get the axes of a YAXArray use the dims function instead of the caxes function

julia
julia> dims(c)
(Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)

INFO

Also, use DD.rebuild(c, values) to copy axes from c and build a new cube but with different values.

rebuild

As an example let's consider the following

julia
using YAXArrays
+using DimensionalData
+
+c = YAXArray(ones(Int, 10,10))
╭─────────────────────────╮
+│ 10×10 YAXArray{Int64,2} │
+├─────────────────────────┴────────────────────────────────────── dims ┐
+  ↓ Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────── loaded in memory ┤
+  data size: 800.0 bytes
+└──────────────────────────────────────────────────────────────────────┘

then creating a new c with the same structure (axes) but different values is done by

julia
julia> new_c = rebuild(c, rand(10,10))
╭───────────────────────────╮
+10×10 YAXArray{Float64,2}
+├───────────────────────────┴──────────────────────────────────────────── dims ┐
+Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 800.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

note that the type is now Float64. Or, we could create a new structure but using the dimensions from yax explicitly

julia
julia> c_c = YAXArray(dims(c), rand(10,10))
╭───────────────────────────╮
+10×10 YAXArray{Float64,2}
+├───────────────────────────┴──────────────────────────────────────────── dims ┐
+Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 800.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

which achieves the same goal as rebuild.

Obtain values from axes and data from the cube

There are two options to collect values from axes. In this examples the axis ranges from 1 to 10.

These two examples bring the same result

julia
collect(getAxis("Dim_1", c).val)
+collect(c.axes[1].val)
10-element Vector{Int64}:
+  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10

to collect data from a cube works exactly the same as doing it from an array

julia
julia> c[:, :, 1]
╭─────────────────────────╮
+10×10 YAXArray{Int64,2}
+├─────────────────────────┴────────────────────────────────────────────── dims ┐
+Dim_1 Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} 1:10 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 800.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

How do I concatenate cubes

It is possible to concatenate several cubes that shared the same dimensions using the [concatenatecubes]@ref function.

Let's create two dummy cubes

julia
using YAXArrays
+axlist = (
+    Dim{:time}(range(1, 20, length=20)),
+    Dim{:lon}(range(1, 10, length=10)),
+    Dim{:lat}(range(1, 5, length=15))
+    )
+
+data1 = rand(20, 10, 15)
+ds1 = YAXArray(axlist, data1)
+
+data2 = rand(20, 10, 15)
+ds2 = YAXArray(axlist, data2)

Now we can concatenate ds1 and ds2:

julia
julia> dsfinal = concatenatecubes([ds1, ds2], Dim{:Variables}(["var1", "var2"]))
╭────────────────────────────────╮
+20×10×15×2 YAXArray{Float64,4}
+├────────────────────────────────┴─────────────────────────────────────── dims ┐
+time      Sampled{Float64} 1.0:1.0:20.0 ForwardOrdered Regular Points,
+lon       Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+lat       Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points,
+Variables Categorical{String} ["var1", "var2"] ForwardOrdered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 46.88 KB
+└──────────────────────────────────────────────────────────────────────────────┘

How do I subset a YAXArray ( Cube ) or Dataset?

These are the three main datatypes provided by the YAXArrays libray. You can find a description of them here. A Cube is no more than a YAXArray, so, we will not explicitly tell about a Cube.

Subsetting a YAXArray

Let's start by creating a dummy YAXArray.

Firstly, load the required libraries

julia
using YAXArrays
+using Dates # To generate the dates of the time axis
+using DimensionalData # To use the "Between" option for selecting data, however the intervals notation should be used instead, i.e. `a .. b`.

Define the time span of the YAXArray

julia
t = Date("2020-01-01"):Month(1):Date("2022-12-31")
Date("2020-01-01"):Dates.Month(1):Date("2022-12-01")

create YAXArray axes

julia
axes = (Dim{:Lon}(1:10), Dim{:Lat}(1:10), Dim{:Time}(t))
(↓ Lon  1:10,
+→ Lat  1:10,
+↗ Time Date("2020-01-01"):Dates.Month(1):Date("2022-12-01"))

create the YAXArray

julia
y = YAXArray(axes, reshape(1:3600, (10, 10, 36)))
╭────────────────────────────╮
+│ 10×10×36 YAXArray{Int64,3} │
+├────────────────────────────┴─────────────────────────────────────────── dims ┐
+  ↓ Lon  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  → Lat  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  ↗ Time Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 28.12 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Now we subset the YAXArray by any dimension.

Subset YAXArray by years

julia
ytime = y[Time=Between(Date(2021,1,1), Date(2021,12,31))]
╭────────────────────────────╮
+│ 10×10×12 YAXArray{Int64,3} │
+├────────────────────────────┴─────────────────────────────────────────── dims ┐
+  ↓ Lon  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  → Lat  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  ↗ Time Sampled{Date} Date("2021-01-01"):Dates.Month(1):Date("2021-12-01") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 9.38 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Subset YAXArray by a specific date

julia
ytime2 = y[Time=At(Date("2021-05-01"))]
╭─────────────────────────╮
+│ 10×10 YAXArray{Int64,2} │
+├─────────────────────────┴────────────────────────── dims ┐
+  ↓ Lon Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  → Lat Sampled{Int64} 1:10 ForwardOrdered Regular Points
+├──────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────── loaded in memory ┤
+  data size: 800.0 bytes
+└──────────────────────────────────────────────────────────┘

Subset YAXArray by a date range

julia
ytime3 = y[Time=Date("2021-05-01") .. Date("2021-12-01")]
╭───────────────────────────╮
+│ 10×10×8 YAXArray{Int64,3} │
+├───────────────────────────┴──────────────────────────────────────────── dims ┐
+  ↓ Lon  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  → Lat  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  ↗ Time Sampled{Date} Date("2021-05-01"):Dates.Month(1):Date("2021-12-01") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 6.25 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Subset YAXArray by longitude and latitude

julia
ylonlat = y[Lon=1 .. 5, Lat=5 .. 10]
╭──────────────────────────╮
+│ 5×6×36 YAXArray{Int64,3} │
+├──────────────────────────┴───────────────────────────────────────────── dims ┐
+  ↓ Lon  Sampled{Int64} 1:5 ForwardOrdered Regular Points,
+  → Lat  Sampled{Int64} 5:10 ForwardOrdered Regular Points,
+  ↗ Time Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 8.44 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Subsetting a Dataset

In a dataset, we can have several variables (YAXArrays) that share some or all of their dimensions.

Subsetting a Dataset whose variables share all their dimensions

This works for YAXArrays. Let's make an example.

julia
using YAXArrays
+using Dates # To generate the dates of the time axis
+using DimensionalData # To use the "Between" option for selecting data
+
+t = Date("2020-01-01"):Month(1):Date("2022-12-31")
+axes = (Dim{:Lon}(1:10), Dim{:Lat}(1:10), Dim{:Time}(t))
+
+var1 = YAXArray(axes, reshape(1:3600, (10, 10, 36)))
+var2 = YAXArray(axes, reshape((1:3600)*5, (10, 10, 36)))
+
+ds = Dataset(; var1=var1, var2=var2)
YAXArray Dataset
+Shared Axes: 
+  (↓ Lon  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  → Lat  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  ↗ Time Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points)
+
+Variables: 
+var1, var2
julia
ds_lonlat = ds[Lon=1 .. 5, Lat=5 .. 10]
YAXArray Dataset
+Shared Axes: 
+  (↓ Lon  Sampled{Int64} 1:5 ForwardOrdered Regular Points,
+  → Lat  Sampled{Int64} 5:10 ForwardOrdered Regular Points,
+  ↗ Time Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points)
+
+Variables: 
+var1, var2

Subsetting a Dataset whose variables share some but not all of their dimensions

In this case, if we subset by the common dimension/s, this works the same as for YAXArrays, Cubes, and datasets that share all their dimensions.

But we can also subset a variable by the values of another variable with which it shares some dimensions.

Warning

If your data is not loaded into memory, the selection will be too slow. So, you have load into memory, at least, the variable with which you make the selection.

Let's make an example.

julia
using YAXArrays
+using Dates # To generate the dates of the time axis
+using DimensionalData # To use the "Between" selector for selecting data
+
+t = Date("2020-01-01"):Month(1):Date("2022-12-31")
+common_axis = Dim{:points}(1:100)
+time_axis =   Dim{:Time}(t)
+
+# Note that longitudes and latitudes are not dimensions, but YAXArrays
+longitudes = YAXArray((common_axis,), rand(1:369, 100)) # 100 random values taken from 1 to 359
+latitudes  = YAXArray((common_axis,), rand(0:90, 100))  # 100 random values taken from 0 to 90
+temperature = YAXArray((common_axis, time_axis), rand(-40:40, (100, 36)))
+
+ds = Dataset(; longitudes=longitudes, latitudes=latitudes, temperature=temperature)
YAXArray Dataset
+Shared Axes: 
+  (↓ points Sampled{Int64} 1:100 ForwardOrdered Regular Points)
+
+Variables: 
+latitudes, longitudes
+
+Variables with additional axes:
+  Additional Axes: 
+  (↓ Time Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points)
+  Variables: 
+  temperature

Select all points between 20ºN and 85ºN, and 0ºE to 180ºE

julia
ds_subset = ds[points = Where(p-> ds["latitudes"][p]  >= 20 && ds["latitudes"][p]  <= 80 &&
+                             ds["longitudes"][p] >= 0  && ds["longitudes"][p] <= 180
+                             ) # Where
+              ] # ds
YAXArray Dataset
+Shared Axes: 
+None
+Variables with additional axes:
+  Additional Axes: 
+  (↓ points Sampled{Int64} [9, 13, …, 95, 100] ForwardOrdered Irregular Points)
+  Variables: 
+  longitudes
+
+  Additional Axes: 
+  (↓ points Sampled{Int64} [9, 13, …, 95, 100] ForwardOrdered Irregular Points)
+  Variables: 
+  latitudes
+
+  Additional Axes: 
+  (↓ points Sampled{Int64} [9, 13, …, 95, 100] ForwardOrdered Irregular Points,
+  → Time   Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points)
+  Variables: 
+  temperature

If your dataset has been read from a file with Cube it is not loaded into memory, and you have to load the latitudes and longitudes YAXArrays into memory:

julia
latitudes_yasxa  = readcubedata(ds["latitudes"])
+longitudes_yasxa = readcubedata(ds["longitudes"])
+ds_subset = ds[points = Where(p-> latitudes_yasxa[p]  >= 20 && latitudes_yasxa[p]  <= 80 &&
+                             longitudes_yasxa[p] >= 0  && longitudes_yasxa[p] <= 180
+                             ) # Where
+              ] # ds
YAXArray Dataset
+Shared Axes: 
+None
+Variables with additional axes:
+  Additional Axes: 
+  (↓ points Sampled{Int64} [9, 13, …, 95, 100] ForwardOrdered Irregular Points)
+  Variables: 
+  latitudes
+
+  Additional Axes: 
+  (↓ points Sampled{Int64} [9, 13, …, 95, 100] ForwardOrdered Irregular Points)
+  Variables: 
+  longitudes
+
+  Additional Axes: 
+  (↓ points Sampled{Int64} [9, 13, …, 95, 100] ForwardOrdered Irregular Points,
+  → Time   Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points)
+  Variables: 
+  temperature

How do I apply map algebra?

Our next step is map algebra computations. This can be done effectively using the 'map' function. For example:

Multiplying cubes with only spatio-temporal dimensions

julia
julia> map((x, y) -> x * y, ds1, ds2)
╭──────────────────────────────╮
+20×10×15 YAXArray{Float64,3}
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+time Sampled{Float64} 1.0:1.0:20.0 ForwardOrdered Regular Points,
+lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 23.44 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Cubes with more than 3 dimensions

julia
julia> map((x, y) -> x * y, dsfinal[Variables=At("var1")], dsfinal[Variables=At("var2")])
╭──────────────────────────────╮
+20×10×15 YAXArray{Float64,3}
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+time Sampled{Float64} 1.0:1.0:20.0 ForwardOrdered Regular Points,
+lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 23.44 KB
+└──────────────────────────────────────────────────────────────────────────────┘

To add some complexity, we will multiply each value for π and then divided for the sum of each time step. We will use the ds1 cube for this purpose.

julia
julia> mapslices(ds1, dims=("Lon", "Lat")) do xin
+           (xin * π) ./ maximum(skipmissing(xin))
+       end
╭──────────────────────────────────────────────╮
+10×15×20 YAXArray{Union{Missing, Float64},3}
+├──────────────────────────────────────────────┴───────────────────────── dims ┐
+lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points,
+time Sampled{Float64} 1.0:1.0:20.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 23.44 KB
+└──────────────────────────────────────────────────────────────────────────────┘

How do I use the CubeTable function?

The function "CubeTable" creates an iterable table and the result is a DataCube. It is therefore very handy for grouping data and computing statistics by class. It uses OnlineStats.jl to calculate statistics, and weighted statistics can be calculated as well.

Here we will use the ds1 Cube defined previously and we create a mask for data classification.

Cube containing a mask with classes 1, 2 and 3.

julia
julia> classes = YAXArray((getAxis("lon", dsfinal), getAxis("lat", dsfinal)), rand(1:3, 10, 15))
╭─────────────────────────╮
+10×15 YAXArray{Int64,2}
+├─────────────────────────┴────────────────────────────────────────────── dims ┐
+lon Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+lat Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 1.17 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
using GLMakie
+GLMakie.activate!()
+# This is how our classification map looks like
+fig, ax, obj = heatmap(classes;
+    colormap=Makie.Categorical(cgrad([:grey15, :orangered, :snow3])))
+cbar = Colorbar(fig[1,2], obj)
+fig

Now we define the input cubes that will be considered for the iterable table

julia
t = CubeTable(values=ds1, classes=classes)
Datacube iterator with 1 subtables with fields: (:values, :classes, :time, :lon, :lat)
julia
using DataFrames
+using OnlineStats
+## visualization of the CubeTable
+c_tbl = DataFrame(t[1])
+first(c_tbl, 5)

In this line we calculate the Mean for each class

julia
julia> fitcube = cubefittable(t, Mean, :values, by=(:classes))
╭───────────────────────────────────────────────╮
+3-element YAXArray{Union{Missing, Float64},1}
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+classes Sampled{Int64} [1, 2, 3] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 24.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

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.

julia
julia> fitcube = cubefittable(t, Mean, :values, by=(:classes, :time))
╭──────────────────────────────────────────╮
+3×20 YAXArray{Union{Missing, Float64},2}
+├──────────────────────────────────────────┴───────────────────────────── dims ┐
+classes Sampled{Int64} [1, 2, 3] ForwardOrdered Irregular Points,
+time    Sampled{Float64} 1.0:1.0:20.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 480.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

How do I assign variable names to YAXArrays in a Dataset

One variable name

julia
julia> ds = YAXArrays.Dataset(; (:a => YAXArray(rand(10)),)...)
YAXArray Dataset
+Shared Axes:
+  (Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points)
+
+Variables: 
+a

Multiple variable names

julia
keylist = (:a, :b, :c)
+varlist = (YAXArray(rand(10)), YAXArray(rand(10,5)), YAXArray(rand(2,5)))
julia
julia> ds = YAXArrays.Dataset(; (keylist .=> varlist)...)
YAXArray Dataset
+Shared Axes:
+None
+Variables with additional axes:
+  Additional Axes: 
+  (Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)
+  Variables: 
+  b
+
+  Additional Axes: 
+  (Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points)
+  Variables: 
+  a
+
+  Additional Axes: 
+  (Dim_1 Sampled{Int64} Base.OneTo(2) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)
+  Variables: 
+  c

WARNING

You will not be able to save this dataset, first you will need to rename those dimensions with the same name but different values.

Ho do I construct a Dataset from a TimeArray

In this section we will use MarketData.jl and TimeSeries.jl to simulate some stocks.

julia
using YAXArrays, DimensionalData
+using MarketData, TimeSeries
+
+stocks = Dict(:Stock1 => random_ohlcv(), :Stock2 => random_ohlcv(), :Stock3 => random_ohlcv())
+d_keys = keys(stocks)
KeySet for a Dict{Symbol, TimeSeries.TimeArray{Float64, 2, DateTime, Matrix{Float64}}} with 3 entries. Keys:
+  :Stock3
+  :Stock1
+  :Stock2

currently there is not direct support to obtain dims from a TimeArray, but we can code a function for it

julia
getTArrayAxes(ta::TimeArray) = (Dim{:time}(timestamp(ta)), Dim{:variable}(colnames(ta)), );

then, we create the YAXArrays as

julia
yax_list = [YAXArray(getTArrayAxes(stocks[k]), values(stocks[k])) for k in d_keys];

and a Dataset with all stocks names

julia
julia> ds = Dataset(; (d_keys .=> yax_list)...)
YAXArray Dataset
+Shared Axes:
+None
+Variables with additional axes:
+  Additional Axes: 
+  (time     Sampled{DateTime} [2020-01-01T00:00:00, …, 2020-01-21T19:00:00] ForwardOrdered Irregular Points,
+variable Categorical{Symbol} [:Open, :High, :Low, :Close, :Volume] Unordered)
+  Variables: 
+  Stock2
+
+  Additional Axes: 
+  (time     Sampled{DateTime} [2020-01-01T00:00:00, …, 2020-01-21T19:00:00] ForwardOrdered Irregular Points,
+variable Categorical{Symbol} [:Open, :High, :Low, :Close, :Volume] Unordered)
+  Variables: 
+  Stock1
+
+  Additional Axes: 
+  (time     Sampled{DateTime} [2020-01-01T00:00:00, …, 2020-01-21T19:00:00] ForwardOrdered Irregular Points,
+variable Categorical{Symbol} [:Open, :High, :Low, :Close, :Volume] Unordered)
+  Variables: 
+  Stock3

and, it looks like there some small differences in the axes, they are being printed independently although they should be the same. Well, they are at least at the == level but not at ===. We could use the axes from one YAXArray as reference and rebuild all the others

julia
yax_list = [rebuild(yax_list[1], values(stocks[k])) for k in d_keys];

and voilà

julia
julia> ds = Dataset(; (d_keys .=> yax_list)...)
YAXArray Dataset
+Shared Axes:
+  (time     Sampled{DateTime} [2020-01-01T00:00:00, …, 2020-01-21T19:00:00] ForwardOrdered Irregular Points,
+variable Categorical{Symbol} [:Open, :High, :Low, :Close, :Volume] Unordered)
+
+Variables: 
+Stock1, Stock2, Stock3

now they are printed together, showing that is exactly the same axis structure for all variables.

Create a YAXArray with unions containing Strings

julia
test_x = stack(Vector{Union{Int,String}}[[1, "Test"], [2, "Test2"]])
+yax_string = YAXArray(test_x)
╭──────────────────────────────────────╮
+│ 2×2 YAXArray{Union{Int64, String},2} │
+├──────────────────────────────────────┴──────────────────────── dims ┐
+  ↓ Dim_1 Sampled{Int64} Base.OneTo(2) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(2) ForwardOrdered Regular Points
+├─────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├─────────────────────────────────────────────────── loaded in memory ┤
+  summarysize: 121.0 bytes
+└─────────────────────────────────────────────────────────────────────┘

or simply with an Any type

julia
test_bool = ["Test1" 1 false; 2 "Test2" true; 1 2f0 1f2]
+yax_bool = YAXArray(test_bool)
╭─────────────────────╮
+│ 3×3 YAXArray{Any,2} │
+├─────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ Dim_1 Sampled{Int64} Base.OneTo(3) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(3) ForwardOrdered Regular Points
+├─────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├─────────────────────────────────────────────────── loaded in memory ┤
+  summarysize: 172.0 bytes
+└─────────────────────────────────────────────────────────────────────┘

WARNING

Note that although their creation is allowed, it is not possible to save these types into Zarr or NetCDF.

+ + + + \ No newline at end of file diff --git a/previews/PR477/UserGuide/group.html b/previews/PR477/UserGuide/group.html new file mode 100644 index 00000000..234aa790 --- /dev/null +++ b/previews/PR477/UserGuide/group.html @@ -0,0 +1,217 @@ + + + + + + Group YAXArrays and Datasets | YAXArrays.jl + + + + + + + + + + + + + + + + + +
Skip to content

Group YAXArrays and Datasets

The following examples will use the groupby function to calculate temporal and spatial averages.

julia
using YAXArrays, DimensionalData
+using NetCDF
+using Downloads
+using Dates
+using Statistics
[ Info: new driver key :netcdf, updating backendlist.

Seasonal Averages from Time Series of Monthly Means

The following reproduces the example in xarray by Joe Hamman.

Where the goal is to calculate the seasonal average. And in order to do this properly, is necessary to calculate the weighted average considering that each month has a different number of days.

Download the data

julia
url_path = "https://github.com/pydata/xarray-data/raw/master/rasm.nc"
+filename = Downloads.download(url_path, "rasm.nc")
+ds_o = Cube(filename)

WARNING

The following rebuild should not be necessary in the future, plus is unpractical to use for large data sets. Out of memory groupby currently is work in progress. Related to https://github.com/rafaqz/DimensionalData.jl/issues/642

julia
axs = dims(ds_o) # get the dimensions
+data = ds_o.data[:,:,:] # read the data
+_FillValue = ds_o.properties["_FillValue"]
+data = replace(data, _FillValue => NaN)
+# create new YAXArray
+ds = YAXArray(axs, data)

GroupBy: seasons

function weighted_seasons(ds) ... end
julia
function weighted_seasons(ds)
+    # calculate weights 
+    tempo = dims(ds, :Ti)
+    month_length = YAXArray((tempo,), daysinmonth.(tempo))
+    g_tempo = groupby(month_length, Ti => seasons(; start=December))
+    sum_days = sum.(g_tempo, dims=:Ti)
+    weights = map(./, g_tempo, sum_days)
+    # unweighted seasons
+    g_ds = groupby(ds, Ti => seasons(; start=December))
+    mean_g = mean.(g_ds, dims=:Ti)
+    mean_g = dropdims.(mean_g, dims=:Ti)
+    # weighted seasons
+    g_dsW = broadcast_dims.(*, weights, g_ds)
+    weighted_g = sum.(g_dsW, dims = :Ti);
+    weighted_g = dropdims.(weighted_g, dims=:Ti)
+    # differences
+    diff_g = map(.-, weighted_g, mean_g)
+    seasons_g = lookup(mean_g, :Ti)
+    return mean_g, weighted_g, diff_g, seasons_g
+end

Now, we continue with the groupby operations as usual

julia
julia> g_ds = groupby(ds, Ti => seasons(; start=December))
╭──────────────────────────────────────────────────╮
+4-element DimGroupByArray{YAXArray{Float64,2},1}
+├──────────────────────────────────────────────────┴───────────────────── dims ┐
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+├────────────────────────────────────────────────────────────────── group dims ┤
+x, y, Ti
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  275×205×9 YAXArray
+ :Mar_Apr_May  275×205×9 YAXArray
+ :Jun_Jul_Aug  275×205×9 YAXArray
+ :Sep_Oct_Nov  275×205×9 YAXArray

And the mean per season is calculated as follows

julia
julia> mean_g = mean.(g_ds, dims=:Ti)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Float64, 3, Array{Float64, 3}, Tuple{Dim{:x, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, Dim{:y, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, DimensionalData.Dimensions.Ti{DimensionalData.Dimensions.Lookups.Sampled{CFTime.DateTimeNoLeap, Vector{CFTime.DateTimeNoLeap}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Irregular{Tuple{Nothing, Nothing}}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, Dict{String, Any}},1}
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  …  [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 11.1372 11.3835; NaN NaN … 11.3252 11.5843;;;]
+ :Mar_Apr_May     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 21.1363 21.018; NaN NaN … 21.4325 21.1762;;;]
+ :Jun_Jul_Aug     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 28.2818 27.9432; NaN NaN … 28.619 28.0537;;;]
+ :Sep_Oct_Nov     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 21.7119 21.7158; NaN NaN … 21.9682 21.9404;;;]

dropdims

Note that now the time dimension has length one, we can use dropdims to remove it

julia
julia> mean_g = dropdims.(mean_g, dims=:Ti)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Float64, 2, Matrix{Float64}, Tuple{Dim{:x, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, Dim{:y, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, Dict{String, Any}},1}
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  …  [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 11.1372 11.3835; NaN NaN … 11.3252 11.5843]
+ :Mar_Apr_May     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 21.1363 21.018; NaN NaN … 21.4325 21.1762]
+ :Jun_Jul_Aug     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 28.2818 27.9432; NaN NaN … 28.619 28.0537]
+ :Sep_Oct_Nov     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 21.7119 21.7158; NaN NaN … 21.9682 21.9404]

seasons

Due to the groupby function we will obtain new grouping names, in this case in the time dimension:

julia
seasons_g = lookup(mean_g, :Ti)
Categorical{Symbol} Unordered
+wrapping: 4-element Vector{Symbol}:
+ :Dec_Jan_Feb
+ :Mar_Apr_May
+ :Jun_Jul_Aug
+ :Sep_Oct_Nov

Next, we will weight this grouping by days/month in each group.

GroupBy: weight

Create a YAXArray for the month length

julia
tempo = dims(ds, :Ti)
+month_length = YAXArray((tempo,), daysinmonth.(tempo))
╭──────────────────────────────╮
+│ 36-element YAXArray{Int64,1} │
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ Ti Sampled{CFTime.DateTimeNoLeap} [CFTime.DateTimeNoLeap(1980-09-16T12:00:00), …, CFTime.DateTimeNoLeap(1983-08-17T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 288.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

Now group it by season

julia
julia> g_tempo = groupby(month_length, Ti => seasons(; start=December))
╭────────────────────────────────────────────────╮
+4-element DimGroupByArray{YAXArray{Int64,0},1}
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+├────────────────────────────────────────────────────────────────── group dims ┤
+Ti
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  9-element YAXArray
+ :Mar_Apr_May  9-element YAXArray
+ :Jun_Jul_Aug  9-element YAXArray
+ :Sep_Oct_Nov  9-element YAXArray

Get the number of days per season

julia
julia> sum_days = sum.(g_tempo, dims=:Ti)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Int64, 1, Vector{Int64}, Tuple{DimensionalData.Dimensions.Ti{DimensionalData.Dimensions.Lookups.Sampled{CFTime.DateTimeNoLeap, Vector{CFTime.DateTimeNoLeap}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Irregular{Tuple{Nothing, Nothing}}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, Dict{String, Any}},1}
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  [270]
+ :Mar_Apr_May  [276]
+ :Jun_Jul_Aug  [276]
+ :Sep_Oct_Nov  [273]

weights

Weight the seasonal groups by sum_days

julia
julia> weights = map(./, g_tempo, sum_days)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Float64, 1, Vector{Float64}, Tuple{DimensionalData.Dimensions.Ti{DimensionalData.Dimensions.Lookups.Sampled{CFTime.DateTimeNoLeap, Vector{CFTime.DateTimeNoLeap}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Irregular{Tuple{Nothing, Nothing}}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, Dict{String, Any}},1} groupby
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  …  [0.114815, 0.114815, 0.103704, 0.114815, 0.114815, 0.103704, 0.114815, 0.114815, 0.103704]
+ :Mar_Apr_May     [0.112319, 0.108696, 0.112319, 0.112319, 0.108696, 0.112319, 0.112319, 0.108696, 0.112319]
+ :Jun_Jul_Aug     [0.108696, 0.112319, 0.112319, 0.108696, 0.112319, 0.112319, 0.108696, 0.112319, 0.112319]
+ :Sep_Oct_Nov     [0.10989, 0.113553, 0.10989, 0.10989, 0.113553, 0.10989, 0.10989, 0.113553, 0.10989]

Verify that the sum per season is 1

julia
julia> sum.(weights)
╭───────────────────────────────╮
+4-element DimArray{Float64,1}
+├───────────────────────────────┴──────────────────────────────────────── dims ┐
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  1.0
+ :Mar_Apr_May  1.0
+ :Jun_Jul_Aug  1.0
+ :Sep_Oct_Nov  1.0

weighted seasons

Now, let's weight the seasons

julia
julia> g_dsW = broadcast_dims.(*, weights, g_ds)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Float64, 3, Array{Float64, 3}, Tuple{DimensionalData.Dimensions.Ti{DimensionalData.Dimensions.Lookups.Sampled{CFTime.DateTimeNoLeap, Vector{CFTime.DateTimeNoLeap}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Irregular{Tuple{Nothing, Nothing}}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, Dim{:x, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, Dim{:y, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, DimensionalData.Dimensions.Lookups.NoMetadata},1}
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  …  [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; … ;;; NaN NaN … 1.32149 1.33565; NaN NaN … 1.29564 1.32555; … ; NaN NaN … 1.3188 1.3169; NaN NaN … 1.17863 1.18434;;; NaN NaN … 1.29816 1.34218; NaN NaN … 1.30113 1.35483; … ; NaN NaN … 1.30142 1.31753; NaN NaN … 1.16258 1.17647;;; NaN NaN … 1.34549 1.37878; NaN NaN … 1.36836 1.41634; … ; NaN NaN … 1.34832 1.38364; NaN NaN … 1.17852 1.16713]
+ :Mar_Apr_May     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; … ;;; NaN NaN … 1.87705 1.90365; NaN NaN … 2.30018 2.35432; … ; NaN NaN … 2.41049 2.43254; NaN NaN … 2.65105 2.69085;;; NaN NaN … 1.86457 1.90712; NaN NaN … 2.2894 2.34818; … ; NaN NaN … 2.3866 2.41241; NaN NaN … 2.61197 2.64976;;; NaN NaN … 1.89237 1.8984; NaN NaN … 2.29473 2.312; … ; NaN NaN … 2.36142 2.36126; NaN NaN … 2.56632 2.59085]
+ :Jun_Jul_Aug     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; … ;;; NaN NaN … 3.21209 3.25153; NaN NaN … 3.23 3.28008; … ; NaN NaN … 3.12575 3.15532; NaN NaN … 3.2434 3.26274;;; NaN NaN … 3.17434 3.21699; NaN NaN … 3.18892 3.24375; … ; NaN NaN … 3.06755 3.1083; NaN NaN … 3.19241 3.22211;;; NaN NaN … 3.1437 3.15644; NaN NaN … 3.16631 3.18583; … ; NaN NaN … 3.03361 3.05846; NaN NaN … 3.16581 3.16824]
+ :Sep_Oct_Nov     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; … ;;; NaN NaN … 2.97047 3.00388; NaN NaN … 2.77587 2.80759; … ; NaN NaN … 2.60175 2.60918; NaN NaN … 1.4947 1.52419;;; NaN NaN … 2.94534 2.97649; NaN NaN … 2.75891 2.79502; … ; NaN NaN … 2.57695 2.59212; NaN NaN … 1.46506 1.49909;;; NaN NaN … 2.9192 2.93743; NaN NaN … 2.7593 2.77687; … ; NaN NaN … 2.57873 2.63006; NaN NaN … 1.48367 1.50089]

apply a sum over the time dimension and drop it

julia
julia> weighted_g = sum.(g_dsW, dims = :Ti);
+
+julia> weighted_g = dropdims.(weighted_g, dims=:Ti)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Float64, 2, Matrix{Float64}, Tuple{Dim{:x, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, Dim{:y, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, DimensionalData.Dimensions.Lookups.NoMetadata},1}
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  …  [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 11.1181 11.372; NaN NaN … 11.3069 11.5743]
+ :Mar_Apr_May     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 21.1242 21.0057; NaN NaN … 21.4198 21.1644]
+ :Jun_Jul_Aug     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 28.2747 27.9362; NaN NaN … 28.6122 28.0465]
+ :Sep_Oct_Nov     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 21.73 21.7341; NaN NaN … 21.986 21.959]

Calculate the differences

julia
julia> diff_g = map(.-, weighted_g, mean_g)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Float64, 2, Matrix{Float64}, Tuple{Dim{:x, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, Dim{:y, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, DimensionalData.Dimensions.Lookups.NoMetadata},1}
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  …  [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … -0.019016 -0.0115514; NaN NaN … -0.0183003 -0.00990356]
+ :Mar_Apr_May     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … -0.0121037 -0.0123091; NaN NaN … -0.0127077 -0.0117519]
+ :Jun_Jul_Aug     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … -0.00709111 -0.00693713; NaN NaN … -0.00684233 -0.00722034]
+ :Sep_Oct_Nov     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 0.0180572 0.0182373; NaN NaN … 0.0178074 0.018571]

All the previous steps are equivalent to calling the function defined at the top:

julia
mean_g, weighted_g, diff_g, seasons_g = weighted_seasons(ds)

Once all calculations are done we can plot the results with Makie.jl as follows:

julia
using CairoMakie
+# define plot arguments/attributes
+colorrange = (-30,30)
+colormap = Reverse(:Spectral)
+highclip = :red
+lowclip = :grey15
+cb_label =  ds_o.properties["long_name"]
"Surface air temperature"
julia
with_theme(theme_ggplot2()) do
+    hm_o, hm_d, hm_w = nothing, nothing, nothing
+    # the figure
+    fig = Figure(; size = (850,500))
+    axs = [Axis(fig[i,j], aspect=DataAspect()) for i in 1:3, j in 1:4]
+    for (j, s) in enumerate(seasons_g)
+        hm_o = heatmap!(axs[1,j], mean_g[Ti=At(s)]; colorrange, lowclip, highclip, colormap)
+        hm_w = heatmap!(axs[2,j], weighted_g[Ti=At(s)]; colorrange, lowclip, highclip, colormap)
+        hm_d = heatmap!(axs[3,j], diff_g[Ti=At(s)]; colorrange=(-0.1,0.1), lowclip, highclip,
+            colormap=:diverging_bwr_20_95_c54_n256)
+    end
+    Colorbar(fig[1:2,5], hm_o, label=cb_label)
+    Colorbar(fig[3,5], hm_d, label="Tair")
+    hidedecorations!.(axs, grid=false, ticks=false, label=false)
+    # some labels
+    [axs[1,j].title = string.(s) for (j,s) in enumerate(seasons_g)]
+    Label(fig[0,1:5], "Seasonal Surface Air Temperature", fontsize=18, font=:bold)
+    axs[1,1].ylabel = "Unweighted"
+    axs[2,1].ylabel = "Weighted"
+    axs[3,1].ylabel = "Difference"
+    colgap!(fig.layout, 5)
+    rowgap!(fig.layout, 5)
+    fig
+end

which shows a good agreement with the results first published by Joe Hamman.

+ + + + \ No newline at end of file diff --git a/previews/PR477/UserGuide/read.html b/previews/PR477/UserGuide/read.html new file mode 100644 index 00000000..b5f5cf3b --- /dev/null +++ b/previews/PR477/UserGuide/read.html @@ -0,0 +1,145 @@ + + + + + + Read YAXArrays and Datasets | YAXArrays.jl + + + + + + + + + + + + + + + + + +
Skip to content

Read YAXArrays and Datasets

This section describes how to read files, URLs, and directories into YAXArrays and datasets.

Read Zarr

Open a Zarr store as a Dataset:

julia
using YAXArrays
+using Zarr
+path="gs://cmip6/CMIP6/ScenarioMIP/DKRZ/MPI-ESM1-2-HR/ssp585/r1i1p1f1/3hr/tas/gn/v20190710/"
+store = zopen(path, consolidated=true)
+ds = open_dataset(store)
YAXArray Dataset
+Shared Axes: 
+None
+Variables: 
+height
+
+Variables with additional axes:
+  Additional Axes: 
+  (↓ lon Sampled{Float64} 0.0:0.9375:359.0625 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} [-89.28422753251364, -88.35700351866494, …, 88.35700351866494, 89.28422753251364] ForwardOrdered Irregular Points,
+  ↗ Ti  Sampled{DateTime} [2015-01-01T03:00:00, …, 2101-01-01T00:00:00] ForwardOrdered Irregular Points)
+  Variables: 
+  tas
+
+Properties: Dict{String, Any}("initialization_index" => 1, "realm" => "atmos", "variable_id" => "tas", "external_variables" => "areacella", "branch_time_in_child" => 60265.0, "data_specs_version" => "01.00.30", "history" => "2019-07-21T06:26:13Z ; CMOR rewrote data to be consistent with CMIP6, CF-1.7 CMIP-6.2 and CF standards.", "forcing_index" => 1, "parent_variant_label" => "r1i1p1f1", "table_id" => "3hr"…)

We can set path to a URL, a local directory, or in this case to a cloud object storage path.

A zarr store may contain multiple arrays. Individual arrays can be accessed using subsetting:

julia
ds.tas
╭────────────────────────────────────╮
+│ 384×192×251288 YAXArray{Float32,3} │
+├────────────────────────────────────┴─────────────────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 0.0:0.9375:359.0625 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} [-89.28422753251364, -88.35700351866494, …, 88.35700351866494, 89.28422753251364] ForwardOrdered Irregular Points,
+  ↗ Ti  Sampled{DateTime} [2015-01-01T03:00:00, …, 2101-01-01T00:00:00] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"         => "K"
+  "history"       => "2019-07-21T06:26:13Z altered by CMOR: Treated scalar dime…
+  "name"          => "tas"
+  "cell_methods"  => "area: mean time: point"
+  "cell_measures" => "area: areacella"
+  "long_name"     => "Near-Surface Air Temperature"
+  "coordinates"   => "height"
+  "standard_name" => "air_temperature"
+  "_FillValue"    => 1.0f20
+  "comment"       => "near-surface (usually, 2 meter) air temperature"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 69.02 GB
+└──────────────────────────────────────────────────────────────────────────────┘

Read NetCDF

Open a NetCDF file as a Dataset:

julia
using YAXArrays
+using NetCDF
+using Downloads: download
+
+path = download("https://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc", "example.nc")
+ds = open_dataset(path)
YAXArray Dataset
+Shared Axes: 
+  (↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points)
+
+Variables: 
+tos
+
+Properties: Dict{String, Any}("cmor_version" => 0.96f0, "references" => "Dufresne et al, Journal of Climate, 2015, vol XX, p 136", "realization" => 1, "Conventions" => "CF-1.0", "contact" => "Sebastien Denvil, sebastien.denvil@ipsl.jussieu.fr", "history" => "YYYY/MM/JJ: data generated; YYYY/MM/JJ+1 data transformed  At 16:37:23 on 01/11/2005, CMOR rewrote data to comply with CF standards and IPCC Fourth Assessment requirements", "table_id" => "Table O1 (13 November 2004)", "source" => "IPSL-CM4_v1 (2003) : atmosphere : LMDZ (IPSL-CM4_IPCC, 96x71x19) ; ocean ORCA2 (ipsl_cm4_v1_8, 2x2L31); sea ice LIM (ipsl_cm4_v", "title" => "IPSL  model output prepared for IPCC Fourth Assessment SRES A2 experiment", "experiment_id" => "SRES A2 experiment"…)

A NetCDF file may contain multiple arrays. Individual arrays can be accessed using subsetting:

julia
ds.tos
╭────────────────────────────────────────────────╮
+│ 180×170×24 YAXArray{Union{Missing, Float32},3} │
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 2.8 MB
+└──────────────────────────────────────────────────────────────────────────────┘

Please note that netCDF4 uses HDF5 which is not thread-safe in Julia. Add manual locks in your own code to avoid any data-race:

julia
my_lock = ReentrantLock()
+Threads.@threads for i in 1:10
+    @lock my_lock @info ds.tos[1, 1, 1]
+end
[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing

This code will ensure that the data is only accessed by one thread at a time, i.e. making it actual single-threaded but thread-safe.

Read GDAL (GeoTIFF, GeoJSON)

All GDAL compatible files can be read as a YAXArrays.Dataset after loading ArchGDAL:

julia
using YAXArrays
+using ArchGDAL
+using Downloads: download
+
+path = download("https://github.com/yeesian/ArchGDALDatasets/raw/307f8f0e584a39a050c042849004e6a2bd674f99/gdalworkshop/world.tif", "world.tif")
+ds = open_dataset(path)
YAXArray Dataset
+Shared Axes: 
+  (↓ X Sampled{Float64} -180.0:0.17578125:179.82421875 ForwardOrdered Regular Points,
+  → Y Sampled{Float64} 90.0:-0.17578125:-89.82421875 ReverseOrdered Regular Points)
+
+Variables: 
+Blue, Green, Red
+
+Properties: Dict{String, Any}("projection" => "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]")

Load data into memory

For datasets or variables that could fit in RAM, you might want to load them completely into memory. This can be done using the readcubedata function. As an example, let's use the NetCDF workflow; the same should be true for other cases.

readcubedata

julia
readcubedata(ds.tos)
╭────────────────────────────────────────────────╮
+│ 180×170×24 YAXArray{Union{Missing, Float32},3} │
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 2.8 MB
+└──────────────────────────────────────────────────────────────────────────────┘

Note how the loading status changes from loaded lazily to loaded in memory.

+ + + + \ No newline at end of file diff --git a/previews/PR477/UserGuide/select.html b/previews/PR477/UserGuide/select.html new file mode 100644 index 00000000..74604161 --- /dev/null +++ b/previews/PR477/UserGuide/select.html @@ -0,0 +1,321 @@ + + + + + + Select YAXArrays and Datasets | YAXArrays.jl + + + + + + + + + + + + + + + + + +
Skip to content

Select YAXArrays and Datasets

The dimensions or axes of an YAXArray are named making it easier to subset or query certain ranges of an array. Let's open an example Dataset used to select certain elements:

julia
using YAXArrays
+using NetCDF
+using Downloads: download
+
+path = download("https://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc", "example.nc")
+ds = open_dataset(path)
YAXArray Dataset
+Shared Axes: 
+  (↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points)
+
+Variables: 
+tos
+
+Properties: Dict{String, Any}("cmor_version" => 0.96f0, "references" => "Dufresne et al, Journal of Climate, 2015, vol XX, p 136", "realization" => 1, "Conventions" => "CF-1.0", "contact" => "Sebastien Denvil, sebastien.denvil@ipsl.jussieu.fr", "history" => "YYYY/MM/JJ: data generated; YYYY/MM/JJ+1 data transformed  At 16:37:23 on 01/11/2005, CMOR rewrote data to comply with CF standards and IPCC Fourth Assessment requirements", "table_id" => "Table O1 (13 November 2004)", "source" => "IPSL-CM4_v1 (2003) : atmosphere : LMDZ (IPSL-CM4_IPCC, 96x71x19) ; ocean ORCA2 (ipsl_cm4_v1_8, 2x2L31); sea ice LIM (ipsl_cm4_v", "title" => "IPSL  model output prepared for IPCC Fourth Assessment SRES A2 experiment", "experiment_id" => "SRES A2 experiment"…)

Select a YAXArray

Get the sea surface temperature of the Dataset:

julia
tos = ds.tos
╭────────────────────────────────────────────────╮
+│ 180×170×24 YAXArray{Union{Missing, Float32},3} │
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 2.8 MB
+└──────────────────────────────────────────────────────────────────────────────┘

which is the same as:

julia
tos = ds.cubes[:tos]
╭────────────────────────────────────────────────╮
+│ 180×170×24 YAXArray{Union{Missing, Float32},3} │
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 2.8 MB
+└──────────────────────────────────────────────────────────────────────────────┘

Select elements

Using positional integer indexing:

julia
tos[lon = 1, lat = 1]
╭────────────────────────────────────────────────╮
+│ 24-element YAXArray{Union{Missing, Float32},1} │
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+  ↓ Ti Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 96.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

Same but using named indexing:

julia
tos[lon = At(1), lat = At(-79.5)]
╭────────────────────────────────────────────────╮
+│ 24-element YAXArray{Union{Missing, Float32},1} │
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+  ↓ Ti Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 96.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

Using special types:

julia
using CFTime
+time1 = DateTime360Day(2001,01,16)
+tos[time = At(time1)]
╭─────────────────────────────────────────────╮
+│ 180×170 YAXArray{Union{Missing, Float32},2} │
+├─────────────────────────────────────────────┴───────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points
+├─────────────────────────────────────────────────────────────────────┴ metadata ┐
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├───────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 119.53 KB
+└────────────────────────────────────────────────────────────────────────────────┘

Select ranges

Here we subset an interval of a dimension using positional integer indexing.

julia
tos[lon = 1:10, lat = 1:10]
╭──────────────────────────────────────────────╮
+│ 10×10×24 YAXArray{Union{Missing, Float32},3} │
+├──────────────────────────────────────────────┴───────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:2.0:19.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:-70.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 9.38 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Same but using named indexing:

julia
tos[lon = At(1.0:2:19), lat = At(-79.5:1:-70.5)]
╭──────────────────────────────────────────────╮
+│ 10×10×24 YAXArray{Union{Missing, Float32},3} │
+├──────────────────────────────────────────────┴───────────────────────── dims ┐
+  ↓ lon Sampled{Float64} [1.0, 3.0, …, 17.0, 19.0] ForwardOrdered Irregular Points,
+  → lat Sampled{Float64} [-79.5, -78.5, …, -71.5, -70.5] ForwardOrdered Irregular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 9.38 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Read more about the At selector in the package DimensionalData. Get values within a tolerances:

julia
tos[lon = At(1:10; atol = 1)]
╭───────────────────────────────────────────────╮
+│ 10×170×24 YAXArray{Union{Missing, Float32},3} │
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+  ↓ lon Sampled{Float64} [1.0, 1.0, …, 9.0, 9.0] ForwardOrdered Irregular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 159.38 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Closed and open intervals

Although a Between(a,b) function is available in DimensionalData, is recommended to use instead the a .. b notation:

julia
tos[lon = 90 .. 180]
╭───────────────────────────────────────────────╮
+│ 45×170×24 YAXArray{Union{Missing, Float32},3} │
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 91.0:2.0:179.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 717.19 KB
+└──────────────────────────────────────────────────────────────────────────────┘

This describes a closed interval in which all points were included. More selectors from DimensionalData are available, such as Touches, Near, Where and Contains.

julia
using IntervalSets
julia
julia> tos[lon = OpenInterval(90, 180)]
╭───────────────────────────────────────────────╮
+45×170×24 YAXArray{Union{Missing, Float32},3}
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+lon Sampled{Float64} 91.0:2.0:179.0 ForwardOrdered Regular Points,
+lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 717.19 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
julia> tos[lon = ClosedInterval(90, 180)]
╭───────────────────────────────────────────────╮
+45×170×24 YAXArray{Union{Missing, Float32},3}
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+lon Sampled{Float64} 91.0:2.0:179.0 ForwardOrdered Regular Points,
+lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 717.19 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
julia> tos[lon =Interval{:open,:closed}(90,180)]
╭───────────────────────────────────────────────╮
+45×170×24 YAXArray{Union{Missing, Float32},3}
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+lon Sampled{Float64} 91.0:2.0:179.0 ForwardOrdered Regular Points,
+lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 717.19 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
julia> tos[lon =Interval{:closed,:open}(90,180)]
╭───────────────────────────────────────────────╮
+45×170×24 YAXArray{Union{Missing, Float32},3}
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+lon Sampled{Float64} 91.0:2.0:179.0 ForwardOrdered Regular Points,
+lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 717.19 KB
+└──────────────────────────────────────────────────────────────────────────────┘

See tutorials for use cases.

Get a dimension

Get values, .e.g., axis tick labels, of a dimension that can be used for subseting:

julia
collect(tos.lat)
170-element Vector{Float64}:
+ -79.5
+ -78.5
+ -77.5
+ -76.5
+ -75.5
+ -74.5
+ -73.5
+ -72.5
+ -71.5
+ -70.5
+
+  81.5
+  82.5
+  83.5
+  84.5
+  85.5
+  86.5
+  87.5
+  88.5
+  89.5

These values are defined as lookups in the package DimensionalData:

julia
lookup(tos, :lon)
Sampled{Float64} ForwardOrdered Regular DimensionalData.Dimensions.Lookups.Points
+wrapping: 1.0:2.0:359.0

which is equivalent to:

julia
tos.lon.val
Sampled{Float64} ForwardOrdered Regular DimensionalData.Dimensions.Lookups.Points
+wrapping: 1.0:2.0:359.0
+ + + + \ No newline at end of file diff --git a/previews/PR477/UserGuide/types.html b/previews/PR477/UserGuide/types.html new file mode 100644 index 00000000..b2976b11 --- /dev/null +++ b/previews/PR477/UserGuide/types.html @@ -0,0 +1,28 @@ + + + + + + Types | YAXArrays.jl + + + + + + + + + + + + + + + + + +
Skip to content

Types

This section describes the data structures used to work with n-dimensional arrays in YAXArrays.

YAXArray

An Array stores a sequence of ordered elements of the same type usually across multiple dimensions or axes. For example, one can measure temperature across all time points of the time dimension or brightness values of a picture across X and Y dimensions. A one dimensional array is called Vector and a two dimensional array is called a Matrix. In many Machine Learning libraries, arrays are also called tensors. Arrays are designed to store dense spatial-temporal data stored in a grid, whereas a collection of sparse points is usually stored in data frames or relational databases.

A DimArray as defined by DimensionalData.jl adds names to the dimensions and their axes ticks for a given Array. These names can be used to access the data, e.g., by date instead of just by integer position.

A YAXArray is a subtype of a AbstractDimArray and adds functions to load and process the named arrays. For example, it can also handle very large arrays stored on disk that are too big to fit in memory. In addition, it provides functions for parallel computation.

Dataset

A Dataset is an ordered dictionary of YAXArrays that usually share dimensions. For example, it can bundle arrays storing temperature and precipitation that are measured at the same time points and the same locations. One also can store a picture in a Dataset with three arrays containing brightness values for red green and blue, respectively. Internally, those arrays are still separated allowing to chose different element types for each array. Analog to the (NetCDF Data Model)[https://docs.unidata.ucar.edu/netcdf-c/current/netcdf_data_model.html], a Dataset usually represents variables belonging to the same group.

(Data) Cube

A (Data) Cube is just a YAXArray in which arrays from a dataset are combined together by introducing a new dimension containing labels of which array the corresponding element came from. Unlike a Dataset, all arrays must have the same element type to be converted into a cube. This data structure is useful when we want to use all variables at once. For example, the arrays temperature and precipitation which are measured at the same locations and dates can be combined into a single cube. A more formal definition of Data Cubes are given in Mahecha et al. 2020

Dimension

A Dimension or axis as defined by DimensionalData.jl adds tick labels, e.g., to each row or column of an array. It's name is used to access particular subsets of that array.

+ + + + \ No newline at end of file diff --git a/previews/PR477/UserGuide/write.html b/previews/PR477/UserGuide/write.html new file mode 100644 index 00000000..4f57d615 --- /dev/null +++ b/previews/PR477/UserGuide/write.html @@ -0,0 +1,99 @@ + + + + + + Write YAXArrays and Datasets | YAXArrays.jl + + + + + + + + + + + + + + + + + +
Skip to content

Write YAXArrays and Datasets

Create an example Dataset:

julia
using YAXArrays
+using NetCDF
+using Downloads: download
+
+path = download("https://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc", "example.nc")
+ds = open_dataset(path)
YAXArray Dataset
+Shared Axes: 
+  (↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points)
+
+Variables: 
+tos
+
+Properties: Dict{String, Any}("cmor_version" => 0.96f0, "references" => "Dufresne et al, Journal of Climate, 2015, vol XX, p 136", "realization" => 1, "Conventions" => "CF-1.0", "contact" => "Sebastien Denvil, sebastien.denvil@ipsl.jussieu.fr", "history" => "YYYY/MM/JJ: data generated; YYYY/MM/JJ+1 data transformed  At 16:37:23 on 01/11/2005, CMOR rewrote data to comply with CF standards and IPCC Fourth Assessment requirements", "table_id" => "Table O1 (13 November 2004)", "source" => "IPSL-CM4_v1 (2003) : atmosphere : LMDZ (IPSL-CM4_IPCC, 96x71x19) ; ocean ORCA2 (ipsl_cm4_v1_8, 2x2L31); sea ice LIM (ipsl_cm4_v", "title" => "IPSL  model output prepared for IPCC Fourth Assessment SRES A2 experiment", "experiment_id" => "SRES A2 experiment"…)

Write Zarr

Save a single YAXArray to a directory:

julia
using Zarr
+savecube(ds.tos, "tos.zarr", driver=:zarr)

Save an entire Dataset to a directory:

julia
savedataset(ds, path="ds.zarr", driver=:zarr)

zarr compression

Save a dataset to Zarr format with compression:

julia
n = 9 # compression level, number between 0 (no compression) and 9 (max compression)
+compression = Zarr.BloscCompressor(; clevel=n)
+
+savedataset(ds; path="ds_c.zarr", driver=:zarr, compressor=compression)

More on Zarr Compressors. Also, if you use this option and don't notice a significant improvement, please feel free to open an issue or start a discussion.

Write NetCDF

Save a single YAXArray to a directory:

julia
using NetCDF
+savecube(ds.tos, "tos.nc", driver=:netcdf)

Save an entire Dataset to a directory:

julia
savedataset(ds, path="ds.nc", driver=:netcdf)

netcdf compression

Save a dataset to NetCDF format with compression:

julia
n = 7 # compression level, number between 0 (no compression) and 9 (max compression)
+savedataset(ds, path="ds_c.nc", driver=:netcdf, compress=n)

Comparing it to the default saved file

julia
ds_info = stat("ds.nc")
+ds_c_info = stat("ds_c.nc")
+println("File size: ", "default: ", ds_info.size, " bytes", ", compress: ", ds_c_info.size, " bytes")
File size: default: 2963858 bytes, compress: 1159914 bytes

Overwrite a Dataset

If a path already exists, an error will be thrown. Set overwrite=true to delete the existing dataset

julia
savedataset(ds, path="ds.zarr", driver=:zarr, overwrite=true)

DANGER

Again, setting overwrite will delete all your previous saved data.

Look at the doc string for more information

YAXArrays.Datasets.savedataset Function

savedataset(ds::Dataset; path = "", persist = nothing, overwrite = false, append = false, skeleton=false, backend = :all, driver = backend, max_cache = 5e8, writefac=4.0)

Saves a Dataset into a file at path with the format given by driver, i.e., driver=:netcdf or driver=:zarr.

Warning

overwrite = true, deletes ALL your data and it will create a new file.

source

Append to a Dataset

New variables can be added to an existing dataset using the append=true keyword.

julia
ds2 = Dataset(z = YAXArray(rand(10,20,5)))
+savedataset(ds2, path="ds.zarr", backend=:zarr, append=true)
julia
julia> open_dataset("ds.zarr", driver=:zarr)
YAXArray Dataset
+Shared Axes:
+None
+Variables with additional axes:
+  Additional Axes: 
+  (lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points)
+  Variables: 
+  tos
+
+  Additional Axes: 
+  (Dim_1 Sampled{Int64} 1:1:10 ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} 1:1:20 ForwardOrdered Regular Points,
+Dim_3 Sampled{Int64} 1:1:5 ForwardOrdered Regular Points)
+  Variables: 
+  z
+
+Properties: Dict{String, Any}("cmor_version" => 0.96, "references" => "Dufresne et al, Journal of Climate, 2015, vol XX, p 136", "realization" => 1, "contact" => "Sebastien Denvil, sebastien.denvil@ipsl.jussieu.fr", "Conventions" => "CF-1.0", "history" => "YYYY/MM/JJ: data generated; YYYY/MM/JJ+1 data transformed  At 16:37:23 on 01/11/2005, CMOR rewrote data to comply with CF standards and IPCC Fourth Assessment requirements", "table_id" => "Table O1 (13 November 2004)", "source" => "IPSL-CM4_v1 (2003) : atmosphere : LMDZ (IPSL-CM4_IPCC, 96x71x19) ; ocean ORCA2 (ipsl_cm4_v1_8, 2x2L31); sea ice LIM (ipsl_cm4_v", "title" => "IPSL  model output prepared for IPCC Fourth Assessment SRES A2 experiment", "experiment_id" => "SRES A2 experiment"…)

Save Skeleton

Sometimes one merely wants to create a datacube "Skeleton" on disk and gradually fill it with data. Here we make use of FillArrays to create a YAXArray and write only the axis data and array metadata to disk, while no actual array data is copied:

julia
using YAXArrays, Zarr, FillArrays

create the Zeros array

julia
julia> a = YAXArray(Zeros(Union{Missing, Float32},  5, 4, 5))
╭───────────────────────────────────────────╮
+5×4×5 YAXArray{Union{Missing, Float32},3}
+├───────────────────────────────────────────┴──────────────────────────── dims ┐
+Dim_1 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(4) ForwardOrdered Regular Points,
+Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 400.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

Now, save to disk with

julia
r = savecube(a, "skeleton.zarr", layername="skeleton", driver=:zarr, skeleton=true, overwrite=true)

WARNING

overwrite=true will delete your previous .zarr file before creating a new one.

Note also that if layername="skeleton" is not provided then the default name for the cube variable will be layer.

Now, we check that all the values are missing

julia
all(ismissing, r[:,:,:])
true

If using FillArrays is not possible, using the zeros function works as well, though it does allocate the array in memory.

INFO

The skeleton argument is also available for savedataset.

Using the toy array defined above we can do

julia
ds = Dataset(skeleton=a) # skeleton will the variable name
YAXArray Dataset
+Shared Axes: 
+  (↓ Dim_1 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(4) ForwardOrdered Regular Points,
+  ↗ Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)
+
+Variables: 
+skeleton
julia
ds_s = savedataset(ds, path="skeleton.zarr", driver=:zarr, skeleton=true, overwrite=true)

Update values of dataset

Now, we show how to start updating the array values. In order to do it we need to open the dataset first with writing w rights as follows:

julia
ds_open = zopen("skeleton.zarr", "w")
+ds_array = ds_open["skeleton"]
ZArray{Float32} of size 5 x 4 x 5

and then we simply update values by indexing them where necessary

julia
ds_array[:,:,1] = rand(Float32, 5, 4) # this will update values directly into disk!
5×4 Matrix{Float32}:
+ 0.720635  0.0188721  0.520406  0.471857
+ 0.882929  0.841123   0.497881  0.959899
+ 0.459041  0.761553   0.367809  0.414041
+ 0.223574  0.898926   0.647957  0.820737
+ 0.457984  0.839919   0.858795  0.1921

we can verify is this working by loading again directly from disk

julia
ds_open = open_dataset("skeleton.zarr")
+ds_array = ds_open["skeleton"]
+ds_array.data[:,:,1]
5×4 Matrix{Union{Missing, Float32}}:
+ 0.720635  0.0188721  0.520406  0.471857
+ 0.882929  0.841123   0.497881  0.959899
+ 0.459041  0.761553   0.367809  0.414041
+ 0.223574  0.898926   0.647957  0.820737
+ 0.457984  0.839919   0.858795  0.1921

indeed, those entries had been updated.

+ + + + \ No newline at end of file diff --git a/previews/PR477/api.html b/previews/PR477/api.html new file mode 100644 index 00000000..84487f50 --- /dev/null +++ b/previews/PR477/api.html @@ -0,0 +1,42 @@ + + + + + + API Reference | YAXArrays.jl + + + + + + + + + + + + + + + + + +
Skip to content

API Reference

This section describes all available functions of this package.

Public API

YAXArrays.getAxis Method
julia
getAxis(desc, c)

Given an Axis description and a cube, returns the corresponding axis of the cube. The Axis description can be:

  • the name as a string or symbol.

  • an Axis object

source

YAXArrays.Cubes Module

The functions provided by YAXArrays are supposed to work on different types of cubes. This module defines the interface for all Data types that

source

YAXArrays.Cubes.YAXArray Type
julia
YAXArray{T,N}

An array labelled with named axes that have values associated with them. It can wrap normal arrays or, more typically DiskArrays.

Fields

  • axes: Tuple of Dimensions containing the Axes of the Cube

  • data: length(axes)-dimensional array which holds the data, this can be a lazy DiskArray

  • properties: Metadata properties describing the content of the data

  • chunks: Representation of the chunking of the data

  • cleaner: Cleaner objects to track which objects to tidy up when the YAXArray goes out of scope

source

YAXArrays.Cubes.caxes Function

Returns the axes of a Cube

source

YAXArrays.Cubes.caxes Method
julia
caxes

Embeds Cube inside a new Cube

source

YAXArrays.Cubes.concatenatecubes Method
julia
function concatenateCubes(cubelist, cataxis::CategoricalAxis)

Concatenates a vector of datacubes that have identical axes to a new single cube along the new axis cataxis

source

YAXArrays.Cubes.readcubedata Method
julia
readcubedata(cube)

Given any array implementing the YAXArray interface it returns an in-memory YAXArray from it.

source

YAXArrays.Cubes.setchunks Method
julia
setchunks(c::YAXArray,chunks)

Resets the chunks of a YAXArray and returns a new YAXArray. Note that this will not change the chunking of the underlying data itself, it will just make the data "look" like it had a different chunking. If you need a persistent on-disk representation of this chunking, use savecube on the resulting array. The chunks argument can take one of the following forms:

  • a DiskArrays.GridChunks object

  • a tuple specifying the chunk size along each dimension

  • an AbstractDict or NamedTuple mapping one or more axis names to chunk sizes

source

YAXArrays.Cubes.subsetcube Function

This function calculates a subset of a cube's data

source

YAXArrays.DAT.InDims Type
julia
InDims(axisdesc...;...)

Creates a description of an Input Data Cube for cube operations. Takes a single or multiple axis descriptions as first arguments. Alternatively a MovingWindow(@ref) struct can be passed to include neighbour slices of one or more axes in the computation. Axes can be specified by their name (String), through an Axis type, or by passing a concrete axis.

Keyword arguments

  • artype how shall the array be represented in the inner function. Defaults to Array, alternatives are DataFrame or AsAxisArray

  • filter define some filter to skip the computation, e.g. when all values are missing. Defaults to AllMissing(), possible values are AnyMissing(), AnyOcean(), StdZero(), NValid(n) (for at least n non-missing elements). It is also possible to provide a custom one-argument function that takes the array and returns true if the compuation shall be skipped and false otherwise.

  • window_oob_value if one of the input dimensions is a MowingWindow, this value will be used to fill out-of-bounds areas

source

YAXArrays.DAT.MovingWindow Type
julia
MovingWindow(desc, pre, after)

Constructs a MovingWindow object to be passed to an InDims constructor to define that the axis in desc shall participate in the inner function (i.e. shall be looped over), but inside the inner function pre values before and after values after the center value will be passed as well.

For example passing MovingWindow("Time", 2, 0) will loop over the time axis and always pass the current time step plus the 2 previous steps. So in the inner function the array will have an additional dimension of size 3.

source

YAXArrays.DAT.OutDims Method
julia
OutDims(axisdesc;...)

Creates a description of an Output Data Cube for cube operations. Takes a single or a Vector/Tuple of axes as first argument. Axes can be specified by their name (String), through an Axis type, or by passing a concrete axis.

  • axisdesc: List of input axis names

  • backend : specifies the dataset backend to write data to, must be either :auto or a key in YAXArrayBase.backendlist

  • update : specifies wether the function operates inplace or if an output is returned

  • artype : specifies the Array type inside the inner function that is mapped over

  • chunksize: A Dict specifying the chunksizes for the output dimensions of the cube, or :input to copy chunksizes from input cube axes or :max to not chunk the inner dimensions

  • outtype: force the output type to a specific type, defaults to Any which means that the element type of the first input cube is used

source

YAXArrays.DAT.CubeTable Method
julia
CubeTable()

Function to turn a DataCube object into an iterable table. Takes a list of as arguments, specified as a name=cube expression. For example CubeTable(data=cube1,country=cube2) would generate a Table with the entries data and country, where data contains the values of cube1 and country the values of cube2. The cubes are matched and broadcasted along their axes like in mapCube.

source

YAXArrays.DAT.cubefittable Method
julia
cubefittable(tab,o,fitsym;post=getpostfunction(o),kwargs...)

Executes fittable on the CubeTable tab with the (Weighted-)OnlineStat o, looping through the values specified by fitsym. Finally, writes the results from the TableAggregator to an output data cube.

source

YAXArrays.DAT.fittable Method
julia
fittable(tab,o,fitsym;by=(),weight=nothing)

Loops through an iterable table tab and thereby fitting an OnlineStat o with the values specified through fitsym. Optionally one can specify a field (or tuple) to group by. Any groupby specifier can either be a symbol denoting the entry to group by or an anynymous function calculating the group from a table row.

For example the following would caluclate a weighted mean over a cube weighted by grid cell area and grouped by country and month:

julia
fittable(iter,WeightedMean,:tair,weight=(i->abs(cosd(i.lat))),by=(i->month(i.time),:country))

source

YAXArrays.DAT.mapCube Method
julia
mapCube(fun, cube, addargs...;kwargs...)
+
+Map a given function `fun` over slices of all cubes of the dataset `ds`. 
+Use InDims to discribe the input dimensions and OutDims to describe the output dimensions of the function.
+For Datasets, only one output cube can be specified.
+In contrast to the mapCube function for cubes, additional arguments for the inner function should be set as keyword arguments.
+
+For the specific keyword arguments see the docstring of the mapCube function for cubes.

source

YAXArrays.DAT.mapCube Method
julia
mapCube(fun, cube, addargs...;kwargs...)

Map a given function fun over slices of the data cube cube. The additional arguments addargs will be forwarded to the inner function fun. Use InDims to discribe the input dimensions and OutDims to describe the output dimensions of the function.

Keyword arguments

  • max_cache=YAXDefaults.max_cache Float64 maximum size of blocks that are read into memory in bits e.g. max_cache=5.0e8. Or String. e.g. max_cache="10MB" ormax_cache=1GB``` defaults to approx 10Mb.

  • indims::InDims List of input cube descriptors of type InDims for each input data cube.

  • outdims::OutDims List of output cube descriptors of type OutDims for each output cube.

  • inplace does the function write to an output array inplace or return a single value> defaults to true

  • ispar boolean to determine if parallelisation should be applied, defaults to true if workers are available.

  • showprog boolean indicating if a ProgressMeter shall be shown

  • include_loopvars boolean to indicate if the varoables looped over should be added as function arguments

  • nthreads number of threads for the computation, defaults to Threads.nthreads for every worker.

  • loopchunksize determines the chunk sizes of variables which are looped over, a dict

  • kwargs additional keyword arguments are passed to the inner function

The first argument is always the function to be applied, the second is the input cube or a tuple of input cubes if needed.

source

YAXArrays.Datasets.Dataset Type
julia
Dataset object which stores an `OrderedDict` of YAXArrays with Symbol keys.
+a dictionary of CubeAxes and a Dictionary of general properties.
+A dictionary can hold cubes with differing axes. But it will share the common axes between the subcubes.

source

YAXArrays.Datasets.Dataset Method

Dataset(; properties = Dict{String,Any}, cubes...)

Construct a YAXArray Dataset with global attributes properties a and a list of named YAXArrays cubes...

source

YAXArrays.Datasets.Cube Method
julia
Cube(ds::Dataset; joinname="Variable")

Construct a single YAXArray from the dataset ds by concatenating the cubes in the datset on the joinname dimension.

source

YAXArrays.Datasets.open_dataset Method

open_dataset(g; driver=:all)

Open the dataset at g with the given driver. The default driver will search for available drivers and tries to detect the useable driver from the filename extension.

source

YAXArrays.Datasets.open_mfdataset Method
julia
open_mfdataset(files::DD.DimVector{<:AbstractString}; kwargs...)

Opens and concatenates a list of dataset paths along the dimension specified in files. This method can be used when the generic glob-based version of open_mfdataset fails or is too slow. For example, to concatenate a list of annual NetCDF files along the Ti dimension, one can use:

julia
files = ["1990.nc","1991.nc","1992.nc"]
+open_mfdataset(DD.DimArray(files,DD.Ti()))

alternatively, if the dimension to concatenate along does not exist yet, the dimension provided in the input arg is used:

julia
files = ["a.nc","b.nc","c.nc"]
+open_mfdataset(DD.DimArray(files,DD.Dim{:NewDim}(["a","b","c"])))

source

YAXArrays.Datasets.savecube Method
julia
savecube(cube,name::String)

Save a YAXArray to the path.

Extended Help

The keyword arguments are:

  • name:

  • datasetaxis="Variable" special treatment of a categorical axis that gets written into separate zarr arrays

  • max_cache: The number of bits that are used as cache for the data handling.

  • backend: The backend, that is used to save the data. Falls back to searching the backend according to the extension of the path.

  • driver: The same setting as backend.

  • overwrite::Bool=false overwrite cube if it already exists

source

YAXArrays.Datasets.savedataset Method

savedataset(ds::Dataset; path = "", persist = nothing, overwrite = false, append = false, skeleton=false, backend = :all, driver = backend, max_cache = 5e8, writefac=4.0)

Saves a Dataset into a file at path with the format given by driver, i.e., driver=:netcdf or driver=:zarr.

Warning

overwrite = true, deletes ALL your data and it will create a new file.

source

YAXArrays.Datasets.to_dataset Method

to_dataset(c;datasetaxis = "Variable", layername = "layer")

Convert a Data Cube into a Dataset. It is possible to treat one of the Cube's axes as a "DatasetAxis" i.e. the cube will be split into different parts that become variables in the Dataset. If no such axis is specified or found, there will only be a single variable in the dataset with the name layername

source

Internal API

YAXArrays.YAXDefaults Constant

Default configuration for YAXArrays, has the following fields:

  • workdir[]::String = "./" The default location for temporary cubes.

  • recal[]::Bool = false set to true if you want @loadOrGenerate to always recalculate the results.

  • chunksize[]::Any = :input Set the default output chunksize.

  • max_cache[]::Float64 = 1e8 The maximum cache used by mapCube.

  • cubedir[]::"" the default location for Cube() without an argument.

  • subsetextensions::Array{Any} = [] List of registered functions, that convert subsetting input into dimension boundaries.

source

YAXArrays.findAxis Method
julia
findAxis(desc, c)

Internal function

Extended Help

Given an Axis description and a cube return the index of the Axis.

The Axis description can be:

  • the name as a string or symbol.

  • an Axis object

source

YAXArrays.getOutAxis Method
julia
getOutAxis

source

YAXArrays.get_descriptor Method
julia
get_descriptor(a)

Get the descriptor of an Axis. This is used to dispatch on the descriptor.

source

YAXArrays.match_axis Method
julia
match_axis

Internal function

Extended Help

Match the Axis based on the AxisDescriptor.
+This is used to find different axes and to make certain axis description the same.
+For example to disregard differences of captialisation.

source

YAXArrays.Cubes.CleanMe Type
julia
mutable struct CleanMe

Struct which describes data paths and their persistency. Non-persistend paths/files are removed at finalize step

source

YAXArrays.Cubes.clean Method
julia
clean(c::CleanMe)

finalizer function for CleanMe struct. The main process removes all directories/files which are not persistent.

source

YAXArrays.Cubes.copydata Method
julia
copydata(outar, inar, copybuf)

Internal function which copies the data from the input inar into the output outar at the copybuf positions.

source

YAXArrays.Cubes.optifunc Method
julia
optifunc(s, maxbuf, incs, outcs, insize, outsize, writefac)

Internal

This function is going to be minimized to detect the best possible chunk setting for the rechunking of the data.

source

YAXArrays.DAT.DATConfig Type

Configuration object of a DAT process. This holds all necessary information to perform the calculations. It contains the following fields:

  • incubes::NTuple{NIN, YAXArrays.DAT.InputCube} where NIN: The input data cubes

  • outcubes::NTuple{NOUT, YAXArrays.DAT.OutputCube} where NOUT: The output data cubes

  • allInAxes::Vector: List of all axes of the input cubes

  • LoopAxes::Vector: List of axes that are looped through

  • ispar::Bool: Flag whether the computation is parallelized

  • loopcachesize::Vector{Int64}:

  • allow_irregular_chunks::Bool:

  • max_cache::Any: Maximal size of the in memory cache

  • fu::Any: Inner function which is computed

  • inplace::Bool: Flag whether the computation happens in place

  • include_loopvars::Bool:

  • ntr::Any:

  • do_gc::Bool: Flag if GC should be called explicitly. Probably necessary for many runs in Julia 1.9

  • addargs::Any: Additional arguments for the inner function

  • kwargs::Any: Additional keyword arguments for the inner function

source

YAXArrays.DAT.InputCube Type

Internal representation of an input cube for DAT operations

  • cube: The input data

  • desc: The input description given by the user/registration

  • axesSmall: List of axes that were actually selected through the description

  • icolon

  • colonperm

  • loopinds: Indices of loop axes that this cube does not contain, i.e. broadcasts

  • cachesize: Number of elements to keep in cache along each axis

  • window

  • iwindow

  • windowloopinds

  • iall

source

YAXArrays.DAT.OutputCube Type

Internal representation of an output cube for DAT operations

Fields

  • cube: The actual outcube cube, once it is generated

  • cube_unpermuted: The unpermuted output cube

  • desc: The description of the output axes as given by users or registration

  • axesSmall: The list of output axes determined through the description

  • allAxes: List of all the axes of the cube

  • loopinds: Index of the loop axes that are broadcasted for this output cube

  • innerchunks

  • outtype: Elementtype of the outputcube

source

YAXArrays.DAT.YAXColumn Type
julia
YAXColumn

A struct representing a single column of a YAXArray partitioned Table # Fields

  • inarBC

  • inds

source

YAXArrays.DAT.cmpcachmisses Method

Function that compares two cache miss specifiers by their importance

source

YAXArrays.DAT.getFrontPerm Method

Calculate an axis permutation that brings the wanted dimensions to the front

source

YAXArrays.DAT.getLoopCacheSize Method

Calculate optimal Cache size to DAT operation

source

YAXArrays.DAT.getOuttype Method
julia
getOuttype(outtype, cdata)

Internal function

Get the element type for the output cube

source

YAXArrays.DAT.getloopchunks Method
julia
getloopchunks(dc::DATConfig)

Internal function

Returns the chunks that can be looped over toghether for all dimensions.
+This computation of the size of the chunks is handled by [`DiskArrays.approx_chunksize`](@ref)

source

YAXArrays.DAT.permuteloopaxes Method
julia
permuteloopaxes(dc)

Internal function

Permute the dimensions of the cube, so that the axes that are looped through are in the first positions. This is necessary for a faster looping through the data.

source

YAXArrays.Cubes.setchunks Method
julia
setchunks(c::Dataset,chunks)

Resets the chunks of all or a subset YAXArrays in the dataset and returns a new Dataset. Note that this will not change the chunking of the underlying data itself, it will just make the data "look" like it had a different chunking. If you need a persistent on-disk representation of this chunking, use savedataset on the resulting array. The chunks argument can take one of the following forms:

  • a NamedTuple or AbstractDict mapping from variable name to a description of the desired variable chunks

  • a NamedTuple or AbstractDict mapping from dimension name to a description of the desired variable chunks

  • a description of the desired variable chunks applied to all members of the Dataset

where a description of the desired variable chunks can take one of the following forms:

  • a DiskArrays.GridChunks object

  • a tuple specifying the chunk size along each dimension

  • an AbstractDict or NamedTuple mapping one or more axis names to chunk sizes

source

YAXArrays.Datasets.collectfromhandle Method

Extracts a YAXArray from a dataset handle that was just created from a arrayinfo

source

YAXArrays.Datasets.createdataset Method

function createdataset(DS::Type,axlist; kwargs...)

Creates a new dataset with axes specified in axlist. Each axis must be a subtype of CubeAxis. A new empty Zarr array will be created and can serve as a sink for mapCube operations.

Keyword arguments

  • path="" location where the new cube is stored

  • T=Union{Float32,Missing} data type of the target cube

  • chunksize = ntuple(i->length(axlist[i]),length(axlist)) chunk sizes of the array

  • chunkoffset = ntuple(i->0,length(axlist)) offsets of the chunks

  • persist::Bool=true shall the disk data be garbage-collected when the cube goes out of scope?

  • overwrite::Bool=false overwrite cube if it already exists

  • properties=Dict{String,Any}() additional cube properties

  • globalproperties=Dict{String,Any} global attributes to be added to the dataset

  • fillvalue= T>:Missing ? defaultfillval(Base.nonmissingtype(T)) : nothing fill value

  • datasetaxis="Variable" special treatment of a categorical axis that gets written into separate zarr arrays

  • layername="layer" Fallback name of the variable stored in the dataset if no datasetaxis is found

source

YAXArrays.Datasets.getarrayinfo Method

Extract necessary information to create a YAXArrayBase dataset from a name and YAXArray pair

source

YAXArrays.Datasets.testrange Method

Test if data in x can be approximated by a step range

source

+ + + + \ No newline at end of file diff --git a/previews/PR477/assets/UserGuide_cache.md.C8q_gcEI.js b/previews/PR477/assets/UserGuide_cache.md.C8q_gcEI.js new file mode 100644 index 00000000..99964b3d --- /dev/null +++ b/previews/PR477/assets/UserGuide_cache.md.C8q_gcEI.js @@ -0,0 +1,5 @@ +import{_ as a,c as i,a2 as e,o as t}from"./chunks/framework.CG45A19l.js";const o=JSON.parse('{"title":"Caching YAXArrays","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/cache.md","filePath":"UserGuide/cache.md","lastUpdated":null}'),n={name:"UserGuide/cache.md"};function h(l,s,p,r,c,d){return t(),i("div",null,s[0]||(s[0]=[e(`

Caching YAXArrays

For some applications like interactive plotting of large datasets it can not be avoided that the same data must be accessed several times. In these cases it can be useful to store recently accessed data in a cache. In YAXArrays this can be easily achieved using the cache function. For example, if we open a large dataset from a remote source and want to keep data in a cache of size 500MB one can use:

julia
using YAXArrays, Zarr
+ds = open_dataset("path/to/source")
+cachesize = 500 #MB
+cache(ds,maxsize = cachesize)

The above will wrap every array in the dataset into its own cache, where the 500MB are distributed equally across datasets. Alternatively individual caches can be applied to single YAXArrays

julia
yax = ds.avariable
+cache(yax,maxsize = 1000)
`,5)]))}const g=a(n,[["render",h]]);export{o as __pageData,g as default}; diff --git a/previews/PR477/assets/UserGuide_cache.md.C8q_gcEI.lean.js b/previews/PR477/assets/UserGuide_cache.md.C8q_gcEI.lean.js new file mode 100644 index 00000000..99964b3d --- /dev/null +++ b/previews/PR477/assets/UserGuide_cache.md.C8q_gcEI.lean.js @@ -0,0 +1,5 @@ +import{_ as a,c as i,a2 as e,o as t}from"./chunks/framework.CG45A19l.js";const o=JSON.parse('{"title":"Caching YAXArrays","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/cache.md","filePath":"UserGuide/cache.md","lastUpdated":null}'),n={name:"UserGuide/cache.md"};function h(l,s,p,r,c,d){return t(),i("div",null,s[0]||(s[0]=[e(`

Caching YAXArrays

For some applications like interactive plotting of large datasets it can not be avoided that the same data must be accessed several times. In these cases it can be useful to store recently accessed data in a cache. In YAXArrays this can be easily achieved using the cache function. For example, if we open a large dataset from a remote source and want to keep data in a cache of size 500MB one can use:

julia
using YAXArrays, Zarr
+ds = open_dataset("path/to/source")
+cachesize = 500 #MB
+cache(ds,maxsize = cachesize)

The above will wrap every array in the dataset into its own cache, where the 500MB are distributed equally across datasets. Alternatively individual caches can be applied to single YAXArrays

julia
yax = ds.avariable
+cache(yax,maxsize = 1000)
`,5)]))}const g=a(n,[["render",h]]);export{o as __pageData,g as default}; diff --git a/previews/PR477/assets/UserGuide_chunk.md.1uXbhaU1.js b/previews/PR477/assets/UserGuide_chunk.md.1uXbhaU1.js new file mode 100644 index 00000000..0915c491 --- /dev/null +++ b/previews/PR477/assets/UserGuide_chunk.md.1uXbhaU1.js @@ -0,0 +1,98 @@ +import{_ as a,c as i,a2 as n,o as p}from"./chunks/framework.CG45A19l.js";const g=JSON.parse('{"title":"Chunk YAXArrays","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/chunk.md","filePath":"UserGuide/chunk.md","lastUpdated":null}'),l={name:"UserGuide/chunk.md"};function h(e,s,t,k,r,d){return p(),i("div",null,s[0]||(s[0]=[n(`

Chunk YAXArrays

Thinking about chunking is important when it comes to analyzing your data, because in most situations this will not fit into memory, hence having the fastest read access to it is crucial for your workflows. For example, for geo-spatial data do you want fast access on time or space, or... think about it.

To determine the chunk size of the array representation on disk, call the setchunks function prior to saving.

Chunking YAXArrays

julia
using YAXArrays, Zarr
+a = YAXArray(rand(10,20))
+a_chunked = setchunks(a, (5,10))
+a_chunked.chunks
2×2 DiskArrays.GridChunks{2, Tuple{DiskArrays.RegularChunks, DiskArrays.RegularChunks}}:
+ (1:5, 1:10)   (1:5, 11:20)
+ (6:10, 1:10)  (6:10, 11:20)

And the saved file is also splitted into Chunks.

julia
f = tempname()
+savecube(a_chunked, f, backend=:zarr)
+Cube(f).chunks
2×2 DiskArrays.GridChunks{2, Tuple{DiskArrays.RegularChunks, DiskArrays.RegularChunks}}:
+ (1:5, 1:10)   (1:5, 11:20)
+ (6:10, 1:10)  (6:10, 11:20)

Alternatively chunk sizes can be given by dimension name, so the following results in the same chunks:

julia
a_chunked = setchunks(a, (Dim_2=10, Dim_1=5))
+a_chunked.chunks
2×2 DiskArrays.GridChunks{2, Tuple{DiskArrays.RegularChunks, DiskArrays.RegularChunks}}:
+ (1:5, 1:10)   (1:5, 11:20)
+ (6:10, 1:10)  (6:10, 11:20)

Chunking Datasets

Setchunks can also be applied to a Dataset.

Set Chunks by Axis

Set chunk size for each axis occuring in a Dataset. This will be applied to all variables in the dataset:

julia
using YAXArrays, Zarr
+ds = Dataset(x = YAXArray(rand(10,20)), y = YAXArray(rand(10)), z = YAXArray(rand(10,20,5)))
+dschunked = setchunks(ds, Dict("Dim_1"=>5, "Dim_2"=>10, "Dim_3"=>2))
+Cube(dschunked).chunks
2×2×3 DiskArrays.GridChunks{3, Tuple{DiskArrays.RegularChunks, DiskArrays.RegularChunks, DiskArrays.RegularChunks}}:
+[:, :, 1] =
+ (1:5, 1:10, 1:2)   (1:5, 11:20, 1:2)
+ (6:10, 1:10, 1:2)  (6:10, 11:20, 1:2)
+
+[:, :, 2] =
+ (1:5, 1:10, 3:4)   (1:5, 11:20, 3:4)
+ (6:10, 1:10, 3:4)  (6:10, 11:20, 3:4)
+
+[:, :, 3] =
+ (1:5, 1:10, 5:5)   (1:5, 11:20, 5:5)
+ (6:10, 1:10, 5:5)  (6:10, 11:20, 5:5)

Saving...

julia
f = tempname()
+savedataset(dschunked, path=f, driver=:zarr)
YAXArray Dataset
+Shared Axes: 
+  (↓ Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points)
+
+Variables: 
+y
+
+Variables with additional axes:
+  Additional Axes: 
+  (↓ Dim_2 Sampled{Int64} Base.OneTo(20) ForwardOrdered Regular Points,
+  → Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)
+  Variables: 
+  z
+
+  Additional Axes: 
+  (↓ Dim_2 Sampled{Int64} Base.OneTo(20) ForwardOrdered Regular Points)
+  Variables: 
+  x

Set chunking by Variable

The following will set the chunk size for each Variable separately and results in exactly the same chunking as the example above

julia
using YAXArrays, Zarr
+ds = Dataset(x = YAXArray(rand(10,20)), y = YAXArray(rand(10)), z = YAXArray(rand(10,20,5)))
+dschunked = setchunks(ds,(x = (5,10), y = Dict("Dim_1"=>5), z = (Dim_1 = 5, Dim_2 = 10, Dim_3 = 2)))
+Cube(dschunked).chunks
2×2×3 DiskArrays.GridChunks{3, Tuple{DiskArrays.RegularChunks, DiskArrays.RegularChunks, DiskArrays.RegularChunks}}:
+[:, :, 1] =
+ (1:5, 1:10, 1:2)   (1:5, 11:20, 1:2)
+ (6:10, 1:10, 1:2)  (6:10, 11:20, 1:2)
+
+[:, :, 2] =
+ (1:5, 1:10, 3:4)   (1:5, 11:20, 3:4)
+ (6:10, 1:10, 3:4)  (6:10, 11:20, 3:4)
+
+[:, :, 3] =
+ (1:5, 1:10, 5:5)   (1:5, 11:20, 5:5)
+ (6:10, 1:10, 5:5)  (6:10, 11:20, 5:5)

saving...

julia
f = tempname()
+savedataset(dschunked, path=f, driver=:zarr)
YAXArray Dataset
+Shared Axes: 
+  (↓ Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points)
+
+Variables: 
+y
+
+Variables with additional axes:
+  Additional Axes: 
+  (↓ Dim_2 Sampled{Int64} Base.OneTo(20) ForwardOrdered Regular Points,
+  → Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)
+  Variables: 
+  z
+
+  Additional Axes: 
+  (↓ Dim_2 Sampled{Int64} Base.OneTo(20) ForwardOrdered Regular Points)
+  Variables: 
+  x

Set chunking for all variables

The following code snippet only works when all member variables of the dataset have the same shape and sets the output chunks for all arrays.

julia
using YAXArrays, Zarr
+ds = Dataset(x = YAXArray(rand(10,20)), y = YAXArray(rand(10,20)), z = YAXArray(rand(10,20)))
+dschunked = setchunks(ds,(5,10))
+Cube(dschunked).chunks
2×2×3 DiskArrays.GridChunks{3, Tuple{DiskArrays.RegularChunks, DiskArrays.RegularChunks, DiskArrays.RegularChunks}}:
+[:, :, 1] =
+ (1:5, 1:10, 1:1)   (1:5, 11:20, 1:1)
+ (6:10, 1:10, 1:1)  (6:10, 11:20, 1:1)
+
+[:, :, 2] =
+ (1:5, 1:10, 2:2)   (1:5, 11:20, 2:2)
+ (6:10, 1:10, 2:2)  (6:10, 11:20, 2:2)
+
+[:, :, 3] =
+ (1:5, 1:10, 3:3)   (1:5, 11:20, 3:3)
+ (6:10, 1:10, 3:3)  (6:10, 11:20, 3:3)

saving...

julia
f = tempname()
+savedataset(dschunked, path=f, driver=:zarr)
YAXArray Dataset
+Shared Axes: 
+  (↓ Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(20) ForwardOrdered Regular Points)
+
+Variables: 
+x, y, z

Suggestions on how to improve or add to these examples is welcome.

`,36)]))}const c=a(l,[["render",h]]);export{g as __pageData,c as default}; diff --git a/previews/PR477/assets/UserGuide_chunk.md.1uXbhaU1.lean.js b/previews/PR477/assets/UserGuide_chunk.md.1uXbhaU1.lean.js new file mode 100644 index 00000000..0915c491 --- /dev/null +++ b/previews/PR477/assets/UserGuide_chunk.md.1uXbhaU1.lean.js @@ -0,0 +1,98 @@ +import{_ as a,c as i,a2 as n,o as p}from"./chunks/framework.CG45A19l.js";const g=JSON.parse('{"title":"Chunk YAXArrays","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/chunk.md","filePath":"UserGuide/chunk.md","lastUpdated":null}'),l={name:"UserGuide/chunk.md"};function h(e,s,t,k,r,d){return p(),i("div",null,s[0]||(s[0]=[n(`

Chunk YAXArrays

Thinking about chunking is important when it comes to analyzing your data, because in most situations this will not fit into memory, hence having the fastest read access to it is crucial for your workflows. For example, for geo-spatial data do you want fast access on time or space, or... think about it.

To determine the chunk size of the array representation on disk, call the setchunks function prior to saving.

Chunking YAXArrays

julia
using YAXArrays, Zarr
+a = YAXArray(rand(10,20))
+a_chunked = setchunks(a, (5,10))
+a_chunked.chunks
2×2 DiskArrays.GridChunks{2, Tuple{DiskArrays.RegularChunks, DiskArrays.RegularChunks}}:
+ (1:5, 1:10)   (1:5, 11:20)
+ (6:10, 1:10)  (6:10, 11:20)

And the saved file is also splitted into Chunks.

julia
f = tempname()
+savecube(a_chunked, f, backend=:zarr)
+Cube(f).chunks
2×2 DiskArrays.GridChunks{2, Tuple{DiskArrays.RegularChunks, DiskArrays.RegularChunks}}:
+ (1:5, 1:10)   (1:5, 11:20)
+ (6:10, 1:10)  (6:10, 11:20)

Alternatively chunk sizes can be given by dimension name, so the following results in the same chunks:

julia
a_chunked = setchunks(a, (Dim_2=10, Dim_1=5))
+a_chunked.chunks
2×2 DiskArrays.GridChunks{2, Tuple{DiskArrays.RegularChunks, DiskArrays.RegularChunks}}:
+ (1:5, 1:10)   (1:5, 11:20)
+ (6:10, 1:10)  (6:10, 11:20)

Chunking Datasets

Setchunks can also be applied to a Dataset.

Set Chunks by Axis

Set chunk size for each axis occuring in a Dataset. This will be applied to all variables in the dataset:

julia
using YAXArrays, Zarr
+ds = Dataset(x = YAXArray(rand(10,20)), y = YAXArray(rand(10)), z = YAXArray(rand(10,20,5)))
+dschunked = setchunks(ds, Dict("Dim_1"=>5, "Dim_2"=>10, "Dim_3"=>2))
+Cube(dschunked).chunks
2×2×3 DiskArrays.GridChunks{3, Tuple{DiskArrays.RegularChunks, DiskArrays.RegularChunks, DiskArrays.RegularChunks}}:
+[:, :, 1] =
+ (1:5, 1:10, 1:2)   (1:5, 11:20, 1:2)
+ (6:10, 1:10, 1:2)  (6:10, 11:20, 1:2)
+
+[:, :, 2] =
+ (1:5, 1:10, 3:4)   (1:5, 11:20, 3:4)
+ (6:10, 1:10, 3:4)  (6:10, 11:20, 3:4)
+
+[:, :, 3] =
+ (1:5, 1:10, 5:5)   (1:5, 11:20, 5:5)
+ (6:10, 1:10, 5:5)  (6:10, 11:20, 5:5)

Saving...

julia
f = tempname()
+savedataset(dschunked, path=f, driver=:zarr)
YAXArray Dataset
+Shared Axes: 
+  (↓ Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points)
+
+Variables: 
+y
+
+Variables with additional axes:
+  Additional Axes: 
+  (↓ Dim_2 Sampled{Int64} Base.OneTo(20) ForwardOrdered Regular Points,
+  → Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)
+  Variables: 
+  z
+
+  Additional Axes: 
+  (↓ Dim_2 Sampled{Int64} Base.OneTo(20) ForwardOrdered Regular Points)
+  Variables: 
+  x

Set chunking by Variable

The following will set the chunk size for each Variable separately and results in exactly the same chunking as the example above

julia
using YAXArrays, Zarr
+ds = Dataset(x = YAXArray(rand(10,20)), y = YAXArray(rand(10)), z = YAXArray(rand(10,20,5)))
+dschunked = setchunks(ds,(x = (5,10), y = Dict("Dim_1"=>5), z = (Dim_1 = 5, Dim_2 = 10, Dim_3 = 2)))
+Cube(dschunked).chunks
2×2×3 DiskArrays.GridChunks{3, Tuple{DiskArrays.RegularChunks, DiskArrays.RegularChunks, DiskArrays.RegularChunks}}:
+[:, :, 1] =
+ (1:5, 1:10, 1:2)   (1:5, 11:20, 1:2)
+ (6:10, 1:10, 1:2)  (6:10, 11:20, 1:2)
+
+[:, :, 2] =
+ (1:5, 1:10, 3:4)   (1:5, 11:20, 3:4)
+ (6:10, 1:10, 3:4)  (6:10, 11:20, 3:4)
+
+[:, :, 3] =
+ (1:5, 1:10, 5:5)   (1:5, 11:20, 5:5)
+ (6:10, 1:10, 5:5)  (6:10, 11:20, 5:5)

saving...

julia
f = tempname()
+savedataset(dschunked, path=f, driver=:zarr)
YAXArray Dataset
+Shared Axes: 
+  (↓ Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points)
+
+Variables: 
+y
+
+Variables with additional axes:
+  Additional Axes: 
+  (↓ Dim_2 Sampled{Int64} Base.OneTo(20) ForwardOrdered Regular Points,
+  → Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)
+  Variables: 
+  z
+
+  Additional Axes: 
+  (↓ Dim_2 Sampled{Int64} Base.OneTo(20) ForwardOrdered Regular Points)
+  Variables: 
+  x

Set chunking for all variables

The following code snippet only works when all member variables of the dataset have the same shape and sets the output chunks for all arrays.

julia
using YAXArrays, Zarr
+ds = Dataset(x = YAXArray(rand(10,20)), y = YAXArray(rand(10,20)), z = YAXArray(rand(10,20)))
+dschunked = setchunks(ds,(5,10))
+Cube(dschunked).chunks
2×2×3 DiskArrays.GridChunks{3, Tuple{DiskArrays.RegularChunks, DiskArrays.RegularChunks, DiskArrays.RegularChunks}}:
+[:, :, 1] =
+ (1:5, 1:10, 1:1)   (1:5, 11:20, 1:1)
+ (6:10, 1:10, 1:1)  (6:10, 11:20, 1:1)
+
+[:, :, 2] =
+ (1:5, 1:10, 2:2)   (1:5, 11:20, 2:2)
+ (6:10, 1:10, 2:2)  (6:10, 11:20, 2:2)
+
+[:, :, 3] =
+ (1:5, 1:10, 3:3)   (1:5, 11:20, 3:3)
+ (6:10, 1:10, 3:3)  (6:10, 11:20, 3:3)

saving...

julia
f = tempname()
+savedataset(dschunked, path=f, driver=:zarr)
YAXArray Dataset
+Shared Axes: 
+  (↓ Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(20) ForwardOrdered Regular Points)
+
+Variables: 
+x, y, z

Suggestions on how to improve or add to these examples is welcome.

`,36)]))}const c=a(l,[["render",h]]);export{g as __pageData,c as default}; diff --git a/previews/PR477/assets/UserGuide_combine.md.C1vyA2or.js b/previews/PR477/assets/UserGuide_combine.md.C1vyA2or.js new file mode 100644 index 00000000..8091a79e --- /dev/null +++ b/previews/PR477/assets/UserGuide_combine.md.C1vyA2or.js @@ -0,0 +1,28 @@ +import{_ as i,c as a,a2 as n,o as e}from"./chunks/framework.CG45A19l.js";const c=JSON.parse('{"title":"Combine YAXArrays","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/combine.md","filePath":"UserGuide/combine.md","lastUpdated":null}'),t={name:"UserGuide/combine.md"};function p(l,s,h,k,r,d){return e(),a("div",null,s[0]||(s[0]=[n(`

Combine YAXArrays

Data is often scattered across multiple files and corresponding arrays, e.g. one file per time step. This section describes methods on how to combine them into a single YAXArray.

cat along an existing dimension

Here we use cat to combine two arrays consisting of data from the first and the second half of a year into one single array containing the whole year. We glue the arrays along the first dimension using dims = 1: The resulting array whole_year still has one dimension, i.e. time, but with 12 instead of 6 elements.

julia
using YAXArrays
+
+first_half = YAXArray((Dim{:time}(1:6),), rand(6))
+second_half = YAXArray((Dim{:time}(7:12),), rand(6))
+whole_year = cat(first_half, second_half, dims = 1)
╭────────────────────────────────╮
+│ 12-element YAXArray{Float64,1} │
+├────────────────────────────────┴──────────────────────────────── dims ┐
+  ↓ time Sampled{Int64} [1, 2, …, 11, 12] ForwardOrdered Regular Points
+├───────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├───────────────────────────────────────────────────── loaded in memory ┤
+  data size: 96.0 bytes
+└───────────────────────────────────────────────────────────────────────┘

concatenatecubes to a new dimension

Here we use concatenatecubes to combine two arrays of different variables that have the same dimensions. The resulting array combined has an additional dimension variable indicating from which array the element values originates. Note that using a Dataset instead is a more flexible approach in handling different variables.

julia
using YAXArrays
+
+temperature = YAXArray((Dim{:time}(1:6),), rand(6))
+precipitation = YAXArray((Dim{:time}(1:6),), rand(6))
+cubes = [temperature,precipitation]
+var_axis = Dim{:variable}(["temp", "prep"])
+combined = concatenatecubes(cubes, var_axis)
╭─────────────────────────╮
+│ 6×2 YAXArray{Float64,2} │
+├─────────────────────────┴──────────────────────────────── dims ┐
+  ↓ time     Sampled{Int64} 1:6 ForwardOrdered Regular Points,
+  → variable Categorical{String} ["temp", "prep"] ReverseOrdered
+├────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├───────────────────────────────────────────────── loaded lazily ┤
+  data size: 96.0 bytes
+└────────────────────────────────────────────────────────────────┘
`,10)]))}const E=i(t,[["render",p]]);export{c as __pageData,E as default}; diff --git a/previews/PR477/assets/UserGuide_combine.md.C1vyA2or.lean.js b/previews/PR477/assets/UserGuide_combine.md.C1vyA2or.lean.js new file mode 100644 index 00000000..8091a79e --- /dev/null +++ b/previews/PR477/assets/UserGuide_combine.md.C1vyA2or.lean.js @@ -0,0 +1,28 @@ +import{_ as i,c as a,a2 as n,o as e}from"./chunks/framework.CG45A19l.js";const c=JSON.parse('{"title":"Combine YAXArrays","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/combine.md","filePath":"UserGuide/combine.md","lastUpdated":null}'),t={name:"UserGuide/combine.md"};function p(l,s,h,k,r,d){return e(),a("div",null,s[0]||(s[0]=[n(`

Combine YAXArrays

Data is often scattered across multiple files and corresponding arrays, e.g. one file per time step. This section describes methods on how to combine them into a single YAXArray.

cat along an existing dimension

Here we use cat to combine two arrays consisting of data from the first and the second half of a year into one single array containing the whole year. We glue the arrays along the first dimension using dims = 1: The resulting array whole_year still has one dimension, i.e. time, but with 12 instead of 6 elements.

julia
using YAXArrays
+
+first_half = YAXArray((Dim{:time}(1:6),), rand(6))
+second_half = YAXArray((Dim{:time}(7:12),), rand(6))
+whole_year = cat(first_half, second_half, dims = 1)
╭────────────────────────────────╮
+│ 12-element YAXArray{Float64,1} │
+├────────────────────────────────┴──────────────────────────────── dims ┐
+  ↓ time Sampled{Int64} [1, 2, …, 11, 12] ForwardOrdered Regular Points
+├───────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├───────────────────────────────────────────────────── loaded in memory ┤
+  data size: 96.0 bytes
+└───────────────────────────────────────────────────────────────────────┘

concatenatecubes to a new dimension

Here we use concatenatecubes to combine two arrays of different variables that have the same dimensions. The resulting array combined has an additional dimension variable indicating from which array the element values originates. Note that using a Dataset instead is a more flexible approach in handling different variables.

julia
using YAXArrays
+
+temperature = YAXArray((Dim{:time}(1:6),), rand(6))
+precipitation = YAXArray((Dim{:time}(1:6),), rand(6))
+cubes = [temperature,precipitation]
+var_axis = Dim{:variable}(["temp", "prep"])
+combined = concatenatecubes(cubes, var_axis)
╭─────────────────────────╮
+│ 6×2 YAXArray{Float64,2} │
+├─────────────────────────┴──────────────────────────────── dims ┐
+  ↓ time     Sampled{Int64} 1:6 ForwardOrdered Regular Points,
+  → variable Categorical{String} ["temp", "prep"] ReverseOrdered
+├────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├───────────────────────────────────────────────── loaded lazily ┤
+  data size: 96.0 bytes
+└────────────────────────────────────────────────────────────────┘
`,10)]))}const E=i(t,[["render",p]]);export{c as __pageData,E as default}; diff --git a/previews/PR477/assets/UserGuide_compute.md.DcvjuWd2.js b/previews/PR477/assets/UserGuide_compute.md.DcvjuWd2.js new file mode 100644 index 00000000..3eb859d6 --- /dev/null +++ b/previews/PR477/assets/UserGuide_compute.md.DcvjuWd2.js @@ -0,0 +1,406 @@ +import{_ as i,c as a,a2 as n,o as t}from"./chunks/framework.CG45A19l.js";const g=JSON.parse('{"title":"Compute YAXArrays","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/compute.md","filePath":"UserGuide/compute.md","lastUpdated":null}'),p={name:"UserGuide/compute.md"};function l(e,s,h,k,d,r){return t(),a("div",null,s[0]||(s[0]=[n(`

Compute YAXArrays

This section describes how to create new YAXArrays by performing operations on them.

Let's start by creating an example dataset:

julia
using YAXArrays
+using Dates
+
+axlist = (
+    Dim{:time}(Date("2022-01-01"):Day(1):Date("2022-01-30")),
+    Dim{:lon}(range(1, 10, length=10)),
+    Dim{:lat}(range(1, 5, length=15)),
+)
+data = rand(30, 10, 15)
+properties = Dict(:origin => "user guide")
+a = YAXArray(axlist, data, properties)
╭──────────────────────────────╮
+│ 30×10×15 YAXArray{Float64,3} │
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+  → lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, String} with 1 entry:
+  :origin => "user guide"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 35.16 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Modify elements of a YAXArray

julia
a[1,2,3]
0.519282115735095
julia
a[1,2,3] = 42
42
julia
a[1,2,3]
42.0

WARNING

Some arrays, e.g. those saved in a cloud object storage are immutable making any modification of the data impossible.

Arithmetics

Add a value to all elements of an array and save it as a new array:

julia
a2 = a .+ 5
╭──────────────────────────────╮
+│ 30×10×15 YAXArray{Float64,3} │
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+  → lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, String} with 1 entry:
+  :origin => "user guide"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 35.16 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
a2[1,2,3] == a[1,2,3] + 5
true

map

Apply a function on every element of an array individually:

julia
offset = 5
+map(a) do x
+    (x + offset) / 2 * 3
+end
╭──────────────────────────────╮
+│ 30×10×15 YAXArray{Float64,3} │
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+  → lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, String} with 1 entry:
+  :origin => "user guide"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 35.16 KB
+└──────────────────────────────────────────────────────────────────────────────┘

This keeps all dimensions unchanged. Note, that here we can not access neighboring elements. In this case, we can use mapslices or mapCube instead. Each element of the array is processed individually.

The code runs very fast, because map applies the function lazily. Actual computation will be performed only on demand, e.g. when elements were explicitly requested or further computations were performed.

mapslices

Reduce the time dimension by calculating the average value of all points in time:

julia
import Statistics: mean
+mapslices(mean, a, dims="Time")
╭───────────────────────────────────────────╮
+│ 10×15 YAXArray{Union{Missing, Float64},2} │
+├───────────────────────────────────────────┴──────────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 1.17 KB
+└──────────────────────────────────────────────────────────────────────────────┘

There is no time dimension left, because there is only one value left after averaging all time steps. We can also calculate spatial means resulting in one value per time step:

julia
mapslices(mean, a, dims=("lat", "lon"))
╭────────────────────────────────────────────────╮
+│ 30-element YAXArray{Union{Missing, Float64},1} │
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 240.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

mapCube

mapCube is the most flexible way to apply a function over subsets of an array. Dimensions may be added or removed.

Operations over several YAXArrays

Here, we will define a simple function, that will take as input several YAXArrays. But first, let's load the necessary packages.

julia
using YAXArrays, Zarr
+using Dates

Define function in space and time

julia
f(lo, la, t) = (lo + la + Dates.dayofyear(t))
f (generic function with 1 method)

now, mapCube requires this function to be wrapped as follows

julia
function g(xout, lo, la, t)
+    xout .= f.(lo, la, t)
+end
g (generic function with 1 method)

INFO

Note the . after f, this is because we will slice across time, namely, the function is broadcasted along this dimension.

Here, we do create YAXArrays only with the desired dimensions as

julia
julia> lon = YAXArray(Dim{:lon}(range(1, 15)))
╭──────────────────────────────╮
+15-element YAXArray{Int64,1}
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+lon Sampled{Int64} 1:15 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 120.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘
julia
julia> lat = YAXArray(Dim{:lat}(range(1, 10)))
╭──────────────────────────────╮
+10-element YAXArray{Int64,1}
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+lat Sampled{Int64} 1:10 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 80.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

And a time Cube's Axis

julia
tspan = Date("2022-01-01"):Day(1):Date("2022-01-30")
+time = YAXArray(Dim{:time}(tspan))
╭─────────────────────────────╮
+│ 30-element YAXArray{Date,1} │
+├─────────────────────────────┴────────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 240.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

note that the following can be extended to arbitrary YAXArrays with additional data and dimensions.

Let's generate a new cube using mapCube and saving the output directly into disk.

julia
julia> gen_cube = mapCube(g, (lon, lat, time);
+           indims = (InDims(), InDims(), InDims("time")),
+           outdims = OutDims("time", overwrite=true, path="my_gen_cube.zarr", backend=:zarr,
+           outtype = Float32)
+           # max_cache=1e9
+       )
╭──────────────────────────────────────────────╮
+30×15×10 YAXArray{Union{Missing, Float32},3}
+├──────────────────────────────────────────────┴───────────────────────── dims ┐
+time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+lon  Sampled{Int64} 1:15 ForwardOrdered Regular Points,
+lat  Sampled{Int64} 1:10 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 1 entry:
+  "missing_value" => 1.0f32
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 17.58 KB
+└──────────────────────────────────────────────────────────────────────────────┘

"time axis goes first"

Note that currently the time axis in the output cube goes first.

Check that it is working

julia
julia> gen_cube.data[1, :, :]
15×10 Matrix{Union{Missing, Float32}}:
+  3.0   4.0   5.0   6.0   7.0   8.0   9.0  10.0  11.0  12.0
+  4.0   5.0   6.0   7.0   8.0   9.0  10.0  11.0  12.0  13.0
+  5.0   6.0   7.0   8.0   9.0  10.0  11.0  12.0  13.0  14.0
+  6.0   7.0   8.0   9.0  10.0  11.0  12.0  13.0  14.0  15.0
+  7.0   8.0   9.0  10.0  11.0  12.0  13.0  14.0  15.0  16.0
+  8.0   9.0  10.0  11.0  12.0  13.0  14.0  15.0  16.0  17.0
+  9.0  10.0  11.0  12.0  13.0  14.0  15.0  16.0  17.0  18.0
+ 10.0  11.0  12.0  13.0  14.0  15.0  16.0  17.0  18.0  19.0
+ 11.0  12.0  13.0  14.0  15.0  16.0  17.0  18.0  19.0  20.0
+ 12.0  13.0  14.0  15.0  16.0  17.0  18.0  19.0  20.0  21.0
+ 13.0  14.0  15.0  16.0  17.0  18.0  19.0  20.0  21.0  22.0
+ 14.0  15.0  16.0  17.0  18.0  19.0  20.0  21.0  22.0  23.0
+ 15.0  16.0  17.0  18.0  19.0  20.0  21.0  22.0  23.0  24.0
+ 16.0  17.0  18.0  19.0  20.0  21.0  22.0  23.0  24.0  25.0
+ 17.0  18.0  19.0  20.0  21.0  22.0  23.0  24.0  25.0  26.0

but, we can generate a another cube with a different output order as follows

julia
julia> gen_cube = mapCube(g, (lon, lat, time);
+           indims = (InDims("lon"), InDims(), InDims()),
+           outdims = OutDims("lon", overwrite=true, path="my_gen_cube.zarr", backend=:zarr,
+           outtype = Float32)
+           # max_cache=1e9
+       )
╭──────────────────────────────────────────────╮
+15×10×30 YAXArray{Union{Missing, Float32},3}
+├──────────────────────────────────────────────┴───────────────────────── dims ┐
+lon  Sampled{Int64} 1:15 ForwardOrdered Regular Points,
+lat  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 1 entry:
+  "missing_value" => 1.0f32
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 17.58 KB
+└──────────────────────────────────────────────────────────────────────────────┘

INFO

Note that now the broadcasted dimension is lon.

we can see this by slicing on the last dimension now

julia
gen_cube.data[:, :, 1]
15×10 Matrix{Union{Missing, Float32}}:
+  3.0   4.0   5.0   6.0   7.0   8.0   9.0  10.0  11.0  12.0
+  4.0   5.0   6.0   7.0   8.0   9.0  10.0  11.0  12.0  13.0
+  5.0   6.0   7.0   8.0   9.0  10.0  11.0  12.0  13.0  14.0
+  6.0   7.0   8.0   9.0  10.0  11.0  12.0  13.0  14.0  15.0
+  7.0   8.0   9.0  10.0  11.0  12.0  13.0  14.0  15.0  16.0
+  8.0   9.0  10.0  11.0  12.0  13.0  14.0  15.0  16.0  17.0
+  9.0  10.0  11.0  12.0  13.0  14.0  15.0  16.0  17.0  18.0
+ 10.0  11.0  12.0  13.0  14.0  15.0  16.0  17.0  18.0  19.0
+ 11.0  12.0  13.0  14.0  15.0  16.0  17.0  18.0  19.0  20.0
+ 12.0  13.0  14.0  15.0  16.0  17.0  18.0  19.0  20.0  21.0
+ 13.0  14.0  15.0  16.0  17.0  18.0  19.0  20.0  21.0  22.0
+ 14.0  15.0  16.0  17.0  18.0  19.0  20.0  21.0  22.0  23.0
+ 15.0  16.0  17.0  18.0  19.0  20.0  21.0  22.0  23.0  24.0
+ 16.0  17.0  18.0  19.0  20.0  21.0  22.0  23.0  24.0  25.0
+ 17.0  18.0  19.0  20.0  21.0  22.0  23.0  24.0  25.0  26.0

which outputs the same as the gen_cube.data[1, :, :] called above.

OutDims and YAXArray Properties

Here, we will consider different scenarios, namely how we deal with different input cubes and how to specify the output ones. We will illustrate this with the following test example and the subsequent function definitions.

julia
using YAXArrays, Dates
+using Zarr
+using Random
+
+axlist = (
+    Dim{:time}(Date("2022-01-01"):Day(1):Date("2022-01-05")),
+    Dim{:lon}(range(1, 4, length=4)),
+    Dim{:lat}(range(1, 3, length=3)),
+    Dim{:variables}(["a", "b"])
+)
+
+Random.seed!(123)
+data = rand(1:5, 5, 4, 3, 2)
+
+properties = Dict("description" => "multi dimensional test cube")
+yax_test = YAXArray(axlist, data, properties)
╭───────────────────────────╮
+│ 5×4×3×2 YAXArray{Int64,4} │
+├───────────────────────────┴──────────────────────────────────────────── dims ┐
+  ↓ time      Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-05") ForwardOrdered Regular Points,
+  → lon       Sampled{Float64} 1.0:1.0:4.0 ForwardOrdered Regular Points,
+  ↗ lat       Sampled{Float64} 1.0:1.0:3.0 ForwardOrdered Regular Points,
+  ⬔ variables Categorical{String} ["a", "b"] ForwardOrdered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, String} with 1 entry:
+  "description" => "multi dimensional test cube"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 960.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

One InDims to many OutDims

In the following function, note how the outputs are defined first and the inputs later.

julia
function one_to_many(xout_one, xout_two, xout_flat, xin_one)
+    xout_one .= f1.(xin_one)
+    xout_two .= f2.(xin_one)
+    xout_flat .= sum(xin_one)
+    return nothing
+end
+
+f1(xin) = xin + 1
+f2(xin) = xin + 2
f2 (generic function with 1 method)

now, we define InDims and OutDims:

julia
indims_one   = InDims("Time")
+# outputs dimension
+properties_one = Dict{String, Any}("name" => "plus_one")
+properties_two = Dict{String, Any}("name" => "plus_two")
+
+outdims_one = OutDims("Time"; properties=properties_one)
+outdims_two = OutDims("Time"; properties=properties_two)
+outdims_flat = OutDims(;) # it will get the default \`layer\` name if open as dataset
OutDims((), :auto, Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}(), false, Array, :input, 1)
julia
ds = mapCube(one_to_many, yax_test,
+    indims = indims_one,
+    outdims = (outdims_one, outdims_two, outdims_flat));

let's see the second output

julia
ds[2]
╭───────────────────────────────────────────╮
+│ 5×4×3×2 YAXArray{Union{Missing, Int64},4} │
+├───────────────────────────────────────────┴──────────────────────────── dims ┐
+  ↓ time      Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-05") ForwardOrdered Regular Points,
+  → lon       Sampled{Float64} 1.0:1.0:4.0 ForwardOrdered Regular Points,
+  ↗ lat       Sampled{Float64} 1.0:1.0:3.0 ForwardOrdered Regular Points,
+  ⬔ variables Categorical{String} ["a", "b"] ForwardOrdered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 1 entry:
+  "name" => "plus_two"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 960.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

Many InDims to many OutDims

Let's consider a second test set

julia
properties_2d = Dict("description" => "2d dimensional test cube")
+yax_2d = YAXArray(axlist[2:end], rand(-1:1, 4, 3, 2), properties_2d)
╭─────────────────────────╮
+│ 4×3×2 YAXArray{Int64,3} │
+├─────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ lon       Sampled{Float64} 1.0:1.0:4.0 ForwardOrdered Regular Points,
+  → lat       Sampled{Float64} 1.0:1.0:3.0 ForwardOrdered Regular Points,
+  ↗ variables Categorical{String} ["a", "b"] ForwardOrdered
+├─────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, String} with 1 entry:
+  "description" => "2d dimensional test cube"
+├─────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 192.0 bytes
+└─────────────────────────────────────────────────────────────────────────┘

The function definitions operating in this case are as follows

julia
function many_to_many(xout_one, xout_two, xout_flat, xin_one, xin_two, xin_drei)
+    xout_one .= f1.(xin_one)
+    xout_two .= f2mix.(xin_one, xin_two)
+    xout_flat .= sum(xin_drei) # this will reduce the time dimension if we set outdims = OutDims()
+    return nothing
+end
+f2mix(xin_xyt, xin_xy) = xin_xyt - xin_xy
f2mix (generic function with 1 method)

Specify path in OutDims

julia
indims_one   = InDims("Time")
+indims_2d   = InDims() # ? it matches only to the other 2 dimensions and uses the same values for each time step
+properties = Dict{String, Any}("name"=> "many_to_many_two")
+outdims_one = OutDims("Time")
+outdims_two = OutDims("Time"; path = "test_mm.zarr", properties)
+outdims_flat = OutDims()
OutDims((), :auto, Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}(), false, Array, :input, 1)
julia
ds = mapCube(many_to_many, (yax_test, yax_2d, yax_test),
+    indims = (indims_one, indims_2d, indims_one),
+    outdims = (outdims_one, outdims_two, outdims_flat));

And we can open the one that was saved directly to disk.

julia
ds_mm = open_dataset("test_mm.zarr")
YAXArray Dataset
+Shared Axes: 
+  (↓ Ti  Sampled{DateTime} [2022-01-01T00:00:00, …, 2022-01-05T00:00:00] ForwardOrdered Irregular Points,
+  → lon Sampled{Float64} 1.0:1.0:4.0 ForwardOrdered Regular Points,
+  ↗ lat Sampled{Float64} 1.0:1.0:3.0 ForwardOrdered Regular Points)
+
+Variables: 
+a, b

Different InDims names

Here, the goal is to operate at the pixel level (longitude, latitude), and then apply the corresponding function to the extracted values. Consider the following toy cubes:

julia
Random.seed!(123)
+data = rand(3.0:5.0, 5, 4, 3)
+
+axlist = (Dim{:lon}(1:4), Dim{:lat}(1:3), Dim{:depth}(1:7),)
+yax_2d = YAXArray(axlist, rand(-3.0:0.0, 4, 3, 7))
╭───────────────────────────╮
+│ 4×3×7 YAXArray{Float64,3} │
+├───────────────────────────┴───────────────────────── dims ┐
+  ↓ lon   Sampled{Int64} 1:4 ForwardOrdered Regular Points,
+  → lat   Sampled{Int64} 1:3 ForwardOrdered Regular Points,
+  ↗ depth Sampled{Int64} 1:7 ForwardOrdered Regular Points
+├───────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├───────────────────────────────────────── loaded in memory ┤
+  data size: 672.0 bytes
+└───────────────────────────────────────────────────────────┘

and

julia
Random.seed!(123)
+data = rand(3.0:5.0, 5, 4, 3)
+
+axlist = (Dim{:time}(Date("2022-01-01"):Day(1):Date("2022-01-05")),
+    Dim{:lon}(1:4), Dim{:lat}(1:3),)
+
+properties = Dict("description" => "multi dimensional test cube")
+yax_test = YAXArray(axlist, data, properties)
╭───────────────────────────╮
+│ 5×4×3 YAXArray{Float64,3} │
+├───────────────────────────┴──────────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-05") ForwardOrdered Regular Points,
+  → lon  Sampled{Int64} 1:4 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Int64} 1:3 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, String} with 1 entry:
+  "description" => "multi dimensional test cube"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 480.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

and the corresponding functions

julia
function mix_time_depth(xin_xyt, xin_xyz)
+    s = sum(abs.(xin_xyz))
+    return xin_xyt.^2 .+ s
+end
+
+function time_depth(xout, xin_one, xin_two)
+    xout .= mix_time_depth(xin_one, xin_two)
+    # Note also that there is no dot anymore in the function application!
+    return nothing
+end
time_depth (generic function with 1 method)

with the final mapCube operation as follows

julia
ds = mapCube(time_depth, (yax_test, yax_2d),
+    indims = (InDims("Time"), InDims("depth")), # ? anchor dimensions and then map over the others.
+    outdims = OutDims("Time"))
╭───────────────────────────────────────────╮
+│ 5×4×3 YAXArray{Union{Missing, Float64},3} │
+├───────────────────────────────────────────┴──────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-05") ForwardOrdered Regular Points,
+  → lon  Sampled{Int64} 1:4 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Int64} 1:3 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 480.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

Creating a vector array

Here we transform a raster array with spatial dimension lat and lon into a vector array having just one spatial dimension i.e. region. First, create the raster array:

julia
using YAXArrays
+using DimensionalData
+using Dates
+
+axlist = (
+    Dim{:time}(Date("2022-01-01"):Day(1):Date("2022-01-30")),
+    Dim{:lon}(range(1, 10, length=10)),
+    Dim{:lat}(range(1, 5, length=15)),
+)
+data = rand(30, 10, 15)
+raster_arr = YAXArray(axlist, data)
╭──────────────────────────────╮
+│ 30×10×15 YAXArray{Float64,3} │
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+  → lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 35.16 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Then, create a Matrix with the same spatial dimensions indicating to which region each point belongs to:

julia
regions_mat = map(Iterators.product(raster_arr.lon, raster_arr.lat)) do (lon, lat)
+    1 <= lon < 10 && 1 <= lat < 5 && return "A"
+    1 <= lon < 10 && 5 <= lat < 10 && return "B"
+    10 <= lon < 15 && 1 <= lat < 5 && return "C"
+    return "D"
+end
+regions_mat = DimArray(regions_mat, (raster_arr.lon, raster_arr.lat))
╭──────────────────────────╮
+│ 10×15 DimArray{String,2} │
+├──────────────────────────┴───────────────────────────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+└──────────────────────────────────────────────────────────────────────────────┘
+  ↓ →  1.0   1.28571  1.57143  1.85714  …  4.14286  4.42857  4.71429  5.0
+  1.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  2.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  3.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  4.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  5.0   "A"   "A"      "A"      "A"     …   "A"      "A"      "A"      "B"
+  6.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  7.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  8.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  9.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+ 10.0   "C"   "C"      "C"      "C"     …   "C"      "C"      "C"      "D"

which has the same spatial dimensions as the raster array at any given point in time:

julia
DimArray(raster_arr[time = 1])
╭───────────────────────────╮
+│ 10×15 DimArray{Float64,2} │
+├───────────────────────────┴──────────────────────────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+└──────────────────────────────────────────────────────────────────────────────┘
+  ↓ →  1.0       1.28571   1.57143    …  4.42857   4.71429   5.0
+  1.0  0.17593   0.417937  0.0723492     0.178603  0.781773  0.875658
+  2.0  0.701332  0.15394   0.685454      0.372761  0.984803  0.472308
+  3.0  0.120997  0.829062  0.684389      0.463503  0.840389  0.536399
+  ⋮                                   ⋱                      ⋮
+  8.0  0.145747  0.432286  0.465103      0.889583  0.514979  0.671662
+  9.0  0.538981  0.497189  0.167676      0.595405  0.752417  0.93986
+ 10.0  0.824354  0.376135  0.551732   …  0.101524  0.121947  0.508557

Now we calculate the list of corresponding points for each region. This will be re-used for each point in time during the final mapCube. In addition, this avoids the allocation of unnecessary memory.

julia
regions = ["A", "B", "C", "D"]
+points_of_regions = map(enumerate(regions)) do (i,region)
+    region => findall(isequal(region), regions_mat)
+end |> Dict |> sort
OrderedCollections.OrderedDict{String, Vector{CartesianIndex{2}}} with 4 entries:
+  "A" => [CartesianIndex(1, 1), CartesianIndex(2, 1), CartesianIndex(3, 1), Car…
+  "B" => [CartesianIndex(1, 15), CartesianIndex(2, 15), CartesianIndex(3, 15), …
+  "C" => [CartesianIndex(10, 1), CartesianIndex(10, 2), CartesianIndex(10, 3), …
+  "D" => [CartesianIndex(10, 15)]

Finally, we can transform the entire raster array:

julia
vector_array = mapCube(
+    raster_arr,
+    indims=InDims("lon", "lat"),
+    outdims=OutDims(Dim{:region}(regions))
+) do xout, xin
+    for (region_pos, points) in enumerate(points_of_regions.vals)
+        # aggregate values of points in the current region at the current date
+        xout[region_pos] = sum(view(xin, points))
+    end
+end
╭──────────────────────────────────────────╮
+│ 4×30 YAXArray{Union{Missing, Float64},2} │
+├──────────────────────────────────────────┴───────────────────────────── dims ┐
+  ↓ region Categorical{String} ["A", "B", "C", "D"] ForwardOrdered,
+  → time   Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 960.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

This gives us a vector array with only one spatial dimension, i.e. the region. Note that we still have 30 points in time. The transformation was applied for each date separately.

Hereby, xin is a 10x15 array representing a map at a given time and xout is a 4 element vector of missing values initially representing the 4 regions at that date. Then, we set each output element by the sum of all corresponding points

Distributed Computation

All map methods apply a function on all elements of all non-input dimensions separately. This allows to run each map function call in parallel. For example, we can execute each date of a time series in a different CPU thread during spatial aggregation.

The following code does a time mean over all grid points using multiple CPUs of a local machine:

julia
using YAXArrays
+using Dates
+using Distributed
+
+axlist = (
+    Dim{:time}(Date("2022-01-01"):Day(1):Date("2022-01-30")),
+    Dim{:lon}(range(1, 10, length=10)),
+    Dim{:lat}(range(1, 5, length=15)),
+)
+data = rand(30, 10, 15)
+properties = Dict(:origin => "user guide")
+a = YAXArray(axlist, data, properties)
+
+addprocs(2)
+
+@everywhere begin
+  using YAXArrays
+  using Zarr
+  using Statistics
+end
+
+@everywhere function mymean(output, pixel)
+  @show "doing a mean"
+     output[:] .= mean(pixel)
+end
+
+mapCube(mymean, a, indims=InDims("time"), outdims=OutDims())

In the last example, mapCube was used to map the mymean function. mapslices is a convenient function that can replace mapCube, where you can omit defining an extra function with the output argument as an input (e.g. mymean). It is possible to simply use mapslice

julia
mapslices(mean  skipmissing, a, dims="time")

It is also possible to distribute easily the workload on a cluster, with little modification to the code. To do so, we use the ClusterManagers package.

julia
using Distributed
+using ClusterManagers
+addprocs(SlurmManager(10))
`,138)]))}const o=i(p,[["render",l]]);export{g as __pageData,o as default}; diff --git a/previews/PR477/assets/UserGuide_compute.md.DcvjuWd2.lean.js b/previews/PR477/assets/UserGuide_compute.md.DcvjuWd2.lean.js new file mode 100644 index 00000000..3eb859d6 --- /dev/null +++ b/previews/PR477/assets/UserGuide_compute.md.DcvjuWd2.lean.js @@ -0,0 +1,406 @@ +import{_ as i,c as a,a2 as n,o as t}from"./chunks/framework.CG45A19l.js";const g=JSON.parse('{"title":"Compute YAXArrays","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/compute.md","filePath":"UserGuide/compute.md","lastUpdated":null}'),p={name:"UserGuide/compute.md"};function l(e,s,h,k,d,r){return t(),a("div",null,s[0]||(s[0]=[n(`

Compute YAXArrays

This section describes how to create new YAXArrays by performing operations on them.

Let's start by creating an example dataset:

julia
using YAXArrays
+using Dates
+
+axlist = (
+    Dim{:time}(Date("2022-01-01"):Day(1):Date("2022-01-30")),
+    Dim{:lon}(range(1, 10, length=10)),
+    Dim{:lat}(range(1, 5, length=15)),
+)
+data = rand(30, 10, 15)
+properties = Dict(:origin => "user guide")
+a = YAXArray(axlist, data, properties)
╭──────────────────────────────╮
+│ 30×10×15 YAXArray{Float64,3} │
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+  → lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, String} with 1 entry:
+  :origin => "user guide"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 35.16 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Modify elements of a YAXArray

julia
a[1,2,3]
0.519282115735095
julia
a[1,2,3] = 42
42
julia
a[1,2,3]
42.0

WARNING

Some arrays, e.g. those saved in a cloud object storage are immutable making any modification of the data impossible.

Arithmetics

Add a value to all elements of an array and save it as a new array:

julia
a2 = a .+ 5
╭──────────────────────────────╮
+│ 30×10×15 YAXArray{Float64,3} │
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+  → lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, String} with 1 entry:
+  :origin => "user guide"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 35.16 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
a2[1,2,3] == a[1,2,3] + 5
true

map

Apply a function on every element of an array individually:

julia
offset = 5
+map(a) do x
+    (x + offset) / 2 * 3
+end
╭──────────────────────────────╮
+│ 30×10×15 YAXArray{Float64,3} │
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+  → lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, String} with 1 entry:
+  :origin => "user guide"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 35.16 KB
+└──────────────────────────────────────────────────────────────────────────────┘

This keeps all dimensions unchanged. Note, that here we can not access neighboring elements. In this case, we can use mapslices or mapCube instead. Each element of the array is processed individually.

The code runs very fast, because map applies the function lazily. Actual computation will be performed only on demand, e.g. when elements were explicitly requested or further computations were performed.

mapslices

Reduce the time dimension by calculating the average value of all points in time:

julia
import Statistics: mean
+mapslices(mean, a, dims="Time")
╭───────────────────────────────────────────╮
+│ 10×15 YAXArray{Union{Missing, Float64},2} │
+├───────────────────────────────────────────┴──────────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 1.17 KB
+└──────────────────────────────────────────────────────────────────────────────┘

There is no time dimension left, because there is only one value left after averaging all time steps. We can also calculate spatial means resulting in one value per time step:

julia
mapslices(mean, a, dims=("lat", "lon"))
╭────────────────────────────────────────────────╮
+│ 30-element YAXArray{Union{Missing, Float64},1} │
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 240.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

mapCube

mapCube is the most flexible way to apply a function over subsets of an array. Dimensions may be added or removed.

Operations over several YAXArrays

Here, we will define a simple function, that will take as input several YAXArrays. But first, let's load the necessary packages.

julia
using YAXArrays, Zarr
+using Dates

Define function in space and time

julia
f(lo, la, t) = (lo + la + Dates.dayofyear(t))
f (generic function with 1 method)

now, mapCube requires this function to be wrapped as follows

julia
function g(xout, lo, la, t)
+    xout .= f.(lo, la, t)
+end
g (generic function with 1 method)

INFO

Note the . after f, this is because we will slice across time, namely, the function is broadcasted along this dimension.

Here, we do create YAXArrays only with the desired dimensions as

julia
julia> lon = YAXArray(Dim{:lon}(range(1, 15)))
╭──────────────────────────────╮
+15-element YAXArray{Int64,1}
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+lon Sampled{Int64} 1:15 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 120.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘
julia
julia> lat = YAXArray(Dim{:lat}(range(1, 10)))
╭──────────────────────────────╮
+10-element YAXArray{Int64,1}
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+lat Sampled{Int64} 1:10 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 80.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

And a time Cube's Axis

julia
tspan = Date("2022-01-01"):Day(1):Date("2022-01-30")
+time = YAXArray(Dim{:time}(tspan))
╭─────────────────────────────╮
+│ 30-element YAXArray{Date,1} │
+├─────────────────────────────┴────────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 240.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

note that the following can be extended to arbitrary YAXArrays with additional data and dimensions.

Let's generate a new cube using mapCube and saving the output directly into disk.

julia
julia> gen_cube = mapCube(g, (lon, lat, time);
+           indims = (InDims(), InDims(), InDims("time")),
+           outdims = OutDims("time", overwrite=true, path="my_gen_cube.zarr", backend=:zarr,
+           outtype = Float32)
+           # max_cache=1e9
+       )
╭──────────────────────────────────────────────╮
+30×15×10 YAXArray{Union{Missing, Float32},3}
+├──────────────────────────────────────────────┴───────────────────────── dims ┐
+time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+lon  Sampled{Int64} 1:15 ForwardOrdered Regular Points,
+lat  Sampled{Int64} 1:10 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 1 entry:
+  "missing_value" => 1.0f32
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 17.58 KB
+└──────────────────────────────────────────────────────────────────────────────┘

"time axis goes first"

Note that currently the time axis in the output cube goes first.

Check that it is working

julia
julia> gen_cube.data[1, :, :]
15×10 Matrix{Union{Missing, Float32}}:
+  3.0   4.0   5.0   6.0   7.0   8.0   9.0  10.0  11.0  12.0
+  4.0   5.0   6.0   7.0   8.0   9.0  10.0  11.0  12.0  13.0
+  5.0   6.0   7.0   8.0   9.0  10.0  11.0  12.0  13.0  14.0
+  6.0   7.0   8.0   9.0  10.0  11.0  12.0  13.0  14.0  15.0
+  7.0   8.0   9.0  10.0  11.0  12.0  13.0  14.0  15.0  16.0
+  8.0   9.0  10.0  11.0  12.0  13.0  14.0  15.0  16.0  17.0
+  9.0  10.0  11.0  12.0  13.0  14.0  15.0  16.0  17.0  18.0
+ 10.0  11.0  12.0  13.0  14.0  15.0  16.0  17.0  18.0  19.0
+ 11.0  12.0  13.0  14.0  15.0  16.0  17.0  18.0  19.0  20.0
+ 12.0  13.0  14.0  15.0  16.0  17.0  18.0  19.0  20.0  21.0
+ 13.0  14.0  15.0  16.0  17.0  18.0  19.0  20.0  21.0  22.0
+ 14.0  15.0  16.0  17.0  18.0  19.0  20.0  21.0  22.0  23.0
+ 15.0  16.0  17.0  18.0  19.0  20.0  21.0  22.0  23.0  24.0
+ 16.0  17.0  18.0  19.0  20.0  21.0  22.0  23.0  24.0  25.0
+ 17.0  18.0  19.0  20.0  21.0  22.0  23.0  24.0  25.0  26.0

but, we can generate a another cube with a different output order as follows

julia
julia> gen_cube = mapCube(g, (lon, lat, time);
+           indims = (InDims("lon"), InDims(), InDims()),
+           outdims = OutDims("lon", overwrite=true, path="my_gen_cube.zarr", backend=:zarr,
+           outtype = Float32)
+           # max_cache=1e9
+       )
╭──────────────────────────────────────────────╮
+15×10×30 YAXArray{Union{Missing, Float32},3}
+├──────────────────────────────────────────────┴───────────────────────── dims ┐
+lon  Sampled{Int64} 1:15 ForwardOrdered Regular Points,
+lat  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 1 entry:
+  "missing_value" => 1.0f32
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 17.58 KB
+└──────────────────────────────────────────────────────────────────────────────┘

INFO

Note that now the broadcasted dimension is lon.

we can see this by slicing on the last dimension now

julia
gen_cube.data[:, :, 1]
15×10 Matrix{Union{Missing, Float32}}:
+  3.0   4.0   5.0   6.0   7.0   8.0   9.0  10.0  11.0  12.0
+  4.0   5.0   6.0   7.0   8.0   9.0  10.0  11.0  12.0  13.0
+  5.0   6.0   7.0   8.0   9.0  10.0  11.0  12.0  13.0  14.0
+  6.0   7.0   8.0   9.0  10.0  11.0  12.0  13.0  14.0  15.0
+  7.0   8.0   9.0  10.0  11.0  12.0  13.0  14.0  15.0  16.0
+  8.0   9.0  10.0  11.0  12.0  13.0  14.0  15.0  16.0  17.0
+  9.0  10.0  11.0  12.0  13.0  14.0  15.0  16.0  17.0  18.0
+ 10.0  11.0  12.0  13.0  14.0  15.0  16.0  17.0  18.0  19.0
+ 11.0  12.0  13.0  14.0  15.0  16.0  17.0  18.0  19.0  20.0
+ 12.0  13.0  14.0  15.0  16.0  17.0  18.0  19.0  20.0  21.0
+ 13.0  14.0  15.0  16.0  17.0  18.0  19.0  20.0  21.0  22.0
+ 14.0  15.0  16.0  17.0  18.0  19.0  20.0  21.0  22.0  23.0
+ 15.0  16.0  17.0  18.0  19.0  20.0  21.0  22.0  23.0  24.0
+ 16.0  17.0  18.0  19.0  20.0  21.0  22.0  23.0  24.0  25.0
+ 17.0  18.0  19.0  20.0  21.0  22.0  23.0  24.0  25.0  26.0

which outputs the same as the gen_cube.data[1, :, :] called above.

OutDims and YAXArray Properties

Here, we will consider different scenarios, namely how we deal with different input cubes and how to specify the output ones. We will illustrate this with the following test example and the subsequent function definitions.

julia
using YAXArrays, Dates
+using Zarr
+using Random
+
+axlist = (
+    Dim{:time}(Date("2022-01-01"):Day(1):Date("2022-01-05")),
+    Dim{:lon}(range(1, 4, length=4)),
+    Dim{:lat}(range(1, 3, length=3)),
+    Dim{:variables}(["a", "b"])
+)
+
+Random.seed!(123)
+data = rand(1:5, 5, 4, 3, 2)
+
+properties = Dict("description" => "multi dimensional test cube")
+yax_test = YAXArray(axlist, data, properties)
╭───────────────────────────╮
+│ 5×4×3×2 YAXArray{Int64,4} │
+├───────────────────────────┴──────────────────────────────────────────── dims ┐
+  ↓ time      Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-05") ForwardOrdered Regular Points,
+  → lon       Sampled{Float64} 1.0:1.0:4.0 ForwardOrdered Regular Points,
+  ↗ lat       Sampled{Float64} 1.0:1.0:3.0 ForwardOrdered Regular Points,
+  ⬔ variables Categorical{String} ["a", "b"] ForwardOrdered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, String} with 1 entry:
+  "description" => "multi dimensional test cube"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 960.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

One InDims to many OutDims

In the following function, note how the outputs are defined first and the inputs later.

julia
function one_to_many(xout_one, xout_two, xout_flat, xin_one)
+    xout_one .= f1.(xin_one)
+    xout_two .= f2.(xin_one)
+    xout_flat .= sum(xin_one)
+    return nothing
+end
+
+f1(xin) = xin + 1
+f2(xin) = xin + 2
f2 (generic function with 1 method)

now, we define InDims and OutDims:

julia
indims_one   = InDims("Time")
+# outputs dimension
+properties_one = Dict{String, Any}("name" => "plus_one")
+properties_two = Dict{String, Any}("name" => "plus_two")
+
+outdims_one = OutDims("Time"; properties=properties_one)
+outdims_two = OutDims("Time"; properties=properties_two)
+outdims_flat = OutDims(;) # it will get the default \`layer\` name if open as dataset
OutDims((), :auto, Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}(), false, Array, :input, 1)
julia
ds = mapCube(one_to_many, yax_test,
+    indims = indims_one,
+    outdims = (outdims_one, outdims_two, outdims_flat));

let's see the second output

julia
ds[2]
╭───────────────────────────────────────────╮
+│ 5×4×3×2 YAXArray{Union{Missing, Int64},4} │
+├───────────────────────────────────────────┴──────────────────────────── dims ┐
+  ↓ time      Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-05") ForwardOrdered Regular Points,
+  → lon       Sampled{Float64} 1.0:1.0:4.0 ForwardOrdered Regular Points,
+  ↗ lat       Sampled{Float64} 1.0:1.0:3.0 ForwardOrdered Regular Points,
+  ⬔ variables Categorical{String} ["a", "b"] ForwardOrdered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 1 entry:
+  "name" => "plus_two"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 960.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

Many InDims to many OutDims

Let's consider a second test set

julia
properties_2d = Dict("description" => "2d dimensional test cube")
+yax_2d = YAXArray(axlist[2:end], rand(-1:1, 4, 3, 2), properties_2d)
╭─────────────────────────╮
+│ 4×3×2 YAXArray{Int64,3} │
+├─────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ lon       Sampled{Float64} 1.0:1.0:4.0 ForwardOrdered Regular Points,
+  → lat       Sampled{Float64} 1.0:1.0:3.0 ForwardOrdered Regular Points,
+  ↗ variables Categorical{String} ["a", "b"] ForwardOrdered
+├─────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, String} with 1 entry:
+  "description" => "2d dimensional test cube"
+├─────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 192.0 bytes
+└─────────────────────────────────────────────────────────────────────────┘

The function definitions operating in this case are as follows

julia
function many_to_many(xout_one, xout_two, xout_flat, xin_one, xin_two, xin_drei)
+    xout_one .= f1.(xin_one)
+    xout_two .= f2mix.(xin_one, xin_two)
+    xout_flat .= sum(xin_drei) # this will reduce the time dimension if we set outdims = OutDims()
+    return nothing
+end
+f2mix(xin_xyt, xin_xy) = xin_xyt - xin_xy
f2mix (generic function with 1 method)

Specify path in OutDims

julia
indims_one   = InDims("Time")
+indims_2d   = InDims() # ? it matches only to the other 2 dimensions and uses the same values for each time step
+properties = Dict{String, Any}("name"=> "many_to_many_two")
+outdims_one = OutDims("Time")
+outdims_two = OutDims("Time"; path = "test_mm.zarr", properties)
+outdims_flat = OutDims()
OutDims((), :auto, Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}(), false, Array, :input, 1)
julia
ds = mapCube(many_to_many, (yax_test, yax_2d, yax_test),
+    indims = (indims_one, indims_2d, indims_one),
+    outdims = (outdims_one, outdims_two, outdims_flat));

And we can open the one that was saved directly to disk.

julia
ds_mm = open_dataset("test_mm.zarr")
YAXArray Dataset
+Shared Axes: 
+  (↓ Ti  Sampled{DateTime} [2022-01-01T00:00:00, …, 2022-01-05T00:00:00] ForwardOrdered Irregular Points,
+  → lon Sampled{Float64} 1.0:1.0:4.0 ForwardOrdered Regular Points,
+  ↗ lat Sampled{Float64} 1.0:1.0:3.0 ForwardOrdered Regular Points)
+
+Variables: 
+a, b

Different InDims names

Here, the goal is to operate at the pixel level (longitude, latitude), and then apply the corresponding function to the extracted values. Consider the following toy cubes:

julia
Random.seed!(123)
+data = rand(3.0:5.0, 5, 4, 3)
+
+axlist = (Dim{:lon}(1:4), Dim{:lat}(1:3), Dim{:depth}(1:7),)
+yax_2d = YAXArray(axlist, rand(-3.0:0.0, 4, 3, 7))
╭───────────────────────────╮
+│ 4×3×7 YAXArray{Float64,3} │
+├───────────────────────────┴───────────────────────── dims ┐
+  ↓ lon   Sampled{Int64} 1:4 ForwardOrdered Regular Points,
+  → lat   Sampled{Int64} 1:3 ForwardOrdered Regular Points,
+  ↗ depth Sampled{Int64} 1:7 ForwardOrdered Regular Points
+├───────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├───────────────────────────────────────── loaded in memory ┤
+  data size: 672.0 bytes
+└───────────────────────────────────────────────────────────┘

and

julia
Random.seed!(123)
+data = rand(3.0:5.0, 5, 4, 3)
+
+axlist = (Dim{:time}(Date("2022-01-01"):Day(1):Date("2022-01-05")),
+    Dim{:lon}(1:4), Dim{:lat}(1:3),)
+
+properties = Dict("description" => "multi dimensional test cube")
+yax_test = YAXArray(axlist, data, properties)
╭───────────────────────────╮
+│ 5×4×3 YAXArray{Float64,3} │
+├───────────────────────────┴──────────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-05") ForwardOrdered Regular Points,
+  → lon  Sampled{Int64} 1:4 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Int64} 1:3 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, String} with 1 entry:
+  "description" => "multi dimensional test cube"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 480.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

and the corresponding functions

julia
function mix_time_depth(xin_xyt, xin_xyz)
+    s = sum(abs.(xin_xyz))
+    return xin_xyt.^2 .+ s
+end
+
+function time_depth(xout, xin_one, xin_two)
+    xout .= mix_time_depth(xin_one, xin_two)
+    # Note also that there is no dot anymore in the function application!
+    return nothing
+end
time_depth (generic function with 1 method)

with the final mapCube operation as follows

julia
ds = mapCube(time_depth, (yax_test, yax_2d),
+    indims = (InDims("Time"), InDims("depth")), # ? anchor dimensions and then map over the others.
+    outdims = OutDims("Time"))
╭───────────────────────────────────────────╮
+│ 5×4×3 YAXArray{Union{Missing, Float64},3} │
+├───────────────────────────────────────────┴──────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-05") ForwardOrdered Regular Points,
+  → lon  Sampled{Int64} 1:4 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Int64} 1:3 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 480.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

Creating a vector array

Here we transform a raster array with spatial dimension lat and lon into a vector array having just one spatial dimension i.e. region. First, create the raster array:

julia
using YAXArrays
+using DimensionalData
+using Dates
+
+axlist = (
+    Dim{:time}(Date("2022-01-01"):Day(1):Date("2022-01-30")),
+    Dim{:lon}(range(1, 10, length=10)),
+    Dim{:lat}(range(1, 5, length=15)),
+)
+data = rand(30, 10, 15)
+raster_arr = YAXArray(axlist, data)
╭──────────────────────────────╮
+│ 30×10×15 YAXArray{Float64,3} │
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+  → lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 35.16 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Then, create a Matrix with the same spatial dimensions indicating to which region each point belongs to:

julia
regions_mat = map(Iterators.product(raster_arr.lon, raster_arr.lat)) do (lon, lat)
+    1 <= lon < 10 && 1 <= lat < 5 && return "A"
+    1 <= lon < 10 && 5 <= lat < 10 && return "B"
+    10 <= lon < 15 && 1 <= lat < 5 && return "C"
+    return "D"
+end
+regions_mat = DimArray(regions_mat, (raster_arr.lon, raster_arr.lat))
╭──────────────────────────╮
+│ 10×15 DimArray{String,2} │
+├──────────────────────────┴───────────────────────────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+└──────────────────────────────────────────────────────────────────────────────┘
+  ↓ →  1.0   1.28571  1.57143  1.85714  …  4.14286  4.42857  4.71429  5.0
+  1.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  2.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  3.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  4.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  5.0   "A"   "A"      "A"      "A"     …   "A"      "A"      "A"      "B"
+  6.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  7.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  8.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+  9.0   "A"   "A"      "A"      "A"         "A"      "A"      "A"      "B"
+ 10.0   "C"   "C"      "C"      "C"     …   "C"      "C"      "C"      "D"

which has the same spatial dimensions as the raster array at any given point in time:

julia
DimArray(raster_arr[time = 1])
╭───────────────────────────╮
+│ 10×15 DimArray{Float64,2} │
+├───────────────────────────┴──────────────────────────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+└──────────────────────────────────────────────────────────────────────────────┘
+  ↓ →  1.0       1.28571   1.57143    …  4.42857   4.71429   5.0
+  1.0  0.17593   0.417937  0.0723492     0.178603  0.781773  0.875658
+  2.0  0.701332  0.15394   0.685454      0.372761  0.984803  0.472308
+  3.0  0.120997  0.829062  0.684389      0.463503  0.840389  0.536399
+  ⋮                                   ⋱                      ⋮
+  8.0  0.145747  0.432286  0.465103      0.889583  0.514979  0.671662
+  9.0  0.538981  0.497189  0.167676      0.595405  0.752417  0.93986
+ 10.0  0.824354  0.376135  0.551732   …  0.101524  0.121947  0.508557

Now we calculate the list of corresponding points for each region. This will be re-used for each point in time during the final mapCube. In addition, this avoids the allocation of unnecessary memory.

julia
regions = ["A", "B", "C", "D"]
+points_of_regions = map(enumerate(regions)) do (i,region)
+    region => findall(isequal(region), regions_mat)
+end |> Dict |> sort
OrderedCollections.OrderedDict{String, Vector{CartesianIndex{2}}} with 4 entries:
+  "A" => [CartesianIndex(1, 1), CartesianIndex(2, 1), CartesianIndex(3, 1), Car…
+  "B" => [CartesianIndex(1, 15), CartesianIndex(2, 15), CartesianIndex(3, 15), …
+  "C" => [CartesianIndex(10, 1), CartesianIndex(10, 2), CartesianIndex(10, 3), …
+  "D" => [CartesianIndex(10, 15)]

Finally, we can transform the entire raster array:

julia
vector_array = mapCube(
+    raster_arr,
+    indims=InDims("lon", "lat"),
+    outdims=OutDims(Dim{:region}(regions))
+) do xout, xin
+    for (region_pos, points) in enumerate(points_of_regions.vals)
+        # aggregate values of points in the current region at the current date
+        xout[region_pos] = sum(view(xin, points))
+    end
+end
╭──────────────────────────────────────────╮
+│ 4×30 YAXArray{Union{Missing, Float64},2} │
+├──────────────────────────────────────────┴───────────────────────────── dims ┐
+  ↓ region Categorical{String} ["A", "B", "C", "D"] ForwardOrdered,
+  → time   Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 960.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

This gives us a vector array with only one spatial dimension, i.e. the region. Note that we still have 30 points in time. The transformation was applied for each date separately.

Hereby, xin is a 10x15 array representing a map at a given time and xout is a 4 element vector of missing values initially representing the 4 regions at that date. Then, we set each output element by the sum of all corresponding points

Distributed Computation

All map methods apply a function on all elements of all non-input dimensions separately. This allows to run each map function call in parallel. For example, we can execute each date of a time series in a different CPU thread during spatial aggregation.

The following code does a time mean over all grid points using multiple CPUs of a local machine:

julia
using YAXArrays
+using Dates
+using Distributed
+
+axlist = (
+    Dim{:time}(Date("2022-01-01"):Day(1):Date("2022-01-30")),
+    Dim{:lon}(range(1, 10, length=10)),
+    Dim{:lat}(range(1, 5, length=15)),
+)
+data = rand(30, 10, 15)
+properties = Dict(:origin => "user guide")
+a = YAXArray(axlist, data, properties)
+
+addprocs(2)
+
+@everywhere begin
+  using YAXArrays
+  using Zarr
+  using Statistics
+end
+
+@everywhere function mymean(output, pixel)
+  @show "doing a mean"
+     output[:] .= mean(pixel)
+end
+
+mapCube(mymean, a, indims=InDims("time"), outdims=OutDims())

In the last example, mapCube was used to map the mymean function. mapslices is a convenient function that can replace mapCube, where you can omit defining an extra function with the output argument as an input (e.g. mymean). It is possible to simply use mapslice

julia
mapslices(mean  skipmissing, a, dims="time")

It is also possible to distribute easily the workload on a cluster, with little modification to the code. To do so, we use the ClusterManagers package.

julia
using Distributed
+using ClusterManagers
+addprocs(SlurmManager(10))
`,138)]))}const o=i(p,[["render",l]]);export{g as __pageData,o as default}; diff --git a/previews/PR477/assets/UserGuide_convert.md.DfXE0j4J.js b/previews/PR477/assets/UserGuide_convert.md.DfXE0j4J.js new file mode 100644 index 00000000..cd913f3b --- /dev/null +++ b/previews/PR477/assets/UserGuide_convert.md.DfXE0j4J.js @@ -0,0 +1,78 @@ +import{_ as a,c as n,a2 as i,o as p}from"./chunks/framework.CG45A19l.js";const c=JSON.parse('{"title":"Convert YAXArrays","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/convert.md","filePath":"UserGuide/convert.md","lastUpdated":null}'),e={name:"UserGuide/convert.md"};function t(l,s,r,h,d,k){return p(),n("div",null,s[0]||(s[0]=[i(`

Convert YAXArrays

This section describes how to convert variables from types of other Julia packages into YAXArrays and vice versa.

WARNING

YAXArrays is designed to work with large datasets that are way larger than the memory. However, most types are designed to work in memory. Those conversions are only possible if the entire dataset fits into memory. In addition, metadata might be lost during conversion.

Convert Base.Array

Convert Base.Array to YAXArray:

julia
using YAXArrays
+
+m = rand(5,10)
+a = YAXArray(m)
╭──────────────────────────╮
+│ 5×10 YAXArray{Float64,2} │
+├──────────────────────────┴──────────────────────────────────── dims ┐
+  ↓ Dim_1 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points
+├─────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├─────────────────────────────────────────────────── loaded in memory ┤
+  data size: 400.0 bytes
+└─────────────────────────────────────────────────────────────────────┘

Convert YAXArray to Base.Array:

julia
m2 = collect(a.data)
5×10 Matrix{Float64}:
+ 0.265797  0.789891  0.611084  0.845983  …  0.918555  0.870826   0.348362
+ 0.665723  0.241882  0.426519  0.581312     0.949935  0.0214057  0.152534
+ 0.83556   0.456765  0.197238  0.645758     0.74732   0.652339   0.935631
+ 0.337926  0.151146  0.673373  0.169284     0.75269   0.166212   0.0358348
+ 0.594514  0.364288  0.78467   0.830391     0.128204  0.174934   0.0210077

Convert Raster

A Raster as defined in Rasters.jl has a same supertype of a YAXArray, i.e. AbstractDimArray, allowing easy conversion between those types:

julia
using Rasters
+
+lon, lat = X(25:1:30), Y(25:1:30)
+time = Ti(2000:2024)
+ras = Raster(rand(lon, lat, time))
+a = YAXArray(dims(ras), ras.data)
╭────────────────────────────╮
+│ 6×6×25 YAXArray{Float64,3} │
+├────────────────────────────┴────────────────────────── dims ┐
+  ↓ X  Sampled{Int64} 25:1:30 ForwardOrdered Regular Points,
+  → Y  Sampled{Int64} 25:1:30 ForwardOrdered Regular Points,
+  ↗ Ti Sampled{Int64} 2000:2024 ForwardOrdered Regular Points
+├─────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├─────────────────────────────────────────── loaded in memory ┤
+  data size: 7.03 KB
+└─────────────────────────────────────────────────────────────┘
julia
ras2 = Raster(a)
╭──────────────────────────╮
+│ 6×6×25 Raster{Float64,3} │
+├──────────────────────────┴──────────────────────────── dims ┐
+  ↓ X  Sampled{Int64} 25:1:30 ForwardOrdered Regular Points,
+  → Y  Sampled{Int64} 25:1:30 ForwardOrdered Regular Points,
+  ↗ Ti Sampled{Int64} 2000:2024 ForwardOrdered Regular Points
+├─────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├───────────────────────────────────────────────────── raster ┤
+  extent: Extent(X = (25, 30), Y = (25, 30), Ti = (2000, 2024))
+
+└─────────────────────────────────────────────────────────────┘
+[:, :, 1]
+  ↓ →  25         26          27          28         29         30
+ 25     0.862644   0.770949    0.0702532   0.973332   0.12568    0.938094
+ 26     0.203714   0.718667    0.916686    0.796375   0.376409   0.395234
+ 27     0.492817   0.0566881   0.617023    0.475725   0.870888   0.521991
+ 28     0.268675   0.215973    0.193109    0.687891   0.561549   0.81362
+ 29     0.540514   0.0620649   0.71314     0.225542   0.299637   0.762559
+ 30     0.872575   0.731779    0.926096    0.744521   0.21056    0.0593761

Convert DimArray

A DimArray as defined in DimensionalData.jl has a same supertype of a YAXArray, i.e. AbstractDimArray, allowing easy conversion between those types.

Convert DimArray to YAXArray:

julia
using DimensionalData
+using YAXArrayBase
+
+dim_arr = rand(X(1:5), Y(10.0:15.0), metadata = Dict{String, Any}())
+a = yaxconvert(YAXArray, dim_arr)
╭─────────────────────────╮
+│ 5×6 YAXArray{Float64,2} │
+├─────────────────────────┴────────────────────────────────── dims ┐
+  ↓ X Sampled{Int64} 1:5 ForwardOrdered Regular Points,
+  → Y Sampled{Float64} 10.0:1.0:15.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────── loaded in memory ┤
+  data size: 240.0 bytes
+└──────────────────────────────────────────────────────────────────┘

Convert YAXArray to DimArray:

julia
dim_arr2 = yaxconvert(DimArray, a)
╭─────────────────────────╮
+│ 5×6 DimArray{Float64,2} │
+├─────────────────────────┴────────────────────────────────── dims ┐
+  ↓ X Sampled{Int64} 1:5 ForwardOrdered Regular Points,
+  → Y Sampled{Float64} 10.0:1.0:15.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+└──────────────────────────────────────────────────────────────────┘
+ ↓ →  10.0       11.0       12.0        13.0       14.0       15.0
+ 1     0.340769   0.658321   0.0881736   0.630469   0.63593    0.229281
+ 2     0.536273   0.791138   0.47951     0.917969   0.686278   0.780824
+ 3     0.522262   0.237824   0.165853    0.662295   0.327439   0.793913
+ 4     0.365971   0.215988   0.520744    0.096862   0.625389   0.725765
+ 5     0.271209   0.521769   0.858065    0.162134   0.181798   0.425153

INFO

At the moment there is no support to save a DimArray directly into disk as a NetCDF or a Zarr file.

`,25)]))}const g=a(e,[["render",t]]);export{c as __pageData,g as default}; diff --git a/previews/PR477/assets/UserGuide_convert.md.DfXE0j4J.lean.js b/previews/PR477/assets/UserGuide_convert.md.DfXE0j4J.lean.js new file mode 100644 index 00000000..cd913f3b --- /dev/null +++ b/previews/PR477/assets/UserGuide_convert.md.DfXE0j4J.lean.js @@ -0,0 +1,78 @@ +import{_ as a,c as n,a2 as i,o as p}from"./chunks/framework.CG45A19l.js";const c=JSON.parse('{"title":"Convert YAXArrays","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/convert.md","filePath":"UserGuide/convert.md","lastUpdated":null}'),e={name:"UserGuide/convert.md"};function t(l,s,r,h,d,k){return p(),n("div",null,s[0]||(s[0]=[i(`

Convert YAXArrays

This section describes how to convert variables from types of other Julia packages into YAXArrays and vice versa.

WARNING

YAXArrays is designed to work with large datasets that are way larger than the memory. However, most types are designed to work in memory. Those conversions are only possible if the entire dataset fits into memory. In addition, metadata might be lost during conversion.

Convert Base.Array

Convert Base.Array to YAXArray:

julia
using YAXArrays
+
+m = rand(5,10)
+a = YAXArray(m)
╭──────────────────────────╮
+│ 5×10 YAXArray{Float64,2} │
+├──────────────────────────┴──────────────────────────────────── dims ┐
+  ↓ Dim_1 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points
+├─────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├─────────────────────────────────────────────────── loaded in memory ┤
+  data size: 400.0 bytes
+└─────────────────────────────────────────────────────────────────────┘

Convert YAXArray to Base.Array:

julia
m2 = collect(a.data)
5×10 Matrix{Float64}:
+ 0.265797  0.789891  0.611084  0.845983  …  0.918555  0.870826   0.348362
+ 0.665723  0.241882  0.426519  0.581312     0.949935  0.0214057  0.152534
+ 0.83556   0.456765  0.197238  0.645758     0.74732   0.652339   0.935631
+ 0.337926  0.151146  0.673373  0.169284     0.75269   0.166212   0.0358348
+ 0.594514  0.364288  0.78467   0.830391     0.128204  0.174934   0.0210077

Convert Raster

A Raster as defined in Rasters.jl has a same supertype of a YAXArray, i.e. AbstractDimArray, allowing easy conversion between those types:

julia
using Rasters
+
+lon, lat = X(25:1:30), Y(25:1:30)
+time = Ti(2000:2024)
+ras = Raster(rand(lon, lat, time))
+a = YAXArray(dims(ras), ras.data)
╭────────────────────────────╮
+│ 6×6×25 YAXArray{Float64,3} │
+├────────────────────────────┴────────────────────────── dims ┐
+  ↓ X  Sampled{Int64} 25:1:30 ForwardOrdered Regular Points,
+  → Y  Sampled{Int64} 25:1:30 ForwardOrdered Regular Points,
+  ↗ Ti Sampled{Int64} 2000:2024 ForwardOrdered Regular Points
+├─────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├─────────────────────────────────────────── loaded in memory ┤
+  data size: 7.03 KB
+└─────────────────────────────────────────────────────────────┘
julia
ras2 = Raster(a)
╭──────────────────────────╮
+│ 6×6×25 Raster{Float64,3} │
+├──────────────────────────┴──────────────────────────── dims ┐
+  ↓ X  Sampled{Int64} 25:1:30 ForwardOrdered Regular Points,
+  → Y  Sampled{Int64} 25:1:30 ForwardOrdered Regular Points,
+  ↗ Ti Sampled{Int64} 2000:2024 ForwardOrdered Regular Points
+├─────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├───────────────────────────────────────────────────── raster ┤
+  extent: Extent(X = (25, 30), Y = (25, 30), Ti = (2000, 2024))
+
+└─────────────────────────────────────────────────────────────┘
+[:, :, 1]
+  ↓ →  25         26          27          28         29         30
+ 25     0.862644   0.770949    0.0702532   0.973332   0.12568    0.938094
+ 26     0.203714   0.718667    0.916686    0.796375   0.376409   0.395234
+ 27     0.492817   0.0566881   0.617023    0.475725   0.870888   0.521991
+ 28     0.268675   0.215973    0.193109    0.687891   0.561549   0.81362
+ 29     0.540514   0.0620649   0.71314     0.225542   0.299637   0.762559
+ 30     0.872575   0.731779    0.926096    0.744521   0.21056    0.0593761

Convert DimArray

A DimArray as defined in DimensionalData.jl has a same supertype of a YAXArray, i.e. AbstractDimArray, allowing easy conversion between those types.

Convert DimArray to YAXArray:

julia
using DimensionalData
+using YAXArrayBase
+
+dim_arr = rand(X(1:5), Y(10.0:15.0), metadata = Dict{String, Any}())
+a = yaxconvert(YAXArray, dim_arr)
╭─────────────────────────╮
+│ 5×6 YAXArray{Float64,2} │
+├─────────────────────────┴────────────────────────────────── dims ┐
+  ↓ X Sampled{Int64} 1:5 ForwardOrdered Regular Points,
+  → Y Sampled{Float64} 10.0:1.0:15.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────── loaded in memory ┤
+  data size: 240.0 bytes
+└──────────────────────────────────────────────────────────────────┘

Convert YAXArray to DimArray:

julia
dim_arr2 = yaxconvert(DimArray, a)
╭─────────────────────────╮
+│ 5×6 DimArray{Float64,2} │
+├─────────────────────────┴────────────────────────────────── dims ┐
+  ↓ X Sampled{Int64} 1:5 ForwardOrdered Regular Points,
+  → Y Sampled{Float64} 10.0:1.0:15.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+└──────────────────────────────────────────────────────────────────┘
+ ↓ →  10.0       11.0       12.0        13.0       14.0       15.0
+ 1     0.340769   0.658321   0.0881736   0.630469   0.63593    0.229281
+ 2     0.536273   0.791138   0.47951     0.917969   0.686278   0.780824
+ 3     0.522262   0.237824   0.165853    0.662295   0.327439   0.793913
+ 4     0.365971   0.215988   0.520744    0.096862   0.625389   0.725765
+ 5     0.271209   0.521769   0.858065    0.162134   0.181798   0.425153

INFO

At the moment there is no support to save a DimArray directly into disk as a NetCDF or a Zarr file.

`,25)]))}const g=a(e,[["render",t]]);export{c as __pageData,g as default}; diff --git a/previews/PR477/assets/UserGuide_create.md.52g4xNHB.js b/previews/PR477/assets/UserGuide_create.md.52g4xNHB.js new file mode 100644 index 00000000..1df8527f --- /dev/null +++ b/previews/PR477/assets/UserGuide_create.md.52g4xNHB.js @@ -0,0 +1,48 @@ +import{_ as a,c as i,a2 as n,o as t}from"./chunks/framework.CG45A19l.js";const g=JSON.parse('{"title":"Create YAXArrays and Datasets","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/create.md","filePath":"UserGuide/create.md","lastUpdated":null}'),e={name:"UserGuide/create.md"};function p(l,s,h,k,r,d){return t(),i("div",null,s[0]||(s[0]=[n(`

Create YAXArrays and Datasets

This section describes how to create arrays and datasets by filling values directly.

Create a YAXArray

We can create a new YAXArray by filling the values directly:

julia
using YAXArrays
+a1 = YAXArray(rand(10, 20, 5))
╭─────────────────────────────╮
+│ 10×20×5 YAXArray{Float64,3} │
+├─────────────────────────────┴────────────────────────────────── dims ┐
+  ↓ Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(20) ForwardOrdered Regular Points,
+  ↗ Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────── loaded in memory ┤
+  data size: 7.81 KB
+└──────────────────────────────────────────────────────────────────────┘

The dimensions have only generic names, e.g. Dim_1 and only integer values. We can also specify the dimensions with custom names enabling easier access:

julia
using Dates
+
+axlist = (
+    Dim{:time}(Date("2022-01-01"):Day(1):Date("2022-01-30")),
+    Dim{:lon}(range(1, 10, length=10)),
+    Dim{:lat}(range(1, 5, length=15)),
+)
+data2 = rand(30, 10, 15)
+properties = Dict(:origin => "user guide")
+a2 = YAXArray(axlist, data2, properties)
╭──────────────────────────────╮
+│ 30×10×15 YAXArray{Float64,3} │
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+  → lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, String} with 1 entry:
+  :origin => "user guide"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 35.16 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
a2.properties
Dict{Symbol, String} with 1 entry:
+  :origin => "user guide"
julia
a2.axes
(↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+→ lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points)

Create a Dataset

julia
data3 = rand(30, 10, 15)
+a3 = YAXArray(axlist, data3, properties)
+
+arrays = Dict(:a2 => a2, :a3 => a3)
+ds = Dataset(; properties, arrays...)
YAXArray Dataset
+Shared Axes: 
+  (↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+  → lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points)
+
+Variables: 
+a2, a3
+
+Properties: Dict(:origin => "user guide")
`,16)]))}const o=a(e,[["render",p]]);export{g as __pageData,o as default}; diff --git a/previews/PR477/assets/UserGuide_create.md.52g4xNHB.lean.js b/previews/PR477/assets/UserGuide_create.md.52g4xNHB.lean.js new file mode 100644 index 00000000..1df8527f --- /dev/null +++ b/previews/PR477/assets/UserGuide_create.md.52g4xNHB.lean.js @@ -0,0 +1,48 @@ +import{_ as a,c as i,a2 as n,o as t}from"./chunks/framework.CG45A19l.js";const g=JSON.parse('{"title":"Create YAXArrays and Datasets","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/create.md","filePath":"UserGuide/create.md","lastUpdated":null}'),e={name:"UserGuide/create.md"};function p(l,s,h,k,r,d){return t(),i("div",null,s[0]||(s[0]=[n(`

Create YAXArrays and Datasets

This section describes how to create arrays and datasets by filling values directly.

Create a YAXArray

We can create a new YAXArray by filling the values directly:

julia
using YAXArrays
+a1 = YAXArray(rand(10, 20, 5))
╭─────────────────────────────╮
+│ 10×20×5 YAXArray{Float64,3} │
+├─────────────────────────────┴────────────────────────────────── dims ┐
+  ↓ Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(20) ForwardOrdered Regular Points,
+  ↗ Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────── loaded in memory ┤
+  data size: 7.81 KB
+└──────────────────────────────────────────────────────────────────────┘

The dimensions have only generic names, e.g. Dim_1 and only integer values. We can also specify the dimensions with custom names enabling easier access:

julia
using Dates
+
+axlist = (
+    Dim{:time}(Date("2022-01-01"):Day(1):Date("2022-01-30")),
+    Dim{:lon}(range(1, 10, length=10)),
+    Dim{:lat}(range(1, 5, length=15)),
+)
+data2 = rand(30, 10, 15)
+properties = Dict(:origin => "user guide")
+a2 = YAXArray(axlist, data2, properties)
╭──────────────────────────────╮
+│ 30×10×15 YAXArray{Float64,3} │
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+  → lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, String} with 1 entry:
+  :origin => "user guide"
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 35.16 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
a2.properties
Dict{Symbol, String} with 1 entry:
+  :origin => "user guide"
julia
a2.axes
(↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+→ lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points)

Create a Dataset

julia
data3 = rand(30, 10, 15)
+a3 = YAXArray(axlist, data3, properties)
+
+arrays = Dict(:a2 => a2, :a3 => a3)
+ds = Dataset(; properties, arrays...)
YAXArray Dataset
+Shared Axes: 
+  (↓ time Sampled{Date} Date("2022-01-01"):Dates.Day(1):Date("2022-01-30") ForwardOrdered Regular Points,
+  → lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+  ↗ lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points)
+
+Variables: 
+a2, a3
+
+Properties: Dict(:origin => "user guide")
`,16)]))}const o=a(e,[["render",p]]);export{g as __pageData,o as default}; diff --git a/previews/PR477/assets/UserGuide_faq.md.CbwaBwTY.js b/previews/PR477/assets/UserGuide_faq.md.CbwaBwTY.js new file mode 100644 index 00000000..b75da006 --- /dev/null +++ b/previews/PR477/assets/UserGuide_faq.md.CbwaBwTY.js @@ -0,0 +1,379 @@ +import{_ as i,c as a,a2 as n,o as e}from"./chunks/framework.CG45A19l.js";const t="/YAXArrays.jl/previews/PR477/assets/pvbkmme.BNwnPvkJ.jpeg",o=JSON.parse('{"title":"Frequently Asked Questions (FAQ)","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/faq.md","filePath":"UserGuide/faq.md","lastUpdated":null}'),l={name:"UserGuide/faq.md"};function h(p,s,k,d,r,g){return e(),a("div",null,s[0]||(s[0]=[n(`

Frequently Asked Questions (FAQ)

The purpose of this section is to do a collection of small convinient pieces of code on how to do simple things.

Extract the axes names from a Cube

julia
using YAXArrays
+using DimensionalData
julia
julia> c = YAXArray(rand(10, 10, 5))
╭─────────────────────────────╮
+10×10×5 YAXArray{Float64,3}
+├─────────────────────────────┴────────────────────────────────────────── dims ┐
+Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 3.91 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
julia> caxes(c) # former way of doing it
(Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)

WARNING

To get the axes of a YAXArray use the dims function instead of the caxes function

julia
julia> dims(c)
(Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)

INFO

Also, use DD.rebuild(c, values) to copy axes from c and build a new cube but with different values.

rebuild

As an example let's consider the following

julia
using YAXArrays
+using DimensionalData
+
+c = YAXArray(ones(Int, 10,10))
╭─────────────────────────╮
+│ 10×10 YAXArray{Int64,2} │
+├─────────────────────────┴────────────────────────────────────── dims ┐
+  ↓ Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────── loaded in memory ┤
+  data size: 800.0 bytes
+└──────────────────────────────────────────────────────────────────────┘

then creating a new c with the same structure (axes) but different values is done by

julia
julia> new_c = rebuild(c, rand(10,10))
╭───────────────────────────╮
+10×10 YAXArray{Float64,2}
+├───────────────────────────┴──────────────────────────────────────────── dims ┐
+Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 800.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

note that the type is now Float64. Or, we could create a new structure but using the dimensions from yax explicitly

julia
julia> c_c = YAXArray(dims(c), rand(10,10))
╭───────────────────────────╮
+10×10 YAXArray{Float64,2}
+├───────────────────────────┴──────────────────────────────────────────── dims ┐
+Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 800.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

which achieves the same goal as rebuild.

Obtain values from axes and data from the cube

There are two options to collect values from axes. In this examples the axis ranges from 1 to 10.

These two examples bring the same result

julia
collect(getAxis("Dim_1", c).val)
+collect(c.axes[1].val)
10-element Vector{Int64}:
+  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10

to collect data from a cube works exactly the same as doing it from an array

julia
julia> c[:, :, 1]
╭─────────────────────────╮
+10×10 YAXArray{Int64,2}
+├─────────────────────────┴────────────────────────────────────────────── dims ┐
+Dim_1 Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} 1:10 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 800.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

How do I concatenate cubes

It is possible to concatenate several cubes that shared the same dimensions using the [concatenatecubes]@ref function.

Let's create two dummy cubes

julia
using YAXArrays
+axlist = (
+    Dim{:time}(range(1, 20, length=20)),
+    Dim{:lon}(range(1, 10, length=10)),
+    Dim{:lat}(range(1, 5, length=15))
+    )
+
+data1 = rand(20, 10, 15)
+ds1 = YAXArray(axlist, data1)
+
+data2 = rand(20, 10, 15)
+ds2 = YAXArray(axlist, data2)

Now we can concatenate ds1 and ds2:

julia
julia> dsfinal = concatenatecubes([ds1, ds2], Dim{:Variables}(["var1", "var2"]))
╭────────────────────────────────╮
+20×10×15×2 YAXArray{Float64,4}
+├────────────────────────────────┴─────────────────────────────────────── dims ┐
+time      Sampled{Float64} 1.0:1.0:20.0 ForwardOrdered Regular Points,
+lon       Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+lat       Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points,
+Variables Categorical{String} ["var1", "var2"] ForwardOrdered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 46.88 KB
+└──────────────────────────────────────────────────────────────────────────────┘

How do I subset a YAXArray ( Cube ) or Dataset?

These are the three main datatypes provided by the YAXArrays libray. You can find a description of them here. A Cube is no more than a YAXArray, so, we will not explicitly tell about a Cube.

Subsetting a YAXArray

Let's start by creating a dummy YAXArray.

Firstly, load the required libraries

julia
using YAXArrays
+using Dates # To generate the dates of the time axis
+using DimensionalData # To use the "Between" option for selecting data, however the intervals notation should be used instead, i.e. \`a .. b\`.

Define the time span of the YAXArray

julia
t = Date("2020-01-01"):Month(1):Date("2022-12-31")
Date("2020-01-01"):Dates.Month(1):Date("2022-12-01")

create YAXArray axes

julia
axes = (Dim{:Lon}(1:10), Dim{:Lat}(1:10), Dim{:Time}(t))
(↓ Lon  1:10,
+→ Lat  1:10,
+↗ Time Date("2020-01-01"):Dates.Month(1):Date("2022-12-01"))

create the YAXArray

julia
y = YAXArray(axes, reshape(1:3600, (10, 10, 36)))
╭────────────────────────────╮
+│ 10×10×36 YAXArray{Int64,3} │
+├────────────────────────────┴─────────────────────────────────────────── dims ┐
+  ↓ Lon  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  → Lat  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  ↗ Time Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 28.12 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Now we subset the YAXArray by any dimension.

Subset YAXArray by years

julia
ytime = y[Time=Between(Date(2021,1,1), Date(2021,12,31))]
╭────────────────────────────╮
+│ 10×10×12 YAXArray{Int64,3} │
+├────────────────────────────┴─────────────────────────────────────────── dims ┐
+  ↓ Lon  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  → Lat  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  ↗ Time Sampled{Date} Date("2021-01-01"):Dates.Month(1):Date("2021-12-01") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 9.38 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Subset YAXArray by a specific date

julia
ytime2 = y[Time=At(Date("2021-05-01"))]
╭─────────────────────────╮
+│ 10×10 YAXArray{Int64,2} │
+├─────────────────────────┴────────────────────────── dims ┐
+  ↓ Lon Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  → Lat Sampled{Int64} 1:10 ForwardOrdered Regular Points
+├──────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────── loaded in memory ┤
+  data size: 800.0 bytes
+└──────────────────────────────────────────────────────────┘

Subset YAXArray by a date range

julia
ytime3 = y[Time=Date("2021-05-01") .. Date("2021-12-01")]
╭───────────────────────────╮
+│ 10×10×8 YAXArray{Int64,3} │
+├───────────────────────────┴──────────────────────────────────────────── dims ┐
+  ↓ Lon  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  → Lat  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  ↗ Time Sampled{Date} Date("2021-05-01"):Dates.Month(1):Date("2021-12-01") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 6.25 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Subset YAXArray by longitude and latitude

julia
ylonlat = y[Lon=1 .. 5, Lat=5 .. 10]
╭──────────────────────────╮
+│ 5×6×36 YAXArray{Int64,3} │
+├──────────────────────────┴───────────────────────────────────────────── dims ┐
+  ↓ Lon  Sampled{Int64} 1:5 ForwardOrdered Regular Points,
+  → Lat  Sampled{Int64} 5:10 ForwardOrdered Regular Points,
+  ↗ Time Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 8.44 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Subsetting a Dataset

In a dataset, we can have several variables (YAXArrays) that share some or all of their dimensions.

Subsetting a Dataset whose variables share all their dimensions

This works for YAXArrays. Let's make an example.

julia
using YAXArrays
+using Dates # To generate the dates of the time axis
+using DimensionalData # To use the "Between" option for selecting data
+
+t = Date("2020-01-01"):Month(1):Date("2022-12-31")
+axes = (Dim{:Lon}(1:10), Dim{:Lat}(1:10), Dim{:Time}(t))
+
+var1 = YAXArray(axes, reshape(1:3600, (10, 10, 36)))
+var2 = YAXArray(axes, reshape((1:3600)*5, (10, 10, 36)))
+
+ds = Dataset(; var1=var1, var2=var2)
YAXArray Dataset
+Shared Axes: 
+  (↓ Lon  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  → Lat  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  ↗ Time Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points)
+
+Variables: 
+var1, var2
julia
ds_lonlat = ds[Lon=1 .. 5, Lat=5 .. 10]
YAXArray Dataset
+Shared Axes: 
+  (↓ Lon  Sampled{Int64} 1:5 ForwardOrdered Regular Points,
+  → Lat  Sampled{Int64} 5:10 ForwardOrdered Regular Points,
+  ↗ Time Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points)
+
+Variables: 
+var1, var2

Subsetting a Dataset whose variables share some but not all of their dimensions

In this case, if we subset by the common dimension/s, this works the same as for YAXArrays, Cubes, and datasets that share all their dimensions.

But we can also subset a variable by the values of another variable with which it shares some dimensions.

Warning

If your data is not loaded into memory, the selection will be too slow. So, you have load into memory, at least, the variable with which you make the selection.

Let's make an example.

julia
using YAXArrays
+using Dates # To generate the dates of the time axis
+using DimensionalData # To use the "Between" selector for selecting data
+
+t = Date("2020-01-01"):Month(1):Date("2022-12-31")
+common_axis = Dim{:points}(1:100)
+time_axis =   Dim{:Time}(t)
+
+# Note that longitudes and latitudes are not dimensions, but YAXArrays
+longitudes = YAXArray((common_axis,), rand(1:369, 100)) # 100 random values taken from 1 to 359
+latitudes  = YAXArray((common_axis,), rand(0:90, 100))  # 100 random values taken from 0 to 90
+temperature = YAXArray((common_axis, time_axis), rand(-40:40, (100, 36)))
+
+ds = Dataset(; longitudes=longitudes, latitudes=latitudes, temperature=temperature)
YAXArray Dataset
+Shared Axes: 
+  (↓ points Sampled{Int64} 1:100 ForwardOrdered Regular Points)
+
+Variables: 
+latitudes, longitudes
+
+Variables with additional axes:
+  Additional Axes: 
+  (↓ Time Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points)
+  Variables: 
+  temperature

Select all points between 20ºN and 85ºN, and 0ºE to 180ºE

julia
ds_subset = ds[points = Where(p-> ds["latitudes"][p]  >= 20 && ds["latitudes"][p]  <= 80 &&
+                             ds["longitudes"][p] >= 0  && ds["longitudes"][p] <= 180
+                             ) # Where
+              ] # ds
YAXArray Dataset
+Shared Axes: 
+None
+Variables with additional axes:
+  Additional Axes: 
+  (↓ points Sampled{Int64} [9, 13, …, 95, 100] ForwardOrdered Irregular Points)
+  Variables: 
+  longitudes
+
+  Additional Axes: 
+  (↓ points Sampled{Int64} [9, 13, …, 95, 100] ForwardOrdered Irregular Points)
+  Variables: 
+  latitudes
+
+  Additional Axes: 
+  (↓ points Sampled{Int64} [9, 13, …, 95, 100] ForwardOrdered Irregular Points,
+  → Time   Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points)
+  Variables: 
+  temperature

If your dataset has been read from a file with Cube it is not loaded into memory, and you have to load the latitudes and longitudes YAXArrays into memory:

julia
latitudes_yasxa  = readcubedata(ds["latitudes"])
+longitudes_yasxa = readcubedata(ds["longitudes"])
+ds_subset = ds[points = Where(p-> latitudes_yasxa[p]  >= 20 && latitudes_yasxa[p]  <= 80 &&
+                             longitudes_yasxa[p] >= 0  && longitudes_yasxa[p] <= 180
+                             ) # Where
+              ] # ds
YAXArray Dataset
+Shared Axes: 
+None
+Variables with additional axes:
+  Additional Axes: 
+  (↓ points Sampled{Int64} [9, 13, …, 95, 100] ForwardOrdered Irregular Points)
+  Variables: 
+  latitudes
+
+  Additional Axes: 
+  (↓ points Sampled{Int64} [9, 13, …, 95, 100] ForwardOrdered Irregular Points)
+  Variables: 
+  longitudes
+
+  Additional Axes: 
+  (↓ points Sampled{Int64} [9, 13, …, 95, 100] ForwardOrdered Irregular Points,
+  → Time   Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points)
+  Variables: 
+  temperature

How do I apply map algebra?

Our next step is map algebra computations. This can be done effectively using the 'map' function. For example:

Multiplying cubes with only spatio-temporal dimensions

julia
julia> map((x, y) -> x * y, ds1, ds2)
╭──────────────────────────────╮
+20×10×15 YAXArray{Float64,3}
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+time Sampled{Float64} 1.0:1.0:20.0 ForwardOrdered Regular Points,
+lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 23.44 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Cubes with more than 3 dimensions

julia
julia> map((x, y) -> x * y, dsfinal[Variables=At("var1")], dsfinal[Variables=At("var2")])
╭──────────────────────────────╮
+20×10×15 YAXArray{Float64,3}
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+time Sampled{Float64} 1.0:1.0:20.0 ForwardOrdered Regular Points,
+lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 23.44 KB
+└──────────────────────────────────────────────────────────────────────────────┘

To add some complexity, we will multiply each value for π and then divided for the sum of each time step. We will use the ds1 cube for this purpose.

julia
julia> mapslices(ds1, dims=("Lon", "Lat")) do xin
+           (xin * π) ./ maximum(skipmissing(xin))
+       end
╭──────────────────────────────────────────────╮
+10×15×20 YAXArray{Union{Missing, Float64},3}
+├──────────────────────────────────────────────┴───────────────────────── dims ┐
+lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points,
+time Sampled{Float64} 1.0:1.0:20.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 23.44 KB
+└──────────────────────────────────────────────────────────────────────────────┘

How do I use the CubeTable function?

The function "CubeTable" creates an iterable table and the result is a DataCube. It is therefore very handy for grouping data and computing statistics by class. It uses OnlineStats.jl to calculate statistics, and weighted statistics can be calculated as well.

Here we will use the ds1 Cube defined previously and we create a mask for data classification.

Cube containing a mask with classes 1, 2 and 3.

julia
julia> classes = YAXArray((getAxis("lon", dsfinal), getAxis("lat", dsfinal)), rand(1:3, 10, 15))
╭─────────────────────────╮
+10×15 YAXArray{Int64,2}
+├─────────────────────────┴────────────────────────────────────────────── dims ┐
+lon Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+lat Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 1.17 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
using GLMakie
+GLMakie.activate!()
+# This is how our classification map looks like
+fig, ax, obj = heatmap(classes;
+    colormap=Makie.Categorical(cgrad([:grey15, :orangered, :snow3])))
+cbar = Colorbar(fig[1,2], obj)
+fig

Now we define the input cubes that will be considered for the iterable table

julia
t = CubeTable(values=ds1, classes=classes)
Datacube iterator with 1 subtables with fields: (:values, :classes, :time, :lon, :lat)
julia
using DataFrames
+using OnlineStats
+## visualization of the CubeTable
+c_tbl = DataFrame(t[1])
+first(c_tbl, 5)

In this line we calculate the Mean for each class

julia
julia> fitcube = cubefittable(t, Mean, :values, by=(:classes))
╭───────────────────────────────────────────────╮
+3-element YAXArray{Union{Missing, Float64},1}
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+classes Sampled{Int64} [1, 2, 3] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 24.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

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.

julia
julia> fitcube = cubefittable(t, Mean, :values, by=(:classes, :time))
╭──────────────────────────────────────────╮
+3×20 YAXArray{Union{Missing, Float64},2}
+├──────────────────────────────────────────┴───────────────────────────── dims ┐
+classes Sampled{Int64} [1, 2, 3] ForwardOrdered Irregular Points,
+time    Sampled{Float64} 1.0:1.0:20.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 480.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

How do I assign variable names to YAXArrays in a Dataset

One variable name

julia
julia> ds = YAXArrays.Dataset(; (:a => YAXArray(rand(10)),)...)
YAXArray Dataset
+Shared Axes:
+  (Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points)
+
+Variables: 
+a

Multiple variable names

julia
keylist = (:a, :b, :c)
+varlist = (YAXArray(rand(10)), YAXArray(rand(10,5)), YAXArray(rand(2,5)))
julia
julia> ds = YAXArrays.Dataset(; (keylist .=> varlist)...)
YAXArray Dataset
+Shared Axes:
+None
+Variables with additional axes:
+  Additional Axes: 
+  (Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)
+  Variables: 
+  b
+
+  Additional Axes: 
+  (Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points)
+  Variables: 
+  a
+
+  Additional Axes: 
+  (Dim_1 Sampled{Int64} Base.OneTo(2) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)
+  Variables: 
+  c

WARNING

You will not be able to save this dataset, first you will need to rename those dimensions with the same name but different values.

Ho do I construct a Dataset from a TimeArray

In this section we will use MarketData.jl and TimeSeries.jl to simulate some stocks.

julia
using YAXArrays, DimensionalData
+using MarketData, TimeSeries
+
+stocks = Dict(:Stock1 => random_ohlcv(), :Stock2 => random_ohlcv(), :Stock3 => random_ohlcv())
+d_keys = keys(stocks)
KeySet for a Dict{Symbol, TimeSeries.TimeArray{Float64, 2, DateTime, Matrix{Float64}}} with 3 entries. Keys:
+  :Stock3
+  :Stock1
+  :Stock2

currently there is not direct support to obtain dims from a TimeArray, but we can code a function for it

julia
getTArrayAxes(ta::TimeArray) = (Dim{:time}(timestamp(ta)), Dim{:variable}(colnames(ta)), );

then, we create the YAXArrays as

julia
yax_list = [YAXArray(getTArrayAxes(stocks[k]), values(stocks[k])) for k in d_keys];

and a Dataset with all stocks names

julia
julia> ds = Dataset(; (d_keys .=> yax_list)...)
YAXArray Dataset
+Shared Axes:
+None
+Variables with additional axes:
+  Additional Axes: 
+  (time     Sampled{DateTime} [2020-01-01T00:00:00, …, 2020-01-21T19:00:00] ForwardOrdered Irregular Points,
+variable Categorical{Symbol} [:Open, :High, :Low, :Close, :Volume] Unordered)
+  Variables: 
+  Stock2
+
+  Additional Axes: 
+  (time     Sampled{DateTime} [2020-01-01T00:00:00, …, 2020-01-21T19:00:00] ForwardOrdered Irregular Points,
+variable Categorical{Symbol} [:Open, :High, :Low, :Close, :Volume] Unordered)
+  Variables: 
+  Stock1
+
+  Additional Axes: 
+  (time     Sampled{DateTime} [2020-01-01T00:00:00, …, 2020-01-21T19:00:00] ForwardOrdered Irregular Points,
+variable Categorical{Symbol} [:Open, :High, :Low, :Close, :Volume] Unordered)
+  Variables: 
+  Stock3

and, it looks like there some small differences in the axes, they are being printed independently although they should be the same. Well, they are at least at the == level but not at ===. We could use the axes from one YAXArray as reference and rebuild all the others

julia
yax_list = [rebuild(yax_list[1], values(stocks[k])) for k in d_keys];

and voilà

julia
julia> ds = Dataset(; (d_keys .=> yax_list)...)
YAXArray Dataset
+Shared Axes:
+  (time     Sampled{DateTime} [2020-01-01T00:00:00, …, 2020-01-21T19:00:00] ForwardOrdered Irregular Points,
+variable Categorical{Symbol} [:Open, :High, :Low, :Close, :Volume] Unordered)
+
+Variables: 
+Stock1, Stock2, Stock3

now they are printed together, showing that is exactly the same axis structure for all variables.

Create a YAXArray with unions containing Strings

julia
test_x = stack(Vector{Union{Int,String}}[[1, "Test"], [2, "Test2"]])
+yax_string = YAXArray(test_x)
╭──────────────────────────────────────╮
+│ 2×2 YAXArray{Union{Int64, String},2} │
+├──────────────────────────────────────┴──────────────────────── dims ┐
+  ↓ Dim_1 Sampled{Int64} Base.OneTo(2) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(2) ForwardOrdered Regular Points
+├─────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├─────────────────────────────────────────────────── loaded in memory ┤
+  summarysize: 121.0 bytes
+└─────────────────────────────────────────────────────────────────────┘

or simply with an Any type

julia
test_bool = ["Test1" 1 false; 2 "Test2" true; 1 2f0 1f2]
+yax_bool = YAXArray(test_bool)
╭─────────────────────╮
+│ 3×3 YAXArray{Any,2} │
+├─────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ Dim_1 Sampled{Int64} Base.OneTo(3) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(3) ForwardOrdered Regular Points
+├─────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├─────────────────────────────────────────────────── loaded in memory ┤
+  summarysize: 172.0 bytes
+└─────────────────────────────────────────────────────────────────────┘

WARNING

Note that although their creation is allowed, it is not possible to save these types into Zarr or NetCDF.

`,149)]))}const E=i(l,[["render",h]]);export{o as __pageData,E as default}; diff --git a/previews/PR477/assets/UserGuide_faq.md.CbwaBwTY.lean.js b/previews/PR477/assets/UserGuide_faq.md.CbwaBwTY.lean.js new file mode 100644 index 00000000..b75da006 --- /dev/null +++ b/previews/PR477/assets/UserGuide_faq.md.CbwaBwTY.lean.js @@ -0,0 +1,379 @@ +import{_ as i,c as a,a2 as n,o as e}from"./chunks/framework.CG45A19l.js";const t="/YAXArrays.jl/previews/PR477/assets/pvbkmme.BNwnPvkJ.jpeg",o=JSON.parse('{"title":"Frequently Asked Questions (FAQ)","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/faq.md","filePath":"UserGuide/faq.md","lastUpdated":null}'),l={name:"UserGuide/faq.md"};function h(p,s,k,d,r,g){return e(),a("div",null,s[0]||(s[0]=[n(`

Frequently Asked Questions (FAQ)

The purpose of this section is to do a collection of small convinient pieces of code on how to do simple things.

Extract the axes names from a Cube

julia
using YAXArrays
+using DimensionalData
julia
julia> c = YAXArray(rand(10, 10, 5))
╭─────────────────────────────╮
+10×10×5 YAXArray{Float64,3}
+├─────────────────────────────┴────────────────────────────────────────── dims ┐
+Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 3.91 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
julia> caxes(c) # former way of doing it
(Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)

WARNING

To get the axes of a YAXArray use the dims function instead of the caxes function

julia
julia> dims(c)
(Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)

INFO

Also, use DD.rebuild(c, values) to copy axes from c and build a new cube but with different values.

rebuild

As an example let's consider the following

julia
using YAXArrays
+using DimensionalData
+
+c = YAXArray(ones(Int, 10,10))
╭─────────────────────────╮
+│ 10×10 YAXArray{Int64,2} │
+├─────────────────────────┴────────────────────────────────────── dims ┐
+  ↓ Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────── loaded in memory ┤
+  data size: 800.0 bytes
+└──────────────────────────────────────────────────────────────────────┘

then creating a new c with the same structure (axes) but different values is done by

julia
julia> new_c = rebuild(c, rand(10,10))
╭───────────────────────────╮
+10×10 YAXArray{Float64,2}
+├───────────────────────────┴──────────────────────────────────────────── dims ┐
+Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 800.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

note that the type is now Float64. Or, we could create a new structure but using the dimensions from yax explicitly

julia
julia> c_c = YAXArray(dims(c), rand(10,10))
╭───────────────────────────╮
+10×10 YAXArray{Float64,2}
+├───────────────────────────┴──────────────────────────────────────────── dims ┐
+Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 800.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

which achieves the same goal as rebuild.

Obtain values from axes and data from the cube

There are two options to collect values from axes. In this examples the axis ranges from 1 to 10.

These two examples bring the same result

julia
collect(getAxis("Dim_1", c).val)
+collect(c.axes[1].val)
10-element Vector{Int64}:
+  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10

to collect data from a cube works exactly the same as doing it from an array

julia
julia> c[:, :, 1]
╭─────────────────────────╮
+10×10 YAXArray{Int64,2}
+├─────────────────────────┴────────────────────────────────────────────── dims ┐
+Dim_1 Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} 1:10 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 800.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

How do I concatenate cubes

It is possible to concatenate several cubes that shared the same dimensions using the [concatenatecubes]@ref function.

Let's create two dummy cubes

julia
using YAXArrays
+axlist = (
+    Dim{:time}(range(1, 20, length=20)),
+    Dim{:lon}(range(1, 10, length=10)),
+    Dim{:lat}(range(1, 5, length=15))
+    )
+
+data1 = rand(20, 10, 15)
+ds1 = YAXArray(axlist, data1)
+
+data2 = rand(20, 10, 15)
+ds2 = YAXArray(axlist, data2)

Now we can concatenate ds1 and ds2:

julia
julia> dsfinal = concatenatecubes([ds1, ds2], Dim{:Variables}(["var1", "var2"]))
╭────────────────────────────────╮
+20×10×15×2 YAXArray{Float64,4}
+├────────────────────────────────┴─────────────────────────────────────── dims ┐
+time      Sampled{Float64} 1.0:1.0:20.0 ForwardOrdered Regular Points,
+lon       Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+lat       Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points,
+Variables Categorical{String} ["var1", "var2"] ForwardOrdered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 46.88 KB
+└──────────────────────────────────────────────────────────────────────────────┘

How do I subset a YAXArray ( Cube ) or Dataset?

These are the three main datatypes provided by the YAXArrays libray. You can find a description of them here. A Cube is no more than a YAXArray, so, we will not explicitly tell about a Cube.

Subsetting a YAXArray

Let's start by creating a dummy YAXArray.

Firstly, load the required libraries

julia
using YAXArrays
+using Dates # To generate the dates of the time axis
+using DimensionalData # To use the "Between" option for selecting data, however the intervals notation should be used instead, i.e. \`a .. b\`.

Define the time span of the YAXArray

julia
t = Date("2020-01-01"):Month(1):Date("2022-12-31")
Date("2020-01-01"):Dates.Month(1):Date("2022-12-01")

create YAXArray axes

julia
axes = (Dim{:Lon}(1:10), Dim{:Lat}(1:10), Dim{:Time}(t))
(↓ Lon  1:10,
+→ Lat  1:10,
+↗ Time Date("2020-01-01"):Dates.Month(1):Date("2022-12-01"))

create the YAXArray

julia
y = YAXArray(axes, reshape(1:3600, (10, 10, 36)))
╭────────────────────────────╮
+│ 10×10×36 YAXArray{Int64,3} │
+├────────────────────────────┴─────────────────────────────────────────── dims ┐
+  ↓ Lon  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  → Lat  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  ↗ Time Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 28.12 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Now we subset the YAXArray by any dimension.

Subset YAXArray by years

julia
ytime = y[Time=Between(Date(2021,1,1), Date(2021,12,31))]
╭────────────────────────────╮
+│ 10×10×12 YAXArray{Int64,3} │
+├────────────────────────────┴─────────────────────────────────────────── dims ┐
+  ↓ Lon  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  → Lat  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  ↗ Time Sampled{Date} Date("2021-01-01"):Dates.Month(1):Date("2021-12-01") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 9.38 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Subset YAXArray by a specific date

julia
ytime2 = y[Time=At(Date("2021-05-01"))]
╭─────────────────────────╮
+│ 10×10 YAXArray{Int64,2} │
+├─────────────────────────┴────────────────────────── dims ┐
+  ↓ Lon Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  → Lat Sampled{Int64} 1:10 ForwardOrdered Regular Points
+├──────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────── loaded in memory ┤
+  data size: 800.0 bytes
+└──────────────────────────────────────────────────────────┘

Subset YAXArray by a date range

julia
ytime3 = y[Time=Date("2021-05-01") .. Date("2021-12-01")]
╭───────────────────────────╮
+│ 10×10×8 YAXArray{Int64,3} │
+├───────────────────────────┴──────────────────────────────────────────── dims ┐
+  ↓ Lon  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  → Lat  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  ↗ Time Sampled{Date} Date("2021-05-01"):Dates.Month(1):Date("2021-12-01") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 6.25 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Subset YAXArray by longitude and latitude

julia
ylonlat = y[Lon=1 .. 5, Lat=5 .. 10]
╭──────────────────────────╮
+│ 5×6×36 YAXArray{Int64,3} │
+├──────────────────────────┴───────────────────────────────────────────── dims ┐
+  ↓ Lon  Sampled{Int64} 1:5 ForwardOrdered Regular Points,
+  → Lat  Sampled{Int64} 5:10 ForwardOrdered Regular Points,
+  ↗ Time Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 8.44 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Subsetting a Dataset

In a dataset, we can have several variables (YAXArrays) that share some or all of their dimensions.

Subsetting a Dataset whose variables share all their dimensions

This works for YAXArrays. Let's make an example.

julia
using YAXArrays
+using Dates # To generate the dates of the time axis
+using DimensionalData # To use the "Between" option for selecting data
+
+t = Date("2020-01-01"):Month(1):Date("2022-12-31")
+axes = (Dim{:Lon}(1:10), Dim{:Lat}(1:10), Dim{:Time}(t))
+
+var1 = YAXArray(axes, reshape(1:3600, (10, 10, 36)))
+var2 = YAXArray(axes, reshape((1:3600)*5, (10, 10, 36)))
+
+ds = Dataset(; var1=var1, var2=var2)
YAXArray Dataset
+Shared Axes: 
+  (↓ Lon  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  → Lat  Sampled{Int64} 1:10 ForwardOrdered Regular Points,
+  ↗ Time Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points)
+
+Variables: 
+var1, var2
julia
ds_lonlat = ds[Lon=1 .. 5, Lat=5 .. 10]
YAXArray Dataset
+Shared Axes: 
+  (↓ Lon  Sampled{Int64} 1:5 ForwardOrdered Regular Points,
+  → Lat  Sampled{Int64} 5:10 ForwardOrdered Regular Points,
+  ↗ Time Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points)
+
+Variables: 
+var1, var2

Subsetting a Dataset whose variables share some but not all of their dimensions

In this case, if we subset by the common dimension/s, this works the same as for YAXArrays, Cubes, and datasets that share all their dimensions.

But we can also subset a variable by the values of another variable with which it shares some dimensions.

Warning

If your data is not loaded into memory, the selection will be too slow. So, you have load into memory, at least, the variable with which you make the selection.

Let's make an example.

julia
using YAXArrays
+using Dates # To generate the dates of the time axis
+using DimensionalData # To use the "Between" selector for selecting data
+
+t = Date("2020-01-01"):Month(1):Date("2022-12-31")
+common_axis = Dim{:points}(1:100)
+time_axis =   Dim{:Time}(t)
+
+# Note that longitudes and latitudes are not dimensions, but YAXArrays
+longitudes = YAXArray((common_axis,), rand(1:369, 100)) # 100 random values taken from 1 to 359
+latitudes  = YAXArray((common_axis,), rand(0:90, 100))  # 100 random values taken from 0 to 90
+temperature = YAXArray((common_axis, time_axis), rand(-40:40, (100, 36)))
+
+ds = Dataset(; longitudes=longitudes, latitudes=latitudes, temperature=temperature)
YAXArray Dataset
+Shared Axes: 
+  (↓ points Sampled{Int64} 1:100 ForwardOrdered Regular Points)
+
+Variables: 
+latitudes, longitudes
+
+Variables with additional axes:
+  Additional Axes: 
+  (↓ Time Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points)
+  Variables: 
+  temperature

Select all points between 20ºN and 85ºN, and 0ºE to 180ºE

julia
ds_subset = ds[points = Where(p-> ds["latitudes"][p]  >= 20 && ds["latitudes"][p]  <= 80 &&
+                             ds["longitudes"][p] >= 0  && ds["longitudes"][p] <= 180
+                             ) # Where
+              ] # ds
YAXArray Dataset
+Shared Axes: 
+None
+Variables with additional axes:
+  Additional Axes: 
+  (↓ points Sampled{Int64} [9, 13, …, 95, 100] ForwardOrdered Irregular Points)
+  Variables: 
+  longitudes
+
+  Additional Axes: 
+  (↓ points Sampled{Int64} [9, 13, …, 95, 100] ForwardOrdered Irregular Points)
+  Variables: 
+  latitudes
+
+  Additional Axes: 
+  (↓ points Sampled{Int64} [9, 13, …, 95, 100] ForwardOrdered Irregular Points,
+  → Time   Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points)
+  Variables: 
+  temperature

If your dataset has been read from a file with Cube it is not loaded into memory, and you have to load the latitudes and longitudes YAXArrays into memory:

julia
latitudes_yasxa  = readcubedata(ds["latitudes"])
+longitudes_yasxa = readcubedata(ds["longitudes"])
+ds_subset = ds[points = Where(p-> latitudes_yasxa[p]  >= 20 && latitudes_yasxa[p]  <= 80 &&
+                             longitudes_yasxa[p] >= 0  && longitudes_yasxa[p] <= 180
+                             ) # Where
+              ] # ds
YAXArray Dataset
+Shared Axes: 
+None
+Variables with additional axes:
+  Additional Axes: 
+  (↓ points Sampled{Int64} [9, 13, …, 95, 100] ForwardOrdered Irregular Points)
+  Variables: 
+  latitudes
+
+  Additional Axes: 
+  (↓ points Sampled{Int64} [9, 13, …, 95, 100] ForwardOrdered Irregular Points)
+  Variables: 
+  longitudes
+
+  Additional Axes: 
+  (↓ points Sampled{Int64} [9, 13, …, 95, 100] ForwardOrdered Irregular Points,
+  → Time   Sampled{Date} Date("2020-01-01"):Dates.Month(1):Date("2022-12-01") ForwardOrdered Regular Points)
+  Variables: 
+  temperature

How do I apply map algebra?

Our next step is map algebra computations. This can be done effectively using the 'map' function. For example:

Multiplying cubes with only spatio-temporal dimensions

julia
julia> map((x, y) -> x * y, ds1, ds2)
╭──────────────────────────────╮
+20×10×15 YAXArray{Float64,3}
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+time Sampled{Float64} 1.0:1.0:20.0 ForwardOrdered Regular Points,
+lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 23.44 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Cubes with more than 3 dimensions

julia
julia> map((x, y) -> x * y, dsfinal[Variables=At("var1")], dsfinal[Variables=At("var2")])
╭──────────────────────────────╮
+20×10×15 YAXArray{Float64,3}
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+time Sampled{Float64} 1.0:1.0:20.0 ForwardOrdered Regular Points,
+lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 23.44 KB
+└──────────────────────────────────────────────────────────────────────────────┘

To add some complexity, we will multiply each value for π and then divided for the sum of each time step. We will use the ds1 cube for this purpose.

julia
julia> mapslices(ds1, dims=("Lon", "Lat")) do xin
+           (xin * π) ./ maximum(skipmissing(xin))
+       end
╭──────────────────────────────────────────────╮
+10×15×20 YAXArray{Union{Missing, Float64},3}
+├──────────────────────────────────────────────┴───────────────────────── dims ┐
+lon  Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+lat  Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points,
+time Sampled{Float64} 1.0:1.0:20.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 23.44 KB
+└──────────────────────────────────────────────────────────────────────────────┘

How do I use the CubeTable function?

The function "CubeTable" creates an iterable table and the result is a DataCube. It is therefore very handy for grouping data and computing statistics by class. It uses OnlineStats.jl to calculate statistics, and weighted statistics can be calculated as well.

Here we will use the ds1 Cube defined previously and we create a mask for data classification.

Cube containing a mask with classes 1, 2 and 3.

julia
julia> classes = YAXArray((getAxis("lon", dsfinal), getAxis("lat", dsfinal)), rand(1:3, 10, 15))
╭─────────────────────────╮
+10×15 YAXArray{Int64,2}
+├─────────────────────────┴────────────────────────────────────────────── dims ┐
+lon Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
+lat Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 1.17 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
using GLMakie
+GLMakie.activate!()
+# This is how our classification map looks like
+fig, ax, obj = heatmap(classes;
+    colormap=Makie.Categorical(cgrad([:grey15, :orangered, :snow3])))
+cbar = Colorbar(fig[1,2], obj)
+fig

Now we define the input cubes that will be considered for the iterable table

julia
t = CubeTable(values=ds1, classes=classes)
Datacube iterator with 1 subtables with fields: (:values, :classes, :time, :lon, :lat)
julia
using DataFrames
+using OnlineStats
+## visualization of the CubeTable
+c_tbl = DataFrame(t[1])
+first(c_tbl, 5)

In this line we calculate the Mean for each class

julia
julia> fitcube = cubefittable(t, Mean, :values, by=(:classes))
╭───────────────────────────────────────────────╮
+3-element YAXArray{Union{Missing, Float64},1}
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+classes Sampled{Int64} [1, 2, 3] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 24.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

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.

julia
julia> fitcube = cubefittable(t, Mean, :values, by=(:classes, :time))
╭──────────────────────────────────────────╮
+3×20 YAXArray{Union{Missing, Float64},2}
+├──────────────────────────────────────────┴───────────────────────────── dims ┐
+classes Sampled{Int64} [1, 2, 3] ForwardOrdered Irregular Points,
+time    Sampled{Float64} 1.0:1.0:20.0 ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 480.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

How do I assign variable names to YAXArrays in a Dataset

One variable name

julia
julia> ds = YAXArrays.Dataset(; (:a => YAXArray(rand(10)),)...)
YAXArray Dataset
+Shared Axes:
+  (Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points)
+
+Variables: 
+a

Multiple variable names

julia
keylist = (:a, :b, :c)
+varlist = (YAXArray(rand(10)), YAXArray(rand(10,5)), YAXArray(rand(2,5)))
julia
julia> ds = YAXArrays.Dataset(; (keylist .=> varlist)...)
YAXArray Dataset
+Shared Axes:
+None
+Variables with additional axes:
+  Additional Axes: 
+  (Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)
+  Variables: 
+  b
+
+  Additional Axes: 
+  (Dim_1 Sampled{Int64} Base.OneTo(10) ForwardOrdered Regular Points)
+  Variables: 
+  a
+
+  Additional Axes: 
+  (Dim_1 Sampled{Int64} Base.OneTo(2) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)
+  Variables: 
+  c

WARNING

You will not be able to save this dataset, first you will need to rename those dimensions with the same name but different values.

Ho do I construct a Dataset from a TimeArray

In this section we will use MarketData.jl and TimeSeries.jl to simulate some stocks.

julia
using YAXArrays, DimensionalData
+using MarketData, TimeSeries
+
+stocks = Dict(:Stock1 => random_ohlcv(), :Stock2 => random_ohlcv(), :Stock3 => random_ohlcv())
+d_keys = keys(stocks)
KeySet for a Dict{Symbol, TimeSeries.TimeArray{Float64, 2, DateTime, Matrix{Float64}}} with 3 entries. Keys:
+  :Stock3
+  :Stock1
+  :Stock2

currently there is not direct support to obtain dims from a TimeArray, but we can code a function for it

julia
getTArrayAxes(ta::TimeArray) = (Dim{:time}(timestamp(ta)), Dim{:variable}(colnames(ta)), );

then, we create the YAXArrays as

julia
yax_list = [YAXArray(getTArrayAxes(stocks[k]), values(stocks[k])) for k in d_keys];

and a Dataset with all stocks names

julia
julia> ds = Dataset(; (d_keys .=> yax_list)...)
YAXArray Dataset
+Shared Axes:
+None
+Variables with additional axes:
+  Additional Axes: 
+  (time     Sampled{DateTime} [2020-01-01T00:00:00, …, 2020-01-21T19:00:00] ForwardOrdered Irregular Points,
+variable Categorical{Symbol} [:Open, :High, :Low, :Close, :Volume] Unordered)
+  Variables: 
+  Stock2
+
+  Additional Axes: 
+  (time     Sampled{DateTime} [2020-01-01T00:00:00, …, 2020-01-21T19:00:00] ForwardOrdered Irregular Points,
+variable Categorical{Symbol} [:Open, :High, :Low, :Close, :Volume] Unordered)
+  Variables: 
+  Stock1
+
+  Additional Axes: 
+  (time     Sampled{DateTime} [2020-01-01T00:00:00, …, 2020-01-21T19:00:00] ForwardOrdered Irregular Points,
+variable Categorical{Symbol} [:Open, :High, :Low, :Close, :Volume] Unordered)
+  Variables: 
+  Stock3

and, it looks like there some small differences in the axes, they are being printed independently although they should be the same. Well, they are at least at the == level but not at ===. We could use the axes from one YAXArray as reference and rebuild all the others

julia
yax_list = [rebuild(yax_list[1], values(stocks[k])) for k in d_keys];

and voilà

julia
julia> ds = Dataset(; (d_keys .=> yax_list)...)
YAXArray Dataset
+Shared Axes:
+  (time     Sampled{DateTime} [2020-01-01T00:00:00, …, 2020-01-21T19:00:00] ForwardOrdered Irregular Points,
+variable Categorical{Symbol} [:Open, :High, :Low, :Close, :Volume] Unordered)
+
+Variables: 
+Stock1, Stock2, Stock3

now they are printed together, showing that is exactly the same axis structure for all variables.

Create a YAXArray with unions containing Strings

julia
test_x = stack(Vector{Union{Int,String}}[[1, "Test"], [2, "Test2"]])
+yax_string = YAXArray(test_x)
╭──────────────────────────────────────╮
+│ 2×2 YAXArray{Union{Int64, String},2} │
+├──────────────────────────────────────┴──────────────────────── dims ┐
+  ↓ Dim_1 Sampled{Int64} Base.OneTo(2) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(2) ForwardOrdered Regular Points
+├─────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├─────────────────────────────────────────────────── loaded in memory ┤
+  summarysize: 121.0 bytes
+└─────────────────────────────────────────────────────────────────────┘

or simply with an Any type

julia
test_bool = ["Test1" 1 false; 2 "Test2" true; 1 2f0 1f2]
+yax_bool = YAXArray(test_bool)
╭─────────────────────╮
+│ 3×3 YAXArray{Any,2} │
+├─────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ Dim_1 Sampled{Int64} Base.OneTo(3) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(3) ForwardOrdered Regular Points
+├─────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├─────────────────────────────────────────────────── loaded in memory ┤
+  summarysize: 172.0 bytes
+└─────────────────────────────────────────────────────────────────────┘

WARNING

Note that although their creation is allowed, it is not possible to save these types into Zarr or NetCDF.

`,149)]))}const E=i(l,[["render",h]]);export{o as __pageData,E as default}; diff --git a/previews/PR477/assets/UserGuide_group.md.D6FXIAci.js b/previews/PR477/assets/UserGuide_group.md.D6FXIAci.js new file mode 100644 index 00000000..abd2b9df --- /dev/null +++ b/previews/PR477/assets/UserGuide_group.md.D6FXIAci.js @@ -0,0 +1,190 @@ +import{_ as i,c as a,a2 as n,o as e}from"./chunks/framework.CG45A19l.js";const h="/YAXArrays.jl/previews/PR477/assets/dadyujg.CBBZcGwj.png",y=JSON.parse('{"title":"Group YAXArrays and Datasets","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/group.md","filePath":"UserGuide/group.md","lastUpdated":null}'),t={name:"UserGuide/group.md"};function l(p,s,k,d,r,g){return e(),a("div",null,s[0]||(s[0]=[n(`

Group YAXArrays and Datasets

The following examples will use the groupby function to calculate temporal and spatial averages.

julia
using YAXArrays, DimensionalData
+using NetCDF
+using Downloads
+using Dates
+using Statistics
[ Info: new driver key :netcdf, updating backendlist.

Seasonal Averages from Time Series of Monthly Means

The following reproduces the example in xarray by Joe Hamman.

Where the goal is to calculate the seasonal average. And in order to do this properly, is necessary to calculate the weighted average considering that each month has a different number of days.

Download the data

julia
url_path = "https://github.com/pydata/xarray-data/raw/master/rasm.nc"
+filename = Downloads.download(url_path, "rasm.nc")
+ds_o = Cube(filename)

WARNING

The following rebuild should not be necessary in the future, plus is unpractical to use for large data sets. Out of memory groupby currently is work in progress. Related to https://github.com/rafaqz/DimensionalData.jl/issues/642

julia
axs = dims(ds_o) # get the dimensions
+data = ds_o.data[:,:,:] # read the data
+_FillValue = ds_o.properties["_FillValue"]
+data = replace(data, _FillValue => NaN)
+# create new YAXArray
+ds = YAXArray(axs, data)

GroupBy: seasons

function weighted_seasons(ds) ... end
julia
function weighted_seasons(ds)
+    # calculate weights 
+    tempo = dims(ds, :Ti)
+    month_length = YAXArray((tempo,), daysinmonth.(tempo))
+    g_tempo = groupby(month_length, Ti => seasons(; start=December))
+    sum_days = sum.(g_tempo, dims=:Ti)
+    weights = map(./, g_tempo, sum_days)
+    # unweighted seasons
+    g_ds = groupby(ds, Ti => seasons(; start=December))
+    mean_g = mean.(g_ds, dims=:Ti)
+    mean_g = dropdims.(mean_g, dims=:Ti)
+    # weighted seasons
+    g_dsW = broadcast_dims.(*, weights, g_ds)
+    weighted_g = sum.(g_dsW, dims = :Ti);
+    weighted_g = dropdims.(weighted_g, dims=:Ti)
+    # differences
+    diff_g = map(.-, weighted_g, mean_g)
+    seasons_g = lookup(mean_g, :Ti)
+    return mean_g, weighted_g, diff_g, seasons_g
+end

Now, we continue with the groupby operations as usual

julia
julia> g_ds = groupby(ds, Ti => seasons(; start=December))
╭──────────────────────────────────────────────────╮
+4-element DimGroupByArray{YAXArray{Float64,2},1}
+├──────────────────────────────────────────────────┴───────────────────── dims ┐
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+├────────────────────────────────────────────────────────────────── group dims ┤
+x, y, Ti
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  275×205×9 YAXArray
+ :Mar_Apr_May  275×205×9 YAXArray
+ :Jun_Jul_Aug  275×205×9 YAXArray
+ :Sep_Oct_Nov  275×205×9 YAXArray

And the mean per season is calculated as follows

julia
julia> mean_g = mean.(g_ds, dims=:Ti)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Float64, 3, Array{Float64, 3}, Tuple{Dim{:x, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, Dim{:y, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, DimensionalData.Dimensions.Ti{DimensionalData.Dimensions.Lookups.Sampled{CFTime.DateTimeNoLeap, Vector{CFTime.DateTimeNoLeap}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Irregular{Tuple{Nothing, Nothing}}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, Dict{String, Any}},1}
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  …  [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 11.1372 11.3835; NaN NaN … 11.3252 11.5843;;;]
+ :Mar_Apr_May     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 21.1363 21.018; NaN NaN … 21.4325 21.1762;;;]
+ :Jun_Jul_Aug     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 28.2818 27.9432; NaN NaN … 28.619 28.0537;;;]
+ :Sep_Oct_Nov     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 21.7119 21.7158; NaN NaN … 21.9682 21.9404;;;]

dropdims

Note that now the time dimension has length one, we can use dropdims to remove it

julia
julia> mean_g = dropdims.(mean_g, dims=:Ti)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Float64, 2, Matrix{Float64}, Tuple{Dim{:x, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, Dim{:y, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, Dict{String, Any}},1}
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  …  [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 11.1372 11.3835; NaN NaN … 11.3252 11.5843]
+ :Mar_Apr_May     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 21.1363 21.018; NaN NaN … 21.4325 21.1762]
+ :Jun_Jul_Aug     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 28.2818 27.9432; NaN NaN … 28.619 28.0537]
+ :Sep_Oct_Nov     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 21.7119 21.7158; NaN NaN … 21.9682 21.9404]

seasons

Due to the groupby function we will obtain new grouping names, in this case in the time dimension:

julia
seasons_g = lookup(mean_g, :Ti)
Categorical{Symbol} Unordered
+wrapping: 4-element Vector{Symbol}:
+ :Dec_Jan_Feb
+ :Mar_Apr_May
+ :Jun_Jul_Aug
+ :Sep_Oct_Nov

Next, we will weight this grouping by days/month in each group.

GroupBy: weight

Create a YAXArray for the month length

julia
tempo = dims(ds, :Ti)
+month_length = YAXArray((tempo,), daysinmonth.(tempo))
╭──────────────────────────────╮
+│ 36-element YAXArray{Int64,1} │
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ Ti Sampled{CFTime.DateTimeNoLeap} [CFTime.DateTimeNoLeap(1980-09-16T12:00:00), …, CFTime.DateTimeNoLeap(1983-08-17T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 288.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

Now group it by season

julia
julia> g_tempo = groupby(month_length, Ti => seasons(; start=December))
╭────────────────────────────────────────────────╮
+4-element DimGroupByArray{YAXArray{Int64,0},1}
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+├────────────────────────────────────────────────────────────────── group dims ┤
+Ti
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  9-element YAXArray
+ :Mar_Apr_May  9-element YAXArray
+ :Jun_Jul_Aug  9-element YAXArray
+ :Sep_Oct_Nov  9-element YAXArray

Get the number of days per season

julia
julia> sum_days = sum.(g_tempo, dims=:Ti)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Int64, 1, Vector{Int64}, Tuple{DimensionalData.Dimensions.Ti{DimensionalData.Dimensions.Lookups.Sampled{CFTime.DateTimeNoLeap, Vector{CFTime.DateTimeNoLeap}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Irregular{Tuple{Nothing, Nothing}}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, Dict{String, Any}},1}
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  [270]
+ :Mar_Apr_May  [276]
+ :Jun_Jul_Aug  [276]
+ :Sep_Oct_Nov  [273]

weights

Weight the seasonal groups by sum_days

julia
julia> weights = map(./, g_tempo, sum_days)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Float64, 1, Vector{Float64}, Tuple{DimensionalData.Dimensions.Ti{DimensionalData.Dimensions.Lookups.Sampled{CFTime.DateTimeNoLeap, Vector{CFTime.DateTimeNoLeap}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Irregular{Tuple{Nothing, Nothing}}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, Dict{String, Any}},1} groupby
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  …  [0.114815, 0.114815, 0.103704, 0.114815, 0.114815, 0.103704, 0.114815, 0.114815, 0.103704]
+ :Mar_Apr_May     [0.112319, 0.108696, 0.112319, 0.112319, 0.108696, 0.112319, 0.112319, 0.108696, 0.112319]
+ :Jun_Jul_Aug     [0.108696, 0.112319, 0.112319, 0.108696, 0.112319, 0.112319, 0.108696, 0.112319, 0.112319]
+ :Sep_Oct_Nov     [0.10989, 0.113553, 0.10989, 0.10989, 0.113553, 0.10989, 0.10989, 0.113553, 0.10989]

Verify that the sum per season is 1

julia
julia> sum.(weights)
╭───────────────────────────────╮
+4-element DimArray{Float64,1}
+├───────────────────────────────┴──────────────────────────────────────── dims ┐
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  1.0
+ :Mar_Apr_May  1.0
+ :Jun_Jul_Aug  1.0
+ :Sep_Oct_Nov  1.0

weighted seasons

Now, let's weight the seasons

julia
julia> g_dsW = broadcast_dims.(*, weights, g_ds)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Float64, 3, Array{Float64, 3}, Tuple{DimensionalData.Dimensions.Ti{DimensionalData.Dimensions.Lookups.Sampled{CFTime.DateTimeNoLeap, Vector{CFTime.DateTimeNoLeap}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Irregular{Tuple{Nothing, Nothing}}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, Dim{:x, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, Dim{:y, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, DimensionalData.Dimensions.Lookups.NoMetadata},1}
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  …  [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; … ;;; NaN NaN … 1.32149 1.33565; NaN NaN … 1.29564 1.32555; … ; NaN NaN … 1.3188 1.3169; NaN NaN … 1.17863 1.18434;;; NaN NaN … 1.29816 1.34218; NaN NaN … 1.30113 1.35483; … ; NaN NaN … 1.30142 1.31753; NaN NaN … 1.16258 1.17647;;; NaN NaN … 1.34549 1.37878; NaN NaN … 1.36836 1.41634; … ; NaN NaN … 1.34832 1.38364; NaN NaN … 1.17852 1.16713]
+ :Mar_Apr_May     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; … ;;; NaN NaN … 1.87705 1.90365; NaN NaN … 2.30018 2.35432; … ; NaN NaN … 2.41049 2.43254; NaN NaN … 2.65105 2.69085;;; NaN NaN … 1.86457 1.90712; NaN NaN … 2.2894 2.34818; … ; NaN NaN … 2.3866 2.41241; NaN NaN … 2.61197 2.64976;;; NaN NaN … 1.89237 1.8984; NaN NaN … 2.29473 2.312; … ; NaN NaN … 2.36142 2.36126; NaN NaN … 2.56632 2.59085]
+ :Jun_Jul_Aug     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; … ;;; NaN NaN … 3.21209 3.25153; NaN NaN … 3.23 3.28008; … ; NaN NaN … 3.12575 3.15532; NaN NaN … 3.2434 3.26274;;; NaN NaN … 3.17434 3.21699; NaN NaN … 3.18892 3.24375; … ; NaN NaN … 3.06755 3.1083; NaN NaN … 3.19241 3.22211;;; NaN NaN … 3.1437 3.15644; NaN NaN … 3.16631 3.18583; … ; NaN NaN … 3.03361 3.05846; NaN NaN … 3.16581 3.16824]
+ :Sep_Oct_Nov     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; … ;;; NaN NaN … 2.97047 3.00388; NaN NaN … 2.77587 2.80759; … ; NaN NaN … 2.60175 2.60918; NaN NaN … 1.4947 1.52419;;; NaN NaN … 2.94534 2.97649; NaN NaN … 2.75891 2.79502; … ; NaN NaN … 2.57695 2.59212; NaN NaN … 1.46506 1.49909;;; NaN NaN … 2.9192 2.93743; NaN NaN … 2.7593 2.77687; … ; NaN NaN … 2.57873 2.63006; NaN NaN … 1.48367 1.50089]

apply a sum over the time dimension and drop it

julia
julia> weighted_g = sum.(g_dsW, dims = :Ti);
+
+julia> weighted_g = dropdims.(weighted_g, dims=:Ti)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Float64, 2, Matrix{Float64}, Tuple{Dim{:x, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, Dim{:y, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, DimensionalData.Dimensions.Lookups.NoMetadata},1}
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  …  [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 11.1181 11.372; NaN NaN … 11.3069 11.5743]
+ :Mar_Apr_May     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 21.1242 21.0057; NaN NaN … 21.4198 21.1644]
+ :Jun_Jul_Aug     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 28.2747 27.9362; NaN NaN … 28.6122 28.0465]
+ :Sep_Oct_Nov     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 21.73 21.7341; NaN NaN … 21.986 21.959]

Calculate the differences

julia
julia> diff_g = map(.-, weighted_g, mean_g)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Float64, 2, Matrix{Float64}, Tuple{Dim{:x, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, Dim{:y, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, DimensionalData.Dimensions.Lookups.NoMetadata},1}
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  …  [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … -0.019016 -0.0115514; NaN NaN … -0.0183003 -0.00990356]
+ :Mar_Apr_May     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … -0.0121037 -0.0123091; NaN NaN … -0.0127077 -0.0117519]
+ :Jun_Jul_Aug     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … -0.00709111 -0.00693713; NaN NaN … -0.00684233 -0.00722034]
+ :Sep_Oct_Nov     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 0.0180572 0.0182373; NaN NaN … 0.0178074 0.018571]

All the previous steps are equivalent to calling the function defined at the top:

julia
mean_g, weighted_g, diff_g, seasons_g = weighted_seasons(ds)

Once all calculations are done we can plot the results with Makie.jl as follows:

julia
using CairoMakie
+# define plot arguments/attributes
+colorrange = (-30,30)
+colormap = Reverse(:Spectral)
+highclip = :red
+lowclip = :grey15
+cb_label =  ds_o.properties["long_name"]
"Surface air temperature"
julia
with_theme(theme_ggplot2()) do
+    hm_o, hm_d, hm_w = nothing, nothing, nothing
+    # the figure
+    fig = Figure(; size = (850,500))
+    axs = [Axis(fig[i,j], aspect=DataAspect()) for i in 1:3, j in 1:4]
+    for (j, s) in enumerate(seasons_g)
+        hm_o = heatmap!(axs[1,j], mean_g[Ti=At(s)]; colorrange, lowclip, highclip, colormap)
+        hm_w = heatmap!(axs[2,j], weighted_g[Ti=At(s)]; colorrange, lowclip, highclip, colormap)
+        hm_d = heatmap!(axs[3,j], diff_g[Ti=At(s)]; colorrange=(-0.1,0.1), lowclip, highclip,
+            colormap=:diverging_bwr_20_95_c54_n256)
+    end
+    Colorbar(fig[1:2,5], hm_o, label=cb_label)
+    Colorbar(fig[3,5], hm_d, label="Tair")
+    hidedecorations!.(axs, grid=false, ticks=false, label=false)
+    # some labels
+    [axs[1,j].title = string.(s) for (j,s) in enumerate(seasons_g)]
+    Label(fig[0,1:5], "Seasonal Surface Air Temperature", fontsize=18, font=:bold)
+    axs[1,1].ylabel = "Unweighted"
+    axs[2,1].ylabel = "Weighted"
+    axs[3,1].ylabel = "Difference"
+    colgap!(fig.layout, 5)
+    rowgap!(fig.layout, 5)
+    fig
+end

which shows a good agreement with the results first published by Joe Hamman.

',63)]))}const N=i(t,[["render",l]]);export{y as __pageData,N as default}; diff --git a/previews/PR477/assets/UserGuide_group.md.D6FXIAci.lean.js b/previews/PR477/assets/UserGuide_group.md.D6FXIAci.lean.js new file mode 100644 index 00000000..abd2b9df --- /dev/null +++ b/previews/PR477/assets/UserGuide_group.md.D6FXIAci.lean.js @@ -0,0 +1,190 @@ +import{_ as i,c as a,a2 as n,o as e}from"./chunks/framework.CG45A19l.js";const h="/YAXArrays.jl/previews/PR477/assets/dadyujg.CBBZcGwj.png",y=JSON.parse('{"title":"Group YAXArrays and Datasets","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/group.md","filePath":"UserGuide/group.md","lastUpdated":null}'),t={name:"UserGuide/group.md"};function l(p,s,k,d,r,g){return e(),a("div",null,s[0]||(s[0]=[n(`

Group YAXArrays and Datasets

The following examples will use the groupby function to calculate temporal and spatial averages.

julia
using YAXArrays, DimensionalData
+using NetCDF
+using Downloads
+using Dates
+using Statistics
[ Info: new driver key :netcdf, updating backendlist.

Seasonal Averages from Time Series of Monthly Means

The following reproduces the example in xarray by Joe Hamman.

Where the goal is to calculate the seasonal average. And in order to do this properly, is necessary to calculate the weighted average considering that each month has a different number of days.

Download the data

julia
url_path = "https://github.com/pydata/xarray-data/raw/master/rasm.nc"
+filename = Downloads.download(url_path, "rasm.nc")
+ds_o = Cube(filename)

WARNING

The following rebuild should not be necessary in the future, plus is unpractical to use for large data sets. Out of memory groupby currently is work in progress. Related to https://github.com/rafaqz/DimensionalData.jl/issues/642

julia
axs = dims(ds_o) # get the dimensions
+data = ds_o.data[:,:,:] # read the data
+_FillValue = ds_o.properties["_FillValue"]
+data = replace(data, _FillValue => NaN)
+# create new YAXArray
+ds = YAXArray(axs, data)

GroupBy: seasons

function weighted_seasons(ds) ... end
julia
function weighted_seasons(ds)
+    # calculate weights 
+    tempo = dims(ds, :Ti)
+    month_length = YAXArray((tempo,), daysinmonth.(tempo))
+    g_tempo = groupby(month_length, Ti => seasons(; start=December))
+    sum_days = sum.(g_tempo, dims=:Ti)
+    weights = map(./, g_tempo, sum_days)
+    # unweighted seasons
+    g_ds = groupby(ds, Ti => seasons(; start=December))
+    mean_g = mean.(g_ds, dims=:Ti)
+    mean_g = dropdims.(mean_g, dims=:Ti)
+    # weighted seasons
+    g_dsW = broadcast_dims.(*, weights, g_ds)
+    weighted_g = sum.(g_dsW, dims = :Ti);
+    weighted_g = dropdims.(weighted_g, dims=:Ti)
+    # differences
+    diff_g = map(.-, weighted_g, mean_g)
+    seasons_g = lookup(mean_g, :Ti)
+    return mean_g, weighted_g, diff_g, seasons_g
+end

Now, we continue with the groupby operations as usual

julia
julia> g_ds = groupby(ds, Ti => seasons(; start=December))
╭──────────────────────────────────────────────────╮
+4-element DimGroupByArray{YAXArray{Float64,2},1}
+├──────────────────────────────────────────────────┴───────────────────── dims ┐
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+├────────────────────────────────────────────────────────────────── group dims ┤
+x, y, Ti
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  275×205×9 YAXArray
+ :Mar_Apr_May  275×205×9 YAXArray
+ :Jun_Jul_Aug  275×205×9 YAXArray
+ :Sep_Oct_Nov  275×205×9 YAXArray

And the mean per season is calculated as follows

julia
julia> mean_g = mean.(g_ds, dims=:Ti)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Float64, 3, Array{Float64, 3}, Tuple{Dim{:x, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, Dim{:y, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, DimensionalData.Dimensions.Ti{DimensionalData.Dimensions.Lookups.Sampled{CFTime.DateTimeNoLeap, Vector{CFTime.DateTimeNoLeap}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Irregular{Tuple{Nothing, Nothing}}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, Dict{String, Any}},1}
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  …  [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 11.1372 11.3835; NaN NaN … 11.3252 11.5843;;;]
+ :Mar_Apr_May     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 21.1363 21.018; NaN NaN … 21.4325 21.1762;;;]
+ :Jun_Jul_Aug     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 28.2818 27.9432; NaN NaN … 28.619 28.0537;;;]
+ :Sep_Oct_Nov     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 21.7119 21.7158; NaN NaN … 21.9682 21.9404;;;]

dropdims

Note that now the time dimension has length one, we can use dropdims to remove it

julia
julia> mean_g = dropdims.(mean_g, dims=:Ti)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Float64, 2, Matrix{Float64}, Tuple{Dim{:x, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, Dim{:y, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, Dict{String, Any}},1}
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  …  [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 11.1372 11.3835; NaN NaN … 11.3252 11.5843]
+ :Mar_Apr_May     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 21.1363 21.018; NaN NaN … 21.4325 21.1762]
+ :Jun_Jul_Aug     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 28.2818 27.9432; NaN NaN … 28.619 28.0537]
+ :Sep_Oct_Nov     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 21.7119 21.7158; NaN NaN … 21.9682 21.9404]

seasons

Due to the groupby function we will obtain new grouping names, in this case in the time dimension:

julia
seasons_g = lookup(mean_g, :Ti)
Categorical{Symbol} Unordered
+wrapping: 4-element Vector{Symbol}:
+ :Dec_Jan_Feb
+ :Mar_Apr_May
+ :Jun_Jul_Aug
+ :Sep_Oct_Nov

Next, we will weight this grouping by days/month in each group.

GroupBy: weight

Create a YAXArray for the month length

julia
tempo = dims(ds, :Ti)
+month_length = YAXArray((tempo,), daysinmonth.(tempo))
╭──────────────────────────────╮
+│ 36-element YAXArray{Int64,1} │
+├──────────────────────────────┴───────────────────────────────────────── dims ┐
+  ↓ Ti Sampled{CFTime.DateTimeNoLeap} [CFTime.DateTimeNoLeap(1980-09-16T12:00:00), …, CFTime.DateTimeNoLeap(1983-08-17T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 288.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

Now group it by season

julia
julia> g_tempo = groupby(month_length, Ti => seasons(; start=December))
╭────────────────────────────────────────────────╮
+4-element DimGroupByArray{YAXArray{Int64,0},1}
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+├────────────────────────────────────────────────────────────────── group dims ┤
+Ti
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  9-element YAXArray
+ :Mar_Apr_May  9-element YAXArray
+ :Jun_Jul_Aug  9-element YAXArray
+ :Sep_Oct_Nov  9-element YAXArray

Get the number of days per season

julia
julia> sum_days = sum.(g_tempo, dims=:Ti)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Int64, 1, Vector{Int64}, Tuple{DimensionalData.Dimensions.Ti{DimensionalData.Dimensions.Lookups.Sampled{CFTime.DateTimeNoLeap, Vector{CFTime.DateTimeNoLeap}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Irregular{Tuple{Nothing, Nothing}}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, Dict{String, Any}},1}
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  [270]
+ :Mar_Apr_May  [276]
+ :Jun_Jul_Aug  [276]
+ :Sep_Oct_Nov  [273]

weights

Weight the seasonal groups by sum_days

julia
julia> weights = map(./, g_tempo, sum_days)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Float64, 1, Vector{Float64}, Tuple{DimensionalData.Dimensions.Ti{DimensionalData.Dimensions.Lookups.Sampled{CFTime.DateTimeNoLeap, Vector{CFTime.DateTimeNoLeap}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Irregular{Tuple{Nothing, Nothing}}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, Dict{String, Any}},1} groupby
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  …  [0.114815, 0.114815, 0.103704, 0.114815, 0.114815, 0.103704, 0.114815, 0.114815, 0.103704]
+ :Mar_Apr_May     [0.112319, 0.108696, 0.112319, 0.112319, 0.108696, 0.112319, 0.112319, 0.108696, 0.112319]
+ :Jun_Jul_Aug     [0.108696, 0.112319, 0.112319, 0.108696, 0.112319, 0.112319, 0.108696, 0.112319, 0.112319]
+ :Sep_Oct_Nov     [0.10989, 0.113553, 0.10989, 0.10989, 0.113553, 0.10989, 0.10989, 0.113553, 0.10989]

Verify that the sum per season is 1

julia
julia> sum.(weights)
╭───────────────────────────────╮
+4-element DimArray{Float64,1}
+├───────────────────────────────┴──────────────────────────────────────── dims ┐
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  1.0
+ :Mar_Apr_May  1.0
+ :Jun_Jul_Aug  1.0
+ :Sep_Oct_Nov  1.0

weighted seasons

Now, let's weight the seasons

julia
julia> g_dsW = broadcast_dims.(*, weights, g_ds)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Float64, 3, Array{Float64, 3}, Tuple{DimensionalData.Dimensions.Ti{DimensionalData.Dimensions.Lookups.Sampled{CFTime.DateTimeNoLeap, Vector{CFTime.DateTimeNoLeap}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Irregular{Tuple{Nothing, Nothing}}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, Dim{:x, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, Dim{:y, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, DimensionalData.Dimensions.Lookups.NoMetadata},1}
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  …  [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; … ;;; NaN NaN … 1.32149 1.33565; NaN NaN … 1.29564 1.32555; … ; NaN NaN … 1.3188 1.3169; NaN NaN … 1.17863 1.18434;;; NaN NaN … 1.29816 1.34218; NaN NaN … 1.30113 1.35483; … ; NaN NaN … 1.30142 1.31753; NaN NaN … 1.16258 1.17647;;; NaN NaN … 1.34549 1.37878; NaN NaN … 1.36836 1.41634; … ; NaN NaN … 1.34832 1.38364; NaN NaN … 1.17852 1.16713]
+ :Mar_Apr_May     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; … ;;; NaN NaN … 1.87705 1.90365; NaN NaN … 2.30018 2.35432; … ; NaN NaN … 2.41049 2.43254; NaN NaN … 2.65105 2.69085;;; NaN NaN … 1.86457 1.90712; NaN NaN … 2.2894 2.34818; … ; NaN NaN … 2.3866 2.41241; NaN NaN … 2.61197 2.64976;;; NaN NaN … 1.89237 1.8984; NaN NaN … 2.29473 2.312; … ; NaN NaN … 2.36142 2.36126; NaN NaN … 2.56632 2.59085]
+ :Jun_Jul_Aug     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; … ;;; NaN NaN … 3.21209 3.25153; NaN NaN … 3.23 3.28008; … ; NaN NaN … 3.12575 3.15532; NaN NaN … 3.2434 3.26274;;; NaN NaN … 3.17434 3.21699; NaN NaN … 3.18892 3.24375; … ; NaN NaN … 3.06755 3.1083; NaN NaN … 3.19241 3.22211;;; NaN NaN … 3.1437 3.15644; NaN NaN … 3.16631 3.18583; … ; NaN NaN … 3.03361 3.05846; NaN NaN … 3.16581 3.16824]
+ :Sep_Oct_Nov     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN;;; … ;;; NaN NaN … 2.97047 3.00388; NaN NaN … 2.77587 2.80759; … ; NaN NaN … 2.60175 2.60918; NaN NaN … 1.4947 1.52419;;; NaN NaN … 2.94534 2.97649; NaN NaN … 2.75891 2.79502; … ; NaN NaN … 2.57695 2.59212; NaN NaN … 1.46506 1.49909;;; NaN NaN … 2.9192 2.93743; NaN NaN … 2.7593 2.77687; … ; NaN NaN … 2.57873 2.63006; NaN NaN … 1.48367 1.50089]

apply a sum over the time dimension and drop it

julia
julia> weighted_g = sum.(g_dsW, dims = :Ti);
+
+julia> weighted_g = dropdims.(weighted_g, dims=:Ti)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Float64, 2, Matrix{Float64}, Tuple{Dim{:x, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, Dim{:y, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, DimensionalData.Dimensions.Lookups.NoMetadata},1}
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  …  [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 11.1181 11.372; NaN NaN … 11.3069 11.5743]
+ :Mar_Apr_May     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 21.1242 21.0057; NaN NaN … 21.4198 21.1644]
+ :Jun_Jul_Aug     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 28.2747 27.9362; NaN NaN … 28.6122 28.0465]
+ :Sep_Oct_Nov     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 21.73 21.7341; NaN NaN … 21.986 21.959]

Calculate the differences

julia
julia> diff_g = map(.-, weighted_g, mean_g)
╭──────────────────────────────────────────────────────────────────────────────╮
+4-element DimArray{YAXArray{Float64, 2, Matrix{Float64}, Tuple{Dim{:x, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}, Dim{:y, DimensionalData.Dimensions.Lookups.Sampled{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}}, DimensionalData.Dimensions.Lookups.NoMetadata},1}
+├──────────────────────────────────────────────────────────────────────── dims ┤
+Ti Categorical{Symbol} [:Dec_Jan_Feb, :Mar_Apr_May, :Jun_Jul_Aug, :Sep_Oct_Nov] Unordered
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{Symbol, Any} with 1 entry:
+  :groupby => :Ti=>CyclicBins(month; cycle=12, step=3, start=12)…
+└──────────────────────────────────────────────────────────────────────────────┘
+ :Dec_Jan_Feb  …  [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … -0.019016 -0.0115514; NaN NaN … -0.0183003 -0.00990356]
+ :Mar_Apr_May     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … -0.0121037 -0.0123091; NaN NaN … -0.0127077 -0.0117519]
+ :Jun_Jul_Aug     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … -0.00709111 -0.00693713; NaN NaN … -0.00684233 -0.00722034]
+ :Sep_Oct_Nov     [NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … 0.0180572 0.0182373; NaN NaN … 0.0178074 0.018571]

All the previous steps are equivalent to calling the function defined at the top:

julia
mean_g, weighted_g, diff_g, seasons_g = weighted_seasons(ds)

Once all calculations are done we can plot the results with Makie.jl as follows:

julia
using CairoMakie
+# define plot arguments/attributes
+colorrange = (-30,30)
+colormap = Reverse(:Spectral)
+highclip = :red
+lowclip = :grey15
+cb_label =  ds_o.properties["long_name"]
"Surface air temperature"
julia
with_theme(theme_ggplot2()) do
+    hm_o, hm_d, hm_w = nothing, nothing, nothing
+    # the figure
+    fig = Figure(; size = (850,500))
+    axs = [Axis(fig[i,j], aspect=DataAspect()) for i in 1:3, j in 1:4]
+    for (j, s) in enumerate(seasons_g)
+        hm_o = heatmap!(axs[1,j], mean_g[Ti=At(s)]; colorrange, lowclip, highclip, colormap)
+        hm_w = heatmap!(axs[2,j], weighted_g[Ti=At(s)]; colorrange, lowclip, highclip, colormap)
+        hm_d = heatmap!(axs[3,j], diff_g[Ti=At(s)]; colorrange=(-0.1,0.1), lowclip, highclip,
+            colormap=:diverging_bwr_20_95_c54_n256)
+    end
+    Colorbar(fig[1:2,5], hm_o, label=cb_label)
+    Colorbar(fig[3,5], hm_d, label="Tair")
+    hidedecorations!.(axs, grid=false, ticks=false, label=false)
+    # some labels
+    [axs[1,j].title = string.(s) for (j,s) in enumerate(seasons_g)]
+    Label(fig[0,1:5], "Seasonal Surface Air Temperature", fontsize=18, font=:bold)
+    axs[1,1].ylabel = "Unweighted"
+    axs[2,1].ylabel = "Weighted"
+    axs[3,1].ylabel = "Difference"
+    colgap!(fig.layout, 5)
+    rowgap!(fig.layout, 5)
+    fig
+end

which shows a good agreement with the results first published by Joe Hamman.

',63)]))}const N=i(t,[["render",l]]);export{y as __pageData,N as default}; diff --git a/previews/PR477/assets/UserGuide_read.md.DKTQLAM5.js b/previews/PR477/assets/UserGuide_read.md.DKTQLAM5.js new file mode 100644 index 00000000..46e06f82 --- /dev/null +++ b/previews/PR477/assets/UserGuide_read.md.DKTQLAM5.js @@ -0,0 +1,159 @@ +import{_ as o,c as r,a2 as d,G as i,w as e,j as s,a,B as l,o as h}from"./chunks/framework.CG45A19l.js";const F=JSON.parse('{"title":"Read YAXArrays and Datasets","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/read.md","filePath":"UserGuide/read.md","lastUpdated":null}'),u={name:"UserGuide/read.md"};function c(k,n,g,m,y,E){const t=l("PluginTabsTab"),p=l("PluginTabs");return h(),r("div",null,[n[3]||(n[3]=d(`

Read YAXArrays and Datasets

This section describes how to read files, URLs, and directories into YAXArrays and datasets.

Read Zarr

Open a Zarr store as a Dataset:

julia
using YAXArrays
+using Zarr
+path="gs://cmip6/CMIP6/ScenarioMIP/DKRZ/MPI-ESM1-2-HR/ssp585/r1i1p1f1/3hr/tas/gn/v20190710/"
+store = zopen(path, consolidated=true)
+ds = open_dataset(store)
YAXArray Dataset
+Shared Axes: 
+None
+Variables: 
+height
+
+Variables with additional axes:
+  Additional Axes: 
+  (↓ lon Sampled{Float64} 0.0:0.9375:359.0625 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} [-89.28422753251364, -88.35700351866494, …, 88.35700351866494, 89.28422753251364] ForwardOrdered Irregular Points,
+  ↗ Ti  Sampled{DateTime} [2015-01-01T03:00:00, …, 2101-01-01T00:00:00] ForwardOrdered Irregular Points)
+  Variables: 
+  tas
+
+Properties: Dict{String, Any}("initialization_index" => 1, "realm" => "atmos", "variable_id" => "tas", "external_variables" => "areacella", "branch_time_in_child" => 60265.0, "data_specs_version" => "01.00.30", "history" => "2019-07-21T06:26:13Z ; CMOR rewrote data to be consistent with CMIP6, CF-1.7 CMIP-6.2 and CF standards.", "forcing_index" => 1, "parent_variant_label" => "r1i1p1f1", "table_id" => "3hr"…)

We can set path to a URL, a local directory, or in this case to a cloud object storage path.

A zarr store may contain multiple arrays. Individual arrays can be accessed using subsetting:

julia
ds.tas
╭────────────────────────────────────╮
+│ 384×192×251288 YAXArray{Float32,3} │
+├────────────────────────────────────┴─────────────────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 0.0:0.9375:359.0625 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} [-89.28422753251364, -88.35700351866494, …, 88.35700351866494, 89.28422753251364] ForwardOrdered Irregular Points,
+  ↗ Ti  Sampled{DateTime} [2015-01-01T03:00:00, …, 2101-01-01T00:00:00] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"         => "K"
+  "history"       => "2019-07-21T06:26:13Z altered by CMOR: Treated scalar dime…
+  "name"          => "tas"
+  "cell_methods"  => "area: mean time: point"
+  "cell_measures" => "area: areacella"
+  "long_name"     => "Near-Surface Air Temperature"
+  "coordinates"   => "height"
+  "standard_name" => "air_temperature"
+  "_FillValue"    => 1.0f20
+  "comment"       => "near-surface (usually, 2 meter) air temperature"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 69.02 GB
+└──────────────────────────────────────────────────────────────────────────────┘

Read NetCDF

Open a NetCDF file as a Dataset:

julia
using YAXArrays
+using NetCDF
+using Downloads: download
+
+path = download("https://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc", "example.nc")
+ds = open_dataset(path)
YAXArray Dataset
+Shared Axes: 
+  (↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points)
+
+Variables: 
+tos
+
+Properties: Dict{String, Any}("cmor_version" => 0.96f0, "references" => "Dufresne et al, Journal of Climate, 2015, vol XX, p 136", "realization" => 1, "Conventions" => "CF-1.0", "contact" => "Sebastien Denvil, sebastien.denvil@ipsl.jussieu.fr", "history" => "YYYY/MM/JJ: data generated; YYYY/MM/JJ+1 data transformed  At 16:37:23 on 01/11/2005, CMOR rewrote data to comply with CF standards and IPCC Fourth Assessment requirements", "table_id" => "Table O1 (13 November 2004)", "source" => "IPSL-CM4_v1 (2003) : atmosphere : LMDZ (IPSL-CM4_IPCC, 96x71x19) ; ocean ORCA2 (ipsl_cm4_v1_8, 2x2L31); sea ice LIM (ipsl_cm4_v", "title" => "IPSL  model output prepared for IPCC Fourth Assessment SRES A2 experiment", "experiment_id" => "SRES A2 experiment"…)

A NetCDF file may contain multiple arrays. Individual arrays can be accessed using subsetting:

julia
ds.tos
╭────────────────────────────────────────────────╮
+│ 180×170×24 YAXArray{Union{Missing, Float32},3} │
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 2.8 MB
+└──────────────────────────────────────────────────────────────────────────────┘

Please note that netCDF4 uses HDF5 which is not thread-safe in Julia. Add manual locks in your own code to avoid any data-race:

julia
my_lock = ReentrantLock()
+Threads.@threads for i in 1:10
+    @lock my_lock @info ds.tos[1, 1, 1]
+end
[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing

This code will ensure that the data is only accessed by one thread at a time, i.e. making it actual single-threaded but thread-safe.

Read GDAL (GeoTIFF, GeoJSON)

All GDAL compatible files can be read as a YAXArrays.Dataset after loading ArchGDAL:

julia
using YAXArrays
+using ArchGDAL
+using Downloads: download
+
+path = download("https://github.com/yeesian/ArchGDALDatasets/raw/307f8f0e584a39a050c042849004e6a2bd674f99/gdalworkshop/world.tif", "world.tif")
+ds = open_dataset(path)
YAXArray Dataset
+Shared Axes: 
+  (↓ X Sampled{Float64} -180.0:0.17578125:179.82421875 ForwardOrdered Regular Points,
+  → Y Sampled{Float64} 90.0:-0.17578125:-89.82421875 ReverseOrdered Regular Points)
+
+Variables: 
+Blue, Green, Red
+
+Properties: Dict{String, Any}("projection" => "GEOGCS[\\"WGS 84\\",DATUM[\\"WGS_1984\\",SPHEROID[\\"WGS 84\\",6378137,298.257223563,AUTHORITY[\\"EPSG\\",\\"7030\\"]],AUTHORITY[\\"EPSG\\",\\"6326\\"]],PRIMEM[\\"Greenwich\\",0,AUTHORITY[\\"EPSG\\",\\"8901\\"]],UNIT[\\"degree\\",0.0174532925199433,AUTHORITY[\\"EPSG\\",\\"9122\\"]],AXIS[\\"Latitude\\",NORTH],AXIS[\\"Longitude\\",EAST],AUTHORITY[\\"EPSG\\",\\"4326\\"]]")

Load data into memory

For datasets or variables that could fit in RAM, you might want to load them completely into memory. This can be done using the readcubedata function. As an example, let's use the NetCDF workflow; the same should be true for other cases.

readcubedata

`,28)),i(p,null,{default:e(()=>[i(t,{label:"single variable"},{default:e(()=>n[0]||(n[0]=[s("div",{class:"language-julia vp-adaptive-theme"},[s("button",{title:"Copy Code",class:"copy"}),s("span",{class:"lang"},"julia"),s("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},[s("code",null,[s("span",{class:"line"},[s("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},"readcubedata"),s("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"(ds"),s("span",{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"}},"."),s("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"tos)")])])])],-1),s("div",{class:"language- vp-adaptive-theme"},[s("button",{title:"Copy Code",class:"copy"}),s("span",{class:"lang"}),s("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},[s("code",null,[s("span",{class:"line"},[s("span",null,"╭────────────────────────────────────────────────╮")]),a(` +`),s("span",{class:"line"},[s("span",null,"│ 180×170×24 YAXArray{Union{Missing, Float32},3} │")]),a(` +`),s("span",{class:"line"},[s("span",null,"├────────────────────────────────────────────────┴─────────────────────── dims ┐")]),a(` +`),s("span",{class:"line"},[s("span",null," ↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,")]),a(` +`),s("span",{class:"line"},[s("span",null," → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,")]),a(` +`),s("span",{class:"line"},[s("span",null," ↗ Ti Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points")]),a(` +`),s("span",{class:"line"},[s("span",null,"├──────────────────────────────────────────────────────────────────── metadata ┤")]),a(` +`),s("span",{class:"line"},[s("span",null," Dict{String, Any} with 10 entries:")]),a(` +`),s("span",{class:"line"},[s("span",null,' "units" => "K"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "missing_value" => 1.0f20')]),a(` +`),s("span",{class:"line"},[s("span",null,' "history" => " At 16:37:23 on 01/11/2005: CMOR altered the data in t…')]),a(` +`),s("span",{class:"line"},[s("span",null,' "cell_methods" => "time: mean (interval: 30 minutes)"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "name" => "tos"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "long_name" => "Sea Surface Temperature"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "original_units" => "degC"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "standard_name" => "sea_surface_temperature"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "_FillValue" => 1.0f20')]),a(` +`),s("span",{class:"line"},[s("span",null,' "original_name" => "sosstsst"')]),a(` +`),s("span",{class:"line"},[s("span",null,"├──────────────────────────────────────────────────────────── loaded in memory ┤")]),a(` +`),s("span",{class:"line"},[s("span",null," data size: 2.8 MB")]),a(` +`),s("span",{class:"line"},[s("span",null,"└──────────────────────────────────────────────────────────────────────────────┘")])])])],-1)])),_:1}),i(t,{label:"with the `:` operator"},{default:e(()=>n[1]||(n[1]=[s("div",{class:"language-julia vp-adaptive-theme"},[s("button",{title:"Copy Code",class:"copy"}),s("span",{class:"lang"},"julia"),s("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},[s("code",null,[s("span",{class:"line"},[s("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"ds"),s("span",{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"}},"."),s("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"tos[:, :, :]")])])])],-1),s("div",{class:"language- vp-adaptive-theme"},[s("button",{title:"Copy Code",class:"copy"}),s("span",{class:"lang"}),s("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},[s("code",null,[s("span",{class:"line"},[s("span",null,"╭────────────────────────────────────────────────╮")]),a(` +`),s("span",{class:"line"},[s("span",null,"│ 180×170×24 YAXArray{Union{Missing, Float32},3} │")]),a(` +`),s("span",{class:"line"},[s("span",null,"├────────────────────────────────────────────────┴─────────────────────── dims ┐")]),a(` +`),s("span",{class:"line"},[s("span",null," ↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,")]),a(` +`),s("span",{class:"line"},[s("span",null," → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,")]),a(` +`),s("span",{class:"line"},[s("span",null," ↗ Ti Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points")]),a(` +`),s("span",{class:"line"},[s("span",null,"├──────────────────────────────────────────────────────────────────── metadata ┤")]),a(` +`),s("span",{class:"line"},[s("span",null," Dict{String, Any} with 10 entries:")]),a(` +`),s("span",{class:"line"},[s("span",null,' "units" => "K"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "missing_value" => 1.0f20')]),a(` +`),s("span",{class:"line"},[s("span",null,' "history" => " At 16:37:23 on 01/11/2005: CMOR altered the data in t…')]),a(` +`),s("span",{class:"line"},[s("span",null,' "cell_methods" => "time: mean (interval: 30 minutes)"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "name" => "tos"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "long_name" => "Sea Surface Temperature"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "original_units" => "degC"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "standard_name" => "sea_surface_temperature"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "_FillValue" => 1.0f20')]),a(` +`),s("span",{class:"line"},[s("span",null,' "original_name" => "sosstsst"')]),a(` +`),s("span",{class:"line"},[s("span",null,"├──────────────────────────────────────────────────────────── loaded in memory ┤")]),a(` +`),s("span",{class:"line"},[s("span",null," data size: 2.8 MB")]),a(` +`),s("span",{class:"line"},[s("span",null,"└──────────────────────────────────────────────────────────────────────────────┘")])])])],-1),s("p",null,"In this case, you should know in advance how many dimensions there are and how long they are, which shouldn't be hard to determine since this information is already displayed when querying such variables.",-1)])),_:1}),i(t,{label:"Complete Dataset"},{default:e(()=>n[2]||(n[2]=[s("div",{class:"language-julia vp-adaptive-theme"},[s("button",{title:"Copy Code",class:"copy"}),s("span",{class:"lang"},"julia"),s("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},[s("code",null,[s("span",{class:"line"},[s("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"ds_loaded "),s("span",{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"}},"="),s("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," readcubedata"),s("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"(ds)")]),a(` +`),s("span",{class:"line"},[s("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"ds_loaded["),s("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"tos"'),s("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"] "),s("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}},"# Load the variable of interest; the loaded status is shown for each variable.")])])])],-1),s("div",{class:"language- vp-adaptive-theme"},[s("button",{title:"Copy Code",class:"copy"}),s("span",{class:"lang"}),s("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},[s("code",null,[s("span",{class:"line"},[s("span",null,"╭────────────────────────────────────────────────╮")]),a(` +`),s("span",{class:"line"},[s("span",null,"│ 180×170×24 YAXArray{Union{Missing, Float32},3} │")]),a(` +`),s("span",{class:"line"},[s("span",null,"├────────────────────────────────────────────────┴─────────────────────── dims ┐")]),a(` +`),s("span",{class:"line"},[s("span",null," ↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,")]),a(` +`),s("span",{class:"line"},[s("span",null," → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,")]),a(` +`),s("span",{class:"line"},[s("span",null," ↗ Ti Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points")]),a(` +`),s("span",{class:"line"},[s("span",null,"├──────────────────────────────────────────────────────────────────── metadata ┤")]),a(` +`),s("span",{class:"line"},[s("span",null," Dict{String, Any} with 10 entries:")]),a(` +`),s("span",{class:"line"},[s("span",null,' "units" => "K"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "missing_value" => 1.0f20')]),a(` +`),s("span",{class:"line"},[s("span",null,' "history" => " At 16:37:23 on 01/11/2005: CMOR altered the data in t…')]),a(` +`),s("span",{class:"line"},[s("span",null,' "cell_methods" => "time: mean (interval: 30 minutes)"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "name" => "tos"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "long_name" => "Sea Surface Temperature"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "original_units" => "degC"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "standard_name" => "sea_surface_temperature"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "_FillValue" => 1.0f20')]),a(` +`),s("span",{class:"line"},[s("span",null,' "original_name" => "sosstsst"')]),a(` +`),s("span",{class:"line"},[s("span",null,"├──────────────────────────────────────────────────────────── loaded in memory ┤")]),a(` +`),s("span",{class:"line"},[s("span",null," data size: 2.8 MB")]),a(` +`),s("span",{class:"line"},[s("span",null,"└──────────────────────────────────────────────────────────────────────────────┘")])])])],-1)])),_:1})]),_:1}),n[4]||(n[4]=s("p",null,[a("Note how the loading status changes from "),s("code",null,"loaded lazily"),a(" to "),s("code",null,"loaded in memory"),a(".")],-1))])}const b=o(u,[["render",c]]);export{F as __pageData,b as default}; diff --git a/previews/PR477/assets/UserGuide_read.md.DKTQLAM5.lean.js b/previews/PR477/assets/UserGuide_read.md.DKTQLAM5.lean.js new file mode 100644 index 00000000..46e06f82 --- /dev/null +++ b/previews/PR477/assets/UserGuide_read.md.DKTQLAM5.lean.js @@ -0,0 +1,159 @@ +import{_ as o,c as r,a2 as d,G as i,w as e,j as s,a,B as l,o as h}from"./chunks/framework.CG45A19l.js";const F=JSON.parse('{"title":"Read YAXArrays and Datasets","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/read.md","filePath":"UserGuide/read.md","lastUpdated":null}'),u={name:"UserGuide/read.md"};function c(k,n,g,m,y,E){const t=l("PluginTabsTab"),p=l("PluginTabs");return h(),r("div",null,[n[3]||(n[3]=d(`

Read YAXArrays and Datasets

This section describes how to read files, URLs, and directories into YAXArrays and datasets.

Read Zarr

Open a Zarr store as a Dataset:

julia
using YAXArrays
+using Zarr
+path="gs://cmip6/CMIP6/ScenarioMIP/DKRZ/MPI-ESM1-2-HR/ssp585/r1i1p1f1/3hr/tas/gn/v20190710/"
+store = zopen(path, consolidated=true)
+ds = open_dataset(store)
YAXArray Dataset
+Shared Axes: 
+None
+Variables: 
+height
+
+Variables with additional axes:
+  Additional Axes: 
+  (↓ lon Sampled{Float64} 0.0:0.9375:359.0625 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} [-89.28422753251364, -88.35700351866494, …, 88.35700351866494, 89.28422753251364] ForwardOrdered Irregular Points,
+  ↗ Ti  Sampled{DateTime} [2015-01-01T03:00:00, …, 2101-01-01T00:00:00] ForwardOrdered Irregular Points)
+  Variables: 
+  tas
+
+Properties: Dict{String, Any}("initialization_index" => 1, "realm" => "atmos", "variable_id" => "tas", "external_variables" => "areacella", "branch_time_in_child" => 60265.0, "data_specs_version" => "01.00.30", "history" => "2019-07-21T06:26:13Z ; CMOR rewrote data to be consistent with CMIP6, CF-1.7 CMIP-6.2 and CF standards.", "forcing_index" => 1, "parent_variant_label" => "r1i1p1f1", "table_id" => "3hr"…)

We can set path to a URL, a local directory, or in this case to a cloud object storage path.

A zarr store may contain multiple arrays. Individual arrays can be accessed using subsetting:

julia
ds.tas
╭────────────────────────────────────╮
+│ 384×192×251288 YAXArray{Float32,3} │
+├────────────────────────────────────┴─────────────────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 0.0:0.9375:359.0625 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} [-89.28422753251364, -88.35700351866494, …, 88.35700351866494, 89.28422753251364] ForwardOrdered Irregular Points,
+  ↗ Ti  Sampled{DateTime} [2015-01-01T03:00:00, …, 2101-01-01T00:00:00] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"         => "K"
+  "history"       => "2019-07-21T06:26:13Z altered by CMOR: Treated scalar dime…
+  "name"          => "tas"
+  "cell_methods"  => "area: mean time: point"
+  "cell_measures" => "area: areacella"
+  "long_name"     => "Near-Surface Air Temperature"
+  "coordinates"   => "height"
+  "standard_name" => "air_temperature"
+  "_FillValue"    => 1.0f20
+  "comment"       => "near-surface (usually, 2 meter) air temperature"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 69.02 GB
+└──────────────────────────────────────────────────────────────────────────────┘

Read NetCDF

Open a NetCDF file as a Dataset:

julia
using YAXArrays
+using NetCDF
+using Downloads: download
+
+path = download("https://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc", "example.nc")
+ds = open_dataset(path)
YAXArray Dataset
+Shared Axes: 
+  (↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points)
+
+Variables: 
+tos
+
+Properties: Dict{String, Any}("cmor_version" => 0.96f0, "references" => "Dufresne et al, Journal of Climate, 2015, vol XX, p 136", "realization" => 1, "Conventions" => "CF-1.0", "contact" => "Sebastien Denvil, sebastien.denvil@ipsl.jussieu.fr", "history" => "YYYY/MM/JJ: data generated; YYYY/MM/JJ+1 data transformed  At 16:37:23 on 01/11/2005, CMOR rewrote data to comply with CF standards and IPCC Fourth Assessment requirements", "table_id" => "Table O1 (13 November 2004)", "source" => "IPSL-CM4_v1 (2003) : atmosphere : LMDZ (IPSL-CM4_IPCC, 96x71x19) ; ocean ORCA2 (ipsl_cm4_v1_8, 2x2L31); sea ice LIM (ipsl_cm4_v", "title" => "IPSL  model output prepared for IPCC Fourth Assessment SRES A2 experiment", "experiment_id" => "SRES A2 experiment"…)

A NetCDF file may contain multiple arrays. Individual arrays can be accessed using subsetting:

julia
ds.tos
╭────────────────────────────────────────────────╮
+│ 180×170×24 YAXArray{Union{Missing, Float32},3} │
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 2.8 MB
+└──────────────────────────────────────────────────────────────────────────────┘

Please note that netCDF4 uses HDF5 which is not thread-safe in Julia. Add manual locks in your own code to avoid any data-race:

julia
my_lock = ReentrantLock()
+Threads.@threads for i in 1:10
+    @lock my_lock @info ds.tos[1, 1, 1]
+end
[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing
+[ Info: missing

This code will ensure that the data is only accessed by one thread at a time, i.e. making it actual single-threaded but thread-safe.

Read GDAL (GeoTIFF, GeoJSON)

All GDAL compatible files can be read as a YAXArrays.Dataset after loading ArchGDAL:

julia
using YAXArrays
+using ArchGDAL
+using Downloads: download
+
+path = download("https://github.com/yeesian/ArchGDALDatasets/raw/307f8f0e584a39a050c042849004e6a2bd674f99/gdalworkshop/world.tif", "world.tif")
+ds = open_dataset(path)
YAXArray Dataset
+Shared Axes: 
+  (↓ X Sampled{Float64} -180.0:0.17578125:179.82421875 ForwardOrdered Regular Points,
+  → Y Sampled{Float64} 90.0:-0.17578125:-89.82421875 ReverseOrdered Regular Points)
+
+Variables: 
+Blue, Green, Red
+
+Properties: Dict{String, Any}("projection" => "GEOGCS[\\"WGS 84\\",DATUM[\\"WGS_1984\\",SPHEROID[\\"WGS 84\\",6378137,298.257223563,AUTHORITY[\\"EPSG\\",\\"7030\\"]],AUTHORITY[\\"EPSG\\",\\"6326\\"]],PRIMEM[\\"Greenwich\\",0,AUTHORITY[\\"EPSG\\",\\"8901\\"]],UNIT[\\"degree\\",0.0174532925199433,AUTHORITY[\\"EPSG\\",\\"9122\\"]],AXIS[\\"Latitude\\",NORTH],AXIS[\\"Longitude\\",EAST],AUTHORITY[\\"EPSG\\",\\"4326\\"]]")

Load data into memory

For datasets or variables that could fit in RAM, you might want to load them completely into memory. This can be done using the readcubedata function. As an example, let's use the NetCDF workflow; the same should be true for other cases.

readcubedata

`,28)),i(p,null,{default:e(()=>[i(t,{label:"single variable"},{default:e(()=>n[0]||(n[0]=[s("div",{class:"language-julia vp-adaptive-theme"},[s("button",{title:"Copy Code",class:"copy"}),s("span",{class:"lang"},"julia"),s("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},[s("code",null,[s("span",{class:"line"},[s("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},"readcubedata"),s("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"(ds"),s("span",{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"}},"."),s("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"tos)")])])])],-1),s("div",{class:"language- vp-adaptive-theme"},[s("button",{title:"Copy Code",class:"copy"}),s("span",{class:"lang"}),s("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},[s("code",null,[s("span",{class:"line"},[s("span",null,"╭────────────────────────────────────────────────╮")]),a(` +`),s("span",{class:"line"},[s("span",null,"│ 180×170×24 YAXArray{Union{Missing, Float32},3} │")]),a(` +`),s("span",{class:"line"},[s("span",null,"├────────────────────────────────────────────────┴─────────────────────── dims ┐")]),a(` +`),s("span",{class:"line"},[s("span",null," ↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,")]),a(` +`),s("span",{class:"line"},[s("span",null," → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,")]),a(` +`),s("span",{class:"line"},[s("span",null," ↗ Ti Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points")]),a(` +`),s("span",{class:"line"},[s("span",null,"├──────────────────────────────────────────────────────────────────── metadata ┤")]),a(` +`),s("span",{class:"line"},[s("span",null," Dict{String, Any} with 10 entries:")]),a(` +`),s("span",{class:"line"},[s("span",null,' "units" => "K"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "missing_value" => 1.0f20')]),a(` +`),s("span",{class:"line"},[s("span",null,' "history" => " At 16:37:23 on 01/11/2005: CMOR altered the data in t…')]),a(` +`),s("span",{class:"line"},[s("span",null,' "cell_methods" => "time: mean (interval: 30 minutes)"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "name" => "tos"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "long_name" => "Sea Surface Temperature"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "original_units" => "degC"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "standard_name" => "sea_surface_temperature"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "_FillValue" => 1.0f20')]),a(` +`),s("span",{class:"line"},[s("span",null,' "original_name" => "sosstsst"')]),a(` +`),s("span",{class:"line"},[s("span",null,"├──────────────────────────────────────────────────────────── loaded in memory ┤")]),a(` +`),s("span",{class:"line"},[s("span",null," data size: 2.8 MB")]),a(` +`),s("span",{class:"line"},[s("span",null,"└──────────────────────────────────────────────────────────────────────────────┘")])])])],-1)])),_:1}),i(t,{label:"with the `:` operator"},{default:e(()=>n[1]||(n[1]=[s("div",{class:"language-julia vp-adaptive-theme"},[s("button",{title:"Copy Code",class:"copy"}),s("span",{class:"lang"},"julia"),s("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},[s("code",null,[s("span",{class:"line"},[s("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"ds"),s("span",{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"}},"."),s("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"tos[:, :, :]")])])])],-1),s("div",{class:"language- vp-adaptive-theme"},[s("button",{title:"Copy Code",class:"copy"}),s("span",{class:"lang"}),s("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},[s("code",null,[s("span",{class:"line"},[s("span",null,"╭────────────────────────────────────────────────╮")]),a(` +`),s("span",{class:"line"},[s("span",null,"│ 180×170×24 YAXArray{Union{Missing, Float32},3} │")]),a(` +`),s("span",{class:"line"},[s("span",null,"├────────────────────────────────────────────────┴─────────────────────── dims ┐")]),a(` +`),s("span",{class:"line"},[s("span",null," ↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,")]),a(` +`),s("span",{class:"line"},[s("span",null," → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,")]),a(` +`),s("span",{class:"line"},[s("span",null," ↗ Ti Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points")]),a(` +`),s("span",{class:"line"},[s("span",null,"├──────────────────────────────────────────────────────────────────── metadata ┤")]),a(` +`),s("span",{class:"line"},[s("span",null," Dict{String, Any} with 10 entries:")]),a(` +`),s("span",{class:"line"},[s("span",null,' "units" => "K"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "missing_value" => 1.0f20')]),a(` +`),s("span",{class:"line"},[s("span",null,' "history" => " At 16:37:23 on 01/11/2005: CMOR altered the data in t…')]),a(` +`),s("span",{class:"line"},[s("span",null,' "cell_methods" => "time: mean (interval: 30 minutes)"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "name" => "tos"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "long_name" => "Sea Surface Temperature"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "original_units" => "degC"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "standard_name" => "sea_surface_temperature"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "_FillValue" => 1.0f20')]),a(` +`),s("span",{class:"line"},[s("span",null,' "original_name" => "sosstsst"')]),a(` +`),s("span",{class:"line"},[s("span",null,"├──────────────────────────────────────────────────────────── loaded in memory ┤")]),a(` +`),s("span",{class:"line"},[s("span",null," data size: 2.8 MB")]),a(` +`),s("span",{class:"line"},[s("span",null,"└──────────────────────────────────────────────────────────────────────────────┘")])])])],-1),s("p",null,"In this case, you should know in advance how many dimensions there are and how long they are, which shouldn't be hard to determine since this information is already displayed when querying such variables.",-1)])),_:1}),i(t,{label:"Complete Dataset"},{default:e(()=>n[2]||(n[2]=[s("div",{class:"language-julia vp-adaptive-theme"},[s("button",{title:"Copy Code",class:"copy"}),s("span",{class:"lang"},"julia"),s("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},[s("code",null,[s("span",{class:"line"},[s("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"ds_loaded "),s("span",{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"}},"="),s("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," readcubedata"),s("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"(ds)")]),a(` +`),s("span",{class:"line"},[s("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"ds_loaded["),s("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"tos"'),s("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"] "),s("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}},"# Load the variable of interest; the loaded status is shown for each variable.")])])])],-1),s("div",{class:"language- vp-adaptive-theme"},[s("button",{title:"Copy Code",class:"copy"}),s("span",{class:"lang"}),s("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},[s("code",null,[s("span",{class:"line"},[s("span",null,"╭────────────────────────────────────────────────╮")]),a(` +`),s("span",{class:"line"},[s("span",null,"│ 180×170×24 YAXArray{Union{Missing, Float32},3} │")]),a(` +`),s("span",{class:"line"},[s("span",null,"├────────────────────────────────────────────────┴─────────────────────── dims ┐")]),a(` +`),s("span",{class:"line"},[s("span",null," ↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,")]),a(` +`),s("span",{class:"line"},[s("span",null," → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,")]),a(` +`),s("span",{class:"line"},[s("span",null," ↗ Ti Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points")]),a(` +`),s("span",{class:"line"},[s("span",null,"├──────────────────────────────────────────────────────────────────── metadata ┤")]),a(` +`),s("span",{class:"line"},[s("span",null," Dict{String, Any} with 10 entries:")]),a(` +`),s("span",{class:"line"},[s("span",null,' "units" => "K"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "missing_value" => 1.0f20')]),a(` +`),s("span",{class:"line"},[s("span",null,' "history" => " At 16:37:23 on 01/11/2005: CMOR altered the data in t…')]),a(` +`),s("span",{class:"line"},[s("span",null,' "cell_methods" => "time: mean (interval: 30 minutes)"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "name" => "tos"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "long_name" => "Sea Surface Temperature"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "original_units" => "degC"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "standard_name" => "sea_surface_temperature"')]),a(` +`),s("span",{class:"line"},[s("span",null,' "_FillValue" => 1.0f20')]),a(` +`),s("span",{class:"line"},[s("span",null,' "original_name" => "sosstsst"')]),a(` +`),s("span",{class:"line"},[s("span",null,"├──────────────────────────────────────────────────────────── loaded in memory ┤")]),a(` +`),s("span",{class:"line"},[s("span",null," data size: 2.8 MB")]),a(` +`),s("span",{class:"line"},[s("span",null,"└──────────────────────────────────────────────────────────────────────────────┘")])])])],-1)])),_:1})]),_:1}),n[4]||(n[4]=s("p",null,[a("Note how the loading status changes from "),s("code",null,"loaded lazily"),a(" to "),s("code",null,"loaded in memory"),a(".")],-1))])}const b=o(u,[["render",c]]);export{F as __pageData,b as default}; diff --git a/previews/PR477/assets/UserGuide_select.md.4hincmqf.js b/previews/PR477/assets/UserGuide_select.md.4hincmqf.js new file mode 100644 index 00000000..cb27cb9e --- /dev/null +++ b/previews/PR477/assets/UserGuide_select.md.4hincmqf.js @@ -0,0 +1,294 @@ +import{_ as a,c as n,a2 as i,o as e}from"./chunks/framework.CG45A19l.js";const u=JSON.parse('{"title":"Select YAXArrays and Datasets","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/select.md","filePath":"UserGuide/select.md","lastUpdated":null}'),t={name:"UserGuide/select.md"};function p(l,s,h,o,d,k){return e(),n("div",null,s[0]||(s[0]=[i(`

Select YAXArrays and Datasets

The dimensions or axes of an YAXArray are named making it easier to subset or query certain ranges of an array. Let's open an example Dataset used to select certain elements:

julia
using YAXArrays
+using NetCDF
+using Downloads: download
+
+path = download("https://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc", "example.nc")
+ds = open_dataset(path)
YAXArray Dataset
+Shared Axes: 
+  (↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points)
+
+Variables: 
+tos
+
+Properties: Dict{String, Any}("cmor_version" => 0.96f0, "references" => "Dufresne et al, Journal of Climate, 2015, vol XX, p 136", "realization" => 1, "Conventions" => "CF-1.0", "contact" => "Sebastien Denvil, sebastien.denvil@ipsl.jussieu.fr", "history" => "YYYY/MM/JJ: data generated; YYYY/MM/JJ+1 data transformed  At 16:37:23 on 01/11/2005, CMOR rewrote data to comply with CF standards and IPCC Fourth Assessment requirements", "table_id" => "Table O1 (13 November 2004)", "source" => "IPSL-CM4_v1 (2003) : atmosphere : LMDZ (IPSL-CM4_IPCC, 96x71x19) ; ocean ORCA2 (ipsl_cm4_v1_8, 2x2L31); sea ice LIM (ipsl_cm4_v", "title" => "IPSL  model output prepared for IPCC Fourth Assessment SRES A2 experiment", "experiment_id" => "SRES A2 experiment"…)

Select a YAXArray

Get the sea surface temperature of the Dataset:

julia
tos = ds.tos
╭────────────────────────────────────────────────╮
+│ 180×170×24 YAXArray{Union{Missing, Float32},3} │
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 2.8 MB
+└──────────────────────────────────────────────────────────────────────────────┘

which is the same as:

julia
tos = ds.cubes[:tos]
╭────────────────────────────────────────────────╮
+│ 180×170×24 YAXArray{Union{Missing, Float32},3} │
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 2.8 MB
+└──────────────────────────────────────────────────────────────────────────────┘

Select elements

Using positional integer indexing:

julia
tos[lon = 1, lat = 1]
╭────────────────────────────────────────────────╮
+│ 24-element YAXArray{Union{Missing, Float32},1} │
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+  ↓ Ti Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 96.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

Same but using named indexing:

julia
tos[lon = At(1), lat = At(-79.5)]
╭────────────────────────────────────────────────╮
+│ 24-element YAXArray{Union{Missing, Float32},1} │
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+  ↓ Ti Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 96.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

Using special types:

julia
using CFTime
+time1 = DateTime360Day(2001,01,16)
+tos[time = At(time1)]
╭─────────────────────────────────────────────╮
+│ 180×170 YAXArray{Union{Missing, Float32},2} │
+├─────────────────────────────────────────────┴───────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points
+├─────────────────────────────────────────────────────────────────────┴ metadata ┐
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├───────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 119.53 KB
+└────────────────────────────────────────────────────────────────────────────────┘

Select ranges

Here we subset an interval of a dimension using positional integer indexing.

julia
tos[lon = 1:10, lat = 1:10]
╭──────────────────────────────────────────────╮
+│ 10×10×24 YAXArray{Union{Missing, Float32},3} │
+├──────────────────────────────────────────────┴───────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:2.0:19.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:-70.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 9.38 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Same but using named indexing:

julia
tos[lon = At(1.0:2:19), lat = At(-79.5:1:-70.5)]
╭──────────────────────────────────────────────╮
+│ 10×10×24 YAXArray{Union{Missing, Float32},3} │
+├──────────────────────────────────────────────┴───────────────────────── dims ┐
+  ↓ lon Sampled{Float64} [1.0, 3.0, …, 17.0, 19.0] ForwardOrdered Irregular Points,
+  → lat Sampled{Float64} [-79.5, -78.5, …, -71.5, -70.5] ForwardOrdered Irregular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 9.38 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Read more about the At selector in the package DimensionalData. Get values within a tolerances:

julia
tos[lon = At(1:10; atol = 1)]
╭───────────────────────────────────────────────╮
+│ 10×170×24 YAXArray{Union{Missing, Float32},3} │
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+  ↓ lon Sampled{Float64} [1.0, 1.0, …, 9.0, 9.0] ForwardOrdered Irregular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 159.38 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Closed and open intervals

Although a Between(a,b) function is available in DimensionalData, is recommended to use instead the a .. b notation:

julia
tos[lon = 90 .. 180]
╭───────────────────────────────────────────────╮
+│ 45×170×24 YAXArray{Union{Missing, Float32},3} │
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 91.0:2.0:179.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 717.19 KB
+└──────────────────────────────────────────────────────────────────────────────┘

This describes a closed interval in which all points were included. More selectors from DimensionalData are available, such as Touches, Near, Where and Contains.

julia
using IntervalSets
julia
julia> tos[lon = OpenInterval(90, 180)]
╭───────────────────────────────────────────────╮
+45×170×24 YAXArray{Union{Missing, Float32},3}
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+lon Sampled{Float64} 91.0:2.0:179.0 ForwardOrdered Regular Points,
+lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 717.19 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
julia> tos[lon = ClosedInterval(90, 180)]
╭───────────────────────────────────────────────╮
+45×170×24 YAXArray{Union{Missing, Float32},3}
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+lon Sampled{Float64} 91.0:2.0:179.0 ForwardOrdered Regular Points,
+lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 717.19 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
julia> tos[lon =Interval{:open,:closed}(90,180)]
╭───────────────────────────────────────────────╮
+45×170×24 YAXArray{Union{Missing, Float32},3}
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+lon Sampled{Float64} 91.0:2.0:179.0 ForwardOrdered Regular Points,
+lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 717.19 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
julia> tos[lon =Interval{:closed,:open}(90,180)]
╭───────────────────────────────────────────────╮
+45×170×24 YAXArray{Union{Missing, Float32},3}
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+lon Sampled{Float64} 91.0:2.0:179.0 ForwardOrdered Regular Points,
+lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 717.19 KB
+└──────────────────────────────────────────────────────────────────────────────┘

See tutorials for use cases.

Get a dimension

Get values, .e.g., axis tick labels, of a dimension that can be used for subseting:

julia
collect(tos.lat)
170-element Vector{Float64}:
+ -79.5
+ -78.5
+ -77.5
+ -76.5
+ -75.5
+ -74.5
+ -73.5
+ -72.5
+ -71.5
+ -70.5
+
+  81.5
+  82.5
+  83.5
+  84.5
+  85.5
+  86.5
+  87.5
+  88.5
+  89.5

These values are defined as lookups in the package DimensionalData:

julia
lookup(tos, :lon)
Sampled{Float64} ForwardOrdered Regular DimensionalData.Dimensions.Lookups.Points
+wrapping: 1.0:2.0:359.0

which is equivalent to:

julia
tos.lon.val
Sampled{Float64} ForwardOrdered Regular DimensionalData.Dimensions.Lookups.Points
+wrapping: 1.0:2.0:359.0
`,56)]))}const g=a(t,[["render",p]]);export{u as __pageData,g as default}; diff --git a/previews/PR477/assets/UserGuide_select.md.4hincmqf.lean.js b/previews/PR477/assets/UserGuide_select.md.4hincmqf.lean.js new file mode 100644 index 00000000..cb27cb9e --- /dev/null +++ b/previews/PR477/assets/UserGuide_select.md.4hincmqf.lean.js @@ -0,0 +1,294 @@ +import{_ as a,c as n,a2 as i,o as e}from"./chunks/framework.CG45A19l.js";const u=JSON.parse('{"title":"Select YAXArrays and Datasets","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/select.md","filePath":"UserGuide/select.md","lastUpdated":null}'),t={name:"UserGuide/select.md"};function p(l,s,h,o,d,k){return e(),n("div",null,s[0]||(s[0]=[i(`

Select YAXArrays and Datasets

The dimensions or axes of an YAXArray are named making it easier to subset or query certain ranges of an array. Let's open an example Dataset used to select certain elements:

julia
using YAXArrays
+using NetCDF
+using Downloads: download
+
+path = download("https://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc", "example.nc")
+ds = open_dataset(path)
YAXArray Dataset
+Shared Axes: 
+  (↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points)
+
+Variables: 
+tos
+
+Properties: Dict{String, Any}("cmor_version" => 0.96f0, "references" => "Dufresne et al, Journal of Climate, 2015, vol XX, p 136", "realization" => 1, "Conventions" => "CF-1.0", "contact" => "Sebastien Denvil, sebastien.denvil@ipsl.jussieu.fr", "history" => "YYYY/MM/JJ: data generated; YYYY/MM/JJ+1 data transformed  At 16:37:23 on 01/11/2005, CMOR rewrote data to comply with CF standards and IPCC Fourth Assessment requirements", "table_id" => "Table O1 (13 November 2004)", "source" => "IPSL-CM4_v1 (2003) : atmosphere : LMDZ (IPSL-CM4_IPCC, 96x71x19) ; ocean ORCA2 (ipsl_cm4_v1_8, 2x2L31); sea ice LIM (ipsl_cm4_v", "title" => "IPSL  model output prepared for IPCC Fourth Assessment SRES A2 experiment", "experiment_id" => "SRES A2 experiment"…)

Select a YAXArray

Get the sea surface temperature of the Dataset:

julia
tos = ds.tos
╭────────────────────────────────────────────────╮
+│ 180×170×24 YAXArray{Union{Missing, Float32},3} │
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 2.8 MB
+└──────────────────────────────────────────────────────────────────────────────┘

which is the same as:

julia
tos = ds.cubes[:tos]
╭────────────────────────────────────────────────╮
+│ 180×170×24 YAXArray{Union{Missing, Float32},3} │
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 2.8 MB
+└──────────────────────────────────────────────────────────────────────────────┘

Select elements

Using positional integer indexing:

julia
tos[lon = 1, lat = 1]
╭────────────────────────────────────────────────╮
+│ 24-element YAXArray{Union{Missing, Float32},1} │
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+  ↓ Ti Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 96.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

Same but using named indexing:

julia
tos[lon = At(1), lat = At(-79.5)]
╭────────────────────────────────────────────────╮
+│ 24-element YAXArray{Union{Missing, Float32},1} │
+├────────────────────────────────────────────────┴─────────────────────── dims ┐
+  ↓ Ti Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 96.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

Using special types:

julia
using CFTime
+time1 = DateTime360Day(2001,01,16)
+tos[time = At(time1)]
╭─────────────────────────────────────────────╮
+│ 180×170 YAXArray{Union{Missing, Float32},2} │
+├─────────────────────────────────────────────┴───────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points
+├─────────────────────────────────────────────────────────────────────┴ metadata ┐
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├───────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 119.53 KB
+└────────────────────────────────────────────────────────────────────────────────┘

Select ranges

Here we subset an interval of a dimension using positional integer indexing.

julia
tos[lon = 1:10, lat = 1:10]
╭──────────────────────────────────────────────╮
+│ 10×10×24 YAXArray{Union{Missing, Float32},3} │
+├──────────────────────────────────────────────┴───────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 1.0:2.0:19.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:-70.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 9.38 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Same but using named indexing:

julia
tos[lon = At(1.0:2:19), lat = At(-79.5:1:-70.5)]
╭──────────────────────────────────────────────╮
+│ 10×10×24 YAXArray{Union{Missing, Float32},3} │
+├──────────────────────────────────────────────┴───────────────────────── dims ┐
+  ↓ lon Sampled{Float64} [1.0, 3.0, …, 17.0, 19.0] ForwardOrdered Irregular Points,
+  → lat Sampled{Float64} [-79.5, -78.5, …, -71.5, -70.5] ForwardOrdered Irregular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 9.38 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Read more about the At selector in the package DimensionalData. Get values within a tolerances:

julia
tos[lon = At(1:10; atol = 1)]
╭───────────────────────────────────────────────╮
+│ 10×170×24 YAXArray{Union{Missing, Float32},3} │
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+  ↓ lon Sampled{Float64} [1.0, 1.0, …, 9.0, 9.0] ForwardOrdered Irregular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 159.38 KB
+└──────────────────────────────────────────────────────────────────────────────┘

Closed and open intervals

Although a Between(a,b) function is available in DimensionalData, is recommended to use instead the a .. b notation:

julia
tos[lon = 90 .. 180]
╭───────────────────────────────────────────────╮
+│ 45×170×24 YAXArray{Union{Missing, Float32},3} │
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+  ↓ lon Sampled{Float64} 91.0:2.0:179.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 717.19 KB
+└──────────────────────────────────────────────────────────────────────────────┘

This describes a closed interval in which all points were included. More selectors from DimensionalData are available, such as Touches, Near, Where and Contains.

julia
using IntervalSets
julia
julia> tos[lon = OpenInterval(90, 180)]
╭───────────────────────────────────────────────╮
+45×170×24 YAXArray{Union{Missing, Float32},3}
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+lon Sampled{Float64} 91.0:2.0:179.0 ForwardOrdered Regular Points,
+lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 717.19 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
julia> tos[lon = ClosedInterval(90, 180)]
╭───────────────────────────────────────────────╮
+45×170×24 YAXArray{Union{Missing, Float32},3}
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+lon Sampled{Float64} 91.0:2.0:179.0 ForwardOrdered Regular Points,
+lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 717.19 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
julia> tos[lon =Interval{:open,:closed}(90,180)]
╭───────────────────────────────────────────────╮
+45×170×24 YAXArray{Union{Missing, Float32},3}
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+lon Sampled{Float64} 91.0:2.0:179.0 ForwardOrdered Regular Points,
+lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 717.19 KB
+└──────────────────────────────────────────────────────────────────────────────┘
julia
julia> tos[lon =Interval{:closed,:open}(90,180)]
╭───────────────────────────────────────────────╮
+45×170×24 YAXArray{Union{Missing, Float32},3}
+├───────────────────────────────────────────────┴──────────────────────── dims ┐
+lon Sampled{Float64} 91.0:2.0:179.0 ForwardOrdered Regular Points,
+lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any} with 10 entries:
+  "units"          => "K"
+  "missing_value"  => 1.0f20
+  "history"        => " At   16:37:23 on 01/11/2005: CMOR altered the data in t…
+  "cell_methods"   => "time: mean (interval: 30 minutes)"
+  "name"           => "tos"
+  "long_name"      => "Sea Surface Temperature"
+  "original_units" => "degC"
+  "standard_name"  => "sea_surface_temperature"
+  "_FillValue"     => 1.0f20
+  "original_name"  => "sosstsst"
+├─────────────────────────────────────────────────────────────── loaded lazily ┤
+  data size: 717.19 KB
+└──────────────────────────────────────────────────────────────────────────────┘

See tutorials for use cases.

Get a dimension

Get values, .e.g., axis tick labels, of a dimension that can be used for subseting:

julia
collect(tos.lat)
170-element Vector{Float64}:
+ -79.5
+ -78.5
+ -77.5
+ -76.5
+ -75.5
+ -74.5
+ -73.5
+ -72.5
+ -71.5
+ -70.5
+
+  81.5
+  82.5
+  83.5
+  84.5
+  85.5
+  86.5
+  87.5
+  88.5
+  89.5

These values are defined as lookups in the package DimensionalData:

julia
lookup(tos, :lon)
Sampled{Float64} ForwardOrdered Regular DimensionalData.Dimensions.Lookups.Points
+wrapping: 1.0:2.0:359.0

which is equivalent to:

julia
tos.lon.val
Sampled{Float64} ForwardOrdered Regular DimensionalData.Dimensions.Lookups.Points
+wrapping: 1.0:2.0:359.0
`,56)]))}const g=a(t,[["render",p]]);export{u as __pageData,g as default}; diff --git a/previews/PR477/assets/UserGuide_types.md.C3SHQpVI.js b/previews/PR477/assets/UserGuide_types.md.C3SHQpVI.js new file mode 100644 index 00000000..2a90a934 --- /dev/null +++ b/previews/PR477/assets/UserGuide_types.md.C3SHQpVI.js @@ -0,0 +1 @@ +import{_ as a,c as t,a2 as r,o as s}from"./chunks/framework.CG45A19l.js";const u=JSON.parse('{"title":"Types","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/types.md","filePath":"UserGuide/types.md","lastUpdated":null}'),o={name:"UserGuide/types.md"};function n(i,e,d,l,c,h){return s(),t("div",null,e[0]||(e[0]=[r('

Types

This section describes the data structures used to work with n-dimensional arrays in YAXArrays.

YAXArray

An Array stores a sequence of ordered elements of the same type usually across multiple dimensions or axes. For example, one can measure temperature across all time points of the time dimension or brightness values of a picture across X and Y dimensions. A one dimensional array is called Vector and a two dimensional array is called a Matrix. In many Machine Learning libraries, arrays are also called tensors. Arrays are designed to store dense spatial-temporal data stored in a grid, whereas a collection of sparse points is usually stored in data frames or relational databases.

A DimArray as defined by DimensionalData.jl adds names to the dimensions and their axes ticks for a given Array. These names can be used to access the data, e.g., by date instead of just by integer position.

A YAXArray is a subtype of a AbstractDimArray and adds functions to load and process the named arrays. For example, it can also handle very large arrays stored on disk that are too big to fit in memory. In addition, it provides functions for parallel computation.

Dataset

A Dataset is an ordered dictionary of YAXArrays that usually share dimensions. For example, it can bundle arrays storing temperature and precipitation that are measured at the same time points and the same locations. One also can store a picture in a Dataset with three arrays containing brightness values for red green and blue, respectively. Internally, those arrays are still separated allowing to chose different element types for each array. Analog to the (NetCDF Data Model)[https://docs.unidata.ucar.edu/netcdf-c/current/netcdf_data_model.html], a Dataset usually represents variables belonging to the same group.

(Data) Cube

A (Data) Cube is just a YAXArray in which arrays from a dataset are combined together by introducing a new dimension containing labels of which array the corresponding element came from. Unlike a Dataset, all arrays must have the same element type to be converted into a cube. This data structure is useful when we want to use all variables at once. For example, the arrays temperature and precipitation which are measured at the same locations and dates can be combined into a single cube. A more formal definition of Data Cubes are given in Mahecha et al. 2020

Dimension

A Dimension or axis as defined by DimensionalData.jl adds tick labels, e.g., to each row or column of an array. It's name is used to access particular subsets of that array.

',12)]))}const p=a(o,[["render",n]]);export{u as __pageData,p as default}; diff --git a/previews/PR477/assets/UserGuide_types.md.C3SHQpVI.lean.js b/previews/PR477/assets/UserGuide_types.md.C3SHQpVI.lean.js new file mode 100644 index 00000000..2a90a934 --- /dev/null +++ b/previews/PR477/assets/UserGuide_types.md.C3SHQpVI.lean.js @@ -0,0 +1 @@ +import{_ as a,c as t,a2 as r,o as s}from"./chunks/framework.CG45A19l.js";const u=JSON.parse('{"title":"Types","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/types.md","filePath":"UserGuide/types.md","lastUpdated":null}'),o={name:"UserGuide/types.md"};function n(i,e,d,l,c,h){return s(),t("div",null,e[0]||(e[0]=[r('

Types

This section describes the data structures used to work with n-dimensional arrays in YAXArrays.

YAXArray

An Array stores a sequence of ordered elements of the same type usually across multiple dimensions or axes. For example, one can measure temperature across all time points of the time dimension or brightness values of a picture across X and Y dimensions. A one dimensional array is called Vector and a two dimensional array is called a Matrix. In many Machine Learning libraries, arrays are also called tensors. Arrays are designed to store dense spatial-temporal data stored in a grid, whereas a collection of sparse points is usually stored in data frames or relational databases.

A DimArray as defined by DimensionalData.jl adds names to the dimensions and their axes ticks for a given Array. These names can be used to access the data, e.g., by date instead of just by integer position.

A YAXArray is a subtype of a AbstractDimArray and adds functions to load and process the named arrays. For example, it can also handle very large arrays stored on disk that are too big to fit in memory. In addition, it provides functions for parallel computation.

Dataset

A Dataset is an ordered dictionary of YAXArrays that usually share dimensions. For example, it can bundle arrays storing temperature and precipitation that are measured at the same time points and the same locations. One also can store a picture in a Dataset with three arrays containing brightness values for red green and blue, respectively. Internally, those arrays are still separated allowing to chose different element types for each array. Analog to the (NetCDF Data Model)[https://docs.unidata.ucar.edu/netcdf-c/current/netcdf_data_model.html], a Dataset usually represents variables belonging to the same group.

(Data) Cube

A (Data) Cube is just a YAXArray in which arrays from a dataset are combined together by introducing a new dimension containing labels of which array the corresponding element came from. Unlike a Dataset, all arrays must have the same element type to be converted into a cube. This data structure is useful when we want to use all variables at once. For example, the arrays temperature and precipitation which are measured at the same locations and dates can be combined into a single cube. A more formal definition of Data Cubes are given in Mahecha et al. 2020

Dimension

A Dimension or axis as defined by DimensionalData.jl adds tick labels, e.g., to each row or column of an array. It's name is used to access particular subsets of that array.

',12)]))}const p=a(o,[["render",n]]);export{u as __pageData,p as default}; diff --git a/previews/PR477/assets/UserGuide_write.md.BM33QlO-.js b/previews/PR477/assets/UserGuide_write.md.BM33QlO-.js new file mode 100644 index 00000000..2cdb00f4 --- /dev/null +++ b/previews/PR477/assets/UserGuide_write.md.BM33QlO-.js @@ -0,0 +1,72 @@ +import{_ as n,c as l,a2 as t,j as i,a,G as p,B as h,o as k}from"./chunks/framework.CG45A19l.js";const v=JSON.parse('{"title":"Write YAXArrays and Datasets","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/write.md","filePath":"UserGuide/write.md","lastUpdated":null}'),d={name:"UserGuide/write.md"},r={class:"jldocstring custom-block",open:""};function o(g,s,c,y,E,u){const e=h("Badge");return k(),l("div",null,[s[6]||(s[6]=t(`

Write YAXArrays and Datasets

Create an example Dataset:

julia
using YAXArrays
+using NetCDF
+using Downloads: download
+
+path = download("https://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc", "example.nc")
+ds = open_dataset(path)
YAXArray Dataset
+Shared Axes: 
+  (↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points)
+
+Variables: 
+tos
+
+Properties: Dict{String, Any}("cmor_version" => 0.96f0, "references" => "Dufresne et al, Journal of Climate, 2015, vol XX, p 136", "realization" => 1, "Conventions" => "CF-1.0", "contact" => "Sebastien Denvil, sebastien.denvil@ipsl.jussieu.fr", "history" => "YYYY/MM/JJ: data generated; YYYY/MM/JJ+1 data transformed  At 16:37:23 on 01/11/2005, CMOR rewrote data to comply with CF standards and IPCC Fourth Assessment requirements", "table_id" => "Table O1 (13 November 2004)", "source" => "IPSL-CM4_v1 (2003) : atmosphere : LMDZ (IPSL-CM4_IPCC, 96x71x19) ; ocean ORCA2 (ipsl_cm4_v1_8, 2x2L31); sea ice LIM (ipsl_cm4_v", "title" => "IPSL  model output prepared for IPCC Fourth Assessment SRES A2 experiment", "experiment_id" => "SRES A2 experiment"…)

Write Zarr

Save a single YAXArray to a directory:

julia
using Zarr
+savecube(ds.tos, "tos.zarr", driver=:zarr)

Save an entire Dataset to a directory:

julia
savedataset(ds, path="ds.zarr", driver=:zarr)

zarr compression

Save a dataset to Zarr format with compression:

julia
n = 9 # compression level, number between 0 (no compression) and 9 (max compression)
+compression = Zarr.BloscCompressor(; clevel=n)
+
+savedataset(ds; path="ds_c.zarr", driver=:zarr, compressor=compression)

More on Zarr Compressors. Also, if you use this option and don't notice a significant improvement, please feel free to open an issue or start a discussion.

Write NetCDF

Save a single YAXArray to a directory:

julia
using NetCDF
+savecube(ds.tos, "tos.nc", driver=:netcdf)

Save an entire Dataset to a directory:

julia
savedataset(ds, path="ds.nc", driver=:netcdf)

netcdf compression

Save a dataset to NetCDF format with compression:

julia
n = 7 # compression level, number between 0 (no compression) and 9 (max compression)
+savedataset(ds, path="ds_c.nc", driver=:netcdf, compress=n)

Comparing it to the default saved file

julia
ds_info = stat("ds.nc")
+ds_c_info = stat("ds_c.nc")
+println("File size: ", "default: ", ds_info.size, " bytes", ", compress: ", ds_c_info.size, " bytes")
File size: default: 2963858 bytes, compress: 1159914 bytes

Overwrite a Dataset

If a path already exists, an error will be thrown. Set overwrite=true to delete the existing dataset

julia
savedataset(ds, path="ds.zarr", driver=:zarr, overwrite=true)

DANGER

Again, setting overwrite will delete all your previous saved data.

Look at the doc string for more information

`,29)),i("details",r,[i("summary",null,[s[0]||(s[0]=i("a",{id:"YAXArrays.Datasets.savedataset",href:"#YAXArrays.Datasets.savedataset"},[i("span",{class:"jlbinding"},"YAXArrays.Datasets.savedataset")],-1)),s[1]||(s[1]=a()),p(e,{type:"info",class:"jlObjectType jlFunction",text:"Function"})]),s[2]||(s[2]=i("p",null,'savedataset(ds::Dataset; path = "", persist = nothing, overwrite = false, append = false, skeleton=false, backend = :all, driver = backend, max_cache = 5e8, writefac=4.0)',-1)),s[3]||(s[3]=i("p",null,[a("Saves a Dataset into a file at "),i("code",null,"path"),a(" with the format given by "),i("code",null,"driver"),a(", i.e., driver=:netcdf or driver=:zarr.")],-1)),s[4]||(s[4]=i("div",{class:"warning custom-block"},[i("p",{class:"custom-block-title"},"Warning"),i("p",null,"overwrite = true, deletes ALL your data and it will create a new file.")],-1)),s[5]||(s[5]=i("p",null,[i("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DatasetAPI/Datasets.jl#L627-L636",target:"_blank",rel:"noreferrer"},"source")],-1))]),s[7]||(s[7]=t(`

Append to a Dataset

New variables can be added to an existing dataset using the append=true keyword.

julia
ds2 = Dataset(z = YAXArray(rand(10,20,5)))
+savedataset(ds2, path="ds.zarr", backend=:zarr, append=true)
julia
julia> open_dataset("ds.zarr", driver=:zarr)
YAXArray Dataset
+Shared Axes:
+None
+Variables with additional axes:
+  Additional Axes: 
+  (lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points)
+  Variables: 
+  tos
+
+  Additional Axes: 
+  (Dim_1 Sampled{Int64} 1:1:10 ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} 1:1:20 ForwardOrdered Regular Points,
+Dim_3 Sampled{Int64} 1:1:5 ForwardOrdered Regular Points)
+  Variables: 
+  z
+
+Properties: Dict{String, Any}("cmor_version" => 0.96, "references" => "Dufresne et al, Journal of Climate, 2015, vol XX, p 136", "realization" => 1, "contact" => "Sebastien Denvil, sebastien.denvil@ipsl.jussieu.fr", "Conventions" => "CF-1.0", "history" => "YYYY/MM/JJ: data generated; YYYY/MM/JJ+1 data transformed  At 16:37:23 on 01/11/2005, CMOR rewrote data to comply with CF standards and IPCC Fourth Assessment requirements", "table_id" => "Table O1 (13 November 2004)", "source" => "IPSL-CM4_v1 (2003) : atmosphere : LMDZ (IPSL-CM4_IPCC, 96x71x19) ; ocean ORCA2 (ipsl_cm4_v1_8, 2x2L31); sea ice LIM (ipsl_cm4_v", "title" => "IPSL  model output prepared for IPCC Fourth Assessment SRES A2 experiment", "experiment_id" => "SRES A2 experiment"…)

Save Skeleton

Sometimes one merely wants to create a datacube "Skeleton" on disk and gradually fill it with data. Here we make use of FillArrays to create a YAXArray and write only the axis data and array metadata to disk, while no actual array data is copied:

julia
using YAXArrays, Zarr, FillArrays

create the Zeros array

julia
julia> a = YAXArray(Zeros(Union{Missing, Float32},  5, 4, 5))
╭───────────────────────────────────────────╮
+5×4×5 YAXArray{Union{Missing, Float32},3}
+├───────────────────────────────────────────┴──────────────────────────── dims ┐
+Dim_1 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(4) ForwardOrdered Regular Points,
+Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 400.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

Now, save to disk with

julia
r = savecube(a, "skeleton.zarr", layername="skeleton", driver=:zarr, skeleton=true, overwrite=true)

WARNING

overwrite=true will delete your previous .zarr file before creating a new one.

Note also that if layername="skeleton" is not provided then the default name for the cube variable will be layer.

Now, we check that all the values are missing

julia
all(ismissing, r[:,:,:])
true

If using FillArrays is not possible, using the zeros function works as well, though it does allocate the array in memory.

INFO

The skeleton argument is also available for savedataset.

Using the toy array defined above we can do

julia
ds = Dataset(skeleton=a) # skeleton will the variable name
YAXArray Dataset
+Shared Axes: 
+  (↓ Dim_1 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(4) ForwardOrdered Regular Points,
+  ↗ Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)
+
+Variables: 
+skeleton
julia
ds_s = savedataset(ds, path="skeleton.zarr", driver=:zarr, skeleton=true, overwrite=true)

Update values of dataset

Now, we show how to start updating the array values. In order to do it we need to open the dataset first with writing w rights as follows:

julia
ds_open = zopen("skeleton.zarr", "w")
+ds_array = ds_open["skeleton"]
ZArray{Float32} of size 5 x 4 x 5

and then we simply update values by indexing them where necessary

julia
ds_array[:,:,1] = rand(Float32, 5, 4) # this will update values directly into disk!
5×4 Matrix{Float32}:
+ 0.720635  0.0188721  0.520406  0.471857
+ 0.882929  0.841123   0.497881  0.959899
+ 0.459041  0.761553   0.367809  0.414041
+ 0.223574  0.898926   0.647957  0.820737
+ 0.457984  0.839919   0.858795  0.1921

we can verify is this working by loading again directly from disk

julia
ds_open = open_dataset("skeleton.zarr")
+ds_array = ds_open["skeleton"]
+ds_array.data[:,:,1]
5×4 Matrix{Union{Missing, Float32}}:
+ 0.720635  0.0188721  0.520406  0.471857
+ 0.882929  0.841123   0.497881  0.959899
+ 0.459041  0.761553   0.367809  0.414041
+ 0.223574  0.898926   0.647957  0.820737
+ 0.457984  0.839919   0.858795  0.1921

indeed, those entries had been updated.

`,35))])}const C=n(d,[["render",o]]);export{v as __pageData,C as default}; diff --git a/previews/PR477/assets/UserGuide_write.md.BM33QlO-.lean.js b/previews/PR477/assets/UserGuide_write.md.BM33QlO-.lean.js new file mode 100644 index 00000000..2cdb00f4 --- /dev/null +++ b/previews/PR477/assets/UserGuide_write.md.BM33QlO-.lean.js @@ -0,0 +1,72 @@ +import{_ as n,c as l,a2 as t,j as i,a,G as p,B as h,o as k}from"./chunks/framework.CG45A19l.js";const v=JSON.parse('{"title":"Write YAXArrays and Datasets","description":"","frontmatter":{},"headers":[],"relativePath":"UserGuide/write.md","filePath":"UserGuide/write.md","lastUpdated":null}'),d={name:"UserGuide/write.md"},r={class:"jldocstring custom-block",open:""};function o(g,s,c,y,E,u){const e=h("Badge");return k(),l("div",null,[s[6]||(s[6]=t(`

Write YAXArrays and Datasets

Create an example Dataset:

julia
using YAXArrays
+using NetCDF
+using Downloads: download
+
+path = download("https://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc", "example.nc")
+ds = open_dataset(path)
YAXArray Dataset
+Shared Axes: 
+  (↓ lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+  → lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+  ↗ Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points)
+
+Variables: 
+tos
+
+Properties: Dict{String, Any}("cmor_version" => 0.96f0, "references" => "Dufresne et al, Journal of Climate, 2015, vol XX, p 136", "realization" => 1, "Conventions" => "CF-1.0", "contact" => "Sebastien Denvil, sebastien.denvil@ipsl.jussieu.fr", "history" => "YYYY/MM/JJ: data generated; YYYY/MM/JJ+1 data transformed  At 16:37:23 on 01/11/2005, CMOR rewrote data to comply with CF standards and IPCC Fourth Assessment requirements", "table_id" => "Table O1 (13 November 2004)", "source" => "IPSL-CM4_v1 (2003) : atmosphere : LMDZ (IPSL-CM4_IPCC, 96x71x19) ; ocean ORCA2 (ipsl_cm4_v1_8, 2x2L31); sea ice LIM (ipsl_cm4_v", "title" => "IPSL  model output prepared for IPCC Fourth Assessment SRES A2 experiment", "experiment_id" => "SRES A2 experiment"…)

Write Zarr

Save a single YAXArray to a directory:

julia
using Zarr
+savecube(ds.tos, "tos.zarr", driver=:zarr)

Save an entire Dataset to a directory:

julia
savedataset(ds, path="ds.zarr", driver=:zarr)

zarr compression

Save a dataset to Zarr format with compression:

julia
n = 9 # compression level, number between 0 (no compression) and 9 (max compression)
+compression = Zarr.BloscCompressor(; clevel=n)
+
+savedataset(ds; path="ds_c.zarr", driver=:zarr, compressor=compression)

More on Zarr Compressors. Also, if you use this option and don't notice a significant improvement, please feel free to open an issue or start a discussion.

Write NetCDF

Save a single YAXArray to a directory:

julia
using NetCDF
+savecube(ds.tos, "tos.nc", driver=:netcdf)

Save an entire Dataset to a directory:

julia
savedataset(ds, path="ds.nc", driver=:netcdf)

netcdf compression

Save a dataset to NetCDF format with compression:

julia
n = 7 # compression level, number between 0 (no compression) and 9 (max compression)
+savedataset(ds, path="ds_c.nc", driver=:netcdf, compress=n)

Comparing it to the default saved file

julia
ds_info = stat("ds.nc")
+ds_c_info = stat("ds_c.nc")
+println("File size: ", "default: ", ds_info.size, " bytes", ", compress: ", ds_c_info.size, " bytes")
File size: default: 2963858 bytes, compress: 1159914 bytes

Overwrite a Dataset

If a path already exists, an error will be thrown. Set overwrite=true to delete the existing dataset

julia
savedataset(ds, path="ds.zarr", driver=:zarr, overwrite=true)

DANGER

Again, setting overwrite will delete all your previous saved data.

Look at the doc string for more information

`,29)),i("details",r,[i("summary",null,[s[0]||(s[0]=i("a",{id:"YAXArrays.Datasets.savedataset",href:"#YAXArrays.Datasets.savedataset"},[i("span",{class:"jlbinding"},"YAXArrays.Datasets.savedataset")],-1)),s[1]||(s[1]=a()),p(e,{type:"info",class:"jlObjectType jlFunction",text:"Function"})]),s[2]||(s[2]=i("p",null,'savedataset(ds::Dataset; path = "", persist = nothing, overwrite = false, append = false, skeleton=false, backend = :all, driver = backend, max_cache = 5e8, writefac=4.0)',-1)),s[3]||(s[3]=i("p",null,[a("Saves a Dataset into a file at "),i("code",null,"path"),a(" with the format given by "),i("code",null,"driver"),a(", i.e., driver=:netcdf or driver=:zarr.")],-1)),s[4]||(s[4]=i("div",{class:"warning custom-block"},[i("p",{class:"custom-block-title"},"Warning"),i("p",null,"overwrite = true, deletes ALL your data and it will create a new file.")],-1)),s[5]||(s[5]=i("p",null,[i("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DatasetAPI/Datasets.jl#L627-L636",target:"_blank",rel:"noreferrer"},"source")],-1))]),s[7]||(s[7]=t(`

Append to a Dataset

New variables can be added to an existing dataset using the append=true keyword.

julia
ds2 = Dataset(z = YAXArray(rand(10,20,5)))
+savedataset(ds2, path="ds.zarr", backend=:zarr, append=true)
julia
julia> open_dataset("ds.zarr", driver=:zarr)
YAXArray Dataset
+Shared Axes:
+None
+Variables with additional axes:
+  Additional Axes: 
+  (lon Sampled{Float64} 1.0:2.0:359.0 ForwardOrdered Regular Points,
+lat Sampled{Float64} -79.5:1.0:89.5 ForwardOrdered Regular Points,
+Ti  Sampled{CFTime.DateTime360Day} [CFTime.DateTime360Day(2001-01-16T00:00:00), …, CFTime.DateTime360Day(2002-12-16T00:00:00)] ForwardOrdered Irregular Points)
+  Variables: 
+  tos
+
+  Additional Axes: 
+  (Dim_1 Sampled{Int64} 1:1:10 ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} 1:1:20 ForwardOrdered Regular Points,
+Dim_3 Sampled{Int64} 1:1:5 ForwardOrdered Regular Points)
+  Variables: 
+  z
+
+Properties: Dict{String, Any}("cmor_version" => 0.96, "references" => "Dufresne et al, Journal of Climate, 2015, vol XX, p 136", "realization" => 1, "contact" => "Sebastien Denvil, sebastien.denvil@ipsl.jussieu.fr", "Conventions" => "CF-1.0", "history" => "YYYY/MM/JJ: data generated; YYYY/MM/JJ+1 data transformed  At 16:37:23 on 01/11/2005, CMOR rewrote data to comply with CF standards and IPCC Fourth Assessment requirements", "table_id" => "Table O1 (13 November 2004)", "source" => "IPSL-CM4_v1 (2003) : atmosphere : LMDZ (IPSL-CM4_IPCC, 96x71x19) ; ocean ORCA2 (ipsl_cm4_v1_8, 2x2L31); sea ice LIM (ipsl_cm4_v", "title" => "IPSL  model output prepared for IPCC Fourth Assessment SRES A2 experiment", "experiment_id" => "SRES A2 experiment"…)

Save Skeleton

Sometimes one merely wants to create a datacube "Skeleton" on disk and gradually fill it with data. Here we make use of FillArrays to create a YAXArray and write only the axis data and array metadata to disk, while no actual array data is copied:

julia
using YAXArrays, Zarr, FillArrays

create the Zeros array

julia
julia> a = YAXArray(Zeros(Union{Missing, Float32},  5, 4, 5))
╭───────────────────────────────────────────╮
+5×4×5 YAXArray{Union{Missing, Float32},3}
+├───────────────────────────────────────────┴──────────────────────────── dims ┐
+Dim_1 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points,
+Dim_2 Sampled{Int64} Base.OneTo(4) ForwardOrdered Regular Points,
+Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points
+├──────────────────────────────────────────────────────────────────── metadata ┤
+  Dict{String, Any}()
+├──────────────────────────────────────────────────────────── loaded in memory ┤
+  data size: 400.0 bytes
+└──────────────────────────────────────────────────────────────────────────────┘

Now, save to disk with

julia
r = savecube(a, "skeleton.zarr", layername="skeleton", driver=:zarr, skeleton=true, overwrite=true)

WARNING

overwrite=true will delete your previous .zarr file before creating a new one.

Note also that if layername="skeleton" is not provided then the default name for the cube variable will be layer.

Now, we check that all the values are missing

julia
all(ismissing, r[:,:,:])
true

If using FillArrays is not possible, using the zeros function works as well, though it does allocate the array in memory.

INFO

The skeleton argument is also available for savedataset.

Using the toy array defined above we can do

julia
ds = Dataset(skeleton=a) # skeleton will the variable name
YAXArray Dataset
+Shared Axes: 
+  (↓ Dim_1 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points,
+  → Dim_2 Sampled{Int64} Base.OneTo(4) ForwardOrdered Regular Points,
+  ↗ Dim_3 Sampled{Int64} Base.OneTo(5) ForwardOrdered Regular Points)
+
+Variables: 
+skeleton
julia
ds_s = savedataset(ds, path="skeleton.zarr", driver=:zarr, skeleton=true, overwrite=true)

Update values of dataset

Now, we show how to start updating the array values. In order to do it we need to open the dataset first with writing w rights as follows:

julia
ds_open = zopen("skeleton.zarr", "w")
+ds_array = ds_open["skeleton"]
ZArray{Float32} of size 5 x 4 x 5

and then we simply update values by indexing them where necessary

julia
ds_array[:,:,1] = rand(Float32, 5, 4) # this will update values directly into disk!
5×4 Matrix{Float32}:
+ 0.720635  0.0188721  0.520406  0.471857
+ 0.882929  0.841123   0.497881  0.959899
+ 0.459041  0.761553   0.367809  0.414041
+ 0.223574  0.898926   0.647957  0.820737
+ 0.457984  0.839919   0.858795  0.1921

we can verify is this working by loading again directly from disk

julia
ds_open = open_dataset("skeleton.zarr")
+ds_array = ds_open["skeleton"]
+ds_array.data[:,:,1]
5×4 Matrix{Union{Missing, Float32}}:
+ 0.720635  0.0188721  0.520406  0.471857
+ 0.882929  0.841123   0.497881  0.959899
+ 0.459041  0.761553   0.367809  0.414041
+ 0.223574  0.898926   0.647957  0.820737
+ 0.457984  0.839919   0.858795  0.1921

indeed, those entries had been updated.

`,35))])}const C=n(d,[["render",o]]);export{v as __pageData,C as default}; diff --git a/previews/PR477/assets/api.md.C6JjwH0h.js b/previews/PR477/assets/api.md.C6JjwH0h.js new file mode 100644 index 00000000..df9f4e1b --- /dev/null +++ b/previews/PR477/assets/api.md.C6JjwH0h.js @@ -0,0 +1,12 @@ +import{_ as n,c as o,j as e,a,G as i,a2 as l,B as r,o as p}from"./chunks/framework.CG45A19l.js";const cs=JSON.parse('{"title":"API Reference","description":"","frontmatter":{},"headers":[],"relativePath":"api.md","filePath":"api.md","lastUpdated":null}'),d={name:"api.md"},u={class:"jldocstring custom-block",open:""},h={class:"jldocstring custom-block",open:""},c={class:"jldocstring custom-block",open:""},b={class:"jldocstring custom-block",open:""},y={class:"jldocstring custom-block",open:""},k={class:"jldocstring custom-block",open:""},g={class:"jldocstring custom-block",open:""},A={class:"jldocstring custom-block",open:""},f={class:"jldocstring custom-block",open:""},m={class:"jldocstring custom-block",open:""},j={class:"jldocstring custom-block",open:""},E={class:"jldocstring custom-block",open:""},C={class:"jldocstring custom-block",open:""},D={class:"jldocstring custom-block",open:""},T={class:"jldocstring custom-block",open:""},v={class:"jldocstring custom-block",open:""},X={class:"jldocstring custom-block",open:""},Y={class:"jldocstring custom-block",open:""},x={class:"jldocstring custom-block",open:""},F={class:"jldocstring custom-block",open:""},w={class:"jldocstring custom-block",open:""},L={class:"jldocstring custom-block",open:""},M={class:"jldocstring custom-block",open:""},B={class:"jldocstring custom-block",open:""},O={class:"jldocstring custom-block",open:""},I={class:"jldocstring custom-block",open:""},J={class:"jldocstring custom-block",open:""},P={class:"jldocstring custom-block",open:""},q={class:"jldocstring custom-block",open:""},z={class:"jldocstring custom-block",open:""},N={class:"jldocstring custom-block",open:""},S={class:"jldocstring custom-block",open:""},R={class:"jldocstring custom-block",open:""},V={class:"jldocstring custom-block",open:""},G={class:"jldocstring custom-block",open:""},W={class:"jldocstring custom-block",open:""},U={class:"jldocstring custom-block",open:""},$={class:"jldocstring custom-block",open:""},H={class:"jldocstring custom-block",open:""},K={class:"jldocstring custom-block",open:""},Z={class:"jldocstring custom-block",open:""},Q={class:"jldocstring custom-block",open:""},_={class:"jldocstring custom-block",open:""},ss={class:"jldocstring custom-block",open:""},es={class:"jldocstring custom-block",open:""},as={class:"jldocstring custom-block",open:""},ts={class:"jldocstring custom-block",open:""},is={class:"jldocstring custom-block",open:""},ls={class:"jldocstring custom-block",open:""};function ns(os,s,rs,ps,ds,us){const t=r("Badge");return p(),o("div",null,[s[165]||(s[165]=e("h1",{id:"API-Reference",tabindex:"-1"},[a("API Reference "),e("a",{class:"header-anchor",href:"#API-Reference","aria-label":'Permalink to "API Reference {#API-Reference}"'},"​")],-1)),s[166]||(s[166]=e("p",null,"This section describes all available functions of this package.",-1)),s[167]||(s[167]=e("h2",{id:"Public-API",tabindex:"-1"},[a("Public API "),e("a",{class:"header-anchor",href:"#Public-API","aria-label":'Permalink to "Public API {#Public-API}"'},"​")],-1)),e("details",u,[e("summary",null,[s[0]||(s[0]=e("a",{id:"YAXArrays.getAxis-Tuple{Any, Any}",href:"#YAXArrays.getAxis-Tuple{Any, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.getAxis")],-1)),s[1]||(s[1]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[2]||(s[2]=l('
julia
getAxis(desc, c)

Given an Axis description and a cube, returns the corresponding axis of the cube. The Axis description can be:

source

',4))]),e("details",h,[e("summary",null,[s[3]||(s[3]=e("a",{id:"YAXArrays.Cubes",href:"#YAXArrays.Cubes"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes")],-1)),s[4]||(s[4]=a()),i(t,{type:"info",class:"jlObjectType jlModule",text:"Module"})]),s[5]||(s[5]=e("p",null,"The functions provided by YAXArrays are supposed to work on different types of cubes. This module defines the interface for all Data types that",-1)),s[6]||(s[6]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/Cubes/Cubes.jl#L1-L4",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",c,[e("summary",null,[s[7]||(s[7]=e("a",{id:"YAXArrays.Cubes.YAXArray",href:"#YAXArrays.Cubes.YAXArray"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.YAXArray")],-1)),s[8]||(s[8]=a()),i(t,{type:"info",class:"jlObjectType jlType",text:"Type"})]),s[9]||(s[9]=l('
julia
YAXArray{T,N}

An array labelled with named axes that have values associated with them. It can wrap normal arrays or, more typically DiskArrays.

Fields

source

',5))]),e("details",b,[e("summary",null,[s[10]||(s[10]=e("a",{id:"YAXArrays.Cubes.caxes",href:"#YAXArrays.Cubes.caxes"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.caxes")],-1)),s[11]||(s[11]=a()),i(t,{type:"info",class:"jlObjectType jlFunction",text:"Function"})]),s[12]||(s[12]=e("p",null,"Returns the axes of a Cube",-1)),s[13]||(s[13]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/Cubes/Cubes.jl#L27",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",y,[e("summary",null,[s[14]||(s[14]=e("a",{id:"YAXArrays.Cubes.caxes-Tuple{DimensionalData.Dimensions.Dimension}",href:"#YAXArrays.Cubes.caxes-Tuple{DimensionalData.Dimensions.Dimension}"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.caxes")],-1)),s[15]||(s[15]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[16]||(s[16]=l('
julia
caxes

Embeds Cube inside a new Cube

source

',3))]),e("details",k,[e("summary",null,[s[17]||(s[17]=e("a",{id:"YAXArrays.Cubes.concatenatecubes-Tuple{Any, DimensionalData.Dimensions.Dimension}",href:"#YAXArrays.Cubes.concatenatecubes-Tuple{Any, DimensionalData.Dimensions.Dimension}"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.concatenatecubes")],-1)),s[18]||(s[18]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[19]||(s[19]=l('
julia
function concatenateCubes(cubelist, cataxis::CategoricalAxis)

Concatenates a vector of datacubes that have identical axes to a new single cube along the new axis cataxis

source

',3))]),e("details",g,[e("summary",null,[s[20]||(s[20]=e("a",{id:"YAXArrays.Cubes.readcubedata-Tuple{Any}",href:"#YAXArrays.Cubes.readcubedata-Tuple{Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.readcubedata")],-1)),s[21]||(s[21]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[22]||(s[22]=l('
julia
readcubedata(cube)

Given any array implementing the YAXArray interface it returns an in-memory YAXArray from it.

source

',3))]),e("details",A,[e("summary",null,[s[23]||(s[23]=e("a",{id:"YAXArrays.Cubes.setchunks-Tuple{YAXArray, Any}",href:"#YAXArrays.Cubes.setchunks-Tuple{YAXArray, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.setchunks")],-1)),s[24]||(s[24]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[25]||(s[25]=l('
julia
setchunks(c::YAXArray,chunks)

Resets the chunks of a YAXArray and returns a new YAXArray. Note that this will not change the chunking of the underlying data itself, it will just make the data "look" like it had a different chunking. If you need a persistent on-disk representation of this chunking, use savecube on the resulting array. The chunks argument can take one of the following forms:

source

',4))]),e("details",f,[e("summary",null,[s[26]||(s[26]=e("a",{id:"YAXArrays.Cubes.subsetcube",href:"#YAXArrays.Cubes.subsetcube"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.subsetcube")],-1)),s[27]||(s[27]=a()),i(t,{type:"info",class:"jlObjectType jlFunction",text:"Function"})]),s[28]||(s[28]=e("p",null,"This function calculates a subset of a cube's data",-1)),s[29]||(s[29]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/Cubes/Cubes.jl#L22-L24",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",m,[e("summary",null,[s[30]||(s[30]=e("a",{id:"YAXArrays.DAT.InDims",href:"#YAXArrays.DAT.InDims"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.InDims")],-1)),s[31]||(s[31]=a()),i(t,{type:"info",class:"jlObjectType jlType",text:"Type"})]),s[32]||(s[32]=l('
julia
InDims(axisdesc...;...)

Creates a description of an Input Data Cube for cube operations. Takes a single or multiple axis descriptions as first arguments. Alternatively a MovingWindow(@ref) struct can be passed to include neighbour slices of one or more axes in the computation. Axes can be specified by their name (String), through an Axis type, or by passing a concrete axis.

Keyword arguments

source

',5))]),e("details",j,[e("summary",null,[s[33]||(s[33]=e("a",{id:"YAXArrays.DAT.MovingWindow",href:"#YAXArrays.DAT.MovingWindow"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.MovingWindow")],-1)),s[34]||(s[34]=a()),i(t,{type:"info",class:"jlObjectType jlType",text:"Type"})]),s[35]||(s[35]=l('
julia
MovingWindow(desc, pre, after)

Constructs a MovingWindow object to be passed to an InDims constructor to define that the axis in desc shall participate in the inner function (i.e. shall be looped over), but inside the inner function pre values before and after values after the center value will be passed as well.

For example passing MovingWindow("Time", 2, 0) will loop over the time axis and always pass the current time step plus the 2 previous steps. So in the inner function the array will have an additional dimension of size 3.

source

',4))]),e("details",E,[e("summary",null,[s[36]||(s[36]=e("a",{id:"YAXArrays.DAT.OutDims-Tuple",href:"#YAXArrays.DAT.OutDims-Tuple"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.OutDims")],-1)),s[37]||(s[37]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[38]||(s[38]=l('
julia
OutDims(axisdesc;...)

Creates a description of an Output Data Cube for cube operations. Takes a single or a Vector/Tuple of axes as first argument. Axes can be specified by their name (String), through an Axis type, or by passing a concrete axis.

source

',4))]),e("details",C,[e("summary",null,[s[39]||(s[39]=e("a",{id:"YAXArrays.DAT.CubeTable-Tuple{}",href:"#YAXArrays.DAT.CubeTable-Tuple{}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.CubeTable")],-1)),s[40]||(s[40]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[41]||(s[41]=l('
julia
CubeTable()

Function to turn a DataCube object into an iterable table. Takes a list of as arguments, specified as a name=cube expression. For example CubeTable(data=cube1,country=cube2) would generate a Table with the entries data and country, where data contains the values of cube1 and country the values of cube2. The cubes are matched and broadcasted along their axes like in mapCube.

source

',3))]),e("details",D,[e("summary",null,[s[42]||(s[42]=e("a",{id:"YAXArrays.DAT.cubefittable-Tuple{Any, Any, Any}",href:"#YAXArrays.DAT.cubefittable-Tuple{Any, Any, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.cubefittable")],-1)),s[43]||(s[43]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[44]||(s[44]=l('
julia
cubefittable(tab,o,fitsym;post=getpostfunction(o),kwargs...)

Executes fittable on the CubeTable tab with the (Weighted-)OnlineStat o, looping through the values specified by fitsym. Finally, writes the results from the TableAggregator to an output data cube.

source

',3))]),e("details",T,[e("summary",null,[s[45]||(s[45]=e("a",{id:"YAXArrays.DAT.fittable-Tuple{YAXArrays.DAT.CubeIterator, Any, Any}",href:"#YAXArrays.DAT.fittable-Tuple{YAXArrays.DAT.CubeIterator, Any, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.fittable")],-1)),s[46]||(s[46]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[47]||(s[47]=l('
julia
fittable(tab,o,fitsym;by=(),weight=nothing)

Loops through an iterable table tab and thereby fitting an OnlineStat o with the values specified through fitsym. Optionally one can specify a field (or tuple) to group by. Any groupby specifier can either be a symbol denoting the entry to group by or an anynymous function calculating the group from a table row.

For example the following would caluclate a weighted mean over a cube weighted by grid cell area and grouped by country and month:

julia
fittable(iter,WeightedMean,:tair,weight=(i->abs(cosd(i.lat))),by=(i->month(i.time),:country))

source

',5))]),e("details",v,[e("summary",null,[s[48]||(s[48]=e("a",{id:"YAXArrays.DAT.mapCube-Tuple{Function, Dataset, Vararg{Any}}",href:"#YAXArrays.DAT.mapCube-Tuple{Function, Dataset, Vararg{Any}}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.mapCube")],-1)),s[49]||(s[49]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[50]||(s[50]=l(`
julia
mapCube(fun, cube, addargs...;kwargs...)
+
+Map a given function \`fun\` over slices of all cubes of the dataset \`ds\`. 
+Use InDims to discribe the input dimensions and OutDims to describe the output dimensions of the function.
+For Datasets, only one output cube can be specified.
+In contrast to the mapCube function for cubes, additional arguments for the inner function should be set as keyword arguments.
+
+For the specific keyword arguments see the docstring of the mapCube function for cubes.

source

`,2))]),e("details",X,[e("summary",null,[s[51]||(s[51]=e("a",{id:"YAXArrays.DAT.mapCube-Tuple{Function, Tuple, Vararg{Any}}",href:"#YAXArrays.DAT.mapCube-Tuple{Function, Tuple, Vararg{Any}}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.mapCube")],-1)),s[52]||(s[52]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[53]||(s[53]=l('
julia
mapCube(fun, cube, addargs...;kwargs...)

Map a given function fun over slices of the data cube cube. The additional arguments addargs will be forwarded to the inner function fun. Use InDims to discribe the input dimensions and OutDims to describe the output dimensions of the function.

Keyword arguments

The first argument is always the function to be applied, the second is the input cube or a tuple of input cubes if needed.

source

',6))]),e("details",Y,[e("summary",null,[s[54]||(s[54]=e("a",{id:"YAXArrays.Datasets.Dataset",href:"#YAXArrays.Datasets.Dataset"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.Dataset")],-1)),s[55]||(s[55]=a()),i(t,{type:"info",class:"jlObjectType jlType",text:"Type"})]),s[56]||(s[56]=l('
julia
Dataset object which stores an `OrderedDict` of YAXArrays with Symbol keys.\na dictionary of CubeAxes and a Dictionary of general properties.\nA dictionary can hold cubes with differing axes. But it will share the common axes between the subcubes.

source

',2))]),e("details",x,[e("summary",null,[s[57]||(s[57]=e("a",{id:"YAXArrays.Datasets.Dataset-Tuple{}",href:"#YAXArrays.Datasets.Dataset-Tuple{}"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.Dataset")],-1)),s[58]||(s[58]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[59]||(s[59]=e("p",null,"Dataset(; properties = Dict{String,Any}, cubes...)",-1)),s[60]||(s[60]=e("p",null,[a("Construct a YAXArray Dataset with global attributes "),e("code",null,"properties"),a(" a and a list of named YAXArrays cubes...")],-1)),s[61]||(s[61]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DatasetAPI/Datasets.jl#L28-L32",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",F,[e("summary",null,[s[62]||(s[62]=e("a",{id:"YAXArrays.Datasets.Cube-Tuple{Dataset}",href:"#YAXArrays.Datasets.Cube-Tuple{Dataset}"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.Cube")],-1)),s[63]||(s[63]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[64]||(s[64]=l('
julia
Cube(ds::Dataset; joinname="Variable")

Construct a single YAXArray from the dataset ds by concatenating the cubes in the datset on the joinname dimension.

source

',3))]),e("details",w,[e("summary",null,[s[65]||(s[65]=e("a",{id:"YAXArrays.Datasets.open_dataset-Tuple{Any}",href:"#YAXArrays.Datasets.open_dataset-Tuple{Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.open_dataset")],-1)),s[66]||(s[66]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[67]||(s[67]=e("p",null,"open_dataset(g; driver=:all)",-1)),s[68]||(s[68]=e("p",null,[a("Open the dataset at "),e("code",null,"g"),a(" with the given "),e("code",null,"driver"),a(". The default driver will search for available drivers and tries to detect the useable driver from the filename extension.")],-1)),s[69]||(s[69]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DatasetAPI/Datasets.jl#L398-L403",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",L,[e("summary",null,[s[70]||(s[70]=e("a",{id:'YAXArrays.Datasets.open_mfdataset-Tuple{DimensionalData.DimVector{var"#s37", D, R, A} where {var"#s37"<:AbstractString, D<:Tuple, R<:Tuple, A<:AbstractVector{var"#s37"}}}',href:'#YAXArrays.Datasets.open_mfdataset-Tuple{DimensionalData.DimVector{var"#s37", D, R, A} where {var"#s37"<:AbstractString, D<:Tuple, R<:Tuple, A<:AbstractVector{var"#s37"}}}'},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.open_mfdataset")],-1)),s[71]||(s[71]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[72]||(s[72]=l(`
julia
open_mfdataset(files::DD.DimVector{<:AbstractString}; kwargs...)

Opens and concatenates a list of dataset paths along the dimension specified in files. This method can be used when the generic glob-based version of open_mfdataset fails or is too slow. For example, to concatenate a list of annual NetCDF files along the Ti dimension, one can use:

julia
files = ["1990.nc","1991.nc","1992.nc"]
+open_mfdataset(DD.DimArray(files,DD.Ti()))

alternatively, if the dimension to concatenate along does not exist yet, the dimension provided in the input arg is used:

julia
files = ["a.nc","b.nc","c.nc"]
+open_mfdataset(DD.DimArray(files,DD.Dim{:NewDim}(["a","b","c"])))

source

`,6))]),e("details",M,[e("summary",null,[s[73]||(s[73]=e("a",{id:"YAXArrays.Datasets.savecube-Tuple{Any, AbstractString}",href:"#YAXArrays.Datasets.savecube-Tuple{Any, AbstractString}"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.savecube")],-1)),s[74]||(s[74]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[75]||(s[75]=l('
julia
savecube(cube,name::String)

Save a YAXArray to the path.

Extended Help

The keyword arguments are:

source

',6))]),e("details",B,[e("summary",null,[s[76]||(s[76]=e("a",{id:"YAXArrays.Datasets.savedataset-Tuple{Dataset}",href:"#YAXArrays.Datasets.savedataset-Tuple{Dataset}"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.savedataset")],-1)),s[77]||(s[77]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[78]||(s[78]=e("p",null,'savedataset(ds::Dataset; path = "", persist = nothing, overwrite = false, append = false, skeleton=false, backend = :all, driver = backend, max_cache = 5e8, writefac=4.0)',-1)),s[79]||(s[79]=e("p",null,[a("Saves a Dataset into a file at "),e("code",null,"path"),a(" with the format given by "),e("code",null,"driver"),a(", i.e., driver=:netcdf or driver=:zarr.")],-1)),s[80]||(s[80]=e("div",{class:"warning custom-block"},[e("p",{class:"custom-block-title"},"Warning"),e("p",null,"overwrite = true, deletes ALL your data and it will create a new file.")],-1)),s[81]||(s[81]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DatasetAPI/Datasets.jl#L627-L636",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",O,[e("summary",null,[s[82]||(s[82]=e("a",{id:"YAXArrays.Datasets.to_dataset-Tuple{Any}",href:"#YAXArrays.Datasets.to_dataset-Tuple{Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.to_dataset")],-1)),s[83]||(s[83]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[84]||(s[84]=e("p",null,'to_dataset(c;datasetaxis = "Variable", layername = "layer")',-1)),s[85]||(s[85]=e("p",null,[a(`Convert a Data Cube into a Dataset. It is possible to treat one of the Cube's axes as a "DatasetAxis" i.e. the cube will be split into different parts that become variables in the Dataset. If no such axis is specified or found, there will only be a single variable in the dataset with the name `),e("code",null,"layername")],-1)),s[86]||(s[86]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DatasetAPI/Datasets.jl#L45-L53",target:"_blank",rel:"noreferrer"},"source")],-1))]),s[168]||(s[168]=e("h2",{id:"Internal-API",tabindex:"-1"},[a("Internal API "),e("a",{class:"header-anchor",href:"#Internal-API","aria-label":'Permalink to "Internal API {#Internal-API}"'},"​")],-1)),e("details",I,[e("summary",null,[s[87]||(s[87]=e("a",{id:"YAXArrays.YAXDefaults",href:"#YAXArrays.YAXDefaults"},[e("span",{class:"jlbinding"},"YAXArrays.YAXDefaults")],-1)),s[88]||(s[88]=a()),i(t,{type:"info",class:"jlObjectType jlConstant",text:"Constant"})]),s[89]||(s[89]=l('

Default configuration for YAXArrays, has the following fields:

source

',3))]),e("details",J,[e("summary",null,[s[90]||(s[90]=e("a",{id:"YAXArrays.findAxis-Tuple{Any, Any}",href:"#YAXArrays.findAxis-Tuple{Any, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.findAxis")],-1)),s[91]||(s[91]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[92]||(s[92]=l('
julia
findAxis(desc, c)

Internal function

Extended Help

Given an Axis description and a cube return the index of the Axis.

The Axis description can be:

source

',7))]),e("details",P,[e("summary",null,[s[93]||(s[93]=e("a",{id:"YAXArrays.getOutAxis-NTuple{5, Any}",href:"#YAXArrays.getOutAxis-NTuple{5, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.getOutAxis")],-1)),s[94]||(s[94]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[95]||(s[95]=l('
julia
getOutAxis

source

',2))]),e("details",q,[e("summary",null,[s[96]||(s[96]=e("a",{id:"YAXArrays.get_descriptor-Tuple{String}",href:"#YAXArrays.get_descriptor-Tuple{String}"},[e("span",{class:"jlbinding"},"YAXArrays.get_descriptor")],-1)),s[97]||(s[97]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[98]||(s[98]=l('
julia
get_descriptor(a)

Get the descriptor of an Axis. This is used to dispatch on the descriptor.

source

',3))]),e("details",z,[e("summary",null,[s[99]||(s[99]=e("a",{id:"YAXArrays.match_axis-Tuple{YAXArrays.ByName, Any}",href:"#YAXArrays.match_axis-Tuple{YAXArrays.ByName, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.match_axis")],-1)),s[100]||(s[100]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[101]||(s[101]=l(`
julia
match_axis

Internal function

Extended Help

Match the Axis based on the AxisDescriptor.
+This is used to find different axes and to make certain axis description the same.
+For example to disregard differences of captialisation.

source

`,5))]),e("details",N,[e("summary",null,[s[102]||(s[102]=e("a",{id:"YAXArrays.Cubes.CleanMe",href:"#YAXArrays.Cubes.CleanMe"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.CleanMe")],-1)),s[103]||(s[103]=a()),i(t,{type:"info",class:"jlObjectType jlType",text:"Type"})]),s[104]||(s[104]=l('
julia
mutable struct CleanMe

Struct which describes data paths and their persistency. Non-persistend paths/files are removed at finalize step

source

',3))]),e("details",S,[e("summary",null,[s[105]||(s[105]=e("a",{id:"YAXArrays.Cubes.clean-Tuple{YAXArrays.Cubes.CleanMe}",href:"#YAXArrays.Cubes.clean-Tuple{YAXArrays.Cubes.CleanMe}"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.clean")],-1)),s[106]||(s[106]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[107]||(s[107]=l('
julia
clean(c::CleanMe)

finalizer function for CleanMe struct. The main process removes all directories/files which are not persistent.

source

',3))]),e("details",R,[e("summary",null,[s[108]||(s[108]=e("a",{id:"YAXArrays.Cubes.copydata-Tuple{Any, Any, Any}",href:"#YAXArrays.Cubes.copydata-Tuple{Any, Any, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.copydata")],-1)),s[109]||(s[109]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[110]||(s[110]=l('
julia
copydata(outar, inar, copybuf)

Internal function which copies the data from the input inar into the output outar at the copybuf positions.

source

',3))]),e("details",V,[e("summary",null,[s[111]||(s[111]=e("a",{id:"YAXArrays.Cubes.optifunc-NTuple{7, Any}",href:"#YAXArrays.Cubes.optifunc-NTuple{7, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.optifunc")],-1)),s[112]||(s[112]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[113]||(s[113]=l('
julia
optifunc(s, maxbuf, incs, outcs, insize, outsize, writefac)

Internal

This function is going to be minimized to detect the best possible chunk setting for the rechunking of the data.

source

',4))]),e("details",G,[e("summary",null,[s[114]||(s[114]=e("a",{id:"YAXArrays.DAT.DATConfig",href:"#YAXArrays.DAT.DATConfig"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.DATConfig")],-1)),s[115]||(s[115]=a()),i(t,{type:"info",class:"jlObjectType jlType",text:"Type"})]),s[116]||(s[116]=l('

Configuration object of a DAT process. This holds all necessary information to perform the calculations. It contains the following fields:

source

',3))]),e("details",W,[e("summary",null,[s[117]||(s[117]=e("a",{id:"YAXArrays.DAT.InputCube",href:"#YAXArrays.DAT.InputCube"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.InputCube")],-1)),s[118]||(s[118]=a()),i(t,{type:"info",class:"jlObjectType jlType",text:"Type"})]),s[119]||(s[119]=l('

Internal representation of an input cube for DAT operations

source

',3))]),e("details",U,[e("summary",null,[s[120]||(s[120]=e("a",{id:"YAXArrays.DAT.OutputCube",href:"#YAXArrays.DAT.OutputCube"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.OutputCube")],-1)),s[121]||(s[121]=a()),i(t,{type:"info",class:"jlObjectType jlType",text:"Type"})]),s[122]||(s[122]=l('

Internal representation of an output cube for DAT operations

Fields

source

',4))]),e("details",$,[e("summary",null,[s[123]||(s[123]=e("a",{id:"YAXArrays.DAT.YAXColumn",href:"#YAXArrays.DAT.YAXColumn"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.YAXColumn")],-1)),s[124]||(s[124]=a()),i(t,{type:"info",class:"jlObjectType jlType",text:"Type"})]),s[125]||(s[125]=l('
julia
YAXColumn

A struct representing a single column of a YAXArray partitioned Table # Fields

source

',4))]),e("details",H,[e("summary",null,[s[126]||(s[126]=e("a",{id:"YAXArrays.DAT.cmpcachmisses-Tuple{Any, Any}",href:"#YAXArrays.DAT.cmpcachmisses-Tuple{Any, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.cmpcachmisses")],-1)),s[127]||(s[127]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[128]||(s[128]=e("p",null,"Function that compares two cache miss specifiers by their importance",-1)),s[129]||(s[129]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DAT/DAT.jl#L957-L959",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",K,[e("summary",null,[s[130]||(s[130]=e("a",{id:"YAXArrays.DAT.getFrontPerm-Tuple{Any, Any}",href:"#YAXArrays.DAT.getFrontPerm-Tuple{Any, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.getFrontPerm")],-1)),s[131]||(s[131]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[132]||(s[132]=e("p",null,"Calculate an axis permutation that brings the wanted dimensions to the front",-1)),s[133]||(s[133]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DAT/DAT.jl#L1202",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",Z,[e("summary",null,[s[134]||(s[134]=e("a",{id:"YAXArrays.DAT.getLoopCacheSize-NTuple{5, Any}",href:"#YAXArrays.DAT.getLoopCacheSize-NTuple{5, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.getLoopCacheSize")],-1)),s[135]||(s[135]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[136]||(s[136]=e("p",null,"Calculate optimal Cache size to DAT operation",-1)),s[137]||(s[137]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DAT/DAT.jl#L1056",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",Q,[e("summary",null,[s[138]||(s[138]=e("a",{id:"YAXArrays.DAT.getOuttype-Tuple{Int64, Any}",href:"#YAXArrays.DAT.getOuttype-Tuple{Int64, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.getOuttype")],-1)),s[139]||(s[139]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[140]||(s[140]=l('
julia
getOuttype(outtype, cdata)

Internal function

Get the element type for the output cube

source

',4))]),e("details",_,[e("summary",null,[s[141]||(s[141]=e("a",{id:"YAXArrays.DAT.getloopchunks-Tuple{YAXArrays.DAT.DATConfig}",href:"#YAXArrays.DAT.getloopchunks-Tuple{YAXArrays.DAT.DATConfig}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.getloopchunks")],-1)),s[142]||(s[142]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[143]||(s[143]=l('
julia
getloopchunks(dc::DATConfig)

Internal function

Returns the chunks that can be looped over toghether for all dimensions.\nThis computation of the size of the chunks is handled by [`DiskArrays.approx_chunksize`](@ref)

source

',4))]),e("details",ss,[e("summary",null,[s[144]||(s[144]=e("a",{id:"YAXArrays.DAT.permuteloopaxes-Tuple{Any}",href:"#YAXArrays.DAT.permuteloopaxes-Tuple{Any}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.permuteloopaxes")],-1)),s[145]||(s[145]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[146]||(s[146]=l('
julia
permuteloopaxes(dc)

Internal function

Permute the dimensions of the cube, so that the axes that are looped through are in the first positions. This is necessary for a faster looping through the data.

source

',4))]),e("details",es,[e("summary",null,[s[147]||(s[147]=e("a",{id:"YAXArrays.Cubes.setchunks-Tuple{Dataset, Any}",href:"#YAXArrays.Cubes.setchunks-Tuple{Dataset, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.setchunks")],-1)),s[148]||(s[148]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[149]||(s[149]=l('
julia
setchunks(c::Dataset,chunks)

Resets the chunks of all or a subset YAXArrays in the dataset and returns a new Dataset. Note that this will not change the chunking of the underlying data itself, it will just make the data "look" like it had a different chunking. If you need a persistent on-disk representation of this chunking, use savedataset on the resulting array. The chunks argument can take one of the following forms:

where a description of the desired variable chunks can take one of the following forms:

source

',6))]),e("details",as,[e("summary",null,[s[150]||(s[150]=e("a",{id:"YAXArrays.Datasets.collectfromhandle-Tuple{Any, Any, Any}",href:"#YAXArrays.Datasets.collectfromhandle-Tuple{Any, Any, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.collectfromhandle")],-1)),s[151]||(s[151]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[152]||(s[152]=e("p",null,"Extracts a YAXArray from a dataset handle that was just created from a arrayinfo",-1)),s[153]||(s[153]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DatasetAPI/Datasets.jl#L533-L535",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",ts,[e("summary",null,[s[154]||(s[154]=e("a",{id:"YAXArrays.Datasets.createdataset-Tuple{Any, Any}",href:"#YAXArrays.Datasets.createdataset-Tuple{Any, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.createdataset")],-1)),s[155]||(s[155]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[156]||(s[156]=l('

function createdataset(DS::Type,axlist; kwargs...)

Creates a new dataset with axes specified in axlist. Each axis must be a subtype of CubeAxis. A new empty Zarr array will be created and can serve as a sink for mapCube operations.

Keyword arguments

source

',6))]),e("details",is,[e("summary",null,[s[157]||(s[157]=e("a",{id:"YAXArrays.Datasets.getarrayinfo-Tuple{Any, Any}",href:"#YAXArrays.Datasets.getarrayinfo-Tuple{Any, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.getarrayinfo")],-1)),s[158]||(s[158]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[159]||(s[159]=e("p",null,"Extract necessary information to create a YAXArrayBase dataset from a name and YAXArray pair",-1)),s[160]||(s[160]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DatasetAPI/Datasets.jl#L502-L504",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",ls,[e("summary",null,[s[161]||(s[161]=e("a",{id:"YAXArrays.Datasets.testrange-Tuple{Any}",href:"#YAXArrays.Datasets.testrange-Tuple{Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.testrange")],-1)),s[162]||(s[162]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[163]||(s[163]=e("p",null,"Test if data in x can be approximated by a step range",-1)),s[164]||(s[164]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DatasetAPI/Datasets.jl#L312",target:"_blank",rel:"noreferrer"},"source")],-1))])])}const bs=n(d,[["render",ns]]);export{cs as __pageData,bs as default}; diff --git a/previews/PR477/assets/api.md.C6JjwH0h.lean.js b/previews/PR477/assets/api.md.C6JjwH0h.lean.js new file mode 100644 index 00000000..df9f4e1b --- /dev/null +++ b/previews/PR477/assets/api.md.C6JjwH0h.lean.js @@ -0,0 +1,12 @@ +import{_ as n,c as o,j as e,a,G as i,a2 as l,B as r,o as p}from"./chunks/framework.CG45A19l.js";const cs=JSON.parse('{"title":"API Reference","description":"","frontmatter":{},"headers":[],"relativePath":"api.md","filePath":"api.md","lastUpdated":null}'),d={name:"api.md"},u={class:"jldocstring custom-block",open:""},h={class:"jldocstring custom-block",open:""},c={class:"jldocstring custom-block",open:""},b={class:"jldocstring custom-block",open:""},y={class:"jldocstring custom-block",open:""},k={class:"jldocstring custom-block",open:""},g={class:"jldocstring custom-block",open:""},A={class:"jldocstring custom-block",open:""},f={class:"jldocstring custom-block",open:""},m={class:"jldocstring custom-block",open:""},j={class:"jldocstring custom-block",open:""},E={class:"jldocstring custom-block",open:""},C={class:"jldocstring custom-block",open:""},D={class:"jldocstring custom-block",open:""},T={class:"jldocstring custom-block",open:""},v={class:"jldocstring custom-block",open:""},X={class:"jldocstring custom-block",open:""},Y={class:"jldocstring custom-block",open:""},x={class:"jldocstring custom-block",open:""},F={class:"jldocstring custom-block",open:""},w={class:"jldocstring custom-block",open:""},L={class:"jldocstring custom-block",open:""},M={class:"jldocstring custom-block",open:""},B={class:"jldocstring custom-block",open:""},O={class:"jldocstring custom-block",open:""},I={class:"jldocstring custom-block",open:""},J={class:"jldocstring custom-block",open:""},P={class:"jldocstring custom-block",open:""},q={class:"jldocstring custom-block",open:""},z={class:"jldocstring custom-block",open:""},N={class:"jldocstring custom-block",open:""},S={class:"jldocstring custom-block",open:""},R={class:"jldocstring custom-block",open:""},V={class:"jldocstring custom-block",open:""},G={class:"jldocstring custom-block",open:""},W={class:"jldocstring custom-block",open:""},U={class:"jldocstring custom-block",open:""},$={class:"jldocstring custom-block",open:""},H={class:"jldocstring custom-block",open:""},K={class:"jldocstring custom-block",open:""},Z={class:"jldocstring custom-block",open:""},Q={class:"jldocstring custom-block",open:""},_={class:"jldocstring custom-block",open:""},ss={class:"jldocstring custom-block",open:""},es={class:"jldocstring custom-block",open:""},as={class:"jldocstring custom-block",open:""},ts={class:"jldocstring custom-block",open:""},is={class:"jldocstring custom-block",open:""},ls={class:"jldocstring custom-block",open:""};function ns(os,s,rs,ps,ds,us){const t=r("Badge");return p(),o("div",null,[s[165]||(s[165]=e("h1",{id:"API-Reference",tabindex:"-1"},[a("API Reference "),e("a",{class:"header-anchor",href:"#API-Reference","aria-label":'Permalink to "API Reference {#API-Reference}"'},"​")],-1)),s[166]||(s[166]=e("p",null,"This section describes all available functions of this package.",-1)),s[167]||(s[167]=e("h2",{id:"Public-API",tabindex:"-1"},[a("Public API "),e("a",{class:"header-anchor",href:"#Public-API","aria-label":'Permalink to "Public API {#Public-API}"'},"​")],-1)),e("details",u,[e("summary",null,[s[0]||(s[0]=e("a",{id:"YAXArrays.getAxis-Tuple{Any, Any}",href:"#YAXArrays.getAxis-Tuple{Any, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.getAxis")],-1)),s[1]||(s[1]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[2]||(s[2]=l('
julia
getAxis(desc, c)

Given an Axis description and a cube, returns the corresponding axis of the cube. The Axis description can be:

source

',4))]),e("details",h,[e("summary",null,[s[3]||(s[3]=e("a",{id:"YAXArrays.Cubes",href:"#YAXArrays.Cubes"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes")],-1)),s[4]||(s[4]=a()),i(t,{type:"info",class:"jlObjectType jlModule",text:"Module"})]),s[5]||(s[5]=e("p",null,"The functions provided by YAXArrays are supposed to work on different types of cubes. This module defines the interface for all Data types that",-1)),s[6]||(s[6]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/Cubes/Cubes.jl#L1-L4",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",c,[e("summary",null,[s[7]||(s[7]=e("a",{id:"YAXArrays.Cubes.YAXArray",href:"#YAXArrays.Cubes.YAXArray"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.YAXArray")],-1)),s[8]||(s[8]=a()),i(t,{type:"info",class:"jlObjectType jlType",text:"Type"})]),s[9]||(s[9]=l('
julia
YAXArray{T,N}

An array labelled with named axes that have values associated with them. It can wrap normal arrays or, more typically DiskArrays.

Fields

source

',5))]),e("details",b,[e("summary",null,[s[10]||(s[10]=e("a",{id:"YAXArrays.Cubes.caxes",href:"#YAXArrays.Cubes.caxes"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.caxes")],-1)),s[11]||(s[11]=a()),i(t,{type:"info",class:"jlObjectType jlFunction",text:"Function"})]),s[12]||(s[12]=e("p",null,"Returns the axes of a Cube",-1)),s[13]||(s[13]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/Cubes/Cubes.jl#L27",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",y,[e("summary",null,[s[14]||(s[14]=e("a",{id:"YAXArrays.Cubes.caxes-Tuple{DimensionalData.Dimensions.Dimension}",href:"#YAXArrays.Cubes.caxes-Tuple{DimensionalData.Dimensions.Dimension}"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.caxes")],-1)),s[15]||(s[15]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[16]||(s[16]=l('
julia
caxes

Embeds Cube inside a new Cube

source

',3))]),e("details",k,[e("summary",null,[s[17]||(s[17]=e("a",{id:"YAXArrays.Cubes.concatenatecubes-Tuple{Any, DimensionalData.Dimensions.Dimension}",href:"#YAXArrays.Cubes.concatenatecubes-Tuple{Any, DimensionalData.Dimensions.Dimension}"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.concatenatecubes")],-1)),s[18]||(s[18]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[19]||(s[19]=l('
julia
function concatenateCubes(cubelist, cataxis::CategoricalAxis)

Concatenates a vector of datacubes that have identical axes to a new single cube along the new axis cataxis

source

',3))]),e("details",g,[e("summary",null,[s[20]||(s[20]=e("a",{id:"YAXArrays.Cubes.readcubedata-Tuple{Any}",href:"#YAXArrays.Cubes.readcubedata-Tuple{Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.readcubedata")],-1)),s[21]||(s[21]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[22]||(s[22]=l('
julia
readcubedata(cube)

Given any array implementing the YAXArray interface it returns an in-memory YAXArray from it.

source

',3))]),e("details",A,[e("summary",null,[s[23]||(s[23]=e("a",{id:"YAXArrays.Cubes.setchunks-Tuple{YAXArray, Any}",href:"#YAXArrays.Cubes.setchunks-Tuple{YAXArray, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.setchunks")],-1)),s[24]||(s[24]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[25]||(s[25]=l('
julia
setchunks(c::YAXArray,chunks)

Resets the chunks of a YAXArray and returns a new YAXArray. Note that this will not change the chunking of the underlying data itself, it will just make the data "look" like it had a different chunking. If you need a persistent on-disk representation of this chunking, use savecube on the resulting array. The chunks argument can take one of the following forms:

source

',4))]),e("details",f,[e("summary",null,[s[26]||(s[26]=e("a",{id:"YAXArrays.Cubes.subsetcube",href:"#YAXArrays.Cubes.subsetcube"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.subsetcube")],-1)),s[27]||(s[27]=a()),i(t,{type:"info",class:"jlObjectType jlFunction",text:"Function"})]),s[28]||(s[28]=e("p",null,"This function calculates a subset of a cube's data",-1)),s[29]||(s[29]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/Cubes/Cubes.jl#L22-L24",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",m,[e("summary",null,[s[30]||(s[30]=e("a",{id:"YAXArrays.DAT.InDims",href:"#YAXArrays.DAT.InDims"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.InDims")],-1)),s[31]||(s[31]=a()),i(t,{type:"info",class:"jlObjectType jlType",text:"Type"})]),s[32]||(s[32]=l('
julia
InDims(axisdesc...;...)

Creates a description of an Input Data Cube for cube operations. Takes a single or multiple axis descriptions as first arguments. Alternatively a MovingWindow(@ref) struct can be passed to include neighbour slices of one or more axes in the computation. Axes can be specified by their name (String), through an Axis type, or by passing a concrete axis.

Keyword arguments

source

',5))]),e("details",j,[e("summary",null,[s[33]||(s[33]=e("a",{id:"YAXArrays.DAT.MovingWindow",href:"#YAXArrays.DAT.MovingWindow"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.MovingWindow")],-1)),s[34]||(s[34]=a()),i(t,{type:"info",class:"jlObjectType jlType",text:"Type"})]),s[35]||(s[35]=l('
julia
MovingWindow(desc, pre, after)

Constructs a MovingWindow object to be passed to an InDims constructor to define that the axis in desc shall participate in the inner function (i.e. shall be looped over), but inside the inner function pre values before and after values after the center value will be passed as well.

For example passing MovingWindow("Time", 2, 0) will loop over the time axis and always pass the current time step plus the 2 previous steps. So in the inner function the array will have an additional dimension of size 3.

source

',4))]),e("details",E,[e("summary",null,[s[36]||(s[36]=e("a",{id:"YAXArrays.DAT.OutDims-Tuple",href:"#YAXArrays.DAT.OutDims-Tuple"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.OutDims")],-1)),s[37]||(s[37]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[38]||(s[38]=l('
julia
OutDims(axisdesc;...)

Creates a description of an Output Data Cube for cube operations. Takes a single or a Vector/Tuple of axes as first argument. Axes can be specified by their name (String), through an Axis type, or by passing a concrete axis.

source

',4))]),e("details",C,[e("summary",null,[s[39]||(s[39]=e("a",{id:"YAXArrays.DAT.CubeTable-Tuple{}",href:"#YAXArrays.DAT.CubeTable-Tuple{}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.CubeTable")],-1)),s[40]||(s[40]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[41]||(s[41]=l('
julia
CubeTable()

Function to turn a DataCube object into an iterable table. Takes a list of as arguments, specified as a name=cube expression. For example CubeTable(data=cube1,country=cube2) would generate a Table with the entries data and country, where data contains the values of cube1 and country the values of cube2. The cubes are matched and broadcasted along their axes like in mapCube.

source

',3))]),e("details",D,[e("summary",null,[s[42]||(s[42]=e("a",{id:"YAXArrays.DAT.cubefittable-Tuple{Any, Any, Any}",href:"#YAXArrays.DAT.cubefittable-Tuple{Any, Any, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.cubefittable")],-1)),s[43]||(s[43]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[44]||(s[44]=l('
julia
cubefittable(tab,o,fitsym;post=getpostfunction(o),kwargs...)

Executes fittable on the CubeTable tab with the (Weighted-)OnlineStat o, looping through the values specified by fitsym. Finally, writes the results from the TableAggregator to an output data cube.

source

',3))]),e("details",T,[e("summary",null,[s[45]||(s[45]=e("a",{id:"YAXArrays.DAT.fittable-Tuple{YAXArrays.DAT.CubeIterator, Any, Any}",href:"#YAXArrays.DAT.fittable-Tuple{YAXArrays.DAT.CubeIterator, Any, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.fittable")],-1)),s[46]||(s[46]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[47]||(s[47]=l('
julia
fittable(tab,o,fitsym;by=(),weight=nothing)

Loops through an iterable table tab and thereby fitting an OnlineStat o with the values specified through fitsym. Optionally one can specify a field (or tuple) to group by. Any groupby specifier can either be a symbol denoting the entry to group by or an anynymous function calculating the group from a table row.

For example the following would caluclate a weighted mean over a cube weighted by grid cell area and grouped by country and month:

julia
fittable(iter,WeightedMean,:tair,weight=(i->abs(cosd(i.lat))),by=(i->month(i.time),:country))

source

',5))]),e("details",v,[e("summary",null,[s[48]||(s[48]=e("a",{id:"YAXArrays.DAT.mapCube-Tuple{Function, Dataset, Vararg{Any}}",href:"#YAXArrays.DAT.mapCube-Tuple{Function, Dataset, Vararg{Any}}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.mapCube")],-1)),s[49]||(s[49]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[50]||(s[50]=l(`
julia
mapCube(fun, cube, addargs...;kwargs...)
+
+Map a given function \`fun\` over slices of all cubes of the dataset \`ds\`. 
+Use InDims to discribe the input dimensions and OutDims to describe the output dimensions of the function.
+For Datasets, only one output cube can be specified.
+In contrast to the mapCube function for cubes, additional arguments for the inner function should be set as keyword arguments.
+
+For the specific keyword arguments see the docstring of the mapCube function for cubes.

source

`,2))]),e("details",X,[e("summary",null,[s[51]||(s[51]=e("a",{id:"YAXArrays.DAT.mapCube-Tuple{Function, Tuple, Vararg{Any}}",href:"#YAXArrays.DAT.mapCube-Tuple{Function, Tuple, Vararg{Any}}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.mapCube")],-1)),s[52]||(s[52]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[53]||(s[53]=l('
julia
mapCube(fun, cube, addargs...;kwargs...)

Map a given function fun over slices of the data cube cube. The additional arguments addargs will be forwarded to the inner function fun. Use InDims to discribe the input dimensions and OutDims to describe the output dimensions of the function.

Keyword arguments

The first argument is always the function to be applied, the second is the input cube or a tuple of input cubes if needed.

source

',6))]),e("details",Y,[e("summary",null,[s[54]||(s[54]=e("a",{id:"YAXArrays.Datasets.Dataset",href:"#YAXArrays.Datasets.Dataset"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.Dataset")],-1)),s[55]||(s[55]=a()),i(t,{type:"info",class:"jlObjectType jlType",text:"Type"})]),s[56]||(s[56]=l('
julia
Dataset object which stores an `OrderedDict` of YAXArrays with Symbol keys.\na dictionary of CubeAxes and a Dictionary of general properties.\nA dictionary can hold cubes with differing axes. But it will share the common axes between the subcubes.

source

',2))]),e("details",x,[e("summary",null,[s[57]||(s[57]=e("a",{id:"YAXArrays.Datasets.Dataset-Tuple{}",href:"#YAXArrays.Datasets.Dataset-Tuple{}"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.Dataset")],-1)),s[58]||(s[58]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[59]||(s[59]=e("p",null,"Dataset(; properties = Dict{String,Any}, cubes...)",-1)),s[60]||(s[60]=e("p",null,[a("Construct a YAXArray Dataset with global attributes "),e("code",null,"properties"),a(" a and a list of named YAXArrays cubes...")],-1)),s[61]||(s[61]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DatasetAPI/Datasets.jl#L28-L32",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",F,[e("summary",null,[s[62]||(s[62]=e("a",{id:"YAXArrays.Datasets.Cube-Tuple{Dataset}",href:"#YAXArrays.Datasets.Cube-Tuple{Dataset}"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.Cube")],-1)),s[63]||(s[63]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[64]||(s[64]=l('
julia
Cube(ds::Dataset; joinname="Variable")

Construct a single YAXArray from the dataset ds by concatenating the cubes in the datset on the joinname dimension.

source

',3))]),e("details",w,[e("summary",null,[s[65]||(s[65]=e("a",{id:"YAXArrays.Datasets.open_dataset-Tuple{Any}",href:"#YAXArrays.Datasets.open_dataset-Tuple{Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.open_dataset")],-1)),s[66]||(s[66]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[67]||(s[67]=e("p",null,"open_dataset(g; driver=:all)",-1)),s[68]||(s[68]=e("p",null,[a("Open the dataset at "),e("code",null,"g"),a(" with the given "),e("code",null,"driver"),a(". The default driver will search for available drivers and tries to detect the useable driver from the filename extension.")],-1)),s[69]||(s[69]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DatasetAPI/Datasets.jl#L398-L403",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",L,[e("summary",null,[s[70]||(s[70]=e("a",{id:'YAXArrays.Datasets.open_mfdataset-Tuple{DimensionalData.DimVector{var"#s37", D, R, A} where {var"#s37"<:AbstractString, D<:Tuple, R<:Tuple, A<:AbstractVector{var"#s37"}}}',href:'#YAXArrays.Datasets.open_mfdataset-Tuple{DimensionalData.DimVector{var"#s37", D, R, A} where {var"#s37"<:AbstractString, D<:Tuple, R<:Tuple, A<:AbstractVector{var"#s37"}}}'},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.open_mfdataset")],-1)),s[71]||(s[71]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[72]||(s[72]=l(`
julia
open_mfdataset(files::DD.DimVector{<:AbstractString}; kwargs...)

Opens and concatenates a list of dataset paths along the dimension specified in files. This method can be used when the generic glob-based version of open_mfdataset fails or is too slow. For example, to concatenate a list of annual NetCDF files along the Ti dimension, one can use:

julia
files = ["1990.nc","1991.nc","1992.nc"]
+open_mfdataset(DD.DimArray(files,DD.Ti()))

alternatively, if the dimension to concatenate along does not exist yet, the dimension provided in the input arg is used:

julia
files = ["a.nc","b.nc","c.nc"]
+open_mfdataset(DD.DimArray(files,DD.Dim{:NewDim}(["a","b","c"])))

source

`,6))]),e("details",M,[e("summary",null,[s[73]||(s[73]=e("a",{id:"YAXArrays.Datasets.savecube-Tuple{Any, AbstractString}",href:"#YAXArrays.Datasets.savecube-Tuple{Any, AbstractString}"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.savecube")],-1)),s[74]||(s[74]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[75]||(s[75]=l('
julia
savecube(cube,name::String)

Save a YAXArray to the path.

Extended Help

The keyword arguments are:

source

',6))]),e("details",B,[e("summary",null,[s[76]||(s[76]=e("a",{id:"YAXArrays.Datasets.savedataset-Tuple{Dataset}",href:"#YAXArrays.Datasets.savedataset-Tuple{Dataset}"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.savedataset")],-1)),s[77]||(s[77]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[78]||(s[78]=e("p",null,'savedataset(ds::Dataset; path = "", persist = nothing, overwrite = false, append = false, skeleton=false, backend = :all, driver = backend, max_cache = 5e8, writefac=4.0)',-1)),s[79]||(s[79]=e("p",null,[a("Saves a Dataset into a file at "),e("code",null,"path"),a(" with the format given by "),e("code",null,"driver"),a(", i.e., driver=:netcdf or driver=:zarr.")],-1)),s[80]||(s[80]=e("div",{class:"warning custom-block"},[e("p",{class:"custom-block-title"},"Warning"),e("p",null,"overwrite = true, deletes ALL your data and it will create a new file.")],-1)),s[81]||(s[81]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DatasetAPI/Datasets.jl#L627-L636",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",O,[e("summary",null,[s[82]||(s[82]=e("a",{id:"YAXArrays.Datasets.to_dataset-Tuple{Any}",href:"#YAXArrays.Datasets.to_dataset-Tuple{Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.to_dataset")],-1)),s[83]||(s[83]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[84]||(s[84]=e("p",null,'to_dataset(c;datasetaxis = "Variable", layername = "layer")',-1)),s[85]||(s[85]=e("p",null,[a(`Convert a Data Cube into a Dataset. It is possible to treat one of the Cube's axes as a "DatasetAxis" i.e. the cube will be split into different parts that become variables in the Dataset. If no such axis is specified or found, there will only be a single variable in the dataset with the name `),e("code",null,"layername")],-1)),s[86]||(s[86]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DatasetAPI/Datasets.jl#L45-L53",target:"_blank",rel:"noreferrer"},"source")],-1))]),s[168]||(s[168]=e("h2",{id:"Internal-API",tabindex:"-1"},[a("Internal API "),e("a",{class:"header-anchor",href:"#Internal-API","aria-label":'Permalink to "Internal API {#Internal-API}"'},"​")],-1)),e("details",I,[e("summary",null,[s[87]||(s[87]=e("a",{id:"YAXArrays.YAXDefaults",href:"#YAXArrays.YAXDefaults"},[e("span",{class:"jlbinding"},"YAXArrays.YAXDefaults")],-1)),s[88]||(s[88]=a()),i(t,{type:"info",class:"jlObjectType jlConstant",text:"Constant"})]),s[89]||(s[89]=l('

Default configuration for YAXArrays, has the following fields:

source

',3))]),e("details",J,[e("summary",null,[s[90]||(s[90]=e("a",{id:"YAXArrays.findAxis-Tuple{Any, Any}",href:"#YAXArrays.findAxis-Tuple{Any, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.findAxis")],-1)),s[91]||(s[91]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[92]||(s[92]=l('
julia
findAxis(desc, c)

Internal function

Extended Help

Given an Axis description and a cube return the index of the Axis.

The Axis description can be:

source

',7))]),e("details",P,[e("summary",null,[s[93]||(s[93]=e("a",{id:"YAXArrays.getOutAxis-NTuple{5, Any}",href:"#YAXArrays.getOutAxis-NTuple{5, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.getOutAxis")],-1)),s[94]||(s[94]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[95]||(s[95]=l('
julia
getOutAxis

source

',2))]),e("details",q,[e("summary",null,[s[96]||(s[96]=e("a",{id:"YAXArrays.get_descriptor-Tuple{String}",href:"#YAXArrays.get_descriptor-Tuple{String}"},[e("span",{class:"jlbinding"},"YAXArrays.get_descriptor")],-1)),s[97]||(s[97]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[98]||(s[98]=l('
julia
get_descriptor(a)

Get the descriptor of an Axis. This is used to dispatch on the descriptor.

source

',3))]),e("details",z,[e("summary",null,[s[99]||(s[99]=e("a",{id:"YAXArrays.match_axis-Tuple{YAXArrays.ByName, Any}",href:"#YAXArrays.match_axis-Tuple{YAXArrays.ByName, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.match_axis")],-1)),s[100]||(s[100]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[101]||(s[101]=l(`
julia
match_axis

Internal function

Extended Help

Match the Axis based on the AxisDescriptor.
+This is used to find different axes and to make certain axis description the same.
+For example to disregard differences of captialisation.

source

`,5))]),e("details",N,[e("summary",null,[s[102]||(s[102]=e("a",{id:"YAXArrays.Cubes.CleanMe",href:"#YAXArrays.Cubes.CleanMe"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.CleanMe")],-1)),s[103]||(s[103]=a()),i(t,{type:"info",class:"jlObjectType jlType",text:"Type"})]),s[104]||(s[104]=l('
julia
mutable struct CleanMe

Struct which describes data paths and their persistency. Non-persistend paths/files are removed at finalize step

source

',3))]),e("details",S,[e("summary",null,[s[105]||(s[105]=e("a",{id:"YAXArrays.Cubes.clean-Tuple{YAXArrays.Cubes.CleanMe}",href:"#YAXArrays.Cubes.clean-Tuple{YAXArrays.Cubes.CleanMe}"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.clean")],-1)),s[106]||(s[106]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[107]||(s[107]=l('
julia
clean(c::CleanMe)

finalizer function for CleanMe struct. The main process removes all directories/files which are not persistent.

source

',3))]),e("details",R,[e("summary",null,[s[108]||(s[108]=e("a",{id:"YAXArrays.Cubes.copydata-Tuple{Any, Any, Any}",href:"#YAXArrays.Cubes.copydata-Tuple{Any, Any, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.copydata")],-1)),s[109]||(s[109]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[110]||(s[110]=l('
julia
copydata(outar, inar, copybuf)

Internal function which copies the data from the input inar into the output outar at the copybuf positions.

source

',3))]),e("details",V,[e("summary",null,[s[111]||(s[111]=e("a",{id:"YAXArrays.Cubes.optifunc-NTuple{7, Any}",href:"#YAXArrays.Cubes.optifunc-NTuple{7, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.optifunc")],-1)),s[112]||(s[112]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[113]||(s[113]=l('
julia
optifunc(s, maxbuf, incs, outcs, insize, outsize, writefac)

Internal

This function is going to be minimized to detect the best possible chunk setting for the rechunking of the data.

source

',4))]),e("details",G,[e("summary",null,[s[114]||(s[114]=e("a",{id:"YAXArrays.DAT.DATConfig",href:"#YAXArrays.DAT.DATConfig"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.DATConfig")],-1)),s[115]||(s[115]=a()),i(t,{type:"info",class:"jlObjectType jlType",text:"Type"})]),s[116]||(s[116]=l('

Configuration object of a DAT process. This holds all necessary information to perform the calculations. It contains the following fields:

source

',3))]),e("details",W,[e("summary",null,[s[117]||(s[117]=e("a",{id:"YAXArrays.DAT.InputCube",href:"#YAXArrays.DAT.InputCube"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.InputCube")],-1)),s[118]||(s[118]=a()),i(t,{type:"info",class:"jlObjectType jlType",text:"Type"})]),s[119]||(s[119]=l('

Internal representation of an input cube for DAT operations

source

',3))]),e("details",U,[e("summary",null,[s[120]||(s[120]=e("a",{id:"YAXArrays.DAT.OutputCube",href:"#YAXArrays.DAT.OutputCube"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.OutputCube")],-1)),s[121]||(s[121]=a()),i(t,{type:"info",class:"jlObjectType jlType",text:"Type"})]),s[122]||(s[122]=l('

Internal representation of an output cube for DAT operations

Fields

source

',4))]),e("details",$,[e("summary",null,[s[123]||(s[123]=e("a",{id:"YAXArrays.DAT.YAXColumn",href:"#YAXArrays.DAT.YAXColumn"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.YAXColumn")],-1)),s[124]||(s[124]=a()),i(t,{type:"info",class:"jlObjectType jlType",text:"Type"})]),s[125]||(s[125]=l('
julia
YAXColumn

A struct representing a single column of a YAXArray partitioned Table # Fields

source

',4))]),e("details",H,[e("summary",null,[s[126]||(s[126]=e("a",{id:"YAXArrays.DAT.cmpcachmisses-Tuple{Any, Any}",href:"#YAXArrays.DAT.cmpcachmisses-Tuple{Any, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.cmpcachmisses")],-1)),s[127]||(s[127]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[128]||(s[128]=e("p",null,"Function that compares two cache miss specifiers by their importance",-1)),s[129]||(s[129]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DAT/DAT.jl#L957-L959",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",K,[e("summary",null,[s[130]||(s[130]=e("a",{id:"YAXArrays.DAT.getFrontPerm-Tuple{Any, Any}",href:"#YAXArrays.DAT.getFrontPerm-Tuple{Any, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.getFrontPerm")],-1)),s[131]||(s[131]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[132]||(s[132]=e("p",null,"Calculate an axis permutation that brings the wanted dimensions to the front",-1)),s[133]||(s[133]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DAT/DAT.jl#L1202",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",Z,[e("summary",null,[s[134]||(s[134]=e("a",{id:"YAXArrays.DAT.getLoopCacheSize-NTuple{5, Any}",href:"#YAXArrays.DAT.getLoopCacheSize-NTuple{5, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.getLoopCacheSize")],-1)),s[135]||(s[135]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[136]||(s[136]=e("p",null,"Calculate optimal Cache size to DAT operation",-1)),s[137]||(s[137]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DAT/DAT.jl#L1056",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",Q,[e("summary",null,[s[138]||(s[138]=e("a",{id:"YAXArrays.DAT.getOuttype-Tuple{Int64, Any}",href:"#YAXArrays.DAT.getOuttype-Tuple{Int64, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.getOuttype")],-1)),s[139]||(s[139]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[140]||(s[140]=l('
julia
getOuttype(outtype, cdata)

Internal function

Get the element type for the output cube

source

',4))]),e("details",_,[e("summary",null,[s[141]||(s[141]=e("a",{id:"YAXArrays.DAT.getloopchunks-Tuple{YAXArrays.DAT.DATConfig}",href:"#YAXArrays.DAT.getloopchunks-Tuple{YAXArrays.DAT.DATConfig}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.getloopchunks")],-1)),s[142]||(s[142]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[143]||(s[143]=l('
julia
getloopchunks(dc::DATConfig)

Internal function

Returns the chunks that can be looped over toghether for all dimensions.\nThis computation of the size of the chunks is handled by [`DiskArrays.approx_chunksize`](@ref)

source

',4))]),e("details",ss,[e("summary",null,[s[144]||(s[144]=e("a",{id:"YAXArrays.DAT.permuteloopaxes-Tuple{Any}",href:"#YAXArrays.DAT.permuteloopaxes-Tuple{Any}"},[e("span",{class:"jlbinding"},"YAXArrays.DAT.permuteloopaxes")],-1)),s[145]||(s[145]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[146]||(s[146]=l('
julia
permuteloopaxes(dc)

Internal function

Permute the dimensions of the cube, so that the axes that are looped through are in the first positions. This is necessary for a faster looping through the data.

source

',4))]),e("details",es,[e("summary",null,[s[147]||(s[147]=e("a",{id:"YAXArrays.Cubes.setchunks-Tuple{Dataset, Any}",href:"#YAXArrays.Cubes.setchunks-Tuple{Dataset, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Cubes.setchunks")],-1)),s[148]||(s[148]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[149]||(s[149]=l('
julia
setchunks(c::Dataset,chunks)

Resets the chunks of all or a subset YAXArrays in the dataset and returns a new Dataset. Note that this will not change the chunking of the underlying data itself, it will just make the data "look" like it had a different chunking. If you need a persistent on-disk representation of this chunking, use savedataset on the resulting array. The chunks argument can take one of the following forms:

where a description of the desired variable chunks can take one of the following forms:

source

',6))]),e("details",as,[e("summary",null,[s[150]||(s[150]=e("a",{id:"YAXArrays.Datasets.collectfromhandle-Tuple{Any, Any, Any}",href:"#YAXArrays.Datasets.collectfromhandle-Tuple{Any, Any, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.collectfromhandle")],-1)),s[151]||(s[151]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[152]||(s[152]=e("p",null,"Extracts a YAXArray from a dataset handle that was just created from a arrayinfo",-1)),s[153]||(s[153]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DatasetAPI/Datasets.jl#L533-L535",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",ts,[e("summary",null,[s[154]||(s[154]=e("a",{id:"YAXArrays.Datasets.createdataset-Tuple{Any, Any}",href:"#YAXArrays.Datasets.createdataset-Tuple{Any, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.createdataset")],-1)),s[155]||(s[155]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[156]||(s[156]=l('

function createdataset(DS::Type,axlist; kwargs...)

Creates a new dataset with axes specified in axlist. Each axis must be a subtype of CubeAxis. A new empty Zarr array will be created and can serve as a sink for mapCube operations.

Keyword arguments

source

',6))]),e("details",is,[e("summary",null,[s[157]||(s[157]=e("a",{id:"YAXArrays.Datasets.getarrayinfo-Tuple{Any, Any}",href:"#YAXArrays.Datasets.getarrayinfo-Tuple{Any, Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.getarrayinfo")],-1)),s[158]||(s[158]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[159]||(s[159]=e("p",null,"Extract necessary information to create a YAXArrayBase dataset from a name and YAXArray pair",-1)),s[160]||(s[160]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DatasetAPI/Datasets.jl#L502-L504",target:"_blank",rel:"noreferrer"},"source")],-1))]),e("details",ls,[e("summary",null,[s[161]||(s[161]=e("a",{id:"YAXArrays.Datasets.testrange-Tuple{Any}",href:"#YAXArrays.Datasets.testrange-Tuple{Any}"},[e("span",{class:"jlbinding"},"YAXArrays.Datasets.testrange")],-1)),s[162]||(s[162]=a()),i(t,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),s[163]||(s[163]=e("p",null,"Test if data in x can be approximated by a step range",-1)),s[164]||(s[164]=e("p",null,[e("a",{href:"https://github.com/JuliaDataCubes/YAXArrays.jl/blob/54d5b022f2443b17373baef589b00a4bac572455/src/DatasetAPI/Datasets.jl#L312",target:"_blank",rel:"noreferrer"},"source")],-1))])])}const bs=n(d,[["render",ns]]);export{cs as __pageData,bs as default}; diff --git a/previews/PR477/assets/app.rVAEYvbf.js b/previews/PR477/assets/app.rVAEYvbf.js new file mode 100644 index 00000000..6b79c60a --- /dev/null +++ b/previews/PR477/assets/app.rVAEYvbf.js @@ -0,0 +1 @@ +import{R as p}from"./chunks/theme.BCktWg-s.js";import{R as o,a6 as u,a7 as c,a8 as l,a9 as f,aa as d,ab as m,ac as h,ad as g,ae as A,af as v,d as P,u as R,v as w,s as y,ag as C,ah as b,ai as E,a5 as S}from"./chunks/framework.CG45A19l.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(p),T=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=R();return w(()=>{y(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&C(),b(),E(),s.setup&&s.setup(),()=>S(s.Layout)}});async function D(){globalThis.__VITEPRESS__=!0;const e=j(),a=_();a.provide(c,e);const t=l(e.route);return a.provide(f,t),a.component("Content",d),a.component("ClientOnly",m),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:h}),{app:a,router:e,data:t}}function _(){return g(T)}function j(){let e=o,a;return A(t=>{let n=v(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=import(n)),o&&(e=!1),r},s.NotFound)}o&&D().then(({app:e,router:a,data:t})=>{a.go().then(()=>{u(a.route,t.site),e.mount("#app")})});export{D as createApp}; diff --git a/previews/PR477/assets/chunks/@localSearchIndexroot.x2g7CFsQ.js b/previews/PR477/assets/chunks/@localSearchIndexroot.x2g7CFsQ.js new file mode 100644 index 00000000..805897d1 --- /dev/null +++ b/previews/PR477/assets/chunks/@localSearchIndexroot.x2g7CFsQ.js @@ -0,0 +1 @@ +const e='{"documentCount":107,"nextId":107,"documentIds":{"0":"/YAXArrays.jl/previews/PR477/UserGuide/cache.html#Caching-YAXArrays","1":"/YAXArrays.jl/previews/PR477/UserGuide/chunk.html#Chunk-YAXArrays","2":"/YAXArrays.jl/previews/PR477/UserGuide/chunk.html#Chunking-YAXArrays","3":"/YAXArrays.jl/previews/PR477/UserGuide/chunk.html#Chunking-Datasets","4":"/YAXArrays.jl/previews/PR477/UserGuide/chunk.html#Set-Chunks-by-Axis","5":"/YAXArrays.jl/previews/PR477/UserGuide/chunk.html#Set-chunking-by-Variable","6":"/YAXArrays.jl/previews/PR477/UserGuide/chunk.html#Set-chunking-for-all-variables","7":"/YAXArrays.jl/previews/PR477/UserGuide/combine.html#Combine-YAXArrays","8":"/YAXArrays.jl/previews/PR477/UserGuide/combine.html#cat-along-an-existing-dimension","9":"/YAXArrays.jl/previews/PR477/UserGuide/combine.html#concatenatecubes-to-a-new-dimension","10":"/YAXArrays.jl/previews/PR477/UserGuide/compute.html#Compute-YAXArrays","11":"/YAXArrays.jl/previews/PR477/UserGuide/compute.html#Modify-elements-of-a-YAXArray","12":"/YAXArrays.jl/previews/PR477/UserGuide/compute.html#arithmetics","13":"/YAXArrays.jl/previews/PR477/UserGuide/compute.html#map","14":"/YAXArrays.jl/previews/PR477/UserGuide/compute.html#mapslices","15":"/YAXArrays.jl/previews/PR477/UserGuide/compute.html#mapCube","16":"/YAXArrays.jl/previews/PR477/UserGuide/compute.html#Operations-over-several-YAXArrays","17":"/YAXArrays.jl/previews/PR477/UserGuide/compute.html#OutDims-and-YAXArray-Properties","18":"/YAXArrays.jl/previews/PR477/UserGuide/compute.html#One-InDims-to-many-OutDims","19":"/YAXArrays.jl/previews/PR477/UserGuide/compute.html#Many-InDims-to-many-OutDims","20":"/YAXArrays.jl/previews/PR477/UserGuide/compute.html#Specify-path-in-OutDims","21":"/YAXArrays.jl/previews/PR477/UserGuide/compute.html#Different-InDims-names","22":"/YAXArrays.jl/previews/PR477/UserGuide/compute.html#Creating-a-vector-array","23":"/YAXArrays.jl/previews/PR477/UserGuide/compute.html#Distributed-Computation","24":"/YAXArrays.jl/previews/PR477/UserGuide/convert.html#Convert-YAXArrays","25":"/YAXArrays.jl/previews/PR477/UserGuide/convert.html#Convert-Base.Array","26":"/YAXArrays.jl/previews/PR477/UserGuide/convert.html#Convert-Raster","27":"/YAXArrays.jl/previews/PR477/UserGuide/convert.html#Convert-DimArray","28":"/YAXArrays.jl/previews/PR477/UserGuide/create.html#Create-YAXArrays-and-Datasets","29":"/YAXArrays.jl/previews/PR477/UserGuide/create.html#Create-a-YAXArray","30":"/YAXArrays.jl/previews/PR477/UserGuide/create.html#Create-a-Dataset","31":"/YAXArrays.jl/previews/PR477/UserGuide/faq.html#Frequently-Asked-Questions-(FAQ)","32":"/YAXArrays.jl/previews/PR477/UserGuide/faq.html#Extract-the-axes-names-from-a-Cube","33":"/YAXArrays.jl/previews/PR477/UserGuide/faq.html#rebuild","34":"/YAXArrays.jl/previews/PR477/UserGuide/faq.html#Obtain-values-from-axes-and-data-from-the-cube","35":"/YAXArrays.jl/previews/PR477/UserGuide/faq.html#How-do-I-concatenate-cubes","36":"/YAXArrays.jl/previews/PR477/UserGuide/faq.html#How-do-I-subset-a-YAXArray-(-Cube-)-or-Dataset?","37":"/YAXArrays.jl/previews/PR477/UserGuide/faq.html#Subsetting-a-YAXArray","38":"/YAXArrays.jl/previews/PR477/UserGuide/faq.html#Subsetting-a-Dataset","39":"/YAXArrays.jl/previews/PR477/UserGuide/faq.html#Subsetting-a-Dataset-whose-variables-share-all-their-dimensions","40":"/YAXArrays.jl/previews/PR477/UserGuide/faq.html#Subsetting-a-Dataset-whose-variables-share-some-but-not-all-of-their-dimensions","41":"/YAXArrays.jl/previews/PR477/UserGuide/faq.html#How-do-I-apply-map-algebra?","42":"/YAXArrays.jl/previews/PR477/UserGuide/faq.html#How-do-I-use-the-CubeTable-function?","43":"/YAXArrays.jl/previews/PR477/UserGuide/faq.html#How-do-I-assign-variable-names-to-YAXArrays-in-a-Dataset","44":"/YAXArrays.jl/previews/PR477/UserGuide/faq.html#One-variable-name","45":"/YAXArrays.jl/previews/PR477/UserGuide/faq.html#Multiple-variable-names","46":"/YAXArrays.jl/previews/PR477/UserGuide/faq.html#Ho-do-I-construct-a-Dataset-from-a-TimeArray","47":"/YAXArrays.jl/previews/PR477/UserGuide/faq.html#Create-a-YAXArray-with-unions-containing-Strings","48":"/YAXArrays.jl/previews/PR477/UserGuide/group.html#Group-YAXArrays-and-Datasets","49":"/YAXArrays.jl/previews/PR477/UserGuide/group.html#Seasonal-Averages-from-Time-Series-of-Monthly-Means","50":"/YAXArrays.jl/previews/PR477/UserGuide/group.html#Download-the-data","51":"/YAXArrays.jl/previews/PR477/UserGuide/group.html#GroupBy:-seasons","52":"/YAXArrays.jl/previews/PR477/UserGuide/group.html#dropdims","53":"/YAXArrays.jl/previews/PR477/UserGuide/group.html#seasons","54":"/YAXArrays.jl/previews/PR477/UserGuide/group.html#GroupBy:-weight","55":"/YAXArrays.jl/previews/PR477/UserGuide/group.html#weights","56":"/YAXArrays.jl/previews/PR477/UserGuide/group.html#weighted-seasons","57":"/YAXArrays.jl/previews/PR477/UserGuide/read.html#Read-YAXArrays-and-Datasets","58":"/YAXArrays.jl/previews/PR477/UserGuide/read.html#Read-Zarr","59":"/YAXArrays.jl/previews/PR477/UserGuide/read.html#Read-NetCDF","60":"/YAXArrays.jl/previews/PR477/UserGuide/read.html#Read-GDAL-(GeoTIFF,-GeoJSON)","61":"/YAXArrays.jl/previews/PR477/UserGuide/read.html#Load-data-into-memory","62":"/YAXArrays.jl/previews/PR477/UserGuide/read.html#readcubedata","63":"/YAXArrays.jl/previews/PR477/UserGuide/select.html#Select-YAXArrays-and-Datasets","64":"/YAXArrays.jl/previews/PR477/UserGuide/select.html#Select-a-YAXArray","65":"/YAXArrays.jl/previews/PR477/UserGuide/select.html#Select-elements","66":"/YAXArrays.jl/previews/PR477/UserGuide/select.html#Select-ranges","67":"/YAXArrays.jl/previews/PR477/UserGuide/select.html#Closed-and-open-intervals","68":"/YAXArrays.jl/previews/PR477/UserGuide/select.html#Get-a-dimension","69":"/YAXArrays.jl/previews/PR477/UserGuide/types.html#types","70":"/YAXArrays.jl/previews/PR477/UserGuide/types.html#yaxarray","71":"/YAXArrays.jl/previews/PR477/UserGuide/types.html#dataset","72":"/YAXArrays.jl/previews/PR477/UserGuide/types.html#(Data)-Cube","73":"/YAXArrays.jl/previews/PR477/UserGuide/types.html#dimension","74":"/YAXArrays.jl/previews/PR477/UserGuide/write.html#Write-YAXArrays-and-Datasets","75":"/YAXArrays.jl/previews/PR477/UserGuide/write.html#Write-Zarr","76":"/YAXArrays.jl/previews/PR477/UserGuide/write.html#zarr-compression","77":"/YAXArrays.jl/previews/PR477/UserGuide/write.html#Write-NetCDF","78":"/YAXArrays.jl/previews/PR477/UserGuide/write.html#netcdf-compression","79":"/YAXArrays.jl/previews/PR477/UserGuide/write.html#Overwrite-a-Dataset","80":"/YAXArrays.jl/previews/PR477/UserGuide/write.html#Append-to-a-Dataset","81":"/YAXArrays.jl/previews/PR477/UserGuide/write.html#Save-Skeleton","82":"/YAXArrays.jl/previews/PR477/UserGuide/write.html#Update-values-of-dataset","83":"/YAXArrays.jl/previews/PR477/api.html#API-Reference","84":"/YAXArrays.jl/previews/PR477/api.html#Public-API","85":"/YAXArrays.jl/previews/PR477/api.html#Internal-API","86":"/YAXArrays.jl/previews/PR477/development/contribute.html#Contribute-to-YAXArrays.jl","87":"/YAXArrays.jl/previews/PR477/development/contribute.html#Contribute-to-Documentation","88":"/YAXArrays.jl/previews/PR477/development/contribute.html#Build-docs-locally","89":"/YAXArrays.jl/previews/PR477/get_started.html#Getting-Started","90":"/YAXArrays.jl/previews/PR477/get_started.html#installation","91":"/YAXArrays.jl/previews/PR477/get_started.html#quickstart","92":"/YAXArrays.jl/previews/PR477/get_started.html#updates","93":"/YAXArrays.jl/previews/PR477/#How-to-Install-YAXArrays.jl?","94":"/YAXArrays.jl/previews/PR477/#Want-interoperability?","95":"/YAXArrays.jl/previews/PR477/tutorials/mean_seasonal_cycle.html#Mean-Seasonal-Cycle-for-a-single-pixel","96":"/YAXArrays.jl/previews/PR477/tutorials/mean_seasonal_cycle.html#Define-the-cube","97":"/YAXArrays.jl/previews/PR477/tutorials/mean_seasonal_cycle.html#Plot-results:-mean-seasonal-cycle","98":"/YAXArrays.jl/previews/PR477/tutorials/other_tutorials.html#Other-tutorials","99":"/YAXArrays.jl/previews/PR477/tutorials/other_tutorials.html#General-overview-of-the-functionality-of-YAXArrays","100":"/YAXArrays.jl/previews/PR477/tutorials/other_tutorials.html#Table-style-iteration-over-YAXArrays","101":"/YAXArrays.jl/previews/PR477/tutorials/other_tutorials.html#Combining-multiple-tiff-files-into-a-zarr-based-datacube","102":"/YAXArrays.jl/previews/PR477/tutorials/plottingmaps.html#Plotting-maps","103":"/YAXArrays.jl/previews/PR477/tutorials/plottingmaps.html#Heatmap-plot","104":"/YAXArrays.jl/previews/PR477/tutorials/plottingmaps.html#Wintri-Projection","105":"/YAXArrays.jl/previews/PR477/tutorials/plottingmaps.html#Moll-projection","106":"/YAXArrays.jl/previews/PR477/tutorials/plottingmaps.html#3D-sphere-plot"},"fieldIds":{"title":0,"titles":1,"text":2},"fieldLength":{"0":[2,1,86],"1":[2,1,58],"2":[2,2,57],"3":[2,2,9],"4":[4,4,76],"5":[4,4,76],"6":[5,4,81],"7":[2,1,31],"8":[5,2,82],"9":[5,2,91],"10":[2,1,119],"11":[5,2,30],"12":[1,2,73],"13":[1,2,121],"14":[1,2,90],"15":[1,2,22],"16":[4,3,213],"17":[4,3,100],"18":[5,7,129],"19":[5,7,99],"20":[4,7,91],"21":[3,3,151],"22":[4,3,248],"23":[2,2,138],"24":[2,1,52],"25":[3,2,86],"26":[2,2,117],"27":[2,2,123],"28":[4,1,14],"29":[3,4,108],"30":[3,4,45],"31":[5,1,19],"32":[7,5,78],"33":[1,11,92],"34":[8,5,77],"35":[5,5,89],"36":[10,5,33],"37":[3,14,146],"38":[3,14,18],"39":[9,14,69],"40":[13,14,156],"41":[7,5,115],"42":[8,5,171],"43":[11,5,1],"44":[3,15,24],"45":[3,15,59],"46":[8,5,140],"47":[7,5,81],"48":[4,1,30],"49":[8,4,35],"50":[3,4,67],"51":[2,4,137],"52":[1,6,102],"53":[1,6,49],"54":[2,4,111],"55":[1,6,85],"56":[2,6,348],"57":[4,1,14],"58":[2,4,189],"59":[2,4,253],"60":[5,4,90],"61":[4,4,42],"62":[1,8,144],"63":[4,1,165],"64":[3,4,107],"65":[2,4,118],"66":[2,4,132],"67":[4,4,145],"68":[3,4,73],"69":[1,1,16],"70":[1,1,113],"71":[1,1,78],"72":[3,1,70],"73":[1,1,32],"74":[4,1,146],"75":[2,4,19],"76":[2,5,52],"77":[2,4,20],"78":[2,5,44],"79":[3,4,77],"80":[4,4,157],"81":[2,4,155],"82":[4,4,93],"83":[2,1,10],"84":[2,2,589],"85":[2,2,462],"86":[4,1,15],"87":[3,4,40],"88":[3,5,75],"89":[2,1,1],"90":[1,2,34],"91":[1,2,197],"92":[1,2,49],"93":[6,1,37],"94":[3,1,21],"95":[7,1,73],"96":[3,7,133],"97":[5,7,48],"98":[2,1,49],"99":[6,2,12],"100":[5,2,38],"101":[9,2,1],"102":[2,1,136],"103":[2,2,21],"104":[2,1,46],"105":[2,2,33],"106":[3,2,57]},"averageFieldLength":[3.504672897196263,3.822429906542055,92.23364485981308],"storedFields":{"0":{"title":"Caching YAXArrays","titles":[]},"1":{"title":"Chunk YAXArrays","titles":[]},"2":{"title":"Chunking YAXArrays","titles":["Chunk YAXArrays"]},"3":{"title":"Chunking Datasets","titles":["Chunk YAXArrays"]},"4":{"title":"Set Chunks by Axis","titles":["Chunk YAXArrays","Chunking Datasets"]},"5":{"title":"Set chunking by Variable","titles":["Chunk YAXArrays","Chunking Datasets"]},"6":{"title":"Set chunking for all variables","titles":["Chunk YAXArrays","Chunking Datasets"]},"7":{"title":"Combine YAXArrays","titles":[]},"8":{"title":"cat along an existing dimension","titles":["Combine YAXArrays"]},"9":{"title":"concatenatecubes to a new dimension","titles":["Combine YAXArrays"]},"10":{"title":"Compute YAXArrays","titles":[]},"11":{"title":"Modify elements of a YAXArray","titles":["Compute YAXArrays"]},"12":{"title":"Arithmetics","titles":["Compute YAXArrays"]},"13":{"title":"map","titles":["Compute YAXArrays"]},"14":{"title":"mapslices","titles":["Compute YAXArrays"]},"15":{"title":"mapCube","titles":["Compute YAXArrays"]},"16":{"title":"Operations over several YAXArrays","titles":["Compute YAXArrays","mapCube"]},"17":{"title":"OutDims and YAXArray Properties","titles":["Compute YAXArrays","mapCube"]},"18":{"title":"One InDims to many OutDims","titles":["Compute YAXArrays","mapCube","OutDims and YAXArray Properties"]},"19":{"title":"Many InDims to many OutDims","titles":["Compute YAXArrays","mapCube","OutDims and YAXArray Properties"]},"20":{"title":"Specify path in OutDims","titles":["Compute YAXArrays","mapCube","OutDims and YAXArray Properties"]},"21":{"title":"Different InDims names","titles":["Compute YAXArrays","mapCube"]},"22":{"title":"Creating a vector array","titles":["Compute YAXArrays","mapCube"]},"23":{"title":"Distributed Computation","titles":["Compute YAXArrays"]},"24":{"title":"Convert YAXArrays","titles":[]},"25":{"title":"Convert Base.Array","titles":["Convert YAXArrays"]},"26":{"title":"Convert Raster","titles":["Convert YAXArrays"]},"27":{"title":"Convert DimArray","titles":["Convert YAXArrays"]},"28":{"title":"Create YAXArrays and Datasets","titles":[]},"29":{"title":"Create a YAXArray","titles":["Create YAXArrays and Datasets"]},"30":{"title":"Create a Dataset","titles":["Create YAXArrays and Datasets"]},"31":{"title":"Frequently Asked Questions (FAQ)","titles":[]},"32":{"title":"Extract the axes names from a Cube","titles":["Frequently Asked Questions (FAQ)"]},"33":{"title":"rebuild","titles":["Frequently Asked Questions (FAQ)","Extract the axes names from a Cube"]},"34":{"title":"Obtain values from axes and data from the cube","titles":["Frequently Asked Questions (FAQ)"]},"35":{"title":"How do I concatenate cubes","titles":["Frequently Asked Questions (FAQ)"]},"36":{"title":"How do I subset a YAXArray ( Cube ) or Dataset?","titles":["Frequently Asked Questions (FAQ)"]},"37":{"title":"Subsetting a YAXArray","titles":["Frequently Asked Questions (FAQ)","How do I subset a YAXArray ( Cube ) or Dataset?"]},"38":{"title":"Subsetting a Dataset","titles":["Frequently Asked Questions (FAQ)","How do I subset a YAXArray ( Cube ) or Dataset?"]},"39":{"title":"Subsetting a Dataset whose variables share all their dimensions","titles":["Frequently Asked Questions (FAQ)","How do I subset a YAXArray ( Cube ) or Dataset?","Subsetting a Dataset"]},"40":{"title":"Subsetting a Dataset whose variables share some but not all of their dimensions","titles":["Frequently Asked Questions (FAQ)","How do I subset a YAXArray ( Cube ) or Dataset?","Subsetting a Dataset"]},"41":{"title":"How do I apply map algebra?","titles":["Frequently Asked Questions (FAQ)"]},"42":{"title":"How do I use the CubeTable function?","titles":["Frequently Asked Questions (FAQ)"]},"43":{"title":"How do I assign variable names to YAXArrays in a Dataset","titles":["Frequently Asked Questions (FAQ)"]},"44":{"title":"One variable name","titles":["Frequently Asked Questions (FAQ)","How do I assign variable names to YAXArrays in a Dataset"]},"45":{"title":"Multiple variable names","titles":["Frequently Asked Questions (FAQ)","How do I assign variable names to YAXArrays in a Dataset"]},"46":{"title":"Ho do I construct a Dataset from a TimeArray","titles":["Frequently Asked Questions (FAQ)"]},"47":{"title":"Create a YAXArray with unions containing Strings","titles":["Frequently Asked Questions (FAQ)"]},"48":{"title":"Group YAXArrays and Datasets","titles":[]},"49":{"title":"Seasonal Averages from Time Series of Monthly Means","titles":["Group YAXArrays and Datasets"]},"50":{"title":"Download the data","titles":["Group YAXArrays and Datasets"]},"51":{"title":"GroupBy: seasons","titles":["Group YAXArrays and Datasets"]},"52":{"title":"dropdims","titles":["Group YAXArrays and Datasets","GroupBy: seasons"]},"53":{"title":"seasons","titles":["Group YAXArrays and Datasets","GroupBy: seasons"]},"54":{"title":"GroupBy: weight","titles":["Group YAXArrays and Datasets"]},"55":{"title":"weights","titles":["Group YAXArrays and Datasets","GroupBy: weight"]},"56":{"title":"weighted seasons","titles":["Group YAXArrays and Datasets","GroupBy: weight"]},"57":{"title":"Read YAXArrays and Datasets","titles":[]},"58":{"title":"Read Zarr","titles":["Read YAXArrays and Datasets"]},"59":{"title":"Read NetCDF","titles":["Read YAXArrays and Datasets"]},"60":{"title":"Read GDAL (GeoTIFF, GeoJSON)","titles":["Read YAXArrays and Datasets"]},"61":{"title":"Load data into memory","titles":["Read YAXArrays and Datasets"]},"62":{"title":"readcubedata","titles":["Read YAXArrays and Datasets","Load data into memory"]},"63":{"title":"Select YAXArrays and Datasets","titles":[]},"64":{"title":"Select a YAXArray","titles":["Select YAXArrays and Datasets"]},"65":{"title":"Select elements","titles":["Select YAXArrays and Datasets"]},"66":{"title":"Select ranges","titles":["Select YAXArrays and Datasets"]},"67":{"title":"Closed and open intervals","titles":["Select YAXArrays and Datasets"]},"68":{"title":"Get a dimension","titles":["Select YAXArrays and Datasets"]},"69":{"title":"Types","titles":[]},"70":{"title":"YAXArray","titles":["Types"]},"71":{"title":"Dataset","titles":["Types"]},"72":{"title":"(Data) Cube","titles":["Types"]},"73":{"title":"Dimension","titles":["Types"]},"74":{"title":"Write YAXArrays and Datasets","titles":[]},"75":{"title":"Write Zarr","titles":["Write YAXArrays and Datasets"]},"76":{"title":"zarr compression","titles":["Write YAXArrays and Datasets","Write Zarr"]},"77":{"title":"Write NetCDF","titles":["Write YAXArrays and Datasets"]},"78":{"title":"netcdf compression","titles":["Write YAXArrays and Datasets","Write NetCDF"]},"79":{"title":"Overwrite a Dataset","titles":["Write YAXArrays and Datasets"]},"80":{"title":"Append to a Dataset","titles":["Write YAXArrays and Datasets"]},"81":{"title":"Save Skeleton","titles":["Write YAXArrays and Datasets"]},"82":{"title":"Update values of dataset","titles":["Write YAXArrays and Datasets"]},"83":{"title":"API Reference","titles":[]},"84":{"title":"Public API","titles":["API Reference"]},"85":{"title":"Internal API","titles":["API Reference"]},"86":{"title":"Contribute to YAXArrays.jl","titles":[]},"87":{"title":"Contribute to Documentation","titles":["Contribute to YAXArrays.jl"]},"88":{"title":"Build docs locally","titles":["Contribute to YAXArrays.jl","Contribute to Documentation"]},"89":{"title":"Getting Started","titles":[]},"90":{"title":"Installation","titles":["Getting Started"]},"91":{"title":"Quickstart","titles":["Getting Started"]},"92":{"title":"Updates","titles":["Getting Started"]},"93":{"title":"How to Install YAXArrays.jl?","titles":[]},"94":{"title":"Want interoperability?","titles":[]},"95":{"title":"Mean Seasonal Cycle for a single pixel","titles":[]},"96":{"title":"Define the cube","titles":["Mean Seasonal Cycle for a single pixel"]},"97":{"title":"Plot results: mean seasonal cycle","titles":["Mean Seasonal Cycle for a single pixel"]},"98":{"title":"Other tutorials","titles":[]},"99":{"title":"General overview of the functionality of YAXArrays","titles":["Other tutorials"]},"100":{"title":"Table-style iteration over YAXArrays","titles":["Other tutorials"]},"101":{"title":"Combining multiple tiff files into a zarr based datacube","titles":["Other tutorials"]},"102":{"title":"Plotting maps","titles":[]},"103":{"title":"Heatmap plot","titles":["Plotting maps"]},"104":{"title":"Wintri Projection","titles":[]},"105":{"title":"Moll projection","titles":["Wintri Projection"]},"106":{"title":"3D sphere plot","titles":["Wintri Projection"]}},"dirtCount":0,"index":[["δlon",{"2":{"104":1}}],["├─────────────────────┴─────────────────────────────────────────",{"2":{"47":1}}],["├─────────────────────────┴──────────────────────────",{"2":{"37":1}}],["├─────────────────────────┴─────────────────────────────────────",{"2":{"91":1}}],["├─────────────────────────┴──────────────────────────────────────",{"2":{"33":1}}],["├─────────────────────────┴──────────────────────────────────────────────",{"2":{"34":1,"42":1}}],["├─────────────────────────┴─────────────────────────────────────────",{"2":{"19":1}}],["├─────────────────────────┴──────────────────────────────────",{"2":{"27":2}}],["├─────────────────────────┴────────────────────────────────",{"2":{"9":1}}],["├──────────────────────────┴────────────────────────────",{"2":{"26":1}}],["├──────────────────────────┴────────────────────────────────────",{"2":{"25":1}}],["├──────────────────────────┴─────────────────────────────────────────────",{"2":{"22":1,"37":1}}],["├────────────────────────────┴───────────────────────────────────────────",{"2":{"37":2}}],["├────────────────────────────┴──────────────────────────",{"2":{"26":1}}],["├─────────────────────────────┴──────────────────────────────────",{"2":{"29":1}}],["├─────────────────────────────┴──────────────────────────────────────────",{"2":{"16":1,"32":1}}],["├───────────────────────────────┴────────────────────────────────────────",{"2":{"55":1}}],["├──────────────────────────────────┴─────────────────────────────────────",{"2":{"96":1}}],["├────────────────────────────────────┴───────────────────────────────────",{"2":{"58":1}}],["├──────────────────────────────────────┴────────────────────────",{"2":{"47":1}}],["├────────────────────────────────────────",{"2":{"37":1}}],["├──────────────────────────────────────────┴─────────────────────────────",{"2":{"22":1,"42":1}}],["├─────────────────────────────────────────────┴─────────────────",{"2":{"65":1}}],["├───────────────────────────────────────────────┴────────────────────────",{"2":{"42":1,"66":1,"67":5}}],["├────────────────────────────────────────────────",{"2":{"27":1,"37":1}}],["├────────────────────────────────────────────────┴───────────────────────",{"2":{"14":1,"54":1,"59":1,"62":3,"64":2,"65":2}}],["├──────────────────────────────────────────────────┴─────────────────────",{"2":{"51":1}}],["├────────────────────────────────────────────────────",{"2":{"29":1,"33":1}}],["├────────────────────────────────────────────────────────",{"2":{"27":2}}],["├───────────────────────────────────────────────────────────",{"2":{"25":1,"47":2,"91":1}}],["├────────────────────────────────────────────────────────────",{"2":{"10":1,"12":1,"13":1,"14":2,"16":3,"17":1,"18":1,"21":2,"22":2,"29":2,"32":1,"33":3,"34":1,"37":4,"41":3,"42":3,"54":1,"62":3,"81":1,"91":1,"96":1}}],["├─────────────────────────────────────────────────────────────────",{"2":{"65":1}}],["├──────────────────────────────────────────────────────────────────",{"2":{"51":1,"54":1}}],["├─────────────────────────────────────────────────────────────────────┴",{"2":{"65":1}}],["├────────────────────────────────────────────────────────────────────────",{"2":{"51":1,"52":1,"54":1,"55":1,"56":3}}],["├────────────────────────────────────────────────────────────────────",{"2":{"10":1,"12":1,"13":1,"14":2,"16":5,"17":1,"18":1,"21":2,"22":3,"29":1,"32":1,"33":2,"34":1,"35":1,"37":4,"41":3,"42":3,"51":2,"52":1,"54":3,"55":2,"56":3,"58":1,"59":1,"62":3,"64":2,"65":2,"66":3,"67":5,"81":1,"91":1,"96":1}}],["├───────────────────────────────────────────────────────────────",{"2":{"16":2,"19":1,"35":1,"58":1,"59":1,"64":2,"65":2,"66":3,"67":5}}],["├─────────────────────────────────────────────────────────────",{"2":{"8":1}}],["├───────────────────────────────────────────────────────",{"2":{"19":1}}],["├──────────────────────────────────────────────────────",{"2":{"9":1}}],["├─────────────────────────────────────────────────────",{"2":{"8":1,"26":1}}],["├───────────────────────────────────────────────────",{"2":{"25":1,"26":2,"47":2,"91":1}}],["├─────────────────────────────────────────────────",{"2":{"9":1,"21":1}}],["├──────────────────────────────────────────────┴─────────────────────────",{"2":{"16":2,"41":1,"66":2}}],["├───────────────────────────────────────────",{"2":{"26":1}}],["├───────────────────────────────────────────┴────────────────────────────",{"2":{"14":1,"18":1,"21":1,"81":1}}],["├─────────────────────────────────────────",{"2":{"21":1}}],["├────────────────────────────────┴───────────────────────────────────────",{"2":{"35":1,"91":1}}],["├────────────────────────────────┴────────────────────────────────",{"2":{"8":1}}],["├──────────────────────────────┴─────────────────────────────────────────",{"2":{"10":1,"12":1,"13":1,"16":2,"22":1,"29":1,"41":2,"54":1}}],["├───────────────────────────┴─────────────────────────",{"2":{"21":1}}],["├───────────────────────────┴────────────────────────────────────────────",{"2":{"17":1,"21":1,"22":1,"33":2,"37":1}}],["╭─────────────────────╮",{"2":{"47":1}}],["╭──────────────────────────╮",{"2":{"22":1,"25":1,"26":1,"37":1}}],["╭────────────────────────────╮",{"2":{"26":1,"37":2}}],["╭─────────────────────────────╮",{"2":{"16":1,"29":1,"32":1}}],["╭───────────────────────────────╮",{"2":{"55":1}}],["╭──────────────────────────────────╮",{"2":{"96":1}}],["╭────────────────────────────────────╮",{"2":{"58":1}}],["╭──────────────────────────────────────╮",{"2":{"47":1}}],["╭──────────────────────────────────────────╮",{"2":{"22":1,"42":1}}],["╭─────────────────────────────────────────────╮",{"2":{"65":1}}],["╭──────────────────────────────────────────────────────────────────────────────╮",{"2":{"51":1,"52":1,"54":1,"55":1,"56":3}}],["╭──────────────────────────────────────────────────╮",{"2":{"51":1}}],["╭────────────────────────────────────────────────╮",{"2":{"14":1,"54":1,"59":1,"62":3,"64":2,"65":2}}],["╭───────────────────────────────────────────────╮",{"2":{"42":1,"66":1,"67":5}}],["╭──────────────────────────────────────────────╮",{"2":{"16":2,"41":1,"66":2}}],["╭───────────────────────────────────────────╮",{"2":{"14":1,"18":1,"21":1,"81":1}}],["╭────────────────────────────────╮",{"2":{"8":1,"35":1,"91":1}}],["╭──────────────────────────────╮",{"2":{"10":1,"12":1,"13":1,"16":2,"22":1,"29":1,"41":2,"54":1}}],["╭───────────────────────────╮",{"2":{"17":1,"21":2,"22":1,"33":2,"37":1}}],["╭─────────────────────────╮",{"2":{"9":1,"19":1,"27":2,"33":1,"34":1,"37":1,"42":1,"91":1}}],["π",{"2":{"41":2,"95":1,"97":1}}],[">var",{"2":{"96":1}}],[">dates",{"2":{"96":1}}],[">month",{"2":{"84":1}}],[">abs",{"2":{"84":1}}],[">=",{"2":{"40":4}}],[">",{"2":{"40":2,"41":2,"96":1}}],["└──────────────────────────────────────────────────────────┘",{"2":{"37":1}}],["└─────────────────────────────────────────────────────────────┘",{"2":{"26":2}}],["└──────────────────────────────────────────────────────────────────┘",{"2":{"27":2}}],["└──────────────────────────────────────────────────────────────────────┘",{"2":{"29":1,"33":1}}],["└────────────────────────────────────────────────────────────────────────────────┘",{"2":{"65":1}}],["└──────────────────────────────────────────────────────────────────────────────┘",{"2":{"10":1,"12":1,"13":1,"14":2,"16":5,"17":1,"18":1,"21":2,"22":4,"29":1,"32":1,"33":2,"34":1,"35":1,"37":4,"41":3,"42":3,"51":2,"52":1,"54":3,"55":2,"56":3,"58":1,"59":1,"62":3,"64":2,"65":2,"66":3,"67":5,"81":1,"91":1,"96":1}}],["└─────────────────────────────────────────────────────────────────────────┘",{"2":{"19":1}}],["└───────────────────────────────────────────────────────────────────────┘",{"2":{"8":1}}],["└─────────────────────────────────────────────────────────────────────┘",{"2":{"25":1,"47":2,"91":1}}],["└────────────────────────────────────────────────────────────────┘",{"2":{"9":1}}],["└───────────────────────────────────────────────────────────┘",{"2":{"21":1}}],["`diskarrays",{"2":{"85":1}}],["`ds`",{"2":{"84":1}}],["`ordereddict`",{"2":{"84":1}}],["`fun`",{"2":{"84":1}}],["`a",{"2":{"37":1}}],["`layer`",{"2":{"18":1}}],["quickstart",{"0":{"91":1}}],["query",{"2":{"63":1}}],["querying",{"2":{"62":1}}],["questions",{"0":{"31":1},"1":{"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1}}],["quot",{"2":{"16":2,"42":2,"79":2,"81":4,"84":16,"85":12}}],["jj+1",{"2":{"59":1,"63":1,"74":1,"80":1}}],["jj",{"2":{"59":1,"63":1,"74":1,"80":1}}],["joinname",{"2":{"84":1}}],["joinname=",{"2":{"84":1}}],["journal",{"2":{"59":1,"63":1,"74":1,"80":1}}],["joe",{"2":{"49":1,"56":1}}],["j",{"2":{"56":8}}],["jan",{"2":{"51":4,"52":2,"53":1,"54":4,"55":4,"56":6}}],["jl",{"0":{"86":1,"93":1},"1":{"87":1,"88":1},"2":{"26":1,"27":1,"42":1,"46":2,"50":1,"56":1,"70":1,"73":1,"86":1,"88":2,"90":1,"91":2,"92":3,"93":2,"100":1}}],["jussieu",{"2":{"59":1,"63":1,"74":1,"80":1}}],["just",{"2":{"22":1,"70":1,"72":1,"84":1,"85":2}}],["jul",{"2":{"51":4,"52":2,"53":1,"54":4,"55":4,"56":6}}],["juliaδlon",{"2":{"104":1}}],["juliaglmakie",{"2":{"103":1}}],["juliagetloopchunks",{"2":{"85":1}}],["juliagetouttype",{"2":{"85":1}}],["juliagetoutaxis",{"2":{"85":1}}],["juliaget",{"2":{"85":1}}],["juliagetaxis",{"2":{"84":1}}],["juliagettarrayaxes",{"2":{"46":1}}],["juliagen",{"2":{"16":1}}],["juliax",{"2":{"95":1}}],["juliapkg>",{"2":{"90":1,"92":1,"93":1}}],["juliapermuteloopaxes",{"2":{"85":1}}],["juliaproperties",{"2":{"19":1}}],["juliaoptifunc",{"2":{"85":1}}],["juliaopen",{"2":{"84":1}}],["juliaoutdims",{"2":{"84":1}}],["juliaoffset",{"2":{"13":1}}],["juliacopydata",{"2":{"85":1}}],["juliacollect",{"2":{"34":1,"68":1}}],["juliaclean",{"2":{"85":1}}],["juliacube",{"2":{"84":1}}],["juliacubefittable",{"2":{"84":1}}],["juliacubetable",{"2":{"84":1}}],["juliacaxes",{"2":{"84":1}}],["julian",{"2":{"76":1,"78":1}}],["juliasavecube",{"2":{"84":1}}],["juliasavedataset",{"2":{"75":1,"77":1,"79":1}}],["juliasetchunks",{"2":{"84":1,"85":1}}],["juliaseasons",{"2":{"53":1}}],["julialon",{"2":{"102":1}}],["julialookup",{"2":{"68":1}}],["julialatitudes",{"2":{"40":1}}],["juliawith",{"2":{"56":1}}],["julia>",{"2":{"56":1,"88":1,"93":2,"96":1}}],["juliaurl",{"2":{"50":1}}],["juliausing",{"2":{"0":1,"2":1,"4":1,"5":1,"6":1,"8":1,"9":1,"10":1,"16":1,"17":1,"22":1,"23":2,"25":1,"26":1,"27":1,"29":2,"32":1,"33":1,"35":1,"37":1,"39":1,"40":1,"42":2,"46":1,"48":1,"56":1,"58":1,"59":1,"60":1,"63":1,"65":1,"67":1,"74":1,"75":1,"77":1,"81":1,"91":2,"94":4,"95":1,"102":1,"106":1}}],["juliakeylist",{"2":{"45":1}}],["juliaylonlat",{"2":{"37":1}}],["juliaytime3",{"2":{"37":1}}],["juliaytime2",{"2":{"37":1}}],["juliaytime",{"2":{"37":1}}],["juliay",{"2":{"37":1}}],["juliayaxcolumn",{"2":{"85":1}}],["juliayaxarray",{"2":{"84":1}}],["juliayax",{"2":{"0":1,"46":2}}],["juliatos",{"2":{"64":2,"65":2,"66":3,"67":1,"68":1}}],["juliatempo",{"2":{"54":1}}],["juliatest",{"2":{"47":2}}],["juliat",{"2":{"37":1,"42":1,"95":1}}],["juliatspan",{"2":{"16":1}}],["juliamutable",{"2":{"85":1}}],["juliamatch",{"2":{"85":1}}],["juliamapcube",{"2":{"84":2}}],["juliamapslices",{"2":{"14":1,"23":1}}],["juliamovingwindow",{"2":{"84":1}}],["juliamy",{"2":{"59":1}}],["juliamean",{"2":{"56":1}}],["juliam2",{"2":{"25":1}}],["julia",{"2":{"24":1,"59":1,"85":1,"88":1,"90":2,"92":2,"93":2}}],["juliavector",{"2":{"22":1}}],["juliadataset",{"2":{"84":1}}],["juliadata3",{"2":{"30":1}}],["juliadim",{"2":{"27":1}}],["juliadimarray",{"2":{"22":1}}],["juliads2",{"2":{"80":1}}],["juliads",{"2":{"18":2,"20":2,"21":1,"39":1,"40":1,"58":1,"59":1,"62":2,"78":1,"81":2,"82":3}}],["juliar",{"2":{"81":1}}],["juliareadcubedata",{"2":{"62":1,"84":1}}],["juliaregions",{"2":{"22":2}}],["juliaras2",{"2":{"26":1}}],["juliarandom",{"2":{"21":2}}],["juliaindims",{"2":{"18":1,"20":1,"84":1}}],["juliaimport",{"2":{"14":1,"90":1}}],["juliajulia>",{"2":{"16":5,"32":3,"33":2,"34":1,"35":1,"41":3,"42":3,"44":1,"45":1,"46":2,"51":2,"52":1,"54":2,"55":2,"56":3,"67":4,"80":1,"81":1,"93":1,"96":2,"102":3}}],["juliaall",{"2":{"81":1}}],["juliaaxs",{"2":{"50":1}}],["juliaaxes",{"2":{"37":1}}],["juliaa2",{"2":{"12":2,"29":2,"91":1}}],["juliaa",{"2":{"2":1,"11":3}}],["juliafig",{"2":{"95":1,"97":1,"104":1,"105":1}}],["juliafindaxis",{"2":{"85":1}}],["juliafiles",{"2":{"84":2}}],["juliafittable",{"2":{"84":2}}],["juliafunction",{"2":{"16":1,"18":1,"19":1,"21":1,"51":1,"84":1,"96":1}}],["juliaf",{"2":{"2":1,"4":1,"5":1,"6":1,"16":1}}],["jun",{"2":{"51":4,"52":2,"53":1,"54":4,"55":4,"56":6}}],["∘",{"2":{"23":1}}],["|>",{"2":{"22":2}}],["⋱",{"2":{"22":1}}],["⋮",{"2":{"22":2,"68":1,"96":1}}],["^2",{"2":{"21":1}}],["⬔",{"2":{"17":1,"18":1,"35":1,"91":1}}],["92491",{"2":{"91":1}}],["928614",{"2":{"91":1}}],["926096",{"2":{"26":1}}],["986",{"2":{"56":1}}],["984803",{"2":{"22":1}}],["976187",{"2":{"91":1}}],["97649",{"2":{"56":1}}],["97047",{"2":{"56":1}}],["973332",{"2":{"26":1}}],["94534",{"2":{"56":1}}],["9404",{"2":{"51":1,"52":1}}],["9432",{"2":{"51":1,"52":1}}],["949935",{"2":{"25":1}}],["959899",{"2":{"82":2}}],["959",{"2":{"56":1}}],["95",{"2":{"40":6,"56":1}}],["902991",{"2":{"91":1}}],["902979",{"2":{"91":1}}],["90712",{"2":{"56":1}}],["90365",{"2":{"56":1}}],["90",{"2":{"40":2,"60":1,"67":5}}],["9122",{"2":{"60":1}}],["9192",{"2":{"56":1}}],["91",{"2":{"32":1,"67":5}}],["917969",{"2":{"27":1}}],["916686",{"2":{"26":1}}],["918555",{"2":{"25":1}}],["935959",{"2":{"91":1}}],["935631",{"2":{"25":1}}],["937012",{"2":{"91":1}}],["9375",{"2":{"58":2,"102":1}}],["93743",{"2":{"56":1}}],["9362",{"2":{"56":1}}],["938094",{"2":{"26":1}}],["93986",{"2":{"22":1}}],["9",{"2":{"16":14,"22":2,"34":1,"37":1,"40":6,"54":4,"66":4,"76":2,"78":1,"85":1}}],["96x71x19",{"2":{"59":1,"63":1,"74":1,"80":1}}],["96f0",{"2":{"59":1,"63":1,"74":1}}],["9682",{"2":{"51":1,"52":1}}],["960",{"2":{"17":1,"18":1,"22":1}}],["96",{"2":{"8":1,"9":1,"65":2,"80":1}}],["898926",{"2":{"82":2}}],["8984",{"2":{"56":1}}],["8901",{"2":{"60":1}}],["89",{"2":{"58":4,"59":2,"60":1,"62":3,"63":1,"64":2,"65":1,"66":1,"67":5,"68":1,"74":1,"80":1,"102":2}}],["89237",{"2":{"56":1}}],["864937",{"2":{"91":1}}],["86457",{"2":{"56":1}}],["86",{"2":{"68":1}}],["862644",{"2":{"26":1}}],["884949",{"2":{"91":1}}],["882929",{"2":{"82":2}}],["88",{"2":{"35":1,"58":4,"68":1,"91":1,"102":2}}],["889583",{"2":{"22":1}}],["81705",{"2":{"91":1}}],["812577",{"2":{"91":1}}],["811959",{"2":{"91":1}}],["81",{"2":{"29":1,"68":1}}],["81362",{"2":{"26":1}}],["853962",{"2":{"91":1}}],["858795",{"2":{"82":2}}],["858065",{"2":{"27":1}}],["85",{"2":{"68":1,"104":1,"105":1}}],["850",{"2":{"56":1}}],["85ºn",{"2":{"40":1}}],["85714",{"2":{"22":1}}],["839919",{"2":{"82":2}}],["83",{"2":{"68":1}}],["830391",{"2":{"25":1}}],["83556",{"2":{"25":1}}],["874428",{"2":{"91":1}}],["875981",{"2":{"91":1}}],["875658",{"2":{"22":1}}],["87",{"2":{"68":1}}],["87705",{"2":{"56":1}}],["872575",{"2":{"26":1}}],["870888",{"2":{"26":1}}],["870826",{"2":{"25":1}}],["841123",{"2":{"82":2}}],["84",{"2":{"60":2,"68":1}}],["845983",{"2":{"25":1}}],["840389",{"2":{"22":1}}],["825766",{"2":{"91":1}}],["828299",{"2":{"91":1}}],["820737",{"2":{"82":2}}],["82",{"2":{"68":1}}],["82421875",{"2":{"60":2}}],["824354",{"2":{"22":1}}],["829062",{"2":{"22":1}}],["8",{"2":{"16":12,"22":2,"34":1,"37":1,"59":2,"62":3,"63":1,"64":2,"74":1,"80":1,"96":1}}],["807171",{"2":{"91":1}}],["80759",{"2":{"56":1}}],["800",{"2":{"33":3,"34":1,"37":1}}],["80",{"2":{"16":1,"40":2}}],["v",{"2":{"59":1,"63":1,"74":1,"80":1}}],["v1",{"2":{"59":2,"63":2,"74":2,"80":2,"90":1}}],["v20190710",{"2":{"58":1,"102":2}}],["vol",{"2":{"59":1,"63":1,"74":1,"80":1}}],["volume",{"2":{"46":4}}],["voilà",{"2":{"46":1}}],["video",{"2":{"98":1}}],["videos",{"2":{"98":1}}],["visualization",{"2":{"42":1}}],["vice",{"2":{"24":1}}],["view",{"2":{"22":1,"91":1}}],["version",{"2":{"58":1,"59":1,"63":1,"74":1,"80":1,"84":1,"92":2,"93":1,"102":1}}],["versa",{"2":{"24":1}}],["verify",{"2":{"55":1,"82":1}}],["very",{"2":{"13":1,"42":1,"70":1}}],["vector",{"0":{"22":1},"2":{"22":4,"34":1,"47":1,"51":1,"53":1,"54":2,"55":2,"56":1,"68":1,"70":1,"84":2,"85":3}}],["val",{"2":{"34":2,"68":1}}],["vals",{"2":{"22":1}}],["value",{"2":{"12":1,"14":3,"16":2,"41":1,"59":1,"62":3,"64":2,"65":3,"66":3,"67":5,"84":4,"85":1}}],["values=ds1",{"2":{"42":1}}],["values",{"0":{"34":1,"82":1},"2":{"9":1,"20":1,"21":1,"22":2,"28":1,"29":2,"32":2,"33":1,"34":1,"40":3,"42":4,"45":1,"46":2,"66":1,"68":2,"70":1,"71":1,"81":1,"82":3,"84":9,"91":1,"102":1}}],["varoables",{"2":{"84":1}}],["variant",{"2":{"58":1,"102":1}}],["variable=at",{"2":{"91":1}}],["variable",{"0":{"5":1,"43":1,"44":1,"45":1},"1":{"44":1,"45":1},"2":{"5":1,"9":3,"40":3,"46":5,"58":1,"62":2,"81":2,"84":4,"85":7,"91":3,"95":1,"96":1,"97":1,"102":1}}],["variables=at",{"2":{"41":2}}],["variables",{"0":{"6":1,"39":1,"40":1},"2":{"4":5,"5":4,"6":2,"9":2,"17":2,"18":1,"19":1,"20":1,"21":1,"24":1,"30":1,"35":2,"38":1,"39":2,"40":11,"44":1,"45":4,"46":6,"58":4,"59":1,"60":1,"61":1,"62":1,"63":1,"71":1,"72":1,"74":1,"80":4,"81":1,"84":2,"102":4}}],["varlist",{"2":{"45":2}}],["var2=var2",{"2":{"39":1}}],["var2",{"2":{"35":2,"39":3,"41":1}}],["var1=var1",{"2":{"39":1}}],["var1",{"2":{"35":2,"39":3,"41":1}}],["var",{"2":{"9":2,"95":2,"96":2,"97":2}}],["uv",{"2":{"106":1}}],["u",{"2":{"96":1}}],["up",{"2":{"84":1}}],["updates",{"0":{"92":1}}],["updated",{"2":{"82":1}}],["update",{"0":{"82":1},"2":{"82":2,"84":1}}],["updating",{"2":{"48":1,"82":1}}],["ucar",{"2":{"59":1,"63":1,"71":1,"74":1}}],["urls",{"2":{"57":1}}],["url",{"2":{"50":1,"58":1}}],["unreleased",{"2":{"93":1}}],["unpermuted",{"2":{"85":2}}],["unpractical",{"2":{"50":1}}],["underlying",{"2":{"84":1,"85":1,"92":1}}],["unlike",{"2":{"72":1}}],["unique",{"2":{"96":1}}],["unidata",{"2":{"59":1,"63":1,"71":1,"74":1}}],["unit",{"2":{"60":1}}],["units",{"2":{"58":1,"59":2,"62":6,"64":4,"65":6,"66":6,"67":10}}],["unitrange",{"2":{"51":2,"52":2,"56":6}}],["unions",{"0":{"47":1}}],["union",{"2":{"14":2,"16":4,"18":2,"20":1,"21":1,"22":1,"41":1,"42":2,"47":2,"59":1,"62":3,"64":2,"65":3,"66":3,"67":5,"81":2,"82":1}}],["unweighted",{"2":{"51":1,"56":1}}],["unordered",{"2":{"46":4,"51":2,"52":1,"53":1,"54":2,"55":2,"56":3}}],["unnecessary",{"2":{"22":1}}],["unchanged",{"2":{"13":1}}],["usually",{"2":{"58":1,"70":2,"71":2}}],["usual",{"2":{"51":1}}],["us",{"2":{"22":1}}],["useable",{"2":{"84":1}}],["used",{"2":{"22":1,"23":1,"37":1,"63":1,"68":1,"69":1,"70":1,"73":1,"84":6,"85":3}}],["uses",{"2":{"20":1,"42":1,"59":1}}],["userguide",{"2":{"87":2}}],["users",{"2":{"85":1}}],["user",{"2":{"10":2,"12":1,"13":1,"23":1,"29":3,"30":1,"85":1}}],["use",{"0":{"42":1},"2":{"0":1,"8":1,"9":1,"10":4,"13":1,"23":2,"32":2,"37":1,"39":1,"40":1,"41":1,"42":2,"46":2,"48":1,"50":1,"52":1,"61":1,"67":2,"72":1,"76":1,"81":1,"84":4,"85":1,"93":1,"98":1,"100":1,"102":2}}],["useful",{"2":{"0":1,"72":1}}],["using",{"2":{"0":1,"8":1,"9":1,"10":1,"16":2,"17":2,"22":2,"23":7,"27":1,"32":1,"33":2,"35":1,"37":2,"39":2,"40":2,"41":1,"42":1,"46":1,"48":4,"58":2,"59":3,"60":2,"61":1,"63":2,"65":3,"66":2,"74":2,"80":1,"81":3,"92":1,"93":1,"95":2,"96":1,"102":3}}],["+proj=moll",{"2":{"105":1}}],["+",{"2":{"12":2,"13":1,"16":2,"18":2,"21":1,"95":1,"104":1}}],["kwargs",{"2":{"84":5,"85":2}}],["know",{"2":{"62":1}}],["k",{"2":{"46":5,"58":1,"59":1,"62":3,"64":2,"65":3,"66":3,"67":5}}],["keyword",{"2":{"80":1,"84":6,"85":2}}],["key",{"2":{"48":1,"84":1}}],["keyset",{"2":{"46":1}}],["keys",{"2":{"46":7,"84":1}}],["keylist",{"2":{"45":1}}],["keeps",{"2":{"13":1}}],["keep",{"2":{"0":1,"85":1}}],["kb",{"2":{"10":1,"12":1,"13":1,"14":1,"16":2,"22":1,"26":1,"29":2,"32":1,"35":1,"37":4,"41":3,"42":1,"65":1,"66":3,"67":5,"91":1,"96":1}}],["↗",{"2":{"10":1,"12":1,"13":1,"16":2,"17":1,"18":1,"19":1,"20":1,"21":3,"22":1,"26":2,"29":3,"30":1,"32":3,"35":1,"37":5,"39":2,"41":3,"51":1,"58":2,"59":2,"62":3,"63":1,"64":2,"66":3,"67":5,"74":1,"80":2,"81":2,"91":1,"102":1}}],["047283",{"2":{"91":1}}],["0474875",{"2":{"91":1}}],["0465",{"2":{"56":1}}],["0e8",{"2":{"84":1}}],["02627341416046051",{"2":{"96":1}}],["028497582895211832",{"2":{"96":1}}],["02",{"2":{"58":1}}],["0210077",{"2":{"25":1}}],["0214057",{"2":{"25":1}}],["0f20",{"2":{"58":1,"59":2,"62":6,"64":4,"65":6,"66":6,"67":10}}],["0f32",{"2":{"16":2}}],["06183225090497175",{"2":{"96":1}}],["060422",{"2":{"91":1}}],["0693719",{"2":{"91":1}}],["0625",{"2":{"58":2,"102":1}}],["0620649",{"2":{"26":1}}],["06755",{"2":{"56":1}}],["08964458904045909",{"2":{"96":1}}],["08383207080301504",{"2":{"96":1}}],["08",{"2":{"54":1}}],["0881736",{"2":{"27":1}}],["09470732715757708",{"2":{"96":1}}],["09317591352691727",{"2":{"96":1}}],["0916764",{"2":{"91":1}}],["0972941",{"2":{"91":1}}],["09",{"2":{"54":1}}],["096862",{"2":{"27":1}}],["0ºe",{"2":{"40":1}}],["07400365941169999",{"2":{"96":1}}],["0743642",{"2":{"91":1}}],["07111923498269067",{"2":{"96":1}}],["0776029",{"2":{"91":1}}],["07",{"2":{"58":2,"102":1}}],["0702532",{"2":{"26":1}}],["0723492",{"2":{"22":1}}],["03856393968274492",{"2":{"96":1}}],["0353507",{"2":{"91":1}}],["0358348",{"2":{"25":1}}],["0302534",{"2":{"91":1}}],["03361",{"2":{"56":1}}],["03",{"2":{"26":1}}],["00997173",{"2":{"91":1}}],["00990356",{"2":{"56":1}}],["00722034",{"2":{"56":1}}],["00709111",{"2":{"56":1}}],["0063020041736240135",{"2":{"96":1}}],["00684233",{"2":{"56":1}}],["00693713",{"2":{"56":1}}],["0057",{"2":{"56":1}}],["00388",{"2":{"56":1}}],["00",{"2":{"20":4,"46":16,"54":4,"58":9,"59":8,"62":12,"63":4,"64":8,"65":8,"66":12,"67":20,"74":4,"80":4,"102":5}}],["05116592548280876",{"2":{"96":1}}],["0512364",{"2":{"91":1}}],["05345455485976908",{"2":{"96":1}}],["05344184427965779",{"2":{"96":1}}],["0537",{"2":{"51":1,"52":1}}],["05846",{"2":{"56":1}}],["0593761",{"2":{"26":1}}],["0566881",{"2":{"26":1}}],["05t00",{"2":{"20":1}}],["05",{"2":{"17":2,"18":1,"21":3,"37":3}}],["013646215450068194",{"2":{"96":1}}],["0174532925199433",{"2":{"60":1}}],["0178074",{"2":{"56":1}}],["01t03",{"2":{"58":2,"102":1}}],["01t00",{"2":{"20":1,"46":4,"58":2,"102":1}}],["0117519",{"2":{"56":1}}],["0115514",{"2":{"56":1}}],["0127077",{"2":{"56":1}}],["0123091",{"2":{"56":1}}],["0121037",{"2":{"56":1}}],["019016",{"2":{"56":1}}],["0188721",{"2":{"82":2}}],["018571",{"2":{"56":1}}],["0182373",{"2":{"56":1}}],["0180572",{"2":{"56":1}}],["0183003",{"2":{"56":1}}],["018",{"2":{"51":1,"52":1}}],["01",{"2":{"10":6,"12":3,"13":3,"14":3,"16":12,"17":6,"18":3,"20":2,"21":9,"22":9,"23":3,"29":9,"30":3,"37":22,"39":8,"40":11,"46":8,"58":5,"59":4,"62":6,"63":2,"64":4,"65":6,"66":6,"67":10,"74":2,"80":2,"95":2,"96":4,"102":5}}],["0",{"2":{"8":1,"9":1,"10":6,"11":2,"12":6,"13":6,"14":7,"16":303,"17":7,"18":7,"19":7,"20":6,"21":10,"22":75,"25":36,"26":36,"27":45,"29":12,"30":6,"33":3,"34":1,"35":9,"37":1,"40":4,"41":27,"42":11,"47":2,"54":2,"55":40,"56":19,"58":7,"59":10,"60":6,"62":12,"63":6,"64":8,"65":6,"66":14,"67":20,"68":6,"74":6,"76":1,"78":1,"79":1,"80":6,"81":1,"82":40,"84":2,"85":1,"91":80,"92":1,"95":2,"96":19,"97":1,"102":4,"104":2,"105":2,"106":2}}],["┤",{"2":{"8":2,"9":2,"10":2,"12":2,"13":2,"14":4,"16":10,"17":2,"18":2,"19":2,"21":6,"22":5,"25":2,"26":4,"27":3,"29":4,"32":2,"33":6,"34":2,"35":2,"37":10,"41":6,"42":6,"47":4,"51":4,"52":2,"54":6,"55":3,"56":6,"58":2,"59":2,"62":6,"64":4,"65":5,"66":6,"67":10,"81":2,"91":4,"96":2}}],["┐",{"2":{"8":1,"9":1,"10":1,"12":1,"13":1,"14":2,"16":5,"17":1,"18":1,"19":1,"21":3,"22":4,"25":1,"26":2,"27":2,"29":2,"32":1,"33":3,"34":1,"35":1,"37":5,"41":3,"42":3,"47":2,"51":1,"54":2,"55":1,"58":1,"59":1,"62":3,"64":2,"65":4,"66":3,"67":5,"81":1,"91":2,"96":1}}],["│",{"2":{"8":2,"9":2,"10":2,"12":2,"13":2,"14":4,"16":10,"17":2,"18":2,"19":2,"21":6,"22":8,"25":2,"26":4,"27":4,"29":4,"32":2,"33":6,"34":2,"35":2,"37":10,"41":6,"42":6,"47":4,"51":4,"52":2,"54":6,"55":4,"56":6,"58":2,"59":2,"62":6,"64":4,"65":6,"66":6,"67":10,"81":2,"91":4,"96":2}}],["720352",{"2":{"91":1}}],["720635",{"2":{"82":2}}],["72",{"2":{"68":1}}],["725765",{"2":{"27":1}}],["768363",{"2":{"91":1}}],["761553",{"2":{"82":2}}],["76",{"2":{"68":1}}],["762559",{"2":{"26":1}}],["705063",{"2":{"91":1}}],["70",{"2":{"66":3,"68":1}}],["7030",{"2":{"60":1}}],["701332",{"2":{"22":1}}],["730",{"2":{"97":1}}],["732556",{"2":{"91":1}}],["7341",{"2":{"56":1}}],["73",{"2":{"56":1,"68":1}}],["731779",{"2":{"26":1}}],["755932",{"2":{"91":1}}],["75",{"2":{"68":1}}],["7593",{"2":{"56":1}}],["75891",{"2":{"56":1}}],["75269",{"2":{"25":1}}],["752417",{"2":{"22":1}}],["77",{"2":{"68":1}}],["77687",{"2":{"56":1}}],["77587",{"2":{"56":1}}],["770949",{"2":{"26":1}}],["79",{"2":{"59":2,"62":3,"63":1,"64":2,"65":2,"66":4,"67":5,"68":1,"74":1,"80":1}}],["79502",{"2":{"56":1}}],["793913",{"2":{"27":1}}],["791138",{"2":{"27":1}}],["796375",{"2":{"26":1}}],["746804",{"2":{"91":1}}],["74",{"2":{"68":1}}],["744521",{"2":{"26":1}}],["74732",{"2":{"25":1}}],["717",{"2":{"67":5}}],["71",{"2":{"66":1,"68":1}}],["7158",{"2":{"51":1,"52":1}}],["7119",{"2":{"51":1,"52":1}}],["71314",{"2":{"26":1}}],["718667",{"2":{"26":1}}],["71429",{"2":{"22":2}}],["78",{"2":{"66":1,"68":1}}],["780824",{"2":{"27":1}}],["78467",{"2":{"25":1}}],["789891",{"2":{"25":1}}],["781773",{"2":{"22":1}}],["7",{"2":{"8":1,"16":10,"21":3,"22":1,"26":1,"29":1,"34":1,"58":1,"78":1,"102":1}}],["→",{"2":{"4":1,"5":1,"6":1,"9":1,"10":1,"12":1,"13":1,"14":1,"16":2,"17":1,"18":1,"19":1,"20":1,"21":3,"22":6,"25":1,"26":3,"27":3,"29":3,"30":1,"32":3,"33":3,"34":1,"35":1,"37":6,"39":2,"40":2,"41":3,"42":2,"45":2,"46":4,"47":2,"51":1,"58":2,"59":2,"60":1,"62":3,"63":1,"64":2,"65":1,"66":3,"67":5,"74":1,"80":2,"81":2,"91":2,"102":1}}],["↓",{"2":{"4":3,"5":3,"6":1,"8":1,"9":1,"10":1,"12":1,"13":1,"14":2,"16":5,"17":1,"18":1,"19":1,"20":1,"21":3,"22":6,"25":1,"26":3,"27":3,"29":3,"30":1,"32":3,"33":3,"34":1,"35":1,"37":6,"39":2,"40":8,"41":3,"42":3,"44":1,"45":3,"46":4,"47":2,"51":3,"52":1,"54":4,"55":2,"56":3,"58":2,"59":2,"60":1,"62":3,"63":1,"64":2,"65":3,"66":3,"67":5,"74":1,"80":2,"81":2,"91":2,"96":2,"102":1}}],["438885",{"2":{"91":1}}],["4326",{"2":{"60":1}}],["43254",{"2":{"56":1}}],["4325",{"2":{"51":1,"52":1}}],["432286",{"2":{"22":1}}],["457984",{"2":{"82":2}}],["459041",{"2":{"82":2}}],["45×170×24",{"2":{"67":5}}],["456765",{"2":{"25":1}}],["48",{"2":{"91":1}}],["48367",{"2":{"56":1}}],["480",{"2":{"21":2,"42":1}}],["414041",{"2":{"82":2}}],["4198",{"2":{"56":1}}],["41241",{"2":{"56":1}}],["41049",{"2":{"56":1}}],["41634",{"2":{"56":1}}],["417937",{"2":{"22":1}}],["404819",{"2":{"91":1}}],["40",{"2":{"40":2}}],["400",{"2":{"25":1,"81":1,"95":1,"97":1}}],["44",{"2":{"37":1,"41":3}}],["471857",{"2":{"82":2}}],["47951",{"2":{"27":1}}],["475725",{"2":{"26":1}}],["472308",{"2":{"22":1}}],["497881",{"2":{"82":2}}],["497189",{"2":{"22":1}}],["49909",{"2":{"56":1}}],["4947",{"2":{"56":1}}],["492817",{"2":{"26":1}}],["4×30",{"2":{"22":1}}],["4×3×7",{"2":{"21":1}}],["4×3×2",{"2":{"19":1}}],["461652",{"2":{"91":1}}],["46506",{"2":{"56":1}}],["465103",{"2":{"22":1}}],["46",{"2":{"35":1,"91":1}}],["463503",{"2":{"22":1}}],["425153",{"2":{"27":1}}],["426519",{"2":{"25":1}}],["42857",{"2":{"22":2}}],["42",{"2":{"11":3}}],["4",{"2":{"4":4,"5":4,"16":4,"17":4,"18":2,"19":2,"20":1,"21":8,"22":9,"27":1,"34":1,"35":1,"51":2,"52":1,"53":1,"54":2,"55":2,"56":4,"81":3,"82":2,"91":3,"95":1,"97":1}}],["3d",{"0":{"106":1}}],["3hr",{"2":{"58":2,"102":3}}],["339529",{"2":{"91":1}}],["33565",{"2":{"56":1}}],["337926",{"2":{"25":1}}],["325997",{"2":{"91":1}}],["32555",{"2":{"56":1}}],["3252",{"2":{"51":1,"52":1}}],["32149",{"2":{"56":1}}],["327439",{"2":{"27":1}}],["3×3",{"2":{"47":1}}],["3×20",{"2":{"42":1}}],["384×192×251288",{"2":{"58":1}}],["3866",{"2":{"56":1}}],["38364",{"2":{"56":1}}],["3835",{"2":{"51":1,"52":1}}],["38",{"2":{"37":1,"66":3}}],["312",{"2":{"56":1}}],["31753",{"2":{"56":1}}],["3169",{"2":{"56":1}}],["3188",{"2":{"56":1}}],["31",{"2":{"37":2,"39":1,"40":1,"95":1,"96":2}}],["366",{"2":{"97":1}}],["365×1",{"2":{"96":1}}],["365",{"2":{"96":1,"97":4}}],["365971",{"2":{"27":1}}],["367809",{"2":{"82":2}}],["36126",{"2":{"56":1}}],["36142",{"2":{"56":1}}],["36836",{"2":{"56":1}}],["369",{"2":{"40":1}}],["36",{"2":{"37":1,"39":2,"40":1,"54":1}}],["3600",{"2":{"37":1,"39":2}}],["364288",{"2":{"25":1}}],["34818",{"2":{"56":1}}],["34832",{"2":{"56":1}}],["348362",{"2":{"25":1}}],["34549",{"2":{"56":1}}],["34218",{"2":{"56":1}}],["340769",{"2":{"27":1}}],["3785",{"2":{"91":1}}],["37878",{"2":{"56":1}}],["37",{"2":{"59":2,"62":3,"63":1,"64":2,"65":3,"66":3,"67":5,"74":1,"80":1}}],["372",{"2":{"56":1}}],["372761",{"2":{"22":1}}],["376409",{"2":{"26":1}}],["376135",{"2":{"22":1}}],["35700351866494",{"2":{"58":4,"102":2}}],["35432",{"2":{"56":1}}],["35483",{"2":{"56":1}}],["359",{"2":{"40":1,"58":2,"59":2,"62":3,"63":1,"64":2,"65":1,"68":2,"74":1,"80":1,"102":1}}],["35",{"2":{"10":1,"12":1,"13":1,"22":1,"29":1}}],["307f8f0e584a39a050c042849004e6a2bd674f99",{"2":{"60":1}}],["3069",{"2":{"56":1}}],["30018",{"2":{"56":1}}],["30142",{"2":{"56":1}}],["30113",{"2":{"56":1}}],["30×15×10",{"2":{"16":1}}],["30×10×15",{"2":{"10":1,"12":1,"13":1,"22":1,"29":1}}],["30",{"2":{"10":3,"12":1,"13":1,"14":2,"16":5,"22":5,"23":2,"26":10,"29":4,"30":2,"56":2,"58":1,"59":1,"62":3,"64":2,"65":3,"66":3,"67":5,"102":1}}],["393083",{"2":{"91":1}}],["395234",{"2":{"26":1}}],["39",{"2":{"10":1,"16":3,"18":1,"19":1,"33":1,"35":1,"37":1,"39":1,"40":1,"41":2,"56":1,"61":1,"62":1,"63":1,"73":1,"76":1,"84":2,"87":4,"96":3}}],["3",{"2":{"4":8,"5":8,"6":10,"10":1,"11":3,"12":3,"13":2,"16":4,"17":3,"18":1,"19":3,"20":1,"21":14,"22":6,"26":2,"27":1,"29":3,"32":5,"34":1,"37":4,"41":4,"42":5,"46":1,"47":2,"51":2,"56":31,"58":1,"59":1,"62":3,"64":2,"66":4,"67":5,"80":1,"81":3,"84":1,"91":3,"95":2}}],["zoom",{"2":{"106":1}}],["zopen",{"2":{"58":1,"82":1,"102":1}}],["zeros",{"2":{"81":3,"96":1}}],["z",{"2":{"4":2,"5":3,"6":2,"80":2}}],["zarray",{"2":{"82":1}}],["zarr",{"0":{"58":1,"75":1,"76":1,"101":1},"1":{"76":1},"2":{"0":1,"2":2,"4":2,"5":2,"6":2,"16":5,"17":1,"20":2,"23":1,"27":1,"47":1,"58":3,"75":5,"76":5,"79":3,"80":4,"81":6,"82":2,"84":2,"85":2,"94":2,"102":1}}],["xticklabelalign",{"2":{"95":1,"97":1}}],["xticklabelrotation",{"2":{"95":1,"97":1}}],["xlabel=",{"2":{"95":1,"97":1}}],["xx",{"2":{"59":1,"63":1,"74":1,"80":1}}],["xarray",{"2":{"49":1,"50":1}}],["x26",{"2":{"22":12,"40":12}}],["x3c",{"2":{"22":12,"40":4,"84":1}}],["xyz",{"2":{"21":2}}],["xy",{"2":{"19":2}}],["xyt",{"2":{"19":2,"21":2}}],["xin",{"2":{"18":8,"19":11,"21":8,"22":3,"41":3}}],["xout",{"2":{"16":2,"18":6,"19":6,"21":2,"22":3}}],["x",{"2":{"4":2,"5":3,"6":2,"13":2,"26":4,"27":3,"41":4,"47":2,"51":2,"52":1,"56":3,"60":1,"70":1,"82":2,"85":1,"91":5,"95":1,"96":6}}],["ndata",{"2":{"104":2,"105":1,"106":1}}],["ndays",{"2":{"96":4}}],["nlon",{"2":{"104":2,"105":1}}],["npy",{"2":{"95":2,"96":2}}],["nin",{"2":{"85":2}}],["ntr",{"2":{"85":1}}],["ntuple",{"2":{"85":4}}],["nthreads",{"2":{"84":2}}],["nvalid",{"2":{"84":1}}],["n",{"2":{"69":1,"84":3}}],["n256",{"2":{"56":1}}],["nan",{"2":{"50":1,"51":48,"52":48,"56":384}}],["name=cube",{"2":{"84":1}}],["named",{"2":{"63":1,"65":1,"66":1,"70":1,"84":2,"92":1}}],["namedtuple",{"2":{"18":1,"20":1,"84":1,"85":3}}],["names",{"0":{"21":1,"32":1,"43":1,"45":1},"1":{"33":1,"44":1,"45":1},"2":{"29":2,"46":1,"53":1,"70":2,"84":2,"85":1}}],["namely",{"2":{"16":1,"17":1}}],["name",{"0":{"44":1},"2":{"2":1,"18":4,"20":1,"45":1,"56":1,"58":3,"59":4,"62":12,"64":8,"65":12,"66":12,"67":20,"73":1,"81":2,"84":6,"85":5,"91":1}}],["nc",{"2":{"50":2,"59":2,"63":2,"74":2,"77":2,"78":3,"84":6}}],["number",{"2":{"49":1,"54":1,"76":1,"78":1,"84":2,"85":1,"96":1}}],["numbers",{"2":{"10":1,"91":1}}],["nout",{"2":{"85":2}}],["normal",{"2":{"84":1,"106":1}}],["north",{"2":{"60":1}}],["nometadata",{"2":{"51":3,"52":2,"54":1,"55":1,"56":10}}],["november",{"2":{"59":1,"63":1,"74":1,"80":1}}],["nov",{"2":{"51":4,"52":2,"53":1,"54":4,"55":4,"56":6}}],["nonmissingtype",{"2":{"85":1}}],["none",{"2":{"40":2,"45":1,"46":1,"58":1,"80":1,"102":1}}],["non",{"2":{"23":1,"84":1,"85":1,"95":1}}],["now",{"2":{"16":3,"18":1,"22":1,"33":1,"35":1,"37":1,"42":1,"46":1,"51":1,"52":1,"54":1,"56":1,"81":2,"82":1,"88":1}}],["no",{"2":{"14":1,"21":1,"27":1,"36":1,"76":1,"78":1,"81":1,"84":1,"85":1}}],["notice",{"2":{"76":1}}],["notation",{"2":{"37":1,"67":1}}],["nothing",{"2":{"18":1,"19":1,"21":1,"51":2,"54":2,"55":2,"56":5,"79":1,"84":1,"85":1}}],["note",{"2":{"9":1,"13":1,"16":4,"18":1,"21":1,"22":1,"33":1,"40":1,"47":1,"52":1,"59":1,"62":1,"81":1,"84":1,"85":1}}],["not",{"0":{"40":1},"2":{"0":1,"1":1,"13":1,"36":1,"40":3,"45":1,"46":2,"47":1,"50":1,"59":1,"81":2,"84":3,"85":3}}],["neighbour",{"2":{"84":1}}],["neighboring",{"2":{"13":1}}],["near",{"2":{"58":2,"67":1,"102":1}}],["needed",{"2":{"84":1}}],["need",{"2":{"45":1,"82":1,"84":1,"85":1,"87":1}}],["next",{"2":{"41":1,"42":1,"53":1,"88":2}}],["netcdf4",{"2":{"59":1}}],["netcdf",{"0":{"59":1,"77":1,"78":1},"1":{"78":1},"2":{"27":1,"47":1,"48":2,"59":4,"61":1,"63":2,"71":3,"74":2,"77":3,"78":2,"79":1,"84":2,"94":2}}],["necessary",{"2":{"16":1,"49":1,"50":1,"82":1,"85":4}}],["newdim",{"2":{"84":1}}],["new",{"0":{"9":1},"2":{"10":1,"12":1,"16":1,"29":1,"32":1,"33":3,"48":1,"50":1,"53":1,"72":1,"79":1,"80":1,"81":1,"84":5,"85":4,"87":6,"96":1}}],["bits",{"2":{"84":2}}],["big",{"2":{"70":1}}],["black",{"2":{"97":1}}],["blocks",{"2":{"84":1}}],["blosccompressor",{"2":{"76":1}}],["blue",{"2":{"60":1,"71":1}}],["bonito",{"2":{"106":1}}],["boundaries",{"2":{"85":1}}],["bounds",{"2":{"84":1}}],["bold",{"2":{"56":1}}],["bool=true",{"2":{"85":1}}],["bool=false",{"2":{"84":1,"85":1}}],["boolean",{"2":{"84":3}}],["bool",{"2":{"47":3,"85":6}}],["bwr",{"2":{"56":1}}],["b`",{"2":{"37":1}}],["broad",{"2":{"99":1}}],["broadcasts",{"2":{"85":1}}],["broadcast",{"2":{"51":1,"56":1}}],["broadcasted",{"2":{"16":2,"84":1,"85":1}}],["brown",{"2":{"97":1}}],["browser",{"2":{"88":1}}],["brightness",{"2":{"70":1,"71":1}}],["brings",{"2":{"85":1}}],["bring",{"2":{"34":1}}],["branch",{"2":{"58":1,"102":1}}],["bug",{"2":{"86":1}}],["bundle",{"2":{"71":1}}],["build",{"0":{"88":1},"2":{"32":1,"88":1}}],["but",{"0":{"40":1},"2":{"8":1,"16":2,"32":1,"33":2,"40":2,"45":1,"46":2,"59":1,"65":1,"66":1,"84":2}}],["b",{"2":{"17":2,"18":1,"19":1,"20":1,"22":13,"45":2,"67":2,"84":2}}],["backgroundcolor=",{"2":{"106":1}}],["back",{"2":{"84":1}}],["backend",{"2":{"79":2,"84":8}}],["backendlist",{"2":{"48":1,"84":1}}],["backend=",{"2":{"2":1,"16":2,"80":1}}],["based",{"0":{"101":1},"2":{"84":1,"85":1}}],["base",{"0":{"25":1},"2":{"4":4,"5":4,"6":2,"18":1,"20":1,"25":4,"29":3,"32":9,"33":6,"44":1,"45":5,"47":4,"81":6,"85":1,"91":2}}],["by=",{"2":{"42":2,"84":2}}],["bytes",{"2":{"8":1,"9":1,"14":1,"16":3,"17":1,"18":1,"19":1,"21":3,"22":1,"25":1,"27":1,"33":3,"34":1,"37":1,"42":2,"47":2,"54":1,"65":2,"78":4,"81":1,"91":1}}],["by",{"0":{"4":1,"5":1},"2":{"2":1,"10":2,"14":1,"16":1,"22":1,"28":1,"29":1,"33":1,"36":1,"37":6,"40":2,"42":1,"49":1,"53":1,"54":1,"55":1,"56":1,"58":1,"59":1,"70":3,"72":1,"73":1,"79":1,"82":2,"84":12,"85":6,"87":1,"88":1,"90":1,"96":1}}],["beware",{"2":{"98":1}}],["best",{"2":{"85":1,"100":1}}],["become",{"2":{"84":1}}],["because",{"2":{"1":1,"13":1,"14":1,"16":1}}],["before",{"2":{"81":1,"84":1,"88":1}}],["belonging",{"2":{"71":1}}],["belongs",{"2":{"22":1}}],["being",{"2":{"46":1}}],["been",{"2":{"40":1,"82":1}}],["between",{"2":{"26":1,"27":1,"37":1,"39":1,"40":2,"67":1,"76":1,"78":1,"84":1}}],["begin",{"2":{"23":1}}],["be",{"2":{"0":5,"2":1,"3":1,"4":1,"13":1,"15":1,"16":2,"22":1,"24":1,"37":1,"40":1,"41":1,"42":2,"45":1,"46":1,"50":1,"58":2,"59":1,"60":1,"61":2,"62":1,"68":1,"70":1,"72":2,"79":1,"80":1,"81":1,"84":23,"85":9,"87":1,"92":1,"93":1,"98":1,"102":1}}],["628915",{"2":{"91":1}}],["626919",{"2":{"91":1}}],["624506",{"2":{"91":1}}],["625389",{"2":{"27":1}}],["696114",{"2":{"91":1}}],["69",{"2":{"58":1}}],["69085",{"2":{"56":1}}],["600",{"2":{"95":1,"97":1,"103":1,"104":1,"105":1}}],["607478",{"2":{"91":1}}],["606561",{"2":{"91":1}}],["60265",{"2":{"58":1,"102":1}}],["60918",{"2":{"56":1}}],["60175",{"2":{"56":1}}],["647957",{"2":{"82":2}}],["64976",{"2":{"56":1}}],["642",{"2":{"50":1}}],["645758",{"2":{"25":1}}],["665833",{"2":{"91":1}}],["665723",{"2":{"25":1}}],["662295",{"2":{"27":1}}],["634856",{"2":{"91":1}}],["6326",{"2":{"60":1}}],["6378137",{"2":{"60":1}}],["63006",{"2":{"56":1}}],["630469",{"2":{"27":1}}],["63593",{"2":{"27":1}}],["655204",{"2":{"91":1}}],["65105",{"2":{"56":1}}],["658321",{"2":{"27":1}}],["652339",{"2":{"25":1}}],["6122",{"2":{"56":1}}],["61197",{"2":{"56":1}}],["611084",{"2":{"25":1}}],["619",{"2":{"51":1,"52":1}}],["617023",{"2":{"26":1}}],["6×6×25",{"2":{"26":2}}],["6×2",{"2":{"9":1}}],["673373",{"2":{"25":1}}],["671662",{"2":{"22":1}}],["672",{"2":{"21":1}}],["686278",{"2":{"27":1}}],["687891",{"2":{"26":1}}],["684389",{"2":{"22":1}}],["685454",{"2":{"22":1}}],["6",{"2":{"2":6,"4":6,"5":6,"6":6,"8":4,"9":5,"16":8,"22":1,"34":1,"37":1,"58":1,"102":1}}],["1e8",{"2":{"85":1}}],["1f2",{"2":{"47":1}}],["1992",{"2":{"84":1}}],["1991",{"2":{"84":1}}],["1990",{"2":{"84":1}}],["1984",{"2":{"60":1}}],["1983",{"2":{"54":1}}],["1980",{"2":{"54":1}}],["193109",{"2":{"26":1}}],["197238",{"2":{"25":1}}],["1921",{"2":{"82":2}}],["19241",{"2":{"56":1}}],["192",{"2":{"19":1,"104":1}}],["19",{"2":{"16":16,"66":3,"67":5}}],["18554488323324722",{"2":{"96":1}}],["18583",{"2":{"56":1}}],["183083",{"2":{"91":1}}],["18892",{"2":{"56":1}}],["18434",{"2":{"56":1}}],["180×170",{"2":{"65":1}}],["180×170×24",{"2":{"59":1,"62":3,"64":2}}],["180",{"2":{"40":2,"60":1,"67":5,"104":1}}],["180ºe",{"2":{"40":1}}],["181798",{"2":{"27":1}}],["18",{"2":{"16":18}}],["142733",{"2":{"91":1}}],["14286",{"2":{"22":1}}],["1437",{"2":{"56":1}}],["145747",{"2":{"22":1}}],["14",{"2":{"16":20,"27":1}}],["13853500608021024",{"2":{"96":1}}],["136",{"2":{"59":1,"63":1,"74":1,"80":1}}],["1363",{"2":{"51":1,"52":1}}],["13z",{"2":{"58":2,"102":1}}],["1372",{"2":{"51":1,"52":1}}],["13",{"2":{"16":20,"27":1,"40":6,"59":1,"63":1,"74":1,"80":1}}],["170",{"2":{"68":1}}],["179",{"2":{"60":1,"67":5}}],["17578125",{"2":{"60":2}}],["17593",{"2":{"22":1}}],["17434",{"2":{"56":1}}],["174934",{"2":{"25":1}}],["17852",{"2":{"56":1}}],["17863",{"2":{"56":1}}],["178603",{"2":{"22":1}}],["17647",{"2":{"56":1}}],["1762",{"2":{"51":1,"52":1}}],["17t00",{"2":{"54":1}}],["172",{"2":{"47":1}}],["17",{"2":{"14":1,"16":22,"42":1,"66":1}}],["16t00",{"2":{"59":4,"62":6,"63":2,"64":4,"65":4,"66":6,"67":10,"74":2,"80":2}}],["16t12",{"2":{"54":1}}],["1644",{"2":{"56":1}}],["16824",{"2":{"56":1}}],["16581",{"2":{"56":1}}],["165853",{"2":{"27":1}}],["16631",{"2":{"56":1}}],["166212",{"2":{"25":1}}],["16713",{"2":{"56":1}}],["167676",{"2":{"22":1}}],["16258",{"2":{"56":1}}],["162134",{"2":{"27":1}}],["169284",{"2":{"25":1}}],["16",{"2":{"10":1,"12":1,"13":1,"16":20,"22":1,"29":1,"59":2,"62":3,"63":1,"64":2,"65":4,"66":3,"67":5,"74":1,"80":1}}],["157268",{"2":{"91":1}}],["159",{"2":{"66":1}}],["15644",{"2":{"56":1}}],["15532",{"2":{"56":1}}],["151146",{"2":{"25":1}}],["152534",{"2":{"25":1}}],["15394",{"2":{"22":1}}],["15×10×30",{"2":{"16":1}}],["15×10",{"2":{"16":2}}],["15",{"2":{"10":1,"16":25,"22":6,"23":1,"27":4,"29":1,"30":1,"35":2,"42":1,"91":1}}],["128",{"2":{"106":1}}],["128204",{"2":{"25":1}}],["1242",{"2":{"56":1}}],["12575",{"2":{"56":1}}],["12568",{"2":{"26":1}}],["121",{"2":{"47":1}}],["121947",{"2":{"22":1}}],["12320189493957617",{"2":{"96":1}}],["123",{"2":{"17":1,"21":2}}],["1200",{"2":{"103":1,"104":1,"105":1}}],["120997",{"2":{"22":1}}],["120",{"2":{"16":1}}],["12",{"2":{"8":4,"16":20,"27":1,"37":10,"39":3,"40":4,"59":2,"62":3,"63":1,"64":2,"65":2,"66":3,"67":5,"74":1,"80":1,"95":1,"96":2}}],["1=5",{"2":{"2":1}}],["1159914",{"2":{"78":1}}],["119",{"2":{"65":1}}],["1181",{"2":{"56":1}}],["113553",{"2":{"55":3}}],["112319",{"2":{"55":12}}],["114815",{"2":{"55":6}}],["11",{"2":{"2":6,"4":6,"5":6,"6":6,"8":1,"16":18,"27":1,"51":4,"52":4,"56":4,"59":2,"62":3,"63":1,"64":2,"65":3,"66":3,"67":5,"74":1,"80":1}}],["1",{"2":{"2":12,"4":19,"5":20,"6":22,"8":5,"9":3,"10":8,"11":3,"12":7,"13":5,"14":6,"16":24,"17":10,"18":9,"19":8,"20":5,"21":17,"22":34,"23":3,"25":1,"26":7,"27":6,"29":15,"30":4,"32":3,"33":3,"34":8,"35":8,"37":23,"39":10,"40":8,"41":15,"42":14,"44":1,"45":3,"46":1,"47":5,"51":4,"52":2,"54":6,"55":10,"56":54,"58":4,"59":12,"62":12,"63":4,"64":8,"65":13,"66":18,"67":15,"68":2,"74":4,"80":11,"81":2,"82":2,"85":1,"91":11,"95":2,"96":5,"97":5,"102":3,"104":4,"105":2,"106":5}}],["1095",{"2":{"96":1}}],["10989",{"2":{"55":6}}],["10mb",{"2":{"84":2}}],["1083",{"2":{"56":1}}],["108696",{"2":{"55":6}}],["103704",{"2":{"55":3}}],["100",{"2":{"40":13}}],["1000",{"2":{"0":1,"104":1,"105":1}}],["10×170×24",{"2":{"66":1}}],["10×10×24",{"2":{"66":2}}],["10×10×8",{"2":{"37":1}}],["10×10×12",{"2":{"37":1}}],["10×10×36",{"2":{"37":1}}],["10×10×5",{"2":{"32":1}}],["10×10",{"2":{"33":3,"34":1,"37":1}}],["10×15×20",{"2":{"41":1}}],["10×15",{"2":{"14":1,"22":2,"42":1,"91":1}}],["10×20×5",{"2":{"29":1}}],["10x15",{"2":{"22":1}}],["101524",{"2":{"22":1}}],["10",{"2":{"2":14,"4":16,"5":18,"6":17,"10":3,"12":1,"13":1,"14":1,"16":21,"22":15,"23":3,"25":2,"27":4,"29":6,"30":2,"32":8,"33":12,"34":5,"35":4,"37":16,"39":10,"41":3,"42":2,"44":2,"45":4,"58":1,"59":2,"62":3,"64":2,"65":3,"66":6,"67":5,"80":2,"90":1,"91":3}}],["garbage",{"2":{"85":1}}],["gc",{"2":{"85":2}}],["gt",{"2":{"84":1,"85":3,"88":1}}],["gdalworkshop",{"2":{"60":1}}],["gdal",{"0":{"60":1},"2":{"60":1}}],["gb",{"2":{"58":1}}],["gn",{"2":{"58":1,"102":2}}],["gs",{"2":{"58":1,"102":2}}],["ggplot2",{"2":{"56":1}}],["github",{"2":{"50":2,"60":1,"86":1}}],["gives",{"2":{"22":1}}],["given",{"2":{"2":1,"22":2,"70":1,"72":1,"79":1,"84":6,"85":3,"91":1}}],["glob",{"2":{"84":1}}],["globalproperties=dict",{"2":{"85":1}}],["global",{"2":{"84":1,"85":1}}],["glmakie",{"2":{"42":2,"94":1,"102":2}}],["glue",{"2":{"8":1}}],["gradient",{"2":{"103":1,"104":1,"105":1,"106":1}}],["gradually",{"2":{"81":1}}],["grey25",{"2":{"106":1}}],["grey15",{"2":{"42":1,"56":1}}],["greenwich",{"2":{"60":1}}],["green",{"2":{"60":1,"71":1}}],["grouped",{"2":{"84":1}}],["groups",{"2":{"55":1}}],["groupby",{"0":{"51":1,"54":1},"1":{"52":1,"53":1,"55":1,"56":1},"2":{"48":1,"50":1,"51":6,"52":1,"53":1,"54":3,"55":3,"56":3,"84":1,"96":1}}],["group",{"0":{"48":1},"1":{"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1},"2":{"51":1,"53":1,"54":2,"71":1,"84":3}}],["grouping",{"2":{"42":2,"53":2}}],["grid=false",{"2":{"56":1}}],["grid",{"2":{"23":1,"70":1,"84":1}}],["gridchunks",{"2":{"2":3,"4":1,"5":1,"6":1,"84":1,"85":1}}],["go",{"2":{"88":2}}],["going",{"2":{"85":1}}],["good",{"2":{"56":1}}],["goal",{"2":{"21":1,"33":1,"49":1}}],["goes",{"2":{"16":2,"84":1,"85":1}}],["guide",{"2":{"10":2,"12":1,"13":1,"23":1,"29":3,"30":1}}],["gen",{"2":{"16":6}}],["general",{"0":{"99":1},"2":{"84":1,"93":1}}],["generated",{"2":{"59":1,"63":1,"74":1,"80":1,"85":1}}],["generate",{"2":{"16":2,"37":1,"39":1,"40":1,"84":1,"88":1}}],["generic",{"2":{"16":2,"18":1,"19":1,"21":1,"29":1,"84":1}}],["getting",{"0":{"89":1},"1":{"90":1,"91":1,"92":1}}],["gettarrayaxes",{"2":{"46":1}}],["getarrayinfo",{"2":{"85":1}}],["getaxis",{"2":{"34":1,"42":2,"84":1}}],["getloopchunks",{"2":{"85":1}}],["getloopcachesize",{"2":{"85":1}}],["getouttype",{"2":{"85":1}}],["getoutaxis",{"2":{"85":1}}],["getfrontperm",{"2":{"85":1}}],["gets",{"2":{"84":1,"85":1}}],["get",{"0":{"68":1},"2":{"10":1,"18":1,"32":1,"50":1,"54":1,"64":1,"66":1,"68":1,"85":3,"91":1,"96":1,"102":1}}],["geoaxis",{"2":{"104":1,"105":1}}],["geometrybasics",{"2":{"102":1}}],["geomakie",{"2":{"94":1,"102":1,"104":2,"105":1}}],["geogcs",{"2":{"60":1}}],["geojson",{"0":{"60":1}}],["geotiff",{"0":{"60":1}}],["geo",{"2":{"1":1}}],["g",{"2":{"7":1,"10":1,"11":1,"13":1,"16":4,"23":1,"29":1,"51":26,"52":2,"53":2,"54":2,"55":1,"56":18,"68":1,"70":1,"73":1,"84":5,"102":2}}],["2π",{"2":{"95":1}}],["2×3",{"2":{"91":1}}],["2×2×3",{"2":{"4":1,"5":1,"6":1}}],["2×2",{"2":{"2":3,"47":1}}],["2x2l31",{"2":{"59":1,"63":1,"74":1,"80":1}}],["2f0",{"2":{"47":1}}],["2963858",{"2":{"78":1}}],["298",{"2":{"60":1}}],["29816",{"2":{"56":1}}],["29473",{"2":{"56":1}}],["29564",{"2":{"56":1}}],["299637",{"2":{"26":1}}],["29",{"2":{"26":2}}],["283788",{"2":{"91":1}}],["28422753251364",{"2":{"58":4,"102":2}}],["28008",{"2":{"56":1}}],["2894",{"2":{"56":1}}],["288",{"2":{"54":1}}],["2818",{"2":{"51":1,"52":1}}],["28",{"2":{"26":2,"37":1,"51":3,"52":3,"56":3}}],["28571",{"2":{"22":2}}],["2857142857142857",{"2":{"10":1,"12":1,"13":1,"14":1,"22":3,"29":2,"30":1,"35":1,"41":3,"42":1,"91":1}}],["2747",{"2":{"56":1}}],["273",{"2":{"54":1}}],["276",{"2":{"54":2}}],["270",{"2":{"54":1}}],["275×205×9",{"2":{"51":4}}],["271209",{"2":{"27":1}}],["27",{"2":{"26":2,"51":1,"52":1,"56":1}}],["2d",{"2":{"19":5,"20":3,"21":2}}],["265107",{"2":{"91":1}}],["265797",{"2":{"25":1}}],["26274",{"2":{"56":1}}],["268675",{"2":{"26":1}}],["26",{"2":{"16":2,"26":2,"58":2,"102":1}}],["25526503219661817",{"2":{"96":1}}],["258509",{"2":{"91":1}}],["257223563",{"2":{"60":1}}],["25153",{"2":{"56":1}}],["25",{"2":{"16":4,"26":10,"37":1,"95":1}}],["245867",{"2":{"91":1}}],["24375",{"2":{"56":1}}],["2434",{"2":{"56":1}}],["241882",{"2":{"25":1}}],["24",{"2":{"16":6,"42":1,"65":2}}],["240588",{"2":{"91":1}}],["240",{"2":{"14":1,"16":1,"27":1}}],["235899",{"2":{"91":1}}],["235707",{"2":{"91":1}}],["234116",{"2":{"91":1}}],["237824",{"2":{"27":1}}],["23",{"2":{"16":8,"41":3,"56":1,"59":2,"62":3,"63":1,"64":2,"65":3,"66":3,"67":5,"74":1,"80":1}}],["223574",{"2":{"82":2}}],["22211",{"2":{"56":1}}],["229281",{"2":{"27":1}}],["225542",{"2":{"26":1}}],["22",{"2":{"16":10}}],["21t06",{"2":{"58":2,"102":1}}],["21t19",{"2":{"46":4}}],["2101",{"2":{"58":2,"102":1}}],["21056",{"2":{"26":1}}],["21699",{"2":{"56":1}}],["21209",{"2":{"56":1}}],["215988",{"2":{"27":1}}],["215973",{"2":{"26":1}}],["21",{"2":{"16":12,"51":8,"52":8,"56":8}}],["2=10",{"2":{"2":1}}],["2",{"2":{"2":3,"4":8,"5":9,"6":10,"8":1,"9":1,"11":3,"12":2,"13":1,"14":1,"17":1,"18":2,"19":2,"20":1,"22":9,"23":1,"25":2,"27":3,"29":1,"32":3,"33":6,"34":3,"37":1,"42":6,"45":4,"46":1,"47":8,"51":1,"52":1,"56":40,"58":3,"59":3,"62":6,"63":1,"64":4,"65":2,"66":2,"67":5,"68":2,"74":1,"80":2,"81":2,"84":2,"91":5,"102":3,"104":2,"106":1}}],["2003",{"2":{"59":1,"63":1,"74":1,"80":1}}],["2004",{"2":{"59":1,"63":1,"74":1,"80":1}}],["2005",{"2":{"59":2,"62":3,"63":1,"64":2,"65":3,"66":3,"67":5,"74":1,"80":1}}],["2002",{"2":{"59":3,"62":3,"63":2,"64":2,"65":2,"66":3,"67":5,"74":2,"80":1}}],["2001",{"2":{"59":3,"62":3,"63":2,"64":2,"65":3,"66":3,"67":5,"74":2,"80":1}}],["2000",{"2":{"26":4}}],["2019",{"2":{"58":2,"102":1}}],["2015",{"2":{"58":2,"59":1,"63":1,"74":1,"80":1,"102":2}}],["20×10×15",{"2":{"41":2}}],["20×10×15×2",{"2":{"35":1,"91":1}}],["20ºn",{"2":{"40":1}}],["203714",{"2":{"26":1}}],["2023",{"2":{"95":1,"96":2}}],["2021",{"2":{"37":9,"95":1,"96":2,"97":1}}],["2020",{"2":{"37":5,"39":3,"40":4,"46":8,"72":1}}],["2024",{"2":{"26":4}}],["2022",{"2":{"10":4,"12":2,"13":2,"14":2,"16":8,"17":4,"18":2,"20":2,"21":6,"22":6,"23":2,"29":6,"30":2,"37":5,"39":3,"40":4,"97":1}}],["20",{"2":{"2":7,"4":10,"5":10,"6":10,"16":14,"29":2,"35":4,"40":2,"41":3,"42":1,"56":1,"80":2,"91":3}}],["542309",{"2":{"91":1}}],["540514",{"2":{"26":1}}],["55",{"2":{"96":1}}],["552072",{"2":{"91":1}}],["551732",{"2":{"22":1}}],["5e8",{"2":{"79":1,"84":1}}],["5743",{"2":{"56":1}}],["57873",{"2":{"56":1}}],["57695",{"2":{"56":1}}],["57143",{"2":{"22":2}}],["56632",{"2":{"56":1}}],["561549",{"2":{"26":1}}],["52908",{"2":{"91":1}}],["520406",{"2":{"82":2}}],["520744",{"2":{"27":1}}],["52419",{"2":{"56":1}}],["521769",{"2":{"27":1}}],["521991",{"2":{"26":1}}],["522262",{"2":{"27":1}}],["59212",{"2":{"56":1}}],["59085",{"2":{"56":1}}],["594514",{"2":{"25":1}}],["595405",{"2":{"22":1}}],["5×4",{"2":{"82":2}}],["5×4×5",{"2":{"81":1}}],["5×4×3",{"2":{"21":2}}],["5×4×3×2",{"2":{"17":1,"18":1}}],["5×6×36",{"2":{"37":1}}],["5×6",{"2":{"27":2}}],["5×10",{"2":{"25":2}}],["507176",{"2":{"91":1}}],["508557",{"2":{"22":1}}],["50089",{"2":{"56":1}}],["500",{"2":{"0":1,"56":1,"106":2}}],["500mb",{"2":{"0":2}}],["531092",{"2":{"91":1}}],["53",{"2":{"65":1}}],["536273",{"2":{"27":1}}],["536399",{"2":{"22":1}}],["538981",{"2":{"22":1}}],["515079",{"2":{"91":1}}],["5173",{"2":{"88":1}}],["514979",{"2":{"22":1}}],["519282115735095",{"2":{"11":1}}],["587477",{"2":{"91":1}}],["5843",{"2":{"51":1,"52":1}}],["581312",{"2":{"25":1}}],["58",{"2":{"16":2}}],["5",{"2":{"2":7,"4":16,"5":18,"6":7,"10":2,"12":3,"13":2,"14":1,"16":6,"17":2,"21":4,"22":10,"23":1,"25":2,"27":4,"29":5,"30":1,"32":4,"34":1,"35":2,"37":3,"39":4,"41":3,"42":2,"45":4,"56":5,"59":4,"62":6,"63":2,"64":4,"65":3,"66":10,"67":10,"68":19,"74":2,"80":4,"81":6,"82":3,"91":2,"92":1,"97":2,"106":2}}],["rotate",{"2":{"106":1}}],["row",{"2":{"73":1,"84":1}}],["rowgap",{"2":{"56":1}}],["right",{"2":{"95":1,"97":1}}],["rights",{"2":{"82":1}}],["r",{"2":{"81":1}}],["r1i1p1f1",{"2":{"58":2,"102":3}}],["running",{"2":{"88":1}}],["run",{"2":{"23":1,"88":3,"93":2}}],["runs",{"2":{"13":1,"85":1}}],["ram",{"2":{"61":1}}],["race",{"2":{"59":1}}],["rafaqz",{"2":{"50":1}}],["raw",{"2":{"50":1,"60":1}}],["rasm",{"2":{"50":2}}],["ras",{"2":{"26":3}}],["rasters",{"2":{"26":2}}],["raster",{"0":{"26":1},"2":{"22":11,"26":5}}],["ranges",{"0":{"66":1},"2":{"34":1,"63":1}}],["range",{"2":{"10":2,"16":2,"17":2,"22":2,"23":2,"29":2,"35":3,"37":1,"85":1,"91":3,"95":1}}],["randn",{"2":{"95":1}}],["random",{"2":{"17":2,"40":2,"46":3,"91":1}}],["rand",{"2":{"2":1,"4":3,"5":3,"6":3,"8":2,"9":2,"10":1,"17":1,"19":1,"21":3,"22":1,"23":1,"25":1,"26":1,"27":1,"29":2,"30":1,"32":1,"33":2,"35":2,"40":3,"42":1,"44":1,"45":3,"80":1,"82":1,"91":2}}],["relational",{"2":{"70":1}}],["related",{"2":{"50":1}}],["recommend",{"2":{"92":1}}],["recommended",{"2":{"67":1}}],["rechunking",{"2":{"85":1}}],["recalculate",{"2":{"85":1}}],["recal",{"2":{"85":1}}],["recently",{"2":{"0":1}}],["reentrantlock",{"2":{"59":1}}],["rewrote",{"2":{"58":1,"59":1,"63":1,"74":1,"80":1,"102":1}}],["realization",{"2":{"59":1,"63":1,"74":1,"80":1}}],["realm",{"2":{"58":1,"102":1}}],["readcubedata",{"0":{"62":1},"2":{"40":2,"61":1,"62":1,"84":1}}],["read",{"0":{"57":1,"58":1,"59":1,"60":1},"1":{"58":1,"59":1,"60":1,"61":1,"62":1},"2":{"1":1,"40":1,"50":1,"57":1,"60":1,"66":1,"84":1}}],["red",{"2":{"56":1,"60":1,"71":1}}],["reduce",{"2":{"10":1,"14":1,"19":1}}],["reverse",{"2":{"56":1}}],["reverseordered",{"2":{"9":1,"60":1,"91":1}}],["rename",{"2":{"45":1}}],["resets",{"2":{"84":1,"85":1}}],["respectively",{"2":{"71":1}}],["reshape",{"2":{"37":1,"39":2}}],["result",{"2":{"34":1,"42":1}}],["resulting",{"2":{"8":1,"9":1,"14":1,"84":1,"85":1}}],["results",{"0":{"97":1},"2":{"2":1,"5":1,"56":2,"84":1,"85":1}}],["references",{"2":{"59":1,"63":1,"74":1,"80":1}}],["reference",{"0":{"83":1},"1":{"84":1,"85":1},"2":{"46":1}}],["ref",{"2":{"35":1,"84":1,"85":1}}],["rebuild",{"0":{"33":1},"2":{"32":1,"33":2,"46":2,"50":1}}],["repeat",{"2":{"95":1}}],["repl",{"2":{"90":1,"93":1}}],["replace",{"2":{"23":1,"50":1,"106":1}}],["repository",{"2":{"86":1,"98":1}}],["reports",{"2":{"86":1}}],["reproduces",{"2":{"49":1}}],["represented",{"2":{"84":1,"100":1}}],["represents",{"2":{"71":1}}],["representing",{"2":{"22":2,"85":1}}],["representation",{"2":{"1":1,"84":2,"85":3}}],["re",{"2":{"22":1}}],["registry",{"2":{"93":1}}],["registration",{"2":{"85":2}}],["registered",{"2":{"85":1,"93":1}}],["regions",{"2":{"22":8}}],["region",{"2":{"22":12}}],["regular",{"2":{"4":4,"5":4,"6":2,"8":1,"9":1,"10":3,"12":3,"13":3,"14":3,"16":9,"17":3,"18":3,"19":2,"20":2,"21":9,"22":8,"25":2,"26":6,"27":4,"29":9,"30":3,"32":9,"33":6,"34":2,"35":3,"37":14,"39":6,"40":4,"41":9,"42":3,"44":1,"45":5,"47":4,"51":2,"52":2,"56":6,"58":2,"59":4,"60":2,"62":6,"63":2,"64":4,"65":2,"66":3,"67":10,"68":2,"74":2,"80":5,"81":6,"91":5,"96":1,"102":1}}],["regularchunks",{"2":{"2":6,"4":3,"5":3,"6":3}}],["returned",{"2":{"84":1}}],["returns",{"2":{"84":5,"85":2}}],["return",{"2":{"18":1,"19":1,"21":2,"22":4,"51":1,"84":1,"85":1,"96":1}}],["requests",{"2":{"86":1}}],["requested",{"2":{"13":1}}],["requirements",{"2":{"59":1,"63":1,"74":1,"80":1}}],["required",{"2":{"37":1}}],["requires",{"2":{"16":1}}],["removes",{"2":{"85":1}}],["remove",{"2":{"52":1}}],["removed",{"2":{"15":1,"85":1}}],["remote",{"2":{"0":1}}],["http",{"2":{"88":1}}],["https",{"2":{"50":2,"59":1,"60":1,"63":1,"71":1,"74":1}}],["html",{"2":{"71":1}}],["hdf5",{"2":{"59":1}}],["hr",{"2":{"58":1,"102":2}}],["history",{"2":{"58":2,"59":2,"62":3,"63":1,"64":2,"65":3,"66":3,"67":5,"74":1,"80":1,"102":1}}],["hidedecorations",{"2":{"56":1}}],["highclip",{"2":{"56":4}}],["high",{"2":{"46":4}}],["hm",{"2":{"56":8}}],["hold",{"2":{"84":1}}],["holds",{"2":{"84":1,"85":1}}],["ho",{"0":{"46":1}}],["however",{"2":{"24":1,"37":1}}],["how",{"0":{"35":1,"36":1,"41":1,"42":1,"43":1,"93":1},"1":{"37":1,"38":1,"39":1,"40":1,"44":1,"45":1},"2":{"6":1,"7":1,"10":1,"17":2,"18":1,"24":1,"28":1,"31":1,"42":1,"57":1,"62":3,"82":1,"84":1,"98":1,"100":1}}],["happens",{"2":{"85":1}}],["had",{"2":{"82":1,"84":1,"85":1}}],["hard",{"2":{"62":1}}],["hamman",{"2":{"49":1,"56":1}}],["handled",{"2":{"85":1}}],["handle",{"2":{"70":1,"85":1}}],["handling",{"2":{"9":1,"84":1}}],["handy",{"2":{"42":1}}],["has",{"2":{"8":1,"9":1,"22":1,"26":1,"27":1,"40":1,"49":1,"52":1,"85":1}}],["half",{"2":{"8":5}}],["have",{"2":{"6":1,"9":1,"22":1,"29":1,"38":1,"40":2,"72":1,"84":3}}],["having",{"2":{"1":1,"22":1}}],["help",{"2":{"84":1,"85":2}}],["height",{"2":{"58":2,"102":1}}],["heatmap",{"0":{"103":1},"2":{"42":1,"56":3,"103":1}}],["hereby",{"2":{"22":1}}],["here",{"2":{"8":1,"9":1,"13":1,"16":2,"17":1,"21":1,"22":1,"36":1,"42":1,"66":1,"81":1,"87":2}}],["hence",{"2":{"1":1}}],["yet",{"2":{"84":1}}],["yeesian",{"2":{"60":1}}],["years",{"2":{"37":1,"95":1,"96":1}}],["year",{"2":{"8":4,"97":1}}],["yyyy",{"2":{"59":2,"63":2,"74":2,"80":2}}],["ylabel=",{"2":{"95":1,"97":1}}],["ylabel",{"2":{"56":3}}],["yasxa",{"2":{"40":6}}],["yaxcolumn",{"2":{"85":1}}],["yaxconvert",{"2":{"27":2}}],["yaxdefaults",{"2":{"85":1}}],["yaxarraybase",{"2":{"27":1,"84":1,"85":1}}],["yaxarray",{"0":{"11":1,"17":1,"29":1,"36":1,"37":1,"47":1,"64":1,"70":1},"1":{"18":1,"19":1,"20":1,"37":1,"38":1,"39":1,"40":1},"2":{"2":1,"4":4,"5":4,"6":4,"7":1,"8":3,"9":3,"10":2,"12":1,"13":1,"14":2,"16":8,"17":2,"18":1,"19":2,"20":1,"21":6,"22":3,"23":1,"25":4,"26":3,"27":5,"29":5,"30":2,"32":3,"33":5,"34":1,"35":3,"36":1,"37":15,"39":4,"40":6,"41":3,"42":4,"44":2,"45":4,"46":4,"47":4,"50":2,"51":7,"52":1,"54":9,"55":1,"56":3,"58":2,"59":2,"60":1,"62":3,"63":2,"64":2,"65":3,"66":3,"67":5,"70":1,"72":1,"74":1,"75":1,"77":1,"80":2,"81":4,"84":10,"85":3,"91":5,"96":2,"100":1,"102":1}}],["yaxarrays",{"0":{"0":1,"1":1,"2":1,"7":1,"10":1,"16":1,"24":1,"28":1,"43":1,"48":1,"57":1,"63":1,"74":1,"86":1,"93":1,"99":1,"100":1},"1":{"2":1,"3":1,"4":1,"5":1,"6":1,"8":1,"9":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"25":1,"26":1,"27":1,"29":1,"30":1,"44":1,"45":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"58":1,"59":1,"60":1,"61":1,"62":1,"64":1,"65":1,"66":1,"67":1,"68":1,"75":1,"76":1,"77":1,"78":1,"79":1,"80":1,"81":1,"82":1,"87":1,"88":1},"2":{"0":3,"2":1,"4":1,"5":1,"6":1,"8":1,"9":1,"10":2,"16":4,"17":1,"22":1,"23":2,"24":2,"25":1,"29":1,"32":1,"33":1,"35":1,"36":1,"37":1,"38":1,"39":2,"40":4,"44":1,"45":1,"46":2,"48":1,"57":1,"58":1,"59":1,"60":2,"63":1,"69":1,"71":1,"74":1,"79":1,"81":1,"84":28,"85":28,"86":1,"88":1,"90":3,"91":3,"92":2,"93":4,"96":1,"98":1,"99":1,"102":1}}],["yax",{"2":{"0":1,"17":1,"18":1,"19":1,"20":3,"21":4,"33":1,"46":3,"47":2}}],["y",{"2":{"4":2,"5":3,"6":2,"26":4,"27":3,"37":4,"41":4,"51":2,"52":1,"56":3,"60":1,"70":1,"91":5}}],["you",{"2":{"1":1,"23":1,"36":1,"40":3,"45":2,"61":1,"62":1,"76":1,"84":1,"85":2,"87":1,"88":2,"90":2,"92":1,"93":3,"98":3,"100":2}}],["yourself",{"2":{"88":1}}],["your",{"2":{"1":2,"40":2,"59":1,"79":2,"81":1,"84":1,"87":4,"88":4}}],["circshift",{"2":{"104":1}}],["ct1",{"2":{"102":4,"103":1}}],["cycle",{"0":{"95":1,"97":1},"1":{"96":1,"97":1},"2":{"96":4}}],["cycle=12",{"2":{"51":2,"52":1,"54":2,"55":2,"56":3}}],["cdata",{"2":{"85":1}}],["center",{"2":{"84":1,"95":1,"97":1}}],["certain",{"2":{"63":2,"85":1}}],["cell",{"2":{"58":2,"59":1,"62":3,"64":2,"65":3,"66":3,"67":5,"84":1}}],["cf",{"2":{"58":2,"59":2,"63":2,"74":2,"80":2,"102":2}}],["cftime",{"2":{"51":2,"54":5,"55":2,"56":2,"59":6,"62":9,"63":3,"64":6,"65":7,"66":9,"67":15,"74":3,"80":3}}],["cmpcachmisses",{"2":{"85":1}}],["cm4",{"2":{"59":4,"63":4,"74":4,"80":4}}],["cmip",{"2":{"58":1,"102":1}}],["cmip6",{"2":{"58":3,"102":6}}],["cmor",{"2":{"58":2,"59":3,"62":3,"63":2,"64":2,"65":3,"66":3,"67":5,"74":2,"80":2,"102":1}}],["c54",{"2":{"56":1}}],["cb",{"2":{"56":1}}],["cbar",{"2":{"42":1}}],["cgrad",{"2":{"42":1}}],["cl",{"2":{"104":1,"105":1}}],["cl=lines",{"2":{"104":1,"105":1}}],["clean",{"2":{"85":1}}],["cleanme",{"2":{"85":4}}],["cleaner",{"2":{"84":2}}],["clevel=n",{"2":{"76":1}}],["climate",{"2":{"59":1,"63":1,"74":1,"80":1}}],["closedinterval",{"2":{"67":1}}],["closed",{"0":{"67":1},"2":{"67":3}}],["close",{"2":{"46":4}}],["cloud",{"2":{"11":1,"58":1}}],["classes=classes",{"2":{"42":1}}],["classes",{"2":{"42":8}}],["classification",{"2":{"42":2}}],["class",{"2":{"42":3}}],["clustermanagers",{"2":{"23":2}}],["cluster",{"2":{"23":1}}],["cpus",{"2":{"23":1}}],["cpu",{"2":{"23":1}}],["c",{"2":{"22":11,"32":5,"33":7,"34":3,"42":2,"45":2,"71":1,"76":1,"78":4,"84":5,"85":3,"96":4,"102":2}}],["custom",{"2":{"29":1,"84":1}}],["current",{"2":{"22":2,"71":1,"84":1,"97":1}}],["currently",{"2":{"16":1,"46":1,"50":1,"98":1}}],["cubeaxis",{"2":{"85":1}}],["cubeaxes",{"2":{"84":1}}],["cubedir",{"2":{"85":1}}],["cube2",{"2":{"84":1}}],["cube1",{"2":{"84":1}}],["cubelist",{"2":{"84":1}}],["cubefittable",{"2":{"42":2,"84":1}}],["cubetable",{"0":{"42":1},"2":{"42":3,"84":3}}],["cubes",{"0":{"35":1},"2":{"9":2,"17":1,"21":1,"35":2,"40":1,"41":2,"42":1,"64":1,"72":1,"84":18,"85":9}}],["cube",{"0":{"32":1,"34":1,"36":1,"72":1,"96":1},"1":{"33":1,"37":1,"38":1,"39":1,"40":1},"2":{"2":1,"4":1,"5":1,"6":1,"16":11,"17":2,"19":2,"21":2,"32":1,"34":1,"36":2,"40":1,"41":1,"42":2,"50":1,"72":3,"81":1,"84":34,"85":19,"100":1}}],["chose",{"2":{"71":1}}],["child",{"2":{"58":1,"102":1}}],["check",{"2":{"16":1,"81":1,"92":1}}],["changed",{"2":{"92":1,"98":1}}],["changes",{"2":{"62":1}}],["change",{"2":{"10":1,"84":1,"85":1}}],["chunkoffset",{"2":{"85":1}}],["chunksize`",{"2":{"85":1}}],["chunksizes",{"2":{"84":2}}],["chunksize",{"2":{"84":1,"85":3}}],["chunks",{"0":{"4":1},"2":{"2":5,"4":1,"5":1,"6":2,"84":4,"85":11}}],["chunked",{"2":{"2":5}}],["chunking",{"0":{"2":1,"3":1,"5":1,"6":1},"1":{"4":1,"5":1,"6":1},"2":{"1":1,"5":1,"84":4,"85":3}}],["chunk",{"0":{"1":1},"1":{"2":1,"3":1,"4":1,"5":1,"6":1},"2":{"1":1,"2":1,"4":1,"5":1,"84":4,"85":4}}],["criteria",{"2":{"42":1}}],["creation",{"2":{"47":1}}],["creating",{"0":{"22":1},"2":{"10":1,"33":1,"37":1,"81":1,"87":1}}],["createdataset",{"2":{"85":2}}],["created",{"2":{"85":2}}],["creates",{"2":{"42":1,"84":2,"85":1}}],["create",{"0":{"28":1,"29":1,"30":1,"47":1},"1":{"29":1,"30":1},"2":{"10":1,"16":1,"22":2,"28":1,"29":1,"33":1,"35":1,"37":2,"42":1,"46":1,"50":1,"54":1,"74":1,"79":1,"81":3,"84":1,"85":1,"91":1,"95":1}}],["crucial",{"2":{"1":1}}],["coastlines",{"2":{"104":3,"105":1}}],["cosd",{"2":{"84":1}}],["country",{"2":{"84":4}}],["country=cube2",{"2":{"84":1}}],["could",{"2":{"33":1,"46":1,"61":1}}],["copies",{"2":{"85":1}}],["copied",{"2":{"81":1}}],["copybuf",{"2":{"85":2}}],["copydata",{"2":{"85":1}}],["copy",{"2":{"32":1,"84":1,"88":1}}],["coordinates",{"2":{"58":1}}],["college",{"2":{"98":1}}],["collected",{"2":{"85":1}}],["collectfromhandle",{"2":{"85":1}}],["collection",{"2":{"31":1,"70":1}}],["collect",{"2":{"25":1,"34":3,"96":1}}],["colonperm",{"2":{"85":1}}],["color=",{"2":{"97":3}}],["color",{"2":{"95":1,"104":1,"105":1,"106":1}}],["colormap=",{"2":{"56":1}}],["colormap=makie",{"2":{"42":1}}],["colormap",{"2":{"56":3,"103":1,"104":1,"105":1,"106":1}}],["colorrange=",{"2":{"56":1}}],["colorrange",{"2":{"56":3}}],["colorbar",{"2":{"42":1,"56":2}}],["column",{"2":{"73":1,"85":1}}],["colgap",{"2":{"56":1}}],["colnames",{"2":{"46":1}}],["configuration",{"2":{"85":2}}],["concatenating",{"2":{"84":1}}],["concatenates",{"2":{"84":2}}],["concatenate",{"0":{"35":1},"2":{"35":2,"84":2}}],["concatenatecubes",{"0":{"9":1},"2":{"9":2,"35":2,"84":2}}],["concrete",{"2":{"84":2}}],["contributing",{"2":{"87":1}}],["contribute",{"0":{"86":1,"87":1},"1":{"87":1,"88":2}}],["contrast",{"2":{"84":1}}],["content",{"2":{"84":1}}],["contact",{"2":{"59":1,"63":1,"74":1,"80":1}}],["contains",{"2":{"67":1,"84":1,"85":1}}],["contain",{"2":{"58":1,"59":1,"85":1}}],["containing",{"0":{"47":1},"2":{"8":1,"42":1,"71":1,"72":1,"84":1}}],["continue",{"2":{"51":1}}],["consolidated=true",{"2":{"58":1,"102":1}}],["constructor",{"2":{"84":1}}],["constructs",{"2":{"84":1}}],["construct",{"0":{"46":1},"2":{"84":2}}],["consistent",{"2":{"58":1,"102":1}}],["consisting",{"2":{"8":1}}],["considering",{"2":{"49":1}}],["considered",{"2":{"42":1}}],["consider",{"2":{"17":1,"19":1,"21":1,"33":1}}],["convinient",{"2":{"31":1}}],["conventions",{"2":{"59":1,"63":1,"74":1,"80":1}}],["convenient",{"2":{"23":1}}],["conversion",{"2":{"24":1,"26":1,"27":1}}],["conversions",{"2":{"24":1}}],["converted",{"2":{"72":1}}],["convert",{"0":{"24":1,"25":1,"26":1,"27":1},"1":{"25":1,"26":1,"27":1},"2":{"24":1,"25":2,"27":2,"84":1,"85":1}}],["corresponding",{"2":{"7":1,"21":2,"22":2,"72":1,"84":1}}],["combining",{"0":{"101":1}}],["combined",{"2":{"9":2,"72":2}}],["combine",{"0":{"7":1},"1":{"8":1,"9":1},"2":{"7":1,"8":1,"9":1,"100":1}}],["command",{"2":{"93":2}}],["comment",{"2":{"58":1}}],["common",{"2":{"40":5,"84":1}}],["com",{"2":{"50":2,"60":1}}],["compiler",{"2":{"92":1}}],["compuation",{"2":{"84":1}}],["computing",{"2":{"42":1}}],["computations",{"2":{"13":1,"41":1}}],["computation",{"0":{"23":1},"2":{"13":1,"70":1,"84":3,"85":3}}],["computed",{"2":{"85":1}}],["compute",{"0":{"10":1},"1":{"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1},"2":{"96":1}}],["compares",{"2":{"85":1}}],["comparing",{"2":{"78":1}}],["compatible",{"2":{"60":1}}],["compress",{"2":{"78":2}}],["compress=n",{"2":{"78":1}}],["compressors",{"2":{"76":1}}],["compressor=compression",{"2":{"76":1}}],["compression",{"0":{"76":1,"78":1},"2":{"76":5,"78":4}}],["completely",{"2":{"61":1}}],["complexity",{"2":{"41":1}}],["complex",{"2":{"10":2,"91":1}}],["comply",{"2":{"59":1,"63":1,"74":1,"80":1}}],["comes",{"2":{"1":1}}],["code",{"2":{"6":1,"13":1,"23":2,"31":1,"46":1,"59":2}}],["captialisation",{"2":{"85":1}}],["cameracontrols",{"2":{"106":1}}],["came",{"2":{"72":1}}],["cairomakie",{"2":{"56":1,"95":2}}],["caxes",{"2":{"32":2,"84":2}}],["car",{"2":{"22":1}}],["cartesianindex",{"2":{"22":11}}],["caluclate",{"2":{"84":1}}],["calculations",{"2":{"56":1,"85":1}}],["calculating",{"2":{"14":1,"84":1}}],["calculates",{"2":{"84":1}}],["calculated",{"2":{"42":2,"51":1}}],["calculate",{"2":{"14":1,"22":1,"42":2,"48":1,"49":2,"51":1,"56":1,"85":2,"96":1}}],["calling",{"2":{"56":1}}],["called",{"2":{"16":1,"70":3,"85":1}}],["call",{"2":{"1":1,"23":1}}],["case",{"2":{"13":1,"19":1,"40":1,"53":1,"58":1,"62":1}}],["cases",{"2":{"0":1,"61":1,"67":1,"98":1}}],["cataxis",{"2":{"84":2}}],["categoricalaxis",{"2":{"84":1}}],["categorical",{"2":{"9":1,"17":1,"18":1,"19":1,"22":1,"35":1,"42":1,"46":4,"51":2,"52":1,"53":1,"54":2,"55":2,"56":3,"84":1,"85":1,"91":1}}],["cat",{"0":{"8":1},"2":{"8":2}}],["cache=1gb```",{"2":{"84":1}}],["cache=1e9",{"2":{"16":2}}],["cache=",{"2":{"84":1}}],["cache=5",{"2":{"84":1}}],["cache=yaxdefaults",{"2":{"84":1}}],["caches",{"2":{"0":1}}],["cachesize",{"2":{"0":2,"85":1}}],["cache",{"2":{"0":6,"79":1,"84":4,"85":7}}],["caching",{"0":{"0":1}}],["can",{"2":{"0":5,"2":1,"3":1,"13":2,"14":1,"16":3,"20":1,"22":1,"23":3,"29":2,"35":1,"36":1,"38":1,"40":1,"41":1,"42":2,"46":1,"52":1,"56":1,"58":2,"59":1,"60":1,"61":1,"68":1,"70":3,"71":2,"72":1,"80":1,"81":1,"82":1,"84":13,"85":6,"87":1,"90":2,"93":2,"98":2}}],["msc",{"2":{"96":3,"97":2}}],["mscarray",{"2":{"96":2}}],["md",{"2":{"87":2}}],["mfdataset",{"2":{"84":5}}],["mpi",{"2":{"58":1,"102":2}}],["m",{"2":{"25":2}}],["miss",{"2":{"85":1}}],["missing",{"2":{"14":2,"16":6,"18":1,"21":1,"22":2,"41":1,"42":2,"59":12,"62":6,"64":4,"65":6,"66":6,"67":10,"81":3,"82":1,"84":2,"85":2,"106":1}}],["minimized",{"2":{"85":1}}],["minutes",{"2":{"59":1,"62":3,"64":2,"65":3,"66":3,"67":5}}],["might",{"2":{"24":1,"61":1,"98":1}}],["mix",{"2":{"21":2}}],["mm",{"2":{"20":3,"59":2,"63":2,"74":2,"80":2}}],["mymean",{"2":{"23":4}}],["my",{"2":{"16":2,"59":1}}],["mahecha",{"2":{"72":1}}],["manager",{"2":{"90":1}}],["manual",{"2":{"59":1}}],["many",{"0":{"18":1,"19":2},"2":{"18":2,"19":2,"20":4,"62":1,"70":1,"85":1}}],["mar",{"2":{"51":4,"52":2,"53":1,"54":4,"55":4,"56":6}}],["marketdata",{"2":{"46":2}}],["master",{"2":{"50":1,"93":1}}],["mask",{"2":{"42":2}}],["makie",{"2":{"56":1,"106":1}}],["making",{"2":{"11":1,"59":1,"63":1}}],["make",{"2":{"39":1,"40":2,"81":1,"84":1,"85":2,"88":1,"106":1}}],["main",{"2":{"36":1,"85":1}}],["machine",{"2":{"23":1,"70":1}}],["matching",{"2":{"91":1}}],["match",{"2":{"85":2}}],["matched",{"2":{"84":1}}],["matches",{"2":{"20":1}}],["mat",{"2":{"22":4}}],["matrix",{"2":{"16":2,"22":1,"25":1,"46":1,"52":1,"56":2,"70":1,"82":2,"96":1}}],["maximal",{"2":{"85":1}}],["maximum",{"2":{"41":1,"84":1,"85":1}}],["maxbuf",{"2":{"85":1}}],["max",{"2":{"16":2,"76":1,"78":1,"79":1,"84":7,"85":2}}],["maxsize",{"2":{"0":2}}],["may",{"2":{"10":1,"15":1,"51":4,"52":2,"53":1,"54":4,"55":4,"56":6,"58":1,"59":1,"92":1}}],["maps",{"0":{"102":1},"1":{"103":1}}],["mapslice",{"2":{"23":1}}],["mapslices",{"0":{"14":1},"2":{"10":1,"13":1,"14":1,"23":1,"41":1,"96":1}}],["mapped",{"2":{"84":1}}],["mapping",{"2":{"84":1,"85":3}}],["mapcube",{"0":{"15":1},"1":{"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1},"2":{"10":1,"13":1,"15":1,"16":4,"18":1,"20":1,"21":2,"22":2,"23":3,"84":5,"85":2}}],["map",{"0":{"13":1,"41":1},"2":{"10":1,"13":2,"21":1,"22":3,"23":3,"41":4,"42":1,"51":2,"55":1,"56":1,"84":2,"91":1,"96":2}}],["moll",{"0":{"105":1}}],["mowingwindow",{"2":{"84":1}}],["module",{"2":{"84":1}}],["model",{"2":{"59":1,"63":1,"71":2,"74":1,"80":1}}],["modification",{"2":{"11":1,"23":1}}],["modify",{"0":{"11":1}}],["monthday",{"2":{"96":4}}],["monthly",{"0":{"49":1}}],["month",{"2":{"37":7,"39":3,"40":4,"49":1,"51":4,"52":1,"53":1,"54":5,"55":2,"56":3,"84":1,"96":2}}],["moment",{"2":{"27":1}}],["movingwindow",{"2":{"21":1,"84":4}}],["more",{"2":{"9":1,"10":1,"36":1,"41":1,"42":1,"66":1,"67":1,"72":1,"76":1,"79":1,"84":3,"85":1,"91":1}}],["most",{"2":{"1":1,"15":1,"24":1}}],["mesh",{"2":{"106":2}}],["merely",{"2":{"81":1}}],["measured",{"2":{"71":1,"72":1}}],["measure",{"2":{"70":1}}],["measures",{"2":{"58":1}}],["means",{"0":{"49":1},"2":{"14":1,"84":1}}],["mean",{"0":{"95":1,"97":1},"1":{"96":1,"97":1},"2":{"10":1,"14":3,"23":4,"42":4,"51":10,"52":2,"53":1,"56":2,"58":1,"59":1,"62":3,"64":2,"65":3,"66":3,"67":5,"84":1,"96":5}}],["meter",{"2":{"58":1}}],["method",{"2":{"16":2,"18":1,"19":1,"21":1,"84":1}}],["methods",{"2":{"7":1,"23":1,"58":1,"59":1,"62":3,"64":2,"65":3,"66":3,"67":5}}],["metadata",{"2":{"8":1,"9":1,"10":1,"12":1,"13":1,"14":2,"16":5,"17":1,"18":1,"19":1,"21":3,"22":3,"24":1,"25":1,"26":2,"27":3,"29":2,"32":1,"33":3,"34":1,"35":1,"37":5,"41":3,"42":3,"47":2,"51":2,"52":1,"54":3,"55":2,"56":3,"58":1,"59":1,"62":3,"64":2,"65":3,"66":3,"67":5,"81":2,"84":1,"91":3,"96":1}}],["members",{"2":{"85":1}}],["member",{"2":{"6":1}}],["memory",{"0":{"61":1},"1":{"62":1},"2":{"1":1,"8":1,"10":1,"12":1,"13":1,"14":2,"16":3,"17":1,"18":1,"19":1,"21":3,"22":3,"24":3,"25":1,"26":1,"27":1,"29":2,"32":1,"33":3,"34":1,"37":5,"40":4,"41":3,"42":3,"47":2,"50":1,"54":1,"61":1,"62":4,"70":1,"81":2,"84":2,"85":1,"91":2,"96":1}}],["multi",{"2":{"17":2,"21":2}}],["multiplying",{"2":{"41":1}}],["multiply",{"2":{"10":1,"41":1}}],["multiple",{"0":{"45":1,"101":1},"2":{"7":1,"21":1,"23":1,"58":1,"59":1,"70":1,"84":1}}],["must",{"2":{"0":1,"72":1,"84":1,"85":1}}],["mb",{"2":{"0":1,"59":1,"62":3,"64":2}}],["pkg",{"2":{"90":2,"93":2,"94":8}}],["pkg>",{"2":{"88":1,"93":1}}],["purple",{"2":{"95":1}}],["purpose",{"2":{"31":1,"41":1}}],["pull",{"2":{"86":1}}],["public",{"0":{"84":1}}],["published",{"2":{"56":1}}],["pydata",{"2":{"50":1}}],["p",{"2":{"40":10,"59":1,"63":1,"74":1,"80":1}}],["picture",{"2":{"70":1,"71":1}}],["pieces",{"2":{"31":1}}],["pixel",{"0":{"95":1},"1":{"96":1,"97":1},"2":{"21":1,"23":2}}],["post=getpostfunction",{"2":{"84":1}}],["positions",{"2":{"85":2}}],["position",{"2":{"70":1}}],["positional",{"2":{"65":1,"66":1}}],["possible",{"2":{"23":2,"24":1,"35":1,"47":1,"81":1,"84":3,"85":1}}],["pos",{"2":{"22":2}}],["point3f",{"2":{"106":1}}],["point",{"2":{"22":3,"58":1,"91":1}}],["points",{"2":{"4":4,"5":4,"6":2,"8":1,"9":1,"10":3,"12":3,"13":3,"14":4,"16":9,"17":3,"18":3,"19":2,"20":3,"21":9,"22":16,"23":1,"25":2,"26":6,"27":4,"29":9,"30":3,"32":9,"33":6,"34":2,"35":3,"37":14,"39":6,"40":21,"41":9,"42":5,"44":1,"45":5,"46":4,"47":4,"51":3,"52":2,"54":2,"55":1,"56":7,"58":6,"59":6,"60":2,"62":9,"63":3,"64":6,"65":4,"66":9,"67":16,"68":2,"70":2,"71":1,"74":3,"80":6,"81":6,"91":5,"96":1,"102":3}}],["plt",{"2":{"103":1}}],["place",{"2":{"85":1}}],["please",{"2":{"59":1,"76":1}}],["plots",{"2":{"106":1}}],["plot",{"0":{"97":1,"103":1,"106":1},"2":{"56":2}}],["plotting",{"0":{"102":1},"1":{"103":1},"2":{"0":1,"94":1}}],["plus",{"2":{"18":3,"50":1,"84":1}}],["page",{"2":{"106":1}}],["paste",{"2":{"88":1}}],["pass",{"2":{"84":1}}],["passed",{"2":{"84":4}}],["passing",{"2":{"21":1,"84":3}}],["pair",{"2":{"85":1}}],["pairs",{"2":{"18":1,"20":1}}],["partitioned",{"2":{"85":1}}],["participate",{"2":{"84":1}}],["particular",{"2":{"73":1}}],["parts",{"2":{"84":1}}],["parent",{"2":{"58":1,"102":1}}],["parallelized",{"2":{"85":1}}],["parallelisation",{"2":{"84":1}}],["parallel",{"2":{"23":1,"70":1}}],["package",{"2":{"23":1,"66":1,"68":1,"83":1,"90":1,"94":1}}],["packages",{"2":{"16":1,"24":1}}],["paths",{"2":{"84":1,"85":2}}],["path=",{"2":{"16":2,"58":1,"75":1,"76":1,"77":1,"78":1,"79":1,"80":1,"81":1,"85":1}}],["path=f",{"2":{"4":1,"5":1,"6":1}}],["path",{"0":{"20":1},"2":{"0":1,"20":1,"50":2,"58":3,"59":2,"60":2,"63":2,"74":2,"79":3,"84":4,"88":1}}],["pr",{"2":{"88":1}}],["println",{"2":{"78":1}}],["printed",{"2":{"46":2}}],["primem",{"2":{"60":1}}],["prior",{"2":{"1":1}}],["props",{"2":{"91":2}}],["properly",{"2":{"49":1}}],["properties=dict",{"2":{"85":1}}],["properties=properties",{"2":{"18":2}}],["properties",{"0":{"17":1},"1":{"18":1,"19":1,"20":1},"2":{"10":2,"17":2,"18":2,"19":1,"20":2,"21":2,"23":2,"29":3,"30":3,"50":1,"56":1,"58":1,"59":1,"60":1,"63":1,"74":1,"80":1,"84":5,"85":1,"102":1}}],["probably",{"2":{"85":1}}],["provide",{"2":{"84":1}}],["provides",{"2":{"70":1,"99":1}}],["provided",{"2":{"36":1,"81":1,"84":2}}],["process",{"2":{"70":1,"85":2}}],["processed",{"2":{"13":1}}],["projection",{"0":{"104":1,"105":1},"1":{"105":1,"106":1},"2":{"60":1}}],["progressmeter",{"2":{"84":1}}],["progress",{"2":{"50":1,"98":1,"100":1}}],["product",{"2":{"22":1}}],["pressed",{"2":{"93":1}}],["pressing",{"2":{"90":1}}],["pre",{"2":{"84":2}}],["previous",{"2":{"56":1,"79":1,"81":1,"84":1}}],["previously",{"2":{"42":1}}],["prepared",{"2":{"59":1,"63":1,"74":1,"80":1}}],["prep",{"2":{"9":2}}],["precipitation",{"2":{"9":2,"71":1,"72":1,"91":2}}],["permute",{"2":{"85":1}}],["permuteloopaxes",{"2":{"85":1}}],["permutation",{"2":{"85":1}}],["persistend",{"2":{"85":1}}],["persistency",{"2":{"85":1}}],["persistent",{"2":{"84":1,"85":2}}],["persist",{"2":{"79":1,"84":1,"85":1}}],["perform",{"2":{"85":1}}],["performed",{"2":{"13":2}}],["performing",{"2":{"10":1}}],["per",{"2":{"7":1,"14":1,"51":1,"54":1,"55":1}}],["=interval",{"2":{"67":2}}],["===",{"2":{"46":1}}],["==",{"2":{"12":1,"46":1,"96":1}}],["=>nan",{"2":{"106":1}}],["=>",{"2":{"10":2,"12":1,"13":1,"16":2,"17":2,"18":3,"19":2,"20":1,"21":2,"22":5,"23":1,"29":3,"30":3,"44":1,"45":1,"46":5,"50":1,"51":5,"52":1,"54":3,"55":2,"56":3,"58":20,"59":20,"60":1,"62":30,"63":10,"64":20,"65":30,"66":30,"67":50,"74":10,"80":10,"91":6,"102":10}}],["=>2",{"2":{"4":1}}],["=>10",{"2":{"4":1}}],["=>5",{"2":{"4":1,"5":1}}],["=",{"2":{"0":5,"2":4,"4":9,"5":15,"6":9,"8":5,"9":5,"10":4,"11":1,"12":1,"13":1,"16":14,"17":4,"18":14,"19":7,"20":11,"21":12,"22":16,"23":5,"25":3,"26":8,"27":4,"29":5,"30":4,"32":1,"33":3,"35":6,"37":7,"39":6,"40":17,"42":7,"44":1,"45":3,"46":7,"47":4,"50":8,"51":16,"52":1,"53":1,"54":4,"55":1,"56":22,"58":2,"59":3,"60":2,"62":1,"63":2,"64":2,"65":6,"66":6,"67":3,"74":2,"76":2,"78":3,"79":8,"80":2,"81":4,"82":5,"84":13,"85":7,"91":5,"95":10,"96":11,"97":5,"102":8,"103":5,"104":7,"105":5,"106":6}}],["dc",{"2":{"85":2}}],["dkrz",{"2":{"58":1,"102":2}}],["dufresne",{"2":{"59":1,"63":1,"74":1,"80":1}}],["due",{"2":{"53":1}}],["dummy",{"2":{"35":1,"37":1,"95":1,"96":1}}],["during",{"2":{"22":1,"23":1,"24":1}}],["dd",{"2":{"32":1,"84":5,"96":1}}],["d",{"2":{"22":5,"46":5,"56":3,"96":1}}],["drop",{"2":{"56":1}}],["dropdims",{"0":{"52":1},"2":{"51":2,"52":2,"56":1}}],["drivers",{"2":{"84":1}}],["driver",{"2":{"48":1,"79":2,"84":6}}],["driver=",{"2":{"4":1,"5":1,"6":1,"75":2,"76":1,"77":2,"78":1,"79":3,"80":1,"81":2,"84":3}}],["drei",{"2":{"19":2}}],["dash",{"2":{"97":1}}],["danger",{"2":{"79":1}}],["daysinmonth",{"2":{"51":1,"54":1}}],["days",{"2":{"49":1,"51":2,"53":1,"54":2,"55":2}}],["dayofyear",{"2":{"16":1}}],["day",{"2":{"10":2,"12":1,"13":1,"14":1,"16":4,"17":2,"18":1,"21":3,"22":3,"23":1,"29":3,"30":1,"95":1,"96":4,"97":1}}],["datconfig",{"2":{"85":2}}],["datset",{"2":{"84":1}}],["dat",{"2":{"84":8,"85":16}}],["datum",{"2":{"60":1}}],["datetime360day",{"2":{"59":6,"62":9,"63":3,"64":6,"65":7,"66":9,"67":15,"74":3,"80":3}}],["datetimenoleap",{"2":{"51":2,"54":5,"55":2,"56":2}}],["datetime",{"2":{"20":1,"46":5,"58":2,"102":1}}],["date",{"2":{"10":5,"12":3,"13":3,"14":3,"16":12,"17":5,"18":3,"21":8,"22":11,"23":3,"29":8,"30":3,"37":24,"39":8,"40":11,"70":1,"95":2,"96":5,"102":1}}],["datesid",{"2":{"96":2}}],["dates",{"2":{"10":2,"12":1,"13":1,"14":1,"16":5,"17":2,"18":1,"21":2,"22":3,"23":1,"29":3,"30":1,"37":8,"39":4,"40":5,"48":1,"72":1,"95":1,"96":2,"102":1}}],["data=cube1",{"2":{"84":1}}],["databases",{"2":{"70":1}}],["dataframe",{"2":{"42":1,"84":1}}],["dataframes",{"2":{"42":1}}],["datacubes",{"2":{"84":1}}],["datacube",{"0":{"101":1},"2":{"42":2,"81":1,"84":1}}],["datatypes",{"2":{"36":1}}],["data1",{"2":{"35":2}}],["data3",{"2":{"30":1}}],["data2",{"2":{"29":2,"35":2}}],["datasetaxis",{"2":{"84":2,"85":1}}],["datasetaxis=",{"2":{"84":1,"85":1}}],["dataset",{"0":{"30":1,"36":1,"38":1,"39":1,"40":1,"43":1,"46":1,"71":1,"79":1,"80":1,"82":1},"1":{"37":1,"38":1,"39":2,"40":2,"44":1,"45":1},"2":{"0":3,"3":1,"4":4,"5":2,"6":3,"9":1,"10":1,"18":1,"20":2,"24":1,"30":2,"38":1,"39":3,"40":5,"44":2,"45":3,"46":5,"58":3,"59":3,"60":3,"63":3,"64":1,"71":3,"72":2,"74":3,"75":1,"76":1,"77":1,"78":1,"79":3,"80":4,"81":2,"82":2,"84":19,"85":9,"102":2}}],["datasets",{"0":{"3":1,"28":1,"48":1,"57":1,"63":1,"74":1},"1":{"4":1,"5":1,"6":1,"29":1,"30":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"58":1,"59":1,"60":1,"61":1,"62":1,"64":1,"65":1,"66":1,"67":1,"68":1,"75":1,"76":1,"77":1,"78":1,"79":1,"80":1,"81":1,"82":1},"2":{"0":2,"24":1,"28":1,"40":1,"57":1,"61":1,"79":1,"84":9,"85":4,"100":1}}],["data",{"0":{"34":1,"50":1,"61":1,"72":1},"1":{"62":1},"2":{"0":3,"1":2,"7":1,"8":2,"9":1,"10":3,"11":1,"12":1,"13":1,"14":2,"16":9,"17":3,"18":1,"19":1,"21":6,"22":4,"23":2,"25":2,"26":2,"27":1,"29":2,"32":1,"33":3,"34":2,"35":1,"37":6,"39":1,"40":2,"41":3,"42":5,"50":8,"54":1,"58":3,"59":7,"62":6,"63":3,"64":4,"65":6,"66":6,"67":10,"69":1,"70":3,"71":2,"72":3,"74":3,"79":2,"80":3,"81":4,"82":1,"84":20,"85":12,"91":6,"92":1,"95":2,"96":2,"100":4,"102":5,"104":1}}],["dev",{"2":{"88":1}}],["dependencies",{"2":{"88":1}}],["depth",{"2":{"21":8}}],["detect",{"2":{"84":1,"85":1}}],["determined",{"2":{"85":1}}],["determines",{"2":{"84":1}}],["determine",{"2":{"1":1,"62":1,"84":1}}],["deletes",{"2":{"79":1,"84":1}}],["delete",{"2":{"79":2,"81":1}}],["denoting",{"2":{"84":1}}],["dense",{"2":{"70":1}}],["denvil",{"2":{"59":2,"63":2,"74":2,"80":2}}],["degree",{"2":{"60":1}}],["degc",{"2":{"59":1,"62":3,"64":2,"65":3,"66":3,"67":5}}],["dec",{"2":{"51":4,"52":2,"53":1,"54":4,"55":4,"56":6}}],["defaultfillval",{"2":{"85":1}}],["defaults",{"2":{"84":7}}],["default",{"2":{"18":1,"78":3,"81":1,"84":1,"85":4}}],["definition",{"2":{"72":1}}],["definitions",{"2":{"17":1,"19":1}}],["defining",{"2":{"23":1}}],["defines",{"2":{"84":1}}],["defined",{"2":{"18":1,"26":1,"27":1,"42":1,"56":1,"68":1,"70":1,"73":1,"81":1,"91":1}}],["define",{"0":{"96":1},"2":{"16":2,"18":1,"37":1,"42":1,"56":1,"84":2,"95":1}}],["deal",{"2":{"17":1}}],["dest",{"2":{"105":1}}],["desc",{"2":{"84":3,"85":3}}],["descriptor",{"2":{"85":4}}],["descriptors",{"2":{"84":2}}],["descriptions",{"2":{"84":1}}],["description",{"2":{"17":2,"19":2,"21":2,"36":1,"84":4,"85":11}}],["described",{"2":{"100":1}}],["describe",{"2":{"84":2}}],["describes",{"2":{"7":1,"10":1,"24":1,"28":1,"57":1,"67":1,"69":1,"83":1,"85":1}}],["describing",{"2":{"84":1}}],["designed",{"2":{"24":2,"70":1}}],["desired",{"2":{"16":1,"85":4}}],["demand",{"2":{"13":1}}],["diverging",{"2":{"56":1}}],["divided",{"2":{"41":1}}],["differing",{"2":{"84":1}}],["difference",{"2":{"56":1}}],["differences",{"2":{"46":1,"51":1,"56":1,"85":1}}],["different",{"0":{"21":1},"2":{"9":2,"16":1,"17":2,"23":1,"32":1,"33":1,"45":1,"49":1,"71":1,"84":3,"85":2,"98":1}}],["diff",{"2":{"51":2,"56":3}}],["directory",{"2":{"58":1,"75":2,"77":2}}],["directories",{"2":{"57":1,"85":1}}],["direct",{"2":{"46":1}}],["directly",{"2":{"16":1,"20":1,"27":1,"28":1,"29":1,"82":2}}],["dictionary",{"2":{"71":1,"84":3}}],["dict",{"2":{"4":1,"5":1,"8":1,"9":1,"10":2,"12":1,"13":1,"14":2,"16":5,"17":2,"18":3,"19":2,"20":1,"21":4,"22":4,"23":1,"25":1,"26":2,"27":3,"29":4,"30":2,"32":1,"33":3,"34":1,"35":1,"37":5,"41":3,"42":3,"46":2,"47":2,"51":3,"52":2,"54":4,"55":3,"56":3,"58":2,"59":2,"60":1,"62":3,"63":1,"64":2,"65":3,"66":3,"67":5,"74":1,"80":1,"81":1,"84":3,"91":3,"96":1,"102":1}}],["dimvector",{"2":{"84":1}}],["dime",{"2":{"58":1}}],["dimensionaldata",{"2":{"22":1,"27":2,"32":1,"33":1,"37":1,"39":1,"40":1,"46":1,"48":1,"50":1,"51":16,"52":10,"54":6,"55":6,"56":39,"66":1,"67":2,"68":3,"70":1,"73":1,"91":1,"92":3,"94":1,"96":1,"102":1}}],["dimensional",{"2":{"17":2,"19":2,"21":2,"69":1,"70":2,"84":1}}],["dimensions",{"0":{"39":1,"40":1},"2":{"9":1,"10":1,"13":1,"15":1,"16":2,"20":1,"21":1,"22":2,"23":1,"29":2,"33":1,"35":1,"38":1,"40":3,"41":2,"45":1,"50":1,"51":16,"52":10,"54":6,"55":6,"56":39,"62":1,"63":1,"68":2,"70":3,"71":1,"84":8,"85":3,"91":3,"92":1}}],["dimension",{"0":{"8":1,"9":1,"68":1,"73":1},"2":{"2":1,"8":2,"9":1,"10":1,"14":2,"16":3,"18":1,"19":1,"22":3,"37":1,"40":1,"52":1,"53":1,"56":1,"66":1,"68":1,"70":1,"72":1,"73":1,"84":7,"85":3,"91":1}}],["dimgroupbyarray",{"2":{"51":1,"54":1}}],["dimarray",{"0":{"27":1},"2":{"22":3,"27":6,"51":1,"52":1,"54":1,"55":2,"56":3,"70":1,"84":2}}],["dims=2",{"2":{"96":1}}],["dims=",{"2":{"14":2,"23":1,"41":1,"51":5,"52":1,"54":1,"56":1}}],["dims",{"2":{"8":3,"9":1,"10":1,"12":1,"13":1,"14":2,"16":5,"17":1,"18":1,"19":1,"21":3,"22":4,"25":1,"26":3,"27":2,"29":2,"32":3,"33":4,"34":1,"35":1,"37":5,"41":3,"42":3,"46":1,"47":2,"50":1,"51":6,"52":1,"54":5,"55":2,"56":5,"58":1,"59":1,"62":3,"64":2,"65":3,"66":3,"67":5,"81":1,"91":2,"96":1}}],["dim",{"2":{"2":2,"4":7,"5":8,"6":2,"8":2,"9":3,"10":3,"16":3,"17":4,"21":6,"22":4,"23":3,"25":2,"27":2,"29":7,"32":9,"33":6,"34":3,"35":4,"37":3,"39":3,"40":2,"44":1,"45":5,"46":2,"47":4,"51":2,"52":2,"56":6,"80":3,"81":6,"84":1,"91":4,"96":1}}],["disregard",{"2":{"85":1}}],["dispatch",{"2":{"85":1}}],["displayed",{"2":{"62":1}}],["discribe",{"2":{"84":2}}],["discussion",{"2":{"76":1}}],["distribute",{"2":{"23":1}}],["distributed",{"0":{"23":1},"2":{"0":1,"23":2}}],["diskarray",{"2":{"84":1}}],["diskarrays",{"2":{"2":9,"4":4,"5":4,"6":4,"84":2,"85":1}}],["disk",{"2":{"1":1,"16":1,"20":1,"27":1,"70":1,"81":3,"82":2,"84":1,"85":2}}],["dodgerblue",{"2":{"97":1}}],["documenter",{"2":{"106":1}}],["documentation",{"0":{"87":1},"1":{"88":1}}],["doc",{"2":{"79":1}}],["docstring",{"2":{"84":1}}],["docs",{"0":{"88":1},"2":{"71":1,"87":2,"88":6,"92":1}}],["don",{"2":{"76":1}}],["done",{"2":{"33":1,"41":1,"56":1,"61":1,"87":2}}],["download",{"0":{"50":1},"2":{"50":1,"59":2,"60":2,"63":2,"74":2}}],["downloads",{"2":{"48":1,"50":1,"59":1,"60":1,"63":1,"74":1}}],["doing",{"2":{"23":1,"32":1,"34":1,"88":1}}],["does",{"2":{"23":1,"81":1,"84":2,"85":1}}],["dot",{"2":{"21":1,"97":1}}],["do",{"0":{"35":1,"36":1,"41":1,"42":1,"43":1,"46":1},"1":{"37":1,"38":1,"39":1,"40":1,"44":1,"45":1},"2":{"1":1,"13":1,"16":1,"22":3,"23":1,"31":2,"41":1,"49":1,"56":1,"81":1,"82":1,"85":1,"88":1,"90":1}}],["dsw",{"2":{"51":2,"56":2}}],["dsfinal",{"2":{"35":1,"41":2,"42":2}}],["ds2",{"2":{"35":3,"41":1,"80":1}}],["ds1",{"2":{"35":3,"41":3,"42":1}}],["dschunked",{"2":{"4":3,"5":3,"6":3}}],["ds",{"2":{"0":3,"4":2,"5":2,"6":2,"30":1,"39":2,"40":12,"44":1,"45":1,"46":2,"50":5,"51":10,"54":1,"56":3,"58":1,"59":2,"60":1,"62":3,"63":1,"64":2,"74":1,"75":3,"76":2,"77":3,"78":7,"79":3,"80":2,"81":1,"82":5,"84":3,"85":1,"106":2}}],["wglmakie",{"2":{"106":2}}],["wgs",{"2":{"60":3}}],["would",{"2":{"84":2}}],["world",{"2":{"60":2}}],["workdir",{"2":{"85":1}}],["worker",{"2":{"84":1}}],["workers",{"2":{"84":1}}],["workflow",{"2":{"61":1}}],["workflows",{"2":{"1":1}}],["work",{"2":{"24":2,"50":1,"69":1,"84":1,"98":2,"100":1}}],["workload",{"2":{"23":1}}],["working",{"2":{"16":1,"82":1}}],["works",{"2":{"6":1,"34":1,"39":1,"40":1,"81":1}}],["written",{"2":{"84":1,"85":1}}],["writing",{"2":{"82":1}}],["writefac",{"2":{"85":1}}],["writefac=4",{"2":{"79":1,"84":1}}],["writes",{"2":{"84":1}}],["write",{"0":{"74":1,"75":1,"77":1},"1":{"75":1,"76":2,"77":1,"78":2,"79":1,"80":1,"81":1,"82":1},"2":{"81":1,"84":2}}],["wrapping",{"2":{"53":1,"68":2}}],["wrapped",{"2":{"16":1}}],["wrap",{"2":{"0":1,"84":1}}],["www",{"2":{"59":1,"63":1,"74":1}}],["w",{"2":{"56":2,"82":2}}],["was",{"2":{"20":1,"22":1,"23":1,"85":1}}],["way",{"2":{"15":1,"24":1,"32":1}}],["warning",{"2":{"11":1,"24":1,"32":1,"40":1,"45":1,"47":1,"50":1,"79":1,"81":1,"84":1}}],["wanted",{"2":{"85":1}}],["wants",{"2":{"81":1}}],["want",{"0":{"94":1},"2":{"0":1,"1":1,"61":1,"72":1,"85":1,"88":1,"93":1,"100":1}}],["white",{"2":{"104":1,"105":1}}],["while",{"2":{"81":1}}],["which",{"2":{"9":1,"16":1,"22":2,"33":1,"40":2,"56":1,"59":1,"62":1,"64":1,"67":1,"68":1,"72":3,"84":5,"85":4,"100":1}}],["whose",{"0":{"39":1,"40":1}}],["whole",{"2":{"8":3}}],["whether",{"2":{"85":2}}],["when",{"2":{"1":1,"6":1,"13":1,"62":1,"72":1,"84":3,"85":1}}],["whereas",{"2":{"70":1}}],["where",{"2":{"0":1,"23":1,"40":4,"49":1,"67":1,"82":1,"84":1,"85":4}}],["wintri",{"0":{"104":1},"1":{"105":1,"106":1}}],["windowloopinds",{"2":{"85":1}}],["window",{"2":{"84":1,"85":1}}],["without",{"2":{"85":1}}],["within",{"2":{"66":1}}],["with",{"0":{"47":1},"2":{"4":1,"5":1,"8":1,"10":1,"12":1,"13":1,"16":7,"17":3,"18":2,"19":2,"21":3,"22":4,"23":2,"24":1,"29":3,"32":1,"33":1,"40":6,"41":2,"42":3,"45":2,"46":3,"47":1,"51":3,"52":1,"54":2,"55":2,"56":5,"58":3,"59":2,"62":3,"63":1,"64":2,"65":3,"66":3,"67":5,"69":1,"71":1,"74":1,"76":1,"78":1,"79":1,"80":2,"81":2,"82":1,"84":11,"85":1,"87":1,"91":4,"92":3,"98":1,"100":1,"102":2,"104":1}}],["will",{"2":{"0":1,"1":1,"4":1,"5":1,"13":1,"16":3,"17":2,"18":1,"19":1,"22":1,"36":1,"40":1,"41":2,"42":2,"45":2,"46":1,"48":1,"53":2,"59":1,"79":3,"81":3,"82":1,"84":12,"85":3,"100":1}}],["wether",{"2":{"84":1}}],["weight=",{"2":{"84":1}}],["weight=nothing",{"2":{"84":1}}],["weight",{"0":{"54":1},"1":{"55":1,"56":1},"2":{"53":1,"55":1,"56":1}}],["weights",{"0":{"55":1},"2":{"51":3,"55":2,"56":1}}],["weightedmean",{"2":{"84":1}}],["weighted",{"0":{"56":1},"2":{"42":1,"49":1,"51":8,"56":8,"84":3}}],["well",{"2":{"42":1,"46":1,"81":1,"84":1}}],["welcome",{"2":{"6":1,"86":1}}],["were",{"2":{"13":2,"67":1,"85":1,"95":1}}],["we",{"2":{"0":1,"8":2,"9":1,"13":2,"14":1,"16":5,"17":3,"18":1,"19":1,"20":1,"22":5,"23":2,"29":2,"33":1,"35":1,"36":1,"37":1,"38":1,"40":2,"41":2,"42":5,"46":4,"51":1,"52":1,"53":2,"56":1,"58":1,"66":1,"72":1,"81":3,"82":4,"92":2,"95":1,"102":1}}],["oob",{"2":{"84":1}}],["o1",{"2":{"59":2,"63":2,"74":2,"80":1}}],["ocean",{"2":{"59":1,"63":1,"74":1,"80":1}}],["oct",{"2":{"51":4,"52":2,"53":1,"54":4,"55":4,"56":6}}],["occuring",{"2":{"4":1}}],["o",{"2":{"50":4,"56":4,"84":5}}],["ohlcv",{"2":{"46":3}}],["ouput",{"2":{"88":1}}],["our",{"2":{"41":1,"42":1,"96":1}}],["outcube",{"2":{"85":1}}],["outcubes",{"2":{"85":1}}],["outcs",{"2":{"85":1}}],["outsize",{"2":{"85":1}}],["outar",{"2":{"85":2}}],["out",{"2":{"50":1,"84":2,"85":1}}],["outtype",{"2":{"16":2,"84":1,"85":2}}],["outdims=outdims",{"2":{"22":1,"23":1}}],["outdims",{"0":{"17":1,"18":1,"19":1,"20":1},"1":{"18":1,"19":1,"20":1},"2":{"16":4,"18":12,"19":2,"20":11,"21":3,"84":6}}],["outputcube",{"2":{"85":3}}],["outputs",{"2":{"16":1,"18":2,"21":1}}],["output",{"2":{"6":1,"16":3,"17":1,"18":1,"22":1,"23":3,"59":1,"63":1,"74":1,"80":1,"84":11,"85":9,"106":1}}],["optimal",{"2":{"85":1}}],["optifunc",{"2":{"85":1}}],["optionally",{"2":{"84":1}}],["option",{"2":{"37":1,"39":1,"76":1}}],["options",{"2":{"34":1}}],["operates",{"2":{"84":1}}],["operate",{"2":{"21":1}}],["operation",{"2":{"21":1,"85":1}}],["operations",{"0":{"16":1},"2":{"10":1,"51":1,"84":2,"85":3}}],["operating",{"2":{"19":1}}],["opens",{"2":{"84":1}}],["openinterval",{"2":{"67":1}}],["open",{"0":{"67":1},"2":{"0":2,"18":1,"20":2,"46":4,"58":2,"59":2,"60":1,"63":2,"67":2,"74":1,"76":1,"80":1,"82":6,"84":7,"102":1}}],["obj",{"2":{"42":2,"95":1,"97":1}}],["objects",{"2":{"84":2}}],["object",{"2":{"11":1,"58":1,"84":5,"85":3}}],["obtain",{"0":{"34":1},"2":{"46":1,"53":1}}],["omit",{"2":{"23":1}}],["otherwise",{"2":{"84":1}}],["others",{"2":{"21":1,"46":1}}],["other",{"0":{"98":1},"1":{"99":1,"100":1,"101":1},"2":{"20":1,"24":1,"61":1,"98":1,"100":1}}],["overview",{"0":{"99":1},"2":{"98":1,"99":1}}],["overwrite",{"0":{"79":1},"2":{"79":3,"84":4,"85":2}}],["overwrite=true",{"2":{"16":2,"79":2,"81":3}}],["over",{"0":{"16":1,"100":1},"2":{"10":1,"15":1,"21":1,"23":1,"56":1,"84":8,"85":1,"100":1}}],["ormax",{"2":{"84":1}}],["orca2",{"2":{"59":1,"63":1,"74":1,"80":1}}],["orangered",{"2":{"42":1}}],["ordered",{"2":{"70":1,"71":1}}],["ordereddict",{"2":{"22":1}}],["orderedcollections",{"2":{"22":1}}],["order",{"2":{"16":1,"49":1,"82":1}}],["original",{"2":{"59":2,"62":6,"64":4,"65":6,"66":6,"67":10}}],["originates",{"2":{"9":1}}],["origin",{"2":{"10":2,"12":1,"13":1,"23":1,"29":3,"30":1,"91":2}}],["or",{"0":{"36":1},"1":{"37":1,"38":1,"39":1,"40":1},"2":{"1":2,"6":1,"10":1,"13":2,"15":1,"27":1,"33":1,"38":1,"47":2,"58":1,"61":1,"63":2,"70":3,"73":2,"76":1,"79":1,"84":22,"85":7,"90":1,"91":2,"93":1}}],["once",{"2":{"56":1,"72":1,"85":1,"87":1}}],["onlinestat",{"2":{"84":2}}],["onlinestats",{"2":{"42":2}}],["only",{"2":{"6":1,"13":1,"14":1,"16":1,"20":1,"22":1,"24":1,"29":2,"41":1,"59":1,"81":1,"84":2}}],["on",{"2":{"1":2,"6":1,"7":1,"10":2,"13":2,"16":1,"23":2,"31":1,"59":2,"62":3,"63":1,"64":2,"65":3,"66":3,"67":5,"70":1,"74":1,"76":1,"80":1,"81":1,"84":5,"85":4}}],["ones",{"2":{"17":1,"33":1}}],["oneto",{"2":{"4":4,"5":4,"6":2,"25":2,"29":3,"32":9,"33":6,"44":1,"45":5,"47":4,"81":6,"91":2}}],["one",{"0":{"18":1,"44":1},"2":{"0":1,"7":1,"8":2,"14":2,"18":15,"19":5,"20":6,"21":2,"22":2,"42":1,"46":1,"52":1,"59":1,"70":2,"71":1,"81":2,"84":9,"85":3,"98":1}}],["own",{"2":{"0":1,"59":1}}],["offline=true",{"2":{"106":1}}],["offsets",{"2":{"85":1}}],["offset",{"2":{"13":1}}],["often",{"2":{"7":1}}],["of",{"0":{"11":1,"40":1,"49":1,"82":1,"99":2},"2":{"0":2,"1":1,"6":1,"8":3,"9":1,"10":2,"11":1,"12":1,"13":2,"14":1,"15":1,"22":7,"23":3,"24":1,"26":1,"27":1,"31":3,"32":3,"36":1,"37":2,"38":1,"39":1,"40":2,"41":1,"42":1,"49":1,"50":1,"54":1,"59":1,"62":1,"63":3,"64":1,"66":1,"68":1,"70":7,"71":1,"72":2,"73":2,"74":1,"80":1,"81":1,"82":1,"83":1,"84":53,"85":42,"91":1,"92":2,"96":2,"97":1,"98":1,"99":1}}],["eo",{"2":{"98":1}}],["esdltutorials",{"2":{"98":1}}],["esm1",{"2":{"58":1,"102":2}}],["eltype",{"2":{"91":1}}],["elementtype",{"2":{"85":1}}],["element",{"2":{"8":1,"9":1,"10":2,"13":2,"14":1,"16":3,"22":2,"34":1,"42":1,"51":2,"52":1,"53":1,"54":7,"55":2,"56":3,"65":2,"68":1,"71":1,"72":2,"84":1,"85":1,"96":1}}],["elements",{"0":{"11":1,"65":1},"2":{"8":1,"12":1,"13":2,"23":1,"63":1,"70":1,"84":1,"85":1}}],["empty",{"2":{"85":1}}],["embeds",{"2":{"84":1}}],["either",{"2":{"84":2}}],["error",{"2":{"79":1}}],["epsg",{"2":{"60":5}}],["et",{"2":{"59":1,"63":1,"72":1,"74":1,"80":1}}],["edu",{"2":{"59":1,"63":1,"71":1,"74":1}}],["equivalent",{"2":{"56":1,"68":1}}],["equally",{"2":{"0":1}}],["effectively",{"2":{"41":1}}],["env",{"2":{"88":1}}],["ensure",{"2":{"59":1}}],["enabling",{"2":{"29":1}}],["enter",{"2":{"90":1}}],["entire",{"2":{"22":1,"24":1,"75":1,"77":1}}],["entries",{"2":{"22":1,"46":1,"58":1,"59":1,"62":3,"64":2,"65":3,"66":3,"67":5,"82":1,"84":1,"91":1}}],["entry",{"2":{"10":1,"12":1,"13":1,"16":2,"17":1,"18":1,"19":1,"21":1,"29":2,"51":2,"52":1,"54":2,"55":2,"56":3,"84":1,"87":3}}],["enumerate",{"2":{"22":2,"56":2}}],["end",{"2":{"13":1,"16":1,"18":1,"19":2,"21":2,"22":4,"23":2,"41":1,"51":2,"56":2,"59":1,"96":2,"106":1}}],["exist",{"2":{"84":1}}],["exists",{"2":{"79":1,"84":1,"85":1}}],["existing",{"0":{"8":1},"2":{"79":1,"80":1}}],["exportable=true",{"2":{"106":1}}],["expression",{"2":{"84":1}}],["experiment",{"2":{"59":3,"63":3,"74":3,"80":3}}],["explicitly",{"2":{"13":1,"33":1,"36":1,"85":1}}],["executes",{"2":{"84":1}}],["execute",{"2":{"23":1}}],["external",{"2":{"58":1,"102":1}}],["extension",{"2":{"84":2}}],["extent",{"2":{"26":2}}],["extended",{"2":{"16":1,"84":1,"85":2}}],["extracts",{"2":{"85":1}}],["extract",{"0":{"32":1},"1":{"33":1},"2":{"85":1}}],["extracted",{"2":{"21":1}}],["extra",{"2":{"23":1}}],["exactly",{"2":{"5":1,"34":1,"46":1}}],["examples",{"2":{"6":1,"34":2,"48":1,"59":1,"63":1,"74":1,"87":1}}],["example",{"2":{"0":1,"1":1,"5":1,"10":1,"17":1,"21":1,"23":2,"33":1,"39":1,"40":1,"41":1,"42":1,"49":1,"59":1,"61":1,"63":2,"70":2,"71":1,"72":1,"74":2,"84":4,"85":1,"87":2,"91":2}}],["e",{"2":{"7":1,"8":1,"10":1,"11":1,"13":1,"22":2,"23":1,"26":1,"27":1,"29":1,"37":1,"59":1,"68":1,"70":1,"73":1,"79":1,"84":6,"85":1,"88":1,"91":1}}],["east",{"2":{"60":1}}],["easier",{"2":{"29":1,"63":1}}],["easily",{"2":{"0":1,"23":1}}],["easy",{"2":{"26":1,"27":1}}],["each",{"2":{"4":1,"5":1,"10":1,"13":1,"20":1,"22":5,"23":2,"41":2,"42":2,"49":1,"53":1,"62":1,"71":1,"73":1,"84":3,"85":3,"91":1}}],["everywhere",{"2":{"23":2}}],["every",{"2":{"0":1,"10":1,"13":1,"84":1}}],["features",{"2":{"99":1}}],["feel",{"2":{"76":1}}],["feb",{"2":{"51":4,"52":2,"53":1,"54":4,"55":4,"56":6}}],["frame",{"2":{"100":1}}],["frames",{"2":{"70":1}}],["front",{"2":{"85":1}}],["from",{"0":{"32":1,"34":2,"46":1,"49":1},"1":{"33":1},"2":{"0":1,"8":1,"9":1,"24":1,"32":1,"33":1,"34":4,"40":3,"46":2,"62":1,"67":1,"72":2,"82":1,"84":6,"85":6,"91":1,"96":1}}],["free",{"2":{"76":1}}],["frequently",{"0":{"31":1},"1":{"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1}}],["fr",{"2":{"59":1,"63":1,"74":1,"80":1}}],["fallback",{"2":{"85":1}}],["falls",{"2":{"84":1}}],["false",{"2":{"18":1,"20":1,"47":1,"79":2,"84":3,"85":1}}],["fails",{"2":{"84":1}}],["faq",{"0":{"31":1},"1":{"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1}}],["faster",{"2":{"85":1}}],["fastest",{"2":{"1":1}}],["fast",{"2":{"1":1,"13":1}}],["f2mix",{"2":{"19":3}}],["f2",{"2":{"18":3}}],["f1",{"2":{"18":2,"19":1}}],["fu",{"2":{"85":1}}],["funtion",{"2":{"96":1}}],["fun",{"2":{"84":4}}],["functionality",{"0":{"99":1}}],["functions",{"2":{"10":2,"21":1,"70":2,"83":1,"84":1,"85":1}}],["function",{"0":{"42":1},"2":{"0":1,"1":1,"13":2,"15":1,"16":6,"17":1,"18":2,"19":2,"21":5,"23":6,"32":2,"35":1,"41":1,"42":1,"46":1,"48":1,"51":1,"53":1,"56":1,"61":1,"67":1,"81":1,"84":22,"85":13}}],["future",{"2":{"50":1}}],["further",{"2":{"13":1,"98":1}}],["flag",{"2":{"85":3}}],["flat",{"2":{"18":4,"19":2,"20":2}}],["float32",{"2":{"16":6,"58":1,"59":1,"62":3,"64":2,"65":3,"66":3,"67":5,"81":2,"82":4,"85":1}}],["float64",{"2":{"8":1,"9":1,"10":3,"12":3,"13":3,"14":4,"17":2,"18":2,"19":2,"20":2,"21":3,"22":9,"25":2,"26":2,"27":4,"29":6,"30":2,"32":1,"33":3,"35":4,"41":12,"42":5,"46":2,"51":3,"52":2,"55":3,"56":6,"58":4,"59":4,"60":2,"62":6,"63":2,"64":4,"65":2,"66":6,"67":10,"68":3,"74":2,"80":2,"84":1,"85":1,"91":7,"96":2,"102":2}}],["flexible",{"2":{"9":1,"15":1}}],["folder",{"2":{"88":1}}],["follow",{"2":{"88":1,"98":1}}],["follows",{"2":{"16":2,"19":1,"21":1,"51":1,"56":1,"82":1}}],["following",{"2":{"2":1,"5":1,"6":1,"16":1,"17":1,"18":1,"21":1,"23":1,"33":1,"48":1,"49":1,"50":1,"84":2,"85":4,"93":2,"94":1,"98":1}}],["found",{"2":{"84":1,"85":1}}],["fourth",{"2":{"59":2,"63":2,"74":2,"80":2}}],["fontsize=24",{"2":{"103":1}}],["fontsize=18",{"2":{"56":1}}],["font=",{"2":{"56":1}}],["forwarded",{"2":{"84":1}}],["forwardordered",{"2":{"4":4,"5":4,"6":2,"8":1,"9":1,"10":3,"12":3,"13":3,"14":3,"16":9,"17":4,"18":4,"19":3,"20":3,"21":9,"22":9,"25":2,"26":6,"27":4,"29":9,"30":3,"32":9,"33":6,"34":2,"35":4,"37":14,"39":6,"40":10,"41":9,"42":5,"44":1,"45":5,"46":4,"47":4,"51":3,"52":2,"54":2,"55":1,"56":7,"58":6,"59":6,"60":1,"62":9,"63":3,"64":6,"65":4,"66":9,"67":15,"68":2,"74":3,"80":6,"81":6,"91":5,"96":1,"102":3}}],["force",{"2":{"84":1}}],["forcing",{"2":{"58":1,"102":1}}],["forms",{"2":{"84":1,"85":2}}],["format",{"2":{"76":1,"78":1,"79":1,"84":1,"96":1}}],["formal",{"2":{"72":1}}],["former",{"2":{"32":1}}],["for",{"0":{"6":1,"95":1},"1":{"96":1,"97":1},"2":{"0":2,"1":3,"4":1,"5":1,"6":1,"20":1,"22":4,"23":1,"37":1,"39":2,"40":2,"41":4,"42":6,"46":5,"50":1,"54":1,"56":3,"59":2,"61":2,"62":1,"63":1,"67":1,"68":1,"70":4,"71":3,"72":1,"74":1,"79":1,"80":1,"81":2,"84":20,"85":16,"94":1,"95":1,"96":2,"98":1}}],["f",{"2":{"2":2,"16":3}}],["field",{"2":{"84":1}}],["fields",{"2":{"42":1,"84":1,"85":4}}],["figure=",{"2":{"97":1}}],["figure",{"2":{"56":2,"95":1,"97":1,"103":1,"104":1,"105":1,"106":1}}],["fig",{"2":{"42":3,"56":8,"95":1,"97":1,"103":2,"104":2,"105":2,"106":3}}],["filterig",{"2":{"96":1}}],["filter",{"2":{"84":2}}],["fillarrays",{"2":{"81":3}}],["fill",{"2":{"81":1,"84":1,"85":1}}],["fillvalue=",{"2":{"85":1}}],["fillvalue",{"2":{"50":3,"58":1,"59":1,"62":3,"64":2,"65":3,"66":3,"67":5}}],["filling",{"2":{"28":1,"29":1}}],["filename",{"2":{"50":2,"84":1}}],["files",{"0":{"101":1},"2":{"7":1,"57":1,"60":1,"84":5,"85":2,"88":1}}],["file",{"2":{"2":1,"7":1,"27":1,"40":1,"59":2,"78":3,"79":2,"81":1,"84":2,"87":4}}],["findaxis",{"2":{"85":1}}],["findall",{"2":{"22":1,"96":1}}],["find",{"2":{"36":1,"85":1,"98":1}}],["finalizer",{"2":{"85":1}}],["finalize",{"2":{"85":1}}],["finally",{"2":{"22":1,"84":1}}],["final",{"2":{"21":1,"22":1}}],["firstly",{"2":{"37":1}}],["first",{"2":{"8":4,"16":3,"18":1,"22":1,"42":1,"45":1,"56":1,"82":1,"84":4,"85":1,"87":1,"91":1,"102":1}}],["fitting",{"2":{"84":1}}],["fittable",{"2":{"84":2}}],["fitcube",{"2":{"42":2}}],["fitsym",{"2":{"84":4}}],["fits",{"2":{"24":1}}],["fit",{"2":{"1":1,"61":1,"70":1}}],["t=union",{"2":{"85":1}}],["typing",{"2":{"90":1}}],["typically",{"2":{"84":1}}],["type",{"2":{"33":1,"47":1,"70":1,"72":1,"84":8,"85":3,"91":1,"92":1}}],["types",{"0":{"69":1},"1":{"70":1,"71":1,"72":1,"73":1},"2":{"24":2,"26":1,"27":1,"47":1,"65":1,"71":1,"84":2,"92":1}}],["tutorial",{"2":{"98":2,"99":1,"100":1}}],["tutorials",{"0":{"98":1},"1":{"99":1,"100":1,"101":1},"2":{"67":1,"98":3}}],["turn",{"2":{"84":1}}],["tuple",{"2":{"2":3,"4":1,"5":1,"6":1,"18":1,"20":1,"51":2,"52":1,"54":2,"55":2,"56":4,"84":5,"85":1}}],["tbl",{"2":{"42":2}}],["target",{"2":{"85":1}}],["tab",{"2":{"84":4}}],["tables",{"2":{"100":1}}],["tableaggregator",{"2":{"84":1}}],["table",{"0":{"100":1},"2":{"42":2,"58":1,"59":2,"63":2,"74":2,"80":2,"84":4,"85":1,"102":1}}],["tas",{"2":{"58":5,"102":5}}],["tair",{"2":{"56":1,"84":1}}],["ta",{"2":{"46":3}}],["takes",{"2":{"84":4}}],["taken",{"2":{"40":2}}],["take",{"2":{"16":1,"84":1,"85":2,"88":1}}],["treat",{"2":{"84":1}}],["treatment",{"2":{"84":1,"85":1}}],["treated",{"2":{"58":1}}],["tries",{"2":{"84":1}}],["translate",{"2":{"104":1,"105":1}}],["transformed",{"2":{"59":1,"63":1,"74":1,"80":1}}],["transformations",{"2":{"104":1}}],["transformation",{"2":{"22":1}}],["transform",{"2":{"22":2}}],["track",{"2":{"84":1}}],["true",{"2":{"12":1,"47":1,"61":1,"79":1,"81":1,"84":4,"85":1,"106":1}}],["tip",{"2":{"92":1}}],["tidy",{"2":{"84":1}}],["ticks",{"2":{"70":1}}],["ticks=false",{"2":{"56":1}}],["tick",{"2":{"68":1,"73":1,"91":1}}],["tiff",{"0":{"101":1}}],["tif",{"2":{"60":2,"94":1}}],["title",{"2":{"56":1,"59":1,"63":1,"74":1,"80":1,"87":1}}],["ti=at",{"2":{"56":3}}],["ti=>cyclicbins",{"2":{"51":2,"52":1,"54":2,"55":2,"56":3}}],["ti",{"2":{"20":1,"26":4,"51":15,"52":2,"53":1,"54":8,"55":3,"56":6,"58":2,"59":2,"62":3,"63":1,"64":2,"65":2,"66":3,"67":5,"74":1,"80":1,"84":2,"102":2}}],["time1",{"2":{"65":2}}],["timearray",{"0":{"46":1},"2":{"46":3}}],["time=1",{"2":{"91":1}}],["time=date",{"2":{"37":1}}],["time=at",{"2":{"37":1}}],["time=between",{"2":{"37":1}}],["time",{"0":{"49":1},"2":{"1":1,"7":1,"8":4,"9":3,"10":3,"12":1,"13":1,"14":7,"16":14,"17":2,"18":4,"19":1,"20":4,"21":10,"22":8,"23":5,"26":2,"29":3,"30":1,"35":2,"37":8,"39":4,"40":7,"41":4,"42":3,"46":5,"52":1,"53":1,"56":1,"58":2,"59":2,"62":3,"64":2,"65":4,"66":3,"67":5,"70":2,"71":1,"84":4,"91":4,"95":1,"96":4,"102":2}}],["timestamp",{"2":{"46":1}}],["timestep",{"2":{"42":1}}],["timeseries",{"2":{"46":3}}],["times",{"2":{"0":1}}],["tesselation",{"2":{"106":1}}],["testrange",{"2":{"85":1}}],["test1",{"2":{"47":1}}],["test2",{"2":{"47":2}}],["test",{"2":{"17":4,"18":1,"19":3,"20":4,"21":4,"47":3,"85":1,"102":1}}],["terminal",{"2":{"88":1}}],["text",{"2":{"87":1}}],["tensors",{"2":{"70":1}}],["tell",{"2":{"36":1}}],["temporary",{"2":{"85":1}}],["temporal",{"2":{"41":1,"48":1,"70":1}}],["tempo",{"2":{"51":6,"54":4,"55":1}}],["temp",{"2":{"9":2}}],["temperature=temperature",{"2":{"40":1}}],["temperature",{"2":{"9":2,"40":4,"56":2,"58":3,"59":2,"62":6,"64":5,"65":6,"66":6,"67":10,"70":1,"71":1,"72":1,"91":4}}],["tempname",{"2":{"2":1,"4":1,"5":1,"6":1}}],["tspan",{"2":{"16":1}}],["t",{"2":{"16":4,"37":1,"39":2,"40":2,"42":3,"59":1,"62":4,"64":2,"65":3,"66":3,"67":5,"76":1,"84":1,"85":2,"95":1,"96":1}}],["two",{"2":{"8":1,"9":1,"18":8,"19":4,"20":3,"21":2,"34":2,"35":1,"70":1,"85":1}}],["toghether",{"2":{"85":1}}],["together",{"2":{"46":1,"72":1}}],["touches",{"2":{"67":1}}],["tolerances",{"2":{"66":1}}],["tos",{"2":{"59":5,"62":6,"63":2,"64":4,"65":4,"66":3,"67":9,"68":2,"74":2,"75":2,"77":2,"80":1}}],["top",{"2":{"56":1}}],["too",{"2":{"40":1,"70":1,"84":1}}],["todo",{"2":{"21":1,"96":1}}],["toy",{"2":{"21":1,"81":1}}],["to",{"0":{"9":1,"18":1,"19":1,"43":1,"80":1,"86":1,"87":1,"93":1},"1":{"44":1,"45":1,"87":1,"88":2},"2":{"0":4,"1":4,"3":1,"4":1,"6":2,"7":1,"8":1,"9":1,"10":8,"12":1,"15":1,"16":2,"17":1,"18":2,"19":1,"20":4,"21":3,"22":2,"23":6,"24":3,"25":2,"27":3,"28":1,"31":2,"32":2,"34":3,"35":1,"37":2,"39":2,"40":6,"41":1,"42":1,"45":2,"46":2,"47":1,"48":1,"49":3,"50":2,"52":1,"53":1,"56":1,"57":1,"58":3,"59":2,"61":1,"62":2,"63":3,"67":1,"68":1,"69":1,"70":5,"71":3,"72":2,"73":2,"74":1,"75":2,"76":2,"77":2,"78":2,"79":1,"80":2,"81":4,"82":3,"84":49,"85":19,"87":2,"88":3,"92":2,"93":1,"98":1,"100":3,"102":2,"106":1}}],["though",{"2":{"81":1}}],["those",{"2":{"11":1,"24":1,"26":1,"27":1,"45":1,"71":1,"82":1}}],["through",{"2":{"84":5,"85":5,"90":1}}],["thrown",{"2":{"79":1}}],["three",{"2":{"36":1,"71":1,"95":1}}],["threaded",{"2":{"59":1}}],["threads",{"2":{"59":2,"84":2}}],["thread",{"2":{"23":1,"59":3}}],["than",{"2":{"24":1,"36":1,"41":1,"42":1}}],["that",{"2":{"0":1,"9":2,"10":1,"13":1,"16":5,"20":1,"21":1,"22":2,"23":1,"24":1,"33":1,"35":1,"38":1,"40":2,"42":1,"46":1,"47":1,"49":1,"52":1,"55":1,"59":2,"61":1,"68":1,"70":1,"71":2,"73":1,"81":2,"84":13,"85":13,"98":1,"100":1}}],["things",{"2":{"31":1}}],["think",{"2":{"1":1}}],["thinking",{"2":{"1":1}}],["this",{"2":{"0":1,"1":1,"4":1,"7":1,"10":1,"13":2,"16":4,"17":1,"19":2,"22":3,"23":1,"24":1,"28":1,"31":1,"34":1,"39":1,"40":2,"41":2,"42":2,"45":1,"46":1,"49":1,"53":2,"57":1,"58":1,"59":1,"61":1,"62":2,"67":1,"69":1,"72":1,"76":1,"82":2,"83":2,"84":7,"85":10,"87":1,"88":2,"99":1,"100":1}}],["they",{"2":{"46":4,"62":1}}],["their",{"0":{"39":1,"40":1},"2":{"38":1,"40":1,"47":1,"70":1,"84":3,"85":2}}],["then",{"2":{"21":2,"22":2,"33":1,"41":1,"46":1,"81":1,"82":1,"88":2,"90":1}}],["thereby",{"2":{"84":1}}],["therefore",{"2":{"42":1,"92":1}}],["there",{"2":{"14":2,"21":1,"27":1,"34":1,"46":2,"62":1,"84":1}}],["theme",{"2":{"56":2}}],["them",{"2":{"7":1,"10":1,"36":1,"61":1,"82":1,"84":1}}],["these",{"2":{"0":1,"6":1,"34":1,"36":1,"47":1,"68":1,"70":1}}],["the",{"0":{"32":1,"34":1,"42":1,"50":1,"96":1,"99":1},"1":{"33":1},"2":{"0":5,"1":4,"2":3,"4":1,"5":4,"6":4,"8":6,"9":3,"10":1,"11":1,"13":3,"14":2,"15":1,"16":12,"17":3,"18":5,"19":2,"20":3,"21":10,"22":14,"23":7,"24":2,"27":1,"29":3,"31":1,"32":3,"33":5,"34":3,"35":2,"36":2,"37":9,"39":3,"40":10,"41":3,"42":10,"45":1,"46":7,"48":2,"49":5,"50":4,"51":2,"52":1,"53":2,"54":2,"55":2,"56":9,"59":2,"61":3,"62":6,"63":1,"64":5,"65":3,"66":5,"67":6,"68":1,"69":1,"70":5,"71":4,"72":4,"78":1,"79":3,"80":1,"81":10,"82":2,"84":122,"85":83,"86":1,"87":1,"88":6,"90":2,"91":6,"92":8,"93":5,"94":1,"95":1,"96":4,"98":6,"99":1,"100":5,"102":1}}],["switched",{"2":{"92":1}}],["syntax",{"2":{"92":1,"98":1}}],["system",{"2":{"88":1}}],["symbol",{"2":{"10":1,"12":1,"13":1,"18":1,"20":1,"29":2,"46":5,"51":4,"52":2,"53":2,"54":4,"55":4,"56":6,"84":3,"85":1}}],["src",{"2":{"87":1}}],["sres",{"2":{"59":2,"63":2,"74":2,"80":2}}],["skipped",{"2":{"84":1}}],["skip",{"2":{"84":1}}],["skipmissing",{"2":{"23":1,"41":1}}],["skeleton=a",{"2":{"81":1}}],["skeleton=true",{"2":{"81":2}}],["skeleton=false",{"2":{"79":1,"84":1}}],["skeleton",{"0":{"81":1},"2":{"81":8,"82":4}}],["ssp585",{"2":{"58":1,"102":2}}],["snow3",{"2":{"42":1}}],["snippet",{"2":{"6":1}}],["small",{"2":{"31":1,"46":1}}],["slightly",{"2":{"98":1}}],["slicing",{"2":{"16":1}}],["slices",{"2":{"84":3}}],["slice",{"2":{"16":1,"102":4,"103":1}}],["slow",{"2":{"40":1,"84":1}}],["slurmmanager",{"2":{"23":1}}],["shinclude",{"2":{"88":1}}],["shdocs>",{"2":{"88":1}}],["shnpm",{"2":{"88":2}}],["shouldn",{"2":{"62":1}}],["should",{"2":{"37":1,"46":1,"50":1,"61":1,"62":1,"84":3,"85":1,"87":1,"88":1,"93":1}}],["showprog",{"2":{"84":1}}],["shown",{"2":{"62":1,"84":1}}],["shows",{"2":{"56":1}}],["showing",{"2":{"46":1}}],["show",{"2":{"23":1,"82":1,"106":1}}],["shading=false",{"2":{"104":1,"105":1,"106":1}}],["shall",{"2":{"84":5,"85":1}}],["shares",{"2":{"40":1}}],["share",{"0":{"39":1,"40":1},"2":{"38":1,"40":1,"71":1,"84":1}}],["shared",{"2":{"4":1,"5":1,"6":1,"20":1,"30":1,"35":1,"39":2,"40":3,"44":1,"45":1,"46":2,"58":1,"59":1,"60":1,"63":1,"74":1,"80":1,"81":1,"102":1}}],["shape",{"2":{"6":1}}],["scene",{"2":{"106":3}}],["scenariomip",{"2":{"58":1,"102":2}}],["scenarios",{"2":{"17":1,"102":1}}],["scripts",{"2":{"88":1}}],["scope",{"2":{"84":1,"85":1}}],["scalar",{"2":{"58":1}}],["scattered",{"2":{"7":1}}],["sure",{"2":{"106":1}}],["surface",{"2":{"56":2,"58":2,"59":2,"62":6,"64":5,"65":6,"66":6,"67":10,"104":1,"105":1}}],["such",{"2":{"62":1,"67":1,"84":1,"92":1}}],["subcubes",{"2":{"84":1}}],["subtype",{"2":{"70":1,"85":1,"92":1}}],["subtables",{"2":{"42":1}}],["subsetextensions",{"2":{"85":1}}],["subsetcube",{"2":{"84":1}}],["subseting",{"2":{"68":1}}],["subsetting",{"0":{"37":1,"38":1,"39":1,"40":1},"1":{"39":1,"40":1},"2":{"58":1,"59":1,"85":1,"96":1}}],["subset",{"0":{"36":1},"1":{"37":1,"38":1,"39":1,"40":1},"2":{"37":5,"40":4,"63":1,"66":1,"84":1,"85":1,"102":1}}],["subsets",{"2":{"15":1,"73":1}}],["subsequent",{"2":{"17":1}}],["supposed",{"2":{"84":1}}],["support",{"2":{"27":1,"46":1}}],["supertype",{"2":{"26":1,"27":1}}],["summarysize",{"2":{"47":2}}],["sum",{"2":{"18":1,"19":1,"21":1,"22":2,"41":1,"51":4,"54":2,"55":4,"56":2}}],["suggestions",{"2":{"6":1}}],["s",{"2":{"10":1,"16":3,"18":1,"19":1,"21":2,"33":1,"35":1,"37":1,"39":1,"40":2,"56":7,"61":1,"63":1,"73":1,"81":1,"84":2,"85":1,"94":1,"96":1}}],["style",{"0":{"100":1}}],["st",{"2":{"92":1}}],["stdzero",{"2":{"84":1}}],["stock3",{"2":{"46":4}}],["stock2",{"2":{"46":4}}],["stock1",{"2":{"46":4}}],["stocks",{"2":{"46":7}}],["storing",{"2":{"71":1}}],["storage",{"2":{"11":1,"58":1}}],["stored",{"2":{"70":3,"85":2}}],["stores",{"2":{"70":1,"84":1}}],["store",{"2":{"0":1,"58":4,"70":1,"71":1,"102":2}}],["struct",{"2":{"84":1,"85":4}}],["structures",{"2":{"69":1}}],["structure",{"2":{"33":2,"46":1,"72":1}}],["strings",{"0":{"47":1}}],["string",{"2":{"8":1,"9":2,"10":1,"12":1,"13":1,"14":2,"16":5,"17":3,"18":4,"19":3,"20":1,"21":4,"22":6,"25":1,"26":2,"27":3,"29":3,"32":1,"33":3,"34":1,"35":2,"37":5,"41":3,"42":3,"47":5,"51":1,"52":1,"54":2,"55":1,"56":1,"58":2,"59":2,"60":1,"62":3,"63":1,"64":2,"65":3,"66":3,"67":5,"74":1,"79":1,"80":1,"81":1,"84":6,"85":4,"91":4,"96":1,"102":1}}],["stable",{"2":{"92":1}}],["stat",{"2":{"78":2}}],["status",{"2":{"62":2}}],["statistics",{"2":{"14":1,"23":1,"42":3,"48":1,"95":1}}],["standard",{"2":{"58":1,"59":1,"62":3,"64":2,"65":3,"66":3,"67":5}}],["standards",{"2":{"58":1,"59":1,"63":1,"74":1,"80":1,"102":1}}],["stack",{"2":{"47":1}}],["started",{"0":{"89":1},"1":{"90":1,"91":1,"92":1}}],["start=12",{"2":{"51":2,"52":1,"54":2,"55":2,"56":3}}],["start=december",{"2":{"51":3,"54":1}}],["start",{"2":{"10":1,"37":1,"76":1,"82":1}}],["still",{"2":{"8":1,"22":1,"71":1,"98":1}}],["step=3",{"2":{"51":2,"52":1,"54":2,"55":2,"56":3}}],["steps",{"2":{"10":1,"14":1,"56":1,"84":1,"88":1}}],["step",{"2":{"7":1,"14":1,"20":1,"41":2,"84":1,"85":2,"102":1}}],["sphere",{"0":{"106":1},"2":{"106":3}}],["spheroid",{"2":{"60":1}}],["split",{"2":{"84":1}}],["splitted",{"2":{"2":1}}],["special",{"2":{"65":1,"84":1,"85":1}}],["specifiers",{"2":{"85":1}}],["specifier",{"2":{"84":1}}],["specifies",{"2":{"84":3}}],["specified",{"2":{"84":8,"85":1}}],["specific",{"2":{"37":1,"84":2}}],["specifying",{"2":{"84":2,"85":1}}],["specify",{"0":{"20":1},"2":{"17":1,"29":1,"84":1}}],["specs",{"2":{"58":1,"102":1}}],["spectral",{"2":{"56":1}}],["sparse",{"2":{"70":1}}],["spatio",{"2":{"41":1}}],["spatial",{"2":{"1":1,"14":1,"22":5,"23":1,"48":1,"70":1}}],["span",{"2":{"37":1,"95":1}}],["space",{"2":{"1":1,"16":1}}],["safe",{"2":{"59":2}}],["sampled",{"2":{"4":4,"5":4,"6":2,"8":1,"9":1,"10":3,"12":3,"13":3,"14":3,"16":9,"17":3,"18":3,"19":2,"20":3,"21":9,"22":8,"25":2,"26":6,"27":4,"29":9,"30":3,"32":9,"33":6,"34":2,"35":3,"37":14,"39":6,"40":10,"41":9,"42":5,"44":1,"45":5,"46":4,"47":4,"51":3,"52":2,"54":2,"55":1,"56":7,"58":6,"59":6,"60":2,"62":9,"63":3,"64":6,"65":4,"66":9,"67":15,"68":2,"74":3,"80":6,"81":6,"91":5,"96":1,"102":3}}],["same",{"2":{"0":1,"2":1,"5":1,"6":1,"9":1,"16":1,"20":1,"21":1,"22":2,"26":1,"27":1,"33":2,"34":2,"35":1,"40":1,"45":1,"46":2,"61":1,"64":1,"65":1,"66":1,"70":1,"71":3,"72":2,"84":1,"85":1,"88":1}}],["saves",{"2":{"79":1,"84":1}}],["save",{"0":{"81":1},"2":{"12":1,"27":1,"45":1,"47":1,"75":2,"76":1,"77":2,"78":1,"81":1,"84":2}}],["savecube",{"2":{"2":1,"75":1,"77":1,"81":1,"84":2}}],["savedataset",{"2":{"4":1,"5":1,"6":1,"76":1,"78":1,"79":2,"80":1,"81":2,"84":2,"85":1}}],["saved",{"2":{"2":1,"11":1,"20":1,"78":1,"79":1}}],["saving",{"2":{"1":1,"4":1,"5":1,"6":1,"16":1}}],["serve",{"2":{"85":1}}],["series",{"0":{"49":1},"2":{"23":1}}],["sequence",{"2":{"70":1}}],["seaborn",{"2":{"103":1,"104":1,"105":1,"106":1}}],["searching",{"2":{"84":1}}],["search",{"2":{"84":1}}],["sea",{"2":{"59":3,"62":6,"63":1,"64":5,"65":6,"66":6,"67":10,"74":1,"80":1}}],["season",{"2":{"51":1,"54":2,"55":1}}],["seasons",{"0":{"51":1,"53":1,"56":1},"1":{"52":1,"53":1},"2":{"51":9,"54":1,"56":5}}],["seasonal",{"0":{"49":1,"95":1,"97":1},"1":{"96":1,"97":1},"2":{"49":1,"55":1,"56":1,"95":1,"96":4}}],["sebastien",{"2":{"59":2,"63":2,"74":2,"80":2}}],["separate",{"2":{"84":1,"85":1}}],["separated",{"2":{"71":1}}],["separately",{"2":{"5":1,"22":1,"23":1}}],["sep",{"2":{"51":4,"52":2,"53":1,"54":4,"55":4,"56":6}}],["selected",{"2":{"85":1,"95":1}}],["select",{"0":{"63":1,"64":1,"65":1,"66":1},"1":{"64":1,"65":1,"66":1,"67":1,"68":1},"2":{"40":1,"63":1}}],["selectors",{"2":{"67":1}}],["selector",{"2":{"40":1,"66":1}}],["selection",{"2":{"40":2}}],["selecting",{"2":{"37":1,"39":1,"40":1}}],["seed",{"2":{"17":1,"21":2}}],["see",{"2":{"16":1,"18":1,"67":1,"84":1,"92":1}}],["second",{"2":{"8":3,"18":1,"19":1,"84":1}}],["section",{"2":{"7":1,"10":1,"24":1,"28":1,"31":1,"46":1,"57":1,"69":1,"83":1}}],["setting",{"2":{"79":1,"84":1,"85":1}}],["sets",{"2":{"6":1,"50":1}}],["set",{"0":{"4":1,"5":1,"6":1},"2":{"4":1,"5":1,"19":2,"22":1,"58":1,"79":1,"84":1,"85":2,"88":1}}],["setchunks",{"2":{"1":1,"2":2,"3":1,"4":1,"5":1,"6":1,"84":1,"85":1}}],["several",{"0":{"16":1},"2":{"0":1,"16":1,"35":1,"38":1}}],["significant",{"2":{"76":1}}],["sin",{"2":{"95":1}}],["sink",{"2":{"85":1}}],["since",{"2":{"62":1,"93":1}}],["single",{"0":{"95":1},"1":{"96":1,"97":1},"2":{"0":1,"7":1,"8":1,"59":1,"72":1,"75":1,"77":1,"84":6,"85":1}}],["simulate",{"2":{"46":1}}],["simplicity",{"2":{"95":1}}],["simply",{"2":{"23":1,"47":1,"82":1,"88":1,"93":1}}],["simple",{"2":{"16":1,"31":1,"91":1}}],["situations",{"2":{"1":1}}],["size=",{"2":{"104":1,"105":1,"106":1}}],["sizes",{"2":{"2":1,"84":2,"85":2}}],["size",{"2":{"0":1,"1":1,"4":1,"5":1,"8":1,"9":1,"10":1,"12":1,"13":1,"14":2,"16":5,"17":1,"18":1,"19":1,"21":3,"22":2,"25":1,"26":1,"27":1,"29":2,"32":1,"33":3,"34":1,"35":1,"37":5,"41":3,"42":3,"54":1,"56":1,"58":1,"59":1,"62":3,"64":2,"65":3,"66":3,"67":5,"78":4,"81":1,"82":1,"84":3,"85":4,"91":3,"95":1,"96":2,"97":1,"103":1}}],["sosstsst",{"2":{"59":1,"62":3,"64":2,"65":3,"66":3,"67":5}}],["software",{"2":{"59":1,"63":1,"74":1}}],["sort",{"2":{"22":1}}],["so",{"2":{"2":1,"23":1,"36":1,"40":1,"84":1,"85":1}}],["source",{"2":{"0":2,"59":1,"63":1,"74":1,"79":1,"80":1,"84":25,"85":24}}],["sometimes",{"2":{"81":1,"100":1}}],["some",{"0":{"40":1},"2":{"0":1,"11":1,"38":1,"40":1,"41":1,"46":2,"56":1,"84":1,"95":1,"104":1}}],["advance",{"2":{"62":1}}],["addargs",{"2":{"84":3,"85":1}}],["adds",{"2":{"70":2,"73":1}}],["addprocs",{"2":{"23":2}}],["addition",{"2":{"22":1,"24":1,"70":1}}],["additional",{"2":{"4":3,"5":3,"9":1,"16":1,"21":1,"40":10,"45":4,"46":4,"58":2,"80":3,"84":4,"85":3,"102":2}}],["added",{"2":{"15":1,"80":1,"84":1,"85":1}}],["add",{"2":{"6":1,"10":1,"12":1,"41":1,"59":1,"87":2,"90":2,"93":3,"94":4,"104":1}}],["again",{"2":{"79":1,"82":1}}],["agreement",{"2":{"56":1}}],["aggregation",{"2":{"23":1}}],["aggregate",{"2":{"22":1}}],["air",{"2":{"56":2,"58":3}}],["authority",{"2":{"60":5}}],["auto",{"2":{"18":1,"20":1,"84":1}}],["aug",{"2":{"51":4,"52":2,"53":1,"54":4,"55":4,"56":6}}],["api",{"0":{"83":1,"84":1,"85":1},"1":{"84":1,"85":1}}],["apr",{"2":{"51":4,"52":2,"53":1,"54":4,"55":4,"56":6}}],["appropriate",{"2":{"87":1}}],["approximated",{"2":{"85":1}}],["approx",{"2":{"84":1,"85":1}}],["approach",{"2":{"9":1}}],["append=true",{"2":{"80":2}}],["append",{"0":{"80":1},"2":{"79":1,"84":1}}],["apply",{"0":{"41":1},"2":{"10":2,"13":1,"15":1,"21":1,"23":1,"56":1,"96":1}}],["application",{"2":{"21":1}}],["applications",{"2":{"0":1}}],["applies",{"2":{"13":1}}],["applied",{"2":{"0":1,"3":1,"4":1,"22":1,"84":2,"85":1}}],["a3",{"2":{"30":4}}],["a2",{"2":{"29":1,"30":3,"59":2,"63":2,"74":2,"80":2,"91":1}}],["a1",{"2":{"29":1}}],["able",{"2":{"45":1}}],["abstractstring",{"2":{"84":1}}],["abstractdict",{"2":{"84":1,"85":3}}],["abstractdimarray",{"2":{"26":1,"27":1,"70":1}}],["abs",{"2":{"21":1}}],["about",{"2":{"1":2,"36":1,"66":1,"91":1,"99":1}}],["above",{"2":{"0":1,"5":1,"16":1,"81":1,"90":1}}],["atol",{"2":{"66":1}}],["atmosphere",{"2":{"59":1,"63":1,"74":1,"80":1}}],["atmos",{"2":{"58":1,"102":1}}],["attributes",{"2":{"56":1,"84":1,"85":1}}],["at",{"2":{"21":1,"22":4,"27":1,"40":1,"46":3,"56":1,"59":3,"62":3,"63":1,"64":2,"65":6,"66":7,"67":5,"71":1,"72":2,"74":1,"79":2,"80":1,"84":3,"85":2,"86":1,"87":2,"88":2,"91":1,"98":2}}],["after",{"2":{"14":1,"16":1,"60":1,"84":3}}],["asaxisarray",{"2":{"84":1}}],["assemble",{"2":{"91":1}}],["assessment",{"2":{"59":2,"63":2,"74":2,"80":2}}],["associated",{"2":{"84":1}}],["assign",{"0":{"43":1},"1":{"44":1,"45":1}}],["aspect=dataaspect",{"2":{"56":1,"103":1}}],["asked",{"0":{"31":1},"1":{"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1}}],["as",{"2":{"5":1,"12":1,"16":5,"18":1,"19":1,"21":1,"22":1,"23":1,"26":1,"27":2,"33":2,"34":1,"40":1,"42":1,"46":2,"51":2,"56":1,"58":1,"59":1,"60":1,"61":1,"64":1,"67":1,"68":1,"70":1,"73":1,"81":1,"82":1,"84":11,"85":3,"92":1,"100":1,"102":1}}],["axs",{"2":{"50":1,"56":9}}],["ax",{"2":{"42":1,"95":3,"97":3,"103":1,"104":3,"105":3,"106":5}}],["axlist",{"2":{"10":2,"17":2,"19":1,"21":4,"22":2,"23":2,"29":2,"30":1,"35":3,"85":5,"91":3}}],["axessmall",{"2":{"85":2}}],["axes",{"0":{"32":1,"34":1},"1":{"33":1},"2":{"4":4,"5":4,"6":1,"20":1,"29":1,"30":1,"32":2,"33":1,"34":2,"37":2,"39":5,"40":13,"44":1,"45":5,"46":8,"58":3,"59":1,"60":1,"63":2,"70":2,"74":1,"80":4,"81":1,"84":15,"85":11,"91":1,"96":2,"102":3}}],["axislegend",{"2":{"97":1}}],["axis=false",{"2":{"106":1}}],["axis=",{"2":{"95":1}}],["axisdescriptor",{"2":{"85":1}}],["axisdesc",{"2":{"84":3}}],["axis",{"0":{"4":1},"2":{"4":1,"9":2,"16":3,"34":1,"37":1,"39":1,"40":7,"46":1,"56":1,"60":2,"68":1,"73":1,"81":1,"84":16,"85":14,"91":1,"97":1,"102":1,"103":1}}],["always",{"2":{"84":2,"85":1,"86":1,"92":1}}],["already",{"2":{"62":1,"79":1,"84":1,"85":1}}],["al",{"2":{"59":1,"63":1,"72":1,"74":1,"80":1}}],["alternatives",{"2":{"84":1}}],["alternatively",{"2":{"0":1,"2":1,"84":2,"90":1}}],["altered",{"2":{"58":1,"59":1,"62":3,"64":2,"65":3,"66":3,"67":5}}],["although",{"2":{"46":1,"47":1,"67":1}}],["algebraofgraphics",{"2":{"94":1}}],["algebra",{"0":{"41":1},"2":{"41":1}}],["along",{"0":{"8":1},"2":{"8":1,"16":1,"84":6,"85":2,"98":1}}],["allaxes",{"2":{"85":1}}],["allinaxes",{"2":{"85":1}}],["allmissing",{"2":{"84":1}}],["allocate",{"2":{"81":1}}],["allocation",{"2":{"22":1}}],["allow",{"2":{"85":1}}],["allowed",{"2":{"47":1}}],["allowing",{"2":{"26":1,"27":1,"71":1}}],["allows",{"2":{"23":1}}],["all",{"0":{"6":1,"39":1,"40":1},"2":{"4":1,"6":2,"10":1,"12":1,"13":1,"14":2,"22":1,"23":4,"38":1,"40":2,"46":3,"56":2,"60":1,"67":1,"70":1,"72":2,"79":3,"81":1,"83":1,"84":6,"85":7,"88":1}}],["also",{"2":{"2":1,"3":1,"14":1,"21":1,"23":1,"29":1,"32":1,"40":1,"42":1,"70":2,"71":1,"76":1,"81":2,"84":1,"90":1}}],["annual",{"2":{"84":1}}],["analog",{"2":{"71":1}}],["analyzing",{"2":{"1":1}}],["anchor",{"2":{"21":1}}],["another",{"2":{"16":1,"40":1}}],["anynymous",{"2":{"84":1}}],["anyocean",{"2":{"84":1}}],["anymissing",{"2":{"84":1}}],["anymore",{"2":{"21":1}}],["any",{"2":{"8":1,"9":1,"10":1,"11":1,"14":2,"16":5,"18":3,"20":1,"21":2,"22":4,"25":1,"26":2,"27":3,"29":1,"32":1,"33":3,"34":1,"35":1,"37":6,"41":3,"42":3,"47":4,"51":3,"52":2,"54":4,"55":3,"56":3,"58":2,"59":3,"60":1,"62":3,"63":1,"64":2,"65":3,"66":3,"67":5,"74":1,"80":1,"81":1,"84":4,"85":9,"91":1,"96":1,"102":1}}],["an",{"0":{"8":1},"2":{"9":1,"10":4,"12":1,"13":1,"15":1,"23":2,"33":1,"34":1,"39":1,"40":1,"42":1,"47":1,"61":1,"63":3,"66":1,"70":1,"71":1,"73":1,"74":1,"75":1,"76":1,"77":1,"79":1,"80":1,"84":19,"85":8}}],["and",{"0":{"17":1,"28":1,"34":1,"48":1,"57":1,"63":1,"67":1,"74":1},"1":{"18":1,"19":1,"20":1,"29":1,"30":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"58":1,"59":1,"60":1,"61":1,"62":1,"64":1,"65":1,"66":1,"67":1,"68":1,"75":1,"76":1,"77":1,"78":1,"79":1,"80":1,"81":1,"82":1},"2":{"0":1,"2":1,"5":1,"6":1,"7":1,"8":1,"12":1,"16":4,"17":2,"18":2,"20":2,"21":4,"22":2,"24":1,"28":1,"29":1,"32":1,"35":1,"37":1,"40":6,"41":1,"42":6,"46":5,"48":1,"49":1,"51":1,"56":1,"57":2,"58":1,"59":1,"62":1,"63":1,"67":1,"70":5,"71":3,"72":2,"74":1,"76":2,"78":1,"79":1,"80":1,"81":3,"82":1,"84":19,"85":6,"86":1,"88":4,"90":1,"91":2,"95":1,"102":1,"104":1}}],["available",{"2":{"67":2,"81":1,"83":1,"84":2,"90":1}}],["avariable",{"2":{"0":1}}],["avoid",{"2":{"59":1}}],["avoids",{"2":{"22":1}}],["avoided",{"2":{"0":1}}],["averaging",{"2":{"14":1}}],["averages",{"0":{"49":1},"2":{"48":1}}],["average",{"2":{"14":1,"49":2}}],["arg",{"2":{"84":1}}],["argument",{"2":{"23":1,"81":1,"84":4,"85":2}}],["arguments",{"2":{"21":1,"56":1,"84":11,"85":3}}],["artype",{"2":{"84":2}}],["archgdaldatasets",{"2":{"60":1}}],["archgdal",{"2":{"60":2,"94":1}}],["arr2",{"2":{"27":1}}],["arr",{"2":{"22":7,"27":2}}],["arrayinfo",{"2":{"85":1}}],["arrays",{"2":{"6":1,"7":1,"8":2,"9":1,"11":1,"28":1,"30":2,"58":2,"59":2,"69":1,"70":4,"71":3,"72":3,"84":2,"85":1}}],["array",{"0":{"22":1,"25":1},"2":{"0":1,"1":1,"8":2,"9":2,"10":3,"12":2,"13":2,"15":1,"18":1,"20":1,"22":8,"25":2,"34":1,"51":1,"56":1,"63":1,"70":4,"71":1,"72":1,"73":2,"81":5,"82":5,"84":10,"85":4,"91":3}}],["arbitrary",{"2":{"16":1}}],["arithmetics",{"0":{"12":1},"2":{"10":1}}],["areas",{"2":{"84":1}}],["area",{"2":{"58":2,"84":1}}],["areacella",{"2":{"58":2,"102":1}}],["are",{"2":{"0":1,"11":1,"18":1,"19":1,"24":3,"34":1,"36":1,"40":1,"46":3,"56":2,"62":2,"63":1,"67":1,"68":1,"70":3,"71":2,"72":3,"81":1,"84":11,"85":6,"86":1,"88":1,"98":2,"100":1}}],["according",{"2":{"84":1}}],["access",{"2":{"1":2,"13":1,"29":1,"70":1,"73":1}}],["accessed",{"2":{"0":2,"58":1,"59":2}}],["activate",{"2":{"42":1,"88":2,"95":1,"103":1,"106":1}}],["actually",{"2":{"85":1}}],["actual",{"2":{"13":1,"59":1,"81":1,"85":1,"91":1}}],["achieves",{"2":{"33":1}}],["achieved",{"2":{"0":1}}],["across",{"2":{"0":1,"7":1,"16":1,"70":3}}],["a",{"0":{"9":1,"11":1,"22":1,"29":1,"30":1,"32":1,"36":1,"37":1,"38":1,"39":1,"40":1,"43":1,"46":2,"47":1,"64":1,"68":1,"79":1,"80":1,"95":1,"101":1},"1":{"33":1,"37":1,"38":1,"39":2,"40":2,"44":1,"45":1,"96":1,"97":1},"2":{"0":4,"2":7,"3":1,"4":1,"7":1,"8":1,"9":2,"10":3,"11":1,"12":4,"13":2,"14":2,"15":1,"16":5,"17":2,"18":1,"19":2,"20":1,"22":75,"23":11,"25":2,"26":5,"27":8,"29":1,"31":1,"32":2,"33":2,"34":1,"36":4,"37":3,"38":1,"40":2,"42":3,"44":2,"45":2,"46":4,"49":1,"54":1,"56":2,"58":6,"59":4,"60":1,"66":2,"67":4,"68":1,"70":12,"71":4,"72":8,"73":1,"75":3,"76":3,"77":3,"78":1,"79":4,"81":5,"84":64,"85":31,"87":2,"88":2,"91":4,"92":1,"99":1,"100":1}}],["iall",{"2":{"85":1}}],["iwindow",{"2":{"85":1}}],["icolon",{"2":{"85":1}}],["icefire",{"2":{"103":1,"104":1,"105":1,"106":1}}],["ice",{"2":{"59":1,"63":1,"74":1,"80":1}}],["ipcc",{"2":{"59":3,"63":3,"74":3,"80":3}}],["ipsl",{"2":{"59":6,"63":6,"74":6,"80":6}}],["idx",{"2":{"96":3}}],["identical",{"2":{"84":1}}],["id",{"2":{"58":2,"59":2,"63":2,"74":2,"80":2,"102":2}}],["irregular",{"2":{"20":1,"40":6,"42":2,"46":4,"51":1,"54":2,"55":1,"56":1,"58":4,"59":2,"62":3,"63":1,"64":2,"65":2,"66":6,"67":5,"74":1,"80":1,"85":1,"102":2}}],["illustrate",{"2":{"17":1}}],["immutable",{"2":{"11":1}}],["improving",{"2":{"92":1}}],["improvement",{"2":{"76":1}}],["improve",{"2":{"6":1}}],["implementing",{"2":{"84":1}}],["importance",{"2":{"85":1}}],["important",{"2":{"1":1}}],["impossible",{"2":{"11":1}}],["i",{"0":{"35":1,"36":1,"41":1,"42":1,"43":1,"46":1},"1":{"37":1,"38":1,"39":1,"40":1,"44":1,"45":1},"2":{"8":1,"22":3,"26":1,"27":1,"37":1,"56":2,"59":2,"79":1,"84":7,"85":4,"88":2,"91":1,"96":3}}],["ispar",{"2":{"84":1,"85":1}}],["ismissing",{"2":{"81":1}}],["issue",{"2":{"76":1}}],["issues",{"2":{"50":1}}],["isequal",{"2":{"22":1}}],["is",{"2":{"1":2,"2":1,"6":1,"7":1,"9":1,"13":1,"14":2,"15":1,"16":4,"21":2,"22":2,"23":3,"24":1,"27":1,"31":1,"33":2,"35":1,"36":1,"40":2,"41":1,"42":4,"46":2,"47":2,"49":2,"50":2,"51":1,"55":1,"59":2,"62":2,"64":1,"67":2,"68":1,"70":4,"71":1,"72":2,"73":1,"81":4,"82":1,"84":12,"85":10,"87":1,"90":1,"92":1,"93":1,"98":1,"100":1}}],["if",{"2":{"0":1,"18":1,"19":1,"24":1,"40":3,"76":1,"79":1,"81":2,"84":12,"85":6,"88":1,"93":1,"98":1}}],["inline",{"2":{"106":2}}],["incubes",{"2":{"85":1}}],["incs",{"2":{"85":1}}],["include",{"2":{"84":2,"85":1}}],["included",{"2":{"67":1}}],["inarbc",{"2":{"85":1}}],["inar",{"2":{"85":2}}],["inplace",{"2":{"84":3,"85":1}}],["inputcube",{"2":{"85":2}}],["inputs",{"2":{"18":1}}],["input",{"2":{"16":1,"17":1,"18":1,"20":1,"23":2,"42":1,"84":13,"85":8}}],["innerchunks",{"2":{"85":1}}],["inner",{"2":{"84":9,"85":3}}],["installed",{"2":{"92":1}}],["installation",{"0":{"90":1}}],["install",{"0":{"93":1},"2":{"88":1,"90":1,"94":1}}],["instead",{"2":{"8":1,"9":1,"13":1,"32":1,"37":1,"67":1,"70":1}}],["insize",{"2":{"85":1}}],["inside",{"2":{"84":3}}],["initialization",{"2":{"58":1,"102":1}}],["initially",{"2":{"22":1}}],["inds",{"2":{"85":1}}],["indeed",{"2":{"82":1}}],["indexing",{"2":{"65":2,"66":2,"82":1,"92":1}}],["index",{"2":{"58":2,"85":2,"102":2}}],["independently",{"2":{"46":1}}],["indices",{"2":{"85":1,"96":1}}],["indicate",{"2":{"84":1}}],["indicating",{"2":{"9":1,"22":1,"84":1}}],["indims=indims",{"2":{"22":1,"23":1}}],["indims",{"0":{"18":1,"19":1,"21":1},"2":{"16":8,"18":4,"20":7,"21":3,"84":7}}],["individually",{"2":{"13":2}}],["individual",{"2":{"0":1,"58":1,"59":1}}],["information",{"2":{"62":1,"79":1,"85":2}}],["info",{"2":{"16":2,"27":1,"32":1,"48":1,"59":11,"78":4,"81":1,"92":1}}],["introducing",{"2":{"72":1}}],["int",{"2":{"33":1,"47":1,"96":3}}],["interoperability",{"0":{"94":1}}],["internal",{"0":{"85":1},"2":{"85":9}}],["internally",{"2":{"71":1}}],["interface",{"2":{"84":2,"100":1}}],["interested",{"2":{"98":1}}],["interest",{"2":{"62":1}}],["interval",{"2":{"59":1,"62":3,"64":2,"65":3,"66":4,"67":6}}],["intervalsets",{"2":{"67":1}}],["intervals",{"0":{"67":1},"2":{"37":1}}],["interactive",{"2":{"0":1}}],["integer",{"2":{"29":1,"65":1,"66":1,"70":1}}],["int64",{"2":{"4":4,"5":4,"6":2,"8":1,"9":1,"16":8,"17":1,"18":1,"19":1,"21":7,"25":2,"26":6,"27":2,"29":3,"32":9,"33":7,"34":4,"37":15,"39":4,"40":7,"42":3,"44":1,"45":5,"47":5,"51":6,"52":6,"54":4,"56":18,"80":3,"81":6,"85":1,"91":2}}],["into",{"0":{"61":1,"101":1},"1":{"62":1},"2":{"0":1,"1":1,"2":1,"7":1,"8":1,"16":1,"22":1,"24":2,"27":1,"40":4,"47":1,"57":1,"61":1,"72":2,"79":1,"82":1,"84":6,"85":3,"88":1,"106":1}}],["in",{"0":{"20":1,"43":1},"1":{"44":1,"45":1},"2":{"0":5,"1":1,"2":1,"4":2,"5":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":2,"14":4,"16":5,"17":1,"18":2,"19":2,"21":5,"22":8,"23":3,"24":2,"25":1,"26":2,"27":2,"29":2,"32":1,"33":3,"34":2,"37":5,"38":1,"40":1,"41":3,"42":5,"46":4,"47":2,"49":2,"50":2,"53":3,"54":1,"56":4,"58":2,"59":4,"61":1,"62":9,"64":2,"65":3,"66":4,"67":7,"68":1,"69":1,"70":5,"71":1,"72":2,"81":2,"82":1,"84":15,"85":9,"88":2,"90":1,"91":4,"93":2,"96":2,"98":3,"100":4,"102":1}}],["iter",{"2":{"84":1}}],["iterate",{"2":{"100":1}}],["iteration",{"0":{"100":1}}],["iterator",{"2":{"42":1}}],["iterators",{"2":{"22":1}}],["iterable",{"2":{"42":2,"84":2}}],["itself",{"2":{"84":1,"85":1}}],["its",{"2":{"0":1}}],["it",{"2":{"0":2,"1":3,"12":1,"16":1,"18":1,"20":1,"23":2,"32":1,"34":1,"35":1,"40":2,"42":2,"46":2,"47":1,"52":1,"54":1,"56":1,"59":1,"63":1,"70":2,"71":1,"73":1,"78":1,"79":1,"81":2,"82":1,"84":10,"85":5,"88":1,"90":1}}],["lscene",{"2":{"106":1}}],["lmdz",{"2":{"59":1,"63":1,"74":1,"80":1}}],["link",{"2":{"87":1}}],["linewidth=0",{"2":{"104":1,"105":1}}],["linewidth=2",{"2":{"97":2}}],["linewidth=1",{"2":{"95":1,"97":1}}],["linestyle=",{"2":{"97":2}}],["lines",{"2":{"95":1,"97":3}}],["line",{"2":{"42":1}}],["lim",{"2":{"59":1,"63":1,"74":1,"80":1}}],["libraries",{"2":{"37":1,"70":1}}],["libray",{"2":{"36":1}}],["little",{"2":{"23":1}}],["list",{"2":{"22":1,"46":5,"84":7,"85":6}}],["like",{"2":{"0":1,"42":1,"46":1,"84":2,"85":1,"87":1}}],["learn",{"2":{"100":1}}],["learning",{"2":{"70":1,"98":1}}],["leap",{"2":{"95":1}}],["least",{"2":{"40":1,"46":1,"84":1}}],["length",{"2":{"51":2,"52":1,"54":3,"84":1,"85":3}}],["length=20",{"2":{"35":1,"91":1}}],["length=365",{"2":{"95":1}}],["length=3",{"2":{"17":1}}],["length=4",{"2":{"17":1}}],["length=15",{"2":{"10":1,"22":1,"23":1,"29":1,"35":1,"91":1}}],["length=10",{"2":{"10":1,"22":1,"23":1,"29":1,"35":1,"91":1}}],["level",{"2":{"21":1,"46":1,"76":1,"78":1,"87":1,"88":1}}],["left",{"2":{"14":2}}],["let",{"2":{"10":1,"16":2,"18":1,"19":1,"33":1,"35":1,"37":1,"39":1,"40":1,"56":1,"61":1,"63":1,"96":1}}],["loopinds",{"2":{"85":2}}],["looping",{"2":{"84":1,"85":1}}],["loopcachesize",{"2":{"85":1}}],["loopchunksize",{"2":{"84":1}}],["loopaxes",{"2":{"85":1}}],["loopvars",{"2":{"84":1,"85":1}}],["loops",{"2":{"84":1}}],["loop",{"2":{"84":1,"85":2}}],["looped",{"2":{"84":3,"85":3}}],["look",{"2":{"79":1,"84":1,"85":1,"87":1,"88":1}}],["lookups",{"2":{"51":15,"52":10,"54":5,"55":5,"56":38,"68":3}}],["lookup",{"2":{"51":1,"53":1,"102":3}}],["looks",{"2":{"42":1,"46":1}}],["located",{"2":{"98":1}}],["locate",{"2":{"88":1}}],["location",{"2":{"85":3}}],["locations",{"2":{"71":1,"72":1}}],["localhost",{"2":{"88":1}}],["locally",{"0":{"88":1},"2":{"88":1}}],["local",{"2":{"23":1,"58":1}}],["lock",{"2":{"59":3}}],["locks",{"2":{"59":1}}],["lowclip",{"2":{"56":4}}],["low",{"2":{"46":4}}],["lost",{"2":{"24":1}}],["lo",{"2":{"16":4}}],["loadorgenerate",{"2":{"85":1}}],["loading",{"2":{"60":1,"62":1,"82":1}}],["load",{"0":{"61":1},"1":{"62":1},"2":{"16":1,"37":1,"40":2,"61":1,"62":1,"70":1}}],["loaded",{"2":{"8":1,"9":1,"10":1,"12":1,"13":1,"14":2,"16":5,"17":1,"18":1,"19":1,"21":3,"22":2,"25":1,"26":1,"27":1,"29":2,"32":1,"33":3,"34":1,"35":1,"37":5,"40":2,"41":3,"42":3,"47":2,"54":1,"58":1,"59":1,"62":8,"64":2,"65":3,"66":3,"67":5,"81":1,"91":2,"96":1}}],["long",{"2":{"56":1,"58":1,"59":1,"62":4,"64":2,"65":3,"66":3,"67":5}}],["longitudes=longitudes",{"2":{"40":1}}],["longitudes",{"2":{"40":12}}],["longitude",{"2":{"21":1,"37":1,"60":1,"91":2}}],["lonlat",{"2":{"39":1}}],["lon=1",{"2":{"37":1,"39":1}}],["lon",{"2":{"10":2,"12":1,"13":1,"14":2,"16":10,"17":2,"18":1,"19":1,"20":1,"21":5,"22":12,"23":1,"26":2,"29":3,"30":1,"35":2,"37":7,"39":3,"41":4,"42":3,"58":2,"59":2,"62":3,"63":1,"64":2,"65":3,"66":6,"67":10,"68":2,"74":1,"80":1,"102":2,"104":3}}],["lazy",{"2":{"84":1}}],["lazily",{"2":{"9":1,"13":1,"16":2,"35":1,"58":1,"59":1,"62":1,"64":2,"65":3,"66":3,"67":5}}],["layername",{"2":{"84":2}}],["layername=",{"2":{"81":2,"85":1}}],["layer",{"2":{"81":1,"84":1,"85":1}}],["layout",{"2":{"56":2}}],["labelled",{"2":{"84":1}}],["labels",{"2":{"56":1,"68":1,"72":1,"73":1}}],["label=false",{"2":{"56":1}}],["label=",{"2":{"56":1,"97":3}}],["label=cb",{"2":{"56":1}}],["label",{"2":{"56":3,"58":1,"102":1}}],["last",{"2":{"16":1,"23":1}}],["la",{"2":{"16":4}}],["latest",{"2":{"92":1,"93":1}}],["later",{"2":{"18":1}}],["lat=5",{"2":{"37":1,"39":1}}],["latitudes=latitudes",{"2":{"40":1}}],["latitudes",{"2":{"40":11}}],["latitude",{"2":{"21":1,"37":1,"60":1,"91":2}}],["lat",{"2":{"10":2,"12":1,"13":1,"14":2,"16":7,"17":2,"18":1,"19":1,"20":1,"21":5,"22":12,"23":1,"26":2,"29":3,"30":1,"35":2,"37":7,"39":3,"41":4,"42":3,"58":2,"59":2,"62":3,"63":1,"64":2,"65":3,"66":5,"67":5,"68":1,"74":1,"80":1,"84":1,"102":3,"104":1,"105":1}}],["larger",{"2":{"24":1}}],["large",{"2":{"0":2,"24":1,"50":1,"70":1}}]],"serializationVersion":2}';export{e as default}; diff --git a/previews/PR477/assets/chunks/VPLocalSearchBox.BOmt0h0p.js b/previews/PR477/assets/chunks/VPLocalSearchBox.BOmt0h0p.js new file mode 100644 index 00000000..7f152b6d --- /dev/null +++ b/previews/PR477/assets/chunks/VPLocalSearchBox.BOmt0h0p.js @@ -0,0 +1,8 @@ +var Ft=Object.defineProperty;var Ot=(a,e,t)=>e in a?Ft(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var Ae=(a,e,t)=>Ot(a,typeof e!="symbol"?e+"":e,t);import{V as Ct,p as ie,h as me,aj as tt,ak as Rt,al as At,q as $e,am as Mt,d as Lt,D as xe,an as st,ao as Dt,ap as zt,s as Pt,aq as jt,v as Me,P as he,O as _e,ar as Vt,as as $t,W as Bt,R as Wt,$ as Kt,o as H,b as Jt,j as _,a0 as Ut,k as L,at as qt,au as Gt,av as Ht,c as Z,n as nt,e as Se,C as it,F as rt,a as fe,t as pe,aw as Qt,ax as at,ay as Yt,a9 as Zt,af as Xt,az as es,_ as ts}from"./framework.CG45A19l.js";import{u as ss,d as ns}from"./theme.BCktWg-s.js";const is={root:()=>Ct(()=>import("./@localSearchIndexroot.x2g7CFsQ.js"),[])};/*! +* tabbable 6.2.0 +* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE +*/var mt=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ne=mt.join(","),gt=typeof Element>"u",ae=gt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Fe=!gt&&Element.prototype.getRootNode?function(a){var e;return a==null||(e=a.getRootNode)===null||e===void 0?void 0:e.call(a)}:function(a){return a==null?void 0:a.ownerDocument},Oe=function a(e,t){var s;t===void 0&&(t=!0);var n=e==null||(s=e.getAttribute)===null||s===void 0?void 0:s.call(e,"inert"),r=n===""||n==="true",i=r||t&&e&&a(e.parentNode);return i},rs=function(e){var t,s=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return s===""||s==="true"},bt=function(e,t,s){if(Oe(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(Ne));return t&&ae.call(e,Ne)&&n.unshift(e),n=n.filter(s),n},yt=function a(e,t,s){for(var n=[],r=Array.from(e);r.length;){var i=r.shift();if(!Oe(i,!1))if(i.tagName==="SLOT"){var o=i.assignedElements(),l=o.length?o:i.children,c=a(l,!0,s);s.flatten?n.push.apply(n,c):n.push({scopeParent:i,candidates:c})}else{var h=ae.call(i,Ne);h&&s.filter(i)&&(t||!e.includes(i))&&n.push(i);var m=i.shadowRoot||typeof s.getShadowRoot=="function"&&s.getShadowRoot(i),f=!Oe(m,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(i));if(m&&f){var b=a(m===!0?i.children:m.children,!0,s);s.flatten?n.push.apply(n,b):n.push({scopeParent:i,candidates:b})}else r.unshift.apply(r,i.children)}}return n},wt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},re=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||rs(e))&&!wt(e)?0:e.tabIndex},as=function(e,t){var s=re(e);return s<0&&t&&!wt(e)?0:s},os=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},xt=function(e){return e.tagName==="INPUT"},ls=function(e){return xt(e)&&e.type==="hidden"},cs=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(s){return s.tagName==="SUMMARY"});return t},us=function(e,t){for(var s=0;ssummary:first-of-type"),i=r?e.parentElement:e;if(ae.call(i,"details:not([open]) *"))return!0;if(!s||s==="full"||s==="legacy-full"){if(typeof n=="function"){for(var o=e;e;){var l=e.parentElement,c=Fe(e);if(l&&!l.shadowRoot&&n(l)===!0)return ot(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=o}if(ps(e))return!e.getClientRects().length;if(s!=="legacy-full")return!0}else if(s==="non-zero-area")return ot(e);return!1},ms=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var s=0;s=0)},bs=function a(e){var t=[],s=[];return e.forEach(function(n,r){var i=!!n.scopeParent,o=i?n.scopeParent:n,l=as(o,i),c=i?a(n.candidates):o;l===0?i?t.push.apply(t,c):t.push(o):s.push({documentOrder:r,tabIndex:l,item:n,isScope:i,content:c})}),s.sort(os).reduce(function(n,r){return r.isScope?n.push.apply(n,r.content):n.push(r.content),n},[]).concat(t)},ys=function(e,t){t=t||{};var s;return t.getShadowRoot?s=yt([e],t.includeContainer,{filter:Be.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:gs}):s=bt(e,t.includeContainer,Be.bind(null,t)),bs(s)},ws=function(e,t){t=t||{};var s;return t.getShadowRoot?s=yt([e],t.includeContainer,{filter:Ce.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):s=bt(e,t.includeContainer,Ce.bind(null,t)),s},oe=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return ae.call(e,Ne)===!1?!1:Be(t,e)},xs=mt.concat("iframe").join(","),Le=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return ae.call(e,xs)===!1?!1:Ce(t,e)};/*! +* focus-trap 7.6.2 +* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE +*/function We(a,e){(e==null||e>a.length)&&(e=a.length);for(var t=0,s=Array(e);t0){var s=e[e.length-1];s!==t&&s.pause()}var n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap:function(e,t){var s=e.indexOf(t);s!==-1&&e.splice(s,1),e.length>0&&e[e.length-1].unpause()}},Os=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Cs=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},ge=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},Rs=function(e){return ge(e)&&!e.shiftKey},As=function(e){return ge(e)&&e.shiftKey},dt=function(e){return setTimeout(e,0)},ve=function(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n1&&arguments[1]!==void 0?arguments[1]:{},g=d.hasFallback,T=g===void 0?!1:g,k=d.params,O=k===void 0?[]:k,S=r[u];if(typeof S=="function"&&(S=S.apply(void 0,Is(O))),S===!0&&(S=void 0),!S){if(S===void 0||S===!1)return S;throw new Error("`".concat(u,"` was specified but was not a node, or did not return a node"))}var C=S;if(typeof S=="string"){try{C=s.querySelector(S)}catch(v){throw new Error("`".concat(u,'` appears to be an invalid selector; error="').concat(v.message,'"'))}if(!C&&!T)throw new Error("`".concat(u,"` as selector refers to no known node"))}return C},m=function(){var u=h("initialFocus",{hasFallback:!0});if(u===!1)return!1;if(u===void 0||u&&!Le(u,r.tabbableOptions))if(c(s.activeElement)>=0)u=s.activeElement;else{var d=i.tabbableGroups[0],g=d&&d.firstTabbableNode;u=g||h("fallbackFocus")}else u===null&&(u=h("fallbackFocus"));if(!u)throw new Error("Your focus-trap needs to have at least one focusable element");return u},f=function(){if(i.containerGroups=i.containers.map(function(u){var d=ys(u,r.tabbableOptions),g=ws(u,r.tabbableOptions),T=d.length>0?d[0]:void 0,k=d.length>0?d[d.length-1]:void 0,O=g.find(function(v){return oe(v)}),S=g.slice().reverse().find(function(v){return oe(v)}),C=!!d.find(function(v){return re(v)>0});return{container:u,tabbableNodes:d,focusableNodes:g,posTabIndexesFound:C,firstTabbableNode:T,lastTabbableNode:k,firstDomTabbableNode:O,lastDomTabbableNode:S,nextTabbableNode:function(p){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,F=d.indexOf(p);return F<0?E?g.slice(g.indexOf(p)+1).find(function(z){return oe(z)}):g.slice(0,g.indexOf(p)).reverse().find(function(z){return oe(z)}):d[F+(E?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(u){return u.tabbableNodes.length>0}),i.tabbableGroups.length<=0&&!h("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(i.containerGroups.find(function(u){return u.posTabIndexesFound})&&i.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},b=function(u){var d=u.activeElement;if(d)return d.shadowRoot&&d.shadowRoot.activeElement!==null?b(d.shadowRoot):d},y=function(u){if(u!==!1&&u!==b(document)){if(!u||!u.focus){y(m());return}u.focus({preventScroll:!!r.preventScroll}),i.mostRecentlyFocusedNode=u,Os(u)&&u.select()}},x=function(u){var d=h("setReturnFocus",{params:[u]});return d||(d===!1?!1:u)},w=function(u){var d=u.target,g=u.event,T=u.isBackward,k=T===void 0?!1:T;d=d||Ee(g),f();var O=null;if(i.tabbableGroups.length>0){var S=c(d,g),C=S>=0?i.containerGroups[S]:void 0;if(S<0)k?O=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:O=i.tabbableGroups[0].firstTabbableNode;else if(k){var v=i.tabbableGroups.findIndex(function(j){var I=j.firstTabbableNode;return d===I});if(v<0&&(C.container===d||Le(d,r.tabbableOptions)&&!oe(d,r.tabbableOptions)&&!C.nextTabbableNode(d,!1))&&(v=S),v>=0){var p=v===0?i.tabbableGroups.length-1:v-1,E=i.tabbableGroups[p];O=re(d)>=0?E.lastTabbableNode:E.lastDomTabbableNode}else ge(g)||(O=C.nextTabbableNode(d,!1))}else{var F=i.tabbableGroups.findIndex(function(j){var I=j.lastTabbableNode;return d===I});if(F<0&&(C.container===d||Le(d,r.tabbableOptions)&&!oe(d,r.tabbableOptions)&&!C.nextTabbableNode(d))&&(F=S),F>=0){var z=F===i.tabbableGroups.length-1?0:F+1,P=i.tabbableGroups[z];O=re(d)>=0?P.firstTabbableNode:P.firstDomTabbableNode}else ge(g)||(O=C.nextTabbableNode(d))}}else O=h("fallbackFocus");return O},R=function(u){var d=Ee(u);if(!(c(d,u)>=0)){if(ve(r.clickOutsideDeactivates,u)){o.deactivate({returnFocus:r.returnFocusOnDeactivate});return}ve(r.allowOutsideClick,u)||u.preventDefault()}},A=function(u){var d=Ee(u),g=c(d,u)>=0;if(g||d instanceof Document)g&&(i.mostRecentlyFocusedNode=d);else{u.stopImmediatePropagation();var T,k=!0;if(i.mostRecentlyFocusedNode)if(re(i.mostRecentlyFocusedNode)>0){var O=c(i.mostRecentlyFocusedNode),S=i.containerGroups[O].tabbableNodes;if(S.length>0){var C=S.findIndex(function(v){return v===i.mostRecentlyFocusedNode});C>=0&&(r.isKeyForward(i.recentNavEvent)?C+1=0&&(T=S[C-1],k=!1))}}else i.containerGroups.some(function(v){return v.tabbableNodes.some(function(p){return re(p)>0})})||(k=!1);else k=!1;k&&(T=w({target:i.mostRecentlyFocusedNode,isBackward:r.isKeyBackward(i.recentNavEvent)})),y(T||i.mostRecentlyFocusedNode||m())}i.recentNavEvent=void 0},J=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;i.recentNavEvent=u;var g=w({event:u,isBackward:d});g&&(ge(u)&&u.preventDefault(),y(g))},Q=function(u){(r.isKeyForward(u)||r.isKeyBackward(u))&&J(u,r.isKeyBackward(u))},W=function(u){Cs(u)&&ve(r.escapeDeactivates,u)!==!1&&(u.preventDefault(),o.deactivate())},V=function(u){var d=Ee(u);c(d,u)>=0||ve(r.clickOutsideDeactivates,u)||ve(r.allowOutsideClick,u)||(u.preventDefault(),u.stopImmediatePropagation())},$=function(){if(i.active)return ut.activateTrap(n,o),i.delayInitialFocusTimer=r.delayInitialFocus?dt(function(){y(m())}):y(m()),s.addEventListener("focusin",A,!0),s.addEventListener("mousedown",R,{capture:!0,passive:!1}),s.addEventListener("touchstart",R,{capture:!0,passive:!1}),s.addEventListener("click",V,{capture:!0,passive:!1}),s.addEventListener("keydown",Q,{capture:!0,passive:!1}),s.addEventListener("keydown",W),o},be=function(){if(i.active)return s.removeEventListener("focusin",A,!0),s.removeEventListener("mousedown",R,!0),s.removeEventListener("touchstart",R,!0),s.removeEventListener("click",V,!0),s.removeEventListener("keydown",Q,!0),s.removeEventListener("keydown",W),o},M=function(u){var d=u.some(function(g){var T=Array.from(g.removedNodes);return T.some(function(k){return k===i.mostRecentlyFocusedNode})});d&&y(m())},U=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(M):void 0,q=function(){U&&(U.disconnect(),i.active&&!i.paused&&i.containers.map(function(u){U.observe(u,{subtree:!0,childList:!0})}))};return o={get active(){return i.active},get paused(){return i.paused},activate:function(u){if(i.active)return this;var d=l(u,"onActivate"),g=l(u,"onPostActivate"),T=l(u,"checkCanFocusTrap");T||f(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=s.activeElement,d==null||d();var k=function(){T&&f(),$(),q(),g==null||g()};return T?(T(i.containers.concat()).then(k,k),this):(k(),this)},deactivate:function(u){if(!i.active)return this;var d=ct({onDeactivate:r.onDeactivate,onPostDeactivate:r.onPostDeactivate,checkCanReturnFocus:r.checkCanReturnFocus},u);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,be(),i.active=!1,i.paused=!1,q(),ut.deactivateTrap(n,o);var g=l(d,"onDeactivate"),T=l(d,"onPostDeactivate"),k=l(d,"checkCanReturnFocus"),O=l(d,"returnFocus","returnFocusOnDeactivate");g==null||g();var S=function(){dt(function(){O&&y(x(i.nodeFocusedBeforeActivation)),T==null||T()})};return O&&k?(k(x(i.nodeFocusedBeforeActivation)).then(S,S),this):(S(),this)},pause:function(u){if(i.paused||!i.active)return this;var d=l(u,"onPause"),g=l(u,"onPostPause");return i.paused=!0,d==null||d(),be(),q(),g==null||g(),this},unpause:function(u){if(!i.paused||!i.active)return this;var d=l(u,"onUnpause"),g=l(u,"onPostUnpause");return i.paused=!1,d==null||d(),f(),$(),q(),g==null||g(),this},updateContainerElements:function(u){var d=[].concat(u).filter(Boolean);return i.containers=d.map(function(g){return typeof g=="string"?s.querySelector(g):g}),i.active&&f(),q(),this}},o.updateContainerElements(e),o};function Ds(a,e={}){let t;const{immediate:s,...n}=e,r=ie(!1),i=ie(!1),o=f=>t&&t.activate(f),l=f=>t&&t.deactivate(f),c=()=>{t&&(t.pause(),i.value=!0)},h=()=>{t&&(t.unpause(),i.value=!1)},m=me(()=>{const f=tt(a);return(Array.isArray(f)?f:[f]).map(b=>{const y=tt(b);return typeof y=="string"?y:Rt(y)}).filter(At)});return $e(m,f=>{f.length&&(t=Ls(f,{...n,onActivate(){r.value=!0,e.onActivate&&e.onActivate()},onDeactivate(){r.value=!1,e.onDeactivate&&e.onDeactivate()}}),s&&o())},{flush:"post"}),Mt(()=>l()),{hasFocus:r,isPaused:i,activate:o,deactivate:l,pause:c,unpause:h}}class ce{constructor(e,t=!0,s=[],n=5e3){this.ctx=e,this.iframes=t,this.exclude=s,this.iframesTimeout=n}static matches(e,t){const s=typeof t=="string"?[t]:t,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(n){let r=!1;return s.every(i=>n.call(e,i)?(r=!0,!1):!0),r}else return!1}getContexts(){let e,t=[];return typeof this.ctx>"u"||!this.ctx?e=[]:NodeList.prototype.isPrototypeOf(this.ctx)?e=Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?e=this.ctx:typeof this.ctx=="string"?e=Array.prototype.slice.call(document.querySelectorAll(this.ctx)):e=[this.ctx],e.forEach(s=>{const n=t.filter(r=>r.contains(s)).length>0;t.indexOf(s)===-1&&!n&&t.push(s)}),t}getIframeContents(e,t,s=()=>{}){let n;try{const r=e.contentWindow;if(n=r.document,!r||!n)throw new Error("iframe inaccessible")}catch{s()}n&&t(n)}isIframeBlank(e){const t="about:blank",s=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&s!==t&&s}observeIframeLoad(e,t,s){let n=!1,r=null;const i=()=>{if(!n){n=!0,clearTimeout(r);try{this.isIframeBlank(e)||(e.removeEventListener("load",i),this.getIframeContents(e,t,s))}catch{s()}}};e.addEventListener("load",i),r=setTimeout(i,this.iframesTimeout)}onIframeReady(e,t,s){try{e.contentWindow.document.readyState==="complete"?this.isIframeBlank(e)?this.observeIframeLoad(e,t,s):this.getIframeContents(e,t,s):this.observeIframeLoad(e,t,s)}catch{s()}}waitForIframes(e,t){let s=0;this.forEachIframe(e,()=>!0,n=>{s++,this.waitForIframes(n.querySelector("html"),()=>{--s||t()})},n=>{n||t()})}forEachIframe(e,t,s,n=()=>{}){let r=e.querySelectorAll("iframe"),i=r.length,o=0;r=Array.prototype.slice.call(r);const l=()=>{--i<=0&&n(o)};i||l(),r.forEach(c=>{ce.matches(c,this.exclude)?l():this.onIframeReady(c,h=>{t(c)&&(o++,s(h)),l()},l)})}createIterator(e,t,s){return document.createNodeIterator(e,t,s,!1)}createInstanceOnIframe(e){return new ce(e.querySelector("html"),this.iframes)}compareNodeIframe(e,t,s){const n=e.compareDocumentPosition(s),r=Node.DOCUMENT_POSITION_PRECEDING;if(n&r)if(t!==null){const i=t.compareDocumentPosition(s),o=Node.DOCUMENT_POSITION_FOLLOWING;if(i&o)return!0}else return!0;return!1}getIteratorNode(e){const t=e.previousNode();let s;return t===null?s=e.nextNode():s=e.nextNode()&&e.nextNode(),{prevNode:t,node:s}}checkIframeFilter(e,t,s,n){let r=!1,i=!1;return n.forEach((o,l)=>{o.val===s&&(r=l,i=o.handled)}),this.compareNodeIframe(e,t,s)?(r===!1&&!i?n.push({val:s,handled:!0}):r!==!1&&!i&&(n[r].handled=!0),!0):(r===!1&&n.push({val:s,handled:!1}),!1)}handleOpenIframes(e,t,s,n){e.forEach(r=>{r.handled||this.getIframeContents(r.val,i=>{this.createInstanceOnIframe(i).forEachNode(t,s,n)})})}iterateThroughNodes(e,t,s,n,r){const i=this.createIterator(t,e,n);let o=[],l=[],c,h,m=()=>({prevNode:h,node:c}=this.getIteratorNode(i),c);for(;m();)this.iframes&&this.forEachIframe(t,f=>this.checkIframeFilter(c,h,f,o),f=>{this.createInstanceOnIframe(f).forEachNode(e,b=>l.push(b),n)}),l.push(c);l.forEach(f=>{s(f)}),this.iframes&&this.handleOpenIframes(o,e,s,n),r()}forEachNode(e,t,s,n=()=>{}){const r=this.getContexts();let i=r.length;i||n(),r.forEach(o=>{const l=()=>{this.iterateThroughNodes(e,o,t,s,()=>{--i<=0&&n()})};this.iframes?this.waitForIframes(o,l):l()})}}let zs=class{constructor(e){this.ctx=e,this.ie=!1;const t=window.navigator.userAgent;(t.indexOf("MSIE")>-1||t.indexOf("Trident")>-1)&&(this.ie=!0)}set opt(e){this._opt=Object.assign({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:()=>{},noMatch:()=>{},filter:()=>!0,done:()=>{},debug:!1,log:window.console},e)}get opt(){return this._opt}get iterator(){return new ce(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(e,t="debug"){const s=this.opt.log;this.opt.debug&&typeof s=="object"&&typeof s[t]=="function"&&s[t](`mark.js: ${e}`)}escapeStr(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}createRegExp(e){return this.opt.wildcards!=="disabled"&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),this.opt.wildcards!=="disabled"&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e),e}createSynonymsRegExp(e){const t=this.opt.synonyms,s=this.opt.caseSensitive?"":"i",n=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let r in t)if(t.hasOwnProperty(r)){const i=t[r],o=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(r):this.escapeStr(r),l=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(i):this.escapeStr(i);o!==""&&l!==""&&(e=e.replace(new RegExp(`(${this.escapeStr(o)}|${this.escapeStr(l)})`,`gm${s}`),n+`(${this.processSynomyms(o)}|${this.processSynomyms(l)})`+n))}return e}processSynomyms(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}setupWildcardsRegExp(e){return e=e.replace(/(?:\\)*\?/g,t=>t.charAt(0)==="\\"?"?":""),e.replace(/(?:\\)*\*/g,t=>t.charAt(0)==="\\"?"*":"")}createWildcardsRegExp(e){let t=this.opt.wildcards==="withSpaces";return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}setupIgnoreJoinersRegExp(e){return e.replace(/[^(|)\\]/g,(t,s,n)=>{let r=n.charAt(s+1);return/[(|)\\]/.test(r)||r===""?t:t+"\0"})}createJoinersRegExp(e){let t=[];const s=this.opt.ignorePunctuation;return Array.isArray(s)&&s.length&&t.push(this.escapeStr(s.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join(`[${t.join("")}]*`):e}createDiacriticsRegExp(e){const t=this.opt.caseSensitive?"":"i",s=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"];let n=[];return e.split("").forEach(r=>{s.every(i=>{if(i.indexOf(r)!==-1){if(n.indexOf(i)>-1)return!1;e=e.replace(new RegExp(`[${i}]`,`gm${t}`),`[${i}]`),n.push(i)}return!0})}),e}createMergedBlanksRegExp(e){return e.replace(/[\s]+/gmi,"[\\s]+")}createAccuracyRegExp(e){const t="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let s=this.opt.accuracy,n=typeof s=="string"?s:s.value,r=typeof s=="string"?[]:s.limiters,i="";switch(r.forEach(o=>{i+=`|${this.escapeStr(o)}`}),n){case"partially":default:return`()(${e})`;case"complementary":return i="\\s"+(i||this.escapeStr(t)),`()([^${i}]*${e}[^${i}]*)`;case"exactly":return`(^|\\s${i})(${e})(?=$|\\s${i})`}}getSeparatedKeywords(e){let t=[];return e.forEach(s=>{this.opt.separateWordSearch?s.split(" ").forEach(n=>{n.trim()&&t.indexOf(n)===-1&&t.push(n)}):s.trim()&&t.indexOf(s)===-1&&t.push(s)}),{keywords:t.sort((s,n)=>n.length-s.length),length:t.length}}isNumeric(e){return Number(parseFloat(e))==e}checkRanges(e){if(!Array.isArray(e)||Object.prototype.toString.call(e[0])!=="[object Object]")return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];const t=[];let s=0;return e.sort((n,r)=>n.start-r.start).forEach(n=>{let{start:r,end:i,valid:o}=this.callNoMatchOnInvalidRanges(n,s);o&&(n.start=r,n.length=i-r,t.push(n),s=i)}),t}callNoMatchOnInvalidRanges(e,t){let s,n,r=!1;return e&&typeof e.start<"u"?(s=parseInt(e.start,10),n=s+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&n-t>0&&n-s>0?r=!0:(this.log(`Ignoring invalid or overlapping range: ${JSON.stringify(e)}`),this.opt.noMatch(e))):(this.log(`Ignoring invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)),{start:s,end:n,valid:r}}checkWhitespaceRanges(e,t,s){let n,r=!0,i=s.length,o=t-i,l=parseInt(e.start,10)-o;return l=l>i?i:l,n=l+parseInt(e.length,10),n>i&&(n=i,this.log(`End range automatically set to the max value of ${i}`)),l<0||n-l<0||l>i||n>i?(r=!1,this.log(`Invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)):s.substring(l,n).replace(/\s+/g,"")===""&&(r=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:l,end:n,valid:r}}getTextNodes(e){let t="",s=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,n=>{s.push({start:t.length,end:(t+=n.textContent).length,node:n})},n=>this.matchesExclude(n.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{e({value:t,nodes:s})})}matchesExclude(e){return ce.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(e,t,s){const n=this.opt.element?this.opt.element:"mark",r=e.splitText(t),i=r.splitText(s-t);let o=document.createElement(n);return o.setAttribute("data-markjs","true"),this.opt.className&&o.setAttribute("class",this.opt.className),o.textContent=r.textContent,r.parentNode.replaceChild(o,r),i}wrapRangeInMappedTextNode(e,t,s,n,r){e.nodes.every((i,o)=>{const l=e.nodes[o+1];if(typeof l>"u"||l.start>t){if(!n(i.node))return!1;const c=t-i.start,h=(s>i.end?i.end:s)-i.start,m=e.value.substr(0,i.start),f=e.value.substr(h+i.start);if(i.node=this.wrapRangeInTextNode(i.node,c,h),e.value=m+f,e.nodes.forEach((b,y)=>{y>=o&&(e.nodes[y].start>0&&y!==o&&(e.nodes[y].start-=h),e.nodes[y].end-=h)}),s-=h,r(i.node.previousSibling,i.start),s>i.end)t=i.end;else return!1}return!0})}wrapMatches(e,t,s,n,r){const i=t===0?0:t+1;this.getTextNodes(o=>{o.nodes.forEach(l=>{l=l.node;let c;for(;(c=e.exec(l.textContent))!==null&&c[i]!=="";){if(!s(c[i],l))continue;let h=c.index;if(i!==0)for(let m=1;m{let l;for(;(l=e.exec(o.value))!==null&&l[i]!=="";){let c=l.index;if(i!==0)for(let m=1;ms(l[i],m),(m,f)=>{e.lastIndex=f,n(m)})}r()})}wrapRangeFromIndex(e,t,s,n){this.getTextNodes(r=>{const i=r.value.length;e.forEach((o,l)=>{let{start:c,end:h,valid:m}=this.checkWhitespaceRanges(o,i,r.value);m&&this.wrapRangeInMappedTextNode(r,c,h,f=>t(f,o,r.value.substring(c,h),l),f=>{s(f,o)})}),n()})}unwrapMatches(e){const t=e.parentNode;let s=document.createDocumentFragment();for(;e.firstChild;)s.appendChild(e.removeChild(e.firstChild));t.replaceChild(s,e),this.ie?this.normalizeTextNode(t):t.normalize()}normalizeTextNode(e){if(e){if(e.nodeType===3)for(;e.nextSibling&&e.nextSibling.nodeType===3;)e.nodeValue+=e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);else this.normalizeTextNode(e.firstChild);this.normalizeTextNode(e.nextSibling)}}markRegExp(e,t){this.opt=t,this.log(`Searching with expression "${e}"`);let s=0,n="wrapMatches";const r=i=>{s++,this.opt.each(i)};this.opt.acrossElements&&(n="wrapMatchesAcrossElements"),this[n](e,this.opt.ignoreGroups,(i,o)=>this.opt.filter(o,i,s),r,()=>{s===0&&this.opt.noMatch(e),this.opt.done(s)})}mark(e,t){this.opt=t;let s=0,n="wrapMatches";const{keywords:r,length:i}=this.getSeparatedKeywords(typeof e=="string"?[e]:e),o=this.opt.caseSensitive?"":"i",l=c=>{let h=new RegExp(this.createRegExp(c),`gm${o}`),m=0;this.log(`Searching with expression "${h}"`),this[n](h,1,(f,b)=>this.opt.filter(b,c,s,m),f=>{m++,s++,this.opt.each(f)},()=>{m===0&&this.opt.noMatch(c),r[i-1]===c?this.opt.done(s):l(r[r.indexOf(c)+1])})};this.opt.acrossElements&&(n="wrapMatchesAcrossElements"),i===0?this.opt.done(s):l(r[0])}markRanges(e,t){this.opt=t;let s=0,n=this.checkRanges(e);n&&n.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(n)),this.wrapRangeFromIndex(n,(r,i,o,l)=>this.opt.filter(r,i,o,l),(r,i)=>{s++,this.opt.each(r,i)},()=>{this.opt.done(s)})):this.opt.done(s)}unmark(e){this.opt=e;let t=this.opt.element?this.opt.element:"*";t+="[data-markjs]",this.opt.className&&(t+=`.${this.opt.className}`),this.log(`Removal selector "${t}"`),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,s=>{this.unwrapMatches(s)},s=>{const n=ce.matches(s,t),r=this.matchesExclude(s);return!n||r?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}};function Ps(a){const e=new zs(a);return this.mark=(t,s)=>(e.mark(t,s),this),this.markRegExp=(t,s)=>(e.markRegExp(t,s),this),this.markRanges=(t,s)=>(e.markRanges(t,s),this),this.unmark=t=>(e.unmark(t),this),this}function ke(a,e,t,s){function n(r){return r instanceof t?r:new t(function(i){i(r)})}return new(t||(t=Promise))(function(r,i){function o(h){try{c(s.next(h))}catch(m){i(m)}}function l(h){try{c(s.throw(h))}catch(m){i(m)}}function c(h){h.done?r(h.value):n(h.value).then(o,l)}c((s=s.apply(a,[])).next())})}const js="ENTRIES",_t="KEYS",St="VALUES",D="";class De{constructor(e,t){const s=e._tree,n=Array.from(s.keys());this.set=e,this._type=t,this._path=n.length>0?[{node:s,keys:n}]:[]}next(){const e=this.dive();return this.backtrack(),e}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:e,keys:t}=le(this._path);if(le(t)===D)return{done:!1,value:this.result()};const s=e.get(le(t));return this._path.push({node:s,keys:Array.from(s.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const e=le(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>le(e)).filter(e=>e!==D).join("")}value(){return le(this._path).node.get(D)}result(){switch(this._type){case St:return this.value();case _t:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const le=a=>a[a.length-1],Vs=(a,e,t)=>{const s=new Map;if(e===void 0)return s;const n=e.length+1,r=n+t,i=new Uint8Array(r*n).fill(t+1);for(let o=0;o{const l=r*i;e:for(const c of a.keys())if(c===D){const h=n[l-1];h<=t&&s.set(o,[a.get(c),h])}else{let h=r;for(let m=0;mt)continue e}Et(a.get(c),e,t,s,n,h,i,o+c)}};class X{constructor(e=new Map,t=""){this._size=void 0,this._tree=e,this._prefix=t}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");const[t,s]=Re(this._tree,e.slice(this._prefix.length));if(t===void 0){const[n,r]=qe(s);for(const i of n.keys())if(i!==D&&i.startsWith(r)){const o=new Map;return o.set(i.slice(r.length),n.get(i)),new X(o,e)}}return new X(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,$s(this._tree,e)}entries(){return new De(this,js)}forEach(e){for(const[t,s]of this)e(t,s,this)}fuzzyGet(e,t){return Vs(this._tree,e,t)}get(e){const t=Ke(this._tree,e);return t!==void 0?t.get(D):void 0}has(e){const t=Ke(this._tree,e);return t!==void 0&&t.has(D)}keys(){return new De(this,_t)}set(e,t){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,ze(this._tree,e).set(D,t),this}get size(){if(this._size)return this._size;this._size=0;const e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const s=ze(this._tree,e);return s.set(D,t(s.get(D))),this}fetch(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const s=ze(this._tree,e);let n=s.get(D);return n===void 0&&s.set(D,n=t()),n}values(){return new De(this,St)}[Symbol.iterator](){return this.entries()}static from(e){const t=new X;for(const[s,n]of e)t.set(s,n);return t}static fromObject(e){return X.from(Object.entries(e))}}const Re=(a,e,t=[])=>{if(e.length===0||a==null)return[a,t];for(const s of a.keys())if(s!==D&&e.startsWith(s))return t.push([a,s]),Re(a.get(s),e.slice(s.length),t);return t.push([a,e]),Re(void 0,"",t)},Ke=(a,e)=>{if(e.length===0||a==null)return a;for(const t of a.keys())if(t!==D&&e.startsWith(t))return Ke(a.get(t),e.slice(t.length))},ze=(a,e)=>{const t=e.length;e:for(let s=0;a&&s{const[t,s]=Re(a,e);if(t!==void 0){if(t.delete(D),t.size===0)Tt(s);else if(t.size===1){const[n,r]=t.entries().next().value;It(s,n,r)}}},Tt=a=>{if(a.length===0)return;const[e,t]=qe(a);if(e.delete(t),e.size===0)Tt(a.slice(0,-1));else if(e.size===1){const[s,n]=e.entries().next().value;s!==D&&It(a.slice(0,-1),s,n)}},It=(a,e,t)=>{if(a.length===0)return;const[s,n]=qe(a);s.set(n+e,t),s.delete(n)},qe=a=>a[a.length-1],Ge="or",kt="and",Bs="and_not";class ue{constructor(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');const t=e.autoVacuum==null||e.autoVacuum===!0?Ve:e.autoVacuum;this._options=Object.assign(Object.assign(Object.assign({},je),e),{autoVacuum:t,searchOptions:Object.assign(Object.assign({},ht),e.searchOptions||{}),autoSuggestOptions:Object.assign(Object.assign({},qs),e.autoSuggestOptions||{})}),this._index=new X,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=Ue,this.addFields(this._options.fields)}add(e){const{extractField:t,tokenize:s,processTerm:n,fields:r,idField:i}=this._options,o=t(e,i);if(o==null)throw new Error(`MiniSearch: document does not have ID field "${i}"`);if(this._idToShortId.has(o))throw new Error(`MiniSearch: duplicate ID ${o}`);const l=this.addDocumentId(o);this.saveStoredFields(l,e);for(const c of r){const h=t(e,c);if(h==null)continue;const m=s(h.toString(),c),f=this._fieldIds[c],b=new Set(m).size;this.addFieldLength(l,f,this._documentCount-1,b);for(const y of m){const x=n(y,c);if(Array.isArray(x))for(const w of x)this.addTerm(f,l,w);else x&&this.addTerm(f,l,x)}}}addAll(e){for(const t of e)this.add(t)}addAllAsync(e,t={}){const{chunkSize:s=10}=t,n={chunk:[],promise:Promise.resolve()},{chunk:r,promise:i}=e.reduce(({chunk:o,promise:l},c,h)=>(o.push(c),(h+1)%s===0?{chunk:[],promise:l.then(()=>new Promise(m=>setTimeout(m,0))).then(()=>this.addAll(o))}:{chunk:o,promise:l}),n);return i.then(()=>this.addAll(r))}remove(e){const{tokenize:t,processTerm:s,extractField:n,fields:r,idField:i}=this._options,o=n(e,i);if(o==null)throw new Error(`MiniSearch: document does not have ID field "${i}"`);const l=this._idToShortId.get(o);if(l==null)throw new Error(`MiniSearch: cannot remove document with ID ${o}: it is not in the index`);for(const c of r){const h=n(e,c);if(h==null)continue;const m=t(h.toString(),c),f=this._fieldIds[c],b=new Set(m).size;this.removeFieldLength(l,f,this._documentCount,b);for(const y of m){const x=s(y,c);if(Array.isArray(x))for(const w of x)this.removeTerm(f,l,w);else x&&this.removeTerm(f,l,x)}}this._storedFields.delete(l),this._documentIds.delete(l),this._idToShortId.delete(o),this._fieldLength.delete(l),this._documentCount-=1}removeAll(e){if(e)for(const t of e)this.remove(t);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new X,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){const t=this._idToShortId.get(e);if(t==null)throw new Error(`MiniSearch: cannot discard document with ID ${e}: it is not in the index`);this._idToShortId.delete(e),this._documentIds.delete(t),this._storedFields.delete(t),(this._fieldLength.get(t)||[]).forEach((s,n)=>{this.removeFieldLength(t,n,this._documentCount,s)}),this._fieldLength.delete(t),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;const{minDirtFactor:e,minDirtCount:t,batchSize:s,batchWait:n}=this._options.autoVacuum;this.conditionalVacuum({batchSize:s,batchWait:n},{minDirtCount:t,minDirtFactor:e})}discardAll(e){const t=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const s of e)this.discard(s)}finally{this._options.autoVacuum=t}this.maybeAutoVacuum()}replace(e){const{idField:t,extractField:s}=this._options,n=s(e,t);this.discard(n),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,t){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{const s=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=Ue,this.performVacuuming(e,s)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}performVacuuming(e,t){return ke(this,void 0,void 0,function*(){const s=this._dirtCount;if(this.vacuumConditionsMet(t)){const n=e.batchSize||Je.batchSize,r=e.batchWait||Je.batchWait;let i=1;for(const[o,l]of this._index){for(const[c,h]of l)for(const[m]of h)this._documentIds.has(m)||(h.size<=1?l.delete(c):h.delete(m));this._index.get(o).size===0&&this._index.delete(o),i%n===0&&(yield new Promise(c=>setTimeout(c,r))),i+=1}this._dirtCount-=s}yield null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null})}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:t,minDirtFactor:s}=e;return t=t||Ve.minDirtCount,s=s||Ve.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=s}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){const t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)}search(e,t={}){const{searchOptions:s}=this._options,n=Object.assign(Object.assign({},s),t),r=this.executeQuery(e,t),i=[];for(const[o,{score:l,terms:c,match:h}]of r){const m=c.length||1,f={id:this._documentIds.get(o),score:l*m,terms:Object.keys(h),queryTerms:c,match:h};Object.assign(f,this._storedFields.get(o)),(n.filter==null||n.filter(f))&&i.push(f)}return e===ue.wildcard&&n.boostDocument==null||i.sort(pt),i}autoSuggest(e,t={}){t=Object.assign(Object.assign({},this._options.autoSuggestOptions),t);const s=new Map;for(const{score:r,terms:i}of this.search(e,t)){const o=i.join(" "),l=s.get(o);l!=null?(l.score+=r,l.count+=1):s.set(o,{score:r,terms:i,count:1})}const n=[];for(const[r,{score:i,terms:o,count:l}]of s)n.push({suggestion:r,terms:o,score:i/l});return n.sort(pt),n}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),t)}static loadJSONAsync(e,t){return ke(this,void 0,void 0,function*(){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),t)})}static getDefault(e){if(je.hasOwnProperty(e))return Pe(je,e);throw new Error(`MiniSearch: unknown option "${e}"`)}static loadJS(e,t){const{index:s,documentIds:n,fieldLength:r,storedFields:i,serializationVersion:o}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=Te(n),l._fieldLength=Te(r),l._storedFields=Te(i);for(const[c,h]of l._documentIds)l._idToShortId.set(h,c);for(const[c,h]of s){const m=new Map;for(const f of Object.keys(h)){let b=h[f];o===1&&(b=b.ds),m.set(parseInt(f,10),Te(b))}l._index.set(c,m)}return l}static loadJSAsync(e,t){return ke(this,void 0,void 0,function*(){const{index:s,documentIds:n,fieldLength:r,storedFields:i,serializationVersion:o}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=yield Ie(n),l._fieldLength=yield Ie(r),l._storedFields=yield Ie(i);for(const[h,m]of l._documentIds)l._idToShortId.set(m,h);let c=0;for(const[h,m]of s){const f=new Map;for(const b of Object.keys(m)){let y=m[b];o===1&&(y=y.ds),f.set(parseInt(b,10),yield Ie(y))}++c%1e3===0&&(yield Nt(0)),l._index.set(h,f)}return l})}static instantiateMiniSearch(e,t){const{documentCount:s,nextId:n,fieldIds:r,averageFieldLength:i,dirtCount:o,serializationVersion:l}=e;if(l!==1&&l!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const c=new ue(t);return c._documentCount=s,c._nextId=n,c._idToShortId=new Map,c._fieldIds=r,c._avgFieldLength=i,c._dirtCount=o||0,c._index=new X,c}executeQuery(e,t={}){if(e===ue.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){const f=Object.assign(Object.assign(Object.assign({},t),e),{queries:void 0}),b=e.queries.map(y=>this.executeQuery(y,f));return this.combineResults(b,f.combineWith)}const{tokenize:s,processTerm:n,searchOptions:r}=this._options,i=Object.assign(Object.assign({tokenize:s,processTerm:n},r),t),{tokenize:o,processTerm:l}=i,m=o(e).flatMap(f=>l(f)).filter(f=>!!f).map(Us(i)).map(f=>this.executeQuerySpec(f,i));return this.combineResults(m,i.combineWith)}executeQuerySpec(e,t){const s=Object.assign(Object.assign({},this._options.searchOptions),t),n=(s.fields||this._options.fields).reduce((x,w)=>Object.assign(Object.assign({},x),{[w]:Pe(s.boost,w)||1}),{}),{boostDocument:r,weights:i,maxFuzzy:o,bm25:l}=s,{fuzzy:c,prefix:h}=Object.assign(Object.assign({},ht.weights),i),m=this._index.get(e.term),f=this.termResults(e.term,e.term,1,e.termBoost,m,n,r,l);let b,y;if(e.prefix&&(b=this._index.atPrefix(e.term)),e.fuzzy){const x=e.fuzzy===!0?.2:e.fuzzy,w=x<1?Math.min(o,Math.round(e.term.length*x)):x;w&&(y=this._index.fuzzyGet(e.term,w))}if(b)for(const[x,w]of b){const R=x.length-e.term.length;if(!R)continue;y==null||y.delete(x);const A=h*x.length/(x.length+.3*R);this.termResults(e.term,x,A,e.termBoost,w,n,r,l,f)}if(y)for(const x of y.keys()){const[w,R]=y.get(x);if(!R)continue;const A=c*x.length/(x.length+R);this.termResults(e.term,x,A,e.termBoost,w,n,r,l,f)}return f}executeWildcardQuery(e){const t=new Map,s=Object.assign(Object.assign({},this._options.searchOptions),e);for(const[n,r]of this._documentIds){const i=s.boostDocument?s.boostDocument(r,"",this._storedFields.get(n)):1;t.set(n,{score:i,terms:[],match:{}})}return t}combineResults(e,t=Ge){if(e.length===0)return new Map;const s=t.toLowerCase(),n=Ws[s];if(!n)throw new Error(`Invalid combination operator: ${t}`);return e.reduce(n)||new Map}toJSON(){const e=[];for(const[t,s]of this._index){const n={};for(const[r,i]of s)n[r]=Object.fromEntries(i);e.push([t,n])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,t,s,n,r,i,o,l,c=new Map){if(r==null)return c;for(const h of Object.keys(i)){const m=i[h],f=this._fieldIds[h],b=r.get(f);if(b==null)continue;let y=b.size;const x=this._avgFieldLength[f];for(const w of b.keys()){if(!this._documentIds.has(w)){this.removeTerm(f,w,t),y-=1;continue}const R=o?o(this._documentIds.get(w),t,this._storedFields.get(w)):1;if(!R)continue;const A=b.get(w),J=this._fieldLength.get(w)[f],Q=Js(A,y,this._documentCount,J,x,l),W=s*n*m*R*Q,V=c.get(w);if(V){V.score+=W,Gs(V.terms,e);const $=Pe(V.match,t);$?$.push(h):V.match[t]=[h]}else c.set(w,{score:W,terms:[e],match:{[t]:[h]}})}}return c}addTerm(e,t,s){const n=this._index.fetch(s,vt);let r=n.get(e);if(r==null)r=new Map,r.set(t,1),n.set(e,r);else{const i=r.get(t);r.set(t,(i||0)+1)}}removeTerm(e,t,s){if(!this._index.has(s)){this.warnDocumentChanged(t,e,s);return}const n=this._index.fetch(s,vt),r=n.get(e);r==null||r.get(t)==null?this.warnDocumentChanged(t,e,s):r.get(t)<=1?r.size<=1?n.delete(e):r.delete(t):r.set(t,r.get(t)-1),this._index.get(s).size===0&&this._index.delete(s)}warnDocumentChanged(e,t,s){for(const n of Object.keys(this._fieldIds))if(this._fieldIds[n]===t){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(e)} has changed before removal: term "${s}" was not present in field "${n}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(e){const t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t}addFields(e){for(let t=0;tObject.prototype.hasOwnProperty.call(a,e)?a[e]:void 0,Ws={[Ge]:(a,e)=>{for(const t of e.keys()){const s=a.get(t);if(s==null)a.set(t,e.get(t));else{const{score:n,terms:r,match:i}=e.get(t);s.score=s.score+n,s.match=Object.assign(s.match,i),ft(s.terms,r)}}return a},[kt]:(a,e)=>{const t=new Map;for(const s of e.keys()){const n=a.get(s);if(n==null)continue;const{score:r,terms:i,match:o}=e.get(s);ft(n.terms,i),t.set(s,{score:n.score+r,terms:n.terms,match:Object.assign(n.match,o)})}return t},[Bs]:(a,e)=>{for(const t of e.keys())a.delete(t);return a}},Ks={k:1.2,b:.7,d:.5},Js=(a,e,t,s,n,r)=>{const{k:i,b:o,d:l}=r;return Math.log(1+(t-e+.5)/(e+.5))*(l+a*(i+1)/(a+i*(1-o+o*s/n)))},Us=a=>(e,t,s)=>{const n=typeof a.fuzzy=="function"?a.fuzzy(e,t,s):a.fuzzy||!1,r=typeof a.prefix=="function"?a.prefix(e,t,s):a.prefix===!0,i=typeof a.boostTerm=="function"?a.boostTerm(e,t,s):1;return{term:e,fuzzy:n,prefix:r,termBoost:i}},je={idField:"id",extractField:(a,e)=>a[e],tokenize:a=>a.split(Hs),processTerm:a=>a.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(a,e)=>{typeof(console==null?void 0:console[a])=="function"&&console[a](e)},autoVacuum:!0},ht={combineWith:Ge,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:Ks},qs={combineWith:kt,prefix:(a,e,t)=>e===t.length-1},Je={batchSize:1e3,batchWait:10},Ue={minDirtFactor:.1,minDirtCount:20},Ve=Object.assign(Object.assign({},Je),Ue),Gs=(a,e)=>{a.includes(e)||a.push(e)},ft=(a,e)=>{for(const t of e)a.includes(t)||a.push(t)},pt=({score:a},{score:e})=>e-a,vt=()=>new Map,Te=a=>{const e=new Map;for(const t of Object.keys(a))e.set(parseInt(t,10),a[t]);return e},Ie=a=>ke(void 0,void 0,void 0,function*(){const e=new Map;let t=0;for(const s of Object.keys(a))e.set(parseInt(s,10),a[s]),++t%1e3===0&&(yield Nt(0));return e}),Nt=a=>new Promise(e=>setTimeout(e,a)),Hs=/[\n\r\p{Z}\p{P}]+/u;class Qs{constructor(e=10){Ae(this,"max");Ae(this,"cache");this.max=e,this.cache=new Map}get(e){let t=this.cache.get(e);return t!==void 0&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){this.cache.has(e)?this.cache.delete(e):this.cache.size===this.max&&this.cache.delete(this.first()),this.cache.set(e,t)}first(){return this.cache.keys().next().value}clear(){this.cache.clear()}}const Ys=["aria-owns"],Zs={class:"shell"},Xs=["title"],en={class:"search-actions before"},tn=["title"],sn=["aria-activedescendant","aria-controls","placeholder"],nn={class:"search-actions"},rn=["title"],an=["disabled","title"],on=["id","role","aria-labelledby"],ln=["id","aria-selected"],cn=["href","aria-label","onMouseenter","onFocusin","data-index"],un={class:"titles"},dn=["innerHTML"],hn={class:"title main"},fn=["innerHTML"],pn={key:0,class:"excerpt-wrapper"},vn={key:0,class:"excerpt",inert:""},mn=["innerHTML"],gn={key:0,class:"no-results"},bn={class:"search-keyboard-shortcuts"},yn=["aria-label"],wn=["aria-label"],xn=["aria-label"],_n=["aria-label"],Sn=Lt({__name:"VPLocalSearchBox",emits:["close"],setup(a,{emit:e}){var S,C;const t=e,s=xe(),n=xe(),r=xe(is),i=ss(),{activate:o}=Ds(s,{immediate:!0,allowOutsideClick:!0,clickOutsideDeactivates:!0,escapeDeactivates:!0}),{localeIndex:l,theme:c}=i,h=st(async()=>{var v,p,E,F,z,P,j,I,K;return at(ue.loadJSON((E=await((p=(v=r.value)[l.value])==null?void 0:p.call(v)))==null?void 0:E.default,{fields:["title","titles","text"],storeFields:["title","titles"],searchOptions:{fuzzy:.2,prefix:!0,boost:{title:4,text:2,titles:1},...((F=c.value.search)==null?void 0:F.provider)==="local"&&((P=(z=c.value.search.options)==null?void 0:z.miniSearch)==null?void 0:P.searchOptions)},...((j=c.value.search)==null?void 0:j.provider)==="local"&&((K=(I=c.value.search.options)==null?void 0:I.miniSearch)==null?void 0:K.options)}))}),f=me(()=>{var v,p;return((v=c.value.search)==null?void 0:v.provider)==="local"&&((p=c.value.search.options)==null?void 0:p.disableQueryPersistence)===!0}).value?ie(""):Dt("vitepress:local-search-filter",""),b=zt("vitepress:local-search-detailed-list",((S=c.value.search)==null?void 0:S.provider)==="local"&&((C=c.value.search.options)==null?void 0:C.detailedView)===!0),y=me(()=>{var v,p,E;return((v=c.value.search)==null?void 0:v.provider)==="local"&&(((p=c.value.search.options)==null?void 0:p.disableDetailedView)===!0||((E=c.value.search.options)==null?void 0:E.detailedView)===!1)}),x=me(()=>{var p,E,F,z,P,j,I;const v=((p=c.value.search)==null?void 0:p.options)??c.value.algolia;return((P=(z=(F=(E=v==null?void 0:v.locales)==null?void 0:E[l.value])==null?void 0:F.translations)==null?void 0:z.button)==null?void 0:P.buttonText)||((I=(j=v==null?void 0:v.translations)==null?void 0:j.button)==null?void 0:I.buttonText)||"Search"});Pt(()=>{y.value&&(b.value=!1)});const w=xe([]),R=ie(!1);$e(f,()=>{R.value=!1});const A=st(async()=>{if(n.value)return at(new Ps(n.value))},null),J=new Qs(16);jt(()=>[h.value,f.value,b.value],async([v,p,E],F,z)=>{var ee,ye,He,Qe;(F==null?void 0:F[0])!==v&&J.clear();let P=!1;if(z(()=>{P=!0}),!v)return;w.value=v.search(p).slice(0,16),R.value=!0;const j=E?await Promise.all(w.value.map(B=>Q(B.id))):[];if(P)return;for(const{id:B,mod:te}of j){const se=B.slice(0,B.indexOf("#"));let Y=J.get(se);if(Y)continue;Y=new Map,J.set(se,Y);const G=te.default??te;if(G!=null&&G.render||G!=null&&G.setup){const ne=Yt(G);ne.config.warnHandler=()=>{},ne.provide(Zt,i),Object.defineProperties(ne.config.globalProperties,{$frontmatter:{get(){return i.frontmatter.value}},$params:{get(){return i.page.value.params}}});const Ye=document.createElement("div");ne.mount(Ye),Ye.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(de=>{var et;const we=(et=de.querySelector("a"))==null?void 0:et.getAttribute("href"),Ze=(we==null?void 0:we.startsWith("#"))&&we.slice(1);if(!Ze)return;let Xe="";for(;(de=de.nextElementSibling)&&!/^h[1-6]$/i.test(de.tagName);)Xe+=de.outerHTML;Y.set(Ze,Xe)}),ne.unmount()}if(P)return}const I=new Set;if(w.value=w.value.map(B=>{const[te,se]=B.id.split("#"),Y=J.get(te),G=(Y==null?void 0:Y.get(se))??"";for(const ne in B.match)I.add(ne);return{...B,text:G}}),await he(),P)return;await new Promise(B=>{var te;(te=A.value)==null||te.unmark({done:()=>{var se;(se=A.value)==null||se.markRegExp(k(I),{done:B})}})});const K=((ee=s.value)==null?void 0:ee.querySelectorAll(".result .excerpt"))??[];for(const B of K)(ye=B.querySelector('mark[data-markjs="true"]'))==null||ye.scrollIntoView({block:"center"});(Qe=(He=n.value)==null?void 0:He.firstElementChild)==null||Qe.scrollIntoView({block:"start"})},{debounce:200,immediate:!0});async function Q(v){const p=Xt(v.slice(0,v.indexOf("#")));try{if(!p)throw new Error(`Cannot find file for id: ${v}`);return{id:v,mod:await import(p)}}catch(E){return console.error(E),{id:v,mod:{}}}}const W=ie(),V=me(()=>{var v;return((v=f.value)==null?void 0:v.length)<=0});function $(v=!0){var p,E;(p=W.value)==null||p.focus(),v&&((E=W.value)==null||E.select())}Me(()=>{$()});function be(v){v.pointerType==="mouse"&&$()}const M=ie(-1),U=ie(!0);$e(w,v=>{M.value=v.length?0:-1,q()});function q(){he(()=>{const v=document.querySelector(".result.selected");v==null||v.scrollIntoView({block:"nearest"})})}_e("ArrowUp",v=>{v.preventDefault(),M.value--,M.value<0&&(M.value=w.value.length-1),U.value=!0,q()}),_e("ArrowDown",v=>{v.preventDefault(),M.value++,M.value>=w.value.length&&(M.value=0),U.value=!0,q()});const N=Vt();_e("Enter",v=>{if(v.isComposing||v.target instanceof HTMLButtonElement&&v.target.type!=="submit")return;const p=w.value[M.value];if(v.target instanceof HTMLInputElement&&!p){v.preventDefault();return}p&&(N.go(p.id),t("close"))}),_e("Escape",()=>{t("close")});const d=ns({modal:{displayDetails:"Display detailed list",resetButtonTitle:"Reset search",backButtonTitle:"Close search",noResultsText:"No results for",footer:{selectText:"to select",selectKeyAriaLabel:"enter",navigateText:"to navigate",navigateUpKeyAriaLabel:"up arrow",navigateDownKeyAriaLabel:"down arrow",closeText:"to close",closeKeyAriaLabel:"escape"}}});Me(()=>{window.history.pushState(null,"",null)}),$t("popstate",v=>{v.preventDefault(),t("close")});const g=Bt(Wt?document.body:null);Me(()=>{he(()=>{g.value=!0,he().then(()=>o())})}),Kt(()=>{g.value=!1});function T(){f.value="",he().then(()=>$(!1))}function k(v){return new RegExp([...v].sort((p,E)=>E.length-p.length).map(p=>`(${es(p)})`).join("|"),"gi")}function O(v){var F;if(!U.value)return;const p=(F=v.target)==null?void 0:F.closest(".result"),E=Number.parseInt(p==null?void 0:p.dataset.index);E>=0&&E!==M.value&&(M.value=E),U.value=!1}return(v,p)=>{var E,F,z,P,j;return H(),Jt(Qt,{to:"body"},[_("div",{ref_key:"el",ref:s,role:"button","aria-owns":(E=w.value)!=null&&E.length?"localsearch-list":void 0,"aria-expanded":"true","aria-haspopup":"listbox","aria-labelledby":"localsearch-label",class:"VPLocalSearchBox"},[_("div",{class:"backdrop",onClick:p[0]||(p[0]=I=>v.$emit("close"))}),_("div",Zs,[_("form",{class:"search-bar",onPointerup:p[4]||(p[4]=I=>be(I)),onSubmit:p[5]||(p[5]=Ut(()=>{},["prevent"]))},[_("label",{title:x.value,id:"localsearch-label",for:"localsearch-input"},p[7]||(p[7]=[_("span",{"aria-hidden":"true",class:"vpi-search search-icon local-search-icon"},null,-1)]),8,Xs),_("div",en,[_("button",{class:"back-button",title:L(d)("modal.backButtonTitle"),onClick:p[1]||(p[1]=I=>v.$emit("close"))},p[8]||(p[8]=[_("span",{class:"vpi-arrow-left local-search-icon"},null,-1)]),8,tn)]),qt(_("input",{ref_key:"searchInput",ref:W,"onUpdate:modelValue":p[2]||(p[2]=I=>Ht(f)?f.value=I:null),"aria-activedescendant":M.value>-1?"localsearch-item-"+M.value:void 0,"aria-autocomplete":"both","aria-controls":(F=w.value)!=null&&F.length?"localsearch-list":void 0,"aria-labelledby":"localsearch-label",autocapitalize:"off",autocomplete:"off",autocorrect:"off",class:"search-input",id:"localsearch-input",enterkeyhint:"go",maxlength:"64",placeholder:x.value,spellcheck:"false",type:"search"},null,8,sn),[[Gt,L(f)]]),_("div",nn,[y.value?Se("",!0):(H(),Z("button",{key:0,class:nt(["toggle-layout-button",{"detailed-list":L(b)}]),type:"button",title:L(d)("modal.displayDetails"),onClick:p[3]||(p[3]=I=>M.value>-1&&(b.value=!L(b)))},p[9]||(p[9]=[_("span",{class:"vpi-layout-list local-search-icon"},null,-1)]),10,rn)),_("button",{class:"clear-button",type:"reset",disabled:V.value,title:L(d)("modal.resetButtonTitle"),onClick:T},p[10]||(p[10]=[_("span",{class:"vpi-delete local-search-icon"},null,-1)]),8,an)])],32),_("ul",{ref_key:"resultsEl",ref:n,id:(z=w.value)!=null&&z.length?"localsearch-list":void 0,role:(P=w.value)!=null&&P.length?"listbox":void 0,"aria-labelledby":(j=w.value)!=null&&j.length?"localsearch-label":void 0,class:"results",onMousemove:O},[(H(!0),Z(rt,null,it(w.value,(I,K)=>(H(),Z("li",{key:I.id,id:"localsearch-item-"+K,"aria-selected":M.value===K?"true":"false",role:"option"},[_("a",{href:I.id,class:nt(["result",{selected:M.value===K}]),"aria-label":[...I.titles,I.title].join(" > "),onMouseenter:ee=>!U.value&&(M.value=K),onFocusin:ee=>M.value=K,onClick:p[6]||(p[6]=ee=>v.$emit("close")),"data-index":K},[_("div",null,[_("div",un,[p[12]||(p[12]=_("span",{class:"title-icon"},"#",-1)),(H(!0),Z(rt,null,it(I.titles,(ee,ye)=>(H(),Z("span",{key:ye,class:"title"},[_("span",{class:"text",innerHTML:ee},null,8,dn),p[11]||(p[11]=_("span",{class:"vpi-chevron-right local-search-icon"},null,-1))]))),128)),_("span",hn,[_("span",{class:"text",innerHTML:I.title},null,8,fn)])]),L(b)?(H(),Z("div",pn,[I.text?(H(),Z("div",vn,[_("div",{class:"vp-doc",innerHTML:I.text},null,8,mn)])):Se("",!0),p[13]||(p[13]=_("div",{class:"excerpt-gradient-bottom"},null,-1)),p[14]||(p[14]=_("div",{class:"excerpt-gradient-top"},null,-1))])):Se("",!0)])],42,cn)],8,ln))),128)),L(f)&&!w.value.length&&R.value?(H(),Z("li",gn,[fe(pe(L(d)("modal.noResultsText"))+' "',1),_("strong",null,pe(L(f)),1),p[15]||(p[15]=fe('" '))])):Se("",!0)],40,on),_("div",bn,[_("span",null,[_("kbd",{"aria-label":L(d)("modal.footer.navigateUpKeyAriaLabel")},p[16]||(p[16]=[_("span",{class:"vpi-arrow-up navigate-icon"},null,-1)]),8,yn),_("kbd",{"aria-label":L(d)("modal.footer.navigateDownKeyAriaLabel")},p[17]||(p[17]=[_("span",{class:"vpi-arrow-down navigate-icon"},null,-1)]),8,wn),fe(" "+pe(L(d)("modal.footer.navigateText")),1)]),_("span",null,[_("kbd",{"aria-label":L(d)("modal.footer.selectKeyAriaLabel")},p[18]||(p[18]=[_("span",{class:"vpi-corner-down-left navigate-icon"},null,-1)]),8,xn),fe(" "+pe(L(d)("modal.footer.selectText")),1)]),_("span",null,[_("kbd",{"aria-label":L(d)("modal.footer.closeKeyAriaLabel")},"esc",8,_n),fe(" "+pe(L(d)("modal.footer.closeText")),1)])])])],8,Ys)])}}}),Fn=ts(Sn,[["__scopeId","data-v-42e65fb9"]]);export{Fn as default}; diff --git a/previews/PR477/assets/chunks/framework.CG45A19l.js b/previews/PR477/assets/chunks/framework.CG45A19l.js new file mode 100644 index 00000000..76d22d97 --- /dev/null +++ b/previews/PR477/assets/chunks/framework.CG45A19l.js @@ -0,0 +1,18 @@ +/** +* @vue/shared v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function Ns(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Z={},Et=[],ke=()=>{},Ko=()=>!1,en=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Fs=e=>e.startsWith("onUpdate:"),ae=Object.assign,Hs=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},qo=Object.prototype.hasOwnProperty,z=(e,t)=>qo.call(e,t),W=Array.isArray,Tt=e=>In(e)==="[object Map]",ii=e=>In(e)==="[object Set]",q=e=>typeof e=="function",re=e=>typeof e=="string",Xe=e=>typeof e=="symbol",ne=e=>e!==null&&typeof e=="object",oi=e=>(ne(e)||q(e))&&q(e.then)&&q(e.catch),li=Object.prototype.toString,In=e=>li.call(e),Go=e=>In(e).slice(8,-1),ci=e=>In(e)==="[object Object]",$s=e=>re(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ct=Ns(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Nn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Yo=/-(\w)/g,Le=Nn(e=>e.replace(Yo,(t,n)=>n?n.toUpperCase():"")),Xo=/\B([A-Z])/g,st=Nn(e=>e.replace(Xo,"-$1").toLowerCase()),Fn=Nn(e=>e.charAt(0).toUpperCase()+e.slice(1)),_n=Nn(e=>e?`on${Fn(e)}`:""),tt=(e,t)=>!Object.is(e,t),bn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},vs=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Jo=e=>{const t=re(e)?Number(e):NaN;return isNaN(t)?e:t};let ar;const Hn=()=>ar||(ar=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ds(e){if(W(e)){const t={};for(let n=0;n{if(n){const s=n.split(Qo);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function js(e){let t="";if(re(e))t=e;else if(W(e))for(let n=0;n!!(e&&e.__v_isRef===!0),sl=e=>re(e)?e:e==null?"":W(e)||ne(e)&&(e.toString===li||!q(e.toString))?ui(e)?sl(e.value):JSON.stringify(e,di,2):String(e),di=(e,t)=>ui(t)?di(e,t.value):Tt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[zn(s,i)+" =>"]=r,n),{})}:ii(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>zn(n))}:Xe(t)?zn(t):ne(t)&&!W(t)&&!ci(t)?String(t):t,zn=(e,t="")=>{var n;return Xe(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let we;class rl{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=we,!t&&we&&(this.index=(we.scopes||(we.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0)return;if(jt){let t=jt;for(jt=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Dt;){let t=Dt;for(Dt=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function yi(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function vi(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),ks(s),ol(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function _s(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(_i(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function _i(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Kt))return;e.globalVersion=Kt;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!_s(e)){e.flags&=-3;return}const n=te,s=Ne;te=e,Ne=!0;try{yi(e);const r=e.fn(e._value);(t.version===0||tt(r,e._value))&&(e._value=r,t.version++)}catch(r){throw t.version++,r}finally{te=n,Ne=s,vi(e),e.flags&=-3}}function ks(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)ks(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function ol(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ne=!0;const bi=[];function rt(){bi.push(Ne),Ne=!1}function it(){const e=bi.pop();Ne=e===void 0?!0:e}function fr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=te;te=void 0;try{t()}finally{te=n}}}let Kt=0;class ll{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class $n{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!te||!Ne||te===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==te)n=this.activeLink=new ll(te,this),te.deps?(n.prevDep=te.depsTail,te.depsTail.nextDep=n,te.depsTail=n):te.deps=te.depsTail=n,wi(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=te.depsTail,n.nextDep=void 0,te.depsTail.nextDep=n,te.depsTail=n,te.deps===n&&(te.deps=s)}return n}trigger(t){this.version++,Kt++,this.notify(t)}notify(t){Vs();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Us()}}}function wi(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)wi(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Cn=new WeakMap,dt=Symbol(""),bs=Symbol(""),qt=Symbol("");function me(e,t,n){if(Ne&&te){let s=Cn.get(e);s||Cn.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new $n),r.map=s,r.key=n),r.track()}}function Ge(e,t,n,s,r,i){const o=Cn.get(e);if(!o){Kt++;return}const l=c=>{c&&c.trigger()};if(Vs(),t==="clear")o.forEach(l);else{const c=W(e),f=c&&$s(n);if(c&&n==="length"){const a=Number(s);o.forEach((h,y)=>{(y==="length"||y===qt||!Xe(y)&&y>=a)&&l(h)})}else switch((n!==void 0||o.has(void 0))&&l(o.get(n)),f&&l(o.get(qt)),t){case"add":c?f&&l(o.get("length")):(l(o.get(dt)),Tt(e)&&l(o.get(bs)));break;case"delete":c||(l(o.get(dt)),Tt(e)&&l(o.get(bs)));break;case"set":Tt(e)&&l(o.get(dt));break}}Us()}function cl(e,t){const n=Cn.get(e);return n&&n.get(t)}function _t(e){const t=J(e);return t===e?t:(me(t,"iterate",qt),Pe(e)?t:t.map(ye))}function Dn(e){return me(e=J(e),"iterate",qt),e}const al={__proto__:null,[Symbol.iterator](){return Zn(this,Symbol.iterator,ye)},concat(...e){return _t(this).concat(...e.map(t=>W(t)?_t(t):t))},entries(){return Zn(this,"entries",e=>(e[1]=ye(e[1]),e))},every(e,t){return We(this,"every",e,t,void 0,arguments)},filter(e,t){return We(this,"filter",e,t,n=>n.map(ye),arguments)},find(e,t){return We(this,"find",e,t,ye,arguments)},findIndex(e,t){return We(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return We(this,"findLast",e,t,ye,arguments)},findLastIndex(e,t){return We(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return We(this,"forEach",e,t,void 0,arguments)},includes(...e){return es(this,"includes",e)},indexOf(...e){return es(this,"indexOf",e)},join(e){return _t(this).join(e)},lastIndexOf(...e){return es(this,"lastIndexOf",e)},map(e,t){return We(this,"map",e,t,void 0,arguments)},pop(){return Ft(this,"pop")},push(...e){return Ft(this,"push",e)},reduce(e,...t){return ur(this,"reduce",e,t)},reduceRight(e,...t){return ur(this,"reduceRight",e,t)},shift(){return Ft(this,"shift")},some(e,t){return We(this,"some",e,t,void 0,arguments)},splice(...e){return Ft(this,"splice",e)},toReversed(){return _t(this).toReversed()},toSorted(e){return _t(this).toSorted(e)},toSpliced(...e){return _t(this).toSpliced(...e)},unshift(...e){return Ft(this,"unshift",e)},values(){return Zn(this,"values",ye)}};function Zn(e,t,n){const s=Dn(e),r=s[t]();return s!==e&&!Pe(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.value&&(i.value=n(i.value)),i}),r}const fl=Array.prototype;function We(e,t,n,s,r,i){const o=Dn(e),l=o!==e&&!Pe(e),c=o[t];if(c!==fl[t]){const h=c.apply(e,i);return l?ye(h):h}let f=n;o!==e&&(l?f=function(h,y){return n.call(this,ye(h),y,e)}:n.length>2&&(f=function(h,y){return n.call(this,h,y,e)}));const a=c.call(o,f,s);return l&&r?r(a):a}function ur(e,t,n,s){const r=Dn(e);let i=n;return r!==e&&(Pe(e)?n.length>3&&(i=function(o,l,c){return n.call(this,o,l,c,e)}):i=function(o,l,c){return n.call(this,o,ye(l),c,e)}),r[t](i,...s)}function es(e,t,n){const s=J(e);me(s,"iterate",qt);const r=s[t](...n);return(r===-1||r===!1)&&Ks(n[0])?(n[0]=J(n[0]),s[t](...n)):r}function Ft(e,t,n=[]){rt(),Vs();const s=J(e)[t].apply(e,n);return Us(),it(),s}const ul=Ns("__proto__,__v_isRef,__isVue"),Si=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Xe));function dl(e){Xe(e)||(e=String(e));const t=J(this);return me(t,"has",e),t.hasOwnProperty(e)}class xi{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?Sl:Ai:i?Ci:Ti).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=W(t);if(!r){let c;if(o&&(c=al[n]))return c;if(n==="hasOwnProperty")return dl}const l=Reflect.get(t,n,fe(t)?t:s);return(Xe(n)?Si.has(n):ul(n))||(r||me(t,"get",n),i)?l:fe(l)?o&&$s(n)?l:l.value:ne(l)?r?Vn(l):jn(l):l}}class Ei extends xi{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];if(!this._isShallow){const c=yt(i);if(!Pe(s)&&!yt(s)&&(i=J(i),s=J(s)),!W(t)&&fe(i)&&!fe(s))return c?!1:(i.value=s,!0)}const o=W(t)&&$s(n)?Number(n)e,cn=e=>Reflect.getPrototypeOf(e);function yl(e,t,n){return function(...s){const r=this.__v_raw,i=J(r),o=Tt(i),l=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,f=r[e](...s),a=n?ws:t?Ss:ye;return!t&&me(i,"iterate",c?bs:dt),{next(){const{value:h,done:y}=f.next();return y?{value:h,done:y}:{value:l?[a(h[0]),a(h[1])]:a(h),done:y}},[Symbol.iterator](){return this}}}}function an(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function vl(e,t){const n={get(r){const i=this.__v_raw,o=J(i),l=J(r);e||(tt(r,l)&&me(o,"get",r),me(o,"get",l));const{has:c}=cn(o),f=t?ws:e?Ss:ye;if(c.call(o,r))return f(i.get(r));if(c.call(o,l))return f(i.get(l));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&me(J(r),"iterate",dt),Reflect.get(r,"size",r)},has(r){const i=this.__v_raw,o=J(i),l=J(r);return e||(tt(r,l)&&me(o,"has",r),me(o,"has",l)),r===l?i.has(r):i.has(r)||i.has(l)},forEach(r,i){const o=this,l=o.__v_raw,c=J(l),f=t?ws:e?Ss:ye;return!e&&me(c,"iterate",dt),l.forEach((a,h)=>r.call(i,f(a),f(h),o))}};return ae(n,e?{add:an("add"),set:an("set"),delete:an("delete"),clear:an("clear")}:{add(r){!t&&!Pe(r)&&!yt(r)&&(r=J(r));const i=J(this);return cn(i).has.call(i,r)||(i.add(r),Ge(i,"add",r,r)),this},set(r,i){!t&&!Pe(i)&&!yt(i)&&(i=J(i));const o=J(this),{has:l,get:c}=cn(o);let f=l.call(o,r);f||(r=J(r),f=l.call(o,r));const a=c.call(o,r);return o.set(r,i),f?tt(i,a)&&Ge(o,"set",r,i):Ge(o,"add",r,i),this},delete(r){const i=J(this),{has:o,get:l}=cn(i);let c=o.call(i,r);c||(r=J(r),c=o.call(i,r)),l&&l.call(i,r);const f=i.delete(r);return c&&Ge(i,"delete",r,void 0),f},clear(){const r=J(this),i=r.size!==0,o=r.clear();return i&&Ge(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=yl(r,e,t)}),n}function Bs(e,t){const n=vl(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(z(n,r)&&r in s?n:s,r,i)}const _l={get:Bs(!1,!1)},bl={get:Bs(!1,!0)},wl={get:Bs(!0,!1)};const Ti=new WeakMap,Ci=new WeakMap,Ai=new WeakMap,Sl=new WeakMap;function xl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function El(e){return e.__v_skip||!Object.isExtensible(e)?0:xl(Go(e))}function jn(e){return yt(e)?e:Ws(e,!1,pl,_l,Ti)}function Tl(e){return Ws(e,!1,ml,bl,Ci)}function Vn(e){return Ws(e,!0,gl,wl,Ai)}function Ws(e,t,n,s,r){if(!ne(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const o=El(e);if(o===0)return e;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function ht(e){return yt(e)?ht(e.__v_raw):!!(e&&e.__v_isReactive)}function yt(e){return!!(e&&e.__v_isReadonly)}function Pe(e){return!!(e&&e.__v_isShallow)}function Ks(e){return e?!!e.__v_raw:!1}function J(e){const t=e&&e.__v_raw;return t?J(t):e}function wn(e){return!z(e,"__v_skip")&&Object.isExtensible(e)&&ai(e,"__v_skip",!0),e}const ye=e=>ne(e)?jn(e):e,Ss=e=>ne(e)?Vn(e):e;function fe(e){return e?e.__v_isRef===!0:!1}function oe(e){return Ri(e,!1)}function qs(e){return Ri(e,!0)}function Ri(e,t){return fe(e)?e:new Cl(e,t)}class Cl{constructor(t,n){this.dep=new $n,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:J(t),this._value=n?t:ye(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Pe(t)||yt(t);t=s?t:J(t),tt(t,n)&&(this._rawValue=t,this._value=s?t:ye(t),this.dep.trigger())}}function Oi(e){return fe(e)?e.value:e}const Al={get:(e,t,n)=>t==="__v_raw"?e:Oi(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return fe(r)&&!fe(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Mi(e){return ht(e)?e:new Proxy(e,Al)}class Rl{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new $n,{get:s,set:r}=t(n.track.bind(n),n.trigger.bind(n));this._get=s,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Ol(e){return new Rl(e)}class Ml{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return cl(J(this._object),this._key)}}class Pl{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Ll(e,t,n){return fe(e)?e:q(e)?new Pl(e):ne(e)&&arguments.length>1?Il(e,t,n):oe(e)}function Il(e,t,n){const s=e[t];return fe(s)?s:new Ml(e,t,n)}class Nl{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new $n(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Kt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&te!==this)return mi(this,!0),!0}get value(){const t=this.dep.track();return _i(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Fl(e,t,n=!1){let s,r;return q(e)?s=e:(s=e.get,r=e.set),new Nl(s,r,n)}const fn={},An=new WeakMap;let ft;function Hl(e,t=!1,n=ft){if(n){let s=An.get(n);s||An.set(n,s=[]),s.push(e)}}function $l(e,t,n=Z){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:l,call:c}=n,f=g=>r?g:Pe(g)||r===!1||r===0?Ye(g,1):Ye(g);let a,h,y,v,S=!1,_=!1;if(fe(e)?(h=()=>e.value,S=Pe(e)):ht(e)?(h=()=>f(e),S=!0):W(e)?(_=!0,S=e.some(g=>ht(g)||Pe(g)),h=()=>e.map(g=>{if(fe(g))return g.value;if(ht(g))return f(g);if(q(g))return c?c(g,2):g()})):q(e)?t?h=c?()=>c(e,2):e:h=()=>{if(y){rt();try{y()}finally{it()}}const g=ft;ft=a;try{return c?c(e,3,[v]):e(v)}finally{ft=g}}:h=ke,t&&r){const g=h,O=r===!0?1/0:r;h=()=>Ye(g(),O)}const K=hi(),N=()=>{a.stop(),K&&K.active&&Hs(K.effects,a)};if(i&&t){const g=t;t=(...O)=>{g(...O),N()}}let j=_?new Array(e.length).fill(fn):fn;const p=g=>{if(!(!(a.flags&1)||!a.dirty&&!g))if(t){const O=a.run();if(r||S||(_?O.some((F,$)=>tt(F,j[$])):tt(O,j))){y&&y();const F=ft;ft=a;try{const $=[O,j===fn?void 0:_&&j[0]===fn?[]:j,v];c?c(t,3,$):t(...$),j=O}finally{ft=F}}}else a.run()};return l&&l(p),a=new pi(h),a.scheduler=o?()=>o(p,!1):p,v=g=>Hl(g,!1,a),y=a.onStop=()=>{const g=An.get(a);if(g){if(c)c(g,4);else for(const O of g)O();An.delete(a)}},t?s?p(!0):j=a.run():o?o(p.bind(null,!0),!0):a.run(),N.pause=a.pause.bind(a),N.resume=a.resume.bind(a),N.stop=N,N}function Ye(e,t=1/0,n){if(t<=0||!ne(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,fe(e))Ye(e.value,t,n);else if(W(e))for(let s=0;s{Ye(s,t,n)});else if(ci(e)){for(const s in e)Ye(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Ye(e[s],t,n)}return e}/** +* @vue/runtime-core v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function tn(e,t,n,s){try{return s?e(...s):e()}catch(r){nn(r,t,n)}}function He(e,t,n,s){if(q(e)){const r=tn(e,t,n,s);return r&&oi(r)&&r.catch(i=>{nn(i,t,n)}),r}if(W(e)){const r=[];for(let i=0;i>>1,r=Se[s],i=Gt(r);i=Gt(n)?Se.push(e):Se.splice(jl(t),0,e),e.flags|=1,Li()}}function Li(){Rn||(Rn=Pi.then(Ii))}function Vl(e){W(e)?At.push(...e):Qe&&e.id===-1?Qe.splice(wt+1,0,e):e.flags&1||(At.push(e),e.flags|=1),Li()}function dr(e,t,n=Ve+1){for(;nGt(n)-Gt(s));if(At.length=0,Qe){Qe.push(...t);return}for(Qe=t,wt=0;wte.id==null?e.flags&2?-1:1/0:e.id;function Ii(e){try{for(Ve=0;Ve{s._d&&Ar(-1);const i=Mn(t);let o;try{o=e(...r)}finally{Mn(i),s._d&&Ar(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function _f(e,t){if(de===null)return e;const n=Gn(de),s=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport,Vt=e=>e&&(e.disabled||e.disabled===""),hr=e=>e&&(e.defer||e.defer===""),pr=e=>typeof SVGElement<"u"&&e instanceof SVGElement,gr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,xs=(e,t)=>{const n=e&&e.to;return re(n)?t?t(n):null:n},$i={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,i,o,l,c,f){const{mc:a,pc:h,pbc:y,o:{insert:v,querySelector:S,createText:_,createComment:K}}=f,N=Vt(t.props);let{shapeFlag:j,children:p,dynamicChildren:g}=t;if(e==null){const O=t.el=_(""),F=t.anchor=_("");v(O,n,s),v(F,n,s);const $=(R,b)=>{j&16&&(r&&r.isCE&&(r.ce._teleportTarget=R),a(p,R,b,r,i,o,l,c))},V=()=>{const R=t.target=xs(t.props,S),b=Di(R,t,_,v);R&&(o!=="svg"&&pr(R)?o="svg":o!=="mathml"&&gr(R)&&(o="mathml"),N||($(R,b),Sn(t,!1)))};N&&($(n,F),Sn(t,!0)),hr(t.props)?be(()=>{V(),t.el.__isMounted=!0},i):V()}else{if(hr(t.props)&&!e.el.__isMounted){be(()=>{$i.process(e,t,n,s,r,i,o,l,c,f),delete e.el.__isMounted},i);return}t.el=e.el,t.targetStart=e.targetStart;const O=t.anchor=e.anchor,F=t.target=e.target,$=t.targetAnchor=e.targetAnchor,V=Vt(e.props),R=V?n:F,b=V?O:$;if(o==="svg"||pr(F)?o="svg":(o==="mathml"||gr(F))&&(o="mathml"),g?(y(e.dynamicChildren,g,R,r,i,o,l),Qs(e,t,!0)):c||h(e,t,R,b,r,i,o,l,!1),N)V?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):un(t,n,O,f,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const I=t.target=xs(t.props,S);I&&un(t,I,null,f,0)}else V&&un(t,F,$,f,1);Sn(t,N)}},remove(e,t,n,{um:s,o:{remove:r}},i){const{shapeFlag:o,children:l,anchor:c,targetStart:f,targetAnchor:a,target:h,props:y}=e;if(h&&(r(f),r(a)),i&&r(c),o&16){const v=i||!Vt(y);for(let S=0;S{e.isMounted=!0}),Ki(()=>{e.isUnmounting=!0}),e}const Re=[Function,Array],ji={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Re,onEnter:Re,onAfterEnter:Re,onEnterCancelled:Re,onBeforeLeave:Re,onLeave:Re,onAfterLeave:Re,onLeaveCancelled:Re,onBeforeAppear:Re,onAppear:Re,onAfterAppear:Re,onAppearCancelled:Re},Vi=e=>{const t=e.subTree;return t.component?Vi(t.component):t},Wl={name:"BaseTransition",props:ji,setup(e,{slots:t}){const n=qn(),s=Bl();return()=>{const r=t.default&&Bi(t.default(),!0);if(!r||!r.length)return;const i=Ui(r),o=J(e),{mode:l}=o;if(s.isLeaving)return ts(i);const c=mr(i);if(!c)return ts(i);let f=Es(c,o,s,n,h=>f=h);c.type!==ve&&Yt(c,f);let a=n.subTree&&mr(n.subTree);if(a&&a.type!==ve&&!ut(c,a)&&Vi(n).type!==ve){let h=Es(a,o,s,n);if(Yt(a,h),l==="out-in"&&c.type!==ve)return s.isLeaving=!0,h.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete h.afterLeave,a=void 0},ts(i);l==="in-out"&&c.type!==ve?h.delayLeave=(y,v,S)=>{const _=ki(s,a);_[String(a.key)]=a,y[Ze]=()=>{v(),y[Ze]=void 0,delete f.delayedLeave,a=void 0},f.delayedLeave=()=>{S(),delete f.delayedLeave,a=void 0}}:a=void 0}else a&&(a=void 0);return i}}};function Ui(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==ve){t=n;break}}return t}const Kl=Wl;function ki(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Es(e,t,n,s,r){const{appear:i,mode:o,persisted:l=!1,onBeforeEnter:c,onEnter:f,onAfterEnter:a,onEnterCancelled:h,onBeforeLeave:y,onLeave:v,onAfterLeave:S,onLeaveCancelled:_,onBeforeAppear:K,onAppear:N,onAfterAppear:j,onAppearCancelled:p}=t,g=String(e.key),O=ki(n,e),F=(R,b)=>{R&&He(R,s,9,b)},$=(R,b)=>{const I=b[1];F(R,b),W(R)?R.every(x=>x.length<=1)&&I():R.length<=1&&I()},V={mode:o,persisted:l,beforeEnter(R){let b=c;if(!n.isMounted)if(i)b=K||c;else return;R[Ze]&&R[Ze](!0);const I=O[g];I&&ut(e,I)&&I.el[Ze]&&I.el[Ze](),F(b,[R])},enter(R){let b=f,I=a,x=h;if(!n.isMounted)if(i)b=N||f,I=j||a,x=p||h;else return;let B=!1;const se=R[dn]=le=>{B||(B=!0,le?F(x,[R]):F(I,[R]),V.delayedLeave&&V.delayedLeave(),R[dn]=void 0)};b?$(b,[R,se]):se()},leave(R,b){const I=String(e.key);if(R[dn]&&R[dn](!0),n.isUnmounting)return b();F(y,[R]);let x=!1;const B=R[Ze]=se=>{x||(x=!0,b(),se?F(_,[R]):F(S,[R]),R[Ze]=void 0,O[I]===e&&delete O[I])};O[I]=e,v?$(v,[R,B]):B()},clone(R){const b=Es(R,t,n,s,r);return r&&r(b),b}};return V}function ts(e){if(sn(e))return e=nt(e),e.children=null,e}function mr(e){if(!sn(e))return Hi(e.type)&&e.children?Ui(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&q(n.default))return n.default()}}function Yt(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Yt(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Bi(e,t=!1,n){let s=[],r=0;for(let i=0;i1)for(let i=0;iXt(S,t&&(W(t)?t[_]:t),n,s,r));return}if(pt(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Xt(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?Gn(s.component):s.el,o=r?null:i,{i:l,r:c}=e,f=t&&t.r,a=l.refs===Z?l.refs={}:l.refs,h=l.setupState,y=J(h),v=h===Z?()=>!1:S=>z(y,S);if(f!=null&&f!==c&&(re(f)?(a[f]=null,v(f)&&(h[f]=null)):fe(f)&&(f.value=null)),q(c))tn(c,l,12,[o,a]);else{const S=re(c),_=fe(c);if(S||_){const K=()=>{if(e.f){const N=S?v(c)?h[c]:a[c]:c.value;r?W(N)&&Hs(N,i):W(N)?N.includes(i)||N.push(i):S?(a[c]=[i],v(c)&&(h[c]=a[c])):(c.value=[i],e.k&&(a[e.k]=c.value))}else S?(a[c]=o,v(c)&&(h[c]=o)):_&&(c.value=o,e.k&&(a[e.k]=o))};o?(K.id=-1,be(K,n)):K()}}}let yr=!1;const bt=()=>{yr||(console.error("Hydration completed but contains mismatches."),yr=!0)},ql=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Gl=e=>e.namespaceURI.includes("MathML"),hn=e=>{if(e.nodeType===1){if(ql(e))return"svg";if(Gl(e))return"mathml"}},xt=e=>e.nodeType===8;function Yl(e){const{mt:t,p:n,o:{patchProp:s,createText:r,nextSibling:i,parentNode:o,remove:l,insert:c,createComment:f}}=e,a=(p,g)=>{if(!g.hasChildNodes()){n(null,p,g),On(),g._vnode=p;return}h(g.firstChild,p,null,null,null),On(),g._vnode=p},h=(p,g,O,F,$,V=!1)=>{V=V||!!g.dynamicChildren;const R=xt(p)&&p.data==="[",b=()=>_(p,g,O,F,$,R),{type:I,ref:x,shapeFlag:B,patchFlag:se}=g;let le=p.nodeType;g.el=p,se===-2&&(V=!1,g.dynamicChildren=null);let U=null;switch(I){case gt:le!==3?g.children===""?(c(g.el=r(""),o(p),p),U=p):U=b():(p.data!==g.children&&(bt(),p.data=g.children),U=i(p));break;case ve:j(p)?(U=i(p),N(g.el=p.content.firstChild,p,O)):le!==8||R?U=b():U=i(p);break;case kt:if(R&&(p=i(p),le=p.nodeType),le===1||le===3){U=p;const Y=!g.children.length;for(let D=0;D{V=V||!!g.dynamicChildren;const{type:R,props:b,patchFlag:I,shapeFlag:x,dirs:B,transition:se}=g,le=R==="input"||R==="option";if(le||I!==-1){B&&Ue(g,null,O,"created");let U=!1;if(j(p)){U=co(null,se)&&O&&O.vnode.props&&O.vnode.props.appear;const D=p.content.firstChild;U&&se.beforeEnter(D),N(D,p,O),g.el=p=D}if(x&16&&!(b&&(b.innerHTML||b.textContent))){let D=v(p.firstChild,g,p,O,F,$,V);for(;D;){pn(p,1)||bt();const he=D;D=D.nextSibling,l(he)}}else if(x&8){let D=g.children;D[0]===` +`&&(p.tagName==="PRE"||p.tagName==="TEXTAREA")&&(D=D.slice(1)),p.textContent!==D&&(pn(p,0)||bt(),p.textContent=g.children)}if(b){if(le||!V||I&48){const D=p.tagName.includes("-");for(const he in b)(le&&(he.endsWith("value")||he==="indeterminate")||en(he)&&!Ct(he)||he[0]==="."||D)&&s(p,he,null,b[he],void 0,O)}else if(b.onClick)s(p,"onClick",null,b.onClick,void 0,O);else if(I&4&&ht(b.style))for(const D in b.style)b.style[D]}let Y;(Y=b&&b.onVnodeBeforeMount)&&Oe(Y,O,g),B&&Ue(g,null,O,"beforeMount"),((Y=b&&b.onVnodeMounted)||B||U)&&go(()=>{Y&&Oe(Y,O,g),U&&se.enter(p),B&&Ue(g,null,O,"mounted")},F)}return p.nextSibling},v=(p,g,O,F,$,V,R)=>{R=R||!!g.dynamicChildren;const b=g.children,I=b.length;for(let x=0;x{const{slotScopeIds:R}=g;R&&($=$?$.concat(R):R);const b=o(p),I=v(i(p),g,b,O,F,$,V);return I&&xt(I)&&I.data==="]"?i(g.anchor=I):(bt(),c(g.anchor=f("]"),b,I),I)},_=(p,g,O,F,$,V)=>{if(pn(p.parentElement,1)||bt(),g.el=null,V){const I=K(p);for(;;){const x=i(p);if(x&&x!==I)l(x);else break}}const R=i(p),b=o(p);return l(p),n(null,g,b,R,O,F,hn(b),$),O&&(O.vnode.el=g.el,ho(O,g.el)),R},K=(p,g="[",O="]")=>{let F=0;for(;p;)if(p=i(p),p&&xt(p)&&(p.data===g&&F++,p.data===O)){if(F===0)return i(p);F--}return p},N=(p,g,O)=>{const F=g.parentNode;F&&F.replaceChild(p,g);let $=O;for(;$;)$.vnode.el===g&&($.vnode.el=$.subTree.el=p),$=$.parent},j=p=>p.nodeType===1&&p.tagName==="TEMPLATE";return[a,h]}const vr="data-allow-mismatch",Xl={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function pn(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(vr);)e=e.parentElement;const n=e&&e.getAttribute(vr);if(n==null)return!1;if(n==="")return!0;{const s=n.split(",");return t===0&&s.includes("children")?!0:n.split(",").includes(Xl[t])}}Hn().requestIdleCallback;Hn().cancelIdleCallback;function Jl(e,t){if(xt(e)&&e.data==="["){let n=1,s=e.nextSibling;for(;s;){if(s.nodeType===1){if(t(s)===!1)break}else if(xt(s))if(s.data==="]"){if(--n===0)break}else s.data==="["&&n++;s=s.nextSibling}}else t(e)}const pt=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function wf(e){q(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:r=200,hydrate:i,timeout:o,suspensible:l=!0,onError:c}=e;let f=null,a,h=0;const y=()=>(h++,f=null,v()),v=()=>{let S;return f||(S=f=t().catch(_=>{if(_=_ instanceof Error?_:new Error(String(_)),c)return new Promise((K,N)=>{c(_,()=>K(y()),()=>N(_),h+1)});throw _}).then(_=>S!==f&&f?f:(_&&(_.__esModule||_[Symbol.toStringTag]==="Module")&&(_=_.default),a=_,_)))};return Ys({name:"AsyncComponentWrapper",__asyncLoader:v,__asyncHydrate(S,_,K){const N=i?()=>{const j=i(K,p=>Jl(S,p));j&&(_.bum||(_.bum=[])).push(j)}:K;a?N():v().then(()=>!_.isUnmounted&&N())},get __asyncResolved(){return a},setup(){const S=ue;if(Xs(S),a)return()=>ns(a,S);const _=p=>{f=null,nn(p,S,13,!s)};if(l&&S.suspense||Mt)return v().then(p=>()=>ns(p,S)).catch(p=>(_(p),()=>s?ce(s,{error:p}):null));const K=oe(!1),N=oe(),j=oe(!!r);return r&&setTimeout(()=>{j.value=!1},r),o!=null&&setTimeout(()=>{if(!K.value&&!N.value){const p=new Error(`Async component timed out after ${o}ms.`);_(p),N.value=p}},o),v().then(()=>{K.value=!0,S.parent&&sn(S.parent.vnode)&&S.parent.update()}).catch(p=>{_(p),N.value=p}),()=>{if(K.value&&a)return ns(a,S);if(N.value&&s)return ce(s,{error:N.value});if(n&&!j.value)return ce(n)}}})}function ns(e,t){const{ref:n,props:s,children:r,ce:i}=t.vnode,o=ce(e,s,r);return o.ref=n,o.ce=i,delete t.vnode.ce,o}const sn=e=>e.type.__isKeepAlive;function zl(e,t){Wi(e,"a",t)}function Ql(e,t){Wi(e,"da",t)}function Wi(e,t,n=ue){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(kn(t,s,n),n){let r=n.parent;for(;r&&r.parent;)sn(r.parent.vnode)&&Zl(s,t,n,r),r=r.parent}}function Zl(e,t,n,s){const r=kn(t,e,s,!0);Bn(()=>{Hs(s[t],r)},n)}function kn(e,t,n=ue,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{rt();const l=rn(n),c=He(t,n,e,o);return l(),it(),c});return s?r.unshift(i):r.push(i),i}}const Je=e=>(t,n=ue)=>{(!Mt||e==="sp")&&kn(e,(...s)=>t(...s),n)},ec=Je("bm"),Lt=Je("m"),tc=Je("bu"),nc=Je("u"),Ki=Je("bum"),Bn=Je("um"),sc=Je("sp"),rc=Je("rtg"),ic=Je("rtc");function oc(e,t=ue){kn("ec",e,t)}const qi="components";function Sf(e,t){return Yi(qi,e,!0,t)||e}const Gi=Symbol.for("v-ndc");function xf(e){return re(e)?Yi(qi,e,!1)||e:e||Gi}function Yi(e,t,n=!0,s=!1){const r=de||ue;if(r){const i=r.type;{const l=Wc(i,!1);if(l&&(l===t||l===Le(t)||l===Fn(Le(t))))return i}const o=_r(r[e]||i[e],t)||_r(r.appContext[e],t);return!o&&s?i:o}}function _r(e,t){return e&&(e[t]||e[Le(t)]||e[Fn(Le(t))])}function Ef(e,t,n,s){let r;const i=n,o=W(e);if(o||re(e)){const l=o&&ht(e);let c=!1;l&&(c=!Pe(e),e=Dn(e)),r=new Array(e.length);for(let f=0,a=e.length;ft(l,c,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,f=l.length;czt(t)?!(t.type===ve||t.type===xe&&!Xi(t.children)):!0)?e:null}function Cf(e,t){const n={};for(const s in e)n[/[A-Z]/.test(s)?`on:${s}`:_n(s)]=e[s];return n}const Ts=e=>e?bo(e)?Gn(e):Ts(e.parent):null,Ut=ae(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ts(e.parent),$root:e=>Ts(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Js(e),$forceUpdate:e=>e.f||(e.f=()=>{Gs(e.update)}),$nextTick:e=>e.n||(e.n=Un.bind(e.proxy)),$watch:e=>Rc.bind(e)}),ss=(e,t)=>e!==Z&&!e.__isScriptSetup&&z(e,t),lc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:c}=e;let f;if(t[0]!=="$"){const v=o[t];if(v!==void 0)switch(v){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(ss(s,t))return o[t]=1,s[t];if(r!==Z&&z(r,t))return o[t]=2,r[t];if((f=e.propsOptions[0])&&z(f,t))return o[t]=3,i[t];if(n!==Z&&z(n,t))return o[t]=4,n[t];Cs&&(o[t]=0)}}const a=Ut[t];let h,y;if(a)return t==="$attrs"&&me(e.attrs,"get",""),a(e);if((h=l.__cssModules)&&(h=h[t]))return h;if(n!==Z&&z(n,t))return o[t]=4,n[t];if(y=c.config.globalProperties,z(y,t))return y[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return ss(r,t)?(r[t]=n,!0):s!==Z&&z(s,t)?(s[t]=n,!0):z(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:i}},o){let l;return!!n[o]||e!==Z&&z(e,o)||ss(t,o)||(l=i[0])&&z(l,o)||z(s,o)||z(Ut,o)||z(r.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:z(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Af(){return cc().slots}function cc(){const e=qn();return e.setupContext||(e.setupContext=So(e))}function br(e){return W(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Cs=!0;function ac(e){const t=Js(e),n=e.proxy,s=e.ctx;Cs=!1,t.beforeCreate&&wr(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:c,inject:f,created:a,beforeMount:h,mounted:y,beforeUpdate:v,updated:S,activated:_,deactivated:K,beforeDestroy:N,beforeUnmount:j,destroyed:p,unmounted:g,render:O,renderTracked:F,renderTriggered:$,errorCaptured:V,serverPrefetch:R,expose:b,inheritAttrs:I,components:x,directives:B,filters:se}=t;if(f&&fc(f,s,null),o)for(const Y in o){const D=o[Y];q(D)&&(s[Y]=D.bind(n))}if(r){const Y=r.call(n,n);ne(Y)&&(e.data=jn(Y))}if(Cs=!0,i)for(const Y in i){const D=i[Y],he=q(D)?D.bind(n,n):q(D.get)?D.get.bind(n,n):ke,on=!q(D)&&q(D.set)?D.set.bind(n):ke,ot=ie({get:he,set:on});Object.defineProperty(s,Y,{enumerable:!0,configurable:!0,get:()=>ot.value,set:De=>ot.value=De})}if(l)for(const Y in l)Ji(l[Y],s,n,Y);if(c){const Y=q(c)?c.call(n):c;Reflect.ownKeys(Y).forEach(D=>{mc(D,Y[D])})}a&&wr(a,e,"c");function U(Y,D){W(D)?D.forEach(he=>Y(he.bind(n))):D&&Y(D.bind(n))}if(U(ec,h),U(Lt,y),U(tc,v),U(nc,S),U(zl,_),U(Ql,K),U(oc,V),U(ic,F),U(rc,$),U(Ki,j),U(Bn,g),U(sc,R),W(b))if(b.length){const Y=e.exposed||(e.exposed={});b.forEach(D=>{Object.defineProperty(Y,D,{get:()=>n[D],set:he=>n[D]=he})})}else e.exposed||(e.exposed={});O&&e.render===ke&&(e.render=O),I!=null&&(e.inheritAttrs=I),x&&(e.components=x),B&&(e.directives=B),R&&Xs(e)}function fc(e,t,n=ke){W(e)&&(e=As(e));for(const s in e){const r=e[s];let i;ne(r)?"default"in r?i=Ot(r.from||s,r.default,!0):i=Ot(r.from||s):i=Ot(r),fe(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function wr(e,t,n){He(W(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ji(e,t,n,s){let r=s.includes(".")?fo(n,s):()=>n[s];if(re(e)){const i=t[e];q(i)&&Fe(r,i)}else if(q(e))Fe(r,e.bind(n));else if(ne(e))if(W(e))e.forEach(i=>Ji(i,t,n,s));else{const i=q(e.handler)?e.handler.bind(n):t[e.handler];q(i)&&Fe(r,i,e)}}function Js(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(f=>Pn(c,f,o,!0)),Pn(c,t,o)),ne(t)&&i.set(t,c),c}function Pn(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&Pn(e,i,n,!0),r&&r.forEach(o=>Pn(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=uc[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const uc={data:Sr,props:xr,emits:xr,methods:$t,computed:$t,beforeCreate:_e,created:_e,beforeMount:_e,mounted:_e,beforeUpdate:_e,updated:_e,beforeDestroy:_e,beforeUnmount:_e,destroyed:_e,unmounted:_e,activated:_e,deactivated:_e,errorCaptured:_e,serverPrefetch:_e,components:$t,directives:$t,watch:hc,provide:Sr,inject:dc};function Sr(e,t){return t?e?function(){return ae(q(e)?e.call(this,this):e,q(t)?t.call(this,this):t)}:t:e}function dc(e,t){return $t(As(e),As(t))}function As(e){if(W(e)){const t={};for(let n=0;n1)return n&&q(t)?t.call(s&&s.proxy):t}}const Qi={},Zi=()=>Object.create(Qi),eo=e=>Object.getPrototypeOf(e)===Qi;function yc(e,t,n,s=!1){const r={},i=Zi();e.propsDefaults=Object.create(null),to(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:Tl(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function vc(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=J(r),[c]=e.propsOptions;let f=!1;if((s||o>0)&&!(o&16)){if(o&8){const a=e.vnode.dynamicProps;for(let h=0;h{c=!0;const[y,v]=no(h,t,!0);ae(o,y),v&&l.push(...v)};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}if(!i&&!c)return ne(e)&&s.set(e,Et),Et;if(W(i))for(let a=0;ae[0]==="_"||e==="$stable",zs=e=>W(e)?e.map(Me):[Me(e)],bc=(e,t,n)=>{if(t._n)return t;const s=Ul((...r)=>zs(t(...r)),n);return s._c=!1,s},ro=(e,t,n)=>{const s=e._ctx;for(const r in e){if(so(r))continue;const i=e[r];if(q(i))t[r]=bc(r,i,s);else if(i!=null){const o=zs(i);t[r]=()=>o}}},io=(e,t)=>{const n=zs(t);e.slots.default=()=>n},oo=(e,t,n)=>{for(const s in t)(n||s!=="_")&&(e[s]=t[s])},wc=(e,t,n)=>{const s=e.slots=Zi();if(e.vnode.shapeFlag&32){const r=t._;r?(oo(s,t,n),n&&ai(s,"_",r,!0)):ro(t,s)}else t&&io(e,t)},Sc=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=Z;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:oo(r,t,n):(i=!t.$stable,ro(t,r)),o=t}else t&&(io(e,t),o={default:1});if(i)for(const l in r)!so(l)&&o[l]==null&&delete r[l]},be=go;function xc(e){return lo(e)}function Ec(e){return lo(e,Yl)}function lo(e,t){const n=Hn();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:l,createComment:c,setText:f,setElementText:a,parentNode:h,nextSibling:y,setScopeId:v=ke,insertStaticContent:S}=e,_=(u,d,m,T=null,w=null,E=null,P=void 0,M=null,A=!!d.dynamicChildren)=>{if(u===d)return;u&&!ut(u,d)&&(T=ln(u),De(u,w,E,!0),u=null),d.patchFlag===-2&&(A=!1,d.dynamicChildren=null);const{type:C,ref:k,shapeFlag:L}=d;switch(C){case gt:K(u,d,m,T);break;case ve:N(u,d,m,T);break;case kt:u==null&&j(d,m,T,P);break;case xe:x(u,d,m,T,w,E,P,M,A);break;default:L&1?O(u,d,m,T,w,E,P,M,A):L&6?B(u,d,m,T,w,E,P,M,A):(L&64||L&128)&&C.process(u,d,m,T,w,E,P,M,A,vt)}k!=null&&w&&Xt(k,u&&u.ref,E,d||u,!d)},K=(u,d,m,T)=>{if(u==null)s(d.el=l(d.children),m,T);else{const w=d.el=u.el;d.children!==u.children&&f(w,d.children)}},N=(u,d,m,T)=>{u==null?s(d.el=c(d.children||""),m,T):d.el=u.el},j=(u,d,m,T)=>{[u.el,u.anchor]=S(u.children,d,m,T,u.el,u.anchor)},p=({el:u,anchor:d},m,T)=>{let w;for(;u&&u!==d;)w=y(u),s(u,m,T),u=w;s(d,m,T)},g=({el:u,anchor:d})=>{let m;for(;u&&u!==d;)m=y(u),r(u),u=m;r(d)},O=(u,d,m,T,w,E,P,M,A)=>{d.type==="svg"?P="svg":d.type==="math"&&(P="mathml"),u==null?F(d,m,T,w,E,P,M,A):R(u,d,w,E,P,M,A)},F=(u,d,m,T,w,E,P,M)=>{let A,C;const{props:k,shapeFlag:L,transition:H,dirs:G}=u;if(A=u.el=o(u.type,E,k&&k.is,k),L&8?a(A,u.children):L&16&&V(u.children,A,null,T,w,rs(u,E),P,M),G&&Ue(u,null,T,"created"),$(A,u,u.scopeId,P,T),k){for(const ee in k)ee!=="value"&&!Ct(ee)&&i(A,ee,null,k[ee],E,T);"value"in k&&i(A,"value",null,k.value,E),(C=k.onVnodeBeforeMount)&&Oe(C,T,u)}G&&Ue(u,null,T,"beforeMount");const X=co(w,H);X&&H.beforeEnter(A),s(A,d,m),((C=k&&k.onVnodeMounted)||X||G)&&be(()=>{C&&Oe(C,T,u),X&&H.enter(A),G&&Ue(u,null,T,"mounted")},w)},$=(u,d,m,T,w)=>{if(m&&v(u,m),T)for(let E=0;E{for(let C=A;C{const M=d.el=u.el;let{patchFlag:A,dynamicChildren:C,dirs:k}=d;A|=u.patchFlag&16;const L=u.props||Z,H=d.props||Z;let G;if(m&<(m,!1),(G=H.onVnodeBeforeUpdate)&&Oe(G,m,d,u),k&&Ue(d,u,m,"beforeUpdate"),m&<(m,!0),(L.innerHTML&&H.innerHTML==null||L.textContent&&H.textContent==null)&&a(M,""),C?b(u.dynamicChildren,C,M,m,T,rs(d,w),E):P||D(u,d,M,null,m,T,rs(d,w),E,!1),A>0){if(A&16)I(M,L,H,m,w);else if(A&2&&L.class!==H.class&&i(M,"class",null,H.class,w),A&4&&i(M,"style",L.style,H.style,w),A&8){const X=d.dynamicProps;for(let ee=0;ee{G&&Oe(G,m,d,u),k&&Ue(d,u,m,"updated")},T)},b=(u,d,m,T,w,E,P)=>{for(let M=0;M{if(d!==m){if(d!==Z)for(const E in d)!Ct(E)&&!(E in m)&&i(u,E,d[E],null,w,T);for(const E in m){if(Ct(E))continue;const P=m[E],M=d[E];P!==M&&E!=="value"&&i(u,E,M,P,w,T)}"value"in m&&i(u,"value",d.value,m.value,w)}},x=(u,d,m,T,w,E,P,M,A)=>{const C=d.el=u?u.el:l(""),k=d.anchor=u?u.anchor:l("");let{patchFlag:L,dynamicChildren:H,slotScopeIds:G}=d;G&&(M=M?M.concat(G):G),u==null?(s(C,m,T),s(k,m,T),V(d.children||[],m,k,w,E,P,M,A)):L>0&&L&64&&H&&u.dynamicChildren?(b(u.dynamicChildren,H,m,w,E,P,M),(d.key!=null||w&&d===w.subTree)&&Qs(u,d,!0)):D(u,d,m,k,w,E,P,M,A)},B=(u,d,m,T,w,E,P,M,A)=>{d.slotScopeIds=M,u==null?d.shapeFlag&512?w.ctx.activate(d,m,T,P,A):se(d,m,T,w,E,P,A):le(u,d,A)},se=(u,d,m,T,w,E,P)=>{const M=u.component=Vc(u,T,w);if(sn(u)&&(M.ctx.renderer=vt),Uc(M,!1,P),M.asyncDep){if(w&&w.registerDep(M,U,P),!u.el){const A=M.subTree=ce(ve);N(null,A,d,m)}}else U(M,u,d,m,w,E,P)},le=(u,d,m)=>{const T=d.component=u.component;if(Ic(u,d,m))if(T.asyncDep&&!T.asyncResolved){Y(T,d,m);return}else T.next=d,T.update();else d.el=u.el,T.vnode=d},U=(u,d,m,T,w,E,P)=>{const M=()=>{if(u.isMounted){let{next:L,bu:H,u:G,parent:X,vnode:ee}=u;{const Te=ao(u);if(Te){L&&(L.el=ee.el,Y(u,L,P)),Te.asyncDep.then(()=>{u.isUnmounted||M()});return}}let Q=L,Ee;lt(u,!1),L?(L.el=ee.el,Y(u,L,P)):L=ee,H&&bn(H),(Ee=L.props&&L.props.onVnodeBeforeUpdate)&&Oe(Ee,X,L,ee),lt(u,!0);const pe=is(u),Ie=u.subTree;u.subTree=pe,_(Ie,pe,h(Ie.el),ln(Ie),u,w,E),L.el=pe.el,Q===null&&ho(u,pe.el),G&&be(G,w),(Ee=L.props&&L.props.onVnodeUpdated)&&be(()=>Oe(Ee,X,L,ee),w)}else{let L;const{el:H,props:G}=d,{bm:X,m:ee,parent:Q,root:Ee,type:pe}=u,Ie=pt(d);if(lt(u,!1),X&&bn(X),!Ie&&(L=G&&G.onVnodeBeforeMount)&&Oe(L,Q,d),lt(u,!0),H&&Jn){const Te=()=>{u.subTree=is(u),Jn(H,u.subTree,u,w,null)};Ie&&pe.__asyncHydrate?pe.__asyncHydrate(H,u,Te):Te()}else{Ee.ce&&Ee.ce._injectChildStyle(pe);const Te=u.subTree=is(u);_(null,Te,m,T,u,w,E),d.el=Te.el}if(ee&&be(ee,w),!Ie&&(L=G&&G.onVnodeMounted)){const Te=d;be(()=>Oe(L,Q,Te),w)}(d.shapeFlag&256||Q&&pt(Q.vnode)&&Q.vnode.shapeFlag&256)&&u.a&&be(u.a,w),u.isMounted=!0,d=m=T=null}};u.scope.on();const A=u.effect=new pi(M);u.scope.off();const C=u.update=A.run.bind(A),k=u.job=A.runIfDirty.bind(A);k.i=u,k.id=u.uid,A.scheduler=()=>Gs(k),lt(u,!0),C()},Y=(u,d,m)=>{d.component=u;const T=u.vnode.props;u.vnode=d,u.next=null,vc(u,d.props,T,m),Sc(u,d.children,m),rt(),dr(u),it()},D=(u,d,m,T,w,E,P,M,A=!1)=>{const C=u&&u.children,k=u?u.shapeFlag:0,L=d.children,{patchFlag:H,shapeFlag:G}=d;if(H>0){if(H&128){on(C,L,m,T,w,E,P,M,A);return}else if(H&256){he(C,L,m,T,w,E,P,M,A);return}}G&8?(k&16&&It(C,w,E),L!==C&&a(m,L)):k&16?G&16?on(C,L,m,T,w,E,P,M,A):It(C,w,E,!0):(k&8&&a(m,""),G&16&&V(L,m,T,w,E,P,M,A))},he=(u,d,m,T,w,E,P,M,A)=>{u=u||Et,d=d||Et;const C=u.length,k=d.length,L=Math.min(C,k);let H;for(H=0;Hk?It(u,w,E,!0,!1,L):V(d,m,T,w,E,P,M,A,L)},on=(u,d,m,T,w,E,P,M,A)=>{let C=0;const k=d.length;let L=u.length-1,H=k-1;for(;C<=L&&C<=H;){const G=u[C],X=d[C]=A?et(d[C]):Me(d[C]);if(ut(G,X))_(G,X,m,null,w,E,P,M,A);else break;C++}for(;C<=L&&C<=H;){const G=u[L],X=d[H]=A?et(d[H]):Me(d[H]);if(ut(G,X))_(G,X,m,null,w,E,P,M,A);else break;L--,H--}if(C>L){if(C<=H){const G=H+1,X=GH)for(;C<=L;)De(u[C],w,E,!0),C++;else{const G=C,X=C,ee=new Map;for(C=X;C<=H;C++){const Ce=d[C]=A?et(d[C]):Me(d[C]);Ce.key!=null&&ee.set(Ce.key,C)}let Q,Ee=0;const pe=H-X+1;let Ie=!1,Te=0;const Nt=new Array(pe);for(C=0;C=pe){De(Ce,w,E,!0);continue}let je;if(Ce.key!=null)je=ee.get(Ce.key);else for(Q=X;Q<=H;Q++)if(Nt[Q-X]===0&&ut(Ce,d[Q])){je=Q;break}je===void 0?De(Ce,w,E,!0):(Nt[je-X]=C+1,je>=Te?Te=je:Ie=!0,_(Ce,d[je],m,null,w,E,P,M,A),Ee++)}const lr=Ie?Tc(Nt):Et;for(Q=lr.length-1,C=pe-1;C>=0;C--){const Ce=X+C,je=d[Ce],cr=Ce+1{const{el:E,type:P,transition:M,children:A,shapeFlag:C}=u;if(C&6){ot(u.component.subTree,d,m,T);return}if(C&128){u.suspense.move(d,m,T);return}if(C&64){P.move(u,d,m,vt);return}if(P===xe){s(E,d,m);for(let L=0;LM.enter(E),w);else{const{leave:L,delayLeave:H,afterLeave:G}=M,X=()=>s(E,d,m),ee=()=>{L(E,()=>{X(),G&&G()})};H?H(E,X,ee):ee()}else s(E,d,m)},De=(u,d,m,T=!1,w=!1)=>{const{type:E,props:P,ref:M,children:A,dynamicChildren:C,shapeFlag:k,patchFlag:L,dirs:H,cacheIndex:G}=u;if(L===-2&&(w=!1),M!=null&&Xt(M,null,m,u,!0),G!=null&&(d.renderCache[G]=void 0),k&256){d.ctx.deactivate(u);return}const X=k&1&&H,ee=!pt(u);let Q;if(ee&&(Q=P&&P.onVnodeBeforeUnmount)&&Oe(Q,d,u),k&6)Wo(u.component,m,T);else{if(k&128){u.suspense.unmount(m,T);return}X&&Ue(u,null,d,"beforeUnmount"),k&64?u.type.remove(u,d,m,vt,T):C&&!C.hasOnce&&(E!==xe||L>0&&L&64)?It(C,d,m,!1,!0):(E===xe&&L&384||!w&&k&16)&&It(A,d,m),T&&ir(u)}(ee&&(Q=P&&P.onVnodeUnmounted)||X)&&be(()=>{Q&&Oe(Q,d,u),X&&Ue(u,null,d,"unmounted")},m)},ir=u=>{const{type:d,el:m,anchor:T,transition:w}=u;if(d===xe){Bo(m,T);return}if(d===kt){g(u);return}const E=()=>{r(m),w&&!w.persisted&&w.afterLeave&&w.afterLeave()};if(u.shapeFlag&1&&w&&!w.persisted){const{leave:P,delayLeave:M}=w,A=()=>P(m,E);M?M(u.el,E,A):A()}else E()},Bo=(u,d)=>{let m;for(;u!==d;)m=y(u),r(u),u=m;r(d)},Wo=(u,d,m)=>{const{bum:T,scope:w,job:E,subTree:P,um:M,m:A,a:C}=u;Tr(A),Tr(C),T&&bn(T),w.stop(),E&&(E.flags|=8,De(P,u,d,m)),M&&be(M,d),be(()=>{u.isUnmounted=!0},d),d&&d.pendingBranch&&!d.isUnmounted&&u.asyncDep&&!u.asyncResolved&&u.suspenseId===d.pendingId&&(d.deps--,d.deps===0&&d.resolve())},It=(u,d,m,T=!1,w=!1,E=0)=>{for(let P=E;P{if(u.shapeFlag&6)return ln(u.component.subTree);if(u.shapeFlag&128)return u.suspense.next();const d=y(u.anchor||u.el),m=d&&d[Fi];return m?y(m):d};let Yn=!1;const or=(u,d,m)=>{u==null?d._vnode&&De(d._vnode,null,null,!0):_(d._vnode||null,u,d,null,null,null,m),d._vnode=u,Yn||(Yn=!0,dr(),On(),Yn=!1)},vt={p:_,um:De,m:ot,r:ir,mt:se,mc:V,pc:D,pbc:b,n:ln,o:e};let Xn,Jn;return t&&([Xn,Jn]=t(vt)),{render:or,hydrate:Xn,createApp:gc(or,Xn)}}function rs({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function lt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function co(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Qs(e,t,n=!1){const s=e.children,r=t.children;if(W(s)&&W(r))for(let i=0;i>1,e[n[l]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function ao(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ao(t)}function Tr(e){if(e)for(let t=0;tOt(Cc);function Zs(e,t){return Wn(e,null,t)}function Rf(e,t){return Wn(e,null,{flush:"post"})}function Fe(e,t,n){return Wn(e,t,n)}function Wn(e,t,n=Z){const{immediate:s,deep:r,flush:i,once:o}=n,l=ae({},n),c=t&&s||!t&&i!=="post";let f;if(Mt){if(i==="sync"){const v=Ac();f=v.__watcherHandles||(v.__watcherHandles=[])}else if(!c){const v=()=>{};return v.stop=ke,v.resume=ke,v.pause=ke,v}}const a=ue;l.call=(v,S,_)=>He(v,a,S,_);let h=!1;i==="post"?l.scheduler=v=>{be(v,a&&a.suspense)}:i!=="sync"&&(h=!0,l.scheduler=(v,S)=>{S?v():Gs(v)}),l.augmentJob=v=>{t&&(v.flags|=4),h&&(v.flags|=2,a&&(v.id=a.uid,v.i=a))};const y=$l(e,t,l);return Mt&&(f?f.push(y):c&&y()),y}function Rc(e,t,n){const s=this.proxy,r=re(e)?e.includes(".")?fo(s,e):()=>s[e]:e.bind(s,s);let i;q(t)?i=t:(i=t.handler,n=t);const o=rn(this),l=Wn(r,i.bind(s),n);return o(),l}function fo(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;rt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Le(t)}Modifiers`]||e[`${st(t)}Modifiers`];function Mc(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Z;let r=n;const i=t.startsWith("update:"),o=i&&Oc(s,t.slice(7));o&&(o.trim&&(r=n.map(a=>re(a)?a.trim():a)),o.number&&(r=n.map(vs)));let l,c=s[l=_n(t)]||s[l=_n(Le(t))];!c&&i&&(c=s[l=_n(st(t))]),c&&He(c,e,6,r);const f=s[l+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,He(f,e,6,r)}}function uo(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!q(e)){const c=f=>{const a=uo(f,t,!0);a&&(l=!0,ae(o,a))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(ne(e)&&s.set(e,null),null):(W(i)?i.forEach(c=>o[c]=null):ae(o,i),ne(e)&&s.set(e,o),o)}function Kn(e,t){return!e||!en(t)?!1:(t=t.slice(2).replace(/Once$/,""),z(e,t[0].toLowerCase()+t.slice(1))||z(e,st(t))||z(e,t))}function is(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:l,emit:c,render:f,renderCache:a,props:h,data:y,setupState:v,ctx:S,inheritAttrs:_}=e,K=Mn(e);let N,j;try{if(n.shapeFlag&4){const g=r||s,O=g;N=Me(f.call(O,g,a,h,v,y,S)),j=l}else{const g=t;N=Me(g.length>1?g(h,{attrs:l,slots:o,emit:c}):g(h,null)),j=t.props?l:Pc(l)}}catch(g){Bt.length=0,nn(g,e,1),N=ce(ve)}let p=N;if(j&&_!==!1){const g=Object.keys(j),{shapeFlag:O}=p;g.length&&O&7&&(i&&g.some(Fs)&&(j=Lc(j,i)),p=nt(p,j,!1,!0))}return n.dirs&&(p=nt(p,null,!1,!0),p.dirs=p.dirs?p.dirs.concat(n.dirs):n.dirs),n.transition&&Yt(p,n.transition),N=p,Mn(K),N}const Pc=e=>{let t;for(const n in e)(n==="class"||n==="style"||en(n))&&((t||(t={}))[n]=e[n]);return t},Lc=(e,t)=>{const n={};for(const s in e)(!Fs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Ic(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:l,patchFlag:c}=t,f=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?Cr(s,o,f):!!o;if(c&8){const a=t.dynamicProps;for(let h=0;he.__isSuspense;function go(e,t){t&&t.pendingBranch?W(e)?t.effects.push(...e):t.effects.push(e):Vl(e)}const xe=Symbol.for("v-fgt"),gt=Symbol.for("v-txt"),ve=Symbol.for("v-cmt"),kt=Symbol.for("v-stc"),Bt=[];let Ae=null;function Os(e=!1){Bt.push(Ae=e?null:[])}function Nc(){Bt.pop(),Ae=Bt[Bt.length-1]||null}let Jt=1;function Ar(e,t=!1){Jt+=e,e<0&&Ae&&t&&(Ae.hasOnce=!0)}function mo(e){return e.dynamicChildren=Jt>0?Ae||Et:null,Nc(),Jt>0&&Ae&&Ae.push(e),e}function Of(e,t,n,s,r,i){return mo(vo(e,t,n,s,r,i,!0))}function Ms(e,t,n,s,r){return mo(ce(e,t,n,s,r,!0))}function zt(e){return e?e.__v_isVNode===!0:!1}function ut(e,t){return e.type===t.type&&e.key===t.key}const yo=({key:e})=>e??null,xn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?re(e)||fe(e)||q(e)?{i:de,r:e,k:t,f:!!n}:e:null);function vo(e,t=null,n=null,s=0,r=null,i=e===xe?0:1,o=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&yo(t),ref:t&&xn(t),scopeId:Ni,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:de};return l?(er(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=re(n)?8:16),Jt>0&&!o&&Ae&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&Ae.push(c),c}const ce=Fc;function Fc(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===Gi)&&(e=ve),zt(e)){const l=nt(e,t,!0);return n&&er(l,n),Jt>0&&!i&&Ae&&(l.shapeFlag&6?Ae[Ae.indexOf(e)]=l:Ae.push(l)),l.patchFlag=-2,l}if(Kc(e)&&(e=e.__vccOpts),t){t=Hc(t);let{class:l,style:c}=t;l&&!re(l)&&(t.class=js(l)),ne(c)&&(Ks(c)&&!W(c)&&(c=ae({},c)),t.style=Ds(c))}const o=re(e)?1:po(e)?128:Hi(e)?64:ne(e)?4:q(e)?2:0;return vo(e,t,n,s,r,o,i,!0)}function Hc(e){return e?Ks(e)||eo(e)?ae({},e):e:null}function nt(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:l,transition:c}=e,f=t?$c(r||{},t):r,a={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&yo(f),ref:t&&t.ref?n&&i?W(i)?i.concat(xn(t)):[i,xn(t)]:xn(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==xe?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&nt(e.ssContent),ssFallback:e.ssFallback&&nt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&Yt(a,c.clone(a)),a}function _o(e=" ",t=0){return ce(gt,null,e,t)}function Mf(e,t){const n=ce(kt,null,e);return n.staticCount=t,n}function Pf(e="",t=!1){return t?(Os(),Ms(ve,null,e)):ce(ve,null,e)}function Me(e){return e==null||typeof e=="boolean"?ce(ve):W(e)?ce(xe,null,e.slice()):zt(e)?et(e):ce(gt,null,String(e))}function et(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:nt(e)}function er(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(W(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),er(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!eo(t)?t._ctx=de:r===3&&de&&(de.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else q(t)?(t={default:t,_ctx:de},n=32):(t=String(t),s&64?(n=16,t=[_o(t)]):n=8);e.children=t,e.shapeFlag|=n}function $c(...e){const t={};for(let n=0;nue||de;let Ln,Ps;{const e=Hn(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};Ln=t("__VUE_INSTANCE_SETTERS__",n=>ue=n),Ps=t("__VUE_SSR_SETTERS__",n=>Mt=n)}const rn=e=>{const t=ue;return Ln(e),e.scope.on(),()=>{e.scope.off(),Ln(t)}},Rr=()=>{ue&&ue.scope.off(),Ln(null)};function bo(e){return e.vnode.shapeFlag&4}let Mt=!1;function Uc(e,t=!1,n=!1){t&&Ps(t);const{props:s,children:r}=e.vnode,i=bo(e);yc(e,s,i,t),wc(e,r,n);const o=i?kc(e,t):void 0;return t&&Ps(!1),o}function kc(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,lc);const{setup:s}=n;if(s){rt();const r=e.setupContext=s.length>1?So(e):null,i=rn(e),o=tn(s,e,0,[e.props,r]),l=oi(o);if(it(),i(),(l||e.sp)&&!pt(e)&&Xs(e),l){if(o.then(Rr,Rr),t)return o.then(c=>{Or(e,c,t)}).catch(c=>{nn(c,e,0)});e.asyncDep=o}else Or(e,o,t)}else wo(e,t)}function Or(e,t,n){q(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ne(t)&&(e.setupState=Mi(t)),wo(e,n)}let Mr;function wo(e,t,n){const s=e.type;if(!e.render){if(!t&&Mr&&!s.render){const r=s.template||Js(e).template;if(r){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:l,compilerOptions:c}=s,f=ae(ae({isCustomElement:i,delimiters:l},o),c);s.render=Mr(r,f)}}e.render=s.render||ke}{const r=rn(e);rt();try{ac(e)}finally{it(),r()}}}const Bc={get(e,t){return me(e,"get",""),e[t]}};function So(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Bc),slots:e.slots,emit:e.emit,expose:t}}function Gn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Mi(wn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Ut)return Ut[n](e)},has(t,n){return n in t||n in Ut}})):e.proxy}function Wc(e,t=!0){return q(e)?e.displayName||e.name:e.name||t&&e.__name}function Kc(e){return q(e)&&"__vccOpts"in e}const ie=(e,t)=>Fl(e,t,Mt);function Ls(e,t,n){const s=arguments.length;return s===2?ne(t)&&!W(t)?zt(t)?ce(e,null,[t]):ce(e,t):ce(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&zt(n)&&(n=[n]),ce(e,t,n))}const qc="3.5.13";/** +* @vue/runtime-dom v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Is;const Pr=typeof window<"u"&&window.trustedTypes;if(Pr)try{Is=Pr.createPolicy("vue",{createHTML:e=>e})}catch{}const xo=Is?e=>Is.createHTML(e):e=>e,Gc="http://www.w3.org/2000/svg",Yc="http://www.w3.org/1998/Math/MathML",qe=typeof document<"u"?document:null,Lr=qe&&qe.createElement("template"),Xc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?qe.createElementNS(Gc,e):t==="mathml"?qe.createElementNS(Yc,e):n?qe.createElement(e,{is:n}):qe.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>qe.createTextNode(e),createComment:e=>qe.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>qe.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Lr.innerHTML=xo(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=Lr.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ze="transition",Ht="animation",Qt=Symbol("_vtc"),Eo={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Jc=ae({},ji,Eo),zc=e=>(e.displayName="Transition",e.props=Jc,e),Lf=zc((e,{slots:t})=>Ls(Kl,Qc(e),t)),ct=(e,t=[])=>{W(e)?e.forEach(n=>n(...t)):e&&e(...t)},Ir=e=>e?W(e)?e.some(t=>t.length>1):e.length>1:!1;function Qc(e){const t={};for(const x in e)x in Eo||(t[x]=e[x]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:f=o,appearToClass:a=l,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:y=`${n}-leave-active`,leaveToClass:v=`${n}-leave-to`}=e,S=Zc(r),_=S&&S[0],K=S&&S[1],{onBeforeEnter:N,onEnter:j,onEnterCancelled:p,onLeave:g,onLeaveCancelled:O,onBeforeAppear:F=N,onAppear:$=j,onAppearCancelled:V=p}=t,R=(x,B,se,le)=>{x._enterCancelled=le,at(x,B?a:l),at(x,B?f:o),se&&se()},b=(x,B)=>{x._isLeaving=!1,at(x,h),at(x,v),at(x,y),B&&B()},I=x=>(B,se)=>{const le=x?$:j,U=()=>R(B,x,se);ct(le,[B,U]),Nr(()=>{at(B,x?c:i),Ke(B,x?a:l),Ir(le)||Fr(B,s,_,U)})};return ae(t,{onBeforeEnter(x){ct(N,[x]),Ke(x,i),Ke(x,o)},onBeforeAppear(x){ct(F,[x]),Ke(x,c),Ke(x,f)},onEnter:I(!1),onAppear:I(!0),onLeave(x,B){x._isLeaving=!0;const se=()=>b(x,B);Ke(x,h),x._enterCancelled?(Ke(x,y),Dr()):(Dr(),Ke(x,y)),Nr(()=>{x._isLeaving&&(at(x,h),Ke(x,v),Ir(g)||Fr(x,s,K,se))}),ct(g,[x,se])},onEnterCancelled(x){R(x,!1,void 0,!0),ct(p,[x])},onAppearCancelled(x){R(x,!0,void 0,!0),ct(V,[x])},onLeaveCancelled(x){b(x),ct(O,[x])}})}function Zc(e){if(e==null)return null;if(ne(e))return[os(e.enter),os(e.leave)];{const t=os(e);return[t,t]}}function os(e){return Jo(e)}function Ke(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Qt]||(e[Qt]=new Set)).add(t)}function at(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Qt];n&&(n.delete(t),n.size||(e[Qt]=void 0))}function Nr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ea=0;function Fr(e,t,n,s){const r=e._endId=++ea,i=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:l,propCount:c}=ta(e,t);if(!o)return s();const f=o+"end";let a=0;const h=()=>{e.removeEventListener(f,y),i()},y=v=>{v.target===e&&++a>=c&&h()};setTimeout(()=>{a(n[S]||"").split(", "),r=s(`${ze}Delay`),i=s(`${ze}Duration`),o=Hr(r,i),l=s(`${Ht}Delay`),c=s(`${Ht}Duration`),f=Hr(l,c);let a=null,h=0,y=0;t===ze?o>0&&(a=ze,h=o,y=i.length):t===Ht?f>0&&(a=Ht,h=f,y=c.length):(h=Math.max(o,f),a=h>0?o>f?ze:Ht:null,y=a?a===ze?i.length:c.length:0);const v=a===ze&&/\b(transform|all)(,|$)/.test(s(`${ze}Property`).toString());return{type:a,timeout:h,propCount:y,hasTransform:v}}function Hr(e,t){for(;e.length$r(n)+$r(e[s])))}function $r(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Dr(){return document.body.offsetHeight}function na(e,t,n){const s=e[Qt];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const jr=Symbol("_vod"),sa=Symbol("_vsh"),ra=Symbol(""),ia=/(^|;)\s*display\s*:/;function oa(e,t,n){const s=e.style,r=re(n);let i=!1;if(n&&!r){if(t)if(re(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&En(s,l,"")}else for(const o in t)n[o]==null&&En(s,o,"");for(const o in n)o==="display"&&(i=!0),En(s,o,n[o])}else if(r){if(t!==n){const o=s[ra];o&&(n+=";"+o),s.cssText=n,i=ia.test(n)}}else t&&e.removeAttribute("style");jr in e&&(e[jr]=i?s.display:"",e[sa]&&(s.display="none"))}const Vr=/\s*!important$/;function En(e,t,n){if(W(n))n.forEach(s=>En(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=la(e,t);Vr.test(n)?e.setProperty(st(s),n.replace(Vr,""),"important"):e[s]=n}}const Ur=["Webkit","Moz","ms"],ls={};function la(e,t){const n=ls[t];if(n)return n;let s=Le(t);if(s!=="filter"&&s in e)return ls[t]=s;s=Fn(s);for(let r=0;rcs||(ua.then(()=>cs=0),cs=Date.now());function ha(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;He(pa(s,n.value),t,5,[s])};return n.value=e,n.attached=da(),n}function pa(e,t){if(W(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const Gr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ga=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?na(e,s,o):t==="style"?oa(e,n,s):en(t)?Fs(t)||aa(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ma(e,t,s,o))?(Wr(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Br(e,t,s,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!re(s))?Wr(e,Le(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Br(e,t,s,o))};function ma(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Gr(t)&&q(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Gr(t)&&re(n)?!1:t in e}const Yr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return W(t)?n=>bn(t,n):t};function ya(e){e.target.composing=!0}function Xr(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const as=Symbol("_assign"),If={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[as]=Yr(r);const i=s||r.props&&r.props.type==="number";St(e,t?"change":"input",o=>{if(o.target.composing)return;let l=e.value;n&&(l=l.trim()),i&&(l=vs(l)),e[as](l)}),n&&St(e,"change",()=>{e.value=e.value.trim()}),t||(St(e,"compositionstart",ya),St(e,"compositionend",Xr),St(e,"change",Xr))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[as]=Yr(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?vs(e.value):e.value,c=t??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c))}},va=["ctrl","shift","alt","meta"],_a={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>va.some(n=>e[`${n}Key`]&&!t.includes(n))},Nf=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const i=st(r.key);if(t.some(o=>o===i||ba[o]===i))return e(r)})},To=ae({patchProp:ga},Xc);let Wt,Jr=!1;function wa(){return Wt||(Wt=xc(To))}function Sa(){return Wt=Jr?Wt:Ec(To),Jr=!0,Wt}const Hf=(...e)=>{const t=wa().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Ao(s);if(!r)return;const i=t._component;!q(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,Co(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t},$f=(...e)=>{const t=Sa().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Ao(s);if(r)return n(r,!0,Co(r))},t};function Co(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ao(e){return re(e)?document.querySelector(e):e}const Df=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},xa=window.__VP_SITE_DATA__;function tr(e){return hi()?(il(e),!0):!1}function Be(e){return typeof e=="function"?e():Oi(e)}const Ro=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const jf=e=>e!=null,Ea=Object.prototype.toString,Ta=e=>Ea.call(e)==="[object Object]",Zt=()=>{},zr=Ca();function Ca(){var e,t;return Ro&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Aa(e,t){function n(...s){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,s),{fn:t,thisArg:this,args:s})).then(r).catch(i)})}return n}const Oo=e=>e();function Ra(e,t={}){let n,s,r=Zt;const i=l=>{clearTimeout(l),r(),r=Zt};return l=>{const c=Be(e),f=Be(t.maxWait);return n&&i(n),c<=0||f!==void 0&&f<=0?(s&&(i(s),s=null),Promise.resolve(l())):new Promise((a,h)=>{r=t.rejectOnCancel?h:a,f&&!s&&(s=setTimeout(()=>{n&&i(n),s=null,a(l())},f)),n=setTimeout(()=>{s&&i(s),s=null,a(l())},c)})}}function Oa(e=Oo){const t=oe(!0);function n(){t.value=!1}function s(){t.value=!0}const r=(...i)=>{t.value&&e(...i)};return{isActive:Vn(t),pause:n,resume:s,eventFilter:r}}function Ma(e){return qn()}function Mo(...e){if(e.length!==1)return Ll(...e);const t=e[0];return typeof t=="function"?Vn(Ol(()=>({get:t,set:Zt}))):oe(t)}function Po(e,t,n={}){const{eventFilter:s=Oo,...r}=n;return Fe(e,Aa(s,t),r)}function Pa(e,t,n={}){const{eventFilter:s,...r}=n,{eventFilter:i,pause:o,resume:l,isActive:c}=Oa(s);return{stop:Po(e,t,{...r,eventFilter:i}),pause:o,resume:l,isActive:c}}function nr(e,t=!0,n){Ma()?Lt(e,n):t?e():Un(e)}function Vf(e,t,n={}){const{debounce:s=0,maxWait:r=void 0,...i}=n;return Po(e,t,{...i,eventFilter:Ra(s,{maxWait:r})})}function Uf(e,t,n){let s;fe(n)?s={evaluating:n}:s={};const{lazy:r=!1,evaluating:i=void 0,shallow:o=!0,onError:l=Zt}=s,c=oe(!r),f=o?qs(t):oe(t);let a=0;return Zs(async h=>{if(!c.value)return;a++;const y=a;let v=!1;i&&Promise.resolve().then(()=>{i.value=!0});try{const S=await e(_=>{h(()=>{i&&(i.value=!1),v||_()})});y===a&&(f.value=S)}catch(S){l(S)}finally{i&&y===a&&(i.value=!1),v=!0}}),r?ie(()=>(c.value=!0,f.value)):f}const $e=Ro?window:void 0;function Lo(e){var t;const n=Be(e);return(t=n==null?void 0:n.$el)!=null?t:n}function Pt(...e){let t,n,s,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,s,r]=e,t=$e):[t,n,s,r]=e,!t)return Zt;Array.isArray(n)||(n=[n]),Array.isArray(s)||(s=[s]);const i=[],o=()=>{i.forEach(a=>a()),i.length=0},l=(a,h,y,v)=>(a.addEventListener(h,y,v),()=>a.removeEventListener(h,y,v)),c=Fe(()=>[Lo(t),Be(r)],([a,h])=>{if(o(),!a)return;const y=Ta(h)?{...h}:h;i.push(...n.flatMap(v=>s.map(S=>l(a,v,S,y))))},{immediate:!0,flush:"post"}),f=()=>{c(),o()};return tr(f),f}function La(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function kf(...e){let t,n,s={};e.length===3?(t=e[0],n=e[1],s=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],s=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:r=$e,eventName:i="keydown",passive:o=!1,dedupe:l=!1}=s,c=La(t);return Pt(r,i,a=>{a.repeat&&Be(l)||c(a)&&n(a)},o)}function Ia(){const e=oe(!1),t=qn();return t&&Lt(()=>{e.value=!0},t),e}function Na(e){const t=Ia();return ie(()=>(t.value,!!e()))}function Io(e,t={}){const{window:n=$e}=t,s=Na(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let r;const i=oe(!1),o=f=>{i.value=f.matches},l=()=>{r&&("removeEventListener"in r?r.removeEventListener("change",o):r.removeListener(o))},c=Zs(()=>{s.value&&(l(),r=n.matchMedia(Be(e)),"addEventListener"in r?r.addEventListener("change",o):r.addListener(o),i.value=r.matches)});return tr(()=>{c(),l(),r=void 0}),i}const gn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},mn="__vueuse_ssr_handlers__",Fa=Ha();function Ha(){return mn in gn||(gn[mn]=gn[mn]||{}),gn[mn]}function No(e,t){return Fa[e]||t}function sr(e){return Io("(prefers-color-scheme: dark)",e)}function $a(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Da={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Qr="vueuse-storage";function rr(e,t,n,s={}){var r;const{flush:i="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:f=!1,shallow:a,window:h=$e,eventFilter:y,onError:v=b=>{console.error(b)},initOnMounted:S}=s,_=(a?qs:oe)(typeof t=="function"?t():t);if(!n)try{n=No("getDefaultStorage",()=>{var b;return(b=$e)==null?void 0:b.localStorage})()}catch(b){v(b)}if(!n)return _;const K=Be(t),N=$a(K),j=(r=s.serializer)!=null?r:Da[N],{pause:p,resume:g}=Pa(_,()=>F(_.value),{flush:i,deep:o,eventFilter:y});h&&l&&nr(()=>{n instanceof Storage?Pt(h,"storage",V):Pt(h,Qr,R),S&&V()}),S||V();function O(b,I){if(h){const x={key:e,oldValue:b,newValue:I,storageArea:n};h.dispatchEvent(n instanceof Storage?new StorageEvent("storage",x):new CustomEvent(Qr,{detail:x}))}}function F(b){try{const I=n.getItem(e);if(b==null)O(I,null),n.removeItem(e);else{const x=j.write(b);I!==x&&(n.setItem(e,x),O(I,x))}}catch(I){v(I)}}function $(b){const I=b?b.newValue:n.getItem(e);if(I==null)return c&&K!=null&&n.setItem(e,j.write(K)),K;if(!b&&f){const x=j.read(I);return typeof f=="function"?f(x,K):N==="object"&&!Array.isArray(x)?{...K,...x}:x}else return typeof I!="string"?I:j.read(I)}function V(b){if(!(b&&b.storageArea!==n)){if(b&&b.key==null){_.value=K;return}if(!(b&&b.key!==e)){p();try{(b==null?void 0:b.newValue)!==j.write(_.value)&&(_.value=$(b))}catch(I){v(I)}finally{b?Un(g):g()}}}}function R(b){V(b.detail)}return _}const ja="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function Va(e={}){const{selector:t="html",attribute:n="class",initialValue:s="auto",window:r=$e,storage:i,storageKey:o="vueuse-color-scheme",listenToStorageChanges:l=!0,storageRef:c,emitAuto:f,disableTransition:a=!0}=e,h={auto:"",light:"light",dark:"dark",...e.modes||{}},y=sr({window:r}),v=ie(()=>y.value?"dark":"light"),S=c||(o==null?Mo(s):rr(o,s,i,{window:r,listenToStorageChanges:l})),_=ie(()=>S.value==="auto"?v.value:S.value),K=No("updateHTMLAttrs",(g,O,F)=>{const $=typeof g=="string"?r==null?void 0:r.document.querySelector(g):Lo(g);if(!$)return;const V=new Set,R=new Set;let b=null;if(O==="class"){const x=F.split(/\s/g);Object.values(h).flatMap(B=>(B||"").split(/\s/g)).filter(Boolean).forEach(B=>{x.includes(B)?V.add(B):R.add(B)})}else b={key:O,value:F};if(V.size===0&&R.size===0&&b===null)return;let I;a&&(I=r.document.createElement("style"),I.appendChild(document.createTextNode(ja)),r.document.head.appendChild(I));for(const x of V)$.classList.add(x);for(const x of R)$.classList.remove(x);b&&$.setAttribute(b.key,b.value),a&&(r.getComputedStyle(I).opacity,document.head.removeChild(I))});function N(g){var O;K(t,n,(O=h[g])!=null?O:g)}function j(g){e.onChanged?e.onChanged(g,N):N(g)}Fe(_,j,{flush:"post",immediate:!0}),nr(()=>j(_.value));const p=ie({get(){return f?S.value:_.value},set(g){S.value=g}});try{return Object.assign(p,{store:S,system:v,state:_})}catch{return p}}function Ua(e={}){const{valueDark:t="dark",valueLight:n="",window:s=$e}=e,r=Va({...e,onChanged:(l,c)=>{var f;e.onChanged?(f=e.onChanged)==null||f.call(e,l==="dark",c,l):c(l)},modes:{dark:t,light:n}}),i=ie(()=>r.system?r.system.value:sr({window:s}).value?"dark":"light");return ie({get(){return r.value==="dark"},set(l){const c=l?"dark":"light";i.value===c?r.value="auto":r.value=c}})}function fs(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function Bf(e,t,n={}){const{window:s=$e}=n;return rr(e,t,s==null?void 0:s.localStorage,n)}function Fo(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.preventDefault(),!1)}const us=new WeakMap;function Wf(e,t=!1){const n=oe(t);let s=null,r="";Fe(Mo(e),l=>{const c=fs(Be(l));if(c){const f=c;if(us.get(f)||us.set(f,f.style.overflow),f.style.overflow!=="hidden"&&(r=f.style.overflow),f.style.overflow==="hidden")return n.value=!0;if(n.value)return f.style.overflow="hidden"}},{immediate:!0});const i=()=>{const l=fs(Be(e));!l||n.value||(zr&&(s=Pt(l,"touchmove",c=>{ka(c)},{passive:!1})),l.style.overflow="hidden",n.value=!0)},o=()=>{const l=fs(Be(e));!l||!n.value||(zr&&(s==null||s()),l.style.overflow=r,us.delete(l),n.value=!1)};return tr(o),ie({get(){return n.value},set(l){l?i():o()}})}function Kf(e,t,n={}){const{window:s=$e}=n;return rr(e,t,s==null?void 0:s.sessionStorage,n)}function qf(e={}){const{window:t=$e,behavior:n="auto"}=e;if(!t)return{x:oe(0),y:oe(0)};const s=oe(t.scrollX),r=oe(t.scrollY),i=ie({get(){return s.value},set(l){scrollTo({left:l,behavior:n})}}),o=ie({get(){return r.value},set(l){scrollTo({top:l,behavior:n})}});return Pt(t,"scroll",()=>{s.value=t.scrollX,r.value=t.scrollY},{capture:!1,passive:!0}),{x:i,y:o}}function Gf(e={}){const{window:t=$e,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:s=Number.POSITIVE_INFINITY,listenOrientation:r=!0,includeScrollbar:i=!0,type:o="inner"}=e,l=oe(n),c=oe(s),f=()=>{t&&(o==="outer"?(l.value=t.outerWidth,c.value=t.outerHeight):i?(l.value=t.innerWidth,c.value=t.innerHeight):(l.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight))};if(f(),nr(f),Pt("resize",f,{passive:!0}),r){const a=Io("(orientation: portrait)");Fe(a,()=>f())}return{width:l,height:c}}const ds={BASE_URL:"/YAXArrays.jl/previews/PR477/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};var hs={};const Ho=/^(?:[a-z]+:|\/\/)/i,Ba="vitepress-theme-appearance",Wa=/#.*$/,Ka=/[?#].*$/,qa=/(?:(^|\/)index)?\.(?:md|html)$/,ge=typeof document<"u",$o={relativePath:"404.md",filePath:"",title:"404",description:"Not Found",headers:[],frontmatter:{sidebar:!1,layout:"page"},lastUpdated:0,isNotFound:!0};function Ga(e,t,n=!1){if(t===void 0)return!1;if(e=Zr(`/${e}`),n)return new RegExp(t).test(e);if(Zr(t)!==e)return!1;const s=t.match(Wa);return s?(ge?location.hash:"")===s[0]:!0}function Zr(e){return decodeURI(e).replace(Ka,"").replace(qa,"$1")}function Ya(e){return Ho.test(e)}function Xa(e,t){return Object.keys((e==null?void 0:e.locales)||{}).find(n=>n!=="root"&&!Ya(n)&&Ga(t,`/${n}/`,!0))||"root"}function Ja(e,t){var s,r,i,o,l,c,f;const n=Xa(e,t);return Object.assign({},e,{localeIndex:n,lang:((s=e.locales[n])==null?void 0:s.lang)??e.lang,dir:((r=e.locales[n])==null?void 0:r.dir)??e.dir,title:((i=e.locales[n])==null?void 0:i.title)??e.title,titleTemplate:((o=e.locales[n])==null?void 0:o.titleTemplate)??e.titleTemplate,description:((l=e.locales[n])==null?void 0:l.description)??e.description,head:jo(e.head,((c=e.locales[n])==null?void 0:c.head)??[]),themeConfig:{...e.themeConfig,...(f=e.locales[n])==null?void 0:f.themeConfig}})}function Do(e,t){const n=t.title||e.title,s=t.titleTemplate??e.titleTemplate;if(typeof s=="string"&&s.includes(":title"))return s.replace(/:title/g,n);const r=za(e.title,s);return n===r.slice(3)?n:`${n}${r}`}function za(e,t){return t===!1?"":t===!0||t===void 0?` | ${e}`:e===t?"":` | ${t}`}function Qa(e,t){const[n,s]=t;if(n!=="meta")return!1;const r=Object.entries(s)[0];return r==null?!1:e.some(([i,o])=>i===n&&o[r[0]]===r[1])}function jo(e,t){return[...e.filter(n=>!Qa(t,n)),...t]}const Za=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,ef=/^[a-z]:/i;function ei(e){const t=ef.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(Za,"_").replace(/(^|\/)_+(?=[^/]*$)/,"$1")}const ps=new Set;function tf(e){if(ps.size===0){const n=typeof process=="object"&&(hs==null?void 0:hs.VITE_EXTRA_EXTENSIONS)||(ds==null?void 0:ds.VITE_EXTRA_EXTENSIONS)||"";("3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,yaml,yml,zip"+(n&&typeof n=="string"?","+n:"")).split(",").forEach(s=>ps.add(s))}const t=e.split(".").pop();return t==null||!ps.has(t.toLowerCase())}function Yf(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const nf=Symbol(),mt=qs(xa);function Xf(e){const t=ie(()=>Ja(mt.value,e.data.relativePath)),n=t.value.appearance,s=n==="force-dark"?oe(!0):n==="force-auto"?sr():n?Ua({storageKey:Ba,initialValue:()=>n==="dark"?"dark":"auto",...typeof n=="object"?n:{}}):oe(!1),r=oe(ge?location.hash:"");return ge&&window.addEventListener("hashchange",()=>{r.value=location.hash}),Fe(()=>e.data,()=>{r.value=ge?location.hash:""}),{site:t,theme:ie(()=>t.value.themeConfig),page:ie(()=>e.data),frontmatter:ie(()=>e.data.frontmatter),params:ie(()=>e.data.params),lang:ie(()=>t.value.lang),dir:ie(()=>e.data.frontmatter.dir||t.value.dir),localeIndex:ie(()=>t.value.localeIndex||"root"),title:ie(()=>Do(t.value,e.data)),description:ie(()=>e.data.description||t.value.description),isDark:s,hash:ie(()=>r.value)}}function sf(){const e=Ot(nf);if(!e)throw new Error("vitepress data not properly injected in app");return e}function rf(e,t){return`${e}${t}`.replace(/\/+/g,"/")}function ti(e){return Ho.test(e)||!e.startsWith("/")?e:rf(mt.value.base,e)}function of(e){let t=e.replace(/\.html$/,"");if(t=decodeURIComponent(t),t=t.replace(/\/$/,"/index"),ge){const n="/YAXArrays.jl/previews/PR477/";t=ei(t.slice(n.length).replace(/\//g,"_")||"index")+".md";let s=__VP_HASH_MAP__[t.toLowerCase()];if(s||(t=t.endsWith("_index.md")?t.slice(0,-9)+".md":t.slice(0,-3)+"_index.md",s=__VP_HASH_MAP__[t.toLowerCase()]),!s)return null;t=`${n}assets/${t}.${s}.js`}else t=`./${ei(t.slice(1).replace(/\//g,"_"))}.md.js`;return t}let Tn=[];function Jf(e){Tn.push(e),Bn(()=>{Tn=Tn.filter(t=>t!==e)})}function lf(){let e=mt.value.scrollOffset,t=0,n=24;if(typeof e=="object"&&"padding"in e&&(n=e.padding,e=e.selector),typeof e=="number")t=e;else if(typeof e=="string")t=ni(e,n);else if(Array.isArray(e))for(const s of e){const r=ni(s,n);if(r){t=r;break}}return t}function ni(e,t){const n=document.querySelector(e);if(!n)return 0;const s=n.getBoundingClientRect().bottom;return s<0?0:s+t}const cf=Symbol(),Vo="http://a.com",af=()=>({path:"/",component:null,data:$o});function zf(e,t){const n=jn(af()),s={route:n,go:r};async function r(l=ge?location.href:"/"){var c,f;l=gs(l),await((c=s.onBeforeRouteChange)==null?void 0:c.call(s,l))!==!1&&(ge&&l!==gs(location.href)&&(history.replaceState({scrollPosition:window.scrollY},""),history.pushState({},"",l)),await o(l),await((f=s.onAfterRouteChanged)==null?void 0:f.call(s,l)))}let i=null;async function o(l,c=0,f=!1){var y,v;if(await((y=s.onBeforePageLoad)==null?void 0:y.call(s,l))===!1)return;const a=new URL(l,Vo),h=i=a.pathname;try{let S=await e(h);if(!S)throw new Error(`Page not found: ${h}`);if(i===h){i=null;const{default:_,__pageData:K}=S;if(!_)throw new Error(`Invalid route component: ${_}`);await((v=s.onAfterPageLoad)==null?void 0:v.call(s,l)),n.path=ge?h:ti(h),n.component=wn(_),n.data=wn(K),ge&&Un(()=>{let N=mt.value.base+K.relativePath.replace(/(?:(^|\/)index)?\.md$/,"$1");if(!mt.value.cleanUrls&&!N.endsWith("/")&&(N+=".html"),N!==a.pathname&&(a.pathname=N,l=N+a.search+a.hash,history.replaceState({},"",l)),a.hash&&!c){let j=null;try{j=document.getElementById(decodeURIComponent(a.hash).slice(1))}catch(p){console.warn(p)}if(j){si(j,a.hash);return}}window.scrollTo(0,c)})}}catch(S){if(!/fetch|Page not found/.test(S.message)&&!/^\/404(\.html|\/)?$/.test(l)&&console.error(S),!f)try{const _=await fetch(mt.value.base+"hashmap.json");window.__VP_HASH_MAP__=await _.json(),await o(l,c,!0);return}catch{}if(i===h){i=null,n.path=ge?h:ti(h),n.component=t?wn(t):null;const _=ge?h.replace(/(^|\/)$/,"$1index").replace(/(\.html)?$/,".md").replace(/^\//,""):"404.md";n.data={...$o,relativePath:_}}}}return ge&&(history.state===null&&history.replaceState({},""),window.addEventListener("click",l=>{if(l.defaultPrevented||!(l.target instanceof Element)||l.target.closest("button")||l.button!==0||l.ctrlKey||l.shiftKey||l.altKey||l.metaKey)return;const c=l.target.closest("a");if(!c||c.closest(".vp-raw")||c.hasAttribute("download")||c.hasAttribute("target"))return;const f=c.getAttribute("href")??(c instanceof SVGAElement?c.getAttribute("xlink:href"):null);if(f==null)return;const{href:a,origin:h,pathname:y,hash:v,search:S}=new URL(f,c.baseURI),_=new URL(location.href);h===_.origin&&tf(y)&&(l.preventDefault(),y===_.pathname&&S===_.search?(v!==_.hash&&(history.pushState({},"",a),window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:_.href,newURL:a}))),v?si(c,v,c.classList.contains("header-anchor")):window.scrollTo(0,0)):r(a))},{capture:!0}),window.addEventListener("popstate",async l=>{var c;l.state!==null&&(await o(gs(location.href),l.state&&l.state.scrollPosition||0),(c=s.onAfterRouteChanged)==null||c.call(s,location.href))}),window.addEventListener("hashchange",l=>{l.preventDefault()})),s}function ff(){const e=Ot(cf);if(!e)throw new Error("useRouter() is called without provider.");return e}function Uo(){return ff().route}function si(e,t,n=!1){let s=null;try{s=e.classList.contains("header-anchor")?e:document.getElementById(decodeURIComponent(t).slice(1))}catch(r){console.warn(r)}if(s){let r=function(){!n||Math.abs(o-window.scrollY)>window.innerHeight?window.scrollTo(0,o):window.scrollTo({left:0,top:o,behavior:"smooth"})};const i=parseInt(window.getComputedStyle(s).paddingTop,10),o=window.scrollY+s.getBoundingClientRect().top-lf()+i;requestAnimationFrame(r)}}function gs(e){const t=new URL(e,Vo);return t.pathname=t.pathname.replace(/(^|\/)index(\.html)?$/,"$1"),mt.value.cleanUrls?t.pathname=t.pathname.replace(/\.html$/,""):!t.pathname.endsWith("/")&&!t.pathname.endsWith(".html")&&(t.pathname+=".html"),t.pathname+t.search+t.hash}const yn=()=>Tn.forEach(e=>e()),Qf=Ys({name:"VitePressContent",props:{as:{type:[Object,String],default:"div"}},setup(e){const t=Uo(),{frontmatter:n,site:s}=sf();return Fe(n,yn,{deep:!0,flush:"post"}),()=>Ls(e.as,s.value.contentProps??{style:{position:"relative"}},[t.component?Ls(t.component,{onVnodeMounted:yn,onVnodeUpdated:yn,onVnodeUnmounted:yn}):"404 Page Not Found"])}}),uf="modulepreload",df=function(e){return"/YAXArrays.jl/previews/PR477/"+e},ri={},Zf=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=df(c),c in ri)return;ri[c]=!0;const f=c.endsWith(".css"),a=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${a}`))return;const h=document.createElement("link");if(h.rel=f?"stylesheet":uf,f||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),f)return new Promise((y,v)=>{h.addEventListener("load",y),h.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return r.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},eu=Ys({setup(e,{slots:t}){const n=oe(!1);return Lt(()=>{n.value=!0}),()=>n.value&&t.default?t.default():null}});function tu(){ge&&window.addEventListener("click",e=>{var n;const t=e.target;if(t.matches(".vp-code-group input")){const s=(n=t.parentElement)==null?void 0:n.parentElement;if(!s)return;const r=Array.from(s.querySelectorAll("input")).indexOf(t);if(r<0)return;const i=s.querySelector(".blocks");if(!i)return;const o=Array.from(i.children).find(f=>f.classList.contains("active"));if(!o)return;const l=i.children[r];if(!l||o===l)return;o.classList.remove("active"),l.classList.add("active");const c=s==null?void 0:s.querySelector(`label[for="${t.id}"]`);c==null||c.scrollIntoView({block:"nearest"})}})}function nu(){if(ge){const e=new WeakMap;window.addEventListener("click",t=>{var s;const n=t.target;if(n.matches('div[class*="language-"] > button.copy')){const r=n.parentElement,i=(s=n.nextElementSibling)==null?void 0:s.nextElementSibling;if(!r||!i)return;const o=/language-(shellscript|shell|bash|sh|zsh)/.test(r.className),l=[".vp-copy-ignore",".diff.remove"],c=i.cloneNode(!0);c.querySelectorAll(l.join(",")).forEach(a=>a.remove());let f=c.textContent||"";o&&(f=f.replace(/^ *(\$|>) /gm,"").trim()),hf(f).then(()=>{n.classList.add("copied"),clearTimeout(e.get(n));const a=setTimeout(()=>{n.classList.remove("copied"),n.blur(),e.delete(n)},2e3);e.set(n,a)})}})}}async function hf(e){try{return navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea"),n=document.activeElement;t.value=e,t.setAttribute("readonly",""),t.style.contain="strict",t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="12pt";const s=document.getSelection(),r=s?s.rangeCount>0&&s.getRangeAt(0):null;document.body.appendChild(t),t.select(),t.selectionStart=0,t.selectionEnd=e.length,document.execCommand("copy"),document.body.removeChild(t),r&&(s.removeAllRanges(),s.addRange(r)),n&&n.focus()}}function su(e,t){let n=!0,s=[];const r=i=>{if(n){n=!1,i.forEach(l=>{const c=ms(l);for(const f of document.head.children)if(f.isEqualNode(c)){s.push(f);return}});return}const o=i.map(ms);s.forEach((l,c)=>{const f=o.findIndex(a=>a==null?void 0:a.isEqualNode(l??null));f!==-1?delete o[f]:(l==null||l.remove(),delete s[c])}),o.forEach(l=>l&&document.head.appendChild(l)),s=[...s,...o].filter(Boolean)};Zs(()=>{const i=e.data,o=t.value,l=i&&i.description,c=i&&i.frontmatter.head||[],f=Do(o,i);f!==document.title&&(document.title=f);const a=l||o.description;let h=document.querySelector("meta[name=description]");h?h.getAttribute("content")!==a&&h.setAttribute("content",a):ms(["meta",{name:"description",content:a}]),r(jo(o.head,gf(c)))})}function ms([e,t,n]){const s=document.createElement(e);for(const r in t)s.setAttribute(r,t[r]);return n&&(s.innerHTML=n),e==="script"&&t.async==null&&(s.async=!1),s}function pf(e){return e[0]==="meta"&&e[1]&&e[1].name==="description"}function gf(e){return e.filter(t=>!pf(t))}const ys=new Set,ko=()=>document.createElement("link"),mf=e=>{const t=ko();t.rel="prefetch",t.href=e,document.head.appendChild(t)},yf=e=>{const t=new XMLHttpRequest;t.open("GET",e,t.withCredentials=!0),t.send()};let vn;const vf=ge&&(vn=ko())&&vn.relList&&vn.relList.supports&&vn.relList.supports("prefetch")?mf:yf;function ru(){if(!ge||!window.IntersectionObserver)return;let e;if((e=navigator.connection)&&(e.saveData||/2g/.test(e.effectiveType)))return;const t=window.requestIdleCallback||setTimeout;let n=null;const s=()=>{n&&n.disconnect(),n=new IntersectionObserver(i=>{i.forEach(o=>{if(o.isIntersecting){const l=o.target;n.unobserve(l);const{pathname:c}=l;if(!ys.has(c)){ys.add(c);const f=of(c);f&&vf(f)}}})}),t(()=>{document.querySelectorAll("#app a").forEach(i=>{const{hostname:o,pathname:l}=new URL(i.href instanceof SVGAnimatedString?i.href.animVal:i.href,i.baseURI),c=l.match(/\.\w+$/);c&&c[0]!==".html"||i.target!=="_blank"&&o===location.hostname&&(l!==location.pathname?n.observe(i):ys.add(l))})})};Lt(s);const r=Uo();Fe(()=>r.path,s),Bn(()=>{n&&n.disconnect()})}export{Ki as $,lf as A,Sf as B,Ef as C,qs as D,Jf as E,xe as F,ce as G,xf as H,Ho as I,Uo as J,$c as K,Ot as L,Gf as M,Ds as N,kf as O,Un as P,qf as Q,ge as R,Vn as S,Lf as T,wf as U,Zf as V,Wf as W,mc as X,Cf as Y,Ff as Z,Df as _,_o as a,Nf as a0,Af as a1,Mf as a2,jn as a3,Ll as a4,Ls as a5,su as a6,cf as a7,Xf as a8,nf as a9,Qf as aa,eu as ab,mt as ac,$f as ad,zf as ae,of as af,ru as ag,nu as ah,tu as ai,Be as aj,Lo as ak,jf as al,tr as am,Uf as an,Kf as ao,Bf as ap,Vf as aq,ff as ar,Pt as as,_f as at,If as au,fe as av,bf as aw,wn as ax,Hf as ay,Yf as az,Ms as b,Of as c,Ys as d,Pf as e,tf as f,ti as g,ie as h,Ya as i,vo as j,Oi as k,Ga as l,Io as m,js as n,Os as o,oe as p,Fe as q,Tf as r,Zs as s,sl as t,sf as u,Lt as v,Ul as w,Bn as x,Rf as y,nc as z}; diff --git a/previews/PR477/assets/chunks/theme.BCktWg-s.js b/previews/PR477/assets/chunks/theme.BCktWg-s.js new file mode 100644 index 00000000..4eb45842 --- /dev/null +++ b/previews/PR477/assets/chunks/theme.BCktWg-s.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/VPLocalSearchBox.BOmt0h0p.js","assets/chunks/framework.CG45A19l.js"])))=>i.map(i=>d[i]); +import{d as b,o,c as l,r as u,n as T,a as F,t as I,b as $,w as f,e as m,T as pe,_ as k,u as Se,i as Je,f as Ke,g as ve,h as y,j as p,k as i,l as J,m as ie,p as S,q as W,s as q,v as O,x as fe,y as me,z as je,A as ze,B as G,F as C,C as B,D as Ie,E as x,G as g,H,I as Ne,J as ee,K as R,L as j,M as Ze,N as Te,O as le,P as he,Q as Ce,R as te,S as Ye,U as Xe,V as qe,W as we,X as _e,Y as xe,Z as et,$ as tt,a0 as st,a1 as Me,a2 as nt,a3 as at,a4 as ot,a5 as Ae}from"./framework.CG45A19l.js";const rt=b({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(a){return(e,t)=>(o(),l("span",{class:T(["VPBadge",e.type])},[u(e.$slots,"default",{},()=>[F(I(e.text),1)])],2))}}),it={key:0,class:"VPBackdrop"},lt=b({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(a){return(e,t)=>(o(),$(pe,{name:"fade"},{default:f(()=>[e.show?(o(),l("div",it)):m("",!0)]),_:1}))}}),ct=k(lt,[["__scopeId","data-v-b06cdb19"]]),V=Se;function ut(a,e){let t,n=!1;return()=>{t&&clearTimeout(t),n?t=setTimeout(a,e):(a(),(n=!0)&&setTimeout(()=>n=!1,e))}}function ce(a){return/^\//.test(a)?a:`/${a}`}function be(a){const{pathname:e,search:t,hash:n,protocol:s}=new URL(a,"http://a.com");if(Je(a)||a.startsWith("#")||!s.startsWith("http")||!Ke(e))return a;const{site:r}=V(),c=e.endsWith("/")||e.endsWith(".html")?a:a.replace(/(?:(^\.+)\/)?.*$/,`$1${e.replace(/(\.md)?$/,r.value.cleanUrls?"":".html")}${t}${n}`);return ve(c)}function Z({correspondingLink:a=!1}={}){const{site:e,localeIndex:t,page:n,theme:s,hash:r}=V(),c=y(()=>{var d,h;return{label:(d=e.value.locales[t.value])==null?void 0:d.label,link:((h=e.value.locales[t.value])==null?void 0:h.link)||(t.value==="root"?"/":`/${t.value}/`)}});return{localeLinks:y(()=>Object.entries(e.value.locales).flatMap(([d,h])=>c.value.label===h.label?[]:{text:h.label,link:dt(h.link||(d==="root"?"/":`/${d}/`),s.value.i18nRouting!==!1&&a,n.value.relativePath.slice(c.value.link.length-1),!e.value.cleanUrls)+r.value})),currentLang:c}}function dt(a,e,t,n){return e?a.replace(/\/$/,"")+ce(t.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,n?".html":"")):a}const pt={class:"NotFound"},vt={class:"code"},ft={class:"title"},mt={class:"quote"},ht={class:"action"},_t=["href","aria-label"],bt=b({__name:"NotFound",setup(a){const{theme:e}=V(),{currentLang:t}=Z();return(n,s)=>{var r,c,v,d,h;return o(),l("div",pt,[p("p",vt,I(((r=i(e).notFound)==null?void 0:r.code)??"404"),1),p("h1",ft,I(((c=i(e).notFound)==null?void 0:c.title)??"PAGE NOT FOUND"),1),s[0]||(s[0]=p("div",{class:"divider"},null,-1)),p("blockquote",mt,I(((v=i(e).notFound)==null?void 0:v.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),p("div",ht,[p("a",{class:"link",href:i(ve)(i(t).link),"aria-label":((d=i(e).notFound)==null?void 0:d.linkLabel)??"go to home"},I(((h=i(e).notFound)==null?void 0:h.linkText)??"Take me home"),9,_t)])])}}}),gt=k(bt,[["__scopeId","data-v-951cab6c"]]);function Be(a,e){if(Array.isArray(a))return Y(a);if(a==null)return[];e=ce(e);const t=Object.keys(a).sort((s,r)=>r.split("/").length-s.split("/").length).find(s=>e.startsWith(ce(s))),n=t?a[t]:[];return Array.isArray(n)?Y(n):Y(n.items,n.base)}function kt(a){const e=[];let t=0;for(const n in a){const s=a[n];if(s.items){t=e.push(s);continue}e[t]||e.push({items:[]}),e[t].items.push(s)}return e}function $t(a){const e=[];function t(n){for(const s of n)s.text&&s.link&&e.push({text:s.text,link:s.link,docFooterText:s.docFooterText}),s.items&&t(s.items)}return t(a),e}function ue(a,e){return Array.isArray(e)?e.some(t=>ue(a,t)):J(a,e.link)?!0:e.items?ue(a,e.items):!1}function Y(a,e){return[...a].map(t=>{const n={...t},s=n.base||e;return s&&n.link&&(n.link=s+n.link),n.items&&(n.items=Y(n.items,s)),n})}function D(){const{frontmatter:a,page:e,theme:t}=V(),n=ie("(min-width: 960px)"),s=S(!1),r=y(()=>{const M=t.value.sidebar,N=e.value.relativePath;return M?Be(M,N):[]}),c=S(r.value);W(r,(M,N)=>{JSON.stringify(M)!==JSON.stringify(N)&&(c.value=r.value)});const v=y(()=>a.value.sidebar!==!1&&c.value.length>0&&a.value.layout!=="home"),d=y(()=>h?a.value.aside==null?t.value.aside==="left":a.value.aside==="left":!1),h=y(()=>a.value.layout==="home"?!1:a.value.aside!=null?!!a.value.aside:t.value.aside!==!1),A=y(()=>v.value&&n.value),_=y(()=>v.value?kt(c.value):[]);function P(){s.value=!0}function L(){s.value=!1}function w(){s.value?L():P()}return{isOpen:s,sidebar:c,sidebarGroups:_,hasSidebar:v,hasAside:h,leftAside:d,isSidebarEnabled:A,open:P,close:L,toggle:w}}function yt(a,e){let t;q(()=>{t=a.value?document.activeElement:void 0}),O(()=>{window.addEventListener("keyup",n)}),fe(()=>{window.removeEventListener("keyup",n)});function n(s){s.key==="Escape"&&a.value&&(e(),t==null||t.focus())}}function At(a){const{page:e,hash:t}=V(),n=S(!1),s=y(()=>a.value.collapsed!=null),r=y(()=>!!a.value.link),c=S(!1),v=()=>{c.value=J(e.value.relativePath,a.value.link)};W([e,a,t],v),O(v);const d=y(()=>c.value?!0:a.value.items?ue(e.value.relativePath,a.value.items):!1),h=y(()=>!!(a.value.items&&a.value.items.length));q(()=>{n.value=!!(s.value&&a.value.collapsed)}),me(()=>{(c.value||d.value)&&(n.value=!1)});function A(){s.value&&(n.value=!n.value)}return{collapsed:n,collapsible:s,isLink:r,isActiveLink:c,hasActiveLink:d,hasChildren:h,toggle:A}}function Pt(){const{hasSidebar:a}=D(),e=ie("(min-width: 960px)"),t=ie("(min-width: 1280px)");return{isAsideEnabled:y(()=>!t.value&&!e.value?!1:a.value?t.value:e.value)}}const de=[];function Ee(a){return typeof a.outline=="object"&&!Array.isArray(a.outline)&&a.outline.label||a.outlineTitle||"On this page"}function ge(a){const e=[...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")].filter(t=>t.id&&t.hasChildNodes()).map(t=>{const n=Number(t.tagName[1]);return{element:t,title:Lt(t),link:"#"+t.id,level:n}});return Vt(e,a)}function Lt(a){let e="";for(const t of a.childNodes)if(t.nodeType===1){if(t.classList.contains("VPBadge")||t.classList.contains("header-anchor")||t.classList.contains("ignore-header"))continue;e+=t.textContent}else t.nodeType===3&&(e+=t.textContent);return e.trim()}function Vt(a,e){if(e===!1)return[];const t=(typeof e=="object"&&!Array.isArray(e)?e.level:e)||2,[n,s]=typeof t=="number"?[t,t]:t==="deep"?[2,6]:t;return Nt(a,n,s)}function St(a,e){const{isAsideEnabled:t}=Pt(),n=ut(r,100);let s=null;O(()=>{requestAnimationFrame(r),window.addEventListener("scroll",n)}),je(()=>{c(location.hash)}),fe(()=>{window.removeEventListener("scroll",n)});function r(){if(!t.value)return;const v=window.scrollY,d=window.innerHeight,h=document.body.offsetHeight,A=Math.abs(v+d-h)<1,_=de.map(({element:L,link:w})=>({link:w,top:It(L)})).filter(({top:L})=>!Number.isNaN(L)).sort((L,w)=>L.top-w.top);if(!_.length){c(null);return}if(v<1){c(null);return}if(A){c(_[_.length-1].link);return}let P=null;for(const{link:L,top:w}of _){if(w>v+ze()+4)break;P=L}c(P)}function c(v){s&&s.classList.remove("active"),v==null?s=null:s=a.value.querySelector(`a[href="${decodeURIComponent(v)}"]`);const d=s;d?(d.classList.add("active"),e.value.style.top=d.offsetTop+39+"px",e.value.style.opacity="1"):(e.value.style.top="33px",e.value.style.opacity="0")}}function It(a){let e=0;for(;a!==document.body;){if(a===null)return NaN;e+=a.offsetTop,a=a.offsetParent}return e}function Nt(a,e,t){de.length=0;const n=[],s=[];return a.forEach(r=>{const c={...r,children:[]};let v=s[s.length-1];for(;v&&v.level>=c.level;)s.pop(),v=s[s.length-1];if(c.element.classList.contains("ignore-header")||v&&"shouldIgnore"in v){s.push({level:c.level,shouldIgnore:!0});return}c.level>t||c.level{const s=G("VPDocOutlineItem",!0);return o(),l("ul",{class:T(["VPDocOutlineItem",t.root?"root":"nested"])},[(o(!0),l(C,null,B(t.headers,({children:r,link:c,title:v})=>(o(),l("li",null,[p("a",{class:"outline-link",href:c,onClick:e,title:v},I(v),9,Tt),r!=null&&r.length?(o(),$(s,{key:0,headers:r},null,8,["headers"])):m("",!0)]))),256))],2)}}}),Qe=k(Ct,[["__scopeId","data-v-3f927ebe"]]),wt={class:"content"},Mt={"aria-level":"2",class:"outline-title",id:"doc-outline-aria-label",role:"heading"},Bt=b({__name:"VPDocAsideOutline",setup(a){const{frontmatter:e,theme:t}=V(),n=Ie([]);x(()=>{n.value=ge(e.value.outline??t.value.outline)});const s=S(),r=S();return St(s,r),(c,v)=>(o(),l("nav",{"aria-labelledby":"doc-outline-aria-label",class:T(["VPDocAsideOutline",{"has-outline":n.value.length>0}]),ref_key:"container",ref:s},[p("div",wt,[p("div",{class:"outline-marker",ref_key:"marker",ref:r},null,512),p("div",Mt,I(i(Ee)(i(t))),1),g(Qe,{headers:n.value,root:!0},null,8,["headers"])])],2))}}),Et=k(Bt,[["__scopeId","data-v-b38bf2ff"]]),Qt={class:"VPDocAsideCarbonAds"},Ht=b({__name:"VPDocAsideCarbonAds",props:{carbonAds:{}},setup(a){const e=()=>null;return(t,n)=>(o(),l("div",Qt,[g(i(e),{"carbon-ads":t.carbonAds},null,8,["carbon-ads"])]))}}),Ft={class:"VPDocAside"},Wt=b({__name:"VPDocAside",setup(a){const{theme:e}=V();return(t,n)=>(o(),l("div",Ft,[u(t.$slots,"aside-top",{},void 0,!0),u(t.$slots,"aside-outline-before",{},void 0,!0),g(Et),u(t.$slots,"aside-outline-after",{},void 0,!0),n[0]||(n[0]=p("div",{class:"spacer"},null,-1)),u(t.$slots,"aside-ads-before",{},void 0,!0),i(e).carbonAds?(o(),$(Ht,{key:0,"carbon-ads":i(e).carbonAds},null,8,["carbon-ads"])):m("",!0),u(t.$slots,"aside-ads-after",{},void 0,!0),u(t.$slots,"aside-bottom",{},void 0,!0)]))}}),Ot=k(Wt,[["__scopeId","data-v-6d7b3c46"]]);function Dt(){const{theme:a,page:e}=V();return y(()=>{const{text:t="Edit this page",pattern:n=""}=a.value.editLink||{};let s;return typeof n=="function"?s=n(e.value):s=n.replace(/:path/g,e.value.filePath),{url:s,text:t}})}function Ut(){const{page:a,theme:e,frontmatter:t}=V();return y(()=>{var h,A,_,P,L,w,M,N;const n=Be(e.value.sidebar,a.value.relativePath),s=$t(n),r=Rt(s,E=>E.link.replace(/[?#].*$/,"")),c=r.findIndex(E=>J(a.value.relativePath,E.link)),v=((h=e.value.docFooter)==null?void 0:h.prev)===!1&&!t.value.prev||t.value.prev===!1,d=((A=e.value.docFooter)==null?void 0:A.next)===!1&&!t.value.next||t.value.next===!1;return{prev:v?void 0:{text:(typeof t.value.prev=="string"?t.value.prev:typeof t.value.prev=="object"?t.value.prev.text:void 0)??((_=r[c-1])==null?void 0:_.docFooterText)??((P=r[c-1])==null?void 0:P.text),link:(typeof t.value.prev=="object"?t.value.prev.link:void 0)??((L=r[c-1])==null?void 0:L.link)},next:d?void 0:{text:(typeof t.value.next=="string"?t.value.next:typeof t.value.next=="object"?t.value.next.text:void 0)??((w=r[c+1])==null?void 0:w.docFooterText)??((M=r[c+1])==null?void 0:M.text),link:(typeof t.value.next=="object"?t.value.next.link:void 0)??((N=r[c+1])==null?void 0:N.link)}}})}function Rt(a,e){const t=new Set;return a.filter(n=>{const s=e(n);return t.has(s)?!1:t.add(s)})}const Q=b({__name:"VPLink",props:{tag:{},href:{},noIcon:{type:Boolean},target:{},rel:{}},setup(a){const e=a,t=y(()=>e.tag??(e.href?"a":"span")),n=y(()=>e.href&&Ne.test(e.href)||e.target==="_blank");return(s,r)=>(o(),$(H(t.value),{class:T(["VPLink",{link:s.href,"vp-external-link-icon":n.value,"no-icon":s.noIcon}]),href:s.href?i(be)(s.href):void 0,target:s.target??(n.value?"_blank":void 0),rel:s.rel??(n.value?"noreferrer":void 0)},{default:f(()=>[u(s.$slots,"default")]),_:3},8,["class","href","target","rel"]))}}),Gt={class:"VPLastUpdated"},Jt=["datetime"],Kt=b({__name:"VPDocFooterLastUpdated",setup(a){const{theme:e,page:t,lang:n}=V(),s=y(()=>new Date(t.value.lastUpdated)),r=y(()=>s.value.toISOString()),c=S("");return O(()=>{q(()=>{var v,d,h;c.value=new Intl.DateTimeFormat((d=(v=e.value.lastUpdated)==null?void 0:v.formatOptions)!=null&&d.forceLocale?n.value:void 0,((h=e.value.lastUpdated)==null?void 0:h.formatOptions)??{dateStyle:"short",timeStyle:"short"}).format(s.value)})}),(v,d)=>{var h;return o(),l("p",Gt,[F(I(((h=i(e).lastUpdated)==null?void 0:h.text)||i(e).lastUpdatedText||"Last updated")+": ",1),p("time",{datetime:r.value},I(c.value),9,Jt)])}}}),jt=k(Kt,[["__scopeId","data-v-475f71b8"]]),zt={key:0,class:"VPDocFooter"},Zt={key:0,class:"edit-info"},Yt={key:0,class:"edit-link"},Xt={key:1,class:"last-updated"},qt={key:1,class:"prev-next","aria-labelledby":"doc-footer-aria-label"},xt={class:"pager"},es=["innerHTML"],ts=["innerHTML"],ss={class:"pager"},ns=["innerHTML"],as=["innerHTML"],os=b({__name:"VPDocFooter",setup(a){const{theme:e,page:t,frontmatter:n}=V(),s=Dt(),r=Ut(),c=y(()=>e.value.editLink&&n.value.editLink!==!1),v=y(()=>t.value.lastUpdated),d=y(()=>c.value||v.value||r.value.prev||r.value.next);return(h,A)=>{var _,P,L,w;return d.value?(o(),l("footer",zt,[u(h.$slots,"doc-footer-before",{},void 0,!0),c.value||v.value?(o(),l("div",Zt,[c.value?(o(),l("div",Yt,[g(Q,{class:"edit-link-button",href:i(s).url,"no-icon":!0},{default:f(()=>[A[0]||(A[0]=p("span",{class:"vpi-square-pen edit-link-icon"},null,-1)),F(" "+I(i(s).text),1)]),_:1},8,["href"])])):m("",!0),v.value?(o(),l("div",Xt,[g(jt)])):m("",!0)])):m("",!0),(_=i(r).prev)!=null&&_.link||(P=i(r).next)!=null&&P.link?(o(),l("nav",qt,[A[1]||(A[1]=p("span",{class:"visually-hidden",id:"doc-footer-aria-label"},"Pager",-1)),p("div",xt,[(L=i(r).prev)!=null&&L.link?(o(),$(Q,{key:0,class:"pager-link prev",href:i(r).prev.link},{default:f(()=>{var M;return[p("span",{class:"desc",innerHTML:((M=i(e).docFooter)==null?void 0:M.prev)||"Previous page"},null,8,es),p("span",{class:"title",innerHTML:i(r).prev.text},null,8,ts)]}),_:1},8,["href"])):m("",!0)]),p("div",ss,[(w=i(r).next)!=null&&w.link?(o(),$(Q,{key:0,class:"pager-link next",href:i(r).next.link},{default:f(()=>{var M;return[p("span",{class:"desc",innerHTML:((M=i(e).docFooter)==null?void 0:M.next)||"Next page"},null,8,ns),p("span",{class:"title",innerHTML:i(r).next.text},null,8,as)]}),_:1},8,["href"])):m("",!0)])])):m("",!0)])):m("",!0)}}}),rs=k(os,[["__scopeId","data-v-4f9813fa"]]),is={class:"container"},ls={class:"aside-container"},cs={class:"aside-content"},us={class:"content"},ds={class:"content-container"},ps={class:"main"},vs=b({__name:"VPDoc",setup(a){const{theme:e}=V(),t=ee(),{hasSidebar:n,hasAside:s,leftAside:r}=D(),c=y(()=>t.path.replace(/[./]+/g,"_").replace(/_html$/,""));return(v,d)=>{const h=G("Content");return o(),l("div",{class:T(["VPDoc",{"has-sidebar":i(n),"has-aside":i(s)}])},[u(v.$slots,"doc-top",{},void 0,!0),p("div",is,[i(s)?(o(),l("div",{key:0,class:T(["aside",{"left-aside":i(r)}])},[d[0]||(d[0]=p("div",{class:"aside-curtain"},null,-1)),p("div",ls,[p("div",cs,[g(Ot,null,{"aside-top":f(()=>[u(v.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":f(()=>[u(v.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":f(()=>[u(v.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":f(()=>[u(v.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":f(()=>[u(v.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":f(()=>[u(v.$slots,"aside-ads-after",{},void 0,!0)]),_:3})])])],2)):m("",!0),p("div",us,[p("div",ds,[u(v.$slots,"doc-before",{},void 0,!0),p("main",ps,[g(h,{class:T(["vp-doc",[c.value,i(e).externalLinkIcon&&"external-link-icon-enabled"]])},null,8,["class"])]),g(rs,null,{"doc-footer-before":f(()=>[u(v.$slots,"doc-footer-before",{},void 0,!0)]),_:3}),u(v.$slots,"doc-after",{},void 0,!0)])])]),u(v.$slots,"doc-bottom",{},void 0,!0)],2)}}}),fs=k(vs,[["__scopeId","data-v-83890dd9"]]),ms=b({__name:"VPButton",props:{tag:{},size:{default:"medium"},theme:{default:"brand"},text:{},href:{},target:{},rel:{}},setup(a){const e=a,t=y(()=>e.href&&Ne.test(e.href)),n=y(()=>e.tag||(e.href?"a":"button"));return(s,r)=>(o(),$(H(n.value),{class:T(["VPButton",[s.size,s.theme]]),href:s.href?i(be)(s.href):void 0,target:e.target??(t.value?"_blank":void 0),rel:e.rel??(t.value?"noreferrer":void 0)},{default:f(()=>[F(I(s.text),1)]),_:1},8,["class","href","target","rel"]))}}),hs=k(ms,[["__scopeId","data-v-906d7fb4"]]),_s=["src","alt"],bs=b({inheritAttrs:!1,__name:"VPImage",props:{image:{},alt:{}},setup(a){return(e,t)=>{const n=G("VPImage",!0);return e.image?(o(),l(C,{key:0},[typeof e.image=="string"||"src"in e.image?(o(),l("img",R({key:0,class:"VPImage"},typeof e.image=="string"?e.$attrs:{...e.image,...e.$attrs},{src:i(ve)(typeof e.image=="string"?e.image:e.image.src),alt:e.alt??(typeof e.image=="string"?"":e.image.alt||"")}),null,16,_s)):(o(),l(C,{key:1},[g(n,R({class:"dark",image:e.image.dark,alt:e.image.alt},e.$attrs),null,16,["image","alt"]),g(n,R({class:"light",image:e.image.light,alt:e.image.alt},e.$attrs),null,16,["image","alt"])],64))],64)):m("",!0)}}}),X=k(bs,[["__scopeId","data-v-35a7d0b8"]]),gs={class:"container"},ks={class:"main"},$s={key:0,class:"name"},ys=["innerHTML"],As=["innerHTML"],Ps=["innerHTML"],Ls={key:0,class:"actions"},Vs={key:0,class:"image"},Ss={class:"image-container"},Is=b({__name:"VPHero",props:{name:{},text:{},tagline:{},image:{},actions:{}},setup(a){const e=j("hero-image-slot-exists");return(t,n)=>(o(),l("div",{class:T(["VPHero",{"has-image":t.image||i(e)}])},[p("div",gs,[p("div",ks,[u(t.$slots,"home-hero-info-before",{},void 0,!0),u(t.$slots,"home-hero-info",{},()=>[t.name?(o(),l("h1",$s,[p("span",{innerHTML:t.name,class:"clip"},null,8,ys)])):m("",!0),t.text?(o(),l("p",{key:1,innerHTML:t.text,class:"text"},null,8,As)):m("",!0),t.tagline?(o(),l("p",{key:2,innerHTML:t.tagline,class:"tagline"},null,8,Ps)):m("",!0)],!0),u(t.$slots,"home-hero-info-after",{},void 0,!0),t.actions?(o(),l("div",Ls,[(o(!0),l(C,null,B(t.actions,s=>(o(),l("div",{key:s.link,class:"action"},[g(hs,{tag:"a",size:"medium",theme:s.theme,text:s.text,href:s.link,target:s.target,rel:s.rel},null,8,["theme","text","href","target","rel"])]))),128))])):m("",!0),u(t.$slots,"home-hero-actions-after",{},void 0,!0)]),t.image||i(e)?(o(),l("div",Vs,[p("div",Ss,[n[0]||(n[0]=p("div",{class:"image-bg"},null,-1)),u(t.$slots,"home-hero-image",{},()=>[t.image?(o(),$(X,{key:0,class:"image-src",image:t.image},null,8,["image"])):m("",!0)],!0)])])):m("",!0)])],2))}}),Ns=k(Is,[["__scopeId","data-v-955009fc"]]),Ts=b({__name:"VPHomeHero",setup(a){const{frontmatter:e}=V();return(t,n)=>i(e).hero?(o(),$(Ns,{key:0,class:"VPHomeHero",name:i(e).hero.name,text:i(e).hero.text,tagline:i(e).hero.tagline,image:i(e).hero.image,actions:i(e).hero.actions},{"home-hero-info-before":f(()=>[u(t.$slots,"home-hero-info-before")]),"home-hero-info":f(()=>[u(t.$slots,"home-hero-info")]),"home-hero-info-after":f(()=>[u(t.$slots,"home-hero-info-after")]),"home-hero-actions-after":f(()=>[u(t.$slots,"home-hero-actions-after")]),"home-hero-image":f(()=>[u(t.$slots,"home-hero-image")]),_:3},8,["name","text","tagline","image","actions"])):m("",!0)}}),Cs={class:"box"},ws={key:0,class:"icon"},Ms=["innerHTML"],Bs=["innerHTML"],Es=["innerHTML"],Qs={key:4,class:"link-text"},Hs={class:"link-text-value"},Fs=b({__name:"VPFeature",props:{icon:{},title:{},details:{},link:{},linkText:{},rel:{},target:{}},setup(a){return(e,t)=>(o(),$(Q,{class:"VPFeature",href:e.link,rel:e.rel,target:e.target,"no-icon":!0,tag:e.link?"a":"div"},{default:f(()=>[p("article",Cs,[typeof e.icon=="object"&&e.icon.wrap?(o(),l("div",ws,[g(X,{image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])])):typeof e.icon=="object"?(o(),$(X,{key:1,image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])):e.icon?(o(),l("div",{key:2,class:"icon",innerHTML:e.icon},null,8,Ms)):m("",!0),p("h2",{class:"title",innerHTML:e.title},null,8,Bs),e.details?(o(),l("p",{key:3,class:"details",innerHTML:e.details},null,8,Es)):m("",!0),e.linkText?(o(),l("div",Qs,[p("p",Hs,[F(I(e.linkText)+" ",1),t[0]||(t[0]=p("span",{class:"vpi-arrow-right link-text-icon"},null,-1))])])):m("",!0)])]),_:1},8,["href","rel","target","tag"]))}}),Ws=k(Fs,[["__scopeId","data-v-f5e9645b"]]),Os={key:0,class:"VPFeatures"},Ds={class:"container"},Us={class:"items"},Rs=b({__name:"VPFeatures",props:{features:{}},setup(a){const e=a,t=y(()=>{const n=e.features.length;if(n){if(n===2)return"grid-2";if(n===3)return"grid-3";if(n%3===0)return"grid-6";if(n>3)return"grid-4"}else return});return(n,s)=>n.features?(o(),l("div",Os,[p("div",Ds,[p("div",Us,[(o(!0),l(C,null,B(n.features,r=>(o(),l("div",{key:r.title,class:T(["item",[t.value]])},[g(Ws,{icon:r.icon,title:r.title,details:r.details,link:r.link,"link-text":r.linkText,rel:r.rel,target:r.target},null,8,["icon","title","details","link","link-text","rel","target"])],2))),128))])])])):m("",!0)}}),Gs=k(Rs,[["__scopeId","data-v-d0a190d7"]]),Js=b({__name:"VPHomeFeatures",setup(a){const{frontmatter:e}=V();return(t,n)=>i(e).features?(o(),$(Gs,{key:0,class:"VPHomeFeatures",features:i(e).features},null,8,["features"])):m("",!0)}}),Ks=b({__name:"VPHomeContent",setup(a){const{width:e}=Ze({initialWidth:0,includeScrollbar:!1});return(t,n)=>(o(),l("div",{class:"vp-doc container",style:Te(i(e)?{"--vp-offset":`calc(50% - ${i(e)/2}px)`}:{})},[u(t.$slots,"default",{},void 0,!0)],4))}}),js=k(Ks,[["__scopeId","data-v-7a48a447"]]),zs={class:"VPHome"},Zs=b({__name:"VPHome",setup(a){const{frontmatter:e}=V();return(t,n)=>{const s=G("Content");return o(),l("div",zs,[u(t.$slots,"home-hero-before",{},void 0,!0),g(Ts,null,{"home-hero-info-before":f(()=>[u(t.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":f(()=>[u(t.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":f(()=>[u(t.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":f(()=>[u(t.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":f(()=>[u(t.$slots,"home-hero-image",{},void 0,!0)]),_:3}),u(t.$slots,"home-hero-after",{},void 0,!0),u(t.$slots,"home-features-before",{},void 0,!0),g(Js),u(t.$slots,"home-features-after",{},void 0,!0),i(e).markdownStyles!==!1?(o(),$(js,{key:0},{default:f(()=>[g(s)]),_:1})):(o(),$(s,{key:1}))])}}}),Ys=k(Zs,[["__scopeId","data-v-cbb6ec48"]]),Xs={},qs={class:"VPPage"};function xs(a,e){const t=G("Content");return o(),l("div",qs,[u(a.$slots,"page-top"),g(t),u(a.$slots,"page-bottom")])}const en=k(Xs,[["render",xs]]),tn=b({__name:"VPContent",setup(a){const{page:e,frontmatter:t}=V(),{hasSidebar:n}=D();return(s,r)=>(o(),l("div",{class:T(["VPContent",{"has-sidebar":i(n),"is-home":i(t).layout==="home"}]),id:"VPContent"},[i(e).isNotFound?u(s.$slots,"not-found",{key:0},()=>[g(gt)],!0):i(t).layout==="page"?(o(),$(en,{key:1},{"page-top":f(()=>[u(s.$slots,"page-top",{},void 0,!0)]),"page-bottom":f(()=>[u(s.$slots,"page-bottom",{},void 0,!0)]),_:3})):i(t).layout==="home"?(o(),$(Ys,{key:2},{"home-hero-before":f(()=>[u(s.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":f(()=>[u(s.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":f(()=>[u(s.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":f(()=>[u(s.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":f(()=>[u(s.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":f(()=>[u(s.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":f(()=>[u(s.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":f(()=>[u(s.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":f(()=>[u(s.$slots,"home-features-after",{},void 0,!0)]),_:3})):i(t).layout&&i(t).layout!=="doc"?(o(),$(H(i(t).layout),{key:3})):(o(),$(fs,{key:4},{"doc-top":f(()=>[u(s.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":f(()=>[u(s.$slots,"doc-bottom",{},void 0,!0)]),"doc-footer-before":f(()=>[u(s.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":f(()=>[u(s.$slots,"doc-before",{},void 0,!0)]),"doc-after":f(()=>[u(s.$slots,"doc-after",{},void 0,!0)]),"aside-top":f(()=>[u(s.$slots,"aside-top",{},void 0,!0)]),"aside-outline-before":f(()=>[u(s.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":f(()=>[u(s.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":f(()=>[u(s.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":f(()=>[u(s.$slots,"aside-ads-after",{},void 0,!0)]),"aside-bottom":f(()=>[u(s.$slots,"aside-bottom",{},void 0,!0)]),_:3}))],2))}}),sn=k(tn,[["__scopeId","data-v-91765379"]]),nn={class:"container"},an=["innerHTML"],on=["innerHTML"],rn=b({__name:"VPFooter",setup(a){const{theme:e,frontmatter:t}=V(),{hasSidebar:n}=D();return(s,r)=>i(e).footer&&i(t).footer!==!1?(o(),l("footer",{key:0,class:T(["VPFooter",{"has-sidebar":i(n)}])},[p("div",nn,[i(e).footer.message?(o(),l("p",{key:0,class:"message",innerHTML:i(e).footer.message},null,8,an)):m("",!0),i(e).footer.copyright?(o(),l("p",{key:1,class:"copyright",innerHTML:i(e).footer.copyright},null,8,on)):m("",!0)])],2)):m("",!0)}}),ln=k(rn,[["__scopeId","data-v-c970a860"]]);function cn(){const{theme:a,frontmatter:e}=V(),t=Ie([]),n=y(()=>t.value.length>0);return x(()=>{t.value=ge(e.value.outline??a.value.outline)}),{headers:t,hasLocalNav:n}}const un={class:"menu-text"},dn={class:"header"},pn={class:"outline"},vn=b({__name:"VPLocalNavOutlineDropdown",props:{headers:{},navHeight:{}},setup(a){const e=a,{theme:t}=V(),n=S(!1),s=S(0),r=S(),c=S();function v(_){var P;(P=r.value)!=null&&P.contains(_.target)||(n.value=!1)}W(n,_=>{if(_){document.addEventListener("click",v);return}document.removeEventListener("click",v)}),le("Escape",()=>{n.value=!1}),x(()=>{n.value=!1});function d(){n.value=!n.value,s.value=window.innerHeight+Math.min(window.scrollY-e.navHeight,0)}function h(_){_.target.classList.contains("outline-link")&&(c.value&&(c.value.style.transition="none"),he(()=>{n.value=!1}))}function A(){n.value=!1,window.scrollTo({top:0,left:0,behavior:"smooth"})}return(_,P)=>(o(),l("div",{class:"VPLocalNavOutlineDropdown",style:Te({"--vp-vh":s.value+"px"}),ref_key:"main",ref:r},[_.headers.length>0?(o(),l("button",{key:0,onClick:d,class:T({open:n.value})},[p("span",un,I(i(Ee)(i(t))),1),P[0]||(P[0]=p("span",{class:"vpi-chevron-right icon"},null,-1))],2)):(o(),l("button",{key:1,onClick:A},I(i(t).returnToTopLabel||"Return to top"),1)),g(pe,{name:"flyout"},{default:f(()=>[n.value?(o(),l("div",{key:0,ref_key:"items",ref:c,class:"items",onClick:h},[p("div",dn,[p("a",{class:"top-link",href:"#",onClick:A},I(i(t).returnToTopLabel||"Return to top"),1)]),p("div",pn,[g(Qe,{headers:_.headers},null,8,["headers"])])],512)):m("",!0)]),_:1})],4))}}),fn=k(vn,[["__scopeId","data-v-bc9dc845"]]),mn={class:"container"},hn=["aria-expanded"],_n={class:"menu-text"},bn=b({__name:"VPLocalNav",props:{open:{type:Boolean}},emits:["open-menu"],setup(a){const{theme:e,frontmatter:t}=V(),{hasSidebar:n}=D(),{headers:s}=cn(),{y:r}=Ce(),c=S(0);O(()=>{c.value=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--vp-nav-height"))}),x(()=>{s.value=ge(t.value.outline??e.value.outline)});const v=y(()=>s.value.length===0),d=y(()=>v.value&&!n.value),h=y(()=>({VPLocalNav:!0,"has-sidebar":n.value,empty:v.value,fixed:d.value}));return(A,_)=>i(t).layout!=="home"&&(!d.value||i(r)>=c.value)?(o(),l("div",{key:0,class:T(h.value)},[p("div",mn,[i(n)?(o(),l("button",{key:0,class:"menu","aria-expanded":A.open,"aria-controls":"VPSidebarNav",onClick:_[0]||(_[0]=P=>A.$emit("open-menu"))},[_[1]||(_[1]=p("span",{class:"vpi-align-left menu-icon"},null,-1)),p("span",_n,I(i(e).sidebarMenuLabel||"Menu"),1)],8,hn)):m("",!0),g(fn,{headers:i(s),navHeight:c.value},null,8,["headers","navHeight"])])],2)):m("",!0)}}),gn=k(bn,[["__scopeId","data-v-070ab83d"]]);function kn(){const a=S(!1);function e(){a.value=!0,window.addEventListener("resize",s)}function t(){a.value=!1,window.removeEventListener("resize",s)}function n(){a.value?t():e()}function s(){window.outerWidth>=768&&t()}const r=ee();return W(()=>r.path,t),{isScreenOpen:a,openScreen:e,closeScreen:t,toggleScreen:n}}const $n={},yn={class:"VPSwitch",type:"button",role:"switch"},An={class:"check"},Pn={key:0,class:"icon"};function Ln(a,e){return o(),l("button",yn,[p("span",An,[a.$slots.default?(o(),l("span",Pn,[u(a.$slots,"default",{},void 0,!0)])):m("",!0)])])}const Vn=k($n,[["render",Ln],["__scopeId","data-v-4a1c76db"]]),Sn=b({__name:"VPSwitchAppearance",setup(a){const{isDark:e,theme:t}=V(),n=j("toggle-appearance",()=>{e.value=!e.value}),s=S("");return me(()=>{s.value=e.value?t.value.lightModeSwitchTitle||"Switch to light theme":t.value.darkModeSwitchTitle||"Switch to dark theme"}),(r,c)=>(o(),$(Vn,{title:s.value,class:"VPSwitchAppearance","aria-checked":i(e),onClick:i(n)},{default:f(()=>c[0]||(c[0]=[p("span",{class:"vpi-sun sun"},null,-1),p("span",{class:"vpi-moon moon"},null,-1)])),_:1},8,["title","aria-checked","onClick"]))}}),ke=k(Sn,[["__scopeId","data-v-e40a8bb6"]]),In={key:0,class:"VPNavBarAppearance"},Nn=b({__name:"VPNavBarAppearance",setup(a){const{site:e}=V();return(t,n)=>i(e).appearance&&i(e).appearance!=="force-dark"&&i(e).appearance!=="force-auto"?(o(),l("div",In,[g(ke)])):m("",!0)}}),Tn=k(Nn,[["__scopeId","data-v-af096f4a"]]),$e=S();let He=!1,re=0;function Cn(a){const e=S(!1);if(te){!He&&wn(),re++;const t=W($e,n=>{var s,r,c;n===a.el.value||(s=a.el.value)!=null&&s.contains(n)?(e.value=!0,(r=a.onFocus)==null||r.call(a)):(e.value=!1,(c=a.onBlur)==null||c.call(a))});fe(()=>{t(),re--,re||Mn()})}return Ye(e)}function wn(){document.addEventListener("focusin",Fe),He=!0,$e.value=document.activeElement}function Mn(){document.removeEventListener("focusin",Fe)}function Fe(){$e.value=document.activeElement}const Bn={class:"VPMenuLink"},En=["innerHTML"],Qn=b({__name:"VPMenuLink",props:{item:{}},setup(a){const{page:e}=V();return(t,n)=>(o(),l("div",Bn,[g(Q,{class:T({active:i(J)(i(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon},{default:f(()=>[p("span",{innerHTML:t.item.text},null,8,En)]),_:1},8,["class","href","target","rel","no-icon"])]))}}),se=k(Qn,[["__scopeId","data-v-acbfed09"]]),Hn={class:"VPMenuGroup"},Fn={key:0,class:"title"},Wn=b({__name:"VPMenuGroup",props:{text:{},items:{}},setup(a){return(e,t)=>(o(),l("div",Hn,[e.text?(o(),l("p",Fn,I(e.text),1)):m("",!0),(o(!0),l(C,null,B(e.items,n=>(o(),l(C,null,["link"in n?(o(),$(se,{key:0,item:n},null,8,["item"])):m("",!0)],64))),256))]))}}),On=k(Wn,[["__scopeId","data-v-48c802d0"]]),Dn={class:"VPMenu"},Un={key:0,class:"items"},Rn=b({__name:"VPMenu",props:{items:{}},setup(a){return(e,t)=>(o(),l("div",Dn,[e.items?(o(),l("div",Un,[(o(!0),l(C,null,B(e.items,n=>(o(),l(C,{key:JSON.stringify(n)},["link"in n?(o(),$(se,{key:0,item:n},null,8,["item"])):"component"in n?(o(),$(H(n.component),R({key:1,ref_for:!0},n.props),null,16)):(o(),$(On,{key:2,text:n.text,items:n.items},null,8,["text","items"]))],64))),128))])):m("",!0),u(e.$slots,"default",{},void 0,!0)]))}}),Gn=k(Rn,[["__scopeId","data-v-7dd3104a"]]),Jn=["aria-expanded","aria-label"],Kn={key:0,class:"text"},jn=["innerHTML"],zn={key:1,class:"vpi-more-horizontal icon"},Zn={class:"menu"},Yn=b({__name:"VPFlyout",props:{icon:{},button:{},label:{},items:{}},setup(a){const e=S(!1),t=S();Cn({el:t,onBlur:n});function n(){e.value=!1}return(s,r)=>(o(),l("div",{class:"VPFlyout",ref_key:"el",ref:t,onMouseenter:r[1]||(r[1]=c=>e.value=!0),onMouseleave:r[2]||(r[2]=c=>e.value=!1)},[p("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":e.value,"aria-label":s.label,onClick:r[0]||(r[0]=c=>e.value=!e.value)},[s.button||s.icon?(o(),l("span",Kn,[s.icon?(o(),l("span",{key:0,class:T([s.icon,"option-icon"])},null,2)):m("",!0),s.button?(o(),l("span",{key:1,innerHTML:s.button},null,8,jn)):m("",!0),r[3]||(r[3]=p("span",{class:"vpi-chevron-down text-icon"},null,-1))])):(o(),l("span",zn))],8,Jn),p("div",Zn,[g(Gn,{items:s.items},{default:f(()=>[u(s.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}}),ye=k(Yn,[["__scopeId","data-v-04f5c5e9"]]),Xn=["href","aria-label","innerHTML"],qn=b({__name:"VPSocialLink",props:{icon:{},link:{},ariaLabel:{}},setup(a){const e=a,t=S();O(async()=>{var r;await he();const s=(r=t.value)==null?void 0:r.children[0];s instanceof HTMLElement&&s.className.startsWith("vpi-social-")&&(getComputedStyle(s).maskImage||getComputedStyle(s).webkitMaskImage)==="none"&&s.style.setProperty("--icon",`url('https://api.iconify.design/simple-icons/${e.icon}.svg')`)});const n=y(()=>typeof e.icon=="object"?e.icon.svg:``);return(s,r)=>(o(),l("a",{ref_key:"el",ref:t,class:"VPSocialLink no-icon",href:s.link,"aria-label":s.ariaLabel??(typeof s.icon=="string"?s.icon:""),target:"_blank",rel:"noopener",innerHTML:n.value},null,8,Xn))}}),xn=k(qn,[["__scopeId","data-v-d26d30cb"]]),ea={class:"VPSocialLinks"},ta=b({__name:"VPSocialLinks",props:{links:{}},setup(a){return(e,t)=>(o(),l("div",ea,[(o(!0),l(C,null,B(e.links,({link:n,icon:s,ariaLabel:r})=>(o(),$(xn,{key:n,icon:s,link:n,ariaLabel:r},null,8,["icon","link","ariaLabel"]))),128))]))}}),ne=k(ta,[["__scopeId","data-v-ee7a9424"]]),sa={key:0,class:"group translations"},na={class:"trans-title"},aa={key:1,class:"group"},oa={class:"item appearance"},ra={class:"label"},ia={class:"appearance-action"},la={key:2,class:"group"},ca={class:"item social-links"},ua=b({__name:"VPNavBarExtra",setup(a){const{site:e,theme:t}=V(),{localeLinks:n,currentLang:s}=Z({correspondingLink:!0}),r=y(()=>n.value.length&&s.value.label||e.value.appearance||t.value.socialLinks);return(c,v)=>r.value?(o(),$(ye,{key:0,class:"VPNavBarExtra",label:"extra navigation"},{default:f(()=>[i(n).length&&i(s).label?(o(),l("div",sa,[p("p",na,I(i(s).label),1),(o(!0),l(C,null,B(i(n),d=>(o(),$(se,{key:d.link,item:d},null,8,["item"]))),128))])):m("",!0),i(e).appearance&&i(e).appearance!=="force-dark"&&i(e).appearance!=="force-auto"?(o(),l("div",aa,[p("div",oa,[p("p",ra,I(i(t).darkModeSwitchLabel||"Appearance"),1),p("div",ia,[g(ke)])])])):m("",!0),i(t).socialLinks?(o(),l("div",la,[p("div",ca,[g(ne,{class:"social-links-list",links:i(t).socialLinks},null,8,["links"])])])):m("",!0)]),_:1})):m("",!0)}}),da=k(ua,[["__scopeId","data-v-925effce"]]),pa=["aria-expanded"],va=b({__name:"VPNavBarHamburger",props:{active:{type:Boolean}},emits:["click"],setup(a){return(e,t)=>(o(),l("button",{type:"button",class:T(["VPNavBarHamburger",{active:e.active}]),"aria-label":"mobile navigation","aria-expanded":e.active,"aria-controls":"VPNavScreen",onClick:t[0]||(t[0]=n=>e.$emit("click"))},t[1]||(t[1]=[p("span",{class:"container"},[p("span",{class:"top"}),p("span",{class:"middle"}),p("span",{class:"bottom"})],-1)]),10,pa))}}),fa=k(va,[["__scopeId","data-v-5dea55bf"]]),ma=["innerHTML"],ha=b({__name:"VPNavBarMenuLink",props:{item:{}},setup(a){const{page:e}=V();return(t,n)=>(o(),$(Q,{class:T({VPNavBarMenuLink:!0,active:i(J)(i(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,tabindex:"0"},{default:f(()=>[p("span",{innerHTML:t.item.text},null,8,ma)]),_:1},8,["class","href","target","rel","no-icon"]))}}),_a=k(ha,[["__scopeId","data-v-956ec74c"]]),We=b({__name:"VPNavBarMenuGroup",props:{item:{}},setup(a){const e=a,{page:t}=V(),n=r=>"component"in r?!1:"link"in r?J(t.value.relativePath,r.link,!!e.item.activeMatch):r.items.some(n),s=y(()=>n(e.item));return(r,c)=>(o(),$(ye,{class:T({VPNavBarMenuGroup:!0,active:i(J)(i(t).relativePath,r.item.activeMatch,!!r.item.activeMatch)||s.value}),button:r.item.text,items:r.item.items},null,8,["class","button","items"]))}}),ba={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},ga=b({__name:"VPNavBarMenu",setup(a){const{theme:e}=V();return(t,n)=>i(e).nav?(o(),l("nav",ba,[n[0]||(n[0]=p("span",{id:"main-nav-aria-label",class:"visually-hidden"}," Main Navigation ",-1)),(o(!0),l(C,null,B(i(e).nav,s=>(o(),l(C,{key:JSON.stringify(s)},["link"in s?(o(),$(_a,{key:0,item:s},null,8,["item"])):"component"in s?(o(),$(H(s.component),R({key:1,ref_for:!0},s.props),null,16)):(o(),$(We,{key:2,item:s},null,8,["item"]))],64))),128))])):m("",!0)}}),ka=k(ga,[["__scopeId","data-v-e6d46098"]]);function $a(a){const{localeIndex:e,theme:t}=V();function n(s){var w,M,N;const r=s.split("."),c=(w=t.value.search)==null?void 0:w.options,v=c&&typeof c=="object",d=v&&((N=(M=c.locales)==null?void 0:M[e.value])==null?void 0:N.translations)||null,h=v&&c.translations||null;let A=d,_=h,P=a;const L=r.pop();for(const E of r){let U=null;const K=P==null?void 0:P[E];K&&(U=P=K);const ae=_==null?void 0:_[E];ae&&(U=_=ae);const oe=A==null?void 0:A[E];oe&&(U=A=oe),K||(P=U),ae||(_=U),oe||(A=U)}return(A==null?void 0:A[L])??(_==null?void 0:_[L])??(P==null?void 0:P[L])??""}return n}const ya=["aria-label"],Aa={class:"DocSearch-Button-Container"},Pa={class:"DocSearch-Button-Placeholder"},Pe=b({__name:"VPNavBarSearchButton",setup(a){const t=$a({button:{buttonText:"Search",buttonAriaLabel:"Search"}});return(n,s)=>(o(),l("button",{type:"button",class:"DocSearch DocSearch-Button","aria-label":i(t)("button.buttonAriaLabel")},[p("span",Aa,[s[0]||(s[0]=p("span",{class:"vp-icon DocSearch-Search-Icon"},null,-1)),p("span",Pa,I(i(t)("button.buttonText")),1)]),s[1]||(s[1]=p("span",{class:"DocSearch-Button-Keys"},[p("kbd",{class:"DocSearch-Button-Key"}),p("kbd",{class:"DocSearch-Button-Key"},"K")],-1))],8,ya))}}),La={class:"VPNavBarSearch"},Va={id:"local-search"},Sa={key:1,id:"docsearch"},Ia=b({__name:"VPNavBarSearch",setup(a){const e=Xe(()=>qe(()=>import("./VPLocalSearchBox.BOmt0h0p.js"),__vite__mapDeps([0,1]))),t=()=>null,{theme:n}=V(),s=S(!1),r=S(!1);O(()=>{});function c(){s.value||(s.value=!0,setTimeout(v,16))}function v(){const _=new Event("keydown");_.key="k",_.metaKey=!0,window.dispatchEvent(_),setTimeout(()=>{document.querySelector(".DocSearch-Modal")||v()},16)}function d(_){const P=_.target,L=P.tagName;return P.isContentEditable||L==="INPUT"||L==="SELECT"||L==="TEXTAREA"}const h=S(!1);le("k",_=>{(_.ctrlKey||_.metaKey)&&(_.preventDefault(),h.value=!0)}),le("/",_=>{d(_)||(_.preventDefault(),h.value=!0)});const A="local";return(_,P)=>{var L;return o(),l("div",La,[i(A)==="local"?(o(),l(C,{key:0},[h.value?(o(),$(i(e),{key:0,onClose:P[0]||(P[0]=w=>h.value=!1)})):m("",!0),p("div",Va,[g(Pe,{onClick:P[1]||(P[1]=w=>h.value=!0)})])],64)):i(A)==="algolia"?(o(),l(C,{key:1},[s.value?(o(),$(i(t),{key:0,algolia:((L=i(n).search)==null?void 0:L.options)??i(n).algolia,onVnodeBeforeMount:P[2]||(P[2]=w=>r.value=!0)},null,8,["algolia"])):m("",!0),r.value?m("",!0):(o(),l("div",Sa,[g(Pe,{onClick:c})]))],64)):m("",!0)])}}}),Na=b({__name:"VPNavBarSocialLinks",setup(a){const{theme:e}=V();return(t,n)=>i(e).socialLinks?(o(),$(ne,{key:0,class:"VPNavBarSocialLinks",links:i(e).socialLinks},null,8,["links"])):m("",!0)}}),Ta=k(Na,[["__scopeId","data-v-164c457f"]]),Ca=["href","rel","target"],wa=["innerHTML"],Ma={key:2},Ba=b({__name:"VPNavBarTitle",setup(a){const{site:e,theme:t}=V(),{hasSidebar:n}=D(),{currentLang:s}=Z(),r=y(()=>{var d;return typeof t.value.logoLink=="string"?t.value.logoLink:(d=t.value.logoLink)==null?void 0:d.link}),c=y(()=>{var d;return typeof t.value.logoLink=="string"||(d=t.value.logoLink)==null?void 0:d.rel}),v=y(()=>{var d;return typeof t.value.logoLink=="string"||(d=t.value.logoLink)==null?void 0:d.target});return(d,h)=>(o(),l("div",{class:T(["VPNavBarTitle",{"has-sidebar":i(n)}])},[p("a",{class:"title",href:r.value??i(be)(i(s).link),rel:c.value,target:v.value},[u(d.$slots,"nav-bar-title-before",{},void 0,!0),i(t).logo?(o(),$(X,{key:0,class:"logo",image:i(t).logo},null,8,["image"])):m("",!0),i(t).siteTitle?(o(),l("span",{key:1,innerHTML:i(t).siteTitle},null,8,wa)):i(t).siteTitle===void 0?(o(),l("span",Ma,I(i(e).title),1)):m("",!0),u(d.$slots,"nav-bar-title-after",{},void 0,!0)],8,Ca)],2))}}),Ea=k(Ba,[["__scopeId","data-v-0f4f798b"]]),Qa={class:"items"},Ha={class:"title"},Fa=b({__name:"VPNavBarTranslations",setup(a){const{theme:e}=V(),{localeLinks:t,currentLang:n}=Z({correspondingLink:!0});return(s,r)=>i(t).length&&i(n).label?(o(),$(ye,{key:0,class:"VPNavBarTranslations",icon:"vpi-languages",label:i(e).langMenuLabel||"Change language"},{default:f(()=>[p("div",Qa,[p("p",Ha,I(i(n).label),1),(o(!0),l(C,null,B(i(t),c=>(o(),$(se,{key:c.link,item:c},null,8,["item"]))),128))])]),_:1},8,["label"])):m("",!0)}}),Wa=k(Fa,[["__scopeId","data-v-c80d9ad0"]]),Oa={class:"wrapper"},Da={class:"container"},Ua={class:"title"},Ra={class:"content"},Ga={class:"content-body"},Ja=b({__name:"VPNavBar",props:{isScreenOpen:{type:Boolean}},emits:["toggle-screen"],setup(a){const e=a,{y:t}=Ce(),{hasSidebar:n}=D(),{frontmatter:s}=V(),r=S({});return me(()=>{r.value={"has-sidebar":n.value,home:s.value.layout==="home",top:t.value===0,"screen-open":e.isScreenOpen}}),(c,v)=>(o(),l("div",{class:T(["VPNavBar",r.value])},[p("div",Oa,[p("div",Da,[p("div",Ua,[g(Ea,null,{"nav-bar-title-before":f(()=>[u(c.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":f(()=>[u(c.$slots,"nav-bar-title-after",{},void 0,!0)]),_:3})]),p("div",Ra,[p("div",Ga,[u(c.$slots,"nav-bar-content-before",{},void 0,!0),g(Ia,{class:"search"}),g(ka,{class:"menu"}),g(Wa,{class:"translations"}),g(Tn,{class:"appearance"}),g(Ta,{class:"social-links"}),g(da,{class:"extra"}),u(c.$slots,"nav-bar-content-after",{},void 0,!0),g(fa,{class:"hamburger",active:c.isScreenOpen,onClick:v[0]||(v[0]=d=>c.$emit("toggle-screen"))},null,8,["active"])])])])]),v[1]||(v[1]=p("div",{class:"divider"},[p("div",{class:"divider-line"})],-1))],2))}}),Ka=k(Ja,[["__scopeId","data-v-822684d1"]]),ja={key:0,class:"VPNavScreenAppearance"},za={class:"text"},Za=b({__name:"VPNavScreenAppearance",setup(a){const{site:e,theme:t}=V();return(n,s)=>i(e).appearance&&i(e).appearance!=="force-dark"&&i(e).appearance!=="force-auto"?(o(),l("div",ja,[p("p",za,I(i(t).darkModeSwitchLabel||"Appearance"),1),g(ke)])):m("",!0)}}),Ya=k(Za,[["__scopeId","data-v-ffb44008"]]),Xa=["innerHTML"],qa=b({__name:"VPNavScreenMenuLink",props:{item:{}},setup(a){const e=j("close-screen");return(t,n)=>(o(),$(Q,{class:"VPNavScreenMenuLink",href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,onClick:i(e)},{default:f(()=>[p("span",{innerHTML:t.item.text},null,8,Xa)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),xa=k(qa,[["__scopeId","data-v-735512b8"]]),eo=["innerHTML"],to=b({__name:"VPNavScreenMenuGroupLink",props:{item:{}},setup(a){const e=j("close-screen");return(t,n)=>(o(),$(Q,{class:"VPNavScreenMenuGroupLink",href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,onClick:i(e)},{default:f(()=>[p("span",{innerHTML:t.item.text},null,8,eo)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),Oe=k(to,[["__scopeId","data-v-372ae7c0"]]),so={class:"VPNavScreenMenuGroupSection"},no={key:0,class:"title"},ao=b({__name:"VPNavScreenMenuGroupSection",props:{text:{},items:{}},setup(a){return(e,t)=>(o(),l("div",so,[e.text?(o(),l("p",no,I(e.text),1)):m("",!0),(o(!0),l(C,null,B(e.items,n=>(o(),$(Oe,{key:n.text,item:n},null,8,["item"]))),128))]))}}),oo=k(ao,[["__scopeId","data-v-4b8941ac"]]),ro=["aria-controls","aria-expanded"],io=["innerHTML"],lo=["id"],co={key:0,class:"item"},uo={key:1,class:"item"},po={key:2,class:"group"},vo=b({__name:"VPNavScreenMenuGroup",props:{text:{},items:{}},setup(a){const e=a,t=S(!1),n=y(()=>`NavScreenGroup-${e.text.replace(" ","-").toLowerCase()}`);function s(){t.value=!t.value}return(r,c)=>(o(),l("div",{class:T(["VPNavScreenMenuGroup",{open:t.value}])},[p("button",{class:"button","aria-controls":n.value,"aria-expanded":t.value,onClick:s},[p("span",{class:"button-text",innerHTML:r.text},null,8,io),c[0]||(c[0]=p("span",{class:"vpi-plus button-icon"},null,-1))],8,ro),p("div",{id:n.value,class:"items"},[(o(!0),l(C,null,B(r.items,v=>(o(),l(C,{key:JSON.stringify(v)},["link"in v?(o(),l("div",co,[g(Oe,{item:v},null,8,["item"])])):"component"in v?(o(),l("div",uo,[(o(),$(H(v.component),R({ref_for:!0},v.props,{"screen-menu":""}),null,16))])):(o(),l("div",po,[g(oo,{text:v.text,items:v.items},null,8,["text","items"])]))],64))),128))],8,lo)],2))}}),De=k(vo,[["__scopeId","data-v-875057a5"]]),fo={key:0,class:"VPNavScreenMenu"},mo=b({__name:"VPNavScreenMenu",setup(a){const{theme:e}=V();return(t,n)=>i(e).nav?(o(),l("nav",fo,[(o(!0),l(C,null,B(i(e).nav,s=>(o(),l(C,{key:JSON.stringify(s)},["link"in s?(o(),$(xa,{key:0,item:s},null,8,["item"])):"component"in s?(o(),$(H(s.component),R({key:1,ref_for:!0},s.props,{"screen-menu":""}),null,16)):(o(),$(De,{key:2,text:s.text||"",items:s.items},null,8,["text","items"]))],64))),128))])):m("",!0)}}),ho=b({__name:"VPNavScreenSocialLinks",setup(a){const{theme:e}=V();return(t,n)=>i(e).socialLinks?(o(),$(ne,{key:0,class:"VPNavScreenSocialLinks",links:i(e).socialLinks},null,8,["links"])):m("",!0)}}),_o={class:"list"},bo=b({__name:"VPNavScreenTranslations",setup(a){const{localeLinks:e,currentLang:t}=Z({correspondingLink:!0}),n=S(!1);function s(){n.value=!n.value}return(r,c)=>i(e).length&&i(t).label?(o(),l("div",{key:0,class:T(["VPNavScreenTranslations",{open:n.value}])},[p("button",{class:"title",onClick:s},[c[0]||(c[0]=p("span",{class:"vpi-languages icon lang"},null,-1)),F(" "+I(i(t).label)+" ",1),c[1]||(c[1]=p("span",{class:"vpi-chevron-down icon chevron"},null,-1))]),p("ul",_o,[(o(!0),l(C,null,B(i(e),v=>(o(),l("li",{key:v.link,class:"item"},[g(Q,{class:"link",href:v.link},{default:f(()=>[F(I(v.text),1)]),_:2},1032,["href"])]))),128))])],2)):m("",!0)}}),go=k(bo,[["__scopeId","data-v-362991c2"]]),ko={class:"container"},$o=b({__name:"VPNavScreen",props:{open:{type:Boolean}},setup(a){const e=S(null),t=we(te?document.body:null);return(n,s)=>(o(),$(pe,{name:"fade",onEnter:s[0]||(s[0]=r=>t.value=!0),onAfterLeave:s[1]||(s[1]=r=>t.value=!1)},{default:f(()=>[n.open?(o(),l("div",{key:0,class:"VPNavScreen",ref_key:"screen",ref:e,id:"VPNavScreen"},[p("div",ko,[u(n.$slots,"nav-screen-content-before",{},void 0,!0),g(mo,{class:"menu"}),g(go,{class:"translations"}),g(Ya,{class:"appearance"}),g(ho,{class:"social-links"}),u(n.$slots,"nav-screen-content-after",{},void 0,!0)])],512)):m("",!0)]),_:3}))}}),yo=k($o,[["__scopeId","data-v-833aabba"]]),Ao={key:0,class:"VPNav"},Po=b({__name:"VPNav",setup(a){const{isScreenOpen:e,closeScreen:t,toggleScreen:n}=kn(),{frontmatter:s}=V(),r=y(()=>s.value.navbar!==!1);return _e("close-screen",t),q(()=>{te&&document.documentElement.classList.toggle("hide-nav",!r.value)}),(c,v)=>r.value?(o(),l("header",Ao,[g(Ka,{"is-screen-open":i(e),onToggleScreen:i(n)},{"nav-bar-title-before":f(()=>[u(c.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":f(()=>[u(c.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":f(()=>[u(c.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":f(()=>[u(c.$slots,"nav-bar-content-after",{},void 0,!0)]),_:3},8,["is-screen-open","onToggleScreen"]),g(yo,{open:i(e)},{"nav-screen-content-before":f(()=>[u(c.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":f(()=>[u(c.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3},8,["open"])])):m("",!0)}}),Lo=k(Po,[["__scopeId","data-v-f1e365da"]]),Vo=["role","tabindex"],So={key:1,class:"items"},Io=b({__name:"VPSidebarItem",props:{item:{},depth:{}},setup(a){const e=a,{collapsed:t,collapsible:n,isLink:s,isActiveLink:r,hasActiveLink:c,hasChildren:v,toggle:d}=At(y(()=>e.item)),h=y(()=>v.value?"section":"div"),A=y(()=>s.value?"a":"div"),_=y(()=>v.value?e.depth+2===7?"p":`h${e.depth+2}`:"p"),P=y(()=>s.value?void 0:"button"),L=y(()=>[[`level-${e.depth}`],{collapsible:n.value},{collapsed:t.value},{"is-link":s.value},{"is-active":r.value},{"has-active":c.value}]);function w(N){"key"in N&&N.key!=="Enter"||!e.item.link&&d()}function M(){e.item.link&&d()}return(N,E)=>{const U=G("VPSidebarItem",!0);return o(),$(H(h.value),{class:T(["VPSidebarItem",L.value])},{default:f(()=>[N.item.text?(o(),l("div",R({key:0,class:"item",role:P.value},xe(N.item.items?{click:w,keydown:w}:{},!0),{tabindex:N.item.items&&0}),[E[1]||(E[1]=p("div",{class:"indicator"},null,-1)),N.item.link?(o(),$(Q,{key:0,tag:A.value,class:"link",href:N.item.link,rel:N.item.rel,target:N.item.target},{default:f(()=>[(o(),$(H(_.value),{class:"text",innerHTML:N.item.text},null,8,["innerHTML"]))]),_:1},8,["tag","href","rel","target"])):(o(),$(H(_.value),{key:1,class:"text",innerHTML:N.item.text},null,8,["innerHTML"])),N.item.collapsed!=null&&N.item.items&&N.item.items.length?(o(),l("div",{key:2,class:"caret",role:"button","aria-label":"toggle section",onClick:M,onKeydown:et(M,["enter"]),tabindex:"0"},E[0]||(E[0]=[p("span",{class:"vpi-chevron-right caret-icon"},null,-1)]),32)):m("",!0)],16,Vo)):m("",!0),N.item.items&&N.item.items.length?(o(),l("div",So,[N.depth<5?(o(!0),l(C,{key:0},B(N.item.items,K=>(o(),$(U,{key:K.text,item:K,depth:N.depth+1},null,8,["item","depth"]))),128)):m("",!0)])):m("",!0)]),_:1},8,["class"])}}}),No=k(Io,[["__scopeId","data-v-196b2e5f"]]),To=b({__name:"VPSidebarGroup",props:{items:{}},setup(a){const e=S(!0);let t=null;return O(()=>{t=setTimeout(()=>{t=null,e.value=!1},300)}),tt(()=>{t!=null&&(clearTimeout(t),t=null)}),(n,s)=>(o(!0),l(C,null,B(n.items,r=>(o(),l("div",{key:r.text,class:T(["group",{"no-transition":e.value}])},[g(No,{item:r,depth:0},null,8,["item"])],2))),128))}}),Co=k(To,[["__scopeId","data-v-9e426adc"]]),wo={class:"nav",id:"VPSidebarNav","aria-labelledby":"sidebar-aria-label",tabindex:"-1"},Mo=b({__name:"VPSidebar",props:{open:{type:Boolean}},setup(a){const{sidebarGroups:e,hasSidebar:t}=D(),n=a,s=S(null),r=we(te?document.body:null);W([n,s],()=>{var v;n.open?(r.value=!0,(v=s.value)==null||v.focus()):r.value=!1},{immediate:!0,flush:"post"});const c=S(0);return W(e,()=>{c.value+=1},{deep:!0}),(v,d)=>i(t)?(o(),l("aside",{key:0,class:T(["VPSidebar",{open:v.open}]),ref_key:"navEl",ref:s,onClick:d[0]||(d[0]=st(()=>{},["stop"]))},[d[2]||(d[2]=p("div",{class:"curtain"},null,-1)),p("nav",wo,[d[1]||(d[1]=p("span",{class:"visually-hidden",id:"sidebar-aria-label"}," Sidebar Navigation ",-1)),u(v.$slots,"sidebar-nav-before",{},void 0,!0),(o(),$(Co,{items:i(e),key:c.value},null,8,["items"])),u(v.$slots,"sidebar-nav-after",{},void 0,!0)])],2)):m("",!0)}}),Bo=k(Mo,[["__scopeId","data-v-18756405"]]),Eo=b({__name:"VPSkipLink",setup(a){const e=ee(),t=S();W(()=>e.path,()=>t.value.focus());function n({target:s}){const r=document.getElementById(decodeURIComponent(s.hash).slice(1));if(r){const c=()=>{r.removeAttribute("tabindex"),r.removeEventListener("blur",c)};r.setAttribute("tabindex","-1"),r.addEventListener("blur",c),r.focus(),window.scrollTo(0,0)}}return(s,r)=>(o(),l(C,null,[p("span",{ref_key:"backToTop",ref:t,tabindex:"-1"},null,512),p("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:n}," Skip to content ")],64))}}),Qo=k(Eo,[["__scopeId","data-v-c3508ec8"]]),Ho=b({__name:"Layout",setup(a){const{isOpen:e,open:t,close:n}=D(),s=ee();W(()=>s.path,n),yt(e,n);const{frontmatter:r}=V(),c=Me(),v=y(()=>!!c["home-hero-image"]);return _e("hero-image-slot-exists",v),(d,h)=>{const A=G("Content");return i(r).layout!==!1?(o(),l("div",{key:0,class:T(["Layout",i(r).pageClass])},[u(d.$slots,"layout-top",{},void 0,!0),g(Qo),g(ct,{class:"backdrop",show:i(e),onClick:i(n)},null,8,["show","onClick"]),g(Lo,null,{"nav-bar-title-before":f(()=>[u(d.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":f(()=>[u(d.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":f(()=>[u(d.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":f(()=>[u(d.$slots,"nav-bar-content-after",{},void 0,!0)]),"nav-screen-content-before":f(()=>[u(d.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":f(()=>[u(d.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3}),g(gn,{open:i(e),onOpenMenu:i(t)},null,8,["open","onOpenMenu"]),g(Bo,{open:i(e)},{"sidebar-nav-before":f(()=>[u(d.$slots,"sidebar-nav-before",{},void 0,!0)]),"sidebar-nav-after":f(()=>[u(d.$slots,"sidebar-nav-after",{},void 0,!0)]),_:3},8,["open"]),g(sn,null,{"page-top":f(()=>[u(d.$slots,"page-top",{},void 0,!0)]),"page-bottom":f(()=>[u(d.$slots,"page-bottom",{},void 0,!0)]),"not-found":f(()=>[u(d.$slots,"not-found",{},void 0,!0)]),"home-hero-before":f(()=>[u(d.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":f(()=>[u(d.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":f(()=>[u(d.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":f(()=>[u(d.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":f(()=>[u(d.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":f(()=>[u(d.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":f(()=>[u(d.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":f(()=>[u(d.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":f(()=>[u(d.$slots,"home-features-after",{},void 0,!0)]),"doc-footer-before":f(()=>[u(d.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":f(()=>[u(d.$slots,"doc-before",{},void 0,!0)]),"doc-after":f(()=>[u(d.$slots,"doc-after",{},void 0,!0)]),"doc-top":f(()=>[u(d.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":f(()=>[u(d.$slots,"doc-bottom",{},void 0,!0)]),"aside-top":f(()=>[u(d.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":f(()=>[u(d.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":f(()=>[u(d.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":f(()=>[u(d.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":f(()=>[u(d.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":f(()=>[u(d.$slots,"aside-ads-after",{},void 0,!0)]),_:3}),g(ln),u(d.$slots,"layout-bottom",{},void 0,!0)],2)):(o(),$(A,{key:1}))}}}),Fo=k(Ho,[["__scopeId","data-v-a9a9e638"]]),Wo={},Oo={class:"VPTeamPage"};function Do(a,e){return o(),l("div",Oo,[u(a.$slots,"default")])}const Fr=k(Wo,[["render",Do],["__scopeId","data-v-c2f8e101"]]),Uo={},Ro={class:"VPTeamPageTitle"},Go={key:0,class:"title"},Jo={key:1,class:"lead"};function Ko(a,e){return o(),l("div",Ro,[a.$slots.title?(o(),l("h1",Go,[u(a.$slots,"title",{},void 0,!0)])):m("",!0),a.$slots.lead?(o(),l("p",Jo,[u(a.$slots,"lead",{},void 0,!0)])):m("",!0)])}const Wr=k(Uo,[["render",Ko],["__scopeId","data-v-e277e15c"]]),jo={},zo={class:"VPTeamPageSection"},Zo={class:"title"},Yo={key:0,class:"title-text"},Xo={key:0,class:"lead"},qo={key:1,class:"members"};function xo(a,e){return o(),l("section",zo,[p("div",Zo,[e[0]||(e[0]=p("div",{class:"title-line"},null,-1)),a.$slots.title?(o(),l("h2",Yo,[u(a.$slots,"title",{},void 0,!0)])):m("",!0)]),a.$slots.lead?(o(),l("p",Xo,[u(a.$slots,"lead",{},void 0,!0)])):m("",!0),a.$slots.members?(o(),l("div",qo,[u(a.$slots,"members",{},void 0,!0)])):m("",!0)])}const Or=k(jo,[["render",xo],["__scopeId","data-v-d43bc49d"]]),er={class:"profile"},tr={class:"avatar"},sr=["src","alt"],nr={class:"data"},ar={class:"name"},or={key:0,class:"affiliation"},rr={key:0,class:"title"},ir={key:1,class:"at"},lr=["innerHTML"],cr={key:2,class:"links"},ur={key:0,class:"sp"},dr=b({__name:"VPTeamMembersItem",props:{size:{default:"medium"},member:{}},setup(a){return(e,t)=>(o(),l("article",{class:T(["VPTeamMembersItem",[e.size]])},[p("div",er,[p("figure",tr,[p("img",{class:"avatar-img",src:e.member.avatar,alt:e.member.name},null,8,sr)]),p("div",nr,[p("h1",ar,I(e.member.name),1),e.member.title||e.member.org?(o(),l("p",or,[e.member.title?(o(),l("span",rr,I(e.member.title),1)):m("",!0),e.member.title&&e.member.org?(o(),l("span",ir," @ ")):m("",!0),e.member.org?(o(),$(Q,{key:2,class:T(["org",{link:e.member.orgLink}]),href:e.member.orgLink,"no-icon":""},{default:f(()=>[F(I(e.member.org),1)]),_:1},8,["class","href"])):m("",!0)])):m("",!0),e.member.desc?(o(),l("p",{key:1,class:"desc",innerHTML:e.member.desc},null,8,lr)):m("",!0),e.member.links?(o(),l("div",cr,[g(ne,{links:e.member.links},null,8,["links"])])):m("",!0)])]),e.member.sponsor?(o(),l("div",ur,[g(Q,{class:"sp-link",href:e.member.sponsor,"no-icon":""},{default:f(()=>[t[0]||(t[0]=p("span",{class:"vpi-heart sp-icon"},null,-1)),F(" "+I(e.member.actionText||"Sponsor"),1)]),_:1},8,["href"])])):m("",!0)],2))}}),pr=k(dr,[["__scopeId","data-v-f9987cb6"]]),vr={class:"container"},fr=b({__name:"VPTeamMembers",props:{size:{default:"medium"},members:{}},setup(a){const e=a,t=y(()=>[e.size,`count-${e.members.length}`]);return(n,s)=>(o(),l("div",{class:T(["VPTeamMembers",t.value])},[p("div",vr,[(o(!0),l(C,null,B(n.members,r=>(o(),l("div",{key:r.name,class:"item"},[g(pr,{size:n.size,member:r},null,8,["size","member"])]))),128))])],2))}}),Dr=k(fr,[["__scopeId","data-v-fba19bad"]]),Le={Layout:Fo,enhanceApp:({app:a})=>{a.component("Badge",rt)}},mr={},hr={style:{"text-align":"center"}};function _r(a,e){const t=G("font");return o(),l(C,null,[e[1]||(e[1]=p("br",null,null,-1)),p("h1",hr,[p("strong",null,[g(t,{color:"orange"},{default:f(()=>e[0]||(e[0]=[F(" Package Ecosystem")])),_:1})])]),e[2]||(e[2]=nt('

Read n-d array like-data

DiskArrays.jl

Get your chunks!

Named Dimensions

DimensionalData.jl

Select & Index!

Out of memory data

Zarr.jl

Chunkerd, compressed !

Rasterized spatial data

Rasters.jl

Read and manipulate !

Array-oriented data

NetCDF.jl

Scientific binary data.

Raster and vector data

ArchGDAL.jl

GDAL in Julia.

An interface for

GeoInterface.jl

geospatial data in Julia.

A higher level interface

GRIBDatasets.jl

for reading GRIB files.

Array-oriented data

NCDatasets.jl

Scientific binary data.

',9))],64)}const br=k(mr,[["render",_r]]),gr=b({__name:"VersionPicker",props:{screenMenu:{type:Boolean}},setup(a){const e=S([]),t=S("Versions"),n=S(!1);Se();const s=()=>typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),r=()=>{if(typeof window>"u")return"";const{origin:d,pathname:h}=window.location;if(d.includes("github.io")){const A=h.split("/").filter(Boolean),_=A.length>0?`/${A[0]}/`:"/";return`${d}${_}`}else return d},c=()=>new Promise(d=>{if(s()){d(!1);return}const h=setInterval(()=>{window.DOC_VERSIONS&&window.DOCUMENTER_CURRENT_VERSION&&(clearInterval(h),d(!0))},100);setTimeout(()=>{clearInterval(h),d(!1)},5e3)});return O(async()=>{if(!(typeof window>"u")){try{if(s()){const d=["dev"];e.value=d.map(h=>({text:h,link:"/"})),t.value="dev"}else{const d=await c(),h=y(()=>r());if(d&&window.DOC_VERSIONS&&window.DOCUMENTER_CURRENT_VERSION)e.value=window.DOC_VERSIONS.map(A=>({text:A,link:`${h.value}/${A}/`})),t.value=window.DOCUMENTER_CURRENT_VERSION;else{const A=["dev"];e.value=A.map(_=>({text:_,link:`${h.value}/${_}/`})),t.value="dev"}}}catch(d){console.warn("Error loading versions:",d);const h=["dev"],A=y(()=>r());e.value=h.map(_=>({text:_,link:`${A.value}/${_}/`})),t.value="dev"}n.value=!0}}),(d,h)=>n.value?(o(),l(C,{key:0},[!d.screenMenu&&e.value.length>0?(o(),$(We,{key:0,item:{text:t.value,items:e.value},class:"VPVersionPicker"},null,8,["item"])):d.screenMenu&&e.value.length>0?(o(),$(De,{key:1,text:t.value,items:e.value,class:"VPVersionPicker"},null,8,["text","items"])):m("",!0)],64)):m("",!0)}}),kr=k(gr,[["__scopeId","data-v-f465cb49"]]),$r=a=>{if(typeof document>"u")return{stabilizeScrollPosition:s=>async(...r)=>s(...r)};const e=document.documentElement;return{stabilizeScrollPosition:n=>async(...s)=>{const r=n(...s),c=a.value;if(!c)return r;const v=c.offsetTop-e.scrollTop;return await he(),e.scrollTop=c.offsetTop-v,r}}},Ue="vitepress:tabSharedState",z=typeof localStorage<"u"?localStorage:null,Re="vitepress:tabsSharedState",yr=()=>{const a=z==null?void 0:z.getItem(Re);if(a)try{return JSON.parse(a)}catch{}return{}},Ar=a=>{z&&z.setItem(Re,JSON.stringify(a))},Pr=a=>{const e=at({});W(()=>e.content,(t,n)=>{t&&n&&Ar(t)},{deep:!0}),a.provide(Ue,e)},Lr=(a,e)=>{const t=j(Ue);if(!t)throw new Error("[vitepress-plugin-tabs] TabsSharedState should be injected");O(()=>{t.content||(t.content=yr())});const n=S(),s=y({get(){var d;const c=e.value,v=a.value;if(c){const h=(d=t.content)==null?void 0:d[c];if(h&&v.includes(h))return h}else{const h=n.value;if(h)return h}return v[0]},set(c){const v=e.value;v?t.content&&(t.content[v]=c):n.value=c}});return{selected:s,select:c=>{s.value=c}}};let Ve=0;const Vr=()=>(Ve++,""+Ve);function Sr(){const a=Me();return y(()=>{var n;const t=(n=a.default)==null?void 0:n.call(a);return t?t.filter(s=>typeof s.type=="object"&&"__name"in s.type&&s.type.__name==="PluginTabsTab"&&s.props).map(s=>{var r;return(r=s.props)==null?void 0:r.label}):[]})}const Ge="vitepress:tabSingleState",Ir=a=>{_e(Ge,a)},Nr=()=>{const a=j(Ge);if(!a)throw new Error("[vitepress-plugin-tabs] TabsSingleState should be injected");return a},Tr={class:"plugin-tabs"},Cr=["id","aria-selected","aria-controls","tabindex","onClick"],wr=b({__name:"PluginTabs",props:{sharedStateKey:{}},setup(a){const e=a,t=Sr(),{selected:n,select:s}=Lr(t,ot(e,"sharedStateKey")),r=S(),{stabilizeScrollPosition:c}=$r(r),v=c(s),d=S([]),h=_=>{var w;const P=t.value.indexOf(n.value);let L;_.key==="ArrowLeft"?L=P>=1?P-1:t.value.length-1:_.key==="ArrowRight"&&(L=P(o(),l("div",Tr,[p("div",{ref_key:"tablist",ref:r,class:"plugin-tabs--tab-list",role:"tablist",onKeydown:h},[(o(!0),l(C,null,B(i(t),L=>(o(),l("button",{id:`tab-${L}-${i(A)}`,ref_for:!0,ref_key:"buttonRefs",ref:d,key:L,role:"tab",class:"plugin-tabs--tab","aria-selected":L===i(n),"aria-controls":`panel-${L}-${i(A)}`,tabindex:L===i(n)?0:-1,onClick:()=>i(v)(L)},I(L),9,Cr))),128))],544),u(_.$slots,"default")]))}}),Mr=["id","aria-labelledby"],Br=b({__name:"PluginTabsTab",props:{label:{}},setup(a){const{uid:e,selected:t}=Nr();return(n,s)=>i(t)===n.label?(o(),l("div",{key:0,id:`panel-${n.label}-${i(e)}`,class:"plugin-tabs--content",role:"tabpanel",tabindex:"0","aria-labelledby":`tab-${n.label}-${i(e)}`},[u(n.$slots,"default",{},void 0,!0)],8,Mr)):m("",!0)}}),Er=k(Br,[["__scopeId","data-v-9b0d03d2"]]),Qr=a=>{Pr(a),a.component("PluginTabs",wr),a.component("PluginTabsTab",Er)},Ur={extends:Le,Layout(){return Ae(Le.Layout,null,{"aside-ads-before":()=>Ae(br)})},enhanceApp({app:a,router:e,siteData:t}){Qr(a),a.component("VersionPicker",kr)}};export{Ur as R,Wr as V,Dr as a,Or as b,Fr as c,$a as d,V as u}; diff --git a/previews/PR477/assets/dadyujg.CBBZcGwj.png b/previews/PR477/assets/dadyujg.CBBZcGwj.png new file mode 100644 index 0000000000000000000000000000000000000000..a32b49edf9ca4637970e60e68a9c02777ca36200 GIT binary patch literal 677870 zcmeFZWmuJM+buc~K@5}-Q9%hYXr)UKL_v^{mJ}2T2}M#$krY8u5djI6l#oVRM5Ls< zRX|!&I@Xx)yS}x5@BMQfdp^hUNXf5=S~Ms%!Dhl(i+Zhr~1uq9Bkhbp3Od4Lc$Ux z!2F8p0yDMD-V()Y%=RP&6dY;?KgT|NvggScQZHs^wK$&v#pkEIcgCG!d88q~W4t7+ zKWem6zj0ecFRQzsjm=H!)9r@0;ph3Y#l;sQ)nys0sPXRqeI%`a%Qg6)ZwQ35`*yDX zpYJAi|Nr0o-?s)9*7VrniRhf1oafJ<%RM_DpO`p0GIE50p|`8+b3wuC%F4>xT10qw zyCcc3?OV5ROS&#SZRqLg$+Kv^oUhbgu+VT%UqL}ZP3?s|TUJJfc~4HVkIyA*`j3}K zhKFTkWi!}?goLJh^E->RTwGkjcnrE;?K*H=o{fg|5Z9SA@-gkMOH&p}FNk5*CdC>& zWLdP2Ku|UF_V!NI&7Ek8SF|h8HzmJwXEK2HG>=hfUu9*yZyh-Y+0LC;--?7Z1RoWg zXiHYt?3a%cpNWr;ztfp+P~>PWElr{%@nCVREA!@^ObtQX$|rP#p4;amO>W+N`TF&3 z6O;GGX)P^k(qnn=-^*|a4l|g9$j3EKknT=NxJ(b0m7S_1Z%^cjUKYLo$L(LcwpH9rz5VP@X=w#R!-2{``aAJwRktNP zw>HR!Ru@Kd4OsEI%sa~^352E=+*D`k^$)6Na%%KdRnJ=YdruO}hD?(g6MiT+roX4AhW*5e6X(v&jnsursrksv)trvmclhj=hK6)<#XY_na*gXBwA037n`JCz<2iS^Mv6)e{8z5Mj~xXlWX34k+e52@FX<|nSAr7J+0iP zWo#LE^^~~Xuz&5P%F0SJlpg_$7ljT=SFhsLDiaPDKQ5Nq-cT3K%*nC;=1*-^n`K(J zwmAObZEMB{A6x~Yjh|wPgm7VGXO!FKVynu+Xe0gbct=`q!TnL+eMjv6O=w0q|M_ub z=lVpt*n@$(+S;z`yu6=!IIeK-*|+be}w#dR<) z=T4`xsWR~`nh3<*Ns=`*G<0+nisZBD6A2ZKR~yeC^r$0uXFYME-C79CieNZ!TtZ$^ zaY&@0xjFM@RqzS9;MAP7lU4V$)Ae2Ehp)&GA6_!=?%pFlELs!lXMa_2rg_g1kRQ|qQA0c?BBh`IeqM9S(b2I!Qh25}-*)+L zf6&vX8tL=PgPyx~?P|Tw#Ka^eB_&h+^0dl+CP_wGT6I;`Cajr|bx-j^gLs5ocKiLo zly475H*vY=&YiP&Y>JhxCHdUd)pdWgp}9LjDYA6^Z;`!L|GBG5N}JR9gI~XXUHdmF zjAWdjx0CU|!AxDCZ>XzV8>W8Oe^Da(|scC7wMy3S@DmF%+mkVaJ zu(bT>(qCL${N>A+NMYNAxVVFKblttZ`BvTYQBDJMOG_Qa?_ckz#&w~e_fdm&NL@HGChpFh7GSk~9l%0pm_JNolW}ukS#qd*n9v@aU+pMa#F!N*^f-%A*2QxBhslPk7w<{{6d2 zrcT8@Dyt{lPc=A*@%gVWY+}nD`BVH?1fdnQGb)Q(=J(K0yD1Ml``p69Wce8c-|!V> zC%1pRc~?xWs92{IDO59JNBXzu zhJf$250@>v~Vvuk>4phVAQFG{}Y!oK4YIt%B9MQmmUN)8=53-v- zQ1_aMtX0KMJr-HSzHStFzB(KR>-qZ=s3NG$V}1GR`l`lS*)g# zk!8Jx66@!;Yh4=qr;-0aL19m1>-X=z1{~(UCWnS9?)6pp9WXF3SbeqsnAn(>)kyP8 zY^KJzZs9SN@)?tjmANBFj-ceI56Hwwy1#h&QZ#sdeWpw=-zM$tJ8YLqv;?)4=fangGanxW{~avjHNQ}wm6M~Naf4)A%U3Nd+-Y&_nnRUz zK@MKs>NqVet@~0uxrY(9=#vx?-Ne$M+o&p8G`tlRv*l)GmAOA6C?o&!l+r7vXwhKx z<6JWF%^&1AKNZ~{RUYXPt|cxrUq_y0JBPIv)AMMkzHk;o(?J6f?f2-j#=Niqo{7l*Oj<1cW{FTA>5XEQ_ewe zc5ZI>{{0Y|!EMmj#=<2%i{_HFj}l`Oq;J3ABU- z#F}QI&4mkJK9y~8$h&QCF5C8fe& zv(0vqk?n4wT(Q396wJrZUlqileeK#i7Y7;nt5<(uxj5>zNCn&mE&nW&5eTzu7c+nr zIF`58XZEV0iwPnYE(aY2UiyLj9Bqg?z$7{BdbRb&-0w=O!*$=k-$t~)d-o1M?#nQK zoSQ3X@G2sr@J9I#$No@G?b=&>Vw1mr&;RQ*n&~fEMhW87N~ID=+8BB!)zzJQr*lt7 z|L1!{|0X-JD2+y*o0_U0MvG=jZ!)?=)<#GT3U7nO!wr9 zV+U(qo?h)bG%_>On22NxS7{z~Miq3$>su+bCMe+si=1W#C>exuYzLzaa_;{6IyPo5 z<~sYcoZqaW>3XJ4F@A*JC54vK^zI_JUS3=v>c}o8H|E0@vWiGRuS}cO2mS*C16GS# z?^Kf*((@IfCEYm=SI2)pyx}Zl(Q@new*V&h#cPp5);j}N8pgS}xzTP`#}i{XoaS7% zHe4w668eoCCp)aM#!Mb7@0edSRIPWdYBx7(mOx!6D`_p)v0HBs23KVCx|s zeFS=3pR2)x2ZaFvyX(0^6)L`d?b`S2*Dou%e>4GXh-4$Smo;5N_CUP6My0npOPpqo z>(OXyYda>td`Vj*ARzF{Kv!R%%fER8`)ogs@aw*G`}S=T5|XJ2#Kzyhf31$&+S&>| zj@`|{5@*&Jy?gg=fr}`mH}(#F5Bi|^ug@tea?XxiY(`&DU}yw@I_-M)pOv{G{3-Fx z>ba6U*~UJqG!BVASTuJW*Rw6D%(G5SN*e3Q<%~4OGTA5Jxcd;{6WVWg?HV=1GiGl_ zk-HZ*YpyA(3buE4hVkeY+OroWq0n;VtH$3hE=Eja@2r4bun2{Be|hb%{PS_(sdmgz zvcB>Ct_7 zOgCI$KmI~`NqPOgfb;APp=YtnU%q~ok)9Ig;R&vfUCmE$V_dZTp7MV-BO~cDS6q)V|Bnbk#Z~p4xvQnvTggqpV4Ck(2{O(gwvYTtYEF zd$_v4$cZckRU?yoXmPyNt?=rpo0AMQGFquR@ARj>e7R8mS58*8Dc;5e@xGed{M9sZjBxaONH&WO5uN^P2+;sMSld%=mw0>6YkGI>?9?P1yq+{J&kUM{btq)0jFh%@&Fn=tQ@+4&2w?jJ{Q&q7^^*L+ zafB^rz31{@1H@V0?l@)&)}(7+8AR?fi@PrTQS$iO+pG7Tf`Wo7^~@M!(9N|@+Q3Rg z=u``;#}A-U0Mxkp&wm|zw zf?DF5+3njc7Vb+1o@+776F2VMDKf4gx32wgHD<_VX5f5YK)#<}Rj+Lsw@wKK7=Wpr{`MKGcgd&3p5$ebby;?pt>Z1r zAU)N#ui|(kAh3W%i?4;q=Z<(b9?g?Ke_adDwb7f-)XOSb>@)yGRVL_WuP&P3=W z8=H5`*_HfDBcf<`*p$Wm=WpL~Ra2p%4cE{LRc3_I_b2s*MXVB`TpL|s-$_!!m&hw@ zG$qRet}`Xeh8`XsckkYnm#;>hJuc~XCTW*!Xjm9HRKDl-RzpLB_w(7=yN=^Mxp&Ci zW2j}ole?}`+=CKs3K(R|USTvH(4;9v` z>nv)>2pxD`cQ>L$*s@K2L~dnuH8Y-0f+c&WQjPP3P)h2@^>nH8jjj%3E%AXtK|#_& zn(;%cQ{DWIT2#MA0%Tc_W*P4;-9|q|<9=u-l&n$fbU==Rot+)kKEU^yN$4>N=jTz= zcy_GM=d!ZxXHr}8W~4iI?6h`GsqO14UK2BK{gP3oKGGP|4)jj>VNR>IqT=F+9EEQ% z-jAD`TM&<_0SlL4k>J4K;Qf@8LH_>!!NKUi=Zv&7Tj=h*D0EK_AB5s?!Qj8NGCVi; z-*bf4z9U~76A}{0ckLQPmqT6TH7vey|Ig^C=W@SOZ=UrDZ;J0K2iv67*g@;!;=DWR z)XyA5w4BGaqbCYJeVROl5IQDipENH*bLrA0aLixp_O^qioByqjXr4DCq*ecbbS1A- zl(SMke#y}(-0a)1ZgZh9YI&lm*yaBD{Mg>PxC*Y>opeP4v~DNg|L4JBz{3l7%|C^*?A3h9?HGdGc?m5W7fYxd# zEv5DB`1#+bUx^R5Tvk@zFGWpH-wEn|g#Y&2^R8N=VmHCNj8AN?{VTdR#p z*v_5%Sxzeb@Fwu4!S?h^6-nyUcr(R;p0&01FLMIS4s_Q}(geh6tCl)u8xwmg2M-Tg z^#jBwXh{m=IBkIJRFc9cQipZ5{8FNX(oQM(A2^L$`Pp7QM*y|`{UGjYeMq=FVLkgV=*G`-*&4EQ zwLFa)V$QS73{m&)-tEdZYy4UM*upivt*uSrg8^$u5-Q5(`tl%N3nf+=tZ1T*edNt6 znRhF{{Fs!ZC2BmWip~fLY4v~q&s|qAucwnUAsYQteNMM`meLX7Y{x=a%c8Nx-ALj1PUSsNm=06Bwqq zAN&JG?{{sd!3oXeKb@$RUEOq?TKkUhc~i3OzT9#nJ}&MX9|%#U$vwmqv@u#RI_O|_ zBMQ=1!IyJEFl!U!E?r7ybYCU;Bemj(3fvlNG9?QBF?BN!#F&tLtfSTMElS)wtx ztik8I(xRK7v1VrO?(YA}bS-D*hN`RG_{d;M z6s1lARaQ0Bj?9DJ85P)FGBr|00YVkOt-i99;r(3FeJ!JYAF4cv(XH|cC=nU5_@;%E^iOKd_HF~)sH>?#k~CLv zaVe124e2bHAw{$J_ZzFt@qtlrc6N4UB+Tf=ixu!~r#zv-dCOadI0h>48Z*PoBSrvZzWDB}lmXwqv@A89W@7}$I-5{F*2DfZ& znT{Ui=qk4@+k9Q$nyh}hP~Jtp+hcRB#BKG(YZuT5uYF8zvm`}xGo|anL=Y@9asr}T z#h-hQjtPN_-A=(nJC(%cf{w;-N$fo`TzsGLbW*7-MYxc)uA5u2%scrjS3obHq3AJJ zAgfaz>`OMSdz~2`#;y0Ar+vY>Ax0|3fa6eL=O-hhYuCzoOB|;oVvD{*yJ>bHoAW0s z9Q5?9@q2t^sQx*lA?8Y`6N6E{-j|X=U|2gn_UOTbvSC^7f;2Kj(aOOVqAJh7xw+=7 z=b>uHZ~g-RIyygjUxIVf0Fw0EdSI{=eS-9KC&+KhC9f{w#?H=V06DvYVo-%|0km$* zZm$9Yu3WzC3#49m9~4hgNbketAgF|6OP-tmw1os}(4&qQ`9NjPRwN6P3M>EFH%CNqYg&(V7P~Ca^BQI_ zBqt?7?`XZ2SC0 z93P*U>r(2^rtu?Ft@j82?Or-EfskG<-^FBZs7S@0QhFmMy6UA=To2<*-1)a}-zaLA zAOL9;va-mcHw+YCUvCuvIdJ^huqcOdHL-ihVpHY^-8RiJIvj7~`u2p{h5?gpneQ3pKI9@m8~V{F#i+WN_$C}HGuspQ8Y zXDvVU4vP0FsmKETQn%{`CKe7eQL?PN!Ot|36H?RCRAMC0+mERVU277&1z53b-{II* z^#tW8j+LxTiSy@GqQv4ILO8E!{}+^{zkVEq6ihsL@Ss(97I9WKan!iGtLthw-w2vm zME-pYT?R^A_x5B3$i6o$c|gR|#l`v~y2yEY@hMUkh~K8|A2rc08LQkEo8_ihk={M@ z47_4u54JW|ZES36D__gANlHp0U}Gu$LNzrsh$0)HdTpf*&^SgOUF4Bm=kF|y7tB29 zm>NR4414{WM=$SclSBq$7#QiN$X_5~s|Wwur-sH?4StL8h>Ak)S*tewNtEl&8>%6F;vaWQS<6Djkk7osh#Gu@Vn!Xbel=VZ|Hi3;5yXn@Avxf zhdWbp%$rSsVsds}y*O81$>Yt77hmtaotLlos&&79{d(Xb zZkl3d<2y@pOEZHr6BD(6Ec!k}MhPS$!V0%Z^=y^V6XaOaMt_mu6NpJo4SjvaLx*0! zdi5$YQqR!P#?%yKsRFFj+1c5AaDrb-Y8$-(-5PWU6(l`9y=ULkH__3@j~z2mRsA_J z(F2-)%$KUZw)RPIa6_HanqA=kcme7-IXUlxZ~|4^*|jwJy}BSREv=!Uar<_HK2JWV z)a-0Vc6N&85&I9@rIR(xqvzS#$MJ5gA=UNuX__fo?YcMW_t{CHRvVVOg-1r-F*O~* zHT2z&5d-1^9Yw9QE9h%)Z%4)$$XUb&bxt^M&DZe)0mWxy*?P0h4zS3+Q}y=qJAL}J zA{!0J24%Ye*+YF*5e#+kQ$HSEht&3<&rGZ=Rak)_&+mLqqV>rx^P} zv#{(;kE$)*OF5FehOrx=?d<<{7wo%YKonL9vE;Fh#9#d9@$kV8B9i`p`OW*IyNaP5 zLDeP|G;jJ+QSrDzOhly3#27#NsdVDENP1q~e_xXLfAWXKq3{2G{M+f}{y$$6{;&JS zJ11{1K`<^U$$YTXy>=Yo0eUa}m>h)52H9Ot|3ek@>g~&y6)Fc9MVcxqJ~-BWPb*oOh6-wEcwDLs zE`%*^&&d7z_lsF!aZo+aIa}4B zI~)T9lEV@S7rId^$Mc8LLE-Qca>R^;`mi#>>$|KwO-RyFZ7$_-eZ|M61aWvvUbNK+dgSGjcsjXA|q4YnnBnXP(hQpQ~Z=* z%PKJBv;FeLi>zBUFCLNZY6;^f5F(OOlOJH&B6tIAu!r*Clw=mt^zO>bQ;_3Y4`%92;W0LLh9Iy-jkuq-_*meQI?AXqAHekOcnK>u?WkeD7DTS0q+%E2UR zH;i#@b8|Cvmk;hn)wi-R@bA=>&ZS~t5WmyG6+Ew(4SzdWR0crIQhxr$|CL96O{0h&MVmR;?l~CPti%Om$^qW!#~`#jLcd zNCh3?zwAuJ@b#-*8WLQ~Q!7%IV>oHV+8x=*V!-jNwa44tzp1zKb zj){rMrAt29+1dH|`KSs)oR{U~q}NyuFAN!xgRmk^O`6E zr_j;Yrl>E(zw-2*YJtu=PYV@rtD<8z#x))i)%c0RT;fBpNZ`bY$6D%kc6RVgwQKC# zdT zJ<6Ol?LbN}>CcO8iy>#i9ZNIjHYbx^UId zq^fC75ssmlG=j zTBouP4X}QQIR4BYy0quApEFP&sxyRcGN~U>;-K{S)Vpl1ITYIecyn%#k4bly>BbX` zj#}?K4R~(57tX=hlj%x-p z3lbz0LqJgr7Fi?po@9HAn z3txCD#&Q!{BuzA~ex4gE_eS;s)ngiqu7%S1cs^(u(E;ApJ(wI4(hSE4^1Iv0s`EAa z5R55Ax>9i!UjvM;O;rcd^LF{AVhAg3puE)66)XMt{d-nN3uWa7sH$YSBoV^49>2fs zjv)F|P_C_lf3H^i-Smhm!$)B7)!Ji0L$DHC~vsp=laZvu^g_~vWqsBI+&K_yYT4_TSv z1tun(`Jz z1r#yi_zuc_a&oc&zw3MAWagtL=ZI!sfBy+qR{H@m=a-o(j~7eRV6B--dlMKK$V|HG z6gLi4WJB*>C>u=;zOuM2oiT+8Ra`d224WrHG*VY@_44whA8ncB^zNmg>$S z0{3;H`Wo_eF{i(&^9R~GI+j2K#b&C}3}u8ze*RR|(MjSl!+27UI4CU~157(Q!QQ%e z97svy_F?|pPi=h69=pTi7uO2zoZup`b6qPj$)J*=7pAJ7S-B2b52ynf-sI^8=^Qzi zqVI$Va7$q-UvSgX>JT1uyZQY0$e%xkYC|Y%0=)>CrN8}kDv{ygl$eEMqP^%W=`!!V z*?Y6HstRSFR_2?@x!%50kiX$g`G$GrJ|yO@vDqHyn-b=*iN5b2r7V;j?A_$ z85(j-o>izqJhyJn?EL)uPrHWgR*?mo>4zB@>IS$b#)&CGMz*m?^hI!UTlk2`RKr#y z@TnB|F?fiA#Ver*^F$5d;TYpOl|>OUEbVRaC7=*%Ac)80l;*W~4<#AkR(7A}5OVnU0xYl|@F#8Lq@_*cIdFiu zfs$Zna^a9skpjuk(Row*j4D7D`-#fdP**4JwvrJae=_Dc6H}Szw#VZsvf`RTr>N0uhAr{s3?qKV}W+1&iWMWFsppw3+qeQVk-hmc8xudB48!SEpNG8hfdDaZ|#gKz#s*!Xv zgJq2!bSo=E&+t_l)}en7Z^pf$%aTo6KrpvzXedRA7UBy;qM)X(4kQdgJI{7ddB#}z zt;pPHjOTnSnplqCH@^c+EmfK_@;7cUM}6NbPw=|IM3G_baNo{uB>-(`o)#uvczoZb znMkb;)ApR)z)WfN!AV@yXZvxQ{vH5{RY%rSr%u7r^3M9Q<)7DLVq!g;Oh#^VWbR5t zU*7{c1}3IYZo4i}z(^|zRTUIDUM(4x3BcoV*3#=rl&@l_=Bt=In{0}~VH6)+92y(@ zY|(nkBVyzOh{oo;an<^7dha|Yn?LN5l0KmX`uyv(Ih6u4 z7Z=2uplwZ%)rX}zHf>4N>j@Fod=45Ic+ib?E&^cA7@%5YP#aj`l#VTXIXqSFoSKd>rUor5vDwI6F&Z zIC7-f;_KTTP`=lGhP-{dfoZgdn3PnE#~87&i1`ve6?6_amN<@klC-rDQ+yF17+eux z&dSVe8MLPU&AE%))1+_Sym>3`l#Xbu4MbN+H!LZHITKg{b1Jl&C?29p6=n7G@Hwy2 zR2qr2B*t|wDk2AlSy)$3FY?WsmG$-PbJ9_}HsW(>tIKY>aAY1aSKlqv;Ed3Oj5yzl zTAASa7pCe^t=v{4^inj}3Kb@iyAO}aUiyjgSx%-lQnm4|XvH!kYlu7?2f0?=d=W1x zWm{_98LOhCJfoFcAI8EFCT@A;3&UQNFZ#Sry3)UTU_U`?n0F^8B$VFBu>Q8v5V_*` zK|-3+a_`V@G*E|LafwlRnuj@uITqE}1AcYn3>DtL)+}`w= z&hGAT$yz9pO(F9i8G0pq>goc|uVC#LL+OuQzJ8(Us}sh!Ig@We;3xVz2oDn(E#Bwb zPp~SXj=UTEh2&WXK)#_B-HP=8xUXDXLARWKhF_5I5Lk8yA2YQRg>TM`J96mJVj5;TV!=g^E6a z^zn;%&yGLr?7lNUYFM;bMzH+w{=L^gg@~Bg{J&l7OXrSXV8Z+bELj{UDuBYlKJua}N!SbcOu}*_+c% zr2)yxy|RkRXd>(fl&+u1ROQ~Wi*M{*&+{wWG@b0+ zNlq>Va@${s74W9Y<1fYQ?VWeSz}}bR;}Sfkr~}T>LJ-M7dKO1+X&jGJ>wkVi%ylv? zAN3~P?ixJMtGkz0i00`2glH+xbk#FEJ+1Qc@~n!iWc+owpedZEw1)+~6bV;Icl;q$ z3mELpn?v*S^XPCuvv=;?(Vb3#0B<#B6q}Q?2(E#-F^0@wC0F8?bBodFEylhUDC}nx zxscc`*MtE;Z*T9yav-b^`L=^v$2H$3ZuGw6o~)7TyhuX&I;Lgy;9W*1kVVKKWV?3x z`T225HD)AS4WGwBg85c-ypco;219=SY?S#Uw>=3TuTyRmlx-0=_JpKlv{2hfidvT9 zs@ChA=^YQFAt4YgPBQY4>CiWsB%EQuvL9_YCd88m4h0AS86&8q$Pj*j+E7j$!+=%r z7=0ksZzwv4Z(U^#advTOZm5T<-L+1_jj76c_qA6x()VxYZMbQE{`^^_N3LLgLA%Uj zvnyg<5EX?SAo6$B^+L~WNj<-a%3#hUH$9@I2@$lF8ILFM^S_j$hg`L^wDhOw=x6v4 zFptj6Jl8Y3;|zSiTRzjL13$4gII_GuvfcR2=F#-uerC8p=nfwIrn0`amh~yN9dxh` zXa;zcY+Nllr$amtuG@*8+>}2Oy2rNxjgShN2GcY$8vC7Vm)atqKYs|MUV+wIRdpK1 zw4u)kvt7G(ZKW4p3Os}hL0;kr21=%{-Dvma%a?Pq0u+1;)!6mzlM)&ypXp)PlgnL;lQkjbTnC<42s=UOZ;9b%T_d7=z#hL z1{N8%E3?0HnrSbDLf&tsPC6=VQ*1xp(!>4CrsI>5isw9x@M^+m8}58%roX@~<*%Gw z@=X=>gktGYIdU715;%~(pTjloJ14(XhtSZH>S*<|NfsJAf>=<{#5gr^EbfaDSBW%U3=t_gPq-bhl2=e z^JoyHx$;tsqMBjb4%SKV+QqvXgZIY?nsM_i7|o?57R$MjOie19L{rYFCQ3) zE-hWh6ohQZBdcp|TOzc?F5`oJX8tKcA;x9mgEj&pB5yj_G&>)@qMAp3A?%yA*wS!* zZLrJ}iVEmeF-{CP40RptfNs%!=p@F36L!#=7l9>iGi+X~E#npPSqfDr{rF(d!96}@ zWm3mHD?omKet865pO>G%jPl;~OGF1vIN@SW40;@j#-fRrP;qQF@*K@!p%o?4L7*!i zsqXJj;ZX>*^~oip5qo8wVasT-AojX8jFr&C$Z1T^^fRTPr1E5@bPY`NZAI*oZTjNy-D7!$$lR^lyy%6Qjao zb(si0#O(sTZl>o#n{YGB$CAB20{=(XH78AzUC*Jv(Qu&|u}?oF9tF}oMjPd>d2)>U z@wA!WHk#=rpH=l`*~6Kq*2WZcSi{`@9Pn^VqF2d%jk`^!9I zltDvuM}KQ-YO0h&q_v1^Y;5Gk!8b#GVXLlKn>27Cx2@Gtw`Zbo9=jI%DbqGYj; zKW?S%rO+~F+6(Vv3DqJY$&U9`(elT?C1%0D0Y8f0i)bO3|GCQ*M`mqu`q>~s>=WI6tmP1=C{QSA;6}&S?-GRqz)68?vp@jBi z7@T_Pj?;)7yJ~)k{0-zSjm;)jvAH=GZ_GVq*l6a;c}GS+4G#~)+~rY-Nr|9PtQN#X zh{2vKv&J(1wU)(J%c?jlaah2dsz^XkFw{^Fkg$7s7ZM$IS2u%dG(k#;hK{Y?@E!Q1 zbN=!K7+W6P-U@3_28%Cqad2=D6c!$(g{aE;`M#2}a_QWGE$OJubqSz`V||aQ)b#cH zQnYyi%cP{rkj|QdEpimb+h1YnlQ&YrU@_ZxhuEo8oB1#0*`|iZFrdGa;HtZs$wHb( zuV;Ao?pe=SSX|=m92}=OWUArD7z?zALpG!Tr@X7llJ&Ts6v#cv5{a(%97pBFC=;GSMS|BckJ`qq=^R!Yh(BK5KY76%rMj? z+i<(Ox~~23gvAoMG}j8pZ?s*m34uG)a}xAsQ8-@pjJbToS^ZYzi^&ApuJG(4qJLw`4vZin} zm-PWiC1qO2DZGY0qfn!O6~6sbGznU@X8$2eD?r>~;#*>1Of40(XDC)QPj>N>c=jRz$`1bYbhhKGs&RVWx zfEl&h77hYMoU(z*WOjT}esh#vcW^|KYZwBkd&zgtEw3Vs1Q?Pgb=n>lmSn9VL48Oe*AI&*H^NL zL;wvOdT=X@4Y-5#1=f2L8VZQe27ngvcYOTHCmE=GTZuoR1I7l}miz7i!3f{`UD4&c_a6KbV|bf{5XAU29*R?edDu`Bi%!e z)xSkET{DpW265H^elXN;2o-dP4~xKTS_p?0&Uf8oJRMdyp8Z&!O$^iA{+}2rTNL;9 z_eX7SWs{oBO5%7E`WeP9FwkTUZbP%3EaoM;-5R#wj3`3nAs3H{+`WN#@fr<7JH_G0 z!nKc@DPyd_qG*$~w}7trmZ)+u*ZPx4!Y5M=Kam5EP}My*shMJoO?JQLc;?xHbD|z0 zI16GFi~}US0P>(w@Mao$te$lJ4Oq?HWp(>@!hEcm+ZTF*GsRK~`^Pp(8`R3FLYVZY z`V*s~46t}RZ%SW{k&OED%-^4?*cAtuZ;3Z!45KJ7-()R!`PuQbf?0SgW5da!)&eR` zLLdKaX6Wub+f}u>E_s~Ne7K}>IfCe0@hHNn zjUS0APX*YWdfv~6@=~%K5z zRVGR6{IGh^ZLX5u>lqIhSKQ2TXCO&|)ZMWROOMp!f%LNveu*ek?ChiVH1nF9P*ps?L^(0O(_c$pmK!a_jBeOOk9%M$N zAv( zrf`>Ww5#HP6b^&dmzVzjZBkD6f_z;hc<-J)G>bV&eM99aUYZ{1cG~lck0=Nt!58@r zSLh)&08Z?UW?&F7zdP2%(sKx7#}k0hlpIRoe5QyL`;NLg;)$Lqew?{rSymCW;^a&L zgT`kYjB9-*o`fplrJw!x&mhx;ENb&lq-~efK8zZksf*sKrqVqfLPc}vP=cPZ<@fiO z0?qxUdBTXt8xeH~NjC+svrqa3@8>U9!7pQ~>FDIN48z({1_o`T@LxePks{KG38cdH4He}o6cEJgMzvX2^@O!Fm)Su1Ks z$7?*UU5{~J3jbA?NQN5*$g(hR-0C)qnTr}*z!7s;B;xqYFhcnFi83OZ{=%`~V)%z1 zk?t~IH`T(jt?lC!$2Tc?MWCq~_K} zjtMKa+AcMDnf|XaMJJ0=M?xL=(%<1EmOoZXDc1#jw@E zSZwvjC$oCV0hIfl-2aG736&`>j!lTc^}RTxURb#>J9HYACQ9_!DR{}i&M%ne@<}V5 z>)D}=FM@|qpBsEDa86_NNBGOAD59f3!ra&x3fPY$g}3_<@Z%jDo122ew~AIWGcwLV zG}|)Bo&lkPp~CopJS1F5C?~p<>)WPMCfMJCBogP#~u zZ5^XV>9rZ^hx$BN1@YdoP%7d8)#$YDL71od3SPR)rq)Eb7h_}_ zazbv;@qg$Cbz1Sp1|<(dr$v6$)><~dzl0pX08pSgLy%Y@>@=n3iy^>8pLcE92h;;B zaSw>t5@CrO@wN2INZMv(?jR{rZG;@Sy`dz;bSu5V|{j9u&#m9 z8W0d7&j!0r^B;wIu{V6Cd#3%iu)R1Cg;NV?#NgC$6HU#^I>=xvQ6*8tAYSA!Myi~8 z+1=AKPs&K7-Oh6|jk@~?2dnM@{h;f;HRw zcwiqw1!GO%nd+JvIN(wB=rugm;UN~6lq^k6{ekAt-F+YJKxNulsa9bvsUHGE4RlO zl!TyzwcO+56+=9ztvC6k9ho8}IM=uT;vjwsi0Vz4L7;5aNxh|& z!Awb`XoTcpXCE}|-tEW7^wfF6;I)V`yxP_L18@0-nS)7VZ)^neh5yW%B!v{BJX$fv zD43ca#uS^LGFes*?FRM8GG-8V&T0MPQ&Hz#mvB%`31-_{xNyk+5G3uCHK#_9WKy^fq*BhjzQ4!7S5yfR+2mv3mEzg=MMx_$GH6u zJ7e^DRIXh4m55KR$vN_io)Fu?LOh!M--oKo4FR0B{qN)dn_cz)vA8}IHgp!*ec;oy z%tI3Ric_Zf+Mc6_MQn&nx@TWHr55m5)Z)e^3YLWLvK({)6fEBAcUd$2<=MV{eM==% z%PH?dMjhakI_|qH&(M8ZW$A-^WGL_pdD-DTtS>iTW`|U_1oLN~@;)OH z9+&FP*>K{m7nO{NXvpD!t7*Gg_NdpXxvCTpckK^@3u5+cj>VxB2PJNo@kk>>6F&-|%^sX{`&;WenQ(7o-G zx3c6C8VP${6L|dAYbqJWAGh`d9}XxWKjlr;QvJ>x?a=Fl(8IYIJa;VH-%_!@t`iLqC}TaJoZ(OP{-=C_j7BAb1ZuQt@svEB@*mPG(vsg&i|8f0Ph<_ryp zGYQGvO&z$(&vtw@^3TP0YLrG-Y9*sNUQ^w?FUs<*O^t^yWY$P2T_gQDb%;OJ7K16z zNj@^|xv~n@7ybbOvR2ktDX5Pqezp^3*S@=F-~?%~waq%6}ptjh#hy!sOCX zUD{;txKS#ZVbOTm@_T$f)wrt=0fCd0T$eV;lvsb+&CA=6Slm#epuVn0mAts^v0GO5 z;2t$YX^LM@6lEz>1EQj;YooC^S4Gu1gYTMzcvH#T8i^BlR;To5uM*OOjn!m)+ia%( z@%ftcwT4E~<=a~w%Z4S(A3tipd#$=R!1RkRA(HtkS04G{FJCCA-ZyvbIN|v8%a@;b zR}Sz~QQQi2x3$)J{pB__|6wW<@)NYoci)hFd!N>>=A_-Z_ImI|`0@b1XJ6#1YrBB~ zC3kbsy{M!l=b6pPg@BqZtlz zVJ+_!<+zy*(*nkmYKDH=L>D|Ox~M#}V`|{))3@6X&(Ers?)jmUPNMccu;X%8n9Ygi z#UsL#Ra>OY^~=Mxq)TR=JMaE|?{Mvu;D^FKHcgG$7o$ zp6)jL;`Z_&AHzV~?^ho=c=s}2Hen5Q@*at~$i;M$Gf{5ovM)vGuDE%B{ppx9{Be`! z;xbcFu~|0ZPYJ88F&RArbGq8}0|&Z#2R+7Vw<(|56xpuc?v5b*NYsd?sveqTWO=n5 z@ksq455Zqmn=f+lne}7;;mM$y2BV3s4Vl7X@y*TnoCI)0f&i zu;^)EcIJ3}^bOB>BdPxd!$3U0`YvCIujI_x3aBbc$&L;quw0}VEk?#;$-jnRo41>j z+1%A*Y1Rn{oux=j1~?UUq(oH*}%qivvI1j^lX{*S}c-vlIkqSK2JxWGe#W+pFrS+cK@>rdHrBP)GzmDo5=B_A(sK`f9k@q7 zeeZPjF`wvx?bF@-SyOAm@_j9Ec)oJZQj})tfY`}unO4iB3P3A z#h4JGs>RpYN6BO--29o_{*#^w*m51-{_YFEy{LcaHP@fI>zBQto}}?CmQigrb%GE( z0aBFEifS3j(2B23y#b?X#Auc-U$paj?dpj~2Gadmr z#r0DhST%NVR6>I7ec3*XtAqD|VU<**NN51N@E+6+D=D0}3-2LBE*}84T+_5PEr5vJ zdKTx(Y-l?Rk(fAM0<0Unv%^)qv<5`Qot?_Zegwc|%H$MgTzLSndmq3lM%k?yArJ!j zsq3P}BzN2b=tq5m&G+QsT>6v$25{jLDKVe1HOp5is%XC=F(VlQbqz48kp81&q(n?* zO_8iDfwG6luf3S^#%6tRa?&Xv(#Y7kPyT3m%0~gTOMCa9w!ivEM=$+Ju4}VbzQElybGOW7QUk0z zDu<9yfRJ!PGRjIi**eJB1G+OJnXQ9G%lFZm7|$<{|7;1YkKE`-9_~rPH+*@XIH8s5 z2VOh;{b8PD@zNJfwt}w>=o)R78aquH129Pu>w^%oAI|ZKSYBls0>n;4tsbZRsU>;p zFTVNuL-82)oaYb%zxkUV)J|^L-vYY<_We!S);(XTyJL6DHuEWfb5i-T=u#mswCV~n zCKAem4H%D@Z{un*fR!RCkso?`ysuz?%5+C&`&1Kv6lho0t@5YhJkwpOG0?=NK%Ink z1yGHxo-D)VHm-nRogm3#va;41yZJI40>_<;iJeibqym~0F08#7d*cA?);msXL2`KI zr4n&Dm;}1iwrP2By&6tDCdqhKg0quTwT=Y^yw-w7>$T z0TaL7#$~WJ<<}AkRN$~(0PkPaDmJeYFm_3WGm}%>)fu2o%ft5k<)%IE9MC2SNuo)f z{el_N^{Y51HZ0F8wc_^kYY_>FWCiSVS^&Obdns?I61u3A07C@9M96D&?U6ne1H711 z@;+-dueFmZqaliOT2(UgIs!DqC_rId{@Op6GdbRJteX-#WPq=Y>97H8 z9Wj%!*Lej{IS~+%i3ifeZgqV^nd%Y>kPu9*%RzZ)?f8PU#H1-1pLHEDx$7HZCq|HZd1ct!Zf=R7;OLy~3rZpjE)GRGJl1c5{{sdrB zGoO}WfAC7Yves!O^9qo&yRtQ7RF^fPK}yzk0IRj^Y_Y#vAiTv9Au<^=EzvWVAF^{7 z0oDy&pzAWIXKe&QMaB-0?I}BR@fp;1V76GXYJm8@OX=b&9d{YvOF`UNbY}$AA9u5S z>_^D%Q}8u_AKCJ<{lV|X_g(}<1FWP#-D7!r?f#>y=Y$HXS7C_#7wzOu ztan@aJO_Mm8YK?LjL@-7e)W}DSfh{e%7{dT$e8O%?Ywa|TkWdHroE`7@P@aVSt z)|UfvYA)MzL@Z~jVxsNJs$f*3N(d~Qa<=oSR37I5y3UsCf&->R7t*<-aQ`u2ZCrfa zJr6tF_8Yz$K(WJi2>Kre_5rgWcu|J12`L@6ah*b=KxicfQD?3y>6{n_JVh)qz$@+A ziI{qG&hn>E`T1YD&Nw`pJ;DCuZ6EbzBC>bdPv-^P1XimAwCf})ZBrns7_C`Zj3r2{ zYuVZL^+?**fUdO|t?LRTDuO7g0(dW{cKz;It0oCZLDmZwTgkwa_cGp!^&|qLSxixm z&R6S&1FDf#m3>;WQkEd@uY&bf*@l?E@>|;9MOV zjZwOl0>?+O>r6!QlkS}C?CN+c0_x0pGm~baK)ZGi+}B<_A2Lq&g7B7;L-%_h_c!?o1Pt#X!$g6pO0>aiug)=RZgZFr(2%g zj6U%eK+f#2Zkzvl-}yfQnEv>~5&V<3{E8Qj=W%)}0G6a(Y3!tHa#|F1CR(t+Zmk2R z>?#wn&}g1!p;0qJtC!CwU~wGB6Mg1e?|J0muH5yKl!&dK>G8ftMkeRK=%vmZ5Q7{a zre>X%iv%?5)OD6|^Xc4qFELn%2Bb)g*0t8P2CP;|1Yb$z1&Gm}d*#=zGYF4nPp~IB z|J;|3W^umP0i$VNbXbP@Fw~hP$)E#5ijrah0jp8++fF8)0qi@Gr$i7bp}17)&P?6S zvl7uoOUup{U4D?IcJAz~gmYU{l5zf0N%&1GnNQ@*F7p|Hccip=+qNCYOLn&bw)fDA z=C}m3)l{aZ%o58h0QcW-O+zTrCaeBUlwYZ%nys0f-Yb8};9AoFbiv;H0lTtHs{q(h zYi*K|)2$lNkNz;Z<7qNK1K>P<%<^*jqu&SY1Lt!rx53&Hc;U=GAWyv=OLQH;_G#4d zp1-jBa#-Tno>5nl-sGVA(i=%%yKYBpYrU{Lveyv@jB%1Ehc@&t#bP<0JD9% zwY}pV&2RlBu=v`09yw_ToBi7tRL|Je{V9O=IXOLKi)B`0W+9Rx#meP)5>*6Sch;2E z2W_-<2oEfP#W`XS|LbzU2dUKWeDgi0U9UlzX_wzr`bDvv&_`)xI{QJ3Ke+%qJ8Sf3dVK?lC z-LM;W!*19OyJ0u%hTX6mcEfJi|HRg|eA~B`pI`oR*6SzrY;M>GYyQbTf&am5^_4HI zr^!_bh@JW>skiul{_G>Slw61@lIaOj_q0C1J1W1)wC1ub31sBHu5mT0xpXL(s}=x1 zXU}^|Gbs@R&7$Xt7?wmF^$4JvP>nKIPQ_KrV{49Nx(l=((yG>3ml{9}BbACXFtelX zC==@{wXG`6t34+*FeQ!M;X&Kxy4{D?huf77wYs%VqIHXKprSw*txF}-ya-x;7J#R1 z)m|#;d2d~6LTXm=@Lh)hBUO=7w-S?V*D)Ho#Q3PY@PS1elLRX}Gl+>q4a}-Eaw*r_ z?u|y3j=fX|?SsID_0eJLy5w`AZZwjKf%f^M%y4f~rYNFPcy?w4h)Hr*Dr!rTk46mcmCrSPiLBkZMjHQC8Mzd zH~q(l7a(M|LSGmy)I+Kk@glX-^~Dz|;?yhwVkTb6+$8}gsFZQYCWUk=wU9{50B~WY z^MJ7_2Oc?{Rk_NY%ClI7zqkOzODlJJs(a%yj0Z=S3zjxTsg^U$HW?FRsWAb&aD~+x z@7Ui3WM@v>$+!lrRQ^gSk(gAnJ%OH*HlNC5T!_-%)3#!y`!51^+*+4#;`Szh->Ti| ziQcvg$Za<>-nN4WI6i`2GvRQdBL`4BV#_9MwWe1L~^$oTps4nsArJ0tQA62BCN6nM-p*2SEBXu1aAjoXDVK zmQ#0<%&d1M1HZ37F&Q|9d9+VXhP-7VBx>P73>WBqF2J#iSCDsdcur>ffSkUAk7)LO z`&%Dbp+DH=PkRNh_xu0SVw6!WqiMOP>!uvnIa{u1Lpe3qkL2*2t{WDsawZ|+3Rkz( z1YK>`1VCpMBlpNp2U~pIJ+oK6uw2n(*dPD^AOJ~3K~(+7IUzqdW-1D=c-=s)^xyvc z%q&we6G>Q#3aA=_%2o9>PnP|^&wT!PTHdG2WmFaK>mIpfN~l`bTI_44V=R0$ zQE?6t+GaEB%qXNY73a&m$RCByQrz&-WRP}6`1cvGZt4$T0h?EOC5!l7Drct^IB^ZQFGPSd