@@ -139,13 +139,7 @@ savecube(a4, "a4.nc")
139
139
140
140
### along a new dimension
141
141
142
- ::: danger
143
-
144
- broken!
145
-
146
- :::
147
-
148
- ```` julia open_list_netcdf
142
+ ```` @example open_list_netcdf
149
143
using YAXArrays, NetCDF, Dates
150
144
using YAXArrays: YAXArrays as YAX
151
145
import DimensionalData as DD
@@ -158,14 +152,14 @@ ds = open_mfdataset(DD.DimArray(files, YAX.time(dates_read)))
158
152
159
153
and even opening files along a new ` Time ` dimension that already have a ` time ` dimension
160
154
161
- ```` julia open_list_netcdf
155
+ ```` @example open_list_netcdf
162
156
files = ["a3.nc", "a4.nc"]
163
157
ds = open_mfdataset(DD.DimArray(files, YAX.Time(dates_read)))
164
158
````
165
159
166
160
Note that opening along a new dimension name without specifying values also works; however, it defaults to ` 1:length(files) ` for the dimension values.
167
161
168
- ```` julia open_list_netcdf
162
+ ```` @example open_list_netcdf
169
163
files = ["a1.nc", "a2.nc"]
170
164
ds = open_mfdataset(DD.DimArray(files, YAX.time))
171
165
````
@@ -174,7 +168,7 @@ ds = open_mfdataset(DD.DimArray(files, YAX.time))
174
168
175
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
176
170
177
- ```` julia open_list_netcdf
171
+ ```` @example open_list_netcdf
178
172
using YAXArrays, NetCDF, Dates
179
173
using YAXArrays: YAXArrays as YAX
180
174
import DimensionalData as DD
@@ -186,7 +180,7 @@ ds = open_mfdataset(DD.DimArray(files, YAX.time()))
186
180
187
181
where the contents of the ` time ` dimension are the merged values from both files
188
182
189
- ```` julia open_list_netcdf
183
+ ```` @example open_list_netcdf
190
184
ds["time"]
191
185
````
192
186
0 commit comments