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

Adds support for forecast reference metadata in CF checks. #779

Merged
merged 2 commits into from
Mar 25, 2020

Conversation

lukecampbell
Copy link
Member

@lukecampbell lukecampbell commented Mar 24, 2020

This commit updates cfutil's feature detection to ignore variables used
to declare forecast metadata. Specifically, variables with standard
names forecast_period and forecast_reference_time are used in
conjunction with time to indicate to dataset consumers the appropriate
model initialization time, forecast hour, and valid time. This is
useful for datasets that aggregate multiple forecast runs, such as FMRC.

This commit updates cfutil's feature detection to ignore variables used
to declare forecast metadata. Specifically, variables with standard
names 'forecast_period' and 'forecast_reference_time' are used in
conjunction with 'time' to indicate to dataset consumers the appropriate
model initialization time, forecast hour, and valid time. This is
useful for datasets that aggregate multiple forecast runs, such as FMRC.
compliance_checker/tests/test_feature_detection.py Outdated Show resolved Hide resolved
compliance_checker/cfutil.py Show resolved Hide resolved
This commit incorporates the requested changes by the reviewer.

 - Using a set in lieu of a list for simple membership checking
 - Using unittest API for assertions.
'forecast_period',
'forecast_reference_time',
]
}
forecast_metadata_variables = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually meant forecast_metadata_variables for the list -> set conversion, apologies if this wasn't explicit. This likely to be fairly minor, so I'll just keep as is and merge, possibly revisiting this for #727 and other similar places in code which use lists.

@benjwadams benjwadams merged commit 307aab6 into ioos:master Mar 25, 2020
@lukecampbell
Copy link
Member Author

Thank you

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

Successfully merging this pull request may close these issues.

2 participants