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

Mobt 496 enforce forecast between references #1907

Merged

Conversation

brhooper
Copy link
Contributor

@brhooper brhooper commented Jun 2, 2023

Addresses #1900
Acceptance test data: metoppv/improver_test_data#12

Adds functionality to enforce forecast to be within lower and upper bounds derived from linear functions of a reference forecast. This extends functionality implemented in #1900 .

Testing:

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

…s. Update CLI (still issues with this which will require further changes). Add new acceptance test.
…with CLI changes. Changes to unit tests to work with plugin changes. Update checksums.
@codecov
Copy link

codecov bot commented Jun 2, 2023

Codecov Report

Merging #1907 (cd53616) into master (597b578) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1907   +/-   ##
=======================================
  Coverage   98.33%   98.33%           
=======================================
  Files         120      120           
  Lines       11380    11410   +30     
=======================================
+ Hits        11190    11220   +30     
  Misses        190      190           
Impacted Files Coverage Δ
improver/utilities/enforce_consistency.py 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

@Katie-Howard Katie-Howard self-assigned this Jun 5, 2023
Copy link
Contributor

@Katie-Howard Katie-Howard left a comment

Choose a reason for hiding this comment

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

I've had a look through these changes, and they generally look fine. I just have one question to be addressed. I've also had a little look at the acceptance test data and left a comment on that too. I couldn't see any data in the new file, so if you could check that please?

improver/cli/enforce_consistent_forecasts.py Show resolved Hide resolved
@Katie-Howard Katie-Howard assigned brhooper and unassigned Katie-Howard Jun 6, 2023
@brhooper brhooper assigned Katie-Howard and unassigned brhooper Jun 7, 2023
Katie-Howard
Katie-Howard previously approved these changes Jun 7, 2023
Copy link
Contributor

@Katie-Howard Katie-Howard left a comment

Choose a reason for hiding this comment

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

These changes all look fine. I reran all the tests and they passed fine 👍

@Katie-Howard Katie-Howard removed their assignment Jun 7, 2023
@mspelman07 mspelman07 self-assigned this Jun 13, 2023
Copy link
Contributor

@mspelman07 mspelman07 left a comment

Choose a reason for hiding this comment

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

Thanks Ben. Generally looks good, just a few small queries.

improver/utilities/enforce_consistency.py Outdated Show resolved Hide resolved
improver/utilities/enforce_consistency.py Outdated Show resolved Hide resolved
improver/utilities/enforce_consistency.py Outdated Show resolved Hide resolved
improver/cli/enforce_consistent_forecasts.py Show resolved Hide resolved
improver/cli/enforce_consistent_forecasts.py Show resolved Hide resolved
@mspelman07 mspelman07 assigned brhooper and unassigned mspelman07 Jun 14, 2023
@brhooper brhooper assigned mspelman07 and unassigned brhooper Jun 14, 2023
Copy link
Contributor

@mspelman07 mspelman07 left a comment

Choose a reason for hiding this comment

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

All the changes look good, just one tiny thing and I'm happy to approve.

improver/utilities/enforce_consistency.py Outdated Show resolved Hide resolved
@mspelman07 mspelman07 removed their assignment Jun 15, 2023
@brhooper brhooper assigned mspelman07 and unassigned brhooper Jun 19, 2023
@mspelman07 mspelman07 merged commit 8fead86 into metoppv:master Jun 19, 2023
@mspelman07 mspelman07 assigned brhooper and unassigned mspelman07 Jun 19, 2023
bayliffe added a commit to bayliffe/improver that referenced this pull request Jul 28, 2023
* upstream/master:
  Fix to the wind vertical displacement adjustment implementation (metoppv#1927)
  Add function which normalises input cubes according to a reference (metoppv#1919)
  Skip ECC bounds usage when converting probabilities to percentiles (metoppv#1926)
  Add CLIs to support rescaling of the forecast based on altitude difference (metoppv#1917)
  Changes to the modal code to increase the percentage to 30% and change the groupings to provide a more representative daily summary symbol. (metoppv#1925)
  Add plugins to support rescaling of the forecast based on altitude difference (metoppv#1916)
  Support conversion from percentiles to probabilities (metoppv#1924)
  Correct handling of reference time in weather_code plugin (metoppv#1920)
  Add CLI for clipping cubes (metoppv#1918)
  Update cbh ecc name (metoppv#1922)
  Updates Broadcast and expand_bounds in Combine Plugin (metoppv#1914)
  Mobt515 cloud base height spot extraction (metoppv#1911)
  MOBT-494: Cube title setting in weather symbol code (metoppv#1912)
  MOBT512-masking percentiles for cloud base height (metoppv#1908)
  Mobt 496 enforce forecast between references (metoppv#1907)
MoseleyS pushed a commit to MoseleyS/improver that referenced this pull request Aug 22, 2024
* Extend plugin functionality to enable using two bounds. Add unit tests. Update CLI (still issues with this which will require further changes). Add new acceptance test.

* Changes to CLI and acceptance test inputs. Changes to plugin to work with CLI changes. Changes to unit tests to work with plugin changes. Update checksums.

* Update formatting.

* Update formatting.

* Update formatting.

* Update docstring formatting.

* remove whitespace.

* Add acceptance test for non-matching input lengths.

* Add new acceptance test for if inputs are too long.

* Changes following review: Additions to docstring, updated unit conversion, removed vestigial CLI.

* Changes following review: updated docstrings.

* Changes following review: correct typo in docstring.
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.

3 participants