v2.3.0: pyaermod in the browser, with nothing to install¶
pyaermod and AERMOD now run in a web browser. The documentation site has an app with the seven steps of the pyaermod GUI and a set of Jupyter notebooks, both running AERMOD's own Fortran source compiled to WebAssembly. Nothing is installed or downloaded to run them, and nothing entered is sent to a server. The browser AERMOD reproduces EPA's AERTEST results exactly, but it is not EPA's executable: use it to learn, teach and explore, and use EPA's executable for permit and compliance work.
The stand-alone desktop downloads are retired. The GUI installs from PyPI, and a conda-forge recipe is ready for submission.
Highlights¶
- The app (/app/). Project,
Sources, Receptors, Meteorology, Output, Review & Run and Results, as in
pyaermod-app, and the same project files in both. It imports AERMOD decks, offers two sample met data sets (Albany, NY, 1988 and Houston, TX, 1996) or uploaded AERMET files, and takes receptor and source elevations from AERMAP output or a CSV. AERMOD runs in a background worker, so the page stays usable and Cancel stops a run. A practice deck for classes is in the teaching section. - The notebooks (/lite/). JupyterLite with pyaermod and AERMOD installed: build a project in Python, run AERMOD and map the result, or reproduce EPA's AERTEST.
- How it is checked. CI compiles AERMOD 26135 with LLVM Flang and Emscripten, runs pyaermod's real-AERMOD tests against that build, runs AERTEST through pyaermod inside Pyodide, and drives the published app in Chromium, Cancel included.
- The GUI from PyPI.
pyaermod-apptakes--host,--portand--no-browser;pyaermod guiandpython -m pyaermod.gui_v2start it too; a missing extra or a busy port gives one line saying what to do. Every release is now installed with theguiextra on Linux, macOS and Windows, through pip, pipx anduv tool, before it is uploaded.
Fixes worth knowing about¶
read_aermod_input(..., sandbox=True)let a quoted path such as"../../etc/passwd"through; it now judges the path AERMOD opens.- Quoted file names with blanks are read whole and written back as they
were;
SURFDATAwritten as reals (14735.0 1988.0) is read. RECTABLEreads every rank on every line, as AERMOD does.- The GUI's plan view no longer freezes the server on a coordinate typo far from the origin.
SO BACKGRNDkeeps every value of a temporal profile (SEASON 1 2 3 4used to becomeSEASON 1), joins a profile continued over lines, and is checked as AERMOD checks it: flag names and counts, one flag per sector, values for every sector, sector IDs 1 to N, 2 to 6BGSECTORdirections. A uniform background is writtenBACKGRND ANNUAL v; the bareBACKGRND vpyaermod used to write stops AERMOD (E201).- A sector's hourly background file is no longer dropped from a deck; a background pyaermod cannot model whole is kept verbatim.
PROFBASE 328 FEETwas read as 328 metres; it is converted.- The annual NO2 design value is one calendar year's mean (40 CFR
50.11(e), Appendix S):
naaqs_compliance_report("NO2_annual", ...)reports the highest complete year (at least 75% of its hours) and refuses AERMOD's multi-year ANNUAL value, which is a lower bound on it. The GUIs show that value as a lower bound. - The binary POSTFILE reader labels each record by itself and reads
ANNUAL and PERIOD files given
averaging_period=.
The full list is in CHANGELOG.md.
Upgrade notes¶
- No public API was removed. Some results change, deliberately:
naaqs_compliance_report("NO2_annual", ...)now gives the highest complete year's mean; passno2_annual="multi_year_mean"for the old average of the years' means. A multi-year ANNUAL POSTFILE is refused under the default.- The validator refuses background settings AERMOD refuses (an
averaging period such as
"24"used as aBACKGRNDflag, sectors without values, two flags for one sector). read_postfileraises for a binary POSTFILE whose ANNUAL or PERIOD records cannot be told from short-term ones; passaveraging_period="ANNUAL"or"PERIOD".- Deck numbers are read as AERMOD reads them: D exponents are accepted,
nan,infand underscores are not. add_backgroundwarns when some hours have no background value.pyaermod[all]now includes pywebview, forpyaermod-desktop.- Building from source needs
setuptools>=77.0.3(SPDX license metadata). - The desktop bundles attached to v1.9.0 and v2.0.0 get no fixes. To
keep a window of its own, install
"pyaermod[gui-desktop]"and runpyaermod-desktop.
Install¶
pip install pyaermod==2.3.0
pip install "pyaermod[gui]" # the GUI, opened in a browser tab
pip install "pyaermod[all]" # everything
Or nothing: open the app or the notebooks on the documentation site.