[gdal-dev] NetCDF driver detected file type

Ivan Lucena ivan.lucena at outlook.com
Wed Aug 7 13:51:35 PDT 2019


Even, Kurt,

I've been thru the same issue last week. I might be wrong but the only way that I found to add support for NC4 into the netcdf-c-4.6.3 build was by enabling HDF4 .

You might try run "./configure --help | grep 4" on the netCDF SDK to see if there is another way.

I rebuild everything, HDF5, HDF4 and netCDF SDKs and GDAL and the netCDF driver and now I am not getting warnings like that anymore.

Regards,

Ivan

________________________________
From: gdal-dev <gdal-dev-bounces at lists.osgeo.org> on behalf of Even Rouault <even.rouault at spatialys.com>
Sent: Wednesday, August 7, 2019 4:39 PM
To: gdal-dev at lists.osgeo.org <gdal-dev at lists.osgeo.org>
Subject: Re: [gdal-dev] NetCDF driver detected file type

Kurt,

I would say that your netCDF build lacks libhdf5 support needed to open netCDF
4 files, and/or that your GDAL build has been done against a netCDF version
that lacked it (if you added support of HDF5 in the netCDF build, after doing
an initial build of GDAL, you also need to rebuild GDAL)

It is likely that with your build the following
gdalinfo --format netcdf | grep NETCDF_HAS_NC4=YES
reports currently nothing

Rebuild netCDF with HDF5 support, and GDAL against this new netCDF build.

Even

> For a custom build of gdal, I'm seeing:
>
>   Warning 1: NetCDF driver detected file type=5, but libnetcdf detected
> type=3
>
> Any idea what is causing this?  With gdal 2.3.2, from debian testing, I
> don't see the message.
>
> This warning message was added here:
>
> https://github.com/OSGeo/gdal/commit/813aa221af3ac13a3747f4d4a3f312f098869ad
> c
>
> using:
>
> gs://gcp-public-data-goes-17/ABI-L2-FDCF/2019/201/13/OR_ABI-L2-FDCF-M6_G17_s
> 20192011310341_e20192011319407_c20192011319507.nc
>
> netcdf 4.6.1
> HDF5 claims to be 1.11.2 and is a bit newer than
> https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5/browse?at=807187e2f
> 200e63adb4918dd475d47546c8588e9 GDAL from head ~ 2018-Oct
>
> gdalinfo
> NETCDF:OR_ABI-L2-FDCF-M6_G17_s20192011310341_e20192011319407_c20192011319507
> .nc:Area Warning 1: NetCDF driver detected file type=5, but libnetcdf
> detected type=3 Driver: netCDF/Network Common Data Format
> Files: none associated
> Size is 5424, 5424
> Coordinate System is:
> PROJCS["unnamed",
>     GEOGCS["unknown",
>         DATUM["unknown",
>             SPHEROID["Spheroid",6378137,298.2572221]],
>         PRIMEM["Greenwich",0],
>         UNIT["degree",0.0174532925199433]],
>     PROJECTION["Geostationary_Satellite"],
>     PARAMETER["central_meridian",-137],
>     PARAMETER["satellite_height",35786023],
>     PARAMETER["false_easting",0],
>     PARAMETER["false_northing",0],
>     EXTENSION["PROJ4","+proj=geos +lon_0=-137 +h=35786023 +x_0=0 +y_0=0
> +ellps=GRS80 +units=m +no_defs  +sweep=x"]]
> Origin = (-5434894.700982173904777,-5434895.218222249299288)
> Pixel Size = (2004.017315487541055,2004.017315487541055)
> Metadata:
>   Area#add_offset=4000
>   Area#cell_methods=sunglint_angle: point (no pixel produced)
> local_zenith_angle: point (good quality pixel produced) solar_zenith_angle:
> point (good quality pixel produced) t: point
>   Area#coordinates=sunglint_angle local_zenith_angle solar_zenith_angle t y
> x
>   Area#grid_mapping=goes_imager_projection
>   Area#long_name=ABI L2+ Fire-Hot Spot Characterization: Fire Area
>   Area#scale_factor=60.98
> [SNIP]


--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190807/aa15ca49/attachment-0001.html>


More information about the gdal-dev mailing list