NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

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.

Thanks,
Doug

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

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?

Thanks,
Doug



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