On Nov 24, 2009, at 3:16 PM, Brian Schlining wrote:
Hi All,
I'm trying to access JGOFS bottle data using NetCDF-Java. The JGOFS
data is being served via OPeNDAP at the URL: http://usjgofs.whoi.edu/dods-bin/nph-dods/jgofs/merged_objects/US_JGOFS/Equatorial_Pacific/bottle_eqpac
. The DDL can be viewed at http://usjgofs.whoi.edu/dods-bin/nph-dods/jgofs/merged_objects/US_JGOFS/Equatorial_Pacific/bottle_eqpac
Have the folks at Unidata been able to help you with this request? If
so, can you pass on the answer to me?
James
Here's the issue:
---- I'm actually using the NetCDF-Java inside of Matlab (see http://code.google.com/p/nctoolbox/)
. The versions of the Java jars are:
netcdf-4.0
opendap-2.1
---- Here's the steps I'm taking in Matlab. (It looks like Java
pseudo-code) :
url =
'http://usjgofs.whoi.edu/dods-bin/nph-dods/jgofs/merged_objects/US_JGOFS/Equatorial_Pacific/bottle_eqpac'
netcdf = ucar.nc2.dataset.NetcdfDataset.openDataset(url);
vars = netcdf.getVariables();
v = vars.get(0);
foram = v.findVariable('foram');
data = foram.read();
When I make the call to 'read()' the following Exception is thrown:
opendap.dap.DAP2Exception: "Could not open bottle_eqpac(Level_0):
l_jdbopen, &x Bad Name: Level_0: "
at opendap.dap.DConnect2.openConnection(DConnect2.java:233)
at opendap.dap.DConnect2.getData(DConnect2.java:699)
at opendap.dap.DConnect2.getData(DConnect2.java:979)
at
ucar
.nc2.dods.DODSNetcdfFile.readDataDDSfromServer(DODSNetcdfFile.java:
1125)
at ucar.nc2.dods.DODSNetcdfFile.readData(DODSNetcdfFile.java:1289)
at ucar.nc2.Variable._read(Variable.java:927)
at ucar.nc2.Variable.read(Variable.java:791)
at ucar.nc2.Variable._read(Variable.java:914)
at ucar.nc2.Variable.read(Variable.java:791)
at ucar.nc2.dataset.VariableDS._read(VariableDS.java:469)
at ucar.nc2.Variable.read(Variable.java:791)
??? Java exception occurred:
java.io.IOException: "Could not open bottle_eqpac(Level_0):
l_jdbopen, &x Bad Name:
Level_0: "
at ucar.nc2.dods.DODSNetcdfFile.readData(DODSNetcdfFile.java:1296)
at ucar.nc2.Variable._read(Variable.java:927)
at ucar.nc2.Variable.read(Variable.java:791)
at ucar.nc2.Variable._read(Variable.java:914)
at ucar.nc2.Variable.read(Variable.java:791)
at ucar.nc2.dataset.VariableDS._read(VariableDS.java:469)
at ucar.nc2.Variable.read(Variable.java:791)
Note: This happens both inside of Matlab and in just plain Java.
Am I accessing the JGOFS data structure correctly? Any help is
appreciated!!
Thanks
-- B
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Brian Schlining
bschlining@xxxxxxxxx
_______________________________________________
Support mailing list
Support@xxxxxxxxxxx
http://mailman.opendap.org/mailman/listinfo/support
--
James Gallagher
jgallagher at opendap.org
406.723.8663