Installation¶
Prerequisites¶
- Python >= 3.11
- uv — fast Python package and project manager
- Sufficient disk space for downloaded datasets (varies by region and time range)
- API credentials for the data providers you intend to use
Install from PyPI¶
Install from source¶
Include development dependencies (pytest, ruff):
Verify installation¶
Expected output lists the available commands: run, compile, convert, catalog
First-time setup¶
H2MARE requires two files in your working directory before running any command.
config.yaml¶
Defines variables, dataset IDs, bounding boxes, and processing parameters. Download the template from the repository and edit it to match your setup:
.env¶
Create a .env file with at minimum:
See Configuration for the full list of variables and credentials.
Where to place these files¶
By default, h2mare searches for config.yaml by walking up from your current working directory. As long as you run h2mare from inside your project tree, no extra configuration is needed.
If auto-detection fails — for example, you run h2mare from an unrelated directory, or a script elsewhere imports h2mare — set H2MARE_ROOT to the directory containing your config.yaml and .env:
Without it, h2mare falls back to ~/.h2mare (library mode), where no data directories are created and commands will fail.
Data storage layout¶
$PROJECT_ROOT/
├── data/raw/
│ └── downloads/<local_folder>/ # raw NetCDF / GRIB files from downloaders
├── data/interim/ # temporary scratch files (checkpoints, tmp Zarr)
├── data/processed/
│ ├── zarr/<local_folder>/ # per-variable Zarr stores (fallback when STORE_ROOT is not set)
│ ├── parquet/ # Hive-partitioned Parquet store
│ └── metadata/ # ZarrCatalog Parquet indices
└── logs/ # pipeline log files
$STORE_ROOT/<local_folder>/ # per-variable Zarr stores (when STORE_ROOT is set)
local_folder is defined per variable in config.yaml (e.g. CMEMS_SST, CMEMS_SSH). When STORE_ROOT is set, Zarr output goes there; otherwise it falls back to data/processed/zarr/.