Opened 7 years ago

Closed 2 years ago

#293 closed task (fixed)

update gdal dependencies (netcdf, hdf5)

Reported by: jef Owned by: osgeo4w-dev@…
Priority: major Component: Package
Version: Keywords: netcdf4
Cc:

Change History (6)

comment:1 Changed 7 years ago by etourigny

Note:

netcdf-4 support requires to uncomment the following in gdal nmake.opt (hdf4 support is unrelated to netcdf-4/hdf5 - but it doesn't hurt)

# Uncomment the following to enable NetCDF format.
#NETCDF_PLUGIN = NO
#NETCDF_SETTING=yes
#NETCDF_LIB=C:\Software\netcdf\lib\netcdf.lib
#NETCDF_INC_DIR=C:\Software\netcdf\include

# Uncomment the following to add NC4 and HDF4 support
#NETCDF_HAS_NC4 = yes
#NETCDF_HAS_HDF4 = yes

comment:2 Changed 5 years ago by tdamsma

Keywords: netcdf4 added

I noticed that the gdalinfo packed in osgeo4w (both x86 and x64 version) does not correctly open some netcdf4 files I have, and uses the HDF5 driver instead. (Even though netcdf library 4.3.0-1 is packaged in the current osgeo4w64 release). Using the gdalinfo installed via the unofficial python binaries distributed by the Laboratory for Fluorescence Dynamics of the University of California, (http://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal) gdalinfo does work correctly on netcdf4 files.

I think this has to do with the issue above, though not sure.

comment:3 Changed 3 years ago by dr

Trying to convert NetCDF dataset to GeoTIFF and get the following error (GDAL 2.1.1, NetCDF 4.3.0):

gdalwarp -ts 360 140 netcdf:2016121233557Forest_Aboveground_Biomassv3.nc:Forest_Aboveground_Biomass_v3 output.tif
ERROR 1: netCDF scanline fetch failed: #-101 (NetCDF: HDF error)
ERROR 1: netcdf:2016121233557Forest_Aboveground_Biomassv3.nc:Forest_Aboveground_
Biomass_v3, band 1: IReadBlock failed at X offset 0, Y offset 0
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0

But on the Linux (GDAL 2.1.0, NetCDF 4.4.0) all works fine. Test file: https://drive.google.com/file/d/0B6TJ2VnOYaa1RkNGbzFLU3dqalE/view?usp=sharing

Last edited 3 years ago by dr (previous) (diff)

comment:4 Changed 3 years ago by sabb

Here is the error I get when I run ncdump from OSGeo shell (64bit) on the file posted by @dr

 Forest_Aboveground_Biomass_v3 =
  NetCDF: HDF error
Location: file ..\..\..\ncdump\vardata.c; line 475

comment:5 Changed 2 years ago by sabb

I can confirm that the issue has been resolved in gdal/ogr 2.20 in Windows thanks to Jef.

Feel free to close.

Cheers Saber

comment:6 Changed 2 years ago by jef

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.