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

Make time_coverage_start/end attributes optional #90

Open
sfinkens opened this issue Sep 9, 2021 · 0 comments
Open

Make time_coverage_start/end attributes optional #90

sfinkens opened this issue Sep 9, 2021 · 0 comments

Comments

@sfinkens
Copy link
Member

sfinkens commented Sep 9, 2021

The global time_coverage_start/end attributes are looked up in metadata.TIME_COVERAGE. If a platform is missing in that dictionary, pygac-fdr-run fails with a KeyError. This should not be a show stopper. Instead these attributes should be omitted in that case. Proposed solution: Replace

time_cov_start, time_cov_end = TIME_COVERAGE[
get_gcmd_platform_name(ch4.attrs["platform_name"], with_category=False)
]

with TIME_COVERAGE.get(..., (None, None)), and add the attributes only if not None. Else a warning would be useful.

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

1 participant