NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

[netcdf-java] Error reading JGOFS data via OPenDAP using NetCDF-Java

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

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