Closed einola closed 3 years ago
This looks like a good idea thanks.
One thing I see is that with your solution you also need to add the statements where you have defined the FillValue variable:
v%FillValue_set = .TRUE.
If you add this update, then I can merge it in.
In general, I would note that when we originally developed ncio, missing_value
was the typical attribute to set, but now CF-conventions specify that _FillValue
is now the correct attribute. So this update had not been fully and cleanly implemented thereafter. I think in the future, eventually the missing_value
attribute can be removed, or at least given lower priority compared to _FillValue
.
Yes, of course. I've pushed an update.
You're right that missing_value
and _FillValue
are doing the same thing, so it's annoying to have the two. But not much we can do about that it seems. I only caught this because ncview wasn't showing my mask properly :)
There are two minor problems with the way the _FillValue and missing value attributes are currently set:
missing_value
is not set when callingnc_write
Here I address those by
v%FillValue = v%missing_value
, whenmissing_value
ispresent
v%missing_set
andv%FillValue_set
to.false.
when initialising a new variable innc_v_init
.