This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Bob: Its true that NetcdfDataset.openDataset() uses a bit different code, so it could be messed up. Im not seeing the problem, at the moment though. Could you make sure you have the latest code (4.0.34) and try again? I fixed a few things in there recently. Thanks as always for your careful testing. Bob Simons wrote: > In netcdf-java 2.2.22, this worked: > NetcdfDataset in = > NetcdfDataset.openDataset("http://dods.ndbc.noaa.gov/thredds/dodsC/data/stdmet/31201/31201h2005.nc"); > > > In netcdf-java 4.0, it times out: > java.net.ConnectException: Connection timed out: connect > at ucar.nc2.dataset.NetcdfDataset.checkIfDods(NetcdfDataset.java:702) > at ucar.nc2.dataset.NetcdfDataset.disambiguateHttp(NetcdfDataset.java:666) > at ucar.nc2.dataset.NetcdfDataset.openOrAcquireFile(NetcdfDataset.java:636 > at ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:400) > at ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:384) > at ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:369) > at ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:356) > > I note that this > DODSNetcdfFile in = new > DODSNetcdfFile("http://dods.ndbc.noaa.gov/thredds/dodsC/data/stdmet/31201/31201h2005.nc"); > > succeeds. > > Again, it is possible I am doing the test wrong, or misunderstanding how > the classes should be used, or something changed with the server in the > 2 days since I last ran the test with 2.2.22, or .... > > Thanks for looking into this. > > Sincerely, > > Bob Simons > IT Specialist > Environmental Research Division > NOAA Southwest Fisheries Science Center > 1352 Lighthouse Ave > Pacific Grove, CA 93950-2079 > Temporary phone number (831)648-0623 (don't leave a message if I'm not in) > [someday, I will again use my permanent phone number (831)658-3205] > address@hidden > > The contents of this message are mine personally and > do not necessarily reflect any position of the > Government or the National Oceanic and Atmospheric > Administration. > <>< <>< <>< <>< <>< <>< <>< <>< <><