Add NOAA AQM (Air Quality Forecast Capability) ingest#588
Merged
Conversation
8 tasks
Co-authored-by: cloneofghosts <10248058+cloneofghosts@users.noreply.github.com> Agent-Logs-Url: https://github.com/Pirate-Weather/pirate-weather-code/sessions/4772ca8f-e098-4e43-ac45-7e9e1193b3c7
Contributor
Author
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot
AI
changed the title
[WIP] Add FMI Silam air quality ingest and wildfire smoke ingest
Add NOAA AQM (Air Quality Forecast Capability) ingest
Mar 24, 2026
Collaborator
|
@copilot Comments:
|
… and O3 always-ppb handling Co-authored-by: cloneofghosts <10248058+cloneofghosts@users.noreply.github.com> Agent-Logs-Url: https://github.com/Pirate-Weather/pirate-weather-code/sessions/d174c63d-0e16-4cde-aee0-9259e9dfa53e
Contributor
Author
Fixed in
|
Collaborator
|
@copilot Tests are failing because of this issue: ModuleNotFoundError: No module named 'cartopy' |
Copilot stopped work on behalf of
cloneofghosts due to an error
March 24, 2026 17:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds ingest for NOAA's Air Quality Model (AQFC), which provides CONUS hourly PM2.5 and Ozone forecasts at 12km resolution, updated at 06Z and 12Z (both 72-hour forecasts). Complements the existing global SILAM ingest for US locations where AQM has higher accuracy.
Ingest script (
API/NOAA_AQM_Local_Ingest.py)PMTF, units:Particulate matter (fine) [10^-6g/m^3]= µg/m³, no conversion needed) and O3 (OZCON, units:Ozone Concentration [ppb]) GRIB2 files from NOMADS; tries grid IDs148and227for cross-version compatibilityconvert_o3_to_ug_m3converts ppb → µg/m³ and uses ppb as the fallback for any unrecognised unit stringif __name__ == '__main__':guard so pure helpers (get_latest_aqm_run,build_aqm_url,convert_o3_to_ug_m3) are importable without side effectsAQI blending design
SILAM stores a full 6-pollutant global AQI; AQM only covers PM2.5 + O3 for CONUS. Taking the max of two separate AQI values across different pollutant subsets is misleading. The recommended path when the API layer integrates these sources:
calculate_aqi()call — the averaging windows (NowCast, 8h, 1h) are already handled internallyTests (
tests/test_noaa_aqm_ingest.py) — 31 tests"Ozone Concentration [ppb]"), ppm→µg/m³, µg/m³ pass-through, unknown-units treated as ppbbuild_aqm_url: correct NOMADS URL structure for both variables and both grid IDsget_latest_aqm_run: always returns 06Z or 12Z, never a future timestamp💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.