-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
netCDF4 unable to open netCDF file that opens as HDF and with Panoply #1313
Comments
Are you using libnetcdf? If so, which version. |
I'm in a conda environment, which has |
is ncdump able to read this file? |
I can reproduce this problem (on my Mac M2) in Python 3.12:
While
|
netcdf TEMPO_IRR_L1_V02_20240314T041808Z { dimensions: mirror_step = 1 ; variables: int mirror_step(mirror_step) ; mirror_step:long_name = "scan mirror position index" ; mirror_step:_Storage = "contiguous" ; mirror_step:_Endianness = "little" ; double time(mirror_step) ; time:standard_name = "time" ; time:long_name = "exposure start time" ; time:calendar = "gregorian" ; time:units = "seconds since 1980-01-06T00:00:00Z" ; time:comment = "Average of /frames/time" ; time:_Storage = "contiguous" ; time:_Endianness = "little" ; float exposure_time(mirror_step) ; exposure_time:units = "seconds" ; exposure_time:long_name = "exposure duration" ; exposure_time:valid_min = 0.f ; exposure_time:valid_max = 10.f ; exposure_time:_FillValue = 9.96921e+36f ; exposure_time:comment = "Average of /frames/exposure_time" ; exposure_time:_Storage = "contiguous" ; exposure_time:_Endianness = "little" ; float solar_phi(mirror_step) ; solar_phi:units = "degrees" ; solar_phi:long_name = "solar boresight azimuthal angle" ; solar_phi:valid_min = -180.f ; solar_phi:valid_max = 180.f ; solar_phi:_FillValue = 9.96921e+36f ; solar_phi:comment = "Average of /frames/solar_phi" ; solar_phi:_Storage = "contiguous" ; solar_phi:_Endianness = "little" ; float solar_theta(mirror_step) ; solar_theta:units = "degrees" ; solar_theta:long_name = "solar boresight polar angle" ; solar_theta:valid_min = 0.f ; solar_theta:valid_max = 180.f ; solar_theta:_FillValue = 9.96921e+36f ; solar_theta:comment = "Average of /frames/solar_theta" ; solar_theta:_Storage = "contiguous" ; solar_theta:_Endianness = "little" ; float earth_sun_distance ; earth_sun_distance:units = "m" ; earth_sun_distance:long_name = "Earth-sun distance" ; earth_sun_distance:_Storage = "contiguous" ; earth_sun_distance:_Endianness = "little" ; |
Thanks @dopplershift! Hi @ajelenak, does the error message that @dopplershift encountered in his comment above —
— signify anything further to you about what might be causing the netCDF opening issue? Sounds to me like the dimension information was perhaps recorded wrong somehow? Though I have no idea right now what next to check. |
Wild guess because dimension bounds are mentioned... The I tried this file with a |
Thanks @ajelenak. The |
cc @WardF |
Thanks, I'll take a look. This is not the first time something like this (with this error message) has come up. |
After some checking, the error report appears to be coming |
I am still poking at this to get specifics, thanks for your patience. I was able to use netCDF v4.6.1 to dump the binary file to .cdl, and then use |
The version of the software with which you are encountering an issue
h5netcdf version: 1.2.0
libnetcdf version: 4.9.2
netCDF4 version: 1.6.5
xarray version: 2024.2.0
Environmental information (i.e. Operating System, compiler info, java version, python version, etc.)
OS: MacOS 14.3.1
Chip: Apple M3 Pro
Python version: 3.11.8
A description of the issue with the steps needed to reproduce it
The following error is raised when attempting to open the file (linked below) via the netCDF4 python library:
Here is where the file can be downloaded. It does require a free NASA Earthdata login account to access, but the file size even when compressed (51 MB) exceeds the GitHub issue limit of 25 MB so I couldn't upload it here.
Interestingly, as an HDF5, the file appears OK: The whole file can be opened without error by the underlying library
libhdf5
, as well ash5dump
,h5netcdf
, and themyHDF5
tool. However, theirradiance
andirradiance_error
variables — which exist in multiple groups, e.g.,/frames/band_290_490_nm/
— do raise errors when the HDFView application attempts to open them.Also, interestingly, the NASA Panoply data viewer opens the file without issue as well.
The text was updated successfully, but these errors were encountered: