HDF error (NC_EHDFERR) big NetCDF

8 visualizaciones (últimos 30 días)
Andrea Libertino
Andrea Libertino el 5 de Jun. de 2019
Comentada: Luis Erasmo Miranda el 23 de Abr. de 2020
Hello everybody
I have tried to extract the varid_ta variable from a big NetCDF file (ncid_ta), with size x-y-time : 796x1115x34757 (114.9GB).
Matlab does not allow me to open it all at once, as it exceeds array size limit, so I have tried to extract each time step separately using the command:
netcdf.getVar(ncid_ta,varid_ta,[0, 0, 0], [796 1115 1], 'double')
When I have applied the command to smaller NetCDF everything have worked well, but with this one it gives me the error message:
The NetCDF library encountered an error during execution of 'getVarsFloat' function - 'HDF error
(NC_EHDFERR)'.
Error in netcdf.getVar (line 140)
data = netcdflib(funcstr,ncid,varid,varargin{:});
Error in internal.matlab.imagesci.nc/read (line 635)
data = netcdf.getVar(gid, varid, ...
Can this be a consequence of an out of memory problem or I should look somewhere else?
  1 comentario
Luis Erasmo Miranda
Luis Erasmo Miranda el 23 de Abr. de 2020
when using an online mounted drive (opendap, or samba)
For all our friends who have this and similar errors like:
Error using netcdflib
The NetCDF library encountered an error during execution of 'inqFormat' function - 'Not a valid ID (NC_EBADID)'.
try 2 things:
considering J: as the mounted drive in windows
  1. Use double forward dash like 'j://folder\to\nc\file.nc' , This tricks the code to treat the file as a online one (opendap)
  2. If this doesn't solve the problem, fix the max file size limit to tranfer from a web folder, with https://support.microsoft.com/en-us/help/900900/folder-copy-error-message-when-downloading-a-file-that-is-larger-than in short: change HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters\FileSizeLimitInBytes to ffffffff (4294967295 bytes 4Gb in decimal)
Reboot and try again
good luck

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by