[CF-metadata] code that does semantic checking of CF headers
On 4/20/2012 4:54 AM, Gaffney, Sean P. wrote:
> Hi everyone, Thanks for all your feedback.
>
> It's made things clearer for me now. Just to summarise then, a suite of attributes that would provide a precise numeric description of the data within a variable could then be (ignoring things such as scaling factors and offsets)
>
> Actual_min, actual_max or actual_range: which describe the actual variable values held in the file, their minimum and maximum (e.g. for sea_water_salinity, I could have data with actual_min of 25.732, actual_max of 34.994)
> Valid_min, valid_max and valid_range: these detail the feasible range of data, so for salinity they could range from 0 to 41.5 (if following the BODC parameter vocabulary)
> _FillValue which then presets the value that should be used for absent data - in the case of salinity, if keeping to the BODC parameter vocabulary, a value of -1.
My own idiom is to use _FillValue only for values that are never
written, which was its original intent. If I need missing values then I
add an explicit attribute "missing_value"; if there are multiple missing
values, the attribute can be a vector.
So, I never use _FillValue explicitly, nor valid_min or valid_max, and
always use missing_value if needed.
I always code to write every value out, never relying on unwritten
values == missing values. That means I can set fill to off, which can
save a lot of time when writing (up to 2x)
As I say, thats just my own personal idiom for writing netcdf.
Received on Mon Apr 23 2012 - 10:08:09 BST
This archive was generated by hypermail 2.3.0
: Tue Sep 13 2022 - 23:02:41 BST