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

Include influence of day weighting in the intensity categorisation #2028

Conversation

gavinevans
Copy link
Contributor

Related to https://github.com/metoppv/mo-blue-team/issues/742

Description
Edit to include the influence of day weighting when performing the intensity categorisation.

Testing:

  • Ran tests and they passed OK
  • Added new tests for the new feature(s)

Copy link
Contributor

@bayliffe bayliffe left a comment

Choose a reason for hiding this comment

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

The behaviour is now as I would expect for the emphasis of daytime symbols. Perhaps this would have shown up more clearly testing in UK winter, as I struggled to find enough precipitation cases, still I'm glad it got caught. Good work Gavin.

@bayliffe bayliffe merged commit 1471c9e into metoppv:1.6.x Aug 20, 2024
8 checks passed
gavinevans added a commit to gavinevans/improver that referenced this pull request Oct 14, 2024
gavinevans added a commit that referenced this pull request Oct 30, 2024
* Alternative daily weather symbol creation (#2023)

* Commit ModalFromGroupings plugin and associated CLI to a branch, checked out from the 1.6.x release branch.

* Minor edits.

* Initial fix for intensity categories check and add a test.

* Get rid of clipping that was introducing spurious dry symbols.

* Use file counting, rather than looking at the metadata for deciding the day weighting. This is required because all the files are provided with UTC times, rather than in local time, so for sites outside the UK domain, a UTC day weighting isn't appropriate.

* Edits to units test and corrections to docstrings.

* Docstrings, checksums, isort, black, flake8

* Modify docstrings.

* Modify docstring.

* Docstring edits.

* Rewrite of find_most_significant_dry_code following Ben Ayliffe's suggestion to make it work as intended.

* Edits including to add a test to demonstrate the effect of the changes to find_most_significant_dry_code

* Edits to get find_most_significant_dry_code working for all unit tests.

* Refine day weighting unit tests.

* Update checksums.

* Fix to avoid issue encountered in test suite.

* Edit docstring.

* Edit docstrings.

* Demonstrate reversal of intensity dictionary.

* Modification following review.

* Add testing to show implications of altering the categorisation dictionaries.

* Edits related to day_weighting.

* Edits to get day_weighting related tests working.

* isort, black.

* Minor edits.

* Update checksums.

* Add another unit test.

* Updates following review.

* Review modifications excluding interface changes.

* Edit to the interface to remove the ignore_intensity argument and use the presence of the intensity_categories dictionary instead. Also a few minor edits.

* Minor edits.

* Bug fix: WX groupings PR miscalculating day length as number of files (#2026)

* Adds missing brackets in calculation of start file and end file for middle of the day emphasis. This didn't matter for hourly inputs, which is what the unit tests focus upon. However, for 3-hourly data it is vital as otherwise the day length is not scaled by the interval to give a number of files from which to count back.

* Typo fix.

* Simplify unit tests for weather symbol day weighting, so that weather codes do not appear to be reversed in time. (#2027)

* Minor edit to include the influence of day weighting when using the intensity categorisation. (#2028)

* Unfinished commit.

* Edits to make daily weather symbols updates compatible with master.

---------

Co-authored-by: bayliffe <[email protected]>
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