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.
Jon, The problem actually occurs because you are giving NetCDF-java a bad URL. In your example code you pass the URL: http://myserver.com/thredds/ncss/grid/CHESS2Aggregation/DetailWholeDataset.ncml/dataset.xml This URL just points to an XML file, causing NetCDF-java to attempt to open using an HTTP file handler, producing the error. However, what you really want to pass (I expect) is: http://myserver.com/thredds/ncss/grid/CHESS2Aggregation/DetailWholeDataset.ncml I don't have access to your server to actually test, but I'd expect this URL to give you much better results. Hope this helps, Ryan > I am using netCDF-java for the first time and have access to datasets on a > Thredds server. I have a maven project with edu.ucar.cdm 4.5.3 as a > dependency. I have copied one of the examples in the documentation to > connect to one of the Thredds netCDF datasets available to me (code > attached), but I can't get past the IOException 'Server does not support byte > ranges'. > > I have found this useful mail archive: > http://www.unidata.ucar.edu/mailing_lists/archives/netcdf-java/2013/msg00081.html, > which doesn't explicitly say that I should get an exception if my server > does not support byte ranges. > > Since I am not an admin on the Thredds server, is there any way I can use the > netCDF-java library to consume the netCDF datasets it makes available? Or is > it mandatory for the Thredds server to support byte ranges and to broadcast > it in the header? Ticket Details =================== Ticket ID: TIC-922637 Department: Support netCDF Java Priority: Normal Status: Closed