Skip to content

qlawton/MSE-for-CCEWs

Repository files navigation

MSE_budget_gh

This repository contains Python scripts and Jupyter notebooks for computing and analyzing the Moist Static Energy (MSE) budget from ERA5 reanalysis data. Code is also provided to compute averages around tracked objects, in this case that of CCKWs. The workflow leverages xarray and dask.

Contents

  • compute_MSE_1hrly_dask.py: Main script for calculating hourly MSE and vertically integrated MSE from ERA5 data. Uses dask for parallel processing and outputs results as NetCDF files.
  • MSE_compute_budget_1hrly_dask.py: Script for computing the full MSE budget, including radiative terms, at hourly resolution.
  • loop_compute_MSE_budget_hrly_dask.sh / loop_compute_MSE_hrly_dask.sh: Shell scripts for batch processing multiple dates or months.
  • wave_following_averaging.ipynb: Jupyter notebook for performing wave-following averaging of MSE and related variables.

Usage

  1. Prepare ERA5 Data: Place the required hourly ERA5 NetCDF files in the specified directory structure.
  2. Run MSE Calculation:
    python compute_MSE_1hrly_dask.py <year> <month>
    This will compute MSE and its vertical integral for the specified year and month.
  3. Batch Processing:
    Use the provided shell scripts to loop over multiple months or dates.
  4. Analysis & Visualization:
    Use the Jupyter notebooks to analyze and plot the computed MSE fields and budget terms.

Requirements

  • Python 3.x
  • xarray
  • numpy
  • dask
  • netCDF4/h5netcdf
  • pandas
  • Jupyter (for notebooks)

Notes

  • Paths are currently hard-coded for NCAR's Derecho system, you will need to modify as needed for

About

Compute moist static energy (MSE) and its pseudo-conserved budget from ERA5 hourly data, and take averages around tracked convectively-coupled Kelvin waves.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors