Opened 12 years ago

Closed 7 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:

Description

Change History (6)

comment:1 by etourigny, 12 years ago

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 by tdamsma, 9 years ago

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 by dr, 7 years ago

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 7 years ago by dr (previous) (diff)

comment:4 by sabb, 7 years ago

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 by sabb, 7 years ago

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 by jef, 7 years ago

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