-
Notifications
You must be signed in to change notification settings - Fork 145
Calculating Lamb weathertypes for CMIP5, CMIP6, SMILES and EURO-CORDEX #4231
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
Open
thomaskroi1996
wants to merge
56
commits into
main
Choose a base branch
from
weathertyping_wegc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,093
−0
Open
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
d28af3b
refactoring the code and cleaning up
thomaskroi1996 0c39a5a
add reference
thomaskroi1996 7bf3acd
add jones93ijc.bibtex
thomaskroi1996 0c2f5f9
added dashed unerline
thomaskroi1996 8fecb2c
changed docstring format
thomaskroi1996 57aad29
Merge branch 'main' into weathertyping_wegc
thomaskroi1996 99ac970
Merge branch 'main' into weathertyping_wegc
thomaskroi1996 ce833be
using less locals, refactoring weathertyping.py
thomaskroi1996 65402ba
less locals, use function for driver string
thomaskroi1996 57e5dea
refactor calc_wt_means, calc_wt_std, calc_wt_anomaly
thomaskroi1996 174126e
docstrings
thomaskroi1996 a13c034
doc
thomaskroi1996 d4a0374
doc
thomaskroi1996 0523ccb
update
thomaskroi1996 3ac9810
Merge branch 'main' into weathertyping_wegc
thomaskroi1996 b6ac979
update
thomaskroi1996 5b538d1
Merge branch 'weathertyping_wegc' of https://github.com/ESMValGroup/E…
thomaskroi1996 236cd79
minor codacy issues
thomaskroi1996 793c016
minor codacy issues
thomaskroi1996 d1fb4f8
minor codacy issues
thomaskroi1996 216ed8f
minor codacy issues
thomaskroi1996 04dd54f
some medium issues
thomaskroi1996 3b71b37
some medium issues
thomaskroi1996 e8df48b
refactor wt_algorithm
thomaskroi1996 24527f3
Merge branch 'main' of https://github.com/ESMValGroup/ESMValTool into…
thomaskroi1996 e2b5013
magic values
thomaskroi1996 899aca1
minor
thomaskroi1996 b18c427
refactor plot_maps
thomaskroi1996 3273db4
refactor plot_maps
thomaskroi1996 ed31fdb
minor
thomaskroi1996 3d551da
minor changes for provenance handling
thomaskroi1996 d8128c6
trailing comma
thomaskroi1996 52e7e59
.
thomaskroi1996 4405f42
rm copilot and codacy-cli files, rm comments for imports
thomaskroi1996 1ae08c6
change docstrings to numpy style
thomaskroi1996 a4c476d
change docstrings to numpy style
thomaskroi1996 81ec1bd
add blank lines
thomaskroi1996 18e109c
latest review fixes/changes
thomaskroi1996 1335bdc
trailing comma
thomaskroi1996 5829002
Merge branch 'main' into weathertyping_wegc
thomaskroi1996 d91df50
Update esmvaltool/references/maraun21jgr.bibtex
thomaskroi1996 dc7e954
Update doc/sphinx/source/recipes/recipe_weathertyping.rst
thomaskroi1996 70d34e4
Update esmvaltool/config-references.yml
thomaskroi1996 f46b7f6
Update esmvaltool/references/jones93ijc.bibtex
thomaskroi1996 5000633
Update esmvaltool/recipes/recipe_weathertyping_CMIP6.yml
thomaskroi1996 7e06bc4
Update esmvaltool/recipes/recipe_weathertyping_CMIP6.yml
thomaskroi1996 1c0d8a6
Update esmvaltool/config-references.yml
thomaskroi1996 23ecceb
Update esmvaltool/diag_scripts/weathertyping/plot_utils.py
thomaskroi1996 fca1031
Update esmvaltool/diag_scripts/weathertyping/plot_utils.py
thomaskroi1996 242d774
Update esmvaltool/diag_scripts/weathertyping/plot_utils.py
thomaskroi1996 302f1a7
Update esmvaltool/diag_scripts/weathertyping/wt_utils.py
thomaskroi1996 f5b3935
Update esmvaltool/diag_scripts/weathertyping/wt_utils.py
thomaskroi1996 f2579c3
Update esmvaltool/recipes/recipe_weathertyping_CMIP6.yml
thomaskroi1996 835fcf1
Update esmvaltool/recipes/recipe_weathertyping_CMIP6.yml
thomaskroi1996 79844d3
Update esmvaltool/recipes/recipe_weathertyping_CMIP6.yml
thomaskroi1996 76e1ff6
Merge branch 'main' into weathertyping_wegc
thomaskroi1996 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+99.6 KB
...inx/source/recipes/figures/weathertyping/ERA5__lwt_rel_occurrence_1958-2014.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+128 KB
...inx/source/recipes/figures/weathertyping/correlation_matrix_E-OBS_1958-2014.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+109 KB
doc/sphinx/source/recipes/figures/weathertyping/lwt_1_ERA5__psl_mean_1958-2014.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+107 KB
...rce/recipes/figures/weathertyping/lwt_1_TaiESM1_r1i1p1f1_psl_mean_1950-2014.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+100 KB
...x/source/recipes/figures/weathertyping/slwt_EOBS_4_ERA5__psl_mean_1958-2014.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| .. _recipes_weathertyping: | ||
|
|
||
| Lamb Weathertypes | ||
| =================== | ||
|
|
||
| Overview | ||
| -------- | ||
|
|
||
| A diagnostic to calculate Lamb weathertypes over a given region. Furthermore, | ||
| correlations between weathertypes and precipitation patterns over a given area can be calculated | ||
| and 'combined' or 'simplified' weathertypes can be derived. Additionally, mean fields, as well as | ||
| anomalies and standard deviations can be plotted. | ||
|
|
||
|
|
||
| Available recipes and diagnostics | ||
| --------------------------------- | ||
|
|
||
| Recipes are stored in esmvaltool/recipes/ | ||
|
|
||
| * recipe_weathertyping.yml | ||
|
|
||
| Diagnostics are stored in esmvaltool/diag_scripts/weathertyping/ | ||
|
|
||
| * weathertyping.py: calculate lamb and simplified WT, plot mean, anomalies and std for each WT for psl, tas, pr | ||
|
|
||
|
|
||
| User settings in recipe | ||
| ----------------------- | ||
|
|
||
| #. weathertyping.py | ||
|
|
||
| *Required settings for script* | ||
|
|
||
| *Optional settings for script* | ||
|
|
||
| * correlation_threshold: correlation threshold for selecting similar WT pairs, only needed if automatic_slwt==True and predefined_slwt==False. default=0.9 | ||
| * rmse_threshold: rmse threshold for selecting similar WT pairs, only needed if automatic_slwt==True and predefined_slwt==False. default=0.002 | ||
| * plotting: if true, create plots of means, anomalies and std for psl, tas, prcp | ||
| * automatic_slwt: if true, automatically combine WT with similar precipitation patterns over specified area (via thresholds of correlation and rmse OR via predefined_slwt) | ||
| * predefined_slwt: dictionary of mappings between weathertypes | ||
|
|
||
| .. note:: | ||
|
|
||
| predefined_slwt can be a dictionary where keys are slwt and the values are arrays of lwt OR where keys are lwt and values are slwt | ||
|
|
||
| *Required settings for variables* | ||
|
|
||
| *Optional settings for variables* | ||
|
|
||
| *Required settings for preprocessor* | ||
|
|
||
| *Optional settings for preprocessor* | ||
|
|
||
| *Color tables* | ||
|
|
||
|
|
||
| Variables | ||
| --------- | ||
|
|
||
| * psl (atmos, day, time longitude latitude) | ||
| * tas (atmos, day, time longitude latitude) | ||
| * tp (atmos, day, time longitude latitude) | ||
| * pr (atmos, day, time longitude latitude) | ||
|
|
||
|
|
||
| Observations and reformat scripts | ||
| --------------------------------- | ||
|
|
||
| *Note: (1) obs4MIPs data can be used directly without any preprocessing; | ||
| (2) see headers of reformat scripts for non-obs4MIPs data for download | ||
| instructions.* | ||
|
|
||
| * E-OBS: European Climate Assessment & Dataset gridded daily precipitation sum | ||
| * ERA5: ECMWF reanalysis | ||
|
|
||
| References | ||
| ---------- | ||
|
|
||
| * Maraun, D., Truhetz, H., & Schaffer, A. (2021). Regional climate model biases, their dependence on synoptic circulation biases and the potential for bias adjustment: A process-oriented evaluation of the Austrian regional climate projections. Journal of Geophysical Research: Atmospheres, 126, e2020JD032824. https://doi.org/10.1029/2020JD032824 | ||
|
|
||
| * Jones, P.D., Hulme, M. and Briffa, K.R. (1993), A comparison of Lamb circulation types with an objective classification scheme. Int. J. Climatol., 13: 655-663. https://doi.org/10.1002/joc.3370130606 | ||
|
|
||
| Example plots | ||
| ------------- | ||
thomaskroi1996 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| .. _fig_weathertyping_1: | ||
| .. figure:: /recipes/figures/weathertyping/lwt_1_ERA5__psl_mean_1958-2014.png | ||
| :align: center | ||
|
|
||
| PSL mean map of Lamb WT 1 for ERA5. | ||
|
|
||
| .. _fig_weathertyping_2: | ||
| .. figure:: /recipes/figures/weathertyping/lwt_1_TaiESM1_r1i1p1f1_psl_mean_1950-2014.png | ||
| :align: center | ||
|
|
||
| PSL mean map of Lamb WT 1 for TaiESM1. | ||
|
|
||
| .. _fig_weathertyping_3: | ||
| .. figure:: /recipes/figures/weathertyping/slwt_EOBS_4_ERA5__psl_mean_1958-2014.png | ||
| :align: center | ||
|
|
||
| PSL mean map of slwt_EOBS 4 for ERA5 (in this case combined Lamb WT 24 and 23). | ||
|
|
||
| .. _fig_weathertyping_4: | ||
| .. figure:: /recipes/figures/weathertyping/correlation_matrix_E-OBS_1958-2014.png | ||
| :align: center | ||
|
|
||
| Heatmap of correlation values for Lamb WTs 1-27. | ||
|
|
||
| .. _fig_weathertyping_5: | ||
| .. figure:: /recipes/figures/weathertyping/ERA5__lwt_rel_occurrence_1958-2014.png | ||
| :align: center | ||
|
|
||
| Stackplot of seasonal relative occurrences of each WT for ERA5. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| """Initialize the ESMValTool weathertyping package.""" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Have you thought about adding your scripts to the API documentation? You could add the settings in the header of the files and then link to them from here. Just a thought.