validator¶
validator ¶
PyAERMOD Configuration Validator
Validates AERMOD input parameters before generating .inp files. Catches errors early with clear Python-side messages instead of letting invalid parameters silently produce bad input files that AERMOD rejects at runtime.
ValidationError
dataclass
¶
A single validation error with context.
ValidationResult
dataclass
¶
Collection of validation errors and warnings.
Validator ¶
Validates an AERMODProject configuration.
Usage::
from pyaermod.validator import Validator
result = Validator.validate(project)
if not result.is_valid:
print(result)
raise ValueError(str(result))
validate
classmethod
¶
validate(project, check_files: bool = False, advanced: bool = True, *, preserve_unparsed: bool = True) -> ValidationResult
Validate an entire AERMODProject.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
AERMODProject
|
The project to validate. |
required |
check_files
|
bool
|
If True, verify that meteorology files exist on disk. |
False
|
advanced
|
bool
|
If True (default), also run the cross-field checks from
:mod: |
True
|
preserve_unparsed
|
bool
|
Whether the deck will carry :attr: |
True
|
Returns:
| Type | Description |
|---|---|
ValidationResult
|
|
naaqs_processing
staticmethod
¶
Which NAAQS special processing AERMOD would run for control.
Returns "1-hour" for NO2/SO2 with 1-hour as the only short-term
average, "24-hour" for PM2.5 with 24-hour as the only
short-term average and no PERIOD, else None. This is the
condition under which AERMOD accepts MAXDAILY, MXDYBYYR and
MAXDCONT (coset.f sets NO2AVE/SO2AVE/PM25AVE; ouset.f
raises E162/E163 otherwise).