prop/lib/microwaveprop/workers
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
..
asos_adjustment_worker.ex Database performance fixes and async backfill enqueue 2026-04-04 19:19:18 -05:00
backfill_enqueue_worker.ex Add ERA5 to backfill dashboard and enrichment pipeline 2026-04-07 12:24:18 -05:00
contact_weather_enqueue_worker.ex Dedupe ERA5 fetch jobs by (lat, lon, valid_time) 2026-04-08 15:52:53 -05:00
era5_fetch_worker.ex Batch ERA5 fetches by month and 2° tile 2026-04-09 13:01:49 -05:00
era5_month_batch_worker.ex Batch ERA5 fetches by month and 2° tile 2026-04-09 13:01:49 -05:00
hrrr_fetch_worker.ex Show dead tuple counts on backfill dashboard, fix table visibility during vacuum 2026-04-04 10:45:06 -05:00
iemre_fetch_worker.ex Store stub records on empty weather fetches to prevent infinite backfill retries 2026-04-06 16:10:39 -05:00
propagation_grid_worker.ex Decouple propagation_scores pruning from the compute worker 2026-04-09 12:30:10 -05:00
propagation_prune_worker.ex Decouple propagation_scores pruning from the compute worker 2026-04-09 12:30:10 -05:00
rtma_fetch_worker.ex Add ERA5 reanalysis and RTMA data sources 2026-04-07 12:04:16 -05:00
solar_index_worker.ex Database performance fixes and async backfill enqueue 2026-04-04 19:19:18 -05:00
terrain_profile_worker.ex Mark terrain status complete when profile already exists 2026-04-06 16:54:29 -05:00
weather_fetch_worker.ex Store stub records on empty weather fetches to prevent infinite backfill retries 2026-04-06 16:10:39 -05:00