Installation#

Install the Hydrometeorology Calculation Library as a Python package.

Requirements#

  • Python 3.12+

  • Recommended package manager: pip or uv

hydrometlib depends only on Polars, which is installed automatically. pandas and NumPy are optional; install them only if you want to pass those types in directly (see Flexible inputs).

Install options#

Follow uv installation instructions if you haven’t already.

uv add hydrometlib
pip install hydrometlib

Optional extras#

To pass pandas Series or NumPy arrays into the calculations, install the matching extra. The pandas extra also pulls in pyarrow.

# pandas Series support
uv add "hydrometlib[pandas]"

# NumPy array support
uv add "hydrometlib[numpy]"
# pandas Series support
pip install "hydrometlib[pandas]"

# NumPy array support
pip install "hydrometlib[numpy]"

Importing#

The calculations are grouped into three modules. Import the ones you need:

from hydrometlib import cosmos, evapotranspiration, meteorology