Skip to content

Commit 349ba8a

Browse files
File conversions
1 parent f4da189 commit 349ba8a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,17 @@ close(ds)
3636

3737
As a proof-of-concept, there is also an [`TIFFDatasets`](https://github.com/Alexander-Barth/TIFFDatasets.jl) package for GeoTIFF files.
3838

39+
# File conversions
3940

41+
By implementing a common interface, GRIB files can be converted to NetCDF files using
42+
`NCDatasets.write`:
4043

44+
```julia
45+
using NCDatasets
46+
using GRIBDatasets
47+
using Downloads: download
4148

49+
grib_file = download("https://github.com/JuliaGeo/GRIBDatasets.jl/raw/98356af026ea39a5ec0b5e64e4289105492321f8/test/sample-data/era5-levels-members.grib")
50+
netcdf_file = "test.nc"
51+
NCDatasets.write(netcdf_file,GRIBDataset(grib_file))
52+
```

0 commit comments

Comments
 (0)