Skip to content

get_basin issue with gage 06899700 #87

@colby-thrash

Description

@colby-thrash

What happened?

I don't know that this is a HyRiver issue, but I know I have gotten basin geometry in the past using pynhd.get_basin for gage 06899700 and 'nwissite'. When I try today it says the service returns no features. I can get geometries for other gages.

When I run the same command using Swagger here I also get an error: The comid for feature source 'nwissite' and feature ID 'USGS-06899700' does not exist.

I tried running on Swagger with WQP and I do get a geometry returned. When I set get_basin(fsource='WQP'), I still get the same error.

I have a workaround to get the geometry for this particular gage, but the change in behavior and inconsistency with the Swagger results seem odd.

What did you expect to happen?

  1. I expected to get a basin geometry from nwissite from this gage because I have done it before
  2. I expected to get a basin geometry from WQP after doing so successfully with Swagger tool

Minimal Complete Verifiable Example

from pynhd import NLDI
station_id = '06899700'

basin1 = NLDI().get_basins(station_id, fsource='WQP')
basin2 = NLDI().get_basins(station_id, fsource='nwissite')

MVCE confirmation

  • Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue.
  • Complete example — the example is self-contained, including all data and the text of any traceback.
  • New issue — a search of GitHub Issues suggests this is not a duplicate.

Relevant log output

Anything else we need to know?

No response

Environment

Details

SYS INFO

commit: None
python: 3.12.8 | packaged by conda-forge | (main, Dec 5 2024, 14:06:27) [MSC v.1942 64 bit (AMD64)]
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 186 Stepping 2, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: ('English_United States', '1252')

PACKAGE VERSION

async-retriever 0.19.1
pygeoogc 0.19.0
pygeoutils 0.19.0
py3dep 0.19.0
pynhd 0.19.0
pygridmet N/A
pydaymet N/A
hydrosignatures 0.19.0
pynldas2 N/A
pygeohydro 0.19.0
aiohttp 3.11.11
aiohttp-client-cache 0.12.4
aiosqlite 0.20.0
cytoolz 1.0.1
ujson 5.10.0
defusedxml 0.7.1
joblib 1.4.2
multidict 6.1.0
owslib 0.32.1
pyproj 3.7.0
requests 2.32.3
requests-cache 1.2.1
shapely 2.0.6
url-normalize 1.4.3
urllib3 2.3.0
yarl 1.18.3
geopandas 1.0.1
netcdf4 1.7.2
numpy 2.2.2
rasterio 1.4.3
rioxarray 0.18.2
scipy 1.15.1
xarray 2025.1.1
click 8.1.8
networkx 3.4.2
pyarrow 19.0.0
folium 0.19.4
h5netcdf 1.4.1
matplotlib 3.10.0
pandas 2.2.2
numba N/A
py7zr N/A
pyogrio 0.10.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions