Skip to content

regulatory

regulatory

PyAERMOD regulatory-profile presets.

Codifies the "AERMOD as-used by regulators" configurations so users don't have to remember the set of ControlPathway flags that make a run compliant with a given agency's guidance.

Each RegulatoryProfile is a bundle of settings + a validator list. Applying a profile to a project:

from pyaermod import EPAReg2024Profile
EPAReg2024Profile.apply(project)

leaves the project in a compliant state or raises if the pre-existing configuration conflicts with the profile.

Profiles here are informed by: - 40 CFR 51 Appendix W ("Guideline on Air Quality Models"), 2017 update and subsequent EPA memoranda on LOWWIND3 and ADJ_U*. - AERMOD v22112 / v23132 User Guide MODELOPT defaults.

NOTE: This module encodes defaults and lints — final regulatory acceptance is always the agency's call. Consider the output advisory.

RegulatoryProfile dataclass

A named bundle of AERMOD regulatory settings.

Attributes:

Name Type Description
name str

Short identifier (e.g. "EPA-2017-AppendixW", "CARB-2024").

description str

One-paragraph summary.

regulatory_default bool

Whether to require DFAULT in MODELOPT.

terrain_type str

Required TerrainType value ("ELEVATED" / "FLAT"). Profiles usually mandate "ELEVATED" since it subsumes flat cases (AERMOD also accepts the short form "ELEV").

allowed_low_wind tuple of str

Which LOWWIND options are acceptable. Appendix W (2017) allows LOWWIND3 for specific documented cases.

allow_chemistry_methods tuple of str

Names of ChemistryMethod enum values that are acceptable for regulatory NO2 modeling (typically OLM, PVMRM, GRSM).

forbid_nondefault_flags tuple of str

Attribute names on ControlPathway that must NOT be truthy.

notes list of str

Free-form explanatory text.

apply

apply(project: Any) -> List[str]

Apply the profile's settings to a project in-place.

Returns the list of changes made, each as a human-readable string. Does NOT raise — use check() afterwards if you want strictness.

check

check(project: Any) -> List[str]

Return a list of regulatory lint warnings for the project.

Unlike apply, this does not mutate the project. Use to audit a project before submission without changing it.

get_profile

get_profile(name: str) -> RegulatoryProfile

Look up a profile by name. Raises KeyError if not known.