Sunday, November 8, 2009

1 minute tide data

NOAA/COOPS has a website for displaying 1 minute tide data from their NWLON stations for use in tsunami detection.  The interface is Google and Yahoo, and is really quite nice.  Only problem, access to the data is limited to 4 days at a time.

I was interested in getting 1 minute data for a couple stations for the summer of 2009 to see how it would compare to hydro survey boat GPS heights, thinking that perhaps the 1 minute data might pick up some of the higher frequency water level changes that appear (correctly or not) in the survey vessel GPS heights.

Wrote a python script with urlib and urlib2 to pull any amount of data in 4 day increments, which saves me a lot of button clicking.  The hardest part was picking up on a unique tmpname variable that is assigned on the first webpage with the graph.  Regardless of what begin and end dates you might post back to the server, the tmpname variable actually controls what time period you will see on the following page when you click through to view the tabular data.

Set up the script to pull the data while I snoozed.  Only, there wasn't any data from the summer.  In fact, there was only a couple of weeks of data available for these stations at all.  Checked a few other stations and they also seemed to be fairly spotty on coverage.

I'm not sure if that's a NOAA data retention policy, or if they've had problems collecting or storing this 1 minute data.  Anyways, it was worth it to learn a bit about urlib and urlib2.

UPDATE: got a very prompt response from NOAA folks that the 1 minute data is available from their OpenDAP website, in chunks of 30 days.  And the data appears complete on this website.