particula.dynamics.chemistry.catalog
Local, versioned catalog of atmospheric model chemistry.
Classes
| Name | Description |
|---|---|
ChemistryCatalog | Import local files once and query the resulting persistent records. |
Modules
bundleInstall the prebuilt reaction catalog from a versioned catalog release.camxRead CAMx numbered rate decks and PMCAMx-SR precursor yield tables.cliCommand-line access to the same chemistry catalog used by Python studies.cmcRecover CAMx/PMCAMx stoichiometry and kinetic orders from CMC tables.nativeCompile selected closed gas channels to Particula's native schema.readersRead source mechanisms as data; preserve source expressions and locations.sourcesRetrieve the repository's checksum-pinned atmospheric mechanism sources.storeCache source bytes, reviewed chemistry records, and immutable selections.
ChemistryCatalogclass#
Re-exported from
particula.dynamics.chemistry.catalog.storeView sourceclass ChemistryCatalog(path=None)Import local files once and query the resulting persistent records.
pathattributeinstance attribute#
path = Path(path or os.environ.get('PARTICULA_CHEM_CATALOG', default))__init__method#
def __init__(path=None)Open or create the local SQLite catalog at path.
_dbmethod#
def _db()exportmethod#
def export(identifiers, output, *, target='native', lock_path=None, close_oxygen=False)Write a study selection lock or an executable native mechanism.
Parameters
| Name | Default | Description |
|---|---|---|
identifiers | required | Reaction or snapshot IDs to select. Pass an empty sequence when replaying a lock. |
output | required | Destination for the JSON lock or native JSON/YAML file. A successful export atomically replaces this file. |
target | 'native' | Use "lock" to preserve the source records and oxygen
assumption, or "native" to assemble the native channels. |
lock_path | None | Path to a saved selection lock. Replay uses the oxygen treatment recorded at lock creation. |
close_oxygen | False | For NO + O₃ → NO₂ + O₂, include O₂ as an evolving product when the source omits or prescribes it. Bind the resulting mechanism to a gas inventory with an O₂ column. Defaults to False. To change a saved assumption, create a new lock from the source IDs. |
Raises
ValueError- If the selection, lock, or target is invalid, or a selected channel cannot be represented by the native solver.
fetchmethod#
def fetch(recipe=None, *, catalog_version=None)Fetch catalog records for offline search and export.
Parameters
| Name | Default | Description |
|---|---|---|
recipe | None | Optional source key such as waccm. Omitting the key
downloads the latest stable chemistry catalog release. |
catalog_version | None | Exact catalog data version, such as 1.0.0,
when fetching the prebuilt artifact. |
Returns
- The release manifest for a prebuilt catalog, or the immutable
- snapshot ID for a named source import.
import_filemethod#
def import_file(source, path, *, release, mechanism, companions=(), aerosol=None, origins=())Pin a source and optional companion files; return its snapshot ID.
searchmethod#
def search(species=None, source=None, role=None, snapshot=None)Search exact source species and roles across imported snapshots.
selectionmethod#
def selection(identifiers, *, close_oxygen=False)Pin individual channels or every channel in an imported source.
showmethod#
def show(identifier)Inspect source parameters, provenance and export diagnostics.
source_bytesmethod#
def source_bytes(digest)Read a cached upstream file by its SHA-256 digest.