gcpy.benchmark.modules.budget_tt

Computes the budget of Pb, Be7, and Be10 from 1-year TransportTracersBenchmark simulations.

Functions

annual_average(globvars, ds, collection, ...)

Computes the annual average of budgets or fluxes.

annual_average_sources(globvars)

Computes the annual average of radionuclide sources.

mass_from_rst(globvars, ds, tropmask)

Computes global species mass from a restart file.

print_budgets(globvars, data, key)

Prints the trop+strat budget file.

total(globvars, dict_list)

Function to take the difference of two dict objects.

transport_tracers_budgets(devstr, devdir, ...)

Main program to compute TransportTracers budgets from GEOS-Chem Classic or GCHP benchmark simulations.

trop_residence_time(globvars)

Computes the tropospheric residence time of radionuclides.

gcpy.benchmark.modules.budget_tt.total(globvars, dict_list)[source]

Function to take the difference of two dict objects. Assumes that all objects have the same keys.

Parameters:
  • globvars (_GlobVars) – Global variables needed for budget computations.

  • dict_list (list of dict) – Dictionaries to be summed.

Returns:

result – Key-by-key sum of all dicts in dict_list.

Return type:

dict

gcpy.benchmark.modules.budget_tt.mass_from_rst(globvars, ds, tropmask)[source]

Computes global species mass from a restart file.

Parameters:
  • globvars (_GlobVars) – Global variables needed for budget computations.

  • ds (xr.Dataset) – Data containing species mass to be summed.

  • tropmask (numpy.ndarray) – Mask to denote tropospheric grid boxes.

Returns:

result – Species mass in strat, trop, and strat+trop regimes.

Return type:

dict

gcpy.benchmark.modules.budget_tt.annual_average(globvars, ds, collection, conv_factor)[source]

Computes the annual average of budgets or fluxes.

Parameters:
  • globvars (_GlobVars) – Global variables needed for budget computations.

  • ds (xr.Dataset) – Data to be averaged.

  • collection (str) – Name of the diagnostic collection.

  • conv_factor (dict) – Conversion factor to be applied.

Returns:

result – Annual-average budgets or fluxes in strat, trop, and strat+trop regimes.

Return type:

dict

gcpy.benchmark.modules.budget_tt.annual_average_sources(globvars)[source]

Computes the annual average of radionuclide sources.

Parameters:

globvars (_GlobVars) – Global variables needed for budget computations.

Returns:

result – Source totals in strat, trop, and strat+trop regimes.

Return type:

dict

gcpy.benchmark.modules.budget_tt.trop_residence_time(globvars)[source]

Computes the tropospheric residence time of radionuclides.

Parameters:

globvars (_GlobVars) – Global variables needed for budget computations.

Returns:

result – Tropospheric residence time for all species.

Return type:

dict

gcpy.benchmark.modules.budget_tt.print_budgets(globvars, data, key)[source]

Prints the trop+strat budget file.

Parameters:
  • globvars (_GlobVars) – Global variables needed for budget computations.

  • data (dict) – Nested dictionary containing budget info.

  • key (list of str) – One of “_f” (full-atmosphere), “_t” (trop-only), or “_s” (strat-only).

gcpy.benchmark.modules.budget_tt.transport_tracers_budgets(devstr, devdir, devrstdir, year, spcdb_file, dst='./1yr_benchmark', is_gchp=False, gchp_res='c00', gchp_is_pre_14_0=False, overwrite=True)[source]

Main program to compute TransportTracers budgets from GEOS-Chem Classic or GCHP benchmark simulations.

Parameters:
  • devstr (str) – Label for the Dev version.

  • devdir (str) – Path to the Dev data directory.

  • devrstdir (str) – Path to the Dev restart file directory.

  • year (int) – Year of the benchmark simulation.

  • spcdb_file (str) – Path to the Dev species_database.yml file.

  • dst (str, optional) – Directory where tables will be written.

  • is_gchp (bool, optional) – Is Dev from a GCHP benchmark simulation?

  • gchp_res (str, optional) – GCHP resolution string (e.g. “c24”).

  • gchp_is_pre_14_0 (bool, optional) – Is Dev from a GCHP version prior to 14.0.0?

  • overwrite (bool, optional) – Should existing tables be overwritten?