[gdal-dev] netCDF geo file problems

Simon Eves simon.eves at heavy.ai
Fri Jul 28 14:50:33 PDT 2023


Dear List,

We are struggling with the following netCDF file, which appears to be quite
old (CF-1.6) and allegedly contains a few layers (one of which is called
"inflow". with point data).

https://drive.google.com/file/d/1FRt0L4idunewwjgKQmZQ7Ny_KGnuTL2X/view?usp=sharing

The only reason we know about the layers is from the docs on the web
service it was obtained from, and also we have managed to open the file
with some Python code using a netCDF4 module, which is able to enumerate
the layers (although it apparently calls them "variables").

I have been unable to get any of the GDAL/OGR tools to access the data in
this file. If you just provide the bare filename, then *OpenEx* with
*OF_VECTOR* just fails. If you specify the layer name like a subdataset
(netCDF:"filename":inflow) then *ogrinfo* will dump more specific stuff
about that layer, but you always get the following message also:

*Warning 1: The dataset has several variables that could be identified as
vector fields, but not all share the same primary dimension. Consequently
they will be ignored.*

*ogr2ogr* tries to copy the layer if also specified in full, but throws the
warning, and the output is empty.

Our geo import code supports multi-layer files (e.g. FileGDB) but we don't
get as far as being able to call *GetLayers()* on the DS. If they do
require specific opening with the full SDS name (like with raster) then I
would expect *ogrinfo* to at least dump the SDS names.

Please advise, thanks!

-- 
Simon Eves
Senior Rendering Engineer
+1 (415) 902-1996
simon.eves at heavy.ai

<http://www.heavy.ai>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230728/d14576d8/attachment.htm>


More information about the gdal-dev mailing list