Closed haakon-e closed 3 months ago
This PR makes files with .nc4 extensions use NCDatasets as the default backend.
.nc4
NCDatasets
I'm working with some climate data files with .nc4 extension (more info here).
Currently, I get this error message:
julia> Raster(paths[1], lazy=true) ERROR: `Rasters.jl` requires backends to be loaded externally as of version 0.8. Run `import ArchGDAL` to fix this error. Stacktrace: [1] _open(f::Function, s::Rasters.GDALsource, filename::String; kw::@Kwargs{}) @ Rasters ~/.julia/packages/Rasters/1JI3p/src/sources/sources.jl:81 [2] _open(f::Function, s::Rasters.GDALsource, filename::String) @ Rasters ~/.julia/packages/Rasters/1JI3p/src/sources/sources.jl:79 [3] _open(f::Function, filename::String; source::Rasters.GDALsource, kw::@Kwargs{}) @ Rasters ~/.julia/packages/Rasters/1JI3p/src/sources/sources.jl:77 [4] Raster(filename::String; source::Rasters.NoKW, kw::@Kwargs{lazy::Bool}) @ Rasters ~/.julia/packages/Rasters/1JI3p/src/array.jl:292 [5] top-level scope @ REPL[9]:1
Additionally, perhaps this error message could be made somewhat more useful?
I tried to trace down where the error message comes from, but was not successful. In any case, something like:
If you want to specify a different backend, set the keyword source to one of :gdal, :netcdf, :grd, or :grib. E.g. Raster(file; source=:netcdf).
source
:gdal
:netcdf
:grd
:grib
Raster(file; source=:netcdf)
could be useful.
Thanks. You can also manually use source=:netcdf
source=:netcdf
These bugs are not related to the PR
This PR makes files with
.nc4
extensions useNCDatasets
as the default backend.I'm working with some climate data files with
.nc4
extension (more info here).Currently, I get this error message:
Additionally, perhaps this error message could be made somewhat more useful?
I tried to trace down where the error message comes from, but was not successful. In any case, something like:
could be useful.