Skip to content

v0.13.0

Compare
Choose a tag to compare
@github-actions github-actions released this 04 Apr 06:36
· 657 commits to main since this release

Release Notes

New Features

  • Add a new flag to nlcd_* functions called ssl for disabling SSL verification.
  • Add a new function called get_camels for getting the CAMELS dataset. The function returns a geopandas.GeoDataFrame that includes basin-level attributes for all 671 stations in the dataset and a xarray.Dataset that contains streamflow data for all 671 stations and their basin-level attributes.
  • Add a new function named overland_roughness for getting the overland roughness values from land cover data.
  • Add a new class called WBD for getting watershed boundary (HUC) data.
from pygeohydro import WBD

wbd = WBD("huc4")
hudson = wbd.byids("huc4", ["0202", "0203"])

Breaking Changes

  • Remove caching-related arguments from all functions since now they can be set globally via three environmental variables:

    • HYRIVER_CACHE_NAME: Path to the caching SQLite database.
    • HYRIVER_CACHE_EXPIRE: Expiration time for cached requests in seconds.
    • HYRIVER_CACHE_DISABLE: Disable reading/writing from/to the cache file.

    You can do this like so:

import os

os.environ["HYRIVER_CACHE_NAME"] = "path/to/file.sqlite"
os.environ["HYRIVER_CACHE_EXPIRE"] = "3600"
os.environ["HYRIVER_CACHE_DISABLE"] = "true"

Internal Changes

  • Write nodata attribute using rioxarray in nlcd_bygeom since the clipping operation of rioxarray uses this value as the fill value.