-
Notifications
You must be signed in to change notification settings - Fork 1
Implementation Plan
David Fillmore edited this page Mar 24, 2026
·
2 revisions
Migrated from PLAN.md in the main repository.
Complete refactor of MELODIES-MONET addressing:
-
driver.py: 3,116 lines → ~50 modules (<500 lines each) -
plotting(): 1,321-line method → individual plotter classes - No type hints → Full type hints + mypy strict
- 211 print() → Structured logging
- 4 test files → Comprehensive test suite (>80% coverage)
-
Uniform Pairing Logic: A single, consistent pairing engine that works across all observation types (surface, aircraft, satellite, sonde). The pairing strategy is determined by data geometry (point, profile, swath, grid) rather than data source.
-
Synthetic Data for Testing: Generate test data programmatically - no dependency on external datasets. Tests are self-contained and reproducible.
-
xarray-Only Data Model: All data flows through the system as
xr.Dataset. No pandas in core pairing/analysis logic.Component Data Structure Model data xr.Datasetwith dims (time, level, lat, lon)Point obs xr.Datasetwith dims (time, site) + lat/lon coordsTrack obs xr.Datasetwith dims (time,) + lat/lon/alt coordsProfile obs xr.Datasetwith dims (time, level) + lat/lon coordsSwath obs xr.Datasetwith dims (time, scanline, pixel)Grid obs xr.Datasetwith dims (time, lat, lon)Paired output xr.Datasetpandas limited to:
- I/O adapters: Read CSV/tabular → convert to xarray
- Statistics output: Final tables for export
| Phase | Description | Status |
|---|---|---|
| 1 | Foundation | COMPLETE |
| 2 | Synthetic Data & Testing Infrastructure | COMPLETE |
| 3 | Configuration | COMPLETE |
| 4 | Core Data Classes | COMPLETE |
| 5 | Unified Pairing Engine | COMPLETE |
| 6 | Model Implementations | COMPLETE |
| 7 | Observation Implementations | COMPLETE |
| 8 | Pipeline | COMPLETE |
| 9 | Plotting | COMPLETE |
| 10 | Statistics | COMPLETE |
| 11 | CLI | COMPLETE |
| 12 | Documentation & Polish | PENDING |
| Aspect | Decision |
|---|---|
| Python version | 3.11+ |
| Type checking | mypy with selected stricter checks |
| Validation | Pydantic v2 |
| Logging | Python logging module |
| CLI | Typer |
| Testing | pytest + pytest-cov + synthetic data |
| Formatting | Black + isort |
| Data model | xarray-only (pandas for I/O adapters and stats tables only) |
| Dependencies | Continue using monet/monetio |
- Implementation Plan
- Code Review
- Tech Debt
- TODO
- Derecho
- Plotting Alternatives
- Plans
- Design Docs
- Paper (internal)