Closed oyvindi closed 1 month ago
It is documented in https://gdal.org/drivers/raster/netcdf.html that netCDF:"vsicurl..."
will not work
Corollary: operations on /vsi file systems are not supported on Windows or MacOSX. If the netCDF file is a NetCDF 4 / HDF5 file, and the HDF5 driver is available, you may set the GDAL_SKIP configuration option to netCDF to force the use of the HDF5 driver. Note that specificities of the netCDF driver, such as support georeferencing with the netCDF CF conventions, will not be available.
Maybe it could work on Windows under WSL.
If you use the HDF5 driver, you need to use HDF5 subdataset names
So
gdalinfo /vsicurl/https://thredds.met.no/thredds/fileServer/metpparchive/2024/08/18/met_analysis_1_0km_nordic_20240818T18Z.nc --config GDAL_SKIP netCDF
will list:
SUBDATASET_10_NAME=HDF5:"/vsicurl/https://thredds.met.no/thredds/fileServer/metpparchive/2024/08/18/met_analysis_1_0km_nordic_20240818T18Z.nc"://precipitation_amount
SUBDATASET_10_DESC=[1x2321x1796] //precipitation_amount (32-bit floating-point)
But support will not be optimal (in particular lacking projection information) Best is to use a Linux environment (not totally sure WSL will do, as /vsicurl/ on Linux requires the userfaultfd system call, and I'm no sure that's available under WSL)
What is the bug?
Trying to fetch subdatasets from large grids using vsicurl on Windows (same result on both official GDAL command line binaries and the .NET Core wrapper). This results in the following error:
ERROR 1: Opening a /vsi file with the netCDF driver requires Linux userfaultfd to be available. Or you may set the GDAL_SKIP=netCDF configuration option to force the use of the HDF5 driver.
Using the
GDAL_SKIP=netCDF
makes the server respond withprecipitation_amount' does not exist in the file system, and is not recognized as a supported dataset name.
Steps to reproduce the issue
Commandline (note that the server is available to the public)
gdalinfo NETCDF:"/vsicurl/https://thredds.met.no/thredds/fileServer/metpparchive/2024/08/18/met_analysis_1_0km_nordic_20240818T18Z.nc":precipitation_amount
Versions and provenance
GDAL 3.9.1, released 2024/06/23
gdalinfo --format NetCDF
Format Details:
Additional context
No response