"NetCDF: HDF error" when reading netcdf files downloaded from EarthData opendap

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
jinqj
Posts: 5
Joined: Wed Jun 22, 2022 11:12 am America/New_York
Answers: 0

"NetCDF: HDF error" when reading netcdf files downloaded from EarthData opendap

by jinqj » Wed Sep 30, 2026 10:58 pm America/New_York

Hello there,

I have problems in reading netcdf4 files downloaded from EarthData opendap through the wget command. For example:

wget https://opendap.earthdata.nasa.gov/collections/C2087132178-GES_DISC/granules/S5P_L2__CO_____HiR.2%253AS5P_RPRO_L2__CO_____20180430T001950_20180430T020120_02818_03_020400_20220901T170054.nc.dap.nc4?dap4.ce=/PRODUCT/carbonmonoxide_total_column_corrected%5B0:1:0%5D%5B0:1:2905%5D%5B0:1:214%5D

Then when I use ncview to open the file, the following error shows up:

netcdf_fi_get_data: error on nc_get_vara_float call
cdfid=65536 variable=PRODUCT/carbonmonoxide_total_column_corrected
start, count:
[0]: 0 1
[1]: 0 2906
[2]: 0 215
NetCDF: HDF error

However, I can successfully "ncview" the netcdf file downloaded using the same command but for different dataset (CO vs. HCHO).

wget https://opendap.earthdata.nasa.gov/collections/C1918210023-GES_DISC/granules/S5P_L2__HCHO___HiR.2%253AS5P_RPRO_L2__HCHO___20180507T013006_20180507T031136_02918_03_020401_20230115T155629.nc.dap.nc4?dap4.ce=/PRODUCT/formaldehyde_tropospheric_vertical_column%5B0:1:0%5D%5B0:1:3244%5D%5B0:1:449%5D

Surprisingly, reducing the size of the scanline dimension or ground_pixel dimension by 1 helps get rid of the reading error via ncview. For example:

wget https://opendap.earthdata.nasa.gov/collections/C2087132178-GES_DISC/granules/S5P_L2__CO_____HiR.2%253AS5P_RPRO_L2__CO_____20180430T001950_20180430T020120_02818_03_020400_20220901T170054.nc.dap.nc4?dap4.ce=/PRODUCT/carbonmonoxide_total_column_corrected%5B0:1:0%5D%5B0:1:2904%5D%5B0:1:214%5D

wget https://opendap.earthdata.nasa.gov/collections/C2087132178-GES_DISC/granules/S5P_L2__CO_____HiR.2%253AS5P_RPRO_L2__CO_____20180430T001950_20180430T020120_02818_03_020400_20220901T170054.nc.dap.nc4?dap4.ce=/PRODUCT/carbonmonoxide_total_column_corrected%5B0:1:0%5D%5B0:1:2905%5D%5B0:1:213%5D

The above two commands can download readable files. I also tried to download TROPOMI aerosol index, aerosol layer height, and other variables, the similar "NetCDF: HDF error" shows up.

The failure occurs only when I request the entire 2-D spatial array:

2906 × 215 = 624,790 values → FAIL

2906 × 214 = 621,884 values → WORK
2905 × 215 = 624,575 values → WORK

I am wondering if someone on the Forum could help resolve this downloading issue.

Thanks a lot!
Qinjian Jin
Last edited by jinqj on Fri Oct 02, 2026 4:24 pm America/New_York, edited 1 time in total.

Filters:

GES DISC - alouise517
User Services
User Services
Posts: 25
Joined: Thu Dec 18, 2025 4:38 pm America/New_York
Answers: 1
Endorsed: 1 time

Re: "NetCDF: HDF error" when reading netcdf files downloaded from EarthData opendap

by GES DISC - alouise517 » Mon Oct 05, 2026 2:59 pm America/New_York

Dear Qinjian,

Our team wanted to let you know that we are still investigating your inquiry and will reach out as soon as we have a response to your questions and the issues you are facing.

If you have any additional questions or require further assistance in the meantime, please don't hesitate to post them here.

Regards,
GES DISC User Services

jinqj
Posts: 5
Joined: Wed Jun 22, 2022 11:12 am America/New_York
Answers: 0

Re: "NetCDF: HDF error" when reading netcdf files downloaded from EarthData opendap

by jinqj » Mon Oct 05, 2026 3:50 pm America/New_York

Thanks for your reply and help! Looking forward to a solution to this issue.

Best regards,
Qinjian JIn

GES DISC - alouise517
User Services
User Services
Posts: 25
Joined: Thu Dec 18, 2025 4:38 pm America/New_York
Answers: 1
Endorsed: 1 time

Re: "NetCDF: HDF error" when reading netcdf files downloaded from EarthData opendap

by GES DISC - alouise517 » Fri Oct 16, 2026 9:43 am America/New_York

Dear User,

Thank you for your patience. Our team wanted to send a courtesy note to let you know that the data issues you are encountering are still being investigated, and troubleshooting is currently being done. We apologize for the inconvenience, and will update you once we have more information. Please feel free to post any additional questions you may have in the meantime.

Regards,
GES DISC User Services

jinqj
Posts: 5
Joined: Wed Jun 22, 2022 11:12 am America/New_York
Answers: 0

Re: "NetCDF: HDF error" when reading netcdf files downloaded from EarthData opendap

by jinqj » Mon Oct 19, 2026 4:38 pm America/New_York

Thanks a lot for the update, time, and effort! Looking forward to hearing back soon.

Best regards,
Qinjian Jin

GES DISC - alouise517
User Services
User Services
Posts: 25
Joined: Thu Dec 18, 2025 4:38 pm America/New_York
Answers: 1
Endorsed: 1 time

Re: "NetCDF: HDF error" when reading netcdf files downloaded from EarthData opendap

by GES DISC - alouise517 » Fri Nov 27, 2026 9:39 am America/New_York

Dear User,

Thank you for your patience, and we apologize for the delay. We are pleased to inform you that the fix for the issues you have been facing has been deployed. We ask that you please try your workflow again, and let us know if you encounter the same or additional issues. We hope that this fix will resolve the errors you were initially having, and you can resume your work with our data.

Please don’t hesitate to reach out if you need additional assistance.

Regards,
GES DISC User Services

Post Reply