XMHW: Xarray based code to identify Marine HeatWave events and their characteristics
Description
XMHW identifies marine heatwaves from a timeseries of sea surface temperature data and calculates statistics associated to the detected heatwaves. This python module is based on the marineHeatWaves code by Eric Olivier.
Main difference with the original code are:
- We have two separate functions: one to calculate the climatologies and one to detect the heatwaves.
- By using xarray sst on a multidimensional grid can be passed as argument
- We added event severity to the MHW characteristics that are calculated
- Intermediate results of the detect function can be also returned
- Results are returned as xarray datasets, with the original spatial dimensions but 'event' instead of 'time' . Each event representing the starting day of an event.
- It is possible to calculate climatologies and detect events at different time frequencies, not only for daily data
Currently available functions:
- threshold() - to calculate the percentile and mean climatologies
- detect() - to detect the MHW events and their main characteristics
- block_average() - to calculate statistics on blocks of events, still missing "total mhw days per year"
In particular in this version:
Added a tstep (timestep) option to use the original timestep of the timeseries passed as input as step, rather than assuming data is daily. This allows to calculate climatologies and detect mhw events at different frequency.
Added conda support
Added read-the-docs documentation
This code uses python3 and the following modules: xarray, numpy, pandas, dask.
To install clone the repository from GitHub, and from the main directory
conda install -c coecms -c conda-forge xmhw
This is a work in progress so any feedback/collaboration is appreciated, please create an issue on GitHub.
Additional details
- Variables realm
- Ocean
- Files format
- python