Skip to content

NC_MAX_NAME error on HDF4 file when names are within limits #1631

@djhoese

Description

@djhoese

I am trying to read an HDF4 file with netcdf4-python 1.5.3 from conda-forge which uses libnetcdf 4.7.3 from conda-forge, but I've seen this in other versions to. Currently tested on an Ubuntu system and a CentOS system.

Example file: ftp://ftp.ssec.wisc.edu/pub/davidh/netcdf_debug/geocatL2.GOES-17.CONUS.2020038.190630.hdf

Running ncdump -h geocatL2.GOES-17.CONUS.2020038.190630.hdf produces (full path filtered out):

ncdump: geocatL2.GOES-17.CONUS.2020038.190630.hdf: geocatL2.GOES-17.CONUS.2020038.190630.hdf: NetCDF: NC_MAX_NAME exceeded

If I load the data with the pyhdf library and check the length of all variable names and attribute names they all seem under 100 and from what I can tell the limit in the NetCDF-C library should be 256. Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions