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

[netCDFJava #UWT-369970]: some questions on opendap url support on netcdf java api



You dont do anything special for opendap. So just read the tutorial and follow 
the examples there.

> Hi,
> 
> I looked through the doc
> http://www.unidata.ucar.edu/software/netcdf-java/tutorial/index.html
> 
> I didn't find anything specific to reading from Opendap urls.
> So, if there is some information in internet and you could provide link to 
> that, it would be very helpful.
> 
> Thanks,
> Dibya
> 
> -----Original Message-----
> From: Shakya, Dibya
> Sent: Wednesday, May 19, 2010 11:37 AM
> To: 'address@hidden'
> Subject: RE: [netCDFJava #UWT-369970]: some questions on opendap url support 
> on netcdf java api
> 
> Hi,
> 
> Did you find anything about it?
> 
> Thanks,
> Dibya
> 
> -----Original Message-----
> From: Shakya, Dibya
> Sent: Monday, May 17, 2010 1:15 PM
> To: 'address@hidden'
> Subject: RE: [netCDFJava #UWT-369970]: some questions on opendap url support 
> on netcdf java api
> 
> Hi,
> 
> The code you gave is working. It is listing the variables.
> I am having problem in reading contents of variables.
> Can't we use the same functions that we used to read local files for opendap 
> urls?
> 
> Once read into Variable object var I am using following code to read data of 
> variable
> 
> int[] origin = { 0, 0 };
> int[] shape = { 1, 1 };
> 
> try {
> Array data = var.read(origin, shape).reduce();
> System.out.println(data.getFloat(0));
> } catch (IOException e) {
> e.printStackTrace();
> } catch (InvalidRangeException e) {
> e.printStackTrace();
> }
> 
> 
> I get the following exception
> Exception in thread "main" java.lang.UnsupportedOperationException: Cannot 
> directly read section of Member Variable=Orbit 5451.Geolocation 
> Fields.Latitude
> 
> Thanks,
> Dibya
> 
> -----Original Message-----
> From: Unidata netCDF Java Support [mailto:address@hidden]
> Sent: Thursday, May 13, 2010 11:38 AM
> To: Shakya, Dibya
> Cc: address@hidden; Shakya, Dibya
> Subject: [netCDFJava #UWT-369970]: some questions on opendap url support on 
> netcdf java api
> 
> showAll(ncfile.getVariables());
> 
> void showAll(List<Variable> list) {
> for (Variable var : list) {
> System.out.println(var.getName());
> if (var instanceof Structure) {
> Structure s = (Structure) var;
> showAll(s.getVariables());
> }
> }
> }
> 
> 
> > In the code you suggested
> >
> > if (var instanceof Structure) {
> > Structure s = (Structure) var;
> > for (Variable v : s.getVariables())
> > recurse(v);
> > }
> >
> > what is var?
> >
> > Thanks,
> > Dibya
> >
> >
> > -----Original Message-----
> > From: Unidata netCDF Java Support [mailto:address@hidden]
> > Sent: Tue 5/11/2010 4:07 PM
> > To: Shakya, Dibya
> > Cc: address@hidden; Shakya, Dibya
> > Subject: [netCDFJava #UWT-369970]: some questions on opendap url support on 
> > netcdf java api
> >
> > i dont understand your question
> >
> > > One question what is var in 2
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Unidata netCDF Java Support [mailto:address@hidden]
> > > Sent: Tuesday, May 11, 2010 2:52 PM
> > > To: Shakya, Dibya
> > > Cc: address@hidden; Shakya, Dibya
> > > Subject: [netCDFJava #UWT-369970]: some questions on opendap url support 
> > > on netcdf java api
> > >
> > > 1) Can you send us that particular hdf file, or a URL to it? We need to 
> > > look at it outside of the hyrax server.
> > >
> > > 2) The Hyrax server is placing the data inside of Structures. So you need 
> > > to look inside of those, eg:
> > >
> > > if (var instanceof Structure) {
> > > Structure s = (Structure) var;
> > > for (Variable v : s.getVariables())
> > > recurse(v);
> > > }
> > >
> > >
> > > thanks,
> > >
> > > John
> > >
> > > > Hi,
> > > >
> > > > There is no 4.2.2 so I was confused.
> > > > I downloaded new netcdfAll-4.2.jar.
> > > > As I mentioned in previous mail it still has following problem.
> > > >
> > > > Now the exception previously thrown is not thrown. But I cannot access 
> > > > the variables.
> > > > I am using recursive functions to read all variables in file.
> > > >
> > > > Group root = ncfile.getRootGroup();
> > > > // read the variables
> > > > List<Variable> var = root.getVariables();
> > > > for (int j = 0; j < var.size(); j++) {
> > > > System.out.println(var.get(j).getName());
> > > > }
> > > > // read the groups
> > > > List<Group> sub_grps = root.getGroups();
> > > > for (int i = 0; i < sub_grps.size(); i++) {
> > > > readGroup(sub_grps.get(i));
> > > > }
> > > >
> > > > When I use opendap url sub_grps.size() is 0 Whereas if I download the 
> > > > file and use it sub_grps.size() is 1
> > > >
> > > > Thanks,
> > > > Dibya
> > > >
> > > > -----Original Message-----
> > > > From: Unidata netCDF Java Support [mailto:address@hidden]
> > > > Sent: Monday, May 10, 2010 1:45 PM
> > > > To: Shakya, Dibya
> > > > Cc: address@hidden; Shakya, Dibya
> > > > Subject: [netCDFJava #UWT-369970]: some questions on opendap url 
> > > > support on netcdf java api
> > > >
> > > > Our releases are always linked from the home page:
> > > >
> > > > http://www.unidata.ucar.edu/software/netcdf-java/
> > > >
> > > > be sure to get the 4.2 release.
> > > >
> > > > > Can you provide me a link to download 4.2.2?
> > > > >
> > > > > Thanks,
> > > > > Dibya
> > > > >
> > > > > -----Original Message-----
> > > > > From: Unidata netCDF Java Support [mailto:address@hidden]
> > > > > Sent: Tuesday, May 04, 2010 2:57 PM
> > > > > To: Shakya, Dibya
> > > > > Cc: address@hidden; Shakya, Dibya
> > > > > Subject: [netCDFJava #UWT-369970]: some questions on opendap url 
> > > > > support on netcdf java api
> > > > >
> > > > > release 4.2.2 should fix this problem, please let us know. thanks
> > > > >
> > > > > John
> > > > >
> > > > > > we have not yet released a fixed version. we will let you know when 
> > > > > > its ready.
> > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > I am using netcdfAll-4.2.jar.
> > > > > > >
> > > > > > > Now the exception previously thrown is not thrown. But I cannot 
> > > > > > > access the variables.
> > > > > > > I am using recursive functions to read all variables in file.
> > > > > > >
> > > > > > > Group root = ncfile.getRootGroup();
> > > > > > > // read the variables
> > > > > > > List<Variable> var = root.getVariables();
> > > > > > > for (int j = 0; j < var.size(); j++) {
> > > > > > > System.out.println(var.get(j).getName());
> > > > > > > }
> > > > > > > // read the groups
> > > > > > > List<Group> sub_grps = root.getGroups();
> > > > > > > for (int i = 0; i < sub_grps.size(); i++) {
> > > > > > > readGroup(sub_grps.get(i));
> > > > > > > }
> > > > > > >
> > > > > > > When I use opendap url sub_grps.size() is 0
> > > > > > > Whereas if I download the file and use it sub_grps.size() is 1
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Dibya
> > > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Unidata netCDF Java Support [mailto:address@hidden]
> > > > > > > Sent: Friday, April 30, 2010 4:35 PM
> > > > > > > To: Shakya, Dibya
> > > > > > > Cc: address@hidden; Shakya, Dibya
> > > > > > > Subject: [netCDFJava #UWT-369970]: some questions on opendap url 
> > > > > > > support on netcdf java api
> > > > > > >
> > > > > > > > Apparently we are due to release an alpha version
> > > > > > > > of 4.2 today or Monday; the fixes should be in that.
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > =Dennis Heimbigner
> > > > > > > > Unidata
> > > > > > > >
> > > > > > >
> > > > > > > should be able to release something on monday
> > > > > > >
> > > > > > > Ticket Details
> > > > > > > ===================
> > > > > > > Ticket ID: UWT-369970
> > > > > > > Department: Support netCDF Java
> > > > > > > Priority: High
> > > > > > > Status: Open
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > Ticket Details
> > > > > ===================
> > > > > Ticket ID: UWT-369970
> > > > > Department: Support netCDF Java
> > > > > Priority: High
> > > > > Status: Closed
> > > > >
> > > > >
> > > >
> > > >
> > > > Ticket Details
> > > > ===================
> > > > Ticket ID: UWT-369970
> > > > Department: Support netCDF Java
> > > > Priority: High
> > > > Status: Closed
> > > >
> > > >
> > >
> > >
> > > Ticket Details
> > > ===================
> > > Ticket ID: UWT-369970
> > > Department: Support netCDF Java
> > > Priority: High
> > > Status: Open
> > >
> > >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: UWT-369970
> > Department: Support netCDF Java
> > Priority: High
> > Status: Open
> >
> >
> >
> >
> 
> 
> Ticket Details
> ===================
> Ticket ID: UWT-369970
> Department: Support netCDF Java
> Priority: High
> Status: Closed
> 
> 


Ticket Details
===================
Ticket ID: UWT-369970
Department: Support netCDF Java
Priority: High
Status: Closed