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

Hi Brian:

This server is an older one:

DODS server core software: DODS DAP++/3.4.8
Server version: jg-dods/3.4.3

It doesnt appear to conform to the opendap spec, since it wont accept ?Level_0 query, although its possible that the netcdf java library isnt doing the right thing with Sequences. Heres the HTTP Live Header dump:

http://usjgofs.whoi.edu/dods-bin/nph-dods/jgofs/merged_objects/US_JGOFS/Equatorial_Pacific/bottle_eqpac?Level_0

GET /dods-bin/nph-dods/jgofs/merged_objects/US_JGOFS/Equatorial_Pacific/bottle_eqpac?Level_0 HTTP/1.1
Host: usjgofs.whoi.edu
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
If-Modified-Since: Tue Nov 24 22:42:17 2009 GMT

HTTP/1.x 200 OK
XDODS-Server: /DAP/3.8.0
Date: Tue Nov 24 22:42:28 2009 GMT
Last-Modified: Tue Nov 24 22:42:28 2009 GMT
Content-Type: text/plain
Content-Description: dods_error
Cache-Control: no-cache
----------------------------------------------------------

It also is returning everything as a String, which is pretty odd. Its likely that

    foram = v.findVariable('foram');
    data = foram.read();

isnt quite right, but i cant test until we see whats up with the server.

You should probably ask about this server at the opendap tech support and see what its status is.

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

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 <mailto:bschlining@xxxxxxxxx>
------------------------------------------------------------------------

_______________________________________________
netcdf-java mailing list
netcdf-java@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/



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