Re: [netcdf-java] changing the shape of a Variable

I just found "resetShape". I called it on the Variable after changing the length of the Dimension. This seems to work. Let me know if there is a better way.


On 10/17/11 9:44 AM, Doug Lindholm wrote:

I have a Dataset that I read in via an NcML file. There is a 2D Variable
that I want to integrate over one dimension, thus reducing the size of
that dimension to 1. I'm doing the math then trying to put the results
into the Variable's cache. I've tried a few things to convince the
Variable that it has a new shape (e.g. set dimension length to 1). The
toString reflects the new shape but getRanges does not. Is there a way
to change the Variable's internal "shape" state to keep it consistent?


  • 2011 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: