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

[netCDF #PCM-734975]: NetCDF CF Conventions Issue



Hi Adriana,

I'm glad you got that figured out.

One question. Why are you writing the data as floats? Since you are only 
storing 0s and 1s, wouldn't byte be a better/smaller data type? The CF "Flags" 
section [1] doesn't say anything about the data type other than that the data 
type of the variable matching that of the flag values. But I've only seen CF 
flags used with byte. So, just curious.

Cheers,

Ethan

[1] 
http://cfconventions.org/Data/cf-conventions/cf-conventions-1.9/cf-conventions.html#flags

> Hi Ethan,
> Thanks again for your offer to help! I was able to work with a software
> engineer at NCAR, and they figured out what was going on. Turns out, I
> thought I was writing doubles for both the variable and the flags. However,
> R, as a default, converts variables to floats when you write them to
> netcdf. Annoyingly, it does not do this conversion for the flag values, so
> one has to manually prescribe the precision. We just figured this out late
> yesterday!
> Thanks again,
> Adriana

Ticket Details
===================
Ticket ID: PCM-734975
Department: Support netCDF
Priority: Normal
Status: Open
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.