-
Notifications
You must be signed in to change notification settings - Fork 100
Add the Ensemble Copula Coupling "transformation" approach #2303
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
base: master
Are you sure you want to change the base?
Changes from 17 commits
747b02e
586d488
a6e5d35
1c40580
cd90e0e
cec517a
a4999fc
b1b1367
ad8b921
dd210f9
fd50f22
fe86944
a04443a
bdd2d09
c8e4305
5bd3bb6
d3b102c
b171c5b
9721775
6a7125d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,343 @@ | ||||||
| # (C) Crown Copyright, Met Office. All rights reserved. | ||||||
| # | ||||||
| # This file is part of 'IMPROVER' and is released under the BSD 3-Clause license. | ||||||
| # See LICENSE in the root of the repository for full licensing details. | ||||||
| """ | ||||||
| ======================================================================= | ||||||
| Example: Convert probabilities to percentiles and perform reordering to generate realizations | ||||||
| ======================================================================= | ||||||
|
||||||
| This example demonstrates how to use the ConvertProbabilitiesToPercentiles and | ||||||
| EnsembleReordering plugins on a synthetic precipitation probability cube. | ||||||
|
|
||||||
| It provides a worked example of the Ensemble Copula Coupling (ECC) approach, | ||||||
| showing how to convert probabilities of exceeding thresholds into percentiles, | ||||||
| and then reorder these percentiles to generate ensemble realizations. The example | ||||||
| illustrates both the "quantile" and "transformation" sampling options available | ||||||
maxwhitemet marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| within ECC, highlighting the differences in the resulting percentiles and | ||||||
| realizations produced by each method | ||||||
|
||||||
| realizations produced by each method | |
| realizations produced by each method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
maxwhitemet marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
maxwhitemet marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
maxwhitemet marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
maxwhitemet marked this conversation as resolved.
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # below 1 mm/h, whilst the scaling, scales the percentiles to be within the | |
| # below 1 mm/h, whilst the scaling scales the percentiles to be within the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amended these sentences related to another comment.
maxwhitemet marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2048,11 +2048,12 @@ def generate_forecast_from_distribution( | |
| template, | ||
| no_of_percentiles=no_of_percentiles, | ||
| ) | ||
| result = EnsembleReordering().process( | ||
| percentiles, | ||
| template, | ||
| result = EnsembleReordering( | ||
| random_ordering=randomise, | ||
| random_seed=random_seed, | ||
| ).process( | ||
| percentiles, | ||
|
||
| template, | ||
| ) | ||
|
|
||
| # Preserve cell methods from template. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.