Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
hi there, I have a scenario where I need to read the entire contents of a multi-dimensional section'ed variable piecewise linearly. for example, say the variable has shape [a][b][c] and I have section'ed it as [s1][s2][s3]. say data type is double. now i need to read the stream of elements, the total size of which is s1.size * s2.size * s3.size in chunks, for example of chunk size x. the API for variable doesn't allow me to specify "flat" linear indices, so I need to calculate intermediate sub-sections, I guess. this looks very complicated because the chunk size x might not be a simple multiple of s3.size, s2.size*s3.size, etc. So I can only think of two approaches: read "too" much data and then throw away some. Read multiple times; perhaps this problem can be formulated in maximally three read calls? Has anyone solved this somehow? Or is there a trick in the API that I haven't seen, to get a linear read command that preserves the offsets and strides of sections? thanks, .h.h.
netcdf-java
archives: