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

Fix bad comparison for sarah datafiles. #224

Merged
merged 2 commits into from
Mar 4, 2022
Merged

Conversation

euronion
Copy link
Collaborator

@euronion euronion commented Mar 4, 2022

Change proposed in this Pull Request

Fix a bad comparison when creating cutouts with SARAH2 data.
Previously if the cutout was to be created for e.g. an upper end of "2013-12-31 23:00" and the sarah_dir did only contain datafiles for 2013 (i.e. labelled "xxx20131223yyy.nc"), then the comparison failed and the error was thrown.

This bug was not discovered because we had previously always downloaded multiple SARAH2 dataset years, i.e. more than 2013 were contained in the same directory and the bug did not surface.

Fixing this here.

How Has This Been Tested?

Locally. New cutout with SARAH data created.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I tested my contribution locally and it seems to work fine.
  • I locally ran pytest inside the repository and no unexpected problems came up.
  • I have adjusted the docstrings in the code appropriately.
  • I have documented the effects of my code changes in the documentation doc/.
  • I have added newly introduced dependencies to environment.yaml file.
  • I have added a note to release notes doc/release_notes.rst.
  • I have used pre-commit run --all to lint/format/check my contribution

@euronion euronion merged commit f8a43d6 into master Mar 4, 2022
@euronion euronion deleted the fix/sarah-cutout-creation branch March 4, 2022 19:35
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