Skip to content

Commit

Permalink
Update budget_aer.py to create aerosol burdens and budgets
Browse files Browse the repository at this point in the history
We have updated the budget_aer.py module so that it now correctly
computes annual average aerosol burdens and global mean AOD's.

NOTE: We still have to add the computation of global mean AOD for
dust.  This is because we have to sum the AOD diagnostics to obtain
an overall dust AOD.  That will be done in subsequent commits.

Signed-off-by: Bob Yantosca <[email protected]>
  • Loading branch information
yantosca committed Feb 26, 2020
1 parent 3122412 commit 39303d1
Show file tree
Hide file tree
Showing 2 changed files with 281 additions and 122 deletions.
61 changes: 42 additions & 19 deletions benchmark/run_1yr_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
from gcpy import benchmark as bmk
from gcpy.constants import skip_these_vars
from gcpy.core import get_filepaths
import gcpy.budget_aer as aerbdg
import gcpy.budget_tt as ttbdg
import pandas as pd
import numpy as np
Expand Down Expand Up @@ -240,7 +241,9 @@
# FullChemBenchmark includes lumped species and
# and also separates plots by category
# --------------------------------------------------------------
print('\n%%% Creating GCC vs. GCC concentration plots %%%')
title = '\n%%% Creating GCC vs. GCC {} concentration plots %%%'.format(
bmk_type)
print(title)

# File lists for emissions data (seasonal)
collection = 'SpeciesConc'
Expand Down Expand Up @@ -271,12 +274,14 @@
overwrite=True,
sigdiff_files=sigdiff_files)

if plot_emis:
if plot_emis and "FullChem" in bmk_type:
# --------------------------------------------------------------
# GCC vs GCC emissions plots
# (FullChemBenchmark only)
# --------------------------------------------------------------
print('\n%%% Creating GCC vs. GCC emissions plots %%%')
title = '\n%%% Creating GCC vs. GCC {} emissions plots %%%'.format(
bmk_type)
print(title)

# File lists for emissions data (seasonal)
gcc_vs_gcc_refhco = get_filepaths(gcc_vs_gcc_refdir, 'Emissions',
Expand All @@ -299,12 +304,13 @@
overwrite=True,
sigdiff_files=sigdiff_files)

if emis_table:
if emis_table and "FullChem" in bmk_type:
# --------------------------------------------------------------
# GCC vs GCC tables of emission and inventory totals
# (FullChemBenchmark only)
# --------------------------------------------------------------
print('\n%%% Creating GCC vs. GCC emissions and inventory tables %%%')
title = '\n%%% Creating GCC vs. GCC {} emissions and inventory totals %%%'.format(bmk_type)
print(title)

# File lists for J-values data (monthly)
gcc_vs_gcc_refhco = get_filepaths(gcc_vs_gcc_refdir, 'Emissions',
Expand All @@ -321,12 +327,14 @@
interval=sec_per_month,
overwrite=True)

if plot_jvalues:
if plot_jvalues and "FullChem" in bmk_type:
# --------------------------------------------------------------
# GCC vs GCC J-value plots
# (FullChemBenchmark only)
# --------------------------------------------------------------
print('\n%%% Creating GCC vs. GCC J-value plots %%%')
title = '\n%%% Creating GCC vs. GCC {} J-value plots %%%'.format(
bmk_type)
print(title)

# Paths to J-value data (seasonal)
gcc_vs_gcc_refjv = get_filepaths(gcc_vs_gcc_refdir, 'JValues',
Expand All @@ -347,12 +355,14 @@
overwrite=True,
sigdiff_files=sigdiff_files)

if plot_aod:
if plot_aod and "FullChem" in bmk_type:
# --------------------------------------------------------------
# GCC vs. GCC column AOD plots
# (FullChemBenchmark only)
# --------------------------------------------------------------
print('\n%%% Creating GCC vs. GCC column AOD plots %%%')
title = '\n%%% Creating GCC vs. GCC {} column AOD plots %%%'.format(
bmk_type)
print(title)

## Paths to aerosol optical depth data
gcc_vs_gcc_refaod = get_filepaths(gcc_vs_gcc_refdir, 'Aerosols',
Expand All @@ -373,12 +383,16 @@
overwrite=True,
sigdiff_files=sigdiff_files)

if mass_table:

if mass_table and "FullChem" in bmk_type:
# --------------------------------------------------------------
# GCC vs. GCC global mass tables
# (FullChemBenchmark only)
# --------------------------------------------------------------
print('\n%%% Creating GCC vs. GCC global mass tables %%%')
title = '\n%%% Creating GCC vs. GCC {} global mass tables %%%'.format(
bmk_type)
print(title)

bmk.make_benchmark_mass_tables(gcc_vs_gcc_refrst,
gcc_vs_gcc_refstr,
gcc_vs_gcc_devrst,
Expand All @@ -391,7 +405,8 @@
# GCC vs GCC budgets tables
# (FullChemBenchmark)
# --------------------------------------------------------------
print('\n%%% Creating GCC vs. GCC FullChemBenchmark budgets %%%')
title = '\n%%% Creating GCC vs. GCC {} budgets %%%'.format(bmk_type)
print(title)

## Paths to budget data
gcc_vs_gcc_devbgt = get_filepaths(gcc_vs_gcc_devdir, 'Budget',
Expand All @@ -407,25 +422,33 @@
interval=sec_per_month[s*3],
subdst=mon_yr_str)


# Compute annual mean AOD budgets and aerosol burdens
aerbdg.aerosol_budgets_and_burdens(gcc_dev_version,
gcc_vs_gcc_devdir,
gcc_vs_gcc_plotsdir,
bmk_year,
overwrite=True)

if budget_table and "TransportTracers" in bmk_type:
# --------------------------------------------------------------
# GCC vs GCC budgets tables
# (TransportTracers)
# --------------------------------------------------------------
print('\n%%% Creating GCC vs. GCC TransportTracersBenchmark budgets %%%')
ttbdg.transport_tracers_budgets(maindir,
gcc_dev_version,
title = '\n%%% Creating GCC vs. GCC {} budgets %%%'.format(bmk_type)
print(title)
ttbdg.transport_tracers_budgets(gcc_dev_version,
gcc_vs_gcc_devdir,
gcc_vs_gcc_plotsdir,
bmk_year)

bmk_year,
overwrite=True)

if OH_metrics and "FullChem" in bmk_type:
# --------------------------------------------------------------
# GCC vs GCC Global mean OH, MCF Lifetime, CH4 Lifetime
# (FullChemBenchmark only)
# --------------------------------------------------------------
print('\n%%% Creating GCC vs. GCC OH metrics %%%')
title = '\n%%% Creating GCC vs. GCC {} OH metrics %%%'.format(bmk_type)
print(title)
gcc_vs_gcc_reflist = [gcc_vs_gcc_refcac, gcc_vs_gcc_refmet]
gcc_vs_gcc_devlist = [gcc_vs_gcc_devcac, gcc_vs_gcc_devmet]
bmk.make_benchmark_oh_metrics(gcc_vs_gcc_reflist,
Expand Down
Loading

0 comments on commit 39303d1

Please sign in to comment.