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

CF computed_standard_name message needs improvement #720

Open
daltonkell opened this issue Jan 17, 2020 · 0 comments
Open

CF computed_standard_name message needs improvement #720

daltonkell opened this issue Jan 17, 2020 · 0 comments
Assignees

Comments

@daltonkell
Copy link
Contributor

When checking the computed_standard_name of a variable, this message is ambiguous:

§4.3 Vertical Coordinate
* §4.3.3 The standard_name of `sigma` must map to the correct computed_standard_name, `{'height_above_reference_ellipsoid', 'height_above_mean_sea_level', 'height_above_geopotential_da
tum', 'altitude'}

In the code, this message appears when the attribute does not exist. It should only appear when the attribute is incorrect; otherwise, the message should explicitly indicate its absence.

correct_computed_std_name_ctx.assert_true(
getattr(variable, 'computed_standard_name', None) in _comp_std_name,
'§4.3.3 The standard_name of `{}` must map to the correct computed_standard_name, `{}`'.format(vname, _comp_std_name)
)
ret_val.append(correct_computed_std_name_ctx.to_result())

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

No branches or pull requests

2 participants