Friday, April 6, 2012

How to make current stations into waypoints in a batch process

For a long trip though a complex waterway such as a trip up the inside passage to Alaska or around Vancouver Island, the tidal current flow can dominate the navigation planning. Such planning is most easily done on echarts. One would think that echarts themselves would have all the current stations clearly marked, but that does not seem to be the case, at least  on the charts that I have. Some charts show current arrows at the location of the station, and the Canadian charts do periodically show an A inside a diamond at the location of some stations, but there are many more without any notation.

On the other hand, some echart programs themselves impose the current station location on the chart if they include a tidal current display option. If you have one of these, you may not  need this exercise, unless you have a mobile device that does not show them. But it is well worth testing. There are three sets of current data for the waters around Vancouver island. One from Canada and it appears there are two sets from NOAA, or at least the NOAA list online is not the same as the list in the US Current Tables. Also we have have found that several, maybe most, US eachart programs only shown the US stations, which might be traced to the copyrights on the Canadian data. I am not sure.

In any event, we wanted to be sure we have all stations available for the upcoming rowing expedition, so we made this list. And it has been very instructive. A couple notes follow the procedure.

So we set about figuring a way to do this, which is outlined here.

Step 1. Find or make a thorough list of the stations available, which we found we needed to make  from digital lists of the US stations and then manually entering the Canadian data from their tables Volume 5 and Volume 6. We did not include adjacent channels that were not going to be covered.  For the round Vancouver Island we used this relay link http://www.starpath.com/resources2/tidal_currents_Inside_Passage.htm, for the NOAA CO-OP stations, which we list on this page  http://www.starpath.com/resources2/can_wx.htm -- a weather page we set up for our onboard training trips along the inside passage and have recently revitalized for the OAR NW rowing expedition around Vancouver island. Then we added to these the US stations not on that list directly from the US Current Tables, and then added the Canadian stations. In some cases they overlap with exact coordinates with a US station, in other cases they have similar ones, but rather separated.

Step 2. This step is easier if you have some practice with spread sheets. In fact, i would have to say that this whole exercise requires these excel or equivalent basics, because we have to paste that list of stations into excel, then delete all the columns except lat, lon, and name. But then the lat lon will be in degrees and minutes, so we have to make this into decimal degrees dd.dd = (dd)+(mm/60), then we have to multiply the lon by -1 since the gpx convention is West Lon is minus.

We want to end up with something like this.

 

Then save this file in the format .csv called something like current_stations.csv.... or just keep it as an xls file. In this last updated set we found that Step 3 works with xls or csv files.

Step 3. Then comes the magic step, compliments of a website called gpsvisualizer. It is a complex site, but the punch line is go to this part:  http://www.gpsvisualizer.com/convert_input  which will show you an input page that looks like this (from a link at the top of the page that says "convert a file".





Put a check in the gpx output, then navigate to your current_stations.csv file and push the Convert button and save your gpx file. This file can then be imported into your favorite echart program and you have all current stations plotted. 

This set of current station waypoints right on your echart can be very handy underway as you know then where the closest place is that has data. These are not magic waypoints, however. They will not tell you the current themselves, but if you have an echart program that lets you right click and show currents, these points show where the stations are they refer to. Or you look up the data the old fashioned (more dependable!) way called current tables.  If you see current waypoints on the echart that are not providing data from your program, then you have to look up those in the tables.

Current analysis for route planning can all be done brute force underway as you proceed, but it is usually benificial and efficient to have as much done as possible ahead of time, especially in the tight quarters of a 4-man ocean-going row boat.

Some subtlties.  The order of the columns in your csv or xls file does not matter for the conversion program we use, but they must have the properly spelled and named headers. You can skip the symbol tag, but if you choose to use a symbol type the name you choose should be a listed option in the echart program you plan to use. Choosing "circle" seems a safe choice, but in the end you will want to change this to something unique or more prominent. 

You can also add more specs to the waypoints if you like. To review all the gpx options for waypoint specification see this link: http://www.topografix.com/GPX/1/1/#type_wptType

Here is a sample of the one we made for the around Vancouver Island route. Many ECS programs use waypoint Descriptions, some such as the Time Zero products from Nobeltec and MaxSea use only Comments. None we have seen accept both, so we had to make two.




With the same note we have in an earlier post that incldues a set of tentatative waypoints, namely right click and save (or just click it to see what the files look like), and when using Internet Explorer, it might still try to change the extension to xml, in which case just change it back to gpx.

We have made the description tell you if it is a Canadian or NOAA station with a short hand notation:
Current Station: CHS / NOAA  = 9000  / 1341 means that both agencies have a station at that location and the Canadian number is 9000 and the NOAA number is 1341.
Current Station: CHS / NOAA  =   / 1346 means this is the NOAA station number and there is no Canadian station, and likewise Current Station: CHS / NOAA  = 8500  /  means there is a Canadian station but no NOAA station.

And here is one weird thing I learned, NOAA station numbers always end in a 1 or a 6, and Canadian station numbers end in any digit except a 1 or a 6. This is about the most cooperation we have ever detected since the onset of the Free Trade Agreement. I trust that is not an accident.

Another important thing to keep in mind, which is not restricted to this exercise, is that often the official definition of the location of a current station is not always where the actual station is located.Whenever you see the location given to the nearest whole mile it is likely not precise.  The station called Current Passage (NW of Helmcken Island) is a good example in this route. The official location given is actually on land. The actual location is somewhere in the middle of Current Passage, below the lat lon given. In some current tables they give both a lat lon and a verbal description (ie 1.4 mi SW of Pt Doda) and in these cases usually the verbal description is more accurate. If you see labeled current arrows on the chart is some logical location near a clearly wrong lat lon description, then chances are the right location is near those printed current arrows.


2 comments:

David Burch said...

We had to modify this on Monday April 9 to now have two versions, one with waypoint Comments and one with waypoint Descriptions, since it seems to be either or, depending on your echart program.

This project is getting to be way too much fun, but we have learned quite a lot in the process.

David Burch said...

If you want to add a time it would be in this format

1994-11-05T08:15:30-05:00 corresponds to November 5, 1994, 8:15:30 am, US Eastern Standard Time.

1994-11-05T13:15:30Z corresponds to the same instant in UTC (Z).

for details see:

http://www.w3.org/TR/NOTE-datetime

The time tag is called Time