Skip to content

input_generator

input_generator

PyAERMOD Input File Generator

Generates AERMOD-compatible input files from Python objects. Based on AERMOD version 24142 keyword specifications.

.. note::

As of v1.6.0 the dataclasses that used to live in this single file have been split into focused submodules:

  • :mod:pyaermod.pathways -- enums, chemistry options, Control / Met / Output / Event pathways
  • :mod:pyaermod.sources -- deposition helpers, building-downwash helpers, all source dataclasses, SourcePathway
  • :mod:pyaermod.receptors -- CartesianGrid, PolarGrid, DiscreteReceptor, ReceptorPathway

This module re-exports every public name so that existing imports (from pyaermod.input_generator import X) continue to work unchanged.

AERMODProject dataclass

Complete AERMOD project

Combines all pathways into a single input file.

to_aermod_input

to_aermod_input(validate: bool = True, check_files: bool = False) -> str

Generate complete AERMOD input file.

Parameters:

Name Type Description Default
validate bool

If True (default in pyaermod 2.0+), run the configuration validator before generating output. Raises ValueError on validation errors (warnings are allowed). Pass validate=False to skip validation entirely.

True
check_files bool

If True (and validate is True), also verify that meteorology files exist on disk.

False

write

write(filename: Union[str, Path], event_filename: Optional[Union[str, Path]] = None, validate: bool = True, check_files: bool = False)

Write input file to disk.

Parameters:

Name Type Description Default
filename str or Path

Path for the main AERMOD input file.

required
event_filename str or Path

Path for the event file. Required if events are defined.

None
validate bool

Forwarded to :meth:to_aermod_input. Default True (pyaermod 2.0+). Pass validate=False to skip.

True
check_files bool

Forwarded to :meth:to_aermod_input.

False

create_example_project

create_example_project() -> AERMODProject

Create an example AERMOD project