How swagduck/ml_natural works
Disaster Globe combines live global hazard events with multi-model weather forecasts in an interactive 3D globe. Its main flow collects hazard feeds into persistent storage, prepares forecast products and verification data, exposes them through an API, and renders them in the web client. The client also supports Model Lab and privacy-first Near Me workflows. The README documents the overall product flow; sampled source and index references support selected implementation links, while unsampled internals are not asserted in detail.
Main entry points: main.ts Globe client · run.py Weather pipeline · app.ts Fastify API · adapters Feed adapters
Components 29
Hazard ingestion
- Feed adapters
server/src/adapters - Event ingest
server/src/ingest/ingestService.ts - Ingest scheduler
server/src/ingest/scheduler.ts
Forecast and verification
- Weather pipeline
pipeline/run.py - Forecast models
pipeline/models - GFS-ML correction
pipeline/models/gfs_ml.py - Grid regridding
pipeline/regrid.py - Weather storage
pipeline/storage.py - ML training and evaluation
ml - Forecast verification
pipeline/verify.py - Cyclone tracking
pipeline/cyclone_tracker.py
API and persistence
- MongoDB
- Fastify API
server/src/app.ts - Weather routes
server/src/routes/weather.ts - Verification routes
server/src/routes/verification.ts
Globe application
- Globe client
web/src/main.ts - Hazard rendering
web/src/layers/hazardLayerManager.ts - Weather textures
web/src/weather/weatherTextureManager.ts - Model Lab
web/src/lab/modelLabPanel.ts - Near Me ranking
web/src/near/relevanceEngine.ts - Geospatial utilities
web/src/near/geo.ts - Responsive layout
web/src/ui/layoutManager.ts
Other components
- Globe user
- USGS feed
- GDACS feed
- NASA EONET
- Forecast feeds
- Copernicus ERA5
- NOAA IBTrACS
Connections 34
- USGS feed → Feed adapters: provides events
- GDACS feed → Feed adapters: provides alerts
- NASA EONET → Feed adapters: provides events
- Feed adapters → Ingest scheduler: supplies feeds
server/src/index.ts - Ingest scheduler → Event ingest: schedules ingest
- Event ingest → MongoDB: upserts events
- Forecast feeds → Weather pipeline: supplies forecasts
- Weather pipeline → Forecast models: runs models
pipeline/run.py - Forecast models → Grid regridding: regrids fields
pipeline/models/ecmwf_base.py - Forecast models → GFS-ML correction: selects model
pipeline/run.py - GFS-ML correction → Grid regridding: uses grid tools
pipeline/models/gfs_ml.py - GFS-ML correction → ML training and evaluation: loads inference
pipeline/models/gfs_ml.py - Weather pipeline → Weather storage: writes products
pipeline/run.py - Weather storage → MongoDB: stores manifests
pipeline/storage.py - Copernicus ERA5 → Forecast verification: provides truth
- NOAA IBTrACS → Cyclone tracking: provides tracks
- Weather pipeline → Forecast verification: scores forecasts
pipeline/run.py - Cyclone tracking → Forecast verification: supports scoring
- Forecast verification → MongoDB: stores scores
- Weather pipeline → Ingest scheduler: scheduled by
- Fastify API → Weather routes: registers routes
server/src/app.ts - Fastify API → Verification routes: registers routes
server/src/app.ts - Weather routes → MongoDB: reads runs
server/src/routes/weather.ts - Verification routes → MongoDB: reads scores
- MongoDB → Fastify API: serves records
- Globe user → Globe client: uses globe
- Globe client → Fastify API: requests data
web/src/main.ts - Globe client → Hazard rendering: renders hazards
web/src/main.ts - Globe client → Weather textures: loads weather
web/src/main.ts - Weather textures → Fastify API: fetches manifests
web/src/weather/weatherTextureManager.ts - Globe client → Model Lab: opens lab
web/src/main.ts - Globe client → Near Me ranking: ranks hazards
web/src/main.ts - Near Me ranking → Geospatial utilities: uses distance tools
web/src/near/relevanceEngine.ts - Globe client → Responsive layout: wires interface
web/src/main.ts