Skip to content

Commit 2b8f49f

Browse files
committed
bring back open_mfdataset docs
1 parent 28fd363 commit 2b8f49f

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

docs/src/UserGuide/read.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,7 @@ savecube(a4, "a4.nc")
139139

140140
### along a new dimension
141141

142-
::: danger
143-
144-
broken!
145-
146-
:::
147-
148-
````julia open_list_netcdf
142+
````@example open_list_netcdf
149143
using YAXArrays, NetCDF, Dates
150144
using YAXArrays: YAXArrays as YAX
151145
import DimensionalData as DD
@@ -158,14 +152,14 @@ ds = open_mfdataset(DD.DimArray(files, YAX.time(dates_read)))
158152

159153
and even opening files along a new `Time` dimension that already have a `time` dimension
160154

161-
````julia open_list_netcdf
155+
````@example open_list_netcdf
162156
files = ["a3.nc", "a4.nc"]
163157
ds = open_mfdataset(DD.DimArray(files, YAX.Time(dates_read)))
164158
````
165159

166160
Note that opening along a new dimension name without specifying values also works; however, it defaults to `1:length(files)` for the dimension values.
167161

168-
````julia open_list_netcdf
162+
````@example open_list_netcdf
169163
files = ["a1.nc", "a2.nc"]
170164
ds = open_mfdataset(DD.DimArray(files, YAX.time))
171165
````
@@ -174,7 +168,7 @@ ds = open_mfdataset(DD.DimArray(files, YAX.time))
174168

175169
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
176170

177-
````julia open_list_netcdf
171+
````@example open_list_netcdf
178172
using YAXArrays, NetCDF, Dates
179173
using YAXArrays: YAXArrays as YAX
180174
import DimensionalData as DD
@@ -186,7 +180,7 @@ ds = open_mfdataset(DD.DimArray(files, YAX.time()))
186180

187181
where the contents of the `time` dimension are the merged values from both files
188182

189-
````julia open_list_netcdf
183+
````@example open_list_netcdf
190184
ds["time"]
191185
````
192186

0 commit comments

Comments
 (0)