Hi, John & Ethan!
Thanks for the help!
Now I figured it out that the "location" tag of NcML does not work
with the on-demand NetCDF-3 file that is automatically generated by
"fileout_netcdf" module by OPeNDAP server like [1]. If I save the
NetCDF-3 file from [1] and put it in a regular HTTP server like [2],
the NcML works fine.
For comparison, the URL [3] is the DAP response that NCDump in
ToolsUI can also recognize. Thus, I could make my NcML work by
dropping .nc as Ethan suggested. Since [3] works fine with NcML, I
have no reason to save and put it in a separate web server like [2].
However, I still don't know why OPeNDP fileout_netcdf module doesn't
work with NcML "location". What's the key difference between [1] and
[2]? It seems like an OPeNDAP sever configuration issue. I'm asking
opendap-tech mailing list to get some help.
Regards,
[1] http://eosdap.hdfgroup.uiuc.edu:8080/opendap/data/hdf4/foo2.hdf.gz.nc
[2] http://hdfeos.org/foo2.hdf.gz.nc
[3] dods://eosdap.hdfgroup.uiuc.edu:8080/opendap/data/hdf4/foo2.hdf.gz
--
HDF: Software that Powers Science
On Fri, Jun 7, 2013 at 4:09 PM, John Caron <caron@xxxxxxxxxxxxxxxx> wrote:
> Hi Joe:
>
> the opendap request is failing, reason unknown.
>
> CDM tries the same URL as an HTTP file, but the server does not support
> byte-range, so it fails.
>
> to make sure that it only uses the opendap access, change URL to
>
> dods://eosdap.hdfgroup.uiuc.edu:8080/opendap/data/hdf4/foo2.hdf.gz.nc"
>
> now you should see the real problem. when i tried it from here, im getting a
> 404.
>
> John
>
>
> On 6/7/2013 2:01 PM, H. Joe Lee wrote:
>>
>> Hi,
>>
>> I'm testing NcML with location value as remote NetCDF file URL like
>> below:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <netcdf
>> location="http://eosdap.hdfgroup.uiuc.edu:8080/opendap/data/hdf4/foo2.hdf.gz.nc"
>> xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2">
>> <variable name="v" type="float">
>> <attribute type="string" name="units" value="K" />
>> </variable>
>> </netcdf>
>>
>>
>> However, ToolsUI-4.3.14 throws the following error when I open the
>> above NcML file with NCDUMP tab:
>>
>> java.io.IOException: Server does not support byte Ranges
>> at
>> ucar.unidata.io.http.HTTPRandomAccessFile.<init>(HTTPRandomAccessFile.java:117)
>> at
>> ucar.unidata.io.http.HTTPRandomAccessFile.<init>(HTTPRandomAccessFile.java:67)
>> at ucar.nc2.NetcdfFile.getRaf(NetcdfFile.java:594)
>> at ucar.nc2.NetcdfFile.open(NetcdfFile.java:493)
>> at
>> ucar.nc2.dataset.NetcdfDataset.openOrAcquireFile(NetcdfDataset.java:693)
>> at ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:424)
>> at ucar.nc2.ncml.NcMLReader.readNcML(NcMLReader.java:409)
>> at ucar.nc2.ncml.NcMLReader.readNcML(NcMLReader.java:252)
>> at ucar.nc2.ncml.NcMLReader.readNcML(NcMLReader.java:202)
>> at ucar.nc2.dataset.NetcdfDataset.acquireNcml(NetcdfDataset.java:847)
>> at
>> ucar.nc2.dataset.NetcdfDataset.openOrAcquireFile(NetcdfDataset.java:686)
>> at ucar.nc2.dataset.NetcdfDataset.openFile(NetcdfDataset.java:563)
>> at ucar.nc2.ui.ToolsUI$NCdumpPanel.run(ToolsUI.java:1630)
>> at ucar.nc2.ui.ToolsUI$GetDataTask.run(ToolsUI.java:5636)
>> at java.lang.Thread.run(Unknown Source)
>>
>> According to [1], I think I can specify a remote location in NcML.
>>
>> "The optional location attribute provides a reference to another
>> netCDF dataset, called the referenced dataset. The location can be an
>> absolute URL (eg http://server/myfile, or
>> file:/usr/local/data/mine.nc) or a URL reletive to the NcML location
>> (eg subdir/mydata.nc). The referenced dataset contains the variable
>> data that is not explicitly specified in the NcML document itself. If
>> the location is missing and the data is not defined in values
>> elements, then an empty file is written similar to the way CDL files
>> are written by ncgen."
>>
>> Can anyone explain what could be wrong in my NcML? Or is remote
>> NetCDF file URL not supported as location value in the current
>> netcdf-java implementation of handling NcML?
>>
>> [1]
>> http://www.unidata.ucar.edu/software/netcdf/ncml/v2.2/AnnotatedSchema4.html
>>
>> --
>> HDF: Software that Powers Science
>>
>> _______________________________________________
>> netcdf-java mailing list
>> netcdf-java@xxxxxxxxxxxxxxxx
>> For list information or to unsubscribe, visit:
>> http://www.unidata.ucar.edu/mailing_lists/
>>
>
> _______________________________________________
> netcdf-java mailing list
> netcdf-java@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe, visit:
> http://www.unidata.ucar.edu/mailing_lists/