prop/lib/microwaveprop/weather
Graham McIntire 8637253fda Batch ERA5 fetches by month and 2° tile
Per-point ERA5 fetches were tragically slow because every point-hour
triggered its own asynchronous CDS job (submit → poll → assemble →
download). For backfill this meant thousands of independent jobs
queued against Copernicus. The new path groups requests by calendar
month and a 2° × 2° lat/lon tile so one CDS cycle populates ~60k
profiles at once, and Oban uniqueness on (year, month, tile_lat,
tile_lon) collapses every duplicate enqueue.

- Era5BatchClient builds the monthly CDS requests, extracts every
  (lat, lon, hour) from the GRIB2 blob with wgrib2, derives
  refractivity params, and bulk-inserts in 2k-row chunks with
  on_conflict: :nothing. fetch_month_into_db/1 short-circuits when
  the month-tile already has any cached profile.
- Era5MonthBatchWorker runs the batch on the :era5 queue with a
  generous backoff (10m → 1d) and the uniqueness key above.
- Era5FetchWorker is now a thin router: cache hit → :ok, cache miss
  → enqueue the month-batch for the point's tile-month and return.
  No more per-point CDS calls.
- Wgrib2 grows extract_grid_messages/3 which preserves per-message
  datetimes by parsing `d=YYYYMMDDHH[MMSS]` from the inventory, so a
  single GRIB2 file carrying a whole month decodes correctly.
- The era5_backfill mix task enqueues month-tile batches directly.
2026-04-09 13:01:49 -05:00
..
grib2 Batch ERA5 fetches by month and 2° tile 2026-04-09 13:01:49 -05:00
era5_batch_client.ex Batch ERA5 fetches by month and 2° tile 2026-04-09 13:01:49 -05:00
era5_client.ex Batch ERA5 fetches by month and 2° tile 2026-04-09 13:01:49 -05:00
era5_profile.ex Add ERA5 reanalysis and RTMA data sources 2026-04-07 12:04:16 -05:00
hrrr_client.ex fix enrichment 2026-04-02 15:30:41 -05:00
hrrr_profile.ex Database performance fixes and async backfill enqueue 2026-04-04 19:19:18 -05:00
iem_client.ex Add real-time ASOS adjustments between hourly HRRR updates 2026-03-31 09:10:12 -05:00
iemre_observation.ex Add IEM precipitation data to QSO weather pipeline 2026-03-30 13:18:11 -05:00
rtma_client.ex Add ERA5 reanalysis and RTMA data sources 2026-04-07 12:04:16 -05:00
rtma_observation.ex Add ERA5 reanalysis and RTMA data sources 2026-04-07 12:04:16 -05:00
solar_client.ex Add QSO import, solar indices, Oban workers, LiveView UI, and parallel weather import 2026-03-29 13:04:55 -05:00
solar_index.ex Add QSO import, solar indices, Oban workers, LiveView UI, and parallel weather import 2026-03-29 13:04:55 -05:00
sounding.ex Add weather data schema, context, sounding params, and IEM ingestion 2026-03-28 15:57:19 -05:00
sounding_params.ex Add weather data schema, context, sounding params, and IEM ingestion 2026-03-28 15:57:19 -05:00
station.ex Add weather data schema, context, sounding params, and IEM ingestion 2026-03-28 15:57:19 -05:00
surface_observation.ex Add IEM precipitation data to QSO weather pipeline 2026-03-30 13:18:11 -05:00
weather_layers.ex Add WeatherLayers module for deriving upper-air map fields from HRRR profiles 2026-04-03 16:49:17 -05:00