- Python 99%
- Shell 1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github/workflows | ||
| doc | ||
| scripts | ||
| src | ||
| .gitignore | ||
| config.toml | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
High-resolution climate indicators for gridded climate data in Austria
This repository supplements the manuscript by
Sebastian Lehner
and
Matthias Schlögl
:
Climate indicators for Austria since 1961 at 1 km resolution.
Note
In a nutshell:
- A comprehensive toolkit to compute, aggregate, and visualize climate indicators for climate impact applications.
- Built on
xclimandxarrayfor index computation, with task automation viapytask.- Works out of the box with defaults for gridded climate data sets from Austria (SPARTACUS, WINFORE and SNOWGRID-CL), but can be configured for any dataset readable by
xarray.
Input data sets
Default configs for the following meteorological variables and their corresponding data source are available:
- Temperature: https://doi.org/10.60669/m6w8-s545
- Precipitation: https://doi.org/10.60669/m6w8-s545
- Evapotranspiration: https://doi.org/10.60669/f6ed-2p24
- Sunshine duration: https://doi.org/10.60669/m6w8-s545
- Snow and runoff: https://doi.org/10.60669/fsxx-6977
Different datasets are untested and may require adaptations due to a different input data structure (e.g., variable naming, calendar, units, chunking).
Quick start
Important
This project leverages uv for package and project management.
- Clone the repository
- Install dependencies using uv (creates a local
.venv):uv sync - Adapt the configuration in
config.toml. - Run the workflow:
or run individual steps manually.uv run pytask
Output validation
Tip
Run the validation task with
uv run src/check_files.py
This performs the following checks:
- Compare the actual output file counts in the output path versus the expected number depending on the years specified in the
config.toml. - Test whether the minimum output file size exceeds a threshold of 100 KB.
- Check for files that only contain NaN values.
- Note: This does not validate data values in any other ways except for the blank NaN check.
Aggregation and evaluation
Tip
Run the aggregation and evaluation task:
uv run src/climind_eval.py
This computes:
- Spatial averages;
- Climatological means for 1961–1990 and 1991–2020;
- Two-tailed Mann–Whitney U-tests for significant changes between the two climatological fields.
Outputs are stored in the directory specified in config.toml.
Automation
Important
This project leverages pytask for workflow management.
pytaskis included in the environment and installed viauv.- Simply run
uv run pytaskto execute all automated tasks. - The
pytaskconfiguration can be adapted through thepyproject.tomlfile. - For parallel processing, either update the config file, or use
uv run pytask -n NUM_WORKERS. - By default,
pytaskcaptures allstdoutandstderr, which means that it will not properly be logged within the logfiles. To stream logs to console and log files (recommended), use the-soption, i.e.uv run pytask -s.
Configuration
Note
All configuration settings are controlled via
config.toml.
Typical settings:
- Input dataset location and variable names
- Years or time range
- Output directory
- Specification of indicators to compute
To compute only selected indicators, use the abbreviations (as listed in the index column in doc/indices.csv) in the [CLIMATE_INDICES] section of config.toml. Default is IND_LIST = "all", which computes all indicators listed in doc/indices.csv.
Climate indicators
- The list of all currently implemented indicators is available as doc/indices.csv
- The list comprises Climdex, BIOCLIM and additional indices from
xclim, as well as custom routines.
Visualisation
Visualizations use either the computed indicators or the aggregated/evaluated outputs. The following visualizations are implemented and can be explored in the showcase document:
- Time series of spatially averaged anomalies (annual/seasonal)
- Spatial maps of climatologies and their differences
- Stamp plots and anomaly stamp plots
- Grouped significant changes plots
- Grouped warming stripes
- Year-of-minimum/maximum per grid cell and histograms over time
Groupings for plots (4) and (5) are based on each indicator’s input parameters (details in the showcase).