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

[netCDFJava #RUT-379172]: Bad values while reading BUFR files



> Full Name: bacheviller
> Email Address: address@hidden
> Organization: meteo-france
> Package Version: 4.0
> Operating System:
> Hardware:
> Description of problem: Hello,
> I'm reading BUFR files with the netCDF software package. You fill find in 
> attachments the code I'm using and an example of file.
> When the file contains missing values, the return values sometimes are NaN, 
> which is normal, sometimes not, which disturbs me !
> In the provided file, the 2 first values are missing (-9999.0), the next 2 
> ones are 10 and 11 (from a dump of this file using unidata's java tool 
> ucar.bufr.BufrDump). Instead, the code I have written returns the following 
> values : 24, 24, 10, 11.
> I wonder whether some interpolation is processed while reading a file or 
> something other or whether I have forgotten something in my code.
> Please could you have a look to this and answer me then ? I'll give you more 
> details if you think it's necessary.
> Thanks in advance.
> 
> 

Hi Frederic:

ucar.bufr.BufrDump is deprecated and no longer supported. If your comparisons 
are only with that, then that may be the problem. The Netcdf-Java library now 
has separate classes for reading BUFR. 

there is no interpolation. however, when you read through 
NetcdfDataset.openDataset(), you get missing values turned into NaNs, and enums 
converted to Strings. Use NetcdfDataset.openFile() to read the raw data.

when i run your program, i get:

Four first values :
i=0 ; lat=38.031258 ; lon=15.183215 ; value=24.0
i=1 ; lat=38.029785 ; lon=15.145485 ; value=24.0
i=2 ; lat=38.028667 ; lon=15.107955 ; value=10.0
i=3 ; lat=38.02733 ; lon=15.070305 ; value=11.0

im guessing that's probably right. let me know if you think otherwise. also, 
let me know what version of library you are using.





Ticket Details
===================
Ticket ID: RUT-379172
Department: Support netCDF Java
Priority: Normal
Status: Open