Skip to content

Enable missing_value to override default default_value for fields #551

Open

Description

@mgduda

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.

Activity

  1. added
    For discussion
    on May 7, 2020
  2. self-assigned this
    on May 7, 2020
  3. xylar commented on May 9, 2020

    @xylar
    Collaborator

    @mgduda, yep, that looks like what we discussed. Thanks for being willing to implement this!

  4. MiCurry commented on May 11, 2020

    @MiCurry
    Contributor

    And if both missing_value and default_value are present, then the field's default value should be set to default_value? i.e. the current behavior?

  5. xylar commented on May 12, 2020

    @xylar
    Collaborator

    @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)?

  6. mgduda commented on May 26, 2020

    @mgduda
    ContributorAuthor

    @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.

  7. added
    For discussion
    on Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

For discussionFramework

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions