Skip to content

epa_sources

epa_sources

Registry of EPA SCRAM download locations for the model source archives.

Every URL here was discovered by listing the SCRAM directory it lives in, then verified to return an application/zip response -- not guessed from a naming pattern. Guessing does not work: AERSCREEN is under models/screening/, not models/related/ where the other auxiliary programs live; the AERSURFACE test cases are aersurface_testcase.zip (singular) while AERSCREEN's are aerscreen_test_cases.zip (plural); and BPIP-PRIME ships as bpipprime.zip, not bpipprm_source.zip.

tests/test_epa_sources.py re-lists each directory and fails if a registered file is no longer there, so a rename on EPA's side surfaces as a test failure rather than as a 404 in CI months later.

Use :func:listing_url and re-run the discovery when adding an entry.

EPASource dataclass

One downloadable archive on EPA SCRAM.

Attributes:

Name Type Description
program str

Model or utility the archive belongs to ("aermod", "bpip").

kind str

"source", "test_cases" or "executable".

directory str

SCRAM path below :data:SCRAM_ROOT, e.g. "preferred/aermod".

filename str

Archive filename exactly as EPA publishes it.

note str

Anything a caller needs to know before using it.

listing_url property

listing_url: str

Directory listing the archive was discovered in.

get_source

get_source(program: str, kind: str = 'source') -> EPASource

Look up one registered archive.

Raises:

Type Description
KeyError

If the pair is not registered; the message lists what is.

source_url

source_url(program: str, kind: str = 'source') -> str

Download URL for one registered archive.

listing_url

listing_url(program: str, kind: str = 'source') -> str

SCRAM directory listing an archive was discovered in.

programs

programs() -> Dict[str, Optional[str]]

Map each registered program to its source-archive URL, if any.