[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDFJava #YYY-811129]: GridDataset Issues



No problem Chris - you have a great weekend too!

Sean

> Thank you so much!  You've been a ton of help!  I will check out the OPeNDAP 
> classes/methods in netCDF this weekend.  Sounds like the best way to go.
> 
> Have a great weekend!
> 
> Chris
> 
> 
> -----Original Message-----
> From: Unidata netCDF Java Support [mailto:address@hidden]
> Sent: Friday, May 22, 2015 2:41 PM
> To: Chris Delaney
> Subject: [netCDFJava #YYY-811129]: GridDataset Issues
> 
> Hi Chris,
> 
> I think this is the url you want to use in the Dataset.open call:
> 
> http://nomads.ncep.noaa.gov:9090/dods/wave/mww3/20150522/multi_1.glo_30mext20150522_00z
> 
> Cheers!
> 
> Sean
> 
> > Hi Sean -
> >
> > Here is the OpenDAP address:
> >
> > http://nomads.ncep.noaa.gov/dods-alt/wave/mww3
> >
> > Thanks again for the help!
> >
> > Chris
> >
> >
> > -----Original Message-----
> > From: Unidata netCDF Java Support
> > [mailto:address@hidden]
> > Sent: Friday, May 22, 2015 1:19 PM
> > To: Chris Delaney
> > Subject: [netCDFJava #YYY-811129]: GridDataset Issues
> >
> > Hi Chris,
> >
> > The netCDF-Java API has an Dataset.open() method that takes an input stream.
> >
> > If you know the array indicies you want to subset with, OPeNDAP will allow 
> > you to do so. Can you send me a link to the catalog on the NOMADS TDS that 
> > has the dataset you are looking for? The bonus of going through OPeNDAP is 
> > that you can pass the url directly into the open method and you're done.
> >
> > Cheers!
> >
> > Sean
> >
> > > Hi Sean -
> > >
> > > Thanks for the rapid response!
> > >
> > > I have little familiarity with OPeNDAP, as I am also just learning 
> > > netCDF.  The reason I was going with the current method was because I am 
> > > able to query by a subset of lat and lon and therefore greatly reduce the 
> > > size of the grib file.  This might also be an option with OPeNDAP and yes 
> > > the dataset I'm interested in is available on the url you provided.
> > >
> > > If I need to go with the inputstream approach does the netCDF API have a 
> > > method for this?
> > >
> > > Thanks!
> > > Chris
> > >
> > >
> > > -----Original Message-----
> > > From: Unidata netCDF Java Support
> > > [mailto:address@hidden]
> > > Sent: Friday, May 22, 2015 12:58 PM
> > > To: Chris Delaney
> > > Subject: [netCDFJava #YYY-811129]: GridDataset Issues
> > >
> > > Greetings Chris,
> > >
> > > GridDataset.open won't work in this case, as you are requesting a stream 
> > > of data back from the server over the http protocol, which means you need 
> > > to make an actual HTTP request for it. That said, you might be able to 
> > > use some http client code to make the request and read the result as an 
> > > inputstream, and then read that into netCDF-Java. I've not tried that 
> > > exactly, so I am not sure how well it would work. Also, going this route 
> > > would mean that your dataset would need to fit into memory.
> > > However, if the data exist on the NOMADS THREDDS Data Server (TDS), then 
> > > it would be easier to read the data into netCDF-Java using the OPeNDAP 
> > > url:
> > >
> > > http://nomads.ncdc.noaa.gov/thredds/catalog.html
> > >
> > > Is you dataset available on their TDS?
> > >
> > > Cheers,
> > >
> > > Sean
> > >
> > > > Hello -
> > > >
> > > > I am trying to access a grib2 file from NOMADS website using the 
> > > > GridDataset.open() method.  If I download the grib dataset into my 
> > > > resources folder then everything works OK, but if I try to use the 
> > > > command to open the file directly from the internet I receive and error.
> > > >
> > > > The URL for the grib2 dataset is:
> > > >
> > > >
> > > > String filename = 
> > > > "http://nomads.ncep.noaa.gov/cgi-bin/filter_wave_multi.pl?file=multi_1.glo_30mext.t00z.f000.grib2&lev_surface=on&all_var=on&leftlon=235&rightlon=235&toplat=38&bottomlat=38&dir=%2Fmulti_1.20150522";
> > > >
> > > >
> > > > I then execute the following method:
> > > >
> > > > GridDataset.open(filename)
> > > >
> > > > And receive the following error:
> > > >
> > > > java.io.IOException: Server does not support Content-Length
> > > >
> > > > It seems strange that I can open the file from my resources folder in 
> > > > my java project but I can't access it directly from the internet.  
> > > > Anyhow any assistance would be appreciated.
> > > >
> > > > Thanks,
> > > > Chris
> > > >
> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > > Chris J. Delaney, P.E.
> > > > Agency Engineer - Water Resources Planning Sonoma County Water
> > > > Agency
> > > > 404 Aviation Blvd
> > > > Santa Rosa, CA 95403
> > > > Phone: 707-547-1946
> > > > address@hidden
> > > >
> > > >
> > > >
> > >
> > > Ticket Details
> > > ===================
> > > Ticket ID: YYY-811129
> > > Department: Support netCDF Java
> > > Priority: Normal
> > > Status: Open
> > >
> > >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: YYY-811129
> > Department: Support netCDF Java
> > Priority: Normal
> > Status: Open
> >
> >
> 
> 
> Ticket Details
> ===================
> Ticket ID: YYY-811129
> Department: Support netCDF Java
> Priority: Normal
> Status: Open
> 
> 


Ticket Details
===================
Ticket ID: YYY-811129
Department: Support netCDF Java
Priority: Normal
Status: Open