Files
pbf/RUNNING.md
2026-03-17 19:48:15 +08:00

54 lines
1.3 KiB
Markdown

# 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.