Repository navigation
Installation
Salvador Navas edited this page Jul 2, 2026
·
1 revision
- Python 3.9 or newer.
-
pipor another PEP 517-compatible installer. - Internet access when installing from GitHub or downloading pilot-case data.
- Optional: Docker Desktop or Docker Engine for the notebook environment.
Some modules require additional external tools or credentials:
- CDS API credentials for Copernicus/ERA5/GloFAS workflows.
- NASA Earthdata credentials for some GPM workflows.
- AEMET OpenData API key for AEMET downloads.
- Local HEC-HMS, HEC-RAS, SWAT+ or SFINCS installations for model execution.
- Optional geospatial libraries such as GDAL for raster-heavy workflows.
pip install git+https://github.com/navass11/pyhydra.gitgit clone https://github.com/navass11/pyhydra.git
cd pyhydra
python -m venv .venv
source .venv/bin/activate
pip install -e .Install pytest when developing:
pip install pytest
pytest tests/pip install "pyhydra[geo] @ git+https://github.com/navass11/pyhydra.git"GDAL installations are platform-sensitive. If a local installation fails, use a Conda environment or the Docker notebook environment.
Point and spatial stochastic generation can use optional libraries that are not part of the minimal dependency set:
-
NEOPRENEfor NSRP and STNSRP precipitation models. -
CoSMoS_pyfor CoSMoS-based time-series and spatial-field generation.
Install them only for workflows that require them. The package raises explicit import errors when those optional dependencies are missing.
python - <<'PY'
import pyhydra
print(pyhydra.__version__)
PYLarge datasets, model projects and downloaded pilot-case files should not be committed to Git. Use a local data workspace:
export HYDRA_DATA_DIR=/path/to/data
pyhydra-get-dataIf HYDRA_DATA_DIR is not defined, data helpers default to ./data relative to
the current working directory.