Closed rsignell-usgs closed 2 years ago
@cheginit , I just tried the lastest from master, and it worked great! Thanks so much for implementing this!
Great. Thanks!
@cheginit , I just realized that if I requested 6000 stations, I would get 6000 variables. It would be better if the stations were a new dimension (e.g. "station_id" or "feature_id") and we also had a "station_id" or "feature_id" variable that contained the name (character or int, I guess). Would that be difficult? Should I submit a new ticket?
@rsignell-usgs I actually thought about this. The issue with this approach is that I have to include all station-specific attrs such as station name, lon, lat, etc as a new coordinate. So there is going to be too many dims. At the moment each station has 9 attributes, for example:
My initial approach looks like this:
But at the end I just went with the simplest solution to keep all the attrs.
I am open to suggestions. Having time and station ID as dims is more in line with xarray
but then we end up with too many dims. One way would be to just keep lon, lat and alt and drop the rest.
After some thinking, I came up with a solution, all attrs as variables:
There's no need for submitting a new feature. I will reference this issue.
Let me know what you think about this approach.
@cheginit, that's a great idea!!! Love it!
Great! I'll probably release a new version late Dec. Till then, you can use it by installing from the main branch.
It would be great to be able to set some parameter to ensure that the retrieved NWIS data are in UTC.
Also it would be nice to have the ability to return the data (along with metadata such as units!) as an xarray dataset instead of a pandas dataframe.
There is an example NWIS code here by @dnowacki-usgs that optionally returns an xarray dataset.