You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enable missing_value to override default default_value for fields #551
Following a discussion on 4 May 2020, there is interest in having the the default value for a field take on the specified missing_value if no explicit default_value is given in the registry entry for a field.
The motivation for this change is that fields that do contain missing values would otherwise need to be explicitly initialized by a core to the missing value; initializing a field to its registry-specified missing_value would remove this burden from the core developer.
@MiCurry, my hope is that missing_value and default_value wouldn't be specified for the same field because that would be confusing.
@mgduda, is the difference in behavior between missing_value and default_value whether this attribute ends up in the NetCDF file or not (missing_value: yes; default_value: no)?
@xylar Aside from differences in how these two attributes are used to set the initial value of a field after it has been allocated, that's correct: the missing_value attribute is added as a netCDF variable attribute, while the default_value attribute is not.
Activity
xylar commentedon May 9, 2020
@mgduda, yep, that looks like what we discussed. Thanks for being willing to implement this!
MiCurry commentedon May 11, 2020
And if both
missing_valueanddefault_valueare present, then the field's default value should be set todefault_value? i.e. the current behavior?xylar commentedon May 12, 2020
@MiCurry, my hope is that
missing_valueanddefault_valuewouldn't be specified for the same field because that would be confusing.@mgduda, is the difference in behavior between
missing_valueanddefault_valuewhether this attribute ends up in the NetCDF file or not (missing_value: yes;default_value: no)?mgduda commentedon May 26, 2020
@xylar Aside from differences in how these two attributes are used to set the initial value of a field after it has been allocated, that's correct: the
missing_valueattribute is added as a netCDF variable attribute, while thedefault_valueattribute is not.