[netcdf-java] problem getting vertical transform coordinate array

Netcdf-Java Gurus..

I am trying to get vertical transform coordinate array from an unstructured
model output. It's a CF compliant data set and passes the CF checker
and displays the Grid dataset 'temp' via the CDM checker as well.

The sample file is at:

http://stellwagen.er.usgs.gov/models/fvcom.nc

The difference here is that the variable 'temp' is
dimensioned('time','depth','node').
instead of usual ('time','depth','y','x'). So, it ends in error when I try
something
like shown below...

??? Java exception occurred:
java.lang.ArrayIndexOutOfBoundsException: 1

    at ucar.unidata.geoloc.vertical.OceanSigma.getCoordinateArray(
OceanSigma.java:106)


>>>>code begin

GridDataset = GridDataset.open(uri);

% get the grid associated with the variable name "temp" (temperature)
Grid = GridDataset.findGridByName('temp');

% get the coordinate system for this grid:
GridCoordSys = Grid.getCoordinateSystem();

%get coordinate axes
zj = GridCoordSys.getVerticalTransform.getCoordinateArray(iTime); % vertical
transform


<<<<<< code end


It may be because the data array is still 3D (time,sigma, node), while the
'getCoordinateArray' method requires a 4D data (time,sigma, lat, lon) based
on the coordinate transform (time, sigma, lat, lon) ..right ?

So, is there a method in netcdf-java to get the coordinate array?

btw ..
I also tried to just view the grid  in 'ToolUI' gui as well, but it can't
display the grid.
although it shows all the grid info.

<http://www.unidata.ucar.edu/software/netcdf-java/v2.2/webstart-dev/index.html>
any help is appreciated. thanks..

Sachin.
 <http://www.ssc.hpc.msstate.edu/%7Eskbhate>
  • 2007 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: