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

RE: FW: Last Issue with NetCDF VLENs/Attributes



Hi John. Justin is a student research assistant and is leaving to start a 
"real" job in a few days, so I'll be picking up where he left off. Justin told 
me that he got the latest release after receiving your previous email and it 
didn't solve the problem we were having. I'll double-check with him right now 
and make sure he was using 4.5.1.

If he was using 4.5.1, do you have more theories on what's going wrong? We're 
newbies at netcdf so we could be doing something wrong too.

Thanks,
Kim
________________________________________
From: John Caron [address@hidden]
Sent: Tuesday, June 24, 2014 4:22 PM
To: Edward Hartnett
Cc: Kim Kokkonen; address@hidden
Subject: Re: FW: Last Issue with NetCDF VLENs/Attributes

Hi Ed:

I sent this message on 6/10 to Justin and cc'ed you. did you not get it?
However, I see that I said "next release 4.5.2" and it should have been "next 
release 4.5.1" (which is out), so
I apologize if that was misleading.

John

----

> Hi Justin:
>
> 1) Here are some docs on how to work with nested vlens:
>
> http://www.unidata.ucar.edu/software/thredds/v4.5/netcdf-java/reference/StructureData.html#vlen
>
> 2) theres a bug in the library that your example uncovered, which make your 
> data look like:
>
> Structure {
> int shutterPositionA;
> int shutterPositionD;
> int shutterPositionB;
> int shutterPositionC;
> int dspGainMode;
> int coneActiveStateA;
> int coneActiveStateD;
> int coneActiveStateB;
> int coneActiveStateC;
> int loopDataA(1, *, *);
> int loopDataB(1, *, *);
> long sampleVtcw;
> } tim_records(time=29);
>
>
> when it should be:
>
> Structure {
> int shutterPositionA;
> int shutterPositionD;
> int shutterPositionB;
> int shutterPositionC;
> int dspGainMode;
> int coneActiveStateA;
> int coneActiveStateD;
> int coneActiveStateB;
> int coneActiveStateC;
> int loopDataA(1, *);
> int loopDataB(1, *);
> long sampleVtcw;
> } tim_records(time=29);
>
>
> This will be fixed in next release 4.5.2 probably in a few days. However I 
> _think_ you can still access the data as above with previous versions.
>
> John
>
> > Hello,
> >
> > I'm working with NetCDF-Java to read a NetCDF file. My NetCDF file contains 
> > a compound type with several int records nested in it. The compound type 
> > also contains two nested VLEN int types. I'm able to read values in the 
> > non-VLEN int fields of the compound type, but I'm not able to read values 
> > in VLEN types. I can only read their lengths. I have looked on the Github 
> > project to try and find an example of reading VLEN types using Java but I 
> > was not able to find anything. Do you have any resources available that 
> > demonstrate how to read values out of a VLEN type that is nested inside of 
> > a compound type?
> >
> > I've attached my IntTimSciSamp.nc file, the output of "ncdump 
> > IntTimSciSamp.nc", and my IntTimSciSampRead.java code to this email. I 
> > appreciate any help you could give me.
> >
> > Thank you,
> > Justin Spurgeon
> >