[netcdf-java] problem getting vertical transform coordinate array

John Caron caron at unidata.ucar.edu
Wed Nov 7 14:52:35 MST 2007


Hi Sachin:

We dont handle unstructured grids (yet), and neither does CF. There is a pending proposal by Balaji, and many others are interested in getting an accepted spec for unstructured grids.

The CDM checker is misinterpreting this as a regular grid, but as youve seen, we cant actually display it. Both the CF checker and CDM checker often rely on hueristics and can be fooled.

Sorry, we just dont have a solution yet. If you want to help push a spec, I think there are others who want to also.

John

Sachin Bhate wrote:
> 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>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> netcdf-java mailing list
> netcdf-java at unidata.ucar.edu
> For list information or to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/ 


More information about the netcdf-java mailing list