Published December 3, 2019 | Version 1.0
Software Open

Repository of Analysis Code for the Manuscript entitled: 'Amplification of Australian Heatwaves via local land-atmosphere coupling' Hirsch et al. in Journal of Geophysical Research - Atmospheres

  • 1. UNSW, CLEx


This repository contains all the analysis source code for Hirsch et al., 2019 (2019JD030665) and can be used to reproduce the analysis of the manuscript. Note that all directory paths will need to be updated for successful implementation of the code.

Datasets to which the code applies:

  • CORDEX AustralAsia domain on a 0.44˚ x 0.44˚ rotated coordinate system. All data is available from ESGF

  • Australian Gridded Climate Data (AGCD) daily precipitation and temperature dataset [Jones et al. 2009 Australia. Aust. Meteor. Mag.] 

  • Global Land surface Evaporation: the Amsterdam Methodology (GLEAM) dataset [Miralles et al. 2011, doi:10.5194/hess-15-453-2011; Martens et al. 2017, doi:10.5194/gmd-10-1903-2017] 

  • ERA-Interim (ERAINT) dataset produced by the European Centre for Medium-Range Weather Forecasts (ECMWF) [Dee et al. 2011, doi:10.1002/qj.828] 

  • Modern-Era Retrospective Analysis for Research and Applications version 2 (MERRA2) [Reichle et al. 2017, doi:10.1175/JCLI-D-16-0720.1]

This repository provides all the tools to process each datasets, calculate diagnostics describing heatwave characteristics using the Excess Heat Factor (EHF), scripts to extract all surface energy balance fluxes corresponding to the identified heatwave events and the month preceding the event, and scripts to evaluate land-atmosphere coupling

Further information on the datasets and calculations are available from: Hirsch, A. L., J. P. Evans, G. Di Virgillio, S. Perkins-Kirkpatrick, D. Argüeso, A. J. Pitman, C. Carouge, J. Kala, J. Andrys, P. Petrelli, and B. Rockel (2019), Amplification of Australian heatwaves via local land-atmosphere coupling. Journal of Geophysical Research Atmospheres, accepted 1.12.2019. 

Scripts used to prepare the data

  • - interpolates the AGCD data to the CORDEX AUS-44i domain

  • - interpolates the ERA-Interim data to the CORDEX AUS-44i domain

  • - interpolates the GLEAM data to the CORDEX AUS-44i domain

  • - interpolates the MERRA2 data to the CORDEX AUS-44i domain

  • - interpolates a time-varying field from the native WRF grid mesh (rotated pole) to a regular lat-lon grid mesh.

  • - retrieves energy balance fluxes and splits according to heatwave season per year

  • - retrieves energy balance fluxes and splits according to heatwave season per year for all model datasets

  • - splits the EHF index and spell index into one file per heatwave season

  • - splits the EHF index and spell index into one file per heatwave season for all model datasets


Shell scripts

  • - Shell script that calculates Paul Dirmeyer's two-legged coupling metrics using cdo


Python scripts

  • - this script takes the code template HWproject_WRF.deck as input and set it up depending on the experiment, then runs the final code to calculate the Excess Heat Factor for each of the model datasets

  • HWproject_WRF.deck - template for a script that takes postprocessed WRF files (maximum and minimum temperature) and five netcdf files for each of the characteristics at yearly frequency, as well as the EHF index at daily frequency, plus other metrics for EHF analysis

  • - calculates EHF heatwave diagnostics from AWAP 

  • - calculates EHF heatwave diagnostics from ERAINT - calculates EHF heatwave diagnostics from MERRA2

  • - contains the function to calculate Excess Heat Factor indices from the average daily temperature using maximum and minimum daily temperatures of each dataset

  • - VariablesInfo class definition, each object describe a variable and its attributes

  • - class that contains most used atmospheric constant values 


Python notebooks

  • get_gridded_timeseries.ipynb - extract the time series for all data in the lead up and post HW initiation


Notebooks to plot results:

  1. plot_topo.ipynb - Contour map of the domain topography and subdomains using

  2. plot_EHF_OBS_vs_MOD_BIAS.ipynb - Contour maps of the model biases for the EHF threshold and diagnostics

  3. plot_EHF_Skill.ipynb - Plots a summary of the model skill for each of the EHF diagnostics and models

  4. plot_gridded_anomaly_timeseries.ipynb - Plot of the anomaly time series of different climate variables aggregated for different regions of interest. plot_gridded_anomaly_timeseries_abbrev.ipynb provides an abbreviated version of the same figure for the manuscript.

  5. plot_pr_negative_dXdt.ipynb - Plots the PDFs for the latent heat flux trend split according to antecedent soil moisture conditions

  6. plot_distributions_kde.ipynb - Plots the PDFs of the temperature data split according to antecedent soil moisture conditions for either the first heatwave day, the second, third or fourth heatwave days individually

  7. plot_two-legged_coupling.ipynb - Contour maps of the coupling diagnostics

  8. plot_two-legged_coupling_components.ipynb - Contour maps of the component terms for each of the coupling diagnostics

  9. plot_EHF_vs_two-legged_coupling.ipynb - Checks the relationship between each of the EHF diagnostics and the and coupling diagnostics

  10. plot_EHF_ranked_by_two-legged_coupling.ipynb - Checks the KDE distributions between strong land-driven coupling and atmospheric-driven coupling (using the IA coupling diagnostic) for all models and grid cells pooled together, regional sensitivity and model sensitivity

  11. plot_LR_EHF_vs_two-legged_coupling.ipynb - Compares the tail of the KDE distributions using the same methodology as plot_EHF_ranked_by_two-legged_coupling.ipynb for each EHF diagnostic and model difference using the likelihood ratio

  12. plot_distributions_kde_dQEdt_split.ipynb - Similar to plot_distributions_kde.ipynb but splits the temperature data according to the sign of the latent heat flux trend


Table files

Climate.indices.csv - List of climate indices and their definitions 


Files (1.0 MB)

Name Size Download all
1.0 MB Preview Download

Additional details

Related works