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.
James Gallagher wrote:
On Tue, 2004-07-06 at 16:33, Dale Theriot wrote:I met you on June 10th at a geospatial software mindshare here at Stennis put together by John Lever, NAVOCEANO. I work with Diamond Data Systems, Inc. and I engineered the NAVO DOS services for tying together many data services and providing a searchable mechanism for parsing JMBL (Joint METOC Brokerage Language) and discovering the proper data service and providing lists of responses. I made a short presentation.Hi Dale.I have been doing some work trying to use the Unidata NetCDF API to interact with the URL's provided by a DODS server. I have been unable to use the URI constructor argument for the ucar.nc2.NetcdfFile(java.net.URL url) successfully with the URL provided by the DODS server. One such URL that I have tried to use is: http://pdas.navo.navy.mil/cgi-bin/nph-nc/data/WAM/australia/WAM-australia-20 04060712.nc If I use http://pdas.navo.navy.mil/data/WAM/australia/WAM-australia-2004060712.nc, it works, but I believe that by using this URL, I am pointing directly to the NetCDF file and not to the DODS object like I should.Right, you want to use the first URL.Interestingly enough, if I use the first URL, which I believe is the correct one to use (the URL provided by the DODS server), in an ncBrowse application, it works correctly and is able to interpret the returned streamlike it should.Right. I'm going to send this question over to John Caron, who is the author of the Java-NetCDF interface and should have an answer for you. Unfortunately, I don't have much experience at all with the Java side of the project (at least with the details) since the C++ side takes more than all of my time... John, what's up here?I have been able to determine that I can't use the DODS-provided URL as the constructor argument for the ucar.nc2.NetcdfFile class. Do you have any pointers? What part of the Unidata NetCDF API can I use to properly leverage the URI's generated by the DODS server for its data?I really appreciate any help that you can lend.Thanks Dale Theriot Diamond Data Systems, Inc.
hi dale:your problem is that ucar.nc2.NetcdfFile doesnt know about dods. The URL constructor is for serving netcdf files over HTTP.
you want to use ucar.nc2.dods.DODSNetcdfFile( URL) or more generally,ucar.nc2.dataset.Dataset.factory() which can handle both regular netcdf and also dods urls.
netcdf-java
archives: