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

[netCDFJava #YYG-713097]: NetCDF Java



Sabu,

The azimuth angles are floating point values, so you shouldn't be treating them 
as ints. The "repeated" values you see are actually one angle where the value 
is, say 279.0, while the second has an actual value of 279.9.

Ryan

> Hi Ryan,
> 
> Actually that file I sent you was fine. I find that at times it is ok for 
> TJUA but almost always repeatative angles for KBYX data. I have attached such 
> a faulty file. This file has allot of them. I will also put a snippet of the 
> code here along with the output below. I have the repeated values in bold. It 
> starts right off with 279 repeated. I have written a neat patch that solves 
> this problem for me, but I would still like to know if it maybe a bug 
> somewhere or a faulty encoder.
> 
> Code snippet
> 
> private void get_AzimuthData()throws Exception
> {
> v = ncfile.findVariable("azimuth");
> Array data = v.read();
> System.out.println("Azimuth Data Size: "+(int)data.getSize());
> for( int x = 0 ; x < (int)data.getSize() ; x++)
> {   // simple for loop to print out all the data from the variable data
> System.out.println((int)data.getFloat(x));
> }
> }


Ticket Details
===================
Ticket ID: YYG-713097
Department: Support netCDF Java
Priority: Normal
Status: Closed