Skip to content

arifein/pythonHgBenchmark

 
 

Repository files navigation

Mercury Benchmarking for Python

-Brittany Walker started translating GEOS-Chem IDL benchmark code to Python (Feb 2019)

-Ari Feinberg continued adding new benchmark functionalities (June 2021)

This directory contains a set of python scripts used to benchmark new and updated versions of the GEOS-Chem mercury model. For now I use main.py to call functions and plots. However, eventually I will add a Jupyter Notebook as another option for running the benchmark.

Also included are various data to which the model versions are compared found in the folder data.

The Benchmarks aim is to compare and analyse data from a new model run to a reference model run. For this you will need the output netcdf files generated by the model run. I use postprocessing scripts located in cdo_shell_scripts/ to edit the outputted GEOS-Chem files into convenient formats for running the benchmark. You will need to specify the location of the postprocessed files.

Summary of scripts and their function:

main.py : Main file for calling functions - this is where you adjust the simulation names and run benchmark scripts

diff_plots_Hg.py : General plotting script to plot reference, new, and difference (absolute and relative) maps for an Hg variable

dry_deposition.py : Plot Hg dry deposition for both simulations

helper_functions.py : General helper functions for loading and averaging model data

Hg2Plot.py : Plot the mean surface Hg2+HgP for the reference and new models.

Hg_budget.py : Calculate and compare budget terms for simulations

Hg_chem_fluxes.py : Plot Hg chemistry fluxes for both simulations

Hg_emis_fluxes.py : Plot Hg emission fluxes for both simulations

Hg_ocean_fluxes.py : Plot Hg ocean fluxes for both simulations

Latitudinal_Graphs.py : Plot observations against the model as latitudinal gradient and seasonal cycles at different latitudes

PlotSeasonSites.py : Plot the reference and new models against the seasonal cycle of observations made at available sites

SiteLevels.py : Dictionary of all of the sites with different levels other than 0 at the surface.

TGMAndObs.py : Plot the mean surface TGM for mercury against different sites for the reference and new models.

wet_deposition.py : Plot Hg wet deposition for both simulations and available observations

Postprocessing scripts include:

cdo_shell_scripts/postproc_runs_Hg_v12.sh - postprocessing script for GEOS-Chem v12 until v13.4 (Horowitz et al. 2017 chemistry)

cdo_shell_scripts/postproc_runs_Hg_Shah.sh - postprocessing script for Shah et al. (2021) Hg chemistry - additional mercury species

Packages you will need to run this are xarray, matplotlib, cartopy, numpy, calendar, pandas, and scipy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 76.2%
  • Shell 23.8%