Initial import of NavSea pbf project

This commit is contained in:
OpenAI Codex
2026-03-17 19:48:15 +08:00
commit 5f3f7409b3
84 changed files with 43889 additions and 0 deletions

53
RUNNING.md Normal file
View File

@@ -0,0 +1,53 @@
# Running the weather pipeline
## Python
Use `python3`. This workspace does not provide a `python` shim.
After installing dependencies in the project virtual environment, prefer `.venv/bin/python`.
## Required packages
Install:
```bash
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
```
The pipeline requires these runtime dependencies:
- `requests`
- `numpy`
- `xarray`
- `cfgrib`
- `eccodes`
- `mercantile`
- `mapbox-vector-tile`
## Commands
Run the full pipeline:
```bash
.venv/bin/python src/weather_pipeline.py
```
Run individual steps:
```bash
.venv/bin/python src/gfs_downloader.py
.venv/bin/python src/grid_builder_v2.py
.venv/bin/python src/vector_tile_generator.py
```
Wave fields in the weather tiles come from the downloader and grid builder. If you want `wh`/`wdir`/`wp` to contain real data instead of compatibility zeros from older grid JSON, rerun the downloader before rebuilding grids and tiles.
The weather tile generator now builds `z=2,4,6,8,10,12` by default so wind barb density stays usable after zooming in. If you need a custom set, override with `WEATHER_TILE_ZOOMS`, for example:
```bash
WEATHER_TILE_ZOOMS=2,4,6,8,10,12,14 .venv/bin/python src/vector_tile_generator.py
```
## Known environment blockers in this session
- Network access may prevent `src/gfs_downloader.py` from reaching NOAA.