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

update and combine drought diagnostics #3907

Open
wants to merge 56 commits into
base: main
Choose a base branch
from
Open

update and combine drought diagnostics #3907

wants to merge 56 commits into from

Conversation

lukruh
Copy link
Contributor

@lukruh lukruh commented Feb 6, 2025

Description


Before you get started

Checklist

It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.

New or updated recipe/diagnostic


To help with the number of pull requests:

@lukruh
Copy link
Contributor Author

lukruh commented Feb 10, 2025

Here is an overview of my updates to make it easier to follow the code changes:

  • created a droughts folder for recipes/diagnostics and a common documentation page

spei.R

  • rewrote most of the diag_spei.R or diag_spi.R code, to be more flexible and work with SPEI v1.8
  • split pet calculation into a seperate diag to make it easier to use pet from different sources
  • save an additional metadata.yml (similar to preprocessor output) to make it easier to further process
  • spi can be run as special case of spei

collect_droughts.py

  • based on droughtindex/collect_drought_obs_multi.py (and other collect_*.py)
  • updated to use ancestor metadata instead of searching output folders
  • cleaned up the code and made it more readable
  • added reference_dataset option, to set it explicitly rather than deciding based on meta keys
  • aiming to support models, obs and different indices with one diagnostic

utils.py

  • aiming for a module of reusable, documented, public functions
  • merged general utility functions from collect_droughts_func.py and some required by diffmap.py
  • paper specific plots/provenance functions are moved to collect_drought.py

TODOs:

@lukruh lukruh requested a review from katjaweigel February 12, 2025 15:22

Meteorological droughts are often described using the standardized precipitation index (SPI; McKee et al, 1993), which in a standardized way describes local precipitation anomalies. It is calculated on monthly mean precipitation, and is therefore not accounting for the intensity of precipitation and the runoff process. Because SPI does not account for evaporation from the ground, it lacks one component of the water fluxes at the surface and is therefore not compatible with the concept of hydrological drought.

A hydrological drought occurs when low water supply becomes evident, especially in streams, reservoirs, and groundwater levels, usually after extended periods of meteorological drought. GCMs normally do not simulate hydrological processes in sufficient detail to give deeper insights into hydrological drought processes. Neither do they properly describe agricultural droughts, when crops become affected by the hydrological drought. However, hydrological drought can be estimated by accounting for evapotranspiration, and thereby estimate the surface retention of water. The standardized precipitation-evapotranspiration index (SPEI; Vicente-Serrano et al., 2010) has been developed to also account for temperature effects on the surface water fluxes. Evapotranspiration is not normally calculated in GCMs, so SPEI often takes other inputs to estimate the evapotranspiration. Here, the Thornthwaite (Thornthwaite, 1948) method based on temperature is applied.
Copy link
Contributor

Choose a reason for hiding this comment

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

Update last sentence to all three methods.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The recipe_spei.R only uses one method, but I agree that it can be missleading to mention only one method in a otherwise very general introduction. I also think there are other more important reasons for the SPEI to consider PET, than missing calculations in GCMs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update and organize drought related recipes
2 participants