M3Works / metloom

Location Oriented Observed Meteorology
Other
15 stars 4 forks source link

CDEC removed Metadata URL #75

Closed micahjohnson150 closed 4 months ago

micahjohnson150 commented 1 year ago

Description

Pulling any CDEC station metadata is currently showing 404. After a long arduous discussion with the powers that be, I learned the link that is currently being used they deprecated 2 years ago and had a redirect to somewhere else. 2 Days ago they got rid of that redirect for security reasons. When I asked what is the designated webservice they would like folks to use for metadata they said there isn't one and offer their web interface as a solution.

What I Did

from metloom.pointdata import CDECPointData
pnt = CDECPointData('TUM', 'Tuolumne Meadows')
print(pnt.metadata)

yields an exception

requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://cdec.water.ca.gov/cdecstation2/CDecServlet/getStationInfo?stationID=TUM

The recommended url to use now is https://cdec.water.ca.gov/dynamicapp/staMeta?station_id=TUM .