gcpy.examples.hemco.make_hemco_sa_spec

Creates the HEMCO_sa_Spec.rc file (needed for the HEMCO standalone model) from a “geoschem_species_metadata.yml” file taken from a GEOS-Chem simulation.

Examples

$ conda activate gcpy_env
(gcpy_env) $ python -m. gcpy.examples.hemco.make_hemco_sa_spec.py \
             geoschem_species_metadata.yml

Functions

make_the_hemco_sa_spec(argv)

Reads metadata from the "geoschem_species_metadata.yml" file and then calls the "write_to_file" routine to create the "HEMCO_sa_Spec.rc" configuration file.

write_to_file(metadata)

Writes species metadata to the "HEMCO_sa_Spec.rc" file for the HEMCO standalone mode.

gcpy.examples.hemco.make_hemco_sa_spec.write_to_file(metadata)[source]

Writes species metadata to the “HEMCO_sa_Spec.rc” file for the HEMCO standalone mode. Output includes species index, name, MW (g), and Henry’s law K0, CR, PKA parameters.

Parameters:

metadata (dict) – Species metadata read from the geoschem_species_metadata.yml file.

gcpy.examples.hemco.make_hemco_sa_spec.make_the_hemco_sa_spec(argv)[source]

Reads metadata from the “geoschem_species_metadata.yml” file and then calls the “write_to_file” routine to create the “HEMCO_sa_Spec.rc” configuration file.

Parameters:

argv (list) – Command-line arguments; argv[1] must be the path to the geoschem_species_metadata.yml file.

Raises:

FileNotFoundError – If argv does not contain exactly 2 elements, or if the geoschem_species_metadata.yml file cannot be found.