[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Client reading a catalog



Hi Tom,

Sorry again for the delayed response. I've been out of the office off and on all summer it seems. A better place for more timely responses would be our Unidata support email addresses: address@hidden (for general questions); address@hidden (for OPeNDAP/DODS questions); and address@hidden (for THREDDS questions); and others which you can find a list of at http://www.unidata.ucar.edu/support/. Cross-over questions can go to whichever list seems most appropriate and we'll pass it around as necessary. Or, another place to ask is our user lists: dods, dods-tech, and thredds @unidata.ucar.edu, and others also listed on our support page given above.

Answers inline below.

Tom Kent wrote:

Hi Ethan,
        I have a question about my OpenDAP client. Our software gets
an "inventory" of netcdf filenames for a given model that is selected.
Basically, it does a readdir on a data disk that is mounted locally and
gives us a list of file names such as:
20060713_1200
20060713_0000
20060712_1200
etc...
This list is then used to time-match what the user is looking for and the
specific file wanted is then accessed locally with netcdf calls.

We need to duplicate this when accessing data remotely using OpenDAP
and since we can't do an "ls" or "readdir" we have to find a different way.
I'm able to access a specific netcdf file and get the data correctly using
the URL like this in the client software (e.g):
http://px1-alps/dap/nph-dods/cdf/CONUS211/Eta/20060717_0000
But I had to hardwire a specific filename to do this.

I'm also able to generate catalogs dynamically on the server side (e.g.):
http://px1-alps:8080/thredds/catalog/cdf/CONUS211/Eta/catalog.html

How do I get (access...read-in...) the output of the catalog within my client
remotely? I'd like to just parse the xml catalog output for the dataset name 
lines and
get the list of filenames from there if possible. Or maybe there's some other
easy way to do this. I realize the netcdf client libs are what make it possible 
to
access the netcdf data remotely. But the catalog output is not netcdf so I'm
not sure how to set up my software to import it's results for parsing. I didn't
see any client apps that referred to xml files.

Basically I'd like what I get for this url:
http://px1-alps:8080/thredds/catalog/cdf/CONUS211/Eta/catalog.xml
to be read into some buffer in my remote client software so I can parse it.
Is this possible? I apologize if this is something really simple but I'm a rookie
with this stuff. I looked on the msg boards and didn't see anything related.
Thanks for any info!


The THREDDS Java client libraries are available for reading and dealing with THREDDS catalogs from the THREDDS web page (http://www.unidata.ucar.edu/projects/THREDDS/). In the "Getting Started" section, there's a "THREDDS Java Client Libraries" link that takes you to a page on that.

Java is our initial development environment and we don't have the resouces to develop in multiple languages at this point. So, if you are not able to use Java in your application, you'll have to find an XML parser for your environment and interpret the THREDDS catalogs yourself. The THREDDS catalog spec is available at http://www.unidata.ucar.edu/projects/THREDDS/tech/catalog/InvCatalogSpec.html.

I'm not really familiar with non-Java XML parsers but I know there are lots out there.

Hope this helps. Let us know how it goes.

Ethan

Tom Kent
Information Systems Branch
GSD/ESRL/NOAA




-- Ethan R. Davis Telephone: (303) 497-8155 Software Engineer Fax: (303) 497-8690 UCAR Unidata Program Center E-mail: address@hidden P.O. Box 3000 Boulder, CO 80307-3000 http://www.unidata.ucar.edu/ ---------------------------------------------------------------------------



NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.