[THREDDS #KXL-349288]: Problem subsetting netcdf files
- To: address@hidden
- Subject: [THREDDS #KXL-349288]: Problem subsetting netcdf files
- From: "Unidata THREDDS Support" <address@hidden>
- Date: Sun, 10 Apr 2016 02:36:36 -0600
Sorry for the delayed response. This is indeed a problem in the hdf-java code.
Specifically, it fails when a variable has a very large chunk size. Thanks for
At this time, the only way to work around the problem is to rechunk the file to
use smaller chunks, which is something you might want to do anyway. Currently,
cnc_POLLEN_BIRCH_m22:_ChunkSizes = 97, 8, 315, 467 ;
Or, in other words, the chunk is as large as the entire variable. Such a large
chunk size blunts the potential performance gains that chunking was meant to
Furthermore, HDF clients must read the entire chunk into memory before they can
access even a small piece of it. That's actually what's causing netCDF-Java to
fail when chunks are very large.
By rechunking your dataset to use smaller chunks, I was able to read it
nccopy -k nc4 -d 1 -c time/13,y/40,x/59,height/1
Again, there is still a definite problem in netCDF-Java that needs to be
addressed, but rechunking may be something you want to consider anyway.  and
good primers on the matter.
Ticket ID: KXL-349288
Department: Support THREDDS
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publicly available
through the web. If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.