Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PI] Quality Flag Handling #3358

Closed
5 tasks done
abooton opened this issue Jul 15, 2019 · 5 comments
Closed
5 tasks done

[PI] Quality Flag Handling #3358

abooton opened this issue Jul 15, 2019 · 5 comments

Comments

@abooton
Copy link
Contributor

abooton commented Jul 15, 2019

Provision of support for "Quality Flags"

Required work
The relevant PRs to implement support for quality flags are below:


Description:

Quality flags can be encoded in CF compliant data by using the "ancillary variable" and with "flag" values. This convention allows for a more explicit descriptions of the "quality flags" that one would like to associate with the data. (See snipped below for example)

According to the CF conventions: http://cfconventions.org/Data/cf-conventions/cf-conventions-1.7/cf-conventions.html#ancillary-data

However, at present, there are a couple of small issues when creating a "flag" auxiliary coordinate, as the current implementation does allow the issues below to be correctly handled:

  1. The status_flag standard name should be recognised as so if the cube name is also a standard_name. (At present it come in as a long name.) See Appendix C, Standard Name Modifiers.
  2. The ancillary_variable should be a local attribute, as it is directly associated the specific data. (i.e. like a latitude coord would be local to the data).
  3. status_flags should not have units (they are described instead). See Appendix C, Standard Name Modifiers.

""
image

The following code was used to generate the flag coordinate, the meta data for which is shown above:

image

@lbdreyer
Copy link
Member

Delaying this til the next Iris release (Iris 3).

Unfortunately we have run out of time to properly implement this (in the way we want to which would include an improvement to how Cube dimensional metadata is handled), so this will instead be included in the Iris 3 release. Hopefully that shouldn't be an issue as Iris 3 is only a month away!

@lbdreyer lbdreyer modified the milestones: v2.3.0, v3.0.0 Sep 27, 2019
@lbdreyer
Copy link
Member

lbdreyer commented Sep 27, 2019

The relevant PRs to implement support for quality flags are below:

Note - list copied to top of issue for easier use (26/11/2019).

@stephenworsley
Copy link
Contributor

In the following line in the netCDF file:

air_temperature:coordinates = "flag forecast_period forecast_reference_time time" ;

it seems as though the appearance of flag is probably a mistake. The var_name flag should only be referenced by ancillary_variables. i.e. in the line:

air_temperature:ancillary_variables = "flag" ;

@abooton abooton changed the title Quality Flag Handling [PI] Quality Flag Handling Aug 21, 2020
abooton pushed a commit that referenced this issue Aug 21, 2020
Addresses issues associated with #3473, #3474 and #3358, loading/saving of ancillary variables to/from netcdf, including quality flags.
@abooton
Copy link
Contributor Author

abooton commented Aug 21, 2020

Support for status flags (was added in issue #3474). However, the "what's new" seems to have been overlooked?

@stephenworsley
Copy link
Contributor

A "what's new" entry has now been added by #3801 (and fixed by #3816). This closes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants