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

[netCDFJava #EHW-451325]: Error with a BUFR file

This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.


  • Subject: [netCDFJava #EHW-451325]: Error with a BUFR file
  • Date: Wed, 22 Jul 2009 09:11:00 -0600

> Full Name: bacheviller
> Email Address: address@hidden
> Organization: meteo-france
> Package Version: 4.0
> Operating System: linux / windows
> Hardware:
> Description of problem:
> 
> Hello,
> 
> I get bad values with the provided BUFR file for "K index", "KO index",
> "Max buoyancy" fields. I suspect these fields are concernes because
> their data width reaches 8 bits.
> 
> The problem only occurs for points where data are missing : instead of
> getting a 255 value (which is the right code for such data), I get a -1
> value. Maybe due to signed/unsigned data ?

Hi Frederic:

Yes, the raw access keeps the data as bytes (for efficiency) which means 255 == 
-1, since bytes are signed in java.

If you want the library to handle that for you, open with 
NetcdfDataset.openDataset(). You will see that those variables are now type 
float with missing values set to NaN.

Ticket Details
===================
Ticket ID: EHW-451325
Department: Support netCDF Java
Priority: Normal
Status: Closed