Attention! Still under construction!!
pymhw is a Python package to calculate marine heatwaves (MHW) based on sea surface temperature (SST) data.
Please, cite this DOI and check new releases.
You can install the package using pip:
pip install git+https://github.com/andrebelem/pymhw.git
import pandas as pd
import pymhw
# Assuming df and df_clima are your already loaded DataFrames
df2 = pymhw.detect_MHW(df, df_clima)
mhw_periods = pymhw.calculate_mhw_periods(df2)
print(mhw_periods) #<-- results are condensated in a dataframeThere is an example (Test_Marine_Heat_Waves_detection.ipynb) with an overview of how to use the pymhw package for analyzing marine heatwaves.
Key Steps:
- Detect MHWs: Use the detect_MHW function to preprocess and detect potential MHW events in your SST data.
- Calculate MHW Periods: Use the calculate_mhw_periods function to identify and categorize MHW periods based on their intensity.
- Visualizing MHWs: Some example of graphics you can use (on the
.ipynbfile).
Future code:
- Include subsurface analysis and more statistics
- Create a MHW index or impact index
- Perform wavelet analysis on MHW index
Attention! This repository is still under construction!!