gcpy.examples.diagnostics.check_gchp_emission_diags

Compares GCHP emission diagnostic entries in HISTORY.rc and in HEMCO_Diagn.rc configuration files for consistency.

Examples

$ conda activate gcpy_env
(gcpy_env) $ python -m gcpy.examples.diagnostics.check_gchp_emission_diags \
             /path/to/GCHP/run/directory                                   \
             SIMULATION-NAME

Functions

compare_containers(history_entries, ...)

Compares the list of GCHP emission entries in HISTORY.rc and HEMCO_Diagn.rc.

main(path_to_rundir, simulation)

Main program.

print_results(result)

Prints the results of the comparison between HISTORY.rc and HEMCO_Diagn.rc.

read_hemco_diagn(filename)

Reads the HEMCO_Diagn.rc file and returns a list of diagnostic container names containing "Emis" or "Inv".

read_history(filename)

Reads the HISTORY_Diagn.rc file and returns a list of diagnostic container names containing "Emis" or "Inv".

gcpy.examples.diagnostics.check_gchp_emission_diags.read_history(filename)[source]

Reads the HISTORY_Diagn.rc file and returns a list of diagnostic container names containing “Emis” or “Inv”.

Parameters:

filename (str) – Path to the HISTORY.rc file.

Returns:

result – List of diagnostic entries.

Return type:

list

gcpy.examples.diagnostics.check_gchp_emission_diags.read_hemco_diagn(filename)[source]

Reads the HEMCO_Diagn.rc file and returns a list of diagnostic container names containing “Emis” or “Inv”.

Parameters:

filename (str) – Path to the HEMCO_Diagn.rc file.

Returns:

result – List of diagnostic entries.

Return type:

list

gcpy.examples.diagnostics.check_gchp_emission_diags.compare_containers(history_entries, hco_diagn_entries)[source]

Compares the list of GCHP emission entries in HISTORY.rc and HEMCO_Diagn.rc. Returns the list of entries common to both, and in one file but not the other.

Parameters:
  • history_entries (list) – Emission entries in HISTORY.rc.

  • hco_diagn_entries (list) – Emission entries in HEMCO_Diagn.rc.

Returns:

result – Results of the comparison.

Return type:

dict

gcpy.examples.diagnostics.check_gchp_emission_diags.print_results(result)[source]

Prints the results of the comparison between HISTORY.rc and HEMCO_Diagn.rc.

Parameters:

result (dict) – Dictionary with results of the comparison.

gcpy.examples.diagnostics.check_gchp_emission_diags.main(path_to_rundir, simulation)[source]

Main program. Calls routines to read GCHP HISTORY.rc and HEMCO_Diagn.rc files, to compare emission diagnostics, and to print the results.

Parameters:
  • path_to_rundir (str) – Path to the run/GCHP folder.

  • simulation (str) – Simulation name (e.g. fullchem).