NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

[netcdf-java] Detecting missing values in sequence?

Hi,

I wondered how I can detect missing values in a sequence.

For numbers in variables (integer, double, ...) I can detect missing values 
with this code:
// VariableDS variable
// Integer/Double/... value
if (variable.isMissing(value.doubleValue())) {
  // MISSING
} else {
  // NO MISSING
}

As far as I read your sourcecode a missing is not possible for strings and 
chars. Enhanced enums sometimes are resolved to the string "Missing value", 
which can be detected, but not all enums have a value named "Missing value".

I am not so familiar with BUFR, but here
https://confluence.ecmwf.int/display/ECC/BUFR%3A+Missing+values
you can read "Each element in the data section of a BUFR can be missing".

Indeed the value "Temperature-air_temperature" in a sequence (of a BUFR file) 
has a value of -1 Kelvin, which is impossible. After enhance this value is 
changed to NaN. Since I have no "isMissing"-function in StructureData, I am not 
sure, how I should check for missing values. I could check for NaN for 
Double/Float but what for Integer/Byte/Short/... ?

Kind regards

Netty


  • 2019 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: