gcpy.benchmark.modules.benchmark_mass_cons_table
Creates mass conservation tables from passive tracer concentrations stored in GEOS-Chem Classic and/or GCHP restart files.
Functions
|
Computes the difference in two dictionaries (Dev - Ref) for a given search key. |
|
Computes difference statistics between the Ref and Dev versions. |
|
Returns a dictionary with statistics for total masses. |
|
Computes the total mass (in Tg) for the passive tracer. |
|
Returns the area variable from a dataset (if present), or reads it from the supplied file path. |
|
Returns the delta-pressure variable from GEOS-Chem Classic or GCHP data files. |
|
Returns a dictionary with metadata for the passive tracer. |
Returns the variable name under which the passive tracer is stored GEOS-Chem Classic or GCHP restart files. |
|
Creates a text file containing global mass of passive species contained in GEOS-Chem Classic and/or GCHP restart files. |
- gcpy.benchmark.modules.benchmark_mass_cons_table.get_area(area_path, dset)[source]
Returns the area variable from a dataset (if present), or reads it from the supplied file path.
- gcpy.benchmark.modules.benchmark_mass_cons_table.get_delta_pressure(dset)[source]
Returns the delta-pressure variable from GEOS-Chem Classic or GCHP data files.
- Parameters:
dset (
xr.Datasetorxr.DataArray) – Input data.
- gcpy.benchmark.modules.benchmark_mass_cons_table.get_passive_tracer_metadata(spcdb_files)[source]
Returns a dictionary with metadata for the passive tracer.
- gcpy.benchmark.modules.benchmark_mass_cons_table.get_passive_tracer_varname(dset)[source]
Returns the variable name under which the passive tracer is stored GEOS-Chem Classic or GCHP restart files.
- Parameters:
dset (
xr.Dataset) – The input data.- Returns:
varname – Variable name for passive tracer.
- Return type:
- gcpy.benchmark.modules.benchmark_mass_cons_table.compute_total_mass(dset, area, delta_p, metadata)[source]
Computes the total mass (in Tg) for the passive tracer.
- gcpy.benchmark.modules.benchmark_mass_cons_table.compute_statistics(masses)[source]
Returns a dictionary with statistics for total masses.
- Parameters:
masses (
np.ndarray) – Total masses in Tg.- Returns:
statistics – Dictionary with statistics.
- Return type:
- gcpy.benchmark.modules.benchmark_mass_cons_table.compute_diff(key, ref, dev)[source]
Computes the difference in two dictionaries (Dev - Ref) for a given search key.
- gcpy.benchmark.modules.benchmark_mass_cons_table.compute_diff_statistics(ref, dev)[source]
Computes difference statistics between the Ref and Dev versions.
- gcpy.benchmark.modules.benchmark_mass_cons_table.make_benchmark_mass_conservation_table(ref_files, ref_label, dev_files, dev_label, spcdb_files, dst='./benchmark', overwrite=False, ref_areapath=None, dev_areapath=None)[source]
Creates a text file containing global mass of passive species contained in GEOS-Chem Classic and/or GCHP restart files.
- Parameters:
ref_label (
str) – Ref version label.dev_label (
str) – Dev version label.spcdb_files (
list) – Paths to Ref & Dev species_database.yml files.dst (
str, optional) – Destination folder for file output.overwrite (
bool, optional) – Overwrite pre-existing files?ref_areapath (
listorstr, optional) – Path to file w/ Ref area data.dev_areapath (
listorstr, optional) – Path to file w/ Dev area data.