hyriver / pygeohydro

A part of HyRiver software stack for accessing hydrology data through web services
https://docs.hyriver.io
Other
68 stars 23 forks source link

Did something change with NWIS? #99

Closed rsignell-usgs closed 2 years ago

rsignell-usgs commented 2 years ago

What happened: my NWIS example stopped working

What you expected to happen:

Minimal Complete Verifiable Example:

from pygeohydro import NWIS

nwis = NWIS()

start = '1979-02-01T01:00:00'
stop =  '2020-12-31T23:00:00'

sta = ['USGS-01030350', 'USGS-01030500']

ds_obs = nwis.get_streamflow(sta, (start,stop), to_xarray=True)

I tried pygeohydro versions 0.13.0 and 0.13.1

rsignell-usgs commented 2 years ago

Oh jeez, my station names have 'USGS' in them. Must have deleted the cell that stripped those. :(

from pygeohydro import NWIS

nwis = NWIS()

start = '1979-02-01T01:00:00'
stop =  '2020-12-31T23:00:00'

sta = ['01030350', '01030500']

ds_obs = nwis.get_streamflow(sta, (start,stop), to_xarray=True)

works fine. My bad.

cheginit commented 2 years ago

Right. Sure, no problem!

cheginit commented 2 years ago

@rsignell-usgs I had to release a new version (0.13.2), so I included the latest commit that takes care of striping the USGS part and adding 0 padding, if necessary.

rsignell-usgs commented 2 years ago

Nice! Thanks @cheginit !