π Cutting-edge analysis of extreme heatwaves across Asia-Pacific using high-resolution ERA5 data, advanced clustering, and interactive visualizations.
π For a full technical deep-dive, see Final_Report_Semester_Project.pdf
Spatial Bounds:
- East: 135Β°E
- West: 35Β°E
- North: 45Β°N
- South: 15Β°S
This project focuses on the Asia-Pacific region, leveraging daily ERA5 reanalysis data at 0.25Β° x 0.25Β° resolution for maximum spatial detail.
- High-Resolution ERA5 Data: Daily max temperature, 0.25Β° x 0.25Β° grid (Asia-Pacific, E=135, W=35, N=45, S=-15)
- Automated Data Download: ERA5 data fetched via CDS API and custom Python scripts
- SLURM-Enabled Processing: Large-scale data handled efficiently with SLURM batch scripts (
data/download_era5_serial.slurm) - Comprehensive Clustering: Discover 4 major heatwave families and subfamilies using K-Means & UPGMA
- Seasonal Insights: Analyze heatwaves by meteorological seasons (DJF, MAM, JJA, SON)
- Advanced Analysis: Explore event durations, magnitudes, spatial extents, and more
- Interactive Visualizations: Publication-ready plots for every step
- Full Technical Report: See
Final_Report_Semester_Project.pdffor methodology, results, and discussion
Spito-Temporal_Heatwave_Analysis-main/
βββ code/
β βββ Heatwave_Detection.py # Detects heatwave events from ERA5 data
β βββ clustering_step1.py # K-Means clustering (families)
β βββ clustering_step2.py # UPGMA clustering (subfamilies)
β βββ cluster_analysis.py # Advanced cluster analysis
β βββ plotting_results.py # Visualization utilities
β βββ plotting.py # Core plotting functions
β βββ con_sep.py, cppv.py, extr.py # Utilities and connectors
β βββ analysis_heatwaves.ipynb # Jupyter notebook for interactive analysis
β βββ ...
βββ data/
β βββ api.py # Automated ERA5 data download (CDS API)
β βββ download_era5_serial.slurm # SLURM batch script for ERA5 download
β βββ era5_t2m_dailymax_*.nc # ERA5 daily max temperature files
βββ results/
β βββ clustering_step1/ # Family clustering results & plots
β βββ clustering_step2/ # Subfamily clustering results & plots
β βββ Advanced_Analysis/ # Comprehensive analysis plots
β βββ ...
βββ environment.yml # Conda environment file
βββ readme.md # Project documentation
βββ Final_Report_Semester_Project.pdf # Full technical report
βββ Data_manipul.ipynb # Data manipulation notebook
- Download ERA5 daily maximum temperature data using
data/api.py(CDS API). - Concatenate and preprocess NetCDF files with
xarray(Data_manipul.ipynb). - Switch to 0.25Β° x 0.25Β° grid for higher resolution.
- Run
Heatwave_Detection.pyto identify extreme events. - Output: CSV files with detected heatwave nodes.
| Plot Name | Description | Image |
|---|---|---|
| Duration Categories | Heatwave duration categories | ![]() |
| Magnitude Categories | Heatwave magnitude categories | ![]() |
- Assigns each event to a meteorological season (DJF, MAM, JJA, SON).
- Generates seasonal cluster plots and statistics.
cluster_analysis.py: In-depth cluster statistics.plotting_results.py: Generates all visualizations.analysis_heatwaves.ipynb: Interactive exploration.
conda env create -f environment.yml
conda activate fr- Configure CDS API in
data/api.py. - Run the script to download all years.
- Use Data_manipul.ipynb to concatenate and inspect NetCDF files.
python code/Heatwave_Detection.pypython code/clustering_step1.py -d data/heatwave_nodes.csv -k 4
python code/clustering_step2.py -d data/heatwave_nodes.csv -u 5 -i 1python code/cluster_analysis.py -d data/heatwave_nodes.csv -k 4
python code/plotting_results.py -d data/heatwave_nodes.csv -cpv data/supernodes.csv -n 5 -b magnitude- ERA5 NetCDF files: Daily max temperature, 0.1Β° x 0.1Β° grid.
- Heatwave Nodes CSV: Columns:
cp,time,latitude,longitude,magnitude, etc. - Supernodes Table: Columns:
cp,time_amin,time_amax,HWMId_magnitude, etc.
- Detected Events: CSVs of heatwave nodes.
- Clustering Results: Cluster labels, dendrograms, seasonal distributions.
- Plots: PNGs of all visualizations (see
/results/).
deepgraph==0.2.4matplotlib==3.5.3numpy==1.22.0pandas==1.3.5basemap==1.3.2scikit-learn==1.0.2xarray,cdsapi,glob, etc.
- Missing Dependencies:
conda activate fr - Basemap Issues:
conda install -c conda-forge basemap - File Not Found:
Ensure input files are in/data/and paths are correct. - Visualization Errors:
Check output directory exists:mkdir -p /path/to/output/directory
For questions, feedback, or collaboration:
- Ayush Raj
π§ Email: artamta47@gmail.com
Ready to explore? Dive into the code, check out the plots, and see the full technical report for all the details!




























































