Skip to content

Commit

Permalink
Add mass accumulation table (full column only) as a 1-month benchmark…
Browse files Browse the repository at this point in the history
… option

The mass accumulation table compares the difference in mass change for each
species across two different runs, ref and dev. The mass change per species
is computed as the difference between start and end based on values
in the restart files (end restart mass minus start restart mass).
Concentrations are converted to mass in the same way as done for the benchmark
mass tables.

This table can be used with the operations budget table to look at changes
in mass across a run, and to validate the operations budget diagnostics. Its
values correspond to the ACCUMULATION entries in the operations budget table
and is an alternative (and cheaper) way to get those values.

The table is currently only produced for full column and is limited to the
1-month benchmark.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>

initial commit

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
  • Loading branch information
lizziel committed May 12, 2023
1 parent 748f48f commit 9472e0a
Show file tree
Hide file tree
Showing 4 changed files with 717 additions and 1 deletion.
1 change: 1 addition & 0 deletions benchmark/1mo_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ options:
plot_jvalues: True
plot_aod: True
mass_table: True
mass_accum_table: False
ops_budget_table: False
OH_metrics: True
ste_table: True # GCC only
Expand Down
9 changes: 9 additions & 0 deletions benchmark/modules/run_1yr_tt_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ def run_benchmark(config, bmk_year_ref, bmk_year_dev):
print(" - Radionuclides budget table")
if config["options"]["outputs"]["operations_budget"]:
print(" - Operations budget table")
if config["options"]["outputs"]["mass_accumulation"]:
print(" - Mass accumulation table")
if config["options"]["outputs"]["ste_table"]:
print(" - Table of strat-trop exchange")
if config["options"]["outputs"]["cons_table"]:
Expand Down Expand Up @@ -1002,6 +1004,13 @@ def run_benchmark(config, bmk_year_ref, bmk_year_dev):
dst=gchp_vs_gchp_tablesdir,
)

# ==================================================================
# GCHP vs GCHP mass accumulation table
# ==================================================================
if config["options"]["outputs"]["mass_accumulation"]:
print("\n%%% Creating GCHP vs. GCHP mass accumulation table %%%")


# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Create mass conservations tables for GCC and GCHP
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down
27 changes: 27 additions & 0 deletions benchmark/run_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@ def run_benchmark_default(config):
print(" - Table of emissions totals by spc and inventory")
if config["options"]["outputs"]["mass_table"]:
print(" - Table of species mass")
if config["options"]["outputs"]["mass_accum_table"]:
print(" - Table of species mass accumulation")
if config["options"]["outputs"]["OH_metrics"]:
print(" - Table of OH metrics")
if config["options"]["outputs"]["ste_table"]:
Expand Down Expand Up @@ -605,6 +607,31 @@ def run_benchmark_default(config):
spcdb_dir=spcdb_dir,
)

# ==================================================================
# GCC vs GCC global mass accumulation tables
# ==================================================================
if config["options"]["outputs"]["mass_accum_table"]:
print("\n%%% Creating GCC vs. GCC mass accumulation tables %%%")

# Filepaths for start and end restart files
refs = get_filepath(gcc_vs_gcc_refrst, "Restart", gcc_ref_date)
devs = get_filepath(gcc_vs_gcc_devrst, "Restart", gcc_dev_date)
refe = get_filepath(gcc_vs_gcc_refrst, "Restart", gcc_end_ref_date)
deve = get_filepath(gcc_vs_gcc_devrst, "Restart", gcc_end_dev_date)

# Create tables
bmk.make_benchmark_mass_accumulation_tables(
refs,
refe,
config["data"]["ref"]["gcc"]["version"],
devs,
deve,
config["data"]["dev"]["gcc"]["version"],
overwrite=True,
dst=gcc_vs_gcc_tablesdir,
spcdb_dir=spcdb_dir,
)

# ==================================================================
# GCC vs GCC operation budgets tables
# ==================================================================
Expand Down
Loading

0 comments on commit 9472e0a

Please sign in to comment.