Re: [netcdf-java] NetCDF 4 java lib: Adding coordinates to dimension.

Daniele Romagnoli wrote:
Hi list,
In version 4.0 of netcdf java library the method Dimension.addCoordinateVariable have been deprecated. The javadoc states that private dimensions cannot have CoordinateVariables while shared may have them. Once I define a Dimension as shared, how should I add a coordinateVariable to it?

Thank you.
Best Regards,
Daniele

Hi Daniele:

To add a coordinate variable, just add a variable which has a single dimension 
with the same name as the variable. The library then discovers these coordinate 
variables at the appropriate places.

Dimension.addCoordinateVariable is deprecated to remove linkage between the two 
classes, which makes things easier in certain cases, and is good design 
practice.



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