You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
74
84
75
-
### readcubedata
85
+
####readcubedata
76
86
77
87
:::tabs
78
88
@@ -99,4 +109,79 @@ ds_loaded["tos"] # Load the variable of interest; the loaded status is shown for
99
109
100
110
:::
101
111
102
-
Note how the loading status changes from `loaded lazily` to `loaded in memory`.
112
+
Note how the loading status changes from `loaded lazily` to `loaded in memory`.
113
+
114
+
## open_mfdataset
115
+
116
+
There are situations when we would like to open and concatenate a list of dataset paths along a certain dimension. For example, to concatenate a list of `NetCDF` files along a new `time` dimension, one can use:
117
+
118
+
::: details creation of NetCDF files
119
+
120
+
````@example open_list_netcdf
121
+
using YAXArrays, NetCDF, Dates
122
+
using YAXArrays: YAXArrays as YAX
123
+
124
+
dates_1 = [Date(2020, 1, 1) + Dates.Day(i) for i in 1:3]
125
+
dates_2 = [Date(2020, 1, 4) + Dates.Day(i) for i in 1:3]
Note that opening along a new dimension name without specifying values also works; however, it defaults to `1:length(files)` for the dimension values.
161
+
162
+
````@example open_list_netcdf
163
+
files = ["a1.nc", "a2.nc"]
164
+
ds = open_mfdataset(DD.DimArray(files, YAX.time))
165
+
````
166
+
167
+
### along a existing dimension
168
+
169
+
Another use case is when we want to open files along an existing dimension. In this case, `open_mfdataset` will concatenate the paths along the specified dimension
0 commit comments