Re: problem with newest netcdf java library when retrieving netcdf file from JOSS (fwd)

  • To: Luca Cinquini <luca@xxxxxxxx>
  • Subject: Re: problem with newest netcdf java library when retrieving netcdf file from JOSS (fwd)
  • From: John Caron <caron@xxxxxxxxxxxxxxxx>
  • Date: Mon, 26 Sep 2005 10:32:13 -0600


Luca Cinquini wrote:

On Sep 26, 2005, at 10:03 AM, John Caron wrote:

Hi luca: you own another thank-you to julie, who forwarded your  message!

I keep making that mistake...

Julie Caron wrote:

---------- Forwarded message ----------
Date: Mon, 26 Sep 2005 09:11:23 -0600
From: Luca Cinquini <luca@xxxxxxxx>
To: jcaron@xxxxxxxx
Cc: Michael Burek <mburek@xxxxxxxx>, John J.Allison <john@xxxxxxxxxxxxx> Subject: problem with newest netcdf java library when retrieving netcdf file
    from JOSS
Hi John,
    after installing the newest NetCDF Java library on the CDP, there
seems to be a problem in generating NcML on the fly when opening a URL
that is served by the JOSS server, for example the following file:
http://chinook.joss.ucar.edu:8080/datafile/nph-get/87.004/
RF01.20041207.161000_215115.PNI.nc
Everything works ok if I place the same file on the dataportal server.
The error when opening the file from the JOSS server is the following:
java.io.IOException: Server does not support byte Ranges
         at
ucar.unidata.io.http.HTTPRandomAccessFile3.<init>(HTTPRandomAccessFile 3.
java:74)
         at
ucar.unidata.io.http.HTTPRandomAccessFile3.<init>(HTTPRandomAccessFile 3.
java:53)
         at ucar.nc2.NetcdfFile.open(NetcdfFile.java:205)
         at ucar.nc2.NetcdfFile.open(NetcdfFile.java:165)
         at ucar.nc2.NetcdfFile.open(NetcdfFile.java:149)
         at ncar.scd.ncml.io.NetcdfReader.read(NetcdfReader.java:84)
Which I think originates from the fact that appearently the JOSS  server
does NOT send, in its response, the header "Accept-Ranges".
Now the question is: according to the WWW specification
(http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html), the
"Accept-Ranges" header is optional:
"Origin servers that accept byte-range requests MAY send
           Accept-Ranges: bytes
       but are not required to do so."


the functionality (and so the header) is needed if you want to read a netcdf file over HTTP.

Yes but the JOSS server does server the netCDF file correctly - I downloaded it to my personal laptop. The point is that, independently wether the remote server sends or not the Header "Accept-Ranges", the client application using the netcdf Java library MAY assume that the remote server will support bytes transfer - if this is not the case something else will break later on, but at least you won't loose all those servers that don't send this optional header.
Or am I not interpreting the problem correctly ?
thanks, Luca

ok, i see what you're saying. i didnt realize that servers werent required to 
have the header. I will modify to try it anyway.

Still, I would ask JOSS to add the header, I think its more standard. Also, they are down so i havent verified that they do support range bytes.

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