PWS Drifter Realtime Webpage Info

From Locl
Revision as of 21:52, 16 July 2009 by Kirk (talk | contribs)
Jump to navigationJump to search

Prince William Sound, Alaska Drifter Realtime Webpage Wiki

Page can be found at: http://pws.drifterdata.com or http://www.icess.ucsb.edu/drifter/realtime-PWS/
This page is for displaying any Surface Velocity Program (SVP) in blue, Coast Guard SLDB (CG) in green, and Oil Spill Response (OSR) in red drifter tracks. The Iridium drifters will be on the normal realtime page.

File Locations

The data files must be uploaded to the ICESS network in this directory: /home/locl/file_sharing/PWS/. The filenames must be PWS_SVP_DATA.txt (SVP), PWS_CG_DATA.txt (Coast Guard), and PWS_OIL_DATA.txt (OSR). There are README files there to help with formatting. To not show a particular group's data, either empty the contents of the appropriate file or delete (or rename) it.

There is also a BOX_COORDINATES.txt there (and README file) for setting coordinates for a box.

File Formats

One thing to note is that fields which normally have a number must have a number, with the exception of SST which can instead have a "NaN". We really only care about 5 things (drifter_number,date/time,lat,lon,SST), so if any of those other 4 fields are a "NaN" it should be skipped anyway since they contain critical information. As for any "non critical" columns, (e.g. "FoM" or "Batt volts" [if we set that up to be a valid column] or whatever) can contain anything since we're ignoring those columns anyway.

1) SVP. The info here still doesn't show which column will have the drifter number, so for now, I'm assuming it will be the first.
e.g.

% Pacific Gyre SVP  -   Drogue center: 10m   -  ARGOS telemetry
%  Drifter #  Date/Time (UTC)   Lat      Lon   FoM SST [C]
1234  2009/04/09 22:30:00 60.5503 -145.7611 1 5.0

2) Coast Guard SLDMBs The email from Rob Cermak on Jul 9th @ 17:39 has this link
Right now, this is the format it's ready for:

Shape|OBJECTID|Buoynum|ZDateTime|DateTime|Location
|1|38669|232030Z MAY 09|39956.85|20-57.453N  071-20.205W

3) Oil Spill Resp. For now it's setup to be exactly in the same format as the SVP (but with one header line instead of two)

e.g.

%  Drifter #  Date/Time (UTC)   Lat      Lon   FoM SST [C]
1234  2009/04/09 22:30:00 60.5503 -145.7611 1 5.0 

Parsing Files

The webpage code and parsing scripts all live here: /home/kirk/public_html/drifter/realtime-PWS/. The parsing scripts (those which breakdown the uploaded files) are named getdata.SVP.php, getdata.CG.php, and getdata.OSR.php. They are pretty self explanatory if they need to be edited for any reason. One thing to note is that they use regular expression checking to ensure that any misformatted data is skipped.