Hi,
I am using the netcdf java API to read data from a large netcdf file.
I have been able to read data from the file using the
read(int[], int[]) method on ucar.nc2.Variable
However the 2 int[] arguments on the read method must have values
specified in 0 based array indices. I would prefer to specify the values
as Latitude, Longitude and Date/time.
So I started using:
ucar.nc2.dataset.NetcdfDataset
I first called:
getCoordinateAxes() method on ucar.nc2.dataset.NetcdfDataset and found
there were zero axes.
I then called:
getCoordinateSystems() method on ucar.nc2.dataset.NetcdfDataset and found
there were zero coordinate systems.
I even called getCoordinateAxes() and getCoordinateSystems() methods on
each ucar.nc2.dataset.VariableDS found in the dataset and still found zero
axes and coordinate systems.
My question is, do I need to use NetcdfDataset (and
ucar.nc2.dataset.VariableDS) to be able to specify Latitude, Longitude and
Date to a read method? And if so, how do I set up the coordinate axis
and/or coordinate systems on my netcdf file using the netcdf-java API?
Or am I completely on the wrong track?
The netcdf file has the following dimensions:
LONGITUDE
LONGITUDEedges
LATITUDE
LATITUDEedges
TAXIS
The netcdf file has the following variables:
LONGITUDE (rank=1,shape=1600,datatype=double)
LONGITUDEedges (rank=1,shape=1601,datatype=double)
LATITUDE (rank=1,shape=2100,datatype=double)
LATITUDEedges (rank=1,shape=2101,datatype=double)
TAXIS (rank=1,shape=159,datatype=double)
SST_AVE (rank=3,shape=159,2100,1600,datatype=float)
Any help provided would be greatly appreciated.
Thanks for your time,
Mark