Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.

[netcdfgroup] Why translates nc_get_vara_float all short _FillValues to 0?

Hi,

I just was surprised by strange results from ncview when reading a
variable with 'short' values, where all data is undefined. ncview reads
all data with nc_geta_vara_float.


_FillValues are defined as -32767s. Reading undefined data with
nc_get_vara_float results in values = -0 or 0 for all _FillValues. I had
expected a value like -32767.f (or more generally, the _FillValue
translated into float)

Is the 0-result really the expected behaviour of nc_get_vara_float? I
have then no idea how to handling _FillValues correctly.

Best regards,

Heiko



-- 
Dr. Heiko Klein                   Norwegian Meteorological Institute
Tel. + 47 22 96 32 58             P.O. Box 43 Blindern
http://www.met.no                 0313 Oslo NORWAY

Attachment: ncviewFillValue.png
Description: PNG image

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