[netcdf-java] acces remote NetcdfSubset from NetCDF java library


I would like to get data from a NetcdfSubset using the NetCDF java library.
I made different tries without any success.

I am passing through a proxy and I think the parameter were set correctly.
I tried either with the version 4.1 and 4.2 of the library.
With version 4.1 I used this code:

// Set proxy if specified 
if (this.proxyHost != null) {

With version 4.2 I used this code:

// Set proxy if specified 
if (this.proxyHost != null) {
        System.setProperty("http.proxyHost", this.proxyHost);
        System.setProperty("http.proxyPort", String.valueOf(this.proxyPort));

The URL I use to get the data is:

When I copy / paste this URL on my browser, I am able to save the nc file.
So I do not know I am doing wrong.

I tried both with either:

this.netcdfFile = NetcdfFile.open(filepath);
this.netcdfFile = NetcdfDataset.openFile(filepath, null);

But I get the same error at the end which is:
Cant read
not a valid CDM file.

I also tried with:

this.netcdfFile = NetcdfDataset.acquireFile(filepath, null);

But again I got the same error.

Could somebody tell if what I am trying to do is possible. And if so help me
on how to do it.



View this message in context: 
Sent from the NetCDF-Java mailing list archive at Nabble.com.

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