<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki-locl.eri.ucsb.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kirk</id>
	<title>Locl - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki-locl.eri.ucsb.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kirk"/>
	<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/Special:Contributions/Kirk"/>
	<updated>2026-05-14T07:53:33Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=61</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=61"/>
		<updated>2009-07-18T15:22:47Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You need to copy the &amp;lt;b&amp;gt;kirk&amp;lt;/b&amp;gt; folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;li&amp;gt;These instructions should work on PC, Linux or Mac, but are specific to Mac.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and &amp;lt;b&amp;gt;commented out&amp;lt;/b&amp;gt;), then copy these deployment times to the top of the file, and uncomment.  Note: under the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but &amp;lt;b&amp;gt;when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering are sequential and start at 1&amp;lt;/b&amp;gt;.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least at or before start of deployment and a time at or after ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly!&amp;lt;br&amp;gt;&lt;br /&gt;
     If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in &amp;lt;b&amp;gt;..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt; folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;, and will hereafter called the &amp;lt;b&amp;gt;&amp;quot;working folder&amp;quot;&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to this working folder and make a copy of the &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.gif]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations on map:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;1st column = consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;2nd column = first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;3rd column = time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;4th column = in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around to the different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side -- to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next and then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index number a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment, change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;WARNING!:&amp;lt;/span&amp;gt; when you press the NEXT&amp;amp;rarr; (or &amp;amp;larr;PREV) button(s), if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the tilte above the map change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, if you were to click the &amp;amp;larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.gif]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed (the track which heads due north):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.gif]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Again, when done cleaning up, be sure to press the &amp;lt;b&amp;gt;SAVE&amp;lt;/b&amp;gt; button to write your changes out to file!&lt;br /&gt;
&amp;lt;li&amp;gt;Take note of the maximum latitude and longitude limits (you'll want them for the plotting portion below), then press 'EXIT'.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to your working folder and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Delete&amp;lt;/b&amp;gt; the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt;  [you made a copy of it already as &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Rename&amp;lt;/b&amp;gt; the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file (output of the clean_up_drifter_data.m script), to &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt; (so it's read in next step).&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;li&amp;gt;The format of the &amp;quot;MOD&amp;quot; file which this script output (different than the &amp;quot;ORIG&amp;quot; one fetched) is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of &amp;lt;b&amp;gt;process_drifter_data.m&amp;lt;/b&amp;gt; to set these as appropriate:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%SET **ONE** OF THESE!&lt;br /&gt;
%THIS WILL DETERMINE WHICH BATHY DATASET GETS LOADED!&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work (SBCIS or SBCSS)&lt;br /&gt;
SBC_FULL = 1; %all of Santa Barbara Channel for Large Scale Deployments (SBCLS, SCROF or SBNS or MSD)&lt;br /&gt;
UCSD = 0; %San Diego Imperial Beach (SDSS or TJROF)&lt;br /&gt;
HBDP = 0; %Huntington Beach (HB) or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River (SAROF)&lt;br /&gt;
SF = 0; %San Francisco (SF)&lt;br /&gt;
EFS = 0; %Eastern Florida Shelf (EFS)&lt;br /&gt;
&lt;br /&gt;
%if this is true, then doesn't matter what areas above are set, or GEODAS setting below. set to 1 for areas w/o bathy (e.g. PHILEX) &lt;br /&gt;
% data. will skip along/across shore, dz/dt and depth calculations.&lt;br /&gt;
SKIP_ALONG_ACROSS = true &lt;br /&gt;
TEN_MIN_ROUNDING = true % before doing calculations, first round drifter times to 10 minute steps (will have &amp;quot;_TEN_MIN_&amp;quot; in filename)&lt;br /&gt;
SMOOTH_DATA = false; % run smooth.m (2 point running mean or average) on the u and v velocities (and only these, i.e. not lat/lon) to reduce noise (usually NOT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;process_drifter_data.m&amp;lt;/b&amp;gt; to process all drifters from a single deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifternum&amp;lt;/i&amp;gt;_summary.log' files (or '&amp;lt;i&amp;gt;yyyymmdd_drifternum&amp;lt;/i&amp;gt;_TEN_MIN_summary.log' if TEN_MIN_ROUNDING is set) with this format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Iridium drifters will still have this format, but columns 17-21 will be filled with NaNs.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;IMPORTANT!: See [[#IMPORTANT_NOTE_ABOUT_IMAGEMAGICK|ImageMagick]] note below!&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;deployment_settings.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy/paste an 'elseif' block from an existing one:&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
elseif strcmp(folder,'20050307')&lt;br /&gt;
   z_rate = [-0.2 0.2];&lt;br /&gt;
   max_z = -65;&lt;br /&gt;
   lon_lim = [-117.4 -117.06666];&lt;br /&gt;
   lat_lim = [32.4 32.7];&lt;br /&gt;
   vel_rate = [-60 60];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
     &amp;lt;li&amp;gt;Note that I try to keep these grouped by project&lt;br /&gt;
     &amp;lt;li&amp;gt;Edit the first line of the elseif to the date of the deployment&lt;br /&gt;
     &amp;lt;li&amp;gt;Try to capture the lat/lon limits, or use what you noted from the clean_up section above&lt;br /&gt;
     &amp;lt;li&amp;gt;We'll get to the others in a sec &lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;pathname&amp;lt;/b&amp;gt; to your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;do_all&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_summaries&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt;, and &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt;.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set any other values in the &amp;quot;USER SETTINGS&amp;quot; section if needed, but not usually.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;&lt;br /&gt;
   &amp;lt;ul&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;There are now 5 summary plots and one &amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;_all.png plot in your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Use what you see to tweak the values on the &amp;lt;i&amp;gt;deployment_settings.m&amp;lt;i&amp;gt; file (note: if you didn't use bathy in the processing, it doesn't matter what the &amp;lt;i&amp;gt;z_rate&amp;lt;/i&amp;gt; or &amp;lt;i&amp;gt;max_z&amp;lt;/i&amp;gt; are set to)&lt;br /&gt;
      &amp;lt;li&amp;gt;When all looks good, you'll want to eventually set the &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; to make those plots.&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate &amp;quot;stats.php&amp;quot; pages (e.g. start/stop times, average speeds, average depth, number of drifters, etc.) for each deployment in a project [optional-ish]&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;make_stats_page.m&amp;lt;/b&amp;gt; and select the project folder (e.g. SBCLS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Website Setup&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Copy the files so the website shows them, and other web maintenance.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SBCLS) on the website, which is found at &amp;lt;b&amp;gt;/home/kirk/public_html/drifter/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt;Copy all the &amp;lt;i&amp;gt;*_summary.log&amp;lt;/i&amp;gt; files to the appropriate deployment type subfolder inside .../kirk/dataDrifter_Anal/2_data/AllData/&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'Compress'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to inside /home/kirk/public_html/drifter/data/data/.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update /home/kirk/public_html/drifter/mod_date.txt with today's date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check that the [http://drifterdata.com webpage] looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;IMPORTANT NOTE ABOUT IMAGEMAGICK&amp;lt;/h2&amp;gt;&lt;br /&gt;
In order for the plotting codes to work, you must have [http://www.imagemagick.org/script/index.php ImageMagick] (a free suite of powerful software for image manipulation from the command line) installed.&amp;lt;br&amp;gt;&lt;br /&gt;
Here's instructions on installing on a Mac via MacPorts (since the scripts are currently setup for ImageMagick programs to be in that path):&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Download the [http://www.macports.org/install.php MacPorts*.dmg install file]&lt;br /&gt;
&amp;lt;li&amp;gt;Double-Click on the *.dmg file, then double-click on the MacPorts-xxx.pkg file to launch the Installer.&lt;br /&gt;
&amp;lt;li&amp;gt;Follow the directions (mostly by clicking on 'Continue').&lt;br /&gt;
&amp;lt;li&amp;gt;Download [http://porticus.alittledrop.com/download.html Porticus]&lt;br /&gt;
&amp;lt;li&amp;gt;Double click on the Porticus*.dmg file and drag-drop Porticus to your Applications folder&lt;br /&gt;
&amp;lt;li&amp;gt;Launch Porticus&lt;br /&gt;
&amp;lt;li&amp;gt;On the left side, select 'All Ports'&lt;br /&gt;
&amp;lt;li&amp;gt;On the right side, scroll down to 'ImageMagick' (NOTE: it will be towards the top since packages starting with a capital letter come first)&lt;br /&gt;
&amp;lt;li&amp;gt;Highlight it, then click the 'Install' button.&lt;br /&gt;
&amp;lt;li&amp;gt;All MacPorts stuff gets installed to your /opt/local/ directory, with the programs in /opt/local/bin/.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=60</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=60"/>
		<updated>2009-07-18T15:15:15Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You need to copy the &amp;lt;b&amp;gt;kirk&amp;lt;/b&amp;gt; folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;li&amp;gt;These instructions should work on PC, Linux or Mac, but are specific to Mac.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and &amp;lt;b&amp;gt;commented out&amp;lt;/b&amp;gt;), then copy these deployment times to the top of the file, and uncomment.  Note: under the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but &amp;lt;b&amp;gt;when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering are sequential and start at 1&amp;lt;/b&amp;gt;.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least at or before start of deployment and a time at or after ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly!&amp;lt;br&amp;gt;&lt;br /&gt;
     If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in &amp;lt;b&amp;gt;..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt; folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;, and will hereafter called the &amp;lt;b&amp;gt;&amp;quot;working folder&amp;quot;&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to this working folder and make a copy of the &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.gif]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations on map:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;1st column = consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;2nd column = first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;3rd column = time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;4th column = in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around to the different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side -- to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next and then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index number a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment, change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;WARNING!:&amp;lt;/span&amp;gt; when you press the NEXT&amp;amp;rarr; (or &amp;amp;larr;PREV) button(s), if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the tilte above the map change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, if you were to click the &amp;amp;larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.gif]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed (the track which heads due north):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.gif]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Again, when done cleaning up, be sure to press the &amp;lt;b&amp;gt;SAVE&amp;lt;/b&amp;gt; button to write your changes out to file!&lt;br /&gt;
&amp;lt;li&amp;gt;Take note of the maximum latitude and longitude limits (you'll want them for the plotting portion below), then press 'EXIT'.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to your working folder and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Delete&amp;lt;/b&amp;gt; the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt;  [you made a copy of it already as &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Rename&amp;lt;/b&amp;gt; the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file (output of the clean_up_drifter_data.m script), to &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt; (so it's read in next step).&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;li&amp;gt;The format of the &amp;quot;MOD&amp;quot; file which this script output (different than the &amp;quot;ORIG&amp;quot; one fetched) is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of &amp;lt;b&amp;gt;process_drifter_data.m&amp;lt;/b&amp;gt; to set these as appropriate:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%SET **ONE** OF THESE!&lt;br /&gt;
%THIS WILL DETERMINE WHICH BATHY DATASET GETS LOADED!&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work (SBCIS or SBCSS)&lt;br /&gt;
SBC_FULL = 1; %all of Santa Barbara Channel for Large Scale Deployments (SBCLS, SCROF or SBNS or MSD)&lt;br /&gt;
UCSD = 0; %San Diego Imperial Beach (SDSS or TJROF)&lt;br /&gt;
HBDP = 0; %Huntington Beach (HB) or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River (SAROF)&lt;br /&gt;
SF = 0; %San Francisco (SF)&lt;br /&gt;
EFS = 0; %Eastern Florida Shelf (EFS)&lt;br /&gt;
&lt;br /&gt;
%if this is true, then doesn't matter what areas above are set, or GEODAS setting below. set to 1 for areas w/o bathy (e.g. PHILEX) &lt;br /&gt;
% data. will skip along/across shore, dz/dt and depth calculations.&lt;br /&gt;
SKIP_ALONG_ACROSS = true &lt;br /&gt;
TEN_MIN_ROUNDING = true % before doing calculations, first round drifter times to 10 minute steps (will have &amp;quot;_TEN_MIN_&amp;quot; in filename)&lt;br /&gt;
SMOOTH_DATA = false; % run smooth.m (2 point running mean or average) on the u and v velocities (and only these, i.e. not lat/lon) to reduce noise (usually NOT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;process_drifter_data.m&amp;lt;/b&amp;gt; to process all drifters from a single deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifternum&amp;lt;/i&amp;gt;_summary.log' files (or '&amp;lt;i&amp;gt;yyyymmdd_drifternum&amp;lt;/i&amp;gt;_TEN_MIN_summary.log' if TEN_MIN_ROUNDING is set) with this format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Iridium drifters will still have this format, but columns 17-21 will be filled with NaNs.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;IMPORTANT!: See [[#IMPORTANT_NOTE_ABOUT_IMAGEMAGICK|ImageMagick]] note below!&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;deployment_settings.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy/paste an 'elseif' block from an existing one:&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
elseif strcmp(folder,'20050307')&lt;br /&gt;
   z_rate = [-0.2 0.2];&lt;br /&gt;
   max_z = -65;&lt;br /&gt;
   lon_lim = [-117.4 -117.06666];&lt;br /&gt;
   lat_lim = [32.4 32.7];&lt;br /&gt;
   vel_rate = [-60 60];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
     &amp;lt;li&amp;gt;Note that I try to keep these grouped by project&lt;br /&gt;
     &amp;lt;li&amp;gt;Edit the first line of the elseif to the date of the deployment&lt;br /&gt;
     &amp;lt;li&amp;gt;Try to capture the lat/lon limits, or use what you noted from the clean_up section above&lt;br /&gt;
     &amp;lt;li&amp;gt;We'll get to the others in a sec &lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;pathname&amp;lt;/b&amp;gt; to your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;do_all&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_summaries&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt;, and &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt;.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set any other values in the &amp;quot;USER SETTINGS&amp;quot; section if needed, but not usually.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;&lt;br /&gt;
   &amp;lt;ul&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;There are now 5 summary plots and one &amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;_all.png plot in your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Use what you see to tweak the values on the &amp;lt;i&amp;gt;deployment_settings.m&amp;lt;i&amp;gt; file (note: if you didn't use bathy in the processing, it doesn't matter what the &amp;lt;i&amp;gt;z_rate&amp;lt;/i&amp;gt; or &amp;lt;i&amp;gt;max_z&amp;lt;/i&amp;gt; are set to)&lt;br /&gt;
      &amp;lt;li&amp;gt;When all looks good, you'll want to eventually set the &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; to make those plots.&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate &amp;quot;stats.php&amp;quot; pages (e.g. start/stop times, average speeds, average depth, number of drifters, etc.) for each deployment in a project [optional-ish]&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;make_stats_page.m&amp;lt;/b&amp;gt; and select the project folder (e.g. SBCLS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Website Setup&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Copy the files so the website shows them, and other web maintenance.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SBCLS) on the website, which is found at &amp;lt;b&amp;gt;/home/kirk/public_html/drifter/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt;Copy all the &amp;lt;i&amp;gt;*_summary.log&amp;lt;/i&amp;gt; files to the appropriate deployment type subfolder inside .../kirk/dataDrifter_Anal/2_data/AllData/&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'Compress'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to inside /home/kirk/public_html/drifter/data/data/.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update /home/kirk/public_html/drifter/mod_date.txt with today's date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check that the [http://drifterdata.com webpage] looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;IMPORTANT NOTE ABOUT IMAGEMAGICK&amp;lt;/h2&amp;gt;&lt;br /&gt;
In order for the plotting codes to work, you must have [http://www.imagemagick.org/script/index.php ImageMagick] (a free suite of powerful software for image manipulation from the command line) installed.&amp;lt;br&amp;gt;&lt;br /&gt;
Here's instructions on installing on a Mac via MacPorts (since the scripts are currently setup for ImageMagick programs to be in that path):&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Download the [http://www.macports.org/install.php MacPorts*.dmg install file]&lt;br /&gt;
&amp;lt;li&amp;gt;Double-Click on the *.dmg file, then double-click on the MacPorts-xxx.pkg file to launch the Installer.&lt;br /&gt;
&amp;lt;li&amp;gt;Follow the directions (mostly by clicking on 'Continue').&lt;br /&gt;
&amp;lt;li&amp;gt;Download [http://porticus.alittledrop.com/download.html Porticus]&lt;br /&gt;
&amp;lt;li&amp;gt;Double click on the Porticus*.dmg file and drag-drop Porticus to your Applications folder&lt;br /&gt;
&amp;lt;li&amp;gt;Launch Porticus&lt;br /&gt;
&amp;lt;li&amp;gt;On the left side, select 'All Ports'&lt;br /&gt;
&amp;lt;li&amp;gt;On the right side, scroll down to 'ImageMagick' (NOTE: it will be towards the top since packages starting with a capital letter come first)&lt;br /&gt;
&amp;lt;li&amp;gt;Highlight it, then click the 'Install' button.&lt;br /&gt;
&amp;lt;li&amp;gt;All MacPorts stuff gets installed to your /opt/local/ directory, with the programs in /opt/local/bin/.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=Main_Page&amp;diff=59</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=Main_Page&amp;diff=59"/>
		<updated>2009-07-18T00:54:17Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;WELCOME TO LAGRANGIAN OCEAN CURRENTS LAB (LOCL) WIKI!&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Links:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.icess.ucsb.edu/drifter Drifter Homepage]&lt;br /&gt;
&amp;lt;li&amp;gt;[http://wiki.icess.ucsb.edu/locl/index.php/HOWTO_Drifter_Data_Processing Kirk's HOWTO on Drifter Data Processing]&lt;br /&gt;
&amp;lt;li&amp;gt;[http://wiki.icess.ucsb.edu/locl/index.php/CalCOFI_Drifter_Realtime_Webpage_Info CalCOFI Drifter Realtime Webpage Info]&lt;br /&gt;
&amp;lt;li&amp;gt;[http://wiki.icess.ucsb.edu/locl/index.php/PWS_Drifter_Realtime_Webpage_Info PWS Drifter Realtime Webpage Info]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;For Wiki Help See:&amp;lt;/h1&amp;gt;&lt;br /&gt;
Consult the [http://meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Help:Configuration_settings Configuration settings list]&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Help:FAQ MediaWiki FAQ]&lt;br /&gt;
* [http://mail.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=58</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=58"/>
		<updated>2009-07-17T22:41:48Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You need to copy the &amp;lt;b&amp;gt;kirk&amp;lt;/b&amp;gt; folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;li&amp;gt;These instructions should work on PC, Linux or Mac, but are specific to Mac.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and &amp;lt;b&amp;gt;commented out&amp;lt;/b&amp;gt;), then copy these deployment times to the top of the file, and uncomment.  Note: under the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but &amp;lt;b&amp;gt;when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering are sequential and start at 1&amp;lt;/b&amp;gt;.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least at or before start of deployment and a time at or after ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly!&amp;lt;br&amp;gt;&lt;br /&gt;
     If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in &amp;lt;b&amp;gt;..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/b&amp;gt; folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;, and will hereafter called the &amp;lt;b&amp;gt;&amp;quot;working folder&amp;quot;&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to this working folder and make a copy of the &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.gif]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations on map:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;1st column = consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;2nd column = first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;3rd column = time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;4th column = in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around to the different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side -- to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next and then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index number a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment, change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;WARNING!:&amp;lt;/span&amp;gt; when you press the NEXT&amp;amp;rarr; (or &amp;amp;larr;PREV) button(s), if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the tilte above the map change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, if you were to click the &amp;amp;larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.gif]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed (the track which heads due north):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.gif]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Again, when done cleaning up, be sure to press the &amp;lt;b&amp;gt;SAVE&amp;lt;/b&amp;gt; button to write your changes out to file!&lt;br /&gt;
&amp;lt;li&amp;gt;Take note of the maximum latitude and longitude limits (you'll want them for the plotting portion below), then press 'EXIT'.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to your working folder and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Delete&amp;lt;/b&amp;gt; the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt;  [you made a copy of it already as &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Rename&amp;lt;/b&amp;gt; the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file (output of the clean_up_drifter_data.m script), to &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt; (so it's read in next step).&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;li&amp;gt;The format of the &amp;quot;MOD&amp;quot; file which this script output (different than the &amp;quot;ORIG&amp;quot; one fetched) is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of &amp;lt;b&amp;gt;process_drifter_data.m&amp;lt;/b&amp;gt; to set these as appropriate:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%SET **ONE** OF THESE!&lt;br /&gt;
%THIS WILL DETERMINE WHICH BATHY DATASET GETS LOADED!&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work (SBCIS or SBCSS)&lt;br /&gt;
SBC_FULL = 1; %all of Santa Barbara Channel for Large Scale Deployments (SBCLS, SCROF or SBNS or MSD)&lt;br /&gt;
UCSD = 0; %San Diego Imperial Beach (SDSS or TJROF)&lt;br /&gt;
HBDP = 0; %Huntington Beach (HB) or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River (SAROF)&lt;br /&gt;
SF = 0; %San Francisco (SF)&lt;br /&gt;
EFS = 0; %Eastern Florida Shelf (EFS)&lt;br /&gt;
&lt;br /&gt;
%if this is true, then doesn't matter what areas above are set, or GEODAS setting below. set to 1 for areas w/o bathy (e.g. PHILEX) &lt;br /&gt;
% data. will skip along/across shore, dz/dt and depth calculations.&lt;br /&gt;
SKIP_ALONG_ACROSS = true &lt;br /&gt;
TEN_MIN_ROUNDING = true % before doing calculations, first round drifter times to 10 minute steps (will have &amp;quot;_TEN_MIN_&amp;quot; in filename)&lt;br /&gt;
SMOOTH_DATA = false; % run smooth.m (2 point running mean or average) on the u and v velocities (and only these, i.e. not lat/lon) to reduce noise (usually NOT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;process_drifter_data.m&amp;lt;/b&amp;gt; to process all drifters from a single deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifternum&amp;lt;/i&amp;gt;_summary.log' files (or '&amp;lt;i&amp;gt;yyyymmdd_drifternum&amp;lt;/i&amp;gt;_TEN_MIN_summary.log' if TEN_MIN_ROUNDING is set) with this format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Iridium drifters will still have this format, but columns 17-21 will be filled with NaNs.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;IMPORTANT!: See [[#IMPORTANT_NOTE_ABOUT_IMAGEMAGICK|ImageMagick]] note below!&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;deployment_settings.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy/paste an 'elseif' block from an existing one:&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
elseif strcmp(folder,'20050307')&lt;br /&gt;
   z_rate = [-0.2 0.2];&lt;br /&gt;
   max_z = -65;&lt;br /&gt;
   lon_lim = [-117.4 -117.06666];&lt;br /&gt;
   lat_lim = [32.4 32.7];&lt;br /&gt;
   vel_rate = [-60 60];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
     &amp;lt;li&amp;gt;Note that I try to keep these grouped by project&lt;br /&gt;
     &amp;lt;li&amp;gt;Edit the first line of the elseif to the date of the deployment&lt;br /&gt;
     &amp;lt;li&amp;gt;Try to capture the lat/lon limits, or use what you noted from the clean_up section above&lt;br /&gt;
     &amp;lt;li&amp;gt;We'll get to the others in a sec &lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;pathname&amp;lt;/b&amp;gt; to your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;do_all&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_summaries&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt;, and &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt;.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set any other values in the &amp;quot;USER SETTINGS&amp;quot; section if needed, but not usually.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;&lt;br /&gt;
   &amp;lt;ul&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;There are now 5 summary plots and one &amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;_all.png plot in your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Use what you see to tweak the values on the &amp;lt;i&amp;gt;deployment_settings.m&amp;lt;i&amp;gt; file (note: if you didn't use bathy in the processing, it doesn't matter what the &amp;lt;i&amp;gt;z_rate&amp;lt;/i&amp;gt; or &amp;lt;i&amp;gt;max_z&amp;lt;/i&amp;gt; are set to)&lt;br /&gt;
      &amp;lt;li&amp;gt;When all looks good, you'll want to eventually set the &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; to make those plots.&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate &amp;quot;stats.php&amp;quot; pages (e.g. start/stop times, average speeds, average depth, number of drifters, etc.) for each deployment in a project [optional-ish]&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;make_stats_page.m&amp;lt;/b&amp;gt; and select the project folder (e.g. SBCLS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Website Setup&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Copy the files so the website shows them, and other web maintenance.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SBCLS) on the website, which is found at &amp;lt;b&amp;gt;/home/kirk/public_html/drifter/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt;Copy all the &amp;lt;i&amp;gt;*_summary.log&amp;lt;/i&amp;gt; files to the appropriate deployment type subfolder inside .../kirk/dataDrifter_Anal/2_data/AllData/&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'Compress'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to inside /home/kirk/public_html/drifter/data/data/.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update /home/kirk/public_html/drifter/mod_date.txt with today's date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check that the [http://drifterdata.com webpage] looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;IMPORTANT NOTE ABOUT IMAGEMAGICK&amp;lt;/h2&amp;gt;&lt;br /&gt;
In order for the plotting codes to work, you must have [http://www.imagemagick.org/script/index.php ImageMagick] (a free suite of powerful software for image manipulation from the command line) installed.&amp;lt;br&amp;gt;&lt;br /&gt;
Here's instructions on installing on a Mac via MacPorts (since the scripts are currently setup for ImageMagick programs to be in that path):&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Download the [http://www.macports.org/install.php MacPorts*.dmg install file]&lt;br /&gt;
&amp;lt;li&amp;gt;Double-Click on the *.dmg file, then double-click on the MacPorts-xxx.pkg file to launch the Installer.&lt;br /&gt;
&amp;lt;li&amp;gt;Follow the directions (mostly by clicking on 'Continue').&lt;br /&gt;
&amp;lt;li&amp;gt;Download [http://porticus.alittledrop.com/download.html Porticus]&lt;br /&gt;
&amp;lt;li&amp;gt;Double click on the Porticus*.dmg file and drag-drop Porticus to your Applications folder&lt;br /&gt;
&amp;lt;li&amp;gt;Launch Porticus&lt;br /&gt;
&amp;lt;li&amp;gt;On the left side, select 'All Ports'&lt;br /&gt;
&amp;lt;li&amp;gt;On the right side, scroll down to 'ImageMagick' (NOTE: it will be towards the top since packages starting with a capital letter come first)&lt;br /&gt;
&amp;lt;li&amp;gt;Highlight it, then click the 'Install' button.&lt;br /&gt;
&amp;lt;li&amp;gt;All MacPorts stuff gets installed to your /opt/local/ directory, with the programs in /opt/local/bin/.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=57</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=57"/>
		<updated>2009-07-17T22:27:32Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You need to copy the &amp;lt;b&amp;gt;kirk&amp;lt;/b&amp;gt; folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;li&amp;gt;These instructions should work on PC, Linux or Mac, but are specific to Mac.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and &amp;lt;b&amp;gt;commented out&amp;lt;/b&amp;gt;), then copy these deployment times to the top of the file, and uncomment.  Note: under the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but &amp;lt;b&amp;gt;when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering are sequential and start at 1&amp;lt;/b&amp;gt;.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least at or before start of deployment and a time at or after ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly!&amp;lt;br&amp;gt;&lt;br /&gt;
     If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in &amp;lt;b&amp;gt;..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/b&amp;gt; folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;, and will hereafter called the &amp;lt;b&amp;gt;&amp;quot;working folder&amp;quot;&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to this working folder and make a copy of the &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.gif]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations on map:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;1st column = consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;2nd column = first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;3rd column = time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;4th column = in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around to the different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side -- to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next and then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index number a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment, change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;WARNING!:&amp;lt;/span&amp;gt; when you press the NEXT&amp;amp;rarr; (or &amp;amp;larr;PREV) button(s), if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the tilte above the map change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, if you were to click the &amp;amp;larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.gif]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed (the track which heads due north):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.gif]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Again, when done cleaning up, be sure to press the &amp;lt;b&amp;gt;SAVE&amp;lt;/b&amp;gt; button to write your changes out to file!&lt;br /&gt;
&amp;lt;li&amp;gt;Take note of the maximum latitude and longitude limits (you'll want them for the plotting portion below), then press 'EXIT'.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to your working folder and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Delete&amp;lt;/b&amp;gt; the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt;  [you made a copy of it already as &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Rename&amp;lt;/b&amp;gt; the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file (output of the clean_up_drifter_data.m script), to &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt; (so it's read in next step).&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;li&amp;gt;The format of the &amp;quot;MOD&amp;quot; file which this script output (different than the &amp;quot;ORIG&amp;quot; one fetched) is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of &amp;lt;b&amp;gt;process_drifter_data.m&amp;lt;/b&amp;gt; to set these as appropriate:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%SET **ONE** OF THESE!&lt;br /&gt;
%THIS WILL DETERMINE WHICH BATHY DATASET GETS LOADED!&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work (SBCIS or SBCSS)&lt;br /&gt;
SBC_FULL = 1; %all of Santa Barbara Channel for Large Scale Deployments (SBCLS, SCROF or SBNS or MSD)&lt;br /&gt;
UCSD = 0; %San Diego Imperial Beach (SDSS or TJROF)&lt;br /&gt;
HBDP = 0; %Huntington Beach (HB) or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River (SAROF)&lt;br /&gt;
SF = 0; %San Francisco (SF)&lt;br /&gt;
EFS = 0; %Eastern Florida Shelf (EFS)&lt;br /&gt;
&lt;br /&gt;
%if this is true, then doesn't matter what areas above are set, or GEODAS setting below. set to 1 for areas w/o bathy (e.g. PHILEX) &lt;br /&gt;
% data. will skip along/across shore, dz/dt and depth calculations.&lt;br /&gt;
SKIP_ALONG_ACROSS = true &lt;br /&gt;
TEN_MIN_ROUNDING = true % before doing calculations, first round drifter times to 10 minute steps (will have &amp;quot;_TEN_MIN_&amp;quot; in filename)&lt;br /&gt;
SMOOTH_DATA = false; % run smooth.m (2 point running mean or average) on the u and v velocities (and only these, i.e. not lat/lon) to reduce noise (usually NOT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;process_drifter_data.m&amp;lt;/b&amp;gt; to process all drifters from a single deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifternum&amp;lt;/i&amp;gt;_summary.log' files (or '&amp;lt;i&amp;gt;yyyymmdd_drifternum&amp;lt;/i&amp;gt;_TEN_MIN_summary.log' if TEN_MIN_ROUNDING is set) with this format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Iridium drifters will still have this format, but columns 17-21 will be filled with NaNs.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;IMPORTANT!: See [[#IMPORTANT_NOTE_ABOUT_IMAGEMAGICK|ImageMagick]] note below!&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;deployment_settings.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy/paste an 'elseif' block from an existing one:&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
elseif strcmp(folder,'20050307')&lt;br /&gt;
   z_rate = [-0.2 0.2];&lt;br /&gt;
   max_z = -65;&lt;br /&gt;
   lon_lim = [-117.4 -117.06666];&lt;br /&gt;
   lat_lim = [32.4 32.7];&lt;br /&gt;
   vel_rate = [-60 60];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
     &amp;lt;li&amp;gt;Note that I try to keep these grouped by project&lt;br /&gt;
     &amp;lt;li&amp;gt;Edit the first line of the elseif to the date of the deployment&lt;br /&gt;
     &amp;lt;li&amp;gt;Try to capture the lat/lon limits, or use what you noted from the clean_up section above&lt;br /&gt;
     &amp;lt;li&amp;gt;We'll get to the others in a sec &lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;pathname&amp;lt;/b&amp;gt; to your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;do_all&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_summaries&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt;, and &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt;.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set any other values in the &amp;quot;USER SETTINGS&amp;quot; section if needed, but not usually.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;&lt;br /&gt;
   &amp;lt;ul&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;There are now 5 summary plots and one &amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;_all.png plot in your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Use what you see to tweak the values on the &amp;lt;i&amp;gt;deployment_settings.m&amp;lt;i&amp;gt; file (note: if you didn't use bathy in the processing, it doesn't matter what the &amp;lt;i&amp;gt;z_rate&amp;lt;/i&amp;gt; or &amp;lt;i&amp;gt;max_z&amp;lt;/i&amp;gt; are set to)&lt;br /&gt;
      &amp;lt;li&amp;gt;When all looks good, you'll want to eventually set the &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; to make those plots.&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate &amp;quot;stats.php&amp;quot; pages (e.g. start/stop times, average speeds, average depth, number of drifters, etc.) for each deployment in a project [optional-ish]&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;make_stats_page.m&amp;lt;/b&amp;gt; and select the project folder (e.g. SBCLS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Website Setup&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Copy the files so the website shows them, and other web maintenance.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SBCLS) on the website, which is found at &amp;lt;b&amp;gt;/home/kirk/public_html/drifter/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt;Copy all the &amp;lt;i&amp;gt;*_summary.log&amp;lt;/i&amp;gt; files to the appropriate deployment type subfolder inside .../kirk/dataDrifter_Anal/2_data/AllData/&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'Compress'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to inside /home/kirk/public_html/drifter/data/data/.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update /home/kirk/public_html/drifter/mod_date.txt with today's date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check that the [http://drifterdata.com webpage] looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;IMPORTANT NOTE ABOUT IMAGEMAGICK&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=56</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=56"/>
		<updated>2009-07-17T22:26:30Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You need to copy the &amp;lt;b&amp;gt;kirk&amp;lt;/b&amp;gt; folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;li&amp;gt;These instructions should work on PC, Linux or Mac, but are specific to Mac.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and &amp;lt;b&amp;gt;commented out&amp;lt;/b&amp;gt;), then copy these deployment times to the top of the file, and uncomment.  Note: under the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but &amp;lt;b&amp;gt;when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering are sequential and start at 1&amp;lt;/b&amp;gt;.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least at or before start of deployment and a time at or after ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly!&amp;lt;br&amp;gt;&lt;br /&gt;
     If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in &amp;lt;b&amp;gt;..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/b&amp;gt; folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;, and will hereafter called the &amp;lt;b&amp;gt;&amp;quot;working folder&amp;quot;&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to this working folder and make a copy of the &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.gif]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations on map:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;1st column = consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;2nd column = first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;3rd column = time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;4th column = in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around to the different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side -- to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next and then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index number a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment, change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;WARNING!:&amp;lt;/span&amp;gt; when you press the NEXT&amp;amp;rarr; (or &amp;amp;larr;PREV) button(s), if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the tilte above the map change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, if you were to click the &amp;amp;larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.gif]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed (the track which heads due north):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.gif]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Again, when done cleaning up, be sure to press the &amp;lt;b&amp;gt;SAVE&amp;lt;/b&amp;gt; button to write your changes out to file!&lt;br /&gt;
&amp;lt;li&amp;gt;Take note of the maximum latitude and longitude limits (you'll want them for the plotting portion below), then press 'EXIT'.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to your working folder and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Delete&amp;lt;/b&amp;gt; the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt;  [you made a copy of it already as &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Rename&amp;lt;/b&amp;gt; the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file (output of the clean_up_drifter_data.m script), to &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt; (so it's read in next step).&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;li&amp;gt;The format of the &amp;quot;MOD&amp;quot; file which this script output (different than the &amp;quot;ORIG&amp;quot; one fetched) is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of &amp;lt;b&amp;gt;process_drifter_data.m&amp;lt;/b&amp;gt; to set these as appropriate:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%SET **ONE** OF THESE!&lt;br /&gt;
%THIS WILL DETERMINE WHICH BATHY DATASET GETS LOADED!&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work (SBCIS or SBCSS)&lt;br /&gt;
SBC_FULL = 1; %all of Santa Barbara Channel for Large Scale Deployments (SBCLS, SCROF or SBNS or MSD)&lt;br /&gt;
UCSD = 0; %San Diego Imperial Beach (SDSS or TJROF)&lt;br /&gt;
HBDP = 0; %Huntington Beach (HB) or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River (SAROF)&lt;br /&gt;
SF = 0; %San Francisco (SF)&lt;br /&gt;
EFS = 0; %Eastern Florida Shelf (EFS)&lt;br /&gt;
&lt;br /&gt;
%if this is true, then doesn't matter what areas above are set, or GEODAS setting below. set to 1 for areas w/o bathy (e.g. PHILEX) &lt;br /&gt;
% data. will skip along/across shore, dz/dt and depth calculations.&lt;br /&gt;
SKIP_ALONG_ACROSS = true &lt;br /&gt;
TEN_MIN_ROUNDING = true % before doing calculations, first round drifter times to 10 minute steps (will have &amp;quot;_TEN_MIN_&amp;quot; in filename)&lt;br /&gt;
SMOOTH_DATA = false; % run smooth.m (2 point running mean or average) on the u and v velocities (and only these, i.e. not lat/lon) to reduce noise (usually NOT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;process_drifter_data.m&amp;lt;/b&amp;gt; to process all drifters from a single deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifternum&amp;lt;/i&amp;gt;_summary.log' files (or '&amp;lt;i&amp;gt;yyyymmdd_drifternum&amp;lt;/i&amp;gt;_TEN_MIN_summary.log' if TEN_MIN_ROUNDING is set) with this format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Iridium drifters will still have this format, but columns 17-21 will be filled with NaNs.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;IMPORTANT!: See [[#IMPORTANT_NOTE_ABOUT_IMAGEMAGICK ImageMagick]] note below!&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;deployment_settings.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy/paste an 'elseif' block from an existing one:&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
elseif strcmp(folder,'20050307')&lt;br /&gt;
   z_rate = [-0.2 0.2];&lt;br /&gt;
   max_z = -65;&lt;br /&gt;
   lon_lim = [-117.4 -117.06666];&lt;br /&gt;
   lat_lim = [32.4 32.7];&lt;br /&gt;
   vel_rate = [-60 60];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
     &amp;lt;li&amp;gt;Note that I try to keep these grouped by project&lt;br /&gt;
     &amp;lt;li&amp;gt;Edit the first line of the elseif to the date of the deployment&lt;br /&gt;
     &amp;lt;li&amp;gt;Try to capture the lat/lon limits, or use what you noted from the clean_up section above&lt;br /&gt;
     &amp;lt;li&amp;gt;We'll get to the others in a sec &lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;pathname&amp;lt;/b&amp;gt; to your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;do_all&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_summaries&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt;, and &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt;.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set any other values in the &amp;quot;USER SETTINGS&amp;quot; section if needed, but not usually.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;&lt;br /&gt;
   &amp;lt;ul&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;There are now 5 summary plots and one &amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;_all.png plot in your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Use what you see to tweak the values on the &amp;lt;i&amp;gt;deployment_settings.m&amp;lt;i&amp;gt; file (note: if you didn't use bathy in the processing, it doesn't matter what the &amp;lt;i&amp;gt;z_rate&amp;lt;/i&amp;gt; or &amp;lt;i&amp;gt;max_z&amp;lt;/i&amp;gt; are set to)&lt;br /&gt;
      &amp;lt;li&amp;gt;When all looks good, you'll want to eventually set the &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; to make those plots.&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate &amp;quot;stats.php&amp;quot; pages (e.g. start/stop times, average speeds, average depth, number of drifters, etc.) for each deployment in a project [optional-ish]&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;make_stats_page.m&amp;lt;/b&amp;gt; and select the project folder (e.g. SBCLS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Website Setup&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Copy the files so the website shows them, and other web maintenance.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SBCLS) on the website, which is found at &amp;lt;b&amp;gt;/home/kirk/public_html/drifter/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt;Copy all the &amp;lt;i&amp;gt;*_summary.log&amp;lt;/i&amp;gt; files to the appropriate deployment type subfolder inside .../kirk/dataDrifter_Anal/2_data/AllData/&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'Compress'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to inside /home/kirk/public_html/drifter/data/data/.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update /home/kirk/public_html/drifter/mod_date.txt with today's date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check that the [http://drifterdata.com webpage] looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;IMPORTANT NOTE ABOUT IMAGEMAGICK&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=55</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=55"/>
		<updated>2009-07-17T22:23:20Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You need to copy the &amp;lt;b&amp;gt;kirk&amp;lt;/b&amp;gt; folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;li&amp;gt;These instructions should work on PC, Linux or Mac, but are specific to Mac.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and &amp;lt;b&amp;gt;commented out&amp;lt;/b&amp;gt;), then copy these deployment times to the top of the file, and uncomment.  Note: under the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but &amp;lt;b&amp;gt;when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering are sequential and start at 1&amp;lt;/b&amp;gt;.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least at or before start of deployment and a time at or after ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly!&amp;lt;br&amp;gt;&lt;br /&gt;
     If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in &amp;lt;b&amp;gt;..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/b&amp;gt; folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;, and will hereafter called the &amp;lt;b&amp;gt;&amp;quot;working folder&amp;quot;&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to this working folder and make a copy of the &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.gif]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations on map:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;1st column = consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;2nd column = first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;3rd column = time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;4th column = in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around to the different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side -- to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next and then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index number a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment, change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;WARNING!:&amp;lt;/span&amp;gt; when you press the NEXT&amp;amp;rarr; (or &amp;amp;larr;PREV) button(s), if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the tilte above the map change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, if you were to click the &amp;amp;larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.gif]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed (the track which heads due north):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.gif]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Again, when done cleaning up, be sure to press the &amp;lt;b&amp;gt;SAVE&amp;lt;/b&amp;gt; button to write your changes out to file!&lt;br /&gt;
&amp;lt;li&amp;gt;Take note of the maximum latitude and longitude limits (you'll want them for the plotting portion below), then press 'EXIT'.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to your working folder and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Delete&amp;lt;/b&amp;gt; the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt;  [you made a copy of it already as &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Rename&amp;lt;/b&amp;gt; the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file (output of the clean_up_drifter_data.m script), to &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt; (so it's read in next step).&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;li&amp;gt;The format of the &amp;quot;MOD&amp;quot; file which this script output (different than the &amp;quot;ORIG&amp;quot; one fetched) is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of &amp;lt;b&amp;gt;process_drifter_data.m&amp;lt;/b&amp;gt; to set these as appropriate:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%SET **ONE** OF THESE!&lt;br /&gt;
%THIS WILL DETERMINE WHICH BATHY DATASET GETS LOADED!&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work (SBCIS or SBCSS)&lt;br /&gt;
SBC_FULL = 1; %all of Santa Barbara Channel for Large Scale Deployments (SBCLS, SCROF or SBNS or MSD)&lt;br /&gt;
UCSD = 0; %San Diego Imperial Beach (SDSS or TJROF)&lt;br /&gt;
HBDP = 0; %Huntington Beach (HB) or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River (SAROF)&lt;br /&gt;
SF = 0; %San Francisco (SF)&lt;br /&gt;
EFS = 0; %Eastern Florida Shelf (EFS)&lt;br /&gt;
&lt;br /&gt;
%if this is true, then doesn't matter what areas above are set, or GEODAS setting below. set to 1 for areas w/o bathy (e.g. PHILEX) &lt;br /&gt;
% data. will skip along/across shore, dz/dt and depth calculations.&lt;br /&gt;
SKIP_ALONG_ACROSS = true &lt;br /&gt;
TEN_MIN_ROUNDING = true % before doing calculations, first round drifter times to 10 minute steps (will have &amp;quot;_TEN_MIN_&amp;quot; in filename)&lt;br /&gt;
SMOOTH_DATA = false; % run smooth.m (2 point running mean or average) on the u and v velocities (and only these, i.e. not lat/lon) to reduce noise (usually NOT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;process_drifter_data.m&amp;lt;/b&amp;gt; to process all drifters from a single deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifternum&amp;lt;/i&amp;gt;_summary.log' files (or '&amp;lt;i&amp;gt;yyyymmdd_drifternum&amp;lt;/i&amp;gt;_TEN_MIN_summary.log' if TEN_MIN_ROUNDING is set) with this format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Iridium drifters will still have this format, but columns 17-21 will be filled with NaNs.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;IMPORTANT!: See [http://#IMPORTANT_NOTE_ABOUT_IMAGEMAGICK ImageMagick] note below!&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;deployment_settings.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy/paste an 'elseif' block from an existing one:&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
elseif strcmp(folder,'20050307')&lt;br /&gt;
   z_rate = [-0.2 0.2];&lt;br /&gt;
   max_z = -65;&lt;br /&gt;
   lon_lim = [-117.4 -117.06666];&lt;br /&gt;
   lat_lim = [32.4 32.7];&lt;br /&gt;
   vel_rate = [-60 60];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
     &amp;lt;li&amp;gt;Note that I try to keep these grouped by project&lt;br /&gt;
     &amp;lt;li&amp;gt;Edit the first line of the elseif to the date of the deployment&lt;br /&gt;
     &amp;lt;li&amp;gt;Try to capture the lat/lon limits, or use what you noted from the clean_up section above&lt;br /&gt;
     &amp;lt;li&amp;gt;We'll get to the others in a sec &lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;pathname&amp;lt;/b&amp;gt; to your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;do_all&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_summaries&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt;, and &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt;.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set any other values in the &amp;quot;USER SETTINGS&amp;quot; section if needed, but not usually.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;&lt;br /&gt;
   &amp;lt;ul&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;There are now 5 summary plots and one &amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;_all.png plot in your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Use what you see to tweak the values on the &amp;lt;i&amp;gt;deployment_settings.m&amp;lt;i&amp;gt; file (note: if you didn't use bathy in the processing, it doesn't matter what the &amp;lt;i&amp;gt;z_rate&amp;lt;/i&amp;gt; or &amp;lt;i&amp;gt;max_z&amp;lt;/i&amp;gt; are set to)&lt;br /&gt;
      &amp;lt;li&amp;gt;When all looks good, you'll want to eventually set the &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; to make those plots.&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate &amp;quot;stats.php&amp;quot; pages (e.g. start/stop times, average speeds, average depth, number of drifters, etc.) for each deployment in a project [optional-ish]&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;make_stats_page.m&amp;lt;/b&amp;gt; and select the project folder (e.g. SBCLS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Website Setup&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Copy the files so the website shows them, and other web maintenance.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SBCLS) on the website, which is found at &amp;lt;b&amp;gt;/home/kirk/public_html/drifter/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt;Copy all the &amp;lt;i&amp;gt;*_summary.log&amp;lt;/i&amp;gt; files to the appropriate deployment type subfolder inside .../kirk/dataDrifter_Anal/2_data/AllData/&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'Compress'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to inside /home/kirk/public_html/drifter/data/data/.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update /home/kirk/public_html/drifter/mod_date.txt with today's date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check that the [http://drifterdata.com webpage] looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;IMPORTANT NOTE ABOUT IMAGEMAGICK&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=54</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=54"/>
		<updated>2009-07-17T22:22:43Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You need to copy the &amp;lt;b&amp;gt;kirk&amp;lt;/b&amp;gt; folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;li&amp;gt;These instructions should work on PC, Linux or Mac, but are specific to Mac.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and &amp;lt;b&amp;gt;commented out&amp;lt;/b&amp;gt;), then copy these deployment times to the top of the file, and uncomment.  Note: under the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but &amp;lt;b&amp;gt;when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering are sequential and start at 1&amp;lt;/b&amp;gt;.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least at or before start of deployment and a time at or after ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly!&amp;lt;br&amp;gt;&lt;br /&gt;
     If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in &amp;lt;b&amp;gt;..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/b&amp;gt; folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;, and will hereafter called the &amp;lt;b&amp;gt;&amp;quot;working folder&amp;quot;&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to this working folder and make a copy of the &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.gif]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations on map:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;1st column = consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;2nd column = first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;3rd column = time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;4th column = in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around to the different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side -- to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next and then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index number a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment, change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;WARNING!:&amp;lt;/span&amp;gt; when you press the NEXT&amp;amp;rarr; (or &amp;amp;larr;PREV) button(s), if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the tilte above the map change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, if you were to click the &amp;amp;larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.gif]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed (the track which heads due north):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.gif]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Again, when done cleaning up, be sure to press the &amp;lt;b&amp;gt;SAVE&amp;lt;/b&amp;gt; button to write your changes out to file!&lt;br /&gt;
&amp;lt;li&amp;gt;Take note of the maximum latitude and longitude limits (you'll want them for the plotting portion below), then press 'EXIT'.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to your working folder and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Delete&amp;lt;/b&amp;gt; the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt;  [you made a copy of it already as &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Rename&amp;lt;/b&amp;gt; the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file (output of the clean_up_drifter_data.m script), to &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt; (so it's read in next step).&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;li&amp;gt;The format of the &amp;quot;MOD&amp;quot; file which this script output (different than the &amp;quot;ORIG&amp;quot; one fetched) is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of &amp;lt;b&amp;gt;process_drifter_data.m&amp;lt;/b&amp;gt; to set these as appropriate:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%SET **ONE** OF THESE!&lt;br /&gt;
%THIS WILL DETERMINE WHICH BATHY DATASET GETS LOADED!&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work (SBCIS or SBCSS)&lt;br /&gt;
SBC_FULL = 1; %all of Santa Barbara Channel for Large Scale Deployments (SBCLS, SCROF or SBNS or MSD)&lt;br /&gt;
UCSD = 0; %San Diego Imperial Beach (SDSS or TJROF)&lt;br /&gt;
HBDP = 0; %Huntington Beach (HB) or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River (SAROF)&lt;br /&gt;
SF = 0; %San Francisco (SF)&lt;br /&gt;
EFS = 0; %Eastern Florida Shelf (EFS)&lt;br /&gt;
&lt;br /&gt;
%if this is true, then doesn't matter what areas above are set, or GEODAS setting below. set to 1 for areas w/o bathy (e.g. PHILEX) &lt;br /&gt;
% data. will skip along/across shore, dz/dt and depth calculations.&lt;br /&gt;
SKIP_ALONG_ACROSS = true &lt;br /&gt;
TEN_MIN_ROUNDING = true % before doing calculations, first round drifter times to 10 minute steps (will have &amp;quot;_TEN_MIN_&amp;quot; in filename)&lt;br /&gt;
SMOOTH_DATA = false; % run smooth.m (2 point running mean or average) on the u and v velocities (and only these, i.e. not lat/lon) to reduce noise (usually NOT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;process_drifter_data.m&amp;lt;/b&amp;gt; to process all drifters from a single deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifternum&amp;lt;/i&amp;gt;_summary.log' files (or '&amp;lt;i&amp;gt;yyyymmdd_drifternum&amp;lt;/i&amp;gt;_TEN_MIN_summary.log' if TEN_MIN_ROUNDING is set) with this format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Iridium drifters will still have this format, but columns 17-21 will be filled with NaNs.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;IMPORTANT!: See [#IMPORTANT_NOTE_ABOUT_IMAGEMAGICK ImageMagick] note below!&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;deployment_settings.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy/paste an 'elseif' block from an existing one:&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
elseif strcmp(folder,'20050307')&lt;br /&gt;
   z_rate = [-0.2 0.2];&lt;br /&gt;
   max_z = -65;&lt;br /&gt;
   lon_lim = [-117.4 -117.06666];&lt;br /&gt;
   lat_lim = [32.4 32.7];&lt;br /&gt;
   vel_rate = [-60 60];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
     &amp;lt;li&amp;gt;Note that I try to keep these grouped by project&lt;br /&gt;
     &amp;lt;li&amp;gt;Edit the first line of the elseif to the date of the deployment&lt;br /&gt;
     &amp;lt;li&amp;gt;Try to capture the lat/lon limits, or use what you noted from the clean_up section above&lt;br /&gt;
     &amp;lt;li&amp;gt;We'll get to the others in a sec &lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;pathname&amp;lt;/b&amp;gt; to your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;do_all&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_summaries&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt;, and &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt;.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set any other values in the &amp;quot;USER SETTINGS&amp;quot; section if needed, but not usually.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;&lt;br /&gt;
   &amp;lt;ul&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;There are now 5 summary plots and one &amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;_all.png plot in your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Use what you see to tweak the values on the &amp;lt;i&amp;gt;deployment_settings.m&amp;lt;i&amp;gt; file (note: if you didn't use bathy in the processing, it doesn't matter what the &amp;lt;i&amp;gt;z_rate&amp;lt;/i&amp;gt; or &amp;lt;i&amp;gt;max_z&amp;lt;/i&amp;gt; are set to)&lt;br /&gt;
      &amp;lt;li&amp;gt;When all looks good, you'll want to eventually set the &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; to make those plots.&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate &amp;quot;stats.php&amp;quot; pages (e.g. start/stop times, average speeds, average depth, number of drifters, etc.) for each deployment in a project [optional-ish]&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;make_stats_page.m&amp;lt;/b&amp;gt; and select the project folder (e.g. SBCLS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Website Setup&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Copy the files so the website shows them, and other web maintenance.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SBCLS) on the website, which is found at &amp;lt;b&amp;gt;/home/kirk/public_html/drifter/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt;Copy all the &amp;lt;i&amp;gt;*_summary.log&amp;lt;/i&amp;gt; files to the appropriate deployment type subfolder inside .../kirk/dataDrifter_Anal/2_data/AllData/&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'Compress'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to inside /home/kirk/public_html/drifter/data/data/.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update /home/kirk/public_html/drifter/mod_date.txt with today's date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check that the [http://drifterdata.com webpage] looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;IMPORTANT NOTE ABOUT IMAGEMAGICK&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=53</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=53"/>
		<updated>2009-07-17T22:21:44Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You need to copy the &amp;lt;b&amp;gt;kirk&amp;lt;/b&amp;gt; folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;li&amp;gt;These instructions should work on PC, Linux or Mac, but are specific to Mac.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and &amp;lt;b&amp;gt;commented out&amp;lt;/b&amp;gt;), then copy these deployment times to the top of the file, and uncomment.  Note: under the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but &amp;lt;b&amp;gt;when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering are sequential and start at 1&amp;lt;/b&amp;gt;.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least at or before start of deployment and a time at or after ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly!&amp;lt;br&amp;gt;&lt;br /&gt;
     If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in &amp;lt;b&amp;gt;..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/b&amp;gt; folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;, and will hereafter called the &amp;lt;b&amp;gt;&amp;quot;working folder&amp;quot;&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to this working folder and make a copy of the &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.gif]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations on map:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;1st column = consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;2nd column = first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;3rd column = time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;4th column = in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around to the different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side -- to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next and then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index number a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment, change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;WARNING!:&amp;lt;/span&amp;gt; when you press the NEXT&amp;amp;rarr; (or &amp;amp;larr;PREV) button(s), if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the tilte above the map change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, if you were to click the &amp;amp;larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.gif]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed (the track which heads due north):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.gif]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Again, when done cleaning up, be sure to press the &amp;lt;b&amp;gt;SAVE&amp;lt;/b&amp;gt; button to write your changes out to file!&lt;br /&gt;
&amp;lt;li&amp;gt;Take note of the maximum latitude and longitude limits (you'll want them for the plotting portion below), then press 'EXIT'.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to your working folder and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Delete&amp;lt;/b&amp;gt; the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt;  [you made a copy of it already as &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Rename&amp;lt;/b&amp;gt; the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file (output of the clean_up_drifter_data.m script), to &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt; (so it's read in next step).&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;li&amp;gt;The format of the &amp;quot;MOD&amp;quot; file which this script output (different than the &amp;quot;ORIG&amp;quot; one fetched) is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of &amp;lt;b&amp;gt;process_drifter_data.m&amp;lt;/b&amp;gt; to set these as appropriate:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%SET **ONE** OF THESE!&lt;br /&gt;
%THIS WILL DETERMINE WHICH BATHY DATASET GETS LOADED!&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work (SBCIS or SBCSS)&lt;br /&gt;
SBC_FULL = 1; %all of Santa Barbara Channel for Large Scale Deployments (SBCLS, SCROF or SBNS or MSD)&lt;br /&gt;
UCSD = 0; %San Diego Imperial Beach (SDSS or TJROF)&lt;br /&gt;
HBDP = 0; %Huntington Beach (HB) or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River (SAROF)&lt;br /&gt;
SF = 0; %San Francisco (SF)&lt;br /&gt;
EFS = 0; %Eastern Florida Shelf (EFS)&lt;br /&gt;
&lt;br /&gt;
%if this is true, then doesn't matter what areas above are set, or GEODAS setting below. set to 1 for areas w/o bathy (e.g. PHILEX) &lt;br /&gt;
% data. will skip along/across shore, dz/dt and depth calculations.&lt;br /&gt;
SKIP_ALONG_ACROSS = true &lt;br /&gt;
TEN_MIN_ROUNDING = true % before doing calculations, first round drifter times to 10 minute steps (will have &amp;quot;_TEN_MIN_&amp;quot; in filename)&lt;br /&gt;
SMOOTH_DATA = false; % run smooth.m (2 point running mean or average) on the u and v velocities (and only these, i.e. not lat/lon) to reduce noise (usually NOT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;process_drifter_data.m&amp;lt;/b&amp;gt; to process all drifters from a single deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifternum&amp;lt;/i&amp;gt;_summary.log' files (or '&amp;lt;i&amp;gt;yyyymmdd_drifternum&amp;lt;/i&amp;gt;_TEN_MIN_summary.log' if TEN_MIN_ROUNDING is set) with this format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Iridium drifters will still have this format, but columns 17-21 will be filled with NaNs.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;IMPORTANT!: See [#IMPORTANT%20NOTE%20ABOUT%20IMAGEMAGICK ImageMagick] note below!&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;deployment_settings.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy/paste an 'elseif' block from an existing one:&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
elseif strcmp(folder,'20050307')&lt;br /&gt;
   z_rate = [-0.2 0.2];&lt;br /&gt;
   max_z = -65;&lt;br /&gt;
   lon_lim = [-117.4 -117.06666];&lt;br /&gt;
   lat_lim = [32.4 32.7];&lt;br /&gt;
   vel_rate = [-60 60];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
     &amp;lt;li&amp;gt;Note that I try to keep these grouped by project&lt;br /&gt;
     &amp;lt;li&amp;gt;Edit the first line of the elseif to the date of the deployment&lt;br /&gt;
     &amp;lt;li&amp;gt;Try to capture the lat/lon limits, or use what you noted from the clean_up section above&lt;br /&gt;
     &amp;lt;li&amp;gt;We'll get to the others in a sec &lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;pathname&amp;lt;/b&amp;gt; to your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;do_all&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_summaries&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt;, and &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt;.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set any other values in the &amp;quot;USER SETTINGS&amp;quot; section if needed, but not usually.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;&lt;br /&gt;
   &amp;lt;ul&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;There are now 5 summary plots and one &amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;_all.png plot in your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Use what you see to tweak the values on the &amp;lt;i&amp;gt;deployment_settings.m&amp;lt;i&amp;gt; file (note: if you didn't use bathy in the processing, it doesn't matter what the &amp;lt;i&amp;gt;z_rate&amp;lt;/i&amp;gt; or &amp;lt;i&amp;gt;max_z&amp;lt;/i&amp;gt; are set to)&lt;br /&gt;
      &amp;lt;li&amp;gt;When all looks good, you'll want to eventually set the &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; to make those plots.&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate &amp;quot;stats.php&amp;quot; pages (e.g. start/stop times, average speeds, average depth, number of drifters, etc.) for each deployment in a project [optional-ish]&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;make_stats_page.m&amp;lt;/b&amp;gt; and select the project folder (e.g. SBCLS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Website Setup&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Copy the files so the website shows them, and other web maintenance.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SBCLS) on the website, which is found at &amp;lt;b&amp;gt;/home/kirk/public_html/drifter/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt;Copy all the &amp;lt;i&amp;gt;*_summary.log&amp;lt;/i&amp;gt; files to the appropriate deployment type subfolder inside .../kirk/dataDrifter_Anal/2_data/AllData/&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'Compress'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to inside /home/kirk/public_html/drifter/data/data/.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update /home/kirk/public_html/drifter/mod_date.txt with today's date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check that the [http://drifterdata.com webpage] looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;IMPORTANT NOTE ABOUT IMAGEMAGICK&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=52</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=52"/>
		<updated>2009-07-17T20:31:16Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the ''kirk'' folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and &amp;lt;b&amp;gt;commented out&amp;lt;/b&amp;gt;), then copy these deployment times to the top of the file, and uncomment.  Note: under the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but &amp;lt;b&amp;gt;when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering are sequential and start at 1&amp;lt;/b&amp;gt;.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least at or before start of deployment and a time at or after ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly!&amp;lt;br&amp;gt;&lt;br /&gt;
     If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in &amp;lt;b&amp;gt;..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/b&amp;gt; folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;, and will hereafter called the &amp;lt;b&amp;gt;&amp;quot;working folder&amp;quot;&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to this working folder and make a copy of the &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.gif]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations on map:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;1st column = consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;2nd column = first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;3rd column = time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;4th column = in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around to the different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side -- to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next and then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index number a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment, change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;WARNING!:&amp;lt;/span&amp;gt; when you press the NEXT&amp;amp;rarr; (or &amp;amp;larr;PREV) button(s), if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the tilte above the map change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, if you were to click the &amp;amp;larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.gif]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed (the track which heads due north):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.gif]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Again, when done cleaning up, be sure to press the &amp;lt;b&amp;gt;SAVE&amp;lt;/b&amp;gt; button to write your changes out to file!&lt;br /&gt;
&amp;lt;li&amp;gt;Take note of the maximum latitude and longitude limits (you'll want them for the plotting portion below), then press 'EXIT'.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to your working folder and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Delete&amp;lt;/b&amp;gt; the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt;  [you made a copy of it already as &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Rename&amp;lt;/b&amp;gt; the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file (output of the clean_up_drifter_data.m script), to &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt; (so it's read in next step).&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;li&amp;gt;The format of the &amp;quot;MOD&amp;quot; file which this script output (different than the &amp;quot;ORIG&amp;quot; one fetched) is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of &amp;lt;b&amp;gt;process_drifter_data.m&amp;lt;/b&amp;gt; to set these as appropriate:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%SET **ONE** OF THESE!&lt;br /&gt;
%THIS WILL DETERMINE WHICH BATHY DATASET GETS LOADED!&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work (SBCIS or SBCSS)&lt;br /&gt;
SBC_FULL = 1; %all of Santa Barbara Channel for Large Scale Deployments (SBCLS, SCROF or SBNS or MSD)&lt;br /&gt;
UCSD = 0; %San Diego Imperial Beach (SDSS or TJROF)&lt;br /&gt;
HBDP = 0; %Huntington Beach (HB) or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River (SAROF)&lt;br /&gt;
SF = 0; %San Francisco (SF)&lt;br /&gt;
EFS = 0; %Eastern Florida Shelf (EFS)&lt;br /&gt;
&lt;br /&gt;
%if this is true, then doesn't matter what areas above are set, or GEODAS setting below. set to 1 for areas w/o bathy (e.g. PHILEX) &lt;br /&gt;
% data. will skip along/across shore, dz/dt and depth calculations.&lt;br /&gt;
SKIP_ALONG_ACROSS = true &lt;br /&gt;
TEN_MIN_ROUNDING = true % before doing calculations, first round drifter times to 10 minute steps (will have &amp;quot;_TEN_MIN_&amp;quot; in filename)&lt;br /&gt;
SMOOTH_DATA = false; % run smooth.m (2 point running mean or average) on the u and v velocities (and only these, i.e. not lat/lon) to reduce noise (usually NOT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;process_drifter_data.m&amp;lt;/b&amp;gt; to process all drifters from a single deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifternum&amp;lt;/i&amp;gt;_summary.log' files (or '&amp;lt;i&amp;gt;yyyymmdd_drifternum&amp;lt;/i&amp;gt;_TEN_MIN_summary.log' if TEN_MIN_ROUNDING is set) with this format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Iridium drifters will still have this format, but columns 17-21 will be filled with NaNs.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;deployment_settings.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy/paste an 'elseif' block from an existing one:&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
elseif strcmp(folder,'20050307')&lt;br /&gt;
   z_rate = [-0.2 0.2];&lt;br /&gt;
   max_z = -65;&lt;br /&gt;
   lon_lim = [-117.4 -117.06666];&lt;br /&gt;
   lat_lim = [32.4 32.7];&lt;br /&gt;
   vel_rate = [-60 60];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
     &amp;lt;li&amp;gt;Note that I try to keep these grouped by project&lt;br /&gt;
     &amp;lt;li&amp;gt;Edit the first line of the elseif to the date of the deployment&lt;br /&gt;
     &amp;lt;li&amp;gt;Try to capture the lat/lon limits, or use what you noted from the clean_up section above&lt;br /&gt;
     &amp;lt;li&amp;gt;We'll get to the others in a sec &lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;pathname&amp;lt;/b&amp;gt; to your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;do_all&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_summaries&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt;, and &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt;.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set any other values in the &amp;quot;USER SETTINGS&amp;quot; section if needed, but not usually.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;&lt;br /&gt;
   &amp;lt;ul&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;There are now 5 summary plots and one &amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;_all.png plot in your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Use what you see to tweak the values on the &amp;lt;i&amp;gt;deployment_settings.m&amp;lt;i&amp;gt; file (note: if you didn't use bathy in the processing, it doesn't matter what the &amp;lt;i&amp;gt;z_rate&amp;lt;/i&amp;gt; or &amp;lt;i&amp;gt;max_z&amp;lt;/i&amp;gt; are set to)&lt;br /&gt;
      &amp;lt;li&amp;gt;When all looks good, you'll want to eventually set the &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; to make those plots.&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate &amp;quot;stats.php&amp;quot; pages (e.g. start/stop times, average speeds, average depth, number of drifters, etc.) for each deployment in a project [optional-ish]&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;make_stats_page.m&amp;lt;/b&amp;gt; and select the project folder (e.g. SBCLS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Website Setup&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Copy the files so the website shows them, and other web maintenance.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SBCLS) on the website, which is found at &amp;lt;b&amp;gt;/home/kirk/public_html/drifter/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt;Copy all the &amp;lt;i&amp;gt;*_summary.log&amp;lt;/i&amp;gt; files to the appropriate deployment type subfolder inside .../kirk/dataDrifter_Anal/2_data/AllData/&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'Compress'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to inside /home/kirk/public_html/drifter/data/data/.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update /home/kirk/public_html/drifter/mod_date.txt with today's date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check that the [http://drifterdata.com webpage] looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=51</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=51"/>
		<updated>2009-07-17T20:30:53Z</updated>

		<summary type="html">&lt;p&gt;Kirk: version 1.0&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning| '''THIS PAGE IS NOT DONE''' }}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the ''kirk'' folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and &amp;lt;b&amp;gt;commented out&amp;lt;/b&amp;gt;), then copy these deployment times to the top of the file, and uncomment.  Note: under the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but &amp;lt;b&amp;gt;when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering are sequential and start at 1&amp;lt;/b&amp;gt;.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least at or before start of deployment and a time at or after ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly!&amp;lt;br&amp;gt;&lt;br /&gt;
     If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in &amp;lt;b&amp;gt;..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/b&amp;gt; folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;, and will hereafter called the &amp;lt;b&amp;gt;&amp;quot;working folder&amp;quot;&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to this working folder and make a copy of the &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.gif]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations on map:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;1st column = consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;2nd column = first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;3rd column = time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;4th column = in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around to the different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side -- to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next and then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index number a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment, change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;WARNING!:&amp;lt;/span&amp;gt; when you press the NEXT&amp;amp;rarr; (or &amp;amp;larr;PREV) button(s), if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the tilte above the map change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, if you were to click the &amp;amp;larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.gif]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed (the track which heads due north):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.gif]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Again, when done cleaning up, be sure to press the &amp;lt;b&amp;gt;SAVE&amp;lt;/b&amp;gt; button to write your changes out to file!&lt;br /&gt;
&amp;lt;li&amp;gt;Take note of the maximum latitude and longitude limits (you'll want them for the plotting portion below), then press 'EXIT'.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to your working folder and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Delete&amp;lt;/b&amp;gt; the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt;  [you made a copy of it already as &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Rename&amp;lt;/b&amp;gt; the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file (output of the clean_up_drifter_data.m script), to &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt; (so it's read in next step).&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;li&amp;gt;The format of the &amp;quot;MOD&amp;quot; file which this script output (different than the &amp;quot;ORIG&amp;quot; one fetched) is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of &amp;lt;b&amp;gt;process_drifter_data.m&amp;lt;/b&amp;gt; to set these as appropriate:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%SET **ONE** OF THESE!&lt;br /&gt;
%THIS WILL DETERMINE WHICH BATHY DATASET GETS LOADED!&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work (SBCIS or SBCSS)&lt;br /&gt;
SBC_FULL = 1; %all of Santa Barbara Channel for Large Scale Deployments (SBCLS, SCROF or SBNS or MSD)&lt;br /&gt;
UCSD = 0; %San Diego Imperial Beach (SDSS or TJROF)&lt;br /&gt;
HBDP = 0; %Huntington Beach (HB) or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River (SAROF)&lt;br /&gt;
SF = 0; %San Francisco (SF)&lt;br /&gt;
EFS = 0; %Eastern Florida Shelf (EFS)&lt;br /&gt;
&lt;br /&gt;
%if this is true, then doesn't matter what areas above are set, or GEODAS setting below. set to 1 for areas w/o bathy (e.g. PHILEX) &lt;br /&gt;
% data. will skip along/across shore, dz/dt and depth calculations.&lt;br /&gt;
SKIP_ALONG_ACROSS = true &lt;br /&gt;
TEN_MIN_ROUNDING = true % before doing calculations, first round drifter times to 10 minute steps (will have &amp;quot;_TEN_MIN_&amp;quot; in filename)&lt;br /&gt;
SMOOTH_DATA = false; % run smooth.m (2 point running mean or average) on the u and v velocities (and only these, i.e. not lat/lon) to reduce noise (usually NOT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;process_drifter_data.m&amp;lt;/b&amp;gt; to process all drifters from a single deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifternum&amp;lt;/i&amp;gt;_summary.log' files (or '&amp;lt;i&amp;gt;yyyymmdd_drifternum&amp;lt;/i&amp;gt;_TEN_MIN_summary.log' if TEN_MIN_ROUNDING is set) with this format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Iridium drifters will still have this format, but columns 17-21 will be filled with NaNs.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;deployment_settings.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy/paste an 'elseif' block from an existing one:&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
elseif strcmp(folder,'20050307')&lt;br /&gt;
   z_rate = [-0.2 0.2];&lt;br /&gt;
   max_z = -65;&lt;br /&gt;
   lon_lim = [-117.4 -117.06666];&lt;br /&gt;
   lat_lim = [32.4 32.7];&lt;br /&gt;
   vel_rate = [-60 60];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
     &amp;lt;li&amp;gt;Note that I try to keep these grouped by project&lt;br /&gt;
     &amp;lt;li&amp;gt;Edit the first line of the elseif to the date of the deployment&lt;br /&gt;
     &amp;lt;li&amp;gt;Try to capture the lat/lon limits, or use what you noted from the clean_up section above&lt;br /&gt;
     &amp;lt;li&amp;gt;We'll get to the others in a sec &lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;pathname&amp;lt;/b&amp;gt; to your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;do_all&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_summaries&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt;, and &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt;.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set any other values in the &amp;quot;USER SETTINGS&amp;quot; section if needed, but not usually.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;&lt;br /&gt;
   &amp;lt;ul&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;There are now 5 summary plots and one &amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;_all.png plot in your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Use what you see to tweak the values on the &amp;lt;i&amp;gt;deployment_settings.m&amp;lt;i&amp;gt; file (note: if you didn't use bathy in the processing, it doesn't matter what the &amp;lt;i&amp;gt;z_rate&amp;lt;/i&amp;gt; or &amp;lt;i&amp;gt;max_z&amp;lt;/i&amp;gt; are set to)&lt;br /&gt;
      &amp;lt;li&amp;gt;When all looks good, you'll want to eventually set the &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; to make those plots.&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate &amp;quot;stats.php&amp;quot; pages (e.g. start/stop times, average speeds, average depth, number of drifters, etc.) for each deployment in a project [optional-ish]&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;make_stats_page.m&amp;lt;/b&amp;gt; and select the project folder (e.g. SBCLS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Website Setup&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Copy the files so the website shows them, and other web maintenance.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SBCLS) on the website, which is found at &amp;lt;b&amp;gt;/home/kirk/public_html/drifter/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt;Copy all the &amp;lt;i&amp;gt;*_summary.log&amp;lt;/i&amp;gt; files to the appropriate deployment type subfolder inside .../kirk/dataDrifter_Anal/2_data/AllData/&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'Compress'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to inside /home/kirk/public_html/drifter/data/data/.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update /home/kirk/public_html/drifter/mod_date.txt with today's date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check that the [http://drifterdata.com webpage] looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=50</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=50"/>
		<updated>2009-07-17T20:22:15Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning| '''THIS PAGE IS NOT DONE''' }}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the ''kirk'' folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and &amp;lt;b&amp;gt;commented out&amp;lt;/b&amp;gt;), then copy these deployment times to the top of the file, and uncomment.  Note: under the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but &amp;lt;b&amp;gt;when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering are sequential and start at 1&amp;lt;/b&amp;gt;.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least at or before start of deployment and a time at or after ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly!&amp;lt;br&amp;gt;&lt;br /&gt;
     If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in &amp;lt;b&amp;gt;..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/b&amp;gt; folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;, and will hereafter called the &amp;lt;b&amp;gt;&amp;quot;working folder&amp;quot;&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to this working folder and make a copy of the &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.gif]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations on map:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;1st column = consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;2nd column = first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;3rd column = time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;4th column = in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around to the different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side -- to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next and then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index number a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment, change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;WARNING!:&amp;lt;/span&amp;gt; when you press the NEXT&amp;amp;rarr; (or &amp;amp;larr;PREV) button(s), if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the tilte above the map change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, if you were to click the &amp;amp;larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.gif]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed:&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.gif]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Again, when done cleaning up, be sure to press the &amp;lt;b&amp;gt;SAVE&amp;lt;/b&amp;gt; button to write your changes out to file.&lt;br /&gt;
&amp;lt;li&amp;gt;Take note of the maximum latitude and longitude limits (you'll want them for the plotting portion below).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder containing the file you read-in and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Delete the file &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt;  [you made a copy of it already, &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;Rename the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file (output of the clean_up_drifter_data.m script), naming it &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt; (so its read in next step). The format of the &amp;quot;MOD&amp;quot; file which this script output is different than the &amp;quot;ORIG&amp;quot; one fetched.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The output format is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of '''process_drifter_data.m''' to set as appropriate:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%SET **ONE** OF THESE!&lt;br /&gt;
%THIS WILL DETERMINE WHICH BATHY DATASET GETS LOADED!&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work (SBCIS or SBCSS)&lt;br /&gt;
SBC_FULL = 1; %all of Santa Barbara Channel for Large Scale Deployments (SBCLS, SCROF or SBNS or MSD)&lt;br /&gt;
UCSD = 0; %San Diego Imperial Beach (SDSS or TJROF)&lt;br /&gt;
HBDP = 0; %Huntington Beach (HB) or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River (SAROF)&lt;br /&gt;
SF = 0; %San Francisco (SF)&lt;br /&gt;
EFS = 0; %Eastern Florida Shelf (EFS)&lt;br /&gt;
&lt;br /&gt;
%if this is true, then doesn't matter what areas above are set, or GEODAS setting below. set to 1 for areas w/o bathy (e.g. PHILEX) &lt;br /&gt;
% data. will skip along/across shore, dz/dt and depth calculations.&lt;br /&gt;
SKIP_ALONG_ACROSS = true &lt;br /&gt;
TEN_MIN_ROUNDING = true % before doing calculations, first round drifter times to 10 minute steps (will have &amp;quot;_TEN_MIN_&amp;quot; in filename)&lt;br /&gt;
SMOOTH_DATA = false; % run smooth.m (2 point running mean or average) on the u and v velocities (and only these, i.e. not lat/lon) to reduce noise (usually NOT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'process_drifter_data.m' to process all drifters from a single deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_summary.log' files (or '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_TEN_MIN_summary.log' if TEN_MIN_ROUNDING is set) with this format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Iridium drifters will still have this format, but columns 17-21 will be filled with NaNs.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;deployment_settings.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy/paste an 'elseif' block from an existing one:&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
elseif strcmp(folder,'20050307')&lt;br /&gt;
   z_rate = [-0.2 0.2];&lt;br /&gt;
   max_z = -65;&lt;br /&gt;
   lon_lim = [-117.4 -117.06666];&lt;br /&gt;
   lat_lim = [32.4 32.7];&lt;br /&gt;
   vel_rate = [-60 60];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
     &amp;lt;li&amp;gt;Note that I try to keep these grouped by project&lt;br /&gt;
     &amp;lt;li&amp;gt;Edit the first line of the elseif to the date of the deployment&lt;br /&gt;
     &amp;lt;li&amp;gt;Try to capture the lat/lon limits, or use what you noted from the clean_up section above&lt;br /&gt;
     &amp;lt;li&amp;gt;We'll get to the others in a sec &lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;pathname&amp;lt;/b&amp;gt; to your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;do_all&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_summaries&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt;, and &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt;.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set any other values in the &amp;quot;USER SETTINGS&amp;quot; section if needed, but not usually.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;&lt;br /&gt;
   &amp;lt;ul&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;There are now 5 summary plots and one &amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;_all.png plot in your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Use what you see to tweak the values on the deployment_settings.m file (note: if you didn't use bathy in the processing, it doesn't matter what the z_rate or max_z are set to)&lt;br /&gt;
      &amp;lt;li&amp;gt;When all looks good, you'll want to eventually set the &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; to make those plots.&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate &amp;quot;stats.php&amp;quot; pages (e.g. start/stop times, average speeds, average depth, number of drifters, etc.) for each deployment in a project [optnl-ish]&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'make_stats_page.m' and select the project folder (e.g. SBCLS)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Website Setup&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Copy the files so the website shows them, and other web maintenance.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SBCLS) on the website, which is found at &amp;lt;b&amp;gt;/home/kirk/public_html/drifter/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt;Copy the '*_summary.log' files to the appropriate deployment type subfolder inside .../kirk/dataDrifter_Anal/2_data/AllData/&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'Compress'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to /home/kirk/public_html/drifter/data/data.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update /home/kirk/public_html/drifter/mod_date.txt with today's date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check that the [http://drifterdata.com webpage] looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=49</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=49"/>
		<updated>2009-07-17T20:19:54Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning| '''THIS PAGE IS NOT DONE''' }}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the ''kirk'' folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and &amp;lt;b&amp;gt;commented out&amp;lt;/b&amp;gt;), then copy these deployment times to the top of the file, and uncomment.  Note: under the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but &amp;lt;b&amp;gt;when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering are sequential and start at 1&amp;lt;/b&amp;gt;.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least at or before start of deployment and a time at or after ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly!&amp;lt;br&amp;gt;&lt;br /&gt;
     If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in &amp;lt;b&amp;gt;..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/b&amp;gt; folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;, and will hereafter called the &amp;lt;b&amp;gt;&amp;quot;working folder&amp;quot;&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to this working folder and make a copy of the &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.gif]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations on map:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;1st column = consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;2nd column = first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;3rd column = time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;4th column = in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around to the different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side -- to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next and then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index number a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment, change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;WARNING!:&amp;lt;/span&amp;gt; when you press the NEXT&amp;amp;rarr; button, if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the top change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, when you click the $larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.gif]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed:&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.gif]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Again, when done cleaning up, be sure to press the &amp;lt;b&amp;gt;SAVE&amp;lt;/b&amp;gt; button to write your changes out to file.&lt;br /&gt;
&amp;lt;li&amp;gt;Take note of the maximum latitude and longitude limits (you'll want them for the plotting portion below).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder containing the file you read-in and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Delete the file &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt;  [you made a copy of it already, &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;Rename the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file (output of the clean_up_drifter_data.m script), naming it &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt; (so its read in next step). The format of the &amp;quot;MOD&amp;quot; file which this script output is different than the &amp;quot;ORIG&amp;quot; one fetched.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The output format is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of '''process_drifter_data.m''' to set as appropriate:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%SET **ONE** OF THESE!&lt;br /&gt;
%THIS WILL DETERMINE WHICH BATHY DATASET GETS LOADED!&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work (SBCIS or SBCSS)&lt;br /&gt;
SBC_FULL = 1; %all of Santa Barbara Channel for Large Scale Deployments (SBCLS, SCROF or SBNS or MSD)&lt;br /&gt;
UCSD = 0; %San Diego Imperial Beach (SDSS or TJROF)&lt;br /&gt;
HBDP = 0; %Huntington Beach (HB) or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River (SAROF)&lt;br /&gt;
SF = 0; %San Francisco (SF)&lt;br /&gt;
EFS = 0; %Eastern Florida Shelf (EFS)&lt;br /&gt;
&lt;br /&gt;
%if this is true, then doesn't matter what areas above are set, or GEODAS setting below. set to 1 for areas w/o bathy (e.g. PHILEX) &lt;br /&gt;
% data. will skip along/across shore, dz/dt and depth calculations.&lt;br /&gt;
SKIP_ALONG_ACROSS = true &lt;br /&gt;
TEN_MIN_ROUNDING = true % before doing calculations, first round drifter times to 10 minute steps (will have &amp;quot;_TEN_MIN_&amp;quot; in filename)&lt;br /&gt;
SMOOTH_DATA = false; % run smooth.m (2 point running mean or average) on the u and v velocities (and only these, i.e. not lat/lon) to reduce noise (usually NOT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'process_drifter_data.m' to process all drifters from a single deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_summary.log' files (or '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_TEN_MIN_summary.log' if TEN_MIN_ROUNDING is set) with this format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Iridium drifters will still have this format, but columns 17-21 will be filled with NaNs.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;deployment_settings.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy/paste an 'elseif' block from an existing one:&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
elseif strcmp(folder,'20050307')&lt;br /&gt;
   z_rate = [-0.2 0.2];&lt;br /&gt;
   max_z = -65;&lt;br /&gt;
   lon_lim = [-117.4 -117.06666];&lt;br /&gt;
   lat_lim = [32.4 32.7];&lt;br /&gt;
   vel_rate = [-60 60];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
     &amp;lt;li&amp;gt;Note that I try to keep these grouped by project&lt;br /&gt;
     &amp;lt;li&amp;gt;Edit the first line of the elseif to the date of the deployment&lt;br /&gt;
     &amp;lt;li&amp;gt;Try to capture the lat/lon limits, or use what you noted from the clean_up section above&lt;br /&gt;
     &amp;lt;li&amp;gt;We'll get to the others in a sec &lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;pathname&amp;lt;/b&amp;gt; to your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;do_all&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_summaries&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt;, and &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt;.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set any other values in the &amp;quot;USER SETTINGS&amp;quot; section if needed, but not usually.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;&lt;br /&gt;
   &amp;lt;ul&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;There are now 5 summary plots and one &amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;_all.png plot in your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Use what you see to tweak the values on the deployment_settings.m file (note: if you didn't use bathy in the processing, it doesn't matter what the z_rate or max_z are set to)&lt;br /&gt;
      &amp;lt;li&amp;gt;When all looks good, you'll want to eventually set the &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; to make those plots.&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate &amp;quot;stats.php&amp;quot; pages (e.g. start/stop times, average speeds, average depth, number of drifters, etc.) for each deployment in a project [optnl-ish]&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'make_stats_page.m' and select the project folder (e.g. SBCLS)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Website Setup&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Copy the files so the website shows them, and other web maintenance.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SBCLS) on the website, which is found at &amp;lt;b&amp;gt;/home/kirk/public_html/drifter/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt;Copy the '*_summary.log' files to the appropriate deployment type subfolder inside .../kirk/dataDrifter_Anal/2_data/AllData/&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'Compress'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to /home/kirk/public_html/drifter/data/data.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update /home/kirk/public_html/drifter/mod_date.txt with today's date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check that the [http://drifterdata.com webpage] looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=48</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=48"/>
		<updated>2009-07-17T20:08:26Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning| '''THIS PAGE IS NOT DONE''' }}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the ''kirk'' folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and commented out), then copy these uncommented deployment times to&lt;br /&gt;
  the top of it to fetch the data.  Note, when in the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering start at 1.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least before or at start and a time after or at ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in '..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;' folder (hereafter called the &amp;lt;b&amp;gt;&amp;quot;working folder&amp;quot;&amp;lt;/b&amp;gt;) as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and make a copy of this &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.gif]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;first column is consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;second column is first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;third column is time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;fourth column is in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side, to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next, then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index numbers a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;WARNING!:&amp;lt;/b&amp;gt; when you press the NEXT&amp;amp;rarr; button, if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the top change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, when you click the $larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.gif]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed:&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.gif]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Again, when done cleaning up, be sure to press the &amp;lt;b&amp;gt;SAVE&amp;lt;/b&amp;gt; button to write your changes out to file.&lt;br /&gt;
&amp;lt;li&amp;gt;Take note of the maximum latitude and longitude limits (you'll want them for the plotting portion below).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder containing the file you read-in and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Delete the file &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt;  [you made a copy of it already, &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;Rename the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file (output of the clean_up_drifter_data.m script), naming it &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt; (so its read in next step). The format of the &amp;quot;MOD&amp;quot; file which this script output is different than the &amp;quot;ORIG&amp;quot; one fetched.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The output format is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of '''process_drifter_data.m''' to set as appropriate:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%SET **ONE** OF THESE!&lt;br /&gt;
%THIS WILL DETERMINE WHICH BATHY DATASET GETS LOADED!&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work (SBCIS or SBCSS)&lt;br /&gt;
SBC_FULL = 1; %all of Santa Barbara Channel for Large Scale Deployments (SBCLS, SCROF or SBNS or MSD)&lt;br /&gt;
UCSD = 0; %San Diego Imperial Beach (SDSS or TJROF)&lt;br /&gt;
HBDP = 0; %Huntington Beach (HB) or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River (SAROF)&lt;br /&gt;
SF = 0; %San Francisco (SF)&lt;br /&gt;
EFS = 0; %Eastern Florida Shelf (EFS)&lt;br /&gt;
&lt;br /&gt;
%if this is true, then doesn't matter what areas above are set, or GEODAS setting below. set to 1 for areas w/o bathy (e.g. PHILEX) &lt;br /&gt;
% data. will skip along/across shore, dz/dt and depth calculations.&lt;br /&gt;
SKIP_ALONG_ACROSS = true &lt;br /&gt;
TEN_MIN_ROUNDING = true % before doing calculations, first round drifter times to 10 minute steps (will have &amp;quot;_TEN_MIN_&amp;quot; in filename)&lt;br /&gt;
SMOOTH_DATA = false; % run smooth.m (2 point running mean or average) on the u and v velocities (and only these, i.e. not lat/lon) to reduce noise (usually NOT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'process_drifter_data.m' to process all drifters from a single deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_summary.log' files (or '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_TEN_MIN_summary.log' if TEN_MIN_ROUNDING is set) with this format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Iridium drifters will still have this format, but columns 17-21 will be filled with NaNs.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;deployment_settings.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy/paste an 'elseif' block from an existing one:&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
elseif strcmp(folder,'20050307')&lt;br /&gt;
   z_rate = [-0.2 0.2];&lt;br /&gt;
   max_z = -65;&lt;br /&gt;
   lon_lim = [-117.4 -117.06666];&lt;br /&gt;
   lat_lim = [32.4 32.7];&lt;br /&gt;
   vel_rate = [-60 60];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
     &amp;lt;li&amp;gt;Note that I try to keep these grouped by project&lt;br /&gt;
     &amp;lt;li&amp;gt;Edit the first line of the elseif to the date of the deployment&lt;br /&gt;
     &amp;lt;li&amp;gt;Try to capture the lat/lon limits, or use what you noted from the clean_up section above&lt;br /&gt;
     &amp;lt;li&amp;gt;We'll get to the others in a sec &lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;pathname&amp;lt;/b&amp;gt; to your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;do_all&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_summaries&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt;, and &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt;.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set any other values in the &amp;quot;USER SETTINGS&amp;quot; section if needed, but not usually.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;&lt;br /&gt;
   &amp;lt;ul&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;There are now 5 summary plots and one &amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;_all.png plot in your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Use what you see to tweak the values on the deployment_settings.m file (note: if you didn't use bathy in the processing, it doesn't matter what the z_rate or max_z are set to)&lt;br /&gt;
      &amp;lt;li&amp;gt;When all looks good, you'll want to eventually set the &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; to make those plots.&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder: .../kirk/user/4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate &amp;quot;stats.php&amp;quot; pages (e.g. start/stop times, average speeds, average depth, number of drifters, etc.) for each deployment in a project [optnl-ish]&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'make_stats_page.m' and select the project folder (e.g. SBCLS)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Website Setup&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Copy the files so the website shows them, and other web maintenance.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SBCLS) on the website, which is found at &amp;lt;b&amp;gt;/home/kirk/public_html/drifter/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt;Copy the '*_summary.log' files to the appropriate deployment type subfolder inside .../kirk/dataDrifter_Anal/2_data/AllData/&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'Compress'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to /home/kirk/public_html/drifter/data/data.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update /home/kirk/public_html/drifter/mod_date.txt with today's date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check that the [http://drifterdata.com webpage] looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=47</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=47"/>
		<updated>2009-07-17T20:07:04Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning| '''THIS PAGE IS NOT DONE''' }}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the ''kirk'' folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and commented out), then copy these uncommented deployment times to&lt;br /&gt;
  the top of it to fetch the data.  Note, when in the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering start at 1.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least before or at start and a time after or at ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in '..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;' folder (hereafter called the &amp;lt;b&amp;gt;&amp;quot;working folder&amp;quot;&amp;lt;/b&amp;gt;) as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and make a copy of this &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.gif]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;first column is consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;second column is first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;third column is time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;fourth column is in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side, to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next, then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index numbers a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;WARNING!:&amp;lt;/b&amp;gt; when you press the NEXT&amp;amp;rarr; button, if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the top change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, when you click the $larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.gif]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed:&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.gif]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Again, when done cleaning up, be sure to press the &amp;lt;b&amp;gt;SAVE&amp;lt;/b&amp;gt; button to write your changes out to file.&lt;br /&gt;
&amp;lt;li&amp;gt;Take note of the maximum latitude and longitude limits (you'll want them for the plotting portion below).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder containing the file you read-in and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Delete the file &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt;  [you made a copy of it already, &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;Rename the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file (output of the clean_up_drifter_data.m script), naming it &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt; (so its read in next step). The format of the &amp;quot;MOD&amp;quot; file which this script output is different than the &amp;quot;ORIG&amp;quot; one fetched.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The output format is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of '''process_drifter_data.m''' to set as appropriate:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%SET **ONE** OF THESE!&lt;br /&gt;
%THIS WILL DETERMINE WHICH BATHY DATASET GETS LOADED!&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work (SBCIS or SBCSS)&lt;br /&gt;
SBC_FULL = 1; %all of Santa Barbara Channel for Large Scale Deployments (SBCLS, SCROF or SBNS or MSD)&lt;br /&gt;
UCSD = 0; %San Diego Imperial Beach (SDSS or TJROF)&lt;br /&gt;
HBDP = 0; %Huntington Beach (HB) or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River (SAROF)&lt;br /&gt;
SF = 0; %San Francisco (SF)&lt;br /&gt;
EFS = 0; %Eastern Florida Shelf (EFS)&lt;br /&gt;
&lt;br /&gt;
%if this is true, then doesn't matter what areas above are set, or GEODAS setting below. set to 1 for areas w/o bathy (e.g. PHILEX) &lt;br /&gt;
% data. will skip along/across shore, dz/dt and depth calculations.&lt;br /&gt;
SKIP_ALONG_ACROSS = true &lt;br /&gt;
TEN_MIN_ROUNDING = true % before doing calculations, first round drifter times to 10 minute steps (will have &amp;quot;_TEN_MIN_&amp;quot; in filename)&lt;br /&gt;
SMOOTH_DATA = false; % run smooth.m (2 point running mean or average) on the u and v velocities (and only these, i.e. not lat/lon) to reduce noise (usually NOT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'process_drifter_data.m' to process all drifters from a single deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_summary.log' files (or '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_TEN_MIN_summary.log' if TEN_MIN_ROUNDING is set) with this format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Iridium drifters will still have this format, but columns 17-21 will be filled with NaNs.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;deployment_settings.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy/paste an 'elseif' block from an existing one:&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
elseif strcmp(folder,'20050307')&lt;br /&gt;
   z_rate = [-0.2 0.2];&lt;br /&gt;
   max_z = -65;&lt;br /&gt;
   lon_lim = [-117.4 -117.06666];&lt;br /&gt;
   lat_lim = [32.4 32.7];&lt;br /&gt;
   vel_rate = [-60 60];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
     &amp;lt;li&amp;gt;Note that I try to keep these grouped by project&lt;br /&gt;
     &amp;lt;li&amp;gt;Edit the first line of the elseif to the date of the deployment&lt;br /&gt;
     &amp;lt;li&amp;gt;Try to capture the lat/lon limits, or use what you noted from the clean_up section above&lt;br /&gt;
     &amp;lt;li&amp;gt;We'll get to the others in a sec &lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;pathname&amp;lt;/b&amp;gt; to your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;do_all&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_summaries&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt;, and &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt;.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set any other values in the &amp;quot;USER SETTINGS&amp;quot; section if needed, but not usually.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;&lt;br /&gt;
   &amp;lt;ul&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;There are now 5 summary plots and one &amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;_all.png plot in your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Use what you see to tweak the values on the deployment_settings.m file (note: if you didn't use bathy in the processing, it doesn't matter what the z_rate or max_z are set to)&lt;br /&gt;
      &amp;lt;li&amp;gt;When all looks good, you'll want to eventually set the &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; to make those plots.&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate &amp;quot;stats.php&amp;quot; pages (e.g. start/stop times, average speeds, average depth, number of drifters, etc.) for each deployment in a project [optnl-ish]&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'make_stats_page.m' and select the project folder (e.g. SBCLS)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Website Setup&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Copy the files so the website shows them, and other web maintenance.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SBCLS) on the website, which is found at &amp;lt;b&amp;gt;/home/kirk/public_html/drifter/&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt;Copy the '*_summary.log' files to the appropriate deployment type subfolder inside .../kirk/dataDrifter_Anal/2_data/AllData/&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'Compress'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to /home/kirk/public_html/drifter/data/data.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update /home/kirk/public_html/drifter/mod_date.txt with today's date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check that the [http://drifterdata.com webpage] looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=46</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=46"/>
		<updated>2009-07-17T19:56:28Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning| '''THIS PAGE IS NOT DONE''' }}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the ''kirk'' folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and commented out), then copy these uncommented deployment times to&lt;br /&gt;
  the top of it to fetch the data.  Note, when in the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering start at 1.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least before or at start and a time after or at ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in '..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;' folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and make a copy of this &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.gif]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;first column is consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;second column is first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;third column is time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;fourth column is in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side, to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next, then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index numbers a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;WARNING!:&amp;lt;/b&amp;gt; when you press the NEXT&amp;amp;rarr; button, if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the top change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, when you click the $larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.gif]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed:&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.gif]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Again, when done cleaning up, be sure to press the &amp;lt;b&amp;gt;SAVE&amp;lt;/b&amp;gt; button to write your changes out to file.&lt;br /&gt;
&amp;lt;li&amp;gt;Take note of the maximum latitude and longitude limits (you'll want them for the plotting portion below).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder containing the file you read-in and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Delete the file &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt;  [you made a copy of it already, &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;Rename the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file (output of the clean_up_drifter_data.m script), naming it &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt; (so its read in next step). The format of the &amp;quot;MOD&amp;quot; file which this script output is different than the &amp;quot;ORIG&amp;quot; one fetched.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The output format is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of '''process_drifter_data.m''' to set as appropriate:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%SET **ONE** OF THESE!&lt;br /&gt;
%THIS WILL DETERMINE WHICH BATHY DATASET GETS LOADED!&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work (SBCIS or SBCSS)&lt;br /&gt;
SBC_FULL = 1; %all of Santa Barbara Channel for Large Scale Deployments (SBCLS, SCROF or SBNS or MSD)&lt;br /&gt;
UCSD = 0; %San Diego Imperial Beach (SDSS or TJROF)&lt;br /&gt;
HBDP = 0; %Huntington Beach (HB) or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River (SAROF)&lt;br /&gt;
SF = 0; %San Francisco (SF)&lt;br /&gt;
EFS = 0; %Eastern Florida Shelf (EFS)&lt;br /&gt;
&lt;br /&gt;
%if this is true, then doesn't matter what areas above are set, or GEODAS setting below. set to 1 for areas w/o bathy (e.g. PHILEX) &lt;br /&gt;
% data. will skip along/across shore, dz/dt and depth calculations.&lt;br /&gt;
SKIP_ALONG_ACROSS = true &lt;br /&gt;
TEN_MIN_ROUNDING = true % before doing calculations, first round drifter times to 10 minute steps (will have &amp;quot;_TEN_MIN_&amp;quot; in filename)&lt;br /&gt;
SMOOTH_DATA = false; % run smooth.m (2 point running mean or average) on the u and v velocities (and only these, i.e. not lat/lon) to reduce noise (usually NOT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'process_drifter_data.m' to process all drifters from a single deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_summary.log' files (or '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_TEN_MIN_summary.log' if TEN_MIN_ROUNDING is set) with this format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Iridium drifters will still have this format, but columns 17-21 will be filled with NaNs.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;deployment_settings.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
  &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy/paste an 'elseif' block from an existing one:&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
elseif strcmp(folder,'20050307')&lt;br /&gt;
   z_rate = [-0.2 0.2];&lt;br /&gt;
   max_z = -65;&lt;br /&gt;
   lon_lim = [-117.4 -117.06666];&lt;br /&gt;
   lat_lim = [32.4 32.7];&lt;br /&gt;
   vel_rate = [-60 60];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
     &amp;lt;li&amp;gt;Note that I try to keep these grouped by project&lt;br /&gt;
     &amp;lt;li&amp;gt;Edit the first line of the elseif to the date of the deployment&lt;br /&gt;
     &amp;lt;li&amp;gt;Try to capture the lat/lon limits, or use what you noted from the clean_up section above&lt;br /&gt;
     &amp;lt;li&amp;gt;We'll get to the others in a sec &lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;pathname&amp;lt;/b&amp;gt; to your working folder.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;do_all&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_summaries&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt;, and &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt;.&lt;br /&gt;
      &amp;lt;li&amp;gt;Set any other values in the &amp;quot;USER SETTINGS&amp;quot; section if needed, but not usually.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;do_plots.m&amp;lt;/b&amp;gt;&lt;br /&gt;
   &amp;lt;ul&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;There are now 5 summary plots and one &amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;_all.png plot.&lt;br /&gt;
      &amp;lt;li&amp;gt;Use what you see to tweak the values on the deployment_settings.m file (note: if you didn't use bathy in the processing, it doesn't matter what the z_rate or max_z are set to)&lt;br /&gt;
      &amp;lt;li&amp;gt;When all looks good, you'll want to eventually set the &amp;lt;b&amp;gt;do_all_anim&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;do_individ_plots&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; to make those plots.&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;LEFT OFF HERE!&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;!-- ############################################################### --&amp;gt;&lt;br /&gt;
&amp;lt;!-- ############################################################### --&amp;gt;&lt;br /&gt;
&amp;lt;!-- ############################################################### --&amp;gt;&lt;br /&gt;
&amp;lt;!-- ############################################################### --&amp;gt;&lt;br /&gt;
&amp;lt;!-- ############################################################### --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit 'deployment_settings.m' to set max depth, dz/dt, lat/lon and velocity limits on the associated plots.&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'do_plots.m', mostly, to set any of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
do_all = 0;   %0 = do plot, 1 = skip&lt;br /&gt;
do_all_anim = 1;&lt;br /&gt;
  SHOW_CODAR_TRACKS = 0; %show interpolated 'simulated drifter' tracks based on CODAR data (uses '*_compare.mat' files) for anim plot&lt;br /&gt;
do_individ_plots = 0;&lt;br /&gt;
do_summaries = 0;&lt;br /&gt;
SHOW_CODAR = 0; %draw the hourly codar vectors on the anim plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate a &amp;quot;stats&amp;quot; page (e.g. start/stop times, average speeds, average depth, number of drifters, etc.)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'make_stats_page.m' (generates all 'stats.php' pages for a deployment area)&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SDSS) on the website, but&lt;br /&gt;
	only the *.png, stats.php &amp;amp; *.gif files (and 'anim' subfolder).&lt;br /&gt;
&amp;lt;li&amp;gt;Copy the '*_summary.log' files to the appropriate deployment type subfolder at E:\User\Carter\data\Drifter_Anal\2_data\AllData&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'compress to *.zip'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to U:\public_html\drifter\data\data.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update 'mod_date.txt' with correct (today's) modified date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check &amp;lt;a href=&amp;quot;http://drifterdata.com&amp;quot;&amp;gt;website&amp;lt;/a&amp;gt; looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Syncronize E:\User\Carter with /home/data318/kirk&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=45</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=45"/>
		<updated>2009-07-17T19:50:20Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning| '''THIS PAGE IS NOT DONE''' }}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the ''kirk'' folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and commented out), then copy these uncommented deployment times to&lt;br /&gt;
  the top of it to fetch the data.  Note, when in the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering start at 1.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least before or at start and a time after or at ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in '..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;' folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and make a copy of this &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.gif]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;first column is consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;second column is first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;third column is time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;fourth column is in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side, to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next, then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index numbers a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;WARNING!:&amp;lt;/b&amp;gt; when you press the NEXT&amp;amp;rarr; button, if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the top change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, when you click the $larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.gif]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed:&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.gif]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Again, when done cleaning up, be sure to press the &amp;lt;b&amp;gt;SAVE&amp;lt;/b&amp;gt; button to write your changes out to file.&lt;br /&gt;
&amp;lt;li&amp;gt;Take note of the maximum latitude and longitude limits (you'll want them for the plotting portion below).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder containing the file you read-in and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Delete the file &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt;  [you made a copy of it already, &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;Rename the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file (output of the clean_up_drifter_data.m script), naming it &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt; (so its read in next step). The format of the &amp;quot;MOD&amp;quot; file which this script output is different than the &amp;quot;ORIG&amp;quot; one fetched.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The output format is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of '''process_drifter_data.m''' to set as appropriate:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%SET **ONE** OF THESE!&lt;br /&gt;
%THIS WILL DETERMINE WHICH BATHY DATASET GETS LOADED!&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work (SBCIS or SBCSS)&lt;br /&gt;
SBC_FULL = 1; %all of Santa Barbara Channel for Large Scale Deployments (SBCLS, SCROF or SBNS or MSD)&lt;br /&gt;
UCSD = 0; %San Diego Imperial Beach (SDSS or TJROF)&lt;br /&gt;
HBDP = 0; %Huntington Beach (HB) or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River (SAROF)&lt;br /&gt;
SF = 0; %San Francisco (SF)&lt;br /&gt;
EFS = 0; %Eastern Florida Shelf (EFS)&lt;br /&gt;
&lt;br /&gt;
%if this is true, then doesn't matter what areas above are set, or GEODAS setting below. set to 1 for areas w/o bathy (e.g. PHILEX) &lt;br /&gt;
% data. will skip along/across shore, dz/dt and depth calculations.&lt;br /&gt;
SKIP_ALONG_ACROSS = true &lt;br /&gt;
TEN_MIN_ROUNDING = true % before doing calculations, first round drifter times to 10 minute steps (will have &amp;quot;_TEN_MIN_&amp;quot; in filename)&lt;br /&gt;
SMOOTH_DATA = false; % run smooth.m (2 point running mean or average) on the u and v velocities (and only these, i.e. not lat/lon) to reduce noise (usually NOT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'process_drifter_data.m' to process all drifters from a single deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_summary.log' files (or '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_TEN_MIN_summary.log' if TEN_MIN_ROUNDING is set) with this format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Iridium drifters will still have this format, but columns 17-21 will be filled with NaNs.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;deployment_settings.m&amp;lt;/b&amp;gt;:&lt;br /&gt;
  &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy/paste an 'elseif' block from an existing one:&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
elseif strcmp(folder,'20050307')&lt;br /&gt;
   z_rate = [-0.2 0.2];&lt;br /&gt;
   max_z = -65;&lt;br /&gt;
   lon_lim = [-117.4 -117.06666];&lt;br /&gt;
   lat_lim = [32.4 32.7];&lt;br /&gt;
   vel_rate = [-60 60];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
     &amp;lt;li&amp;gt;Note that I try to keep these grouped by project&lt;br /&gt;
     &amp;lt;li&amp;gt;Edit the first line of the elseif to the date of the deployment&lt;br /&gt;
     &amp;lt;li&amp;gt;Try to capture the lat/lon limits, or use what you noted from the clean_up section above&lt;br /&gt;
     &amp;lt;li&amp;gt;We'll get to the others in a sec &lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit do_plots.m:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Set &amp;lt;b&amp;gt;pathname&amp;lt;/b&amp;gt; to your working folder.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(or, if you didn't use bathy in the processing, it doesn't matter what the z_rate or max_z are set to)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;LEFT OFF HERE!&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;!-- ############################################################### --&amp;gt;&lt;br /&gt;
&amp;lt;!-- ############################################################### --&amp;gt;&lt;br /&gt;
&amp;lt;!-- ############################################################### --&amp;gt;&lt;br /&gt;
&amp;lt;!-- ############################################################### --&amp;gt;&lt;br /&gt;
&amp;lt;!-- ############################################################### --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit 'deployment_settings.m' to set max depth, dz/dt, lat/lon and velocity limits on the associated plots.&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'do_plots.m', mostly, to set any of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
do_all = 0;   %0 = do plot, 1 = skip&lt;br /&gt;
do_all_anim = 1;&lt;br /&gt;
  SHOW_CODAR_TRACKS = 0; %show interpolated 'simulated drifter' tracks based on CODAR data (uses '*_compare.mat' files) for anim plot&lt;br /&gt;
do_individ_plots = 0;&lt;br /&gt;
do_summaries = 0;&lt;br /&gt;
SHOW_CODAR = 0; %draw the hourly codar vectors on the anim plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate a &amp;quot;stats&amp;quot; page (e.g. start/stop times, average speeds, average depth, number of drifters, etc.)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'make_stats_page.m' (generates all 'stats.php' pages for a deployment area)&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SDSS) on the website, but&lt;br /&gt;
	only the *.png, stats.php &amp;amp; *.gif files (and 'anim' subfolder).&lt;br /&gt;
&amp;lt;li&amp;gt;Copy the '*_summary.log' files to the appropriate deployment type subfolder at E:\User\Carter\data\Drifter_Anal\2_data\AllData&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'compress to *.zip'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to U:\public_html\drifter\data\data.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update 'mod_date.txt' with correct (today's) modified date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check &amp;lt;a href=&amp;quot;http://drifterdata.com&amp;quot;&amp;gt;website&amp;lt;/a&amp;gt; looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Syncronize E:\User\Carter with /home/data318/kirk&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=44</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=44"/>
		<updated>2009-07-17T19:22:08Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning| '''THIS PAGE IS NOT DONE''' }}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the ''kirk'' folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and commented out), then copy these uncommented deployment times to&lt;br /&gt;
  the top of it to fetch the data.  Note, when in the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering start at 1.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least before or at start and a time after or at ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in '..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;' folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and make a copy of this &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.gif]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;first column is consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;second column is first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;third column is time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;fourth column is in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side, to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next, then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index numbers a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;WARNING!:&amp;lt;/b&amp;gt; when you press the NEXT&amp;amp;rarr; button, if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the top change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, when you click the $larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.gif]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed:&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.gif]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Again, when done cleaning up, be sure to press the &amp;lt;b&amp;gt;SAVE&amp;lt;/b&amp;gt; button to write your changes out to file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder containing the file you read-in and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Delete the file &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt;  [you made a copy of it already, &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;Rename the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file (output of the clean_up_drifter_data.m script), naming it &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt; (so its read in next step). The format of the &amp;quot;MOD&amp;quot; file which this script output is different than the &amp;quot;ORIG&amp;quot; one fetched.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The output format is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of '''process_drifter_data.m''' to set as appropriate:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%SET **ONE** OF THESE!&lt;br /&gt;
%THIS WILL DETERMINE WHICH BATHY DATASET GETS LOADED!&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work (SBCIS or SBCSS)&lt;br /&gt;
SBC_FULL = 1; %all of Santa Barbara Channel for Large Scale Deployments (SBCLS, SCROF or SBNS or MSD)&lt;br /&gt;
UCSD = 0; %San Diego Imperial Beach (SDSS or TJROF)&lt;br /&gt;
HBDP = 0; %Huntington Beach (HB) or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River (SAROF)&lt;br /&gt;
SF = 0; %San Francisco (SF)&lt;br /&gt;
EFS = 0; %Eastern Florida Shelf (EFS)&lt;br /&gt;
&lt;br /&gt;
%if this is true, then doesn't matter what areas above are set, or GEODAS setting below. set to 1 for areas w/o bathy (e.g. PHILEX) &lt;br /&gt;
% data. will skip along/across shore, dz/dt and depth calculations.&lt;br /&gt;
SKIP_ALONG_ACROSS = true &lt;br /&gt;
TEN_MIN_ROUNDING = true % before doing calculations, first round drifter times to 10 minute steps (will have &amp;quot;_TEN_MIN_&amp;quot; in filename)&lt;br /&gt;
SMOOTH_DATA = false; % run smooth.m (2 point running mean or average) on the u and v velocities (and only these, i.e. not lat/lon) to reduce noise (usually NOT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'process_drifter_data.m' to process all drifters from a single deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_summary.log' files (or '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_TEN_MIN_summary.log' if TEN_MIN_ROUNDING is set) with this format:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Iridium drifters will still have this format, but columns 17-21 will be filled with NaNs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;LEFT OFF HERE!&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;!-- ############################################################### --&amp;gt;&lt;br /&gt;
&amp;lt;!-- ############################################################### --&amp;gt;&lt;br /&gt;
&amp;lt;!-- ############################################################### --&amp;gt;&lt;br /&gt;
&amp;lt;!-- ############################################################### --&amp;gt;&lt;br /&gt;
&amp;lt;!-- ############################################################### --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit 'deployment_settings.m' to set max depth, dz/dt, lat/lon and velocity limits on the associated plots.&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'do_plots.m', mostly, to set any of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
do_all = 0;   %0 = do plot, 1 = skip&lt;br /&gt;
do_all_anim = 1;&lt;br /&gt;
  SHOW_CODAR_TRACKS = 0; %show interpolated 'simulated drifter' tracks based on CODAR data (uses '*_compare.mat' files) for anim plot&lt;br /&gt;
do_individ_plots = 0;&lt;br /&gt;
do_summaries = 0;&lt;br /&gt;
SHOW_CODAR = 0; %draw the hourly codar vectors on the anim plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate a &amp;quot;stats&amp;quot; page (e.g. start/stop times, average speeds, average depth, number of drifters, etc.)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'make_stats_page.m' (generates all 'stats.php' pages for a deployment area)&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SDSS) on the website, but&lt;br /&gt;
	only the *.png, stats.php &amp;amp; *.gif files (and 'anim' subfolder).&lt;br /&gt;
&amp;lt;li&amp;gt;Copy the '*_summary.log' files to the appropriate deployment type subfolder at E:\User\Carter\data\Drifter_Anal\2_data\AllData&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'compress to *.zip'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to U:\public_html\drifter\data\data.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update 'mod_date.txt' with correct (today's) modified date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check &amp;lt;a href=&amp;quot;http://drifterdata.com&amp;quot;&amp;gt;website&amp;lt;/a&amp;gt; looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Syncronize E:\User\Carter with /home/data318/kirk&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=43</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=43"/>
		<updated>2009-07-17T19:09:41Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning| '''THIS PAGE IS NOT DONE''' }}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the ''kirk'' folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and commented out), then copy these uncommented deployment times to&lt;br /&gt;
  the top of it to fetch the data.  Note, when in the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering start at 1.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least before or at start and a time after or at ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in '..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;' folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and make a copy of this &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.gif]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;first column is consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;second column is first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;third column is time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;fourth column is in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side, to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next, then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index numbers a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;WARNING!:&amp;lt;/b&amp;gt; when you press the NEXT&amp;amp;rarr; button, if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the top change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, when you click the $larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.gif]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed:&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.gif]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Again, when done cleaning up, be sure to press the &amp;lt;b&amp;gt;SAVE&amp;lt;/b&amp;gt; button to write your changes out to file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder containing the file you read-in and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Delete the file &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt;  [you made a copy of it already, &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;Rename the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file (output of the clean_up_drifter_data.m script), naming it &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt; (so its read in next step). The format of the &amp;quot;MOD&amp;quot; file which this script output is different than the &amp;quot;ORIG&amp;quot; one fetched.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The output format is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;LEFT OFF HERE!&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;!-- ############################################################### --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'process_drifter_data.m' to set as appropriate:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%THIS WILL DETERMINE WHICH BATHY DATASET GETS LOADED!&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work (SBCIS or SBCSS)&lt;br /&gt;
SBC_FULL = 1; %all of Santa Barbara Channel for Large Scale Deployments (SBCLS, SCROF or SBNS or MSD)&lt;br /&gt;
UCSD = 0; %San Diego Imperial Beach (SDSS or TJROF)&lt;br /&gt;
HBDP = 0; %Huntington Beach (HB) or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River (SAROF)&lt;br /&gt;
SF = 0; %San Francisco (SF)&lt;br /&gt;
EFS = 0; %Eastern Florida Shelf (EFS)&lt;br /&gt;
&lt;br /&gt;
TEN_MIN_ROUNDING = true % before doing calculations, first round drifter times to 10 minute steps&lt;br /&gt;
SMOOTH_DATA = false; % run smooth.m (2 point running mean or average) on the u and v velocities (and only these, i.e. not lat/lon) to reduce noise (usually NOT)&lt;br /&gt;
GEODAS = 1; %1=use bathy from GEODAS CD (manditory if UCSD or SAR is set above), 0=use original brian chinn sbc_bathy&lt;br /&gt;
% don't do the along/across shore calculation (may want to do this if bathy isn't available) (Note: if true, then doesn't matter what above are set to)&lt;br /&gt;
SKIP_ALONG_ACROSS = true %(!!set to 1 for PHILEX until I get bathy, if this is true, then doesn't matter what areas are set, or GEODAS setting) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'process_drifter_data.m' to process all drifters from a single deployment&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;'process_all.m' will go thru and run 'process_drifter_data.m' on all subfolders.&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_summary.csv' files with this format:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit 'deployment_settings.m' to set max depth, dz/dt, lat/lon and velocity limits on the associated plots.&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'do_plots.m', mostly, to set any of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
do_all = 0;   %0 = do plot, 1 = skip&lt;br /&gt;
do_all_anim = 1;&lt;br /&gt;
  SHOW_CODAR_TRACKS = 0; %show interpolated 'simulated drifter' tracks based on CODAR data (uses '*_compare.mat' files) for anim plot&lt;br /&gt;
do_individ_plots = 0;&lt;br /&gt;
do_summaries = 0;&lt;br /&gt;
SHOW_CODAR = 0; %draw the hourly codar vectors on the anim plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate a &amp;quot;stats&amp;quot; page (e.g. start/stop times, average speeds, average depth, number of drifters, etc.)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'make_stats_page.m' (generates all 'stats.php' pages for a deployment area)&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SDSS) on the website, but&lt;br /&gt;
	only the *.png, stats.php &amp;amp; *.gif files (and 'anim' subfolder).&lt;br /&gt;
&amp;lt;li&amp;gt;Copy the '*_summary.log' files to the appropriate deployment type subfolder at E:\User\Carter\data\Drifter_Anal\2_data\AllData&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'compress to *.zip'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to U:\public_html\drifter\data\data.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update 'mod_date.txt' with correct (today's) modified date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check &amp;lt;a href=&amp;quot;http://drifterdata.com&amp;quot;&amp;gt;website&amp;lt;/a&amp;gt; looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Syncronize E:\User\Carter with /home/data318/kirk&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=42</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=42"/>
		<updated>2009-07-17T19:02:49Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning| '''THIS PAGE IS NOT DONE''' }}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the ''kirk'' folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and commented out), then copy these uncommented deployment times to&lt;br /&gt;
  the top of it to fetch the data.  Note, when in the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering start at 1.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least before or at start and a time after or at ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in '..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;' folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and make a copy of this &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.gif]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;first column is consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;second column is first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;third column is time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;fourth column is in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side, to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next, then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index numbers a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;WARNING!:&amp;lt;/b&amp;gt; when you press the NEXT&amp;amp;rarr; button, if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the top change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, when you click the $larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.gif]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed:&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.gif]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Again, when done cleaning up, be sure to press the &amp;lt;b&amp;gt;SAVE&amp;lt;/b&amp;gt; button to write your changes out to file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder containing the file you read-in and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Delete the file &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt;  [you made a copy of it already, &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;Rename the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file, naming it &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt;. The format of the &amp;quot;MOD&amp;quot; file which this script output is different than the &amp;quot;ORIG&amp;quot; one fetched.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The output format is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;LEFT OFF HERE!&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;!-- ############################################################### --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'process_drifter_data.m'.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;Mostly just need to set one of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work&lt;br /&gt;
SBC_FULL = 0; %all of Santa Barbara Channel for Large Scale Deployments or SCR&lt;br /&gt;
UCSD = 1; %San Diego Imperial Beach&lt;br /&gt;
HBDP = 0; %Huntington Beach or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River&lt;br /&gt;
&lt;br /&gt;
GEODAS = 1; %1=use bathy from GEODAS CD (manditory if UCSD or SAR is set above), 0=use original brian chinn sbc_bathy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'process_drifter_data.m' to process all drifters from a single deployment&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;'process_all.m' will go thru and run 'process_drifter_data.m' on all subfolders.&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_summary.csv' files with this format:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit 'deployment_settings.m' to set max depth, dz/dt, lat/lon and velocity limits on the associated plots.&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'do_plots.m', mostly, to set any of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
do_all = 0;   %0 = do plot, 1 = skip&lt;br /&gt;
do_all_anim = 1;&lt;br /&gt;
  SHOW_CODAR_TRACKS = 0; %show interpolated 'simulated drifter' tracks based on CODAR data (uses '*_compare.mat' files) for anim plot&lt;br /&gt;
do_individ_plots = 0;&lt;br /&gt;
do_summaries = 0;&lt;br /&gt;
SHOW_CODAR = 0; %draw the hourly codar vectors on the anim plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate a &amp;quot;stats&amp;quot; page (e.g. start/stop times, average speeds, average depth, number of drifters, etc.)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'make_stats_page.m' (generates all 'stats.php' pages for a deployment area)&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SDSS) on the website, but&lt;br /&gt;
	only the *.png, stats.php &amp;amp; *.gif files (and 'anim' subfolder).&lt;br /&gt;
&amp;lt;li&amp;gt;Copy the '*_summary.log' files to the appropriate deployment type subfolder at E:\User\Carter\data\Drifter_Anal\2_data\AllData&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'compress to *.zip'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to U:\public_html\drifter\data\data.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update 'mod_date.txt' with correct (today's) modified date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check &amp;lt;a href=&amp;quot;http://drifterdata.com&amp;quot;&amp;gt;website&amp;lt;/a&amp;gt; looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Syncronize E:\User\Carter with /home/data318/kirk&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=41</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=41"/>
		<updated>2009-07-17T18:59:48Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning| '''THIS PAGE IS NOT DONE''' }}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the ''kirk'' folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and commented out), then copy these uncommented deployment times to&lt;br /&gt;
  the top of it to fetch the data.  Note, when in the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering start at 1.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least before or at start and a time after or at ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in '..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;' folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and make a copy of this &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.gif]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;first column is consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;second column is first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;third column is time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;fourth column is in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side, to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next, then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index numbers a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;WARNING!:&amp;lt;/b&amp;gt; when you press the NEXT&amp;amp;rarr; button, if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the top change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, when you click the $larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.gif]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed:&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.gif]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;LEFT OFF HERE!&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;!-- ############################################################### --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Delete the file &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt;  [you made a copy of it already, &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;Rename the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file, naming it &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt;. The format of the &amp;quot;MOD&amp;quot; file which this script output is different than the &amp;quot;ORIG&amp;quot; one fetched.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The output format is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'process_drifter_data.m'.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;Mostly just need to set one of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work&lt;br /&gt;
SBC_FULL = 0; %all of Santa Barbara Channel for Large Scale Deployments or SCR&lt;br /&gt;
UCSD = 1; %San Diego Imperial Beach&lt;br /&gt;
HBDP = 0; %Huntington Beach or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River&lt;br /&gt;
&lt;br /&gt;
GEODAS = 1; %1=use bathy from GEODAS CD (manditory if UCSD or SAR is set above), 0=use original brian chinn sbc_bathy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'process_drifter_data.m' to process all drifters from a single deployment&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;'process_all.m' will go thru and run 'process_drifter_data.m' on all subfolders.&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_summary.csv' files with this format:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit 'deployment_settings.m' to set max depth, dz/dt, lat/lon and velocity limits on the associated plots.&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'do_plots.m', mostly, to set any of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
do_all = 0;   %0 = do plot, 1 = skip&lt;br /&gt;
do_all_anim = 1;&lt;br /&gt;
  SHOW_CODAR_TRACKS = 0; %show interpolated 'simulated drifter' tracks based on CODAR data (uses '*_compare.mat' files) for anim plot&lt;br /&gt;
do_individ_plots = 0;&lt;br /&gt;
do_summaries = 0;&lt;br /&gt;
SHOW_CODAR = 0; %draw the hourly codar vectors on the anim plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate a &amp;quot;stats&amp;quot; page (e.g. start/stop times, average speeds, average depth, number of drifters, etc.)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'make_stats_page.m' (generates all 'stats.php' pages for a deployment area)&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SDSS) on the website, but&lt;br /&gt;
	only the *.png, stats.php &amp;amp; *.gif files (and 'anim' subfolder).&lt;br /&gt;
&amp;lt;li&amp;gt;Copy the '*_summary.log' files to the appropriate deployment type subfolder at E:\User\Carter\data\Drifter_Anal\2_data\AllData&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'compress to *.zip'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to U:\public_html\drifter\data\data.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update 'mod_date.txt' with correct (today's) modified date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check &amp;lt;a href=&amp;quot;http://drifterdata.com&amp;quot;&amp;gt;website&amp;lt;/a&amp;gt; looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Syncronize E:\User\Carter with /home/data318/kirk&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=File:Clean_up_ending.gif&amp;diff=40</id>
		<title>File:Clean up ending.gif</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=File:Clean_up_ending.gif&amp;diff=40"/>
		<updated>2009-07-17T18:58:41Z</updated>

		<summary type="html">&lt;p&gt;Kirk: Drifter Processing, cleanup, ending&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Drifter Processing, cleanup, ending&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=File:Clean_up_starting.gif&amp;diff=39</id>
		<title>File:Clean up starting.gif</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=File:Clean_up_starting.gif&amp;diff=39"/>
		<updated>2009-07-17T18:58:27Z</updated>

		<summary type="html">&lt;p&gt;Kirk: Drifter Processing, cleanup, start&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Drifter Processing, cleanup, start&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=File:Clean_up_overview.gif&amp;diff=38</id>
		<title>File:Clean up overview.gif</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=File:Clean_up_overview.gif&amp;diff=38"/>
		<updated>2009-07-17T18:56:52Z</updated>

		<summary type="html">&lt;p&gt;Kirk: Drifter Processing, cleanup Overview of GUI&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Drifter Processing, cleanup Overview of GUI&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=37</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=37"/>
		<updated>2009-07-17T18:50:52Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning| '''THIS PAGE IS NOT DONE''' }}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the ''kirk'' folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and commented out), then copy these uncommented deployment times to&lt;br /&gt;
  the top of it to fetch the data.  Note, when in the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering start at 1.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least before or at start and a time after or at ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in '..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;' folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and make a copy of this &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em, but trust me it's not that hard, and much MUCH better than trying to edit the file by hand!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.png]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point on the map its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;first column is consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;second column is first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;third column is time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;fourth column is in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Zoom in and scroll around&amp;lt;/b&amp;gt; as you need to (you will probably do A LOT of this).&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side, to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next, then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and these points will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index numbers a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
    &amp;lt;li&amp;gt;It's pretty obvious when a drifter has been picked up as its trajectory will deviate (sometimes not so dramatically if the boat doesn't move afterwards) from what it was doing.&lt;br /&gt;
    &amp;lt;li&amp;gt;Most drifters have a initial digit of '1' for drifter number, but some are '0' (see second column). When a drifter is redeployed, just increment this number and all subsequent numbers (e.g. change them all from a 1 to a 2). Sometimes a drifter is deployed more than once, so just continue this, so for the 2nd redeployment change the initial digit from 1 to 3.  In doing this, when you save this file, you have essentially created 'new' (since their drifter numbers are now different) drifters, so the processing scripts don't think of them as one combined track.&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;WARNING!:&amp;lt;/b&amp;gt; when you press the NEXT&amp;amp;rarr; button, if you've changed any drifter numbers, a &amp;quot;new&amp;quot; drifter will created (you will see at the top change from, for example &amp;quot;Drifter 3 of 13&amp;quot;, to &amp;quot;Drifter 4 of 14&amp;quot; when you press it).  Then, when you click the $larr;PREV button you will not see those points you reassigned, instead they will be, in this example, Drifter #14 at the end. So, if you've started changing drifter numbers for a drifter, just be sure you're done changing all of them for that drifter before pressing the NEXT button.&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's an example of both in-water flags and redeploy numbers changing for one drifter. This initial shot is how it looked when loaded (after zooming in):&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_starting.png]]&lt;br /&gt;
    &amp;lt;li&amp;gt;Here's how it looks after correctly changing in-water flags to '0' when it was out of the water, and changing the drifter numbers to '2' for when it was redeployed:&amp;lt;br&amp;gt;&lt;br /&gt;
    [[Image:clean_up_ending.png]]&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;LEFT OFF HERE!&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;!-- ############################################################### --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Delete the file &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt;  [you made a copy of it already, &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;Rename the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file, naming it &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt;. The format of the &amp;quot;MOD&amp;quot; file which this script output is different than the &amp;quot;ORIG&amp;quot; one fetched.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The output format is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'process_drifter_data.m'.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;Mostly just need to set one of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work&lt;br /&gt;
SBC_FULL = 0; %all of Santa Barbara Channel for Large Scale Deployments or SCR&lt;br /&gt;
UCSD = 1; %San Diego Imperial Beach&lt;br /&gt;
HBDP = 0; %Huntington Beach or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River&lt;br /&gt;
&lt;br /&gt;
GEODAS = 1; %1=use bathy from GEODAS CD (manditory if UCSD or SAR is set above), 0=use original brian chinn sbc_bathy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'process_drifter_data.m' to process all drifters from a single deployment&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;'process_all.m' will go thru and run 'process_drifter_data.m' on all subfolders.&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_summary.csv' files with this format:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit 'deployment_settings.m' to set max depth, dz/dt, lat/lon and velocity limits on the associated plots.&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'do_plots.m', mostly, to set any of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
do_all = 0;   %0 = do plot, 1 = skip&lt;br /&gt;
do_all_anim = 1;&lt;br /&gt;
  SHOW_CODAR_TRACKS = 0; %show interpolated 'simulated drifter' tracks based on CODAR data (uses '*_compare.mat' files) for anim plot&lt;br /&gt;
do_individ_plots = 0;&lt;br /&gt;
do_summaries = 0;&lt;br /&gt;
SHOW_CODAR = 0; %draw the hourly codar vectors on the anim plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate a &amp;quot;stats&amp;quot; page (e.g. start/stop times, average speeds, average depth, number of drifters, etc.)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'make_stats_page.m' (generates all 'stats.php' pages for a deployment area)&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SDSS) on the website, but&lt;br /&gt;
	only the *.png, stats.php &amp;amp; *.gif files (and 'anim' subfolder).&lt;br /&gt;
&amp;lt;li&amp;gt;Copy the '*_summary.log' files to the appropriate deployment type subfolder at E:\User\Carter\data\Drifter_Anal\2_data\AllData&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'compress to *.zip'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to U:\public_html\drifter\data\data.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update 'mod_date.txt' with correct (today's) modified date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check &amp;lt;a href=&amp;quot;http://drifterdata.com&amp;quot;&amp;gt;website&amp;lt;/a&amp;gt; looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Syncronize E:\User\Carter with /home/data318/kirk&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=36</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=36"/>
		<updated>2009-07-17T18:12:37Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning| '''THIS PAGE IS NOT DONE''' }}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the ''kirk'' folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and commented out), then copy these uncommented deployment times to&lt;br /&gt;
  the top of it to fetch the data.  Note, when in the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering start at 1.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least before or at start and a time after or at ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in '..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;' folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and make a copy of this &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, &amp;lt;b&amp;gt;when done, press 'SAVE' button&amp;lt;/b&amp;gt;, and then the 'EXIT' (which will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; save the data) button.&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.png]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;first column is consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;second column is first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;third column is time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;fourth column is in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Zoom in and scroll around as you need to.&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to &amp;lt;b&amp;gt;edit the boxes&amp;lt;/b&amp;gt;, in the 2nd and 4th columns on the right side, to change either the drifter number (for redeployments) and/or in-water flag (so only when it is actually drifting gets processed) for each point:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;You can click in a box to edit it, and/or use the 'TAB' key to jump from one column to next, then down consecutive reports.&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (becomes red point on map), or if it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (becomes green point on map).  If any points need to be flagged as bogus (e.g. drifter looked like it was caught in kelp), or any other reason, use an in-water flag value of '2' (which will turn the point pink on map), and they will be not processed.&lt;br /&gt;
    &amp;lt;li&amp;gt;To help you determine what index numbers a point is (to edit its drifter number and/or in-water flag), you can use the 'Show point numbers'. And/or you can change the in-water value (so that it changes color, highlighting it), just be sure to reset it to the correct value when done.&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;LEFT OFF HERE!&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;!-- ############################################################### --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Delete the file &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt;  [you made a copy of it already, &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;Rename the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file, naming it &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt;. The format of the &amp;quot;MOD&amp;quot; file which this script output is different than the &amp;quot;ORIG&amp;quot; one fetched.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The output format is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'process_drifter_data.m'.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;Mostly just need to set one of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work&lt;br /&gt;
SBC_FULL = 0; %all of Santa Barbara Channel for Large Scale Deployments or SCR&lt;br /&gt;
UCSD = 1; %San Diego Imperial Beach&lt;br /&gt;
HBDP = 0; %Huntington Beach or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River&lt;br /&gt;
&lt;br /&gt;
GEODAS = 1; %1=use bathy from GEODAS CD (manditory if UCSD or SAR is set above), 0=use original brian chinn sbc_bathy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'process_drifter_data.m' to process all drifters from a single deployment&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;'process_all.m' will go thru and run 'process_drifter_data.m' on all subfolders.&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_summary.csv' files with this format:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit 'deployment_settings.m' to set max depth, dz/dt, lat/lon and velocity limits on the associated plots.&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'do_plots.m', mostly, to set any of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
do_all = 0;   %0 = do plot, 1 = skip&lt;br /&gt;
do_all_anim = 1;&lt;br /&gt;
  SHOW_CODAR_TRACKS = 0; %show interpolated 'simulated drifter' tracks based on CODAR data (uses '*_compare.mat' files) for anim plot&lt;br /&gt;
do_individ_plots = 0;&lt;br /&gt;
do_summaries = 0;&lt;br /&gt;
SHOW_CODAR = 0; %draw the hourly codar vectors on the anim plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate a &amp;quot;stats&amp;quot; page (e.g. start/stop times, average speeds, average depth, number of drifters, etc.)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'make_stats_page.m' (generates all 'stats.php' pages for a deployment area)&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SDSS) on the website, but&lt;br /&gt;
	only the *.png, stats.php &amp;amp; *.gif files (and 'anim' subfolder).&lt;br /&gt;
&amp;lt;li&amp;gt;Copy the '*_summary.log' files to the appropriate deployment type subfolder at E:\User\Carter\data\Drifter_Anal\2_data\AllData&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'compress to *.zip'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to U:\public_html\drifter\data\data.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update 'mod_date.txt' with correct (today's) modified date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check &amp;lt;a href=&amp;quot;http://drifterdata.com&amp;quot;&amp;gt;website&amp;lt;/a&amp;gt; looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Syncronize E:\User\Carter with /home/data318/kirk&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=35</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=35"/>
		<updated>2009-07-17T18:00:56Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning| '''THIS PAGE IS NOT DONE''' }}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the ''kirk'' folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and commented out), then copy these uncommented deployment times to&lt;br /&gt;
  the top of it to fetch the data.  Note, when in the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering start at 1.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least before or at start and a time after or at ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in '..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;' folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and make a copy of this &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, when done, press 'SAVE' button, and then the 'EXIT' button.&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:clean_up_overview.png]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr;: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save your changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Colors of locations:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Green: in-water flag is 1 (i.e. in-water)&lt;br /&gt;
    &amp;lt;li&amp;gt;Red: in-water flag is 0 (i.e. out-of-water, will be skipped in processing)&lt;br /&gt;
    &amp;lt;li&amp;gt;Pink: in-water flag is 2 (i.e. this report is flagged as bogus or questionable and will be skipped in processing)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right side bar:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;first column is consecutive number count for this drifter.&lt;br /&gt;
    &amp;lt;li&amp;gt;second column is first digit of drifter number (change this if/when drifter is redeployed)&lt;br /&gt;
    &amp;lt;li&amp;gt;third column is time of report (GMT)&lt;br /&gt;
    &amp;lt;li&amp;gt;fourth column is in-water flag value&lt;br /&gt;
    &amp;lt;li&amp;gt;scroll bar on right side is for, well, scrolling around different times&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Zoom in and scroll around as you need to.&lt;br /&gt;
&amp;lt;li&amp;gt;So, again the goal is to:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Ensure points where the drifter was out of the water have an in-water flag of &amp;lt;b&amp;gt;0&amp;lt;/b&amp;gt; (red point on map), and when it was drifting have the in-water flag of &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt; (green point on map).&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Delete the file &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt;  [you made a copy of it already, &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;Rename the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file, naming it &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt;. The format of the &amp;quot;MOD&amp;quot; file which this script output is different than the &amp;quot;ORIG&amp;quot; one fetched.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The output format is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;LEFT OFF HERE!&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'process_drifter_data.m'.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;Mostly just need to set one of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work&lt;br /&gt;
SBC_FULL = 0; %all of Santa Barbara Channel for Large Scale Deployments or SCR&lt;br /&gt;
UCSD = 1; %San Diego Imperial Beach&lt;br /&gt;
HBDP = 0; %Huntington Beach or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River&lt;br /&gt;
&lt;br /&gt;
GEODAS = 1; %1=use bathy from GEODAS CD (manditory if UCSD or SAR is set above), 0=use original brian chinn sbc_bathy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'process_drifter_data.m' to process all drifters from a single deployment&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;'process_all.m' will go thru and run 'process_drifter_data.m' on all subfolders.&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_summary.csv' files with this format:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit 'deployment_settings.m' to set max depth, dz/dt, lat/lon and velocity limits on the associated plots.&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'do_plots.m', mostly, to set any of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
do_all = 0;   %0 = do plot, 1 = skip&lt;br /&gt;
do_all_anim = 1;&lt;br /&gt;
  SHOW_CODAR_TRACKS = 0; %show interpolated 'simulated drifter' tracks based on CODAR data (uses '*_compare.mat' files) for anim plot&lt;br /&gt;
do_individ_plots = 0;&lt;br /&gt;
do_summaries = 0;&lt;br /&gt;
SHOW_CODAR = 0; %draw the hourly codar vectors on the anim plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate a &amp;quot;stats&amp;quot; page (e.g. start/stop times, average speeds, average depth, number of drifters, etc.)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'make_stats_page.m' (generates all 'stats.php' pages for a deployment area)&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SDSS) on the website, but&lt;br /&gt;
	only the *.png, stats.php &amp;amp; *.gif files (and 'anim' subfolder).&lt;br /&gt;
&amp;lt;li&amp;gt;Copy the '*_summary.log' files to the appropriate deployment type subfolder at E:\User\Carter\data\Drifter_Anal\2_data\AllData&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'compress to *.zip'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to U:\public_html\drifter\data\data.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update 'mod_date.txt' with correct (today's) modified date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check &amp;lt;a href=&amp;quot;http://drifterdata.com&amp;quot;&amp;gt;website&amp;lt;/a&amp;gt; looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Syncronize E:\User\Carter with /home/data318/kirk&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=34</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=34"/>
		<updated>2009-07-17T17:30:44Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning| '''THIS PAGE IS NOT DONE''' }}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the ''kirk'' folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and commented out), then copy these uncommented deployment times to&lt;br /&gt;
  the top of it to fetch the data.  Note, when in the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering start at 1.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least before or at start and a time after or at ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in '..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;' folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and make a copy of this &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     0          1            2          3         4       5      6      7       8     9    10&lt;br /&gt;
Device_Name,Device_Time,Network_Time,latitude,longitude,satVis,satTrk,recStat,secFix,RSSI,Subm_flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122,2008-10-20 16:19:43,2008-10-20 09:19:00,34.406943,-119.691051,13,9,57348,18,-65,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;, then start the script.&lt;br /&gt;
&amp;lt;li&amp;gt;Proceed to set in-water flags to correct values and split tracks as necessary, when done, press 'SAVE' button, and then the 'EXIT' button.&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES: (yup lots of em)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Here's an overview of what the interface looks like:&lt;br /&gt;
[[Image:clean_up_overview.png]]&lt;br /&gt;
&amp;lt;li&amp;gt;Buttons along the bottom:&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;RESTART: will reload the file and erase any changes you made&lt;br /&gt;
    &amp;lt;li&amp;gt;EXIT: will quit the GUI (without saving)&lt;br /&gt;
    &amp;lt;li&amp;gt;Show point numbers: will reveal next to each point its consecutive number&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;amp;larr;PREV: go to previous drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;NEXT&amp;amp;rarr: go to next drifter&lt;br /&gt;
    &amp;lt;li&amp;gt;SAVE: save you changes&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Delete the file &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt;  [you made a copy of it already, &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;Rename the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file, naming it &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt;. The format of the &amp;quot;MOD&amp;quot; file which this script output is different than the &amp;quot;ORIG&amp;quot; one fetched.&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The output format is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#1 drifter ID&lt;br /&gt;
#2 year&lt;br /&gt;
#3 month&lt;br /&gt;
#4 day&lt;br /&gt;
#5 hour&lt;br /&gt;
#6 minute&lt;br /&gt;
#7 second&lt;br /&gt;
#8 lat&lt;br /&gt;
#9 long&lt;br /&gt;
#10 satelites availiable&lt;br /&gt;
#11 satelites used&lt;br /&gt;
#12 com flag&lt;br /&gt;
#13 Secs to fix&lt;br /&gt;
#14 Mobitex RSSI&lt;br /&gt;
#15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15723122 2008 10 20 16 19 43 34.406943 -119.691051 13 09 57348 018 -065 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;LEFT OFF HERE!&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'process_drifter_data.m'.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;Mostly just need to set one of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work&lt;br /&gt;
SBC_FULL = 0; %all of Santa Barbara Channel for Large Scale Deployments or SCR&lt;br /&gt;
UCSD = 1; %San Diego Imperial Beach&lt;br /&gt;
HBDP = 0; %Huntington Beach or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River&lt;br /&gt;
&lt;br /&gt;
GEODAS = 1; %1=use bathy from GEODAS CD (manditory if UCSD or SAR is set above), 0=use original brian chinn sbc_bathy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'process_drifter_data.m' to process all drifters from a single deployment&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;'process_all.m' will go thru and run 'process_drifter_data.m' on all subfolders.&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_summary.csv' files with this format:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit 'deployment_settings.m' to set max depth, dz/dt, lat/lon and velocity limits on the associated plots.&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'do_plots.m', mostly, to set any of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
do_all = 0;   %0 = do plot, 1 = skip&lt;br /&gt;
do_all_anim = 1;&lt;br /&gt;
  SHOW_CODAR_TRACKS = 0; %show interpolated 'simulated drifter' tracks based on CODAR data (uses '*_compare.mat' files) for anim plot&lt;br /&gt;
do_individ_plots = 0;&lt;br /&gt;
do_summaries = 0;&lt;br /&gt;
SHOW_CODAR = 0; %draw the hourly codar vectors on the anim plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate a &amp;quot;stats&amp;quot; page (e.g. start/stop times, average speeds, average depth, number of drifters, etc.)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'make_stats_page.m' (generates all 'stats.php' pages for a deployment area)&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SDSS) on the website, but&lt;br /&gt;
	only the *.png, stats.php &amp;amp; *.gif files (and 'anim' subfolder).&lt;br /&gt;
&amp;lt;li&amp;gt;Copy the '*_summary.log' files to the appropriate deployment type subfolder at E:\User\Carter\data\Drifter_Anal\2_data\AllData&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'compress to *.zip'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to U:\public_html\drifter\data\data.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update 'mod_date.txt' with correct (today's) modified date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check &amp;lt;a href=&amp;quot;http://drifterdata.com&amp;quot;&amp;gt;website&amp;lt;/a&amp;gt; looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Syncronize E:\User\Carter with /home/data318/kirk&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=33</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=33"/>
		<updated>2009-07-17T17:17:10Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning| '''THIS PAGE IS NOT DONE''' }}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the ''kirk'' folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and commented out), then copy these uncommented deployment times to&lt;br /&gt;
  the top of it to fetch the data.  Note, when in the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering start at 1.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least before or at start and a time after or at ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in '..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;' folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and make a copy of this &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      #1 drifter ID&lt;br /&gt;
      #2 year&lt;br /&gt;
      #3 month&lt;br /&gt;
      #4 day&lt;br /&gt;
      #5 hour&lt;br /&gt;
      #6 minute&lt;br /&gt;
      #7 second&lt;br /&gt;
      #8 lat&lt;br /&gt;
      #9 long&lt;br /&gt;
     #10 satelites availiable&lt;br /&gt;
     #11 satelites used&lt;br /&gt;
     #12 com flag&lt;br /&gt;
     #13 Secs to fix&lt;br /&gt;
     #14 Mobitex RSSI&lt;br /&gt;
     #15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and:&lt;br /&gt;
   &amp;lt;ol type=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Delete the file &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt;  [you made a copy of it already, &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;Rename the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file, naming it &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt;&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;LEFT OFF HERE!&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'process_drifter_data.m'.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;Mostly just need to set one of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work&lt;br /&gt;
SBC_FULL = 0; %all of Santa Barbara Channel for Large Scale Deployments or SCR&lt;br /&gt;
UCSD = 1; %San Diego Imperial Beach&lt;br /&gt;
HBDP = 0; %Huntington Beach or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River&lt;br /&gt;
&lt;br /&gt;
GEODAS = 1; %1=use bathy from GEODAS CD (manditory if UCSD or SAR is set above), 0=use original brian chinn sbc_bathy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'process_drifter_data.m' to process all drifters from a single deployment&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;'process_all.m' will go thru and run 'process_drifter_data.m' on all subfolders.&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_summary.csv' files with this format:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit 'deployment_settings.m' to set max depth, dz/dt, lat/lon and velocity limits on the associated plots.&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'do_plots.m', mostly, to set any of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
do_all = 0;   %0 = do plot, 1 = skip&lt;br /&gt;
do_all_anim = 1;&lt;br /&gt;
  SHOW_CODAR_TRACKS = 0; %show interpolated 'simulated drifter' tracks based on CODAR data (uses '*_compare.mat' files) for anim plot&lt;br /&gt;
do_individ_plots = 0;&lt;br /&gt;
do_summaries = 0;&lt;br /&gt;
SHOW_CODAR = 0; %draw the hourly codar vectors on the anim plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate a &amp;quot;stats&amp;quot; page (e.g. start/stop times, average speeds, average depth, number of drifters, etc.)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'make_stats_page.m' (generates all 'stats.php' pages for a deployment area)&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SDSS) on the website, but&lt;br /&gt;
	only the *.png, stats.php &amp;amp; *.gif files (and 'anim' subfolder).&lt;br /&gt;
&amp;lt;li&amp;gt;Copy the '*_summary.log' files to the appropriate deployment type subfolder at E:\User\Carter\data\Drifter_Anal\2_data\AllData&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'compress to *.zip'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to U:\public_html\drifter\data\data.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update 'mod_date.txt' with correct (today's) modified date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check &amp;lt;a href=&amp;quot;http://drifterdata.com&amp;quot;&amp;gt;website&amp;lt;/a&amp;gt; looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Syncronize E:\User\Carter with /home/data318/kirk&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=32</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=32"/>
		<updated>2009-07-17T17:15:44Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning| '''THIS PAGE IS NOT DONE''' }}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the ''kirk'' folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and commented out), then copy these uncommented deployment times to&lt;br /&gt;
  the top of it to fetch the data.  Note, when in the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering start at 1.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least before or at start and a time after or at ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in '..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;' folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and make a copy of this &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file, naming the copy &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; (to set GPS fix quality flags=1 (bad), to have in-water flag value of 0 so they effectively get skipped) and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; (to set GPS fix quality flags=2 (2D), to have in-water flag value of 2 to aid in eliminating them in the next section) in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      #1 drifter ID&lt;br /&gt;
      #2 year&lt;br /&gt;
      #3 month&lt;br /&gt;
      #4 day&lt;br /&gt;
      #5 hour&lt;br /&gt;
      #6 minute&lt;br /&gt;
      #7 second&lt;br /&gt;
      #8 lat&lt;br /&gt;
      #9 long&lt;br /&gt;
     #10 satelites availiable&lt;br /&gt;
     #11 satelites used&lt;br /&gt;
     #12 com flag&lt;br /&gt;
     #13 Secs to fix&lt;br /&gt;
     #14 Mobitex RSSI&lt;br /&gt;
     #15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: To visually fix these two problems: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top of &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;pathroot&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Go to the folder and:&lt;br /&gt;
   &amp;lt;ol style=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Delete the file &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt;  [you made a copy of it already, &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.ORIG.log&amp;lt;/i&amp;gt;]&lt;br /&gt;
      &amp;lt;li&amp;gt;Rename the file &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.MOD.log&amp;lt;/b&amp;gt; file, naming it &amp;lt;b&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/b&amp;gt;&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;LEFT OFF HERE!&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'process_drifter_data.m'.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;Mostly just need to set one of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work&lt;br /&gt;
SBC_FULL = 0; %all of Santa Barbara Channel for Large Scale Deployments or SCR&lt;br /&gt;
UCSD = 1; %San Diego Imperial Beach&lt;br /&gt;
HBDP = 0; %Huntington Beach or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River&lt;br /&gt;
&lt;br /&gt;
GEODAS = 1; %1=use bathy from GEODAS CD (manditory if UCSD or SAR is set above), 0=use original brian chinn sbc_bathy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'process_drifter_data.m' to process all drifters from a single deployment&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;'process_all.m' will go thru and run 'process_drifter_data.m' on all subfolders.&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_summary.csv' files with this format:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit 'deployment_settings.m' to set max depth, dz/dt, lat/lon and velocity limits on the associated plots.&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'do_plots.m', mostly, to set any of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
do_all = 0;   %0 = do plot, 1 = skip&lt;br /&gt;
do_all_anim = 1;&lt;br /&gt;
  SHOW_CODAR_TRACKS = 0; %show interpolated 'simulated drifter' tracks based on CODAR data (uses '*_compare.mat' files) for anim plot&lt;br /&gt;
do_individ_plots = 0;&lt;br /&gt;
do_summaries = 0;&lt;br /&gt;
SHOW_CODAR = 0; %draw the hourly codar vectors on the anim plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate a &amp;quot;stats&amp;quot; page (e.g. start/stop times, average speeds, average depth, number of drifters, etc.)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'make_stats_page.m' (generates all 'stats.php' pages for a deployment area)&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SDSS) on the website, but&lt;br /&gt;
	only the *.png, stats.php &amp;amp; *.gif files (and 'anim' subfolder).&lt;br /&gt;
&amp;lt;li&amp;gt;Copy the '*_summary.log' files to the appropriate deployment type subfolder at E:\User\Carter\data\Drifter_Anal\2_data\AllData&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'compress to *.zip'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to U:\public_html\drifter\data\data.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update 'mod_date.txt' with correct (today's) modified date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check &amp;lt;a href=&amp;quot;http://drifterdata.com&amp;quot;&amp;gt;website&amp;lt;/a&amp;gt; looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Syncronize E:\User\Carter with /home/data318/kirk&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=31</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=31"/>
		<updated>2009-07-17T16:38:48Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning| '''THIS PAGE IS NOT DONE''' }}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the ''kirk'' folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Track drifter usage history&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Fetch the appropriate data from pacificgyre.com&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and commented out), then copy these uncommented deployment times to&lt;br /&gt;
  the top of it to fetch the data.  Note, when in the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering start at 1.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least before or at start and a time after or at ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly&lt;br /&gt;
   &amp;lt;li&amp;gt;Data will be saved in '..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;' folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
   &amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      #1 drifter ID&lt;br /&gt;
      #2 year&lt;br /&gt;
      #3 month&lt;br /&gt;
      #4 day&lt;br /&gt;
      #5 hour&lt;br /&gt;
      #6 minute&lt;br /&gt;
      #7 second&lt;br /&gt;
      #8 lat&lt;br /&gt;
      #9 long&lt;br /&gt;
     #10 satelites availiable&lt;br /&gt;
     #11 satelites used&lt;br /&gt;
     #12 com flag&lt;br /&gt;
     #13 Secs to fix&lt;br /&gt;
     #14 Mobitex RSSI&lt;br /&gt;
     #15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Two things: the drifters sometimes get redeployed and so tracks need to be split, also the in-water flags are sometimes wrong (e.g. due to faulty sensor or water in bucket). This step is to fix both of these problems.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt; at the top.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;LEFT OFF HERE!&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: This is the step which takes the data and calculates all the derived products (e.g. dz/dt, u &amp;amp; v velocities, etc.) and outputs a standard formatted file of good data (optionally in interpolated round 10 minute steps).&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'process_drifter_data.m'.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;Mostly just need to set one of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SBCIS_SBCSS = 0;%UCSB inner shelf or small-scale CODAR area work&lt;br /&gt;
SBC_FULL = 0; %all of Santa Barbara Channel for Large Scale Deployments or SCR&lt;br /&gt;
UCSD = 1; %San Diego Imperial Beach&lt;br /&gt;
HBDP = 0; %Huntington Beach or Dana Point (DPIO) area&lt;br /&gt;
SAR = 0; %Santa Ana River&lt;br /&gt;
&lt;br /&gt;
GEODAS = 1; %1=use bathy from GEODAS CD (manditory if UCSD or SAR is set above), 0=use original brian chinn sbc_bathy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'process_drifter_data.m' to process all drifters from a single deployment&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;'process_all.m' will go thru and run 'process_drifter_data.m' on all subfolders.&lt;br /&gt;
   &amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_summary.csv' files with this format:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate the 4 different types of plots:  All tracks, all tracks animated, individual tracks, and summary plots.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Edit 'deployment_settings.m' to set max depth, dz/dt, lat/lon and velocity limits on the associated plots.&lt;br /&gt;
&amp;lt;li&amp;gt;Edit top portion of 'do_plots.m', mostly, to set any of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
do_all = 0;   %0 = do plot, 1 = skip&lt;br /&gt;
do_all_anim = 1;&lt;br /&gt;
  SHOW_CODAR_TRACKS = 0; %show interpolated 'simulated drifter' tracks based on CODAR data (uses '*_compare.mat' files) for anim plot&lt;br /&gt;
do_individ_plots = 0;&lt;br /&gt;
do_summaries = 0;&lt;br /&gt;
SHOW_CODAR = 0; %draw the hourly codar vectors on the anim plot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Purpose: Generate a &amp;quot;stats&amp;quot; page (e.g. start/stop times, average speeds, average depth, number of drifters, etc.)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'make_stats_page.m' (generates all 'stats.php' pages for a deployment area)&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SDSS) on the website, but&lt;br /&gt;
	only the *.png, stats.php &amp;amp; *.gif files (and 'anim' subfolder).&lt;br /&gt;
&amp;lt;li&amp;gt;Copy the '*_summary.log' files to the appropriate deployment type subfolder at E:\User\Carter\data\Drifter_Anal\2_data\AllData&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'compress to *.zip'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to U:\public_html\drifter\data\data.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update 'mod_date.txt' with correct (today's) modified date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check &amp;lt;a href=&amp;quot;http://drifterdata.com&amp;quot;&amp;gt;website&amp;lt;/a&amp;gt; looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Syncronize E:\User\Carter with /home/data318/kirk&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=30</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=30"/>
		<updated>2009-07-17T16:19:14Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning| '''THIS PAGE IS NOT DONE''' }}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at '''/home/locl/users/kirk/''' (hereafter referred to as '..../kirk/') in the '''data''' or '''user''' subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the ''kirk'' folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt; &amp;lt;!-- see matching at bottom --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;span style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;Note that this file is now out of date&amp;lt;/span&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
	 Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and commented out), then copy these uncommented deployment times to&lt;br /&gt;
  the top of it to fetch the data.  Note, when in the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering start at 1.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least before or at start and a time after or at ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly&lt;br /&gt;
&amp;lt;li&amp;gt;Data will be saved in '..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;' folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
&amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
&amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      #1 drifter ID&lt;br /&gt;
      #2 year&lt;br /&gt;
      #3 month&lt;br /&gt;
      #4 day&lt;br /&gt;
      #5 hour&lt;br /&gt;
      #6 minute&lt;br /&gt;
      #7 second&lt;br /&gt;
      #8 lat&lt;br /&gt;
      #9 long&lt;br /&gt;
     #10 satelites availiable&lt;br /&gt;
     #11 satelites used&lt;br /&gt;
     #12 com flag&lt;br /&gt;
     #13 Secs to fix&lt;br /&gt;
     #14 Mobitex RSSI&lt;br /&gt;
     #15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt; at the top.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:1px;&amp;quot;&amp;gt;LEFT OFF HERE!&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3_process_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot;&amp;gt;Edit top portion of 'process_drifter_data.m'.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;Mostly just need to set one of these:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;mygeneral1-identifier&amp;quot;&amp;gt;SBCIS_SBCSS &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;=&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-number&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-comment&amp;quot;&amp;gt;%UCSB inner shelf or small-scale CODAR area work&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;mygeneral1-identifier&amp;quot;&amp;gt;SBC_FULL &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;=&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-number&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-comment&amp;quot;&amp;gt;%all of Santa Barbara Channel for Large Scale Deployments or SCR&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;mygeneral1-identifier&amp;quot;&amp;gt;UCSD &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;=&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-number&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-comment&amp;quot;&amp;gt;%San Diego Imperial Beach&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;mygeneral1-identifier&amp;quot;&amp;gt;HBDP &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;=&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-number&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-comment&amp;quot;&amp;gt;%Huntington Beach or Dana Point (DPIO) area&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;mygeneral1-identifier&amp;quot;&amp;gt;SAR &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;=&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-number&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-comment&amp;quot;&amp;gt;%Santa Ana River&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;mygeneral1-identifier&amp;quot;&amp;gt;GEODAS &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;=&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-number&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-comment&amp;quot;&amp;gt;%1=use bathy from GEODAS CD (manditory if UCSD or SAR is set above), 0=use original brian chinn sbc_bathy&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot;&amp;gt;Run 'process_drifter_data.m' to process all drifters from a single deployment&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'process_all.m' will go thru and run 'process_drifter_data.m' on all subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;Will generate '&amp;lt;i&amp;gt;yyyymmdd_drifter#&amp;lt;/i&amp;gt;_summary.csv' files with this format:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         #1 drifter ID&lt;br /&gt;
         #2 year&lt;br /&gt;
         #3 month&lt;br /&gt;
         #4 day&lt;br /&gt;
         #5 hour&lt;br /&gt;
         #6 minute&lt;br /&gt;
         #7 second&lt;br /&gt;
         #8 lat&lt;br /&gt;
         #9 lon&lt;br /&gt;
    *   #10 u vel (cm/s)&lt;br /&gt;
    *   #11 v vel (cm/s)&lt;br /&gt;
    *   #12 along velocity (cm/s)&lt;br /&gt;
    *   #13 across (offshore) velocity (cm/s)&lt;br /&gt;
    *   #14 depth (m)&lt;br /&gt;
    *   #15 dz/dt (cm/s)&lt;br /&gt;
    *   #16 serial time&lt;br /&gt;
        #17 satellites available&lt;br /&gt;
        #18 satellites used&lt;br /&gt;
        #19 com flag/Receiving status&lt;br /&gt;
        #20 Secs to fix&lt;br /&gt;
        #21 Mobitex RSSI&lt;br /&gt;
&lt;br /&gt;
    * denotes a derived product&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 3b_plot_drifter_data&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot;&amp;gt;Edit 'deployment_settings.m' to set max depth, dz/dt, lat/lon and velocity limits on the associated plots.&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot;&amp;gt;Edit top portion of 'do_plots.m'.&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Mostly, to set any of these:&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;mygeneral1-identifier&amp;quot;&amp;gt;do_all &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;=&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-number&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt;   &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-comment&amp;quot;&amp;gt;%0 = do plot, 1 = skip&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;mygeneral1-identifier&amp;quot;&amp;gt;do_all_anim &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;=&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-number&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;;&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt;  SHOW_CODAR_TRACKS &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;=&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-number&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-comment&amp;quot;&amp;gt;%show interpolated 'simulated drifter' tracks based on CODAR data (uses '*_compare.mat' files) for anim plot&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;mygeneral1-identifier&amp;quot;&amp;gt;do_individ_plots &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;=&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-number&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;;&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;mygeneral1-identifier&amp;quot;&amp;gt;do_summaries &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;=&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-number&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;;&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;mygeneral1-identifier&amp;quot;&amp;gt;SHOW_CODAR &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;=&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-number&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-symbol&amp;quot;&amp;gt;;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-space&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mygeneral1-comment&amp;quot;&amp;gt;%draw the hourly codar vectors on the anim plot&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;folder: 4_make_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run 'make_stats_page.m' (generates all 'stats.php' pages for a deployment area)&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this deployment's folder (e.g. 20050425) to root folder of deployment type (e.g. SDSS) on the website, but&lt;br /&gt;
	only the *.png, stats.php &amp;amp; *.gif files (and 'anim' subfolder).&lt;br /&gt;
&amp;lt;li&amp;gt;Copy the '*_summary.log' files to the appropriate deployment type subfolder at E:\User\Carter\data\Drifter_Anal\2_data\AllData&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click on that folder you just copied those files to, and chose 'compress to *.zip'.&lt;br /&gt;
&amp;lt;li&amp;gt;Move that generated *.zip folder to U:\public_html\drifter\data\data.&lt;br /&gt;
&amp;lt;li&amp;gt;On web, update 'mod_date.txt' with correct (today's) modified date.&lt;br /&gt;
&amp;lt;li&amp;gt;Check &amp;lt;a href=&amp;quot;http://drifterdata.com&amp;quot;&amp;gt;website&amp;lt;/a&amp;gt; looks good.&lt;br /&gt;
&amp;lt;li&amp;gt;Syncronize E:\User\Carter with /home/data318/kirk&lt;br /&gt;
&amp;lt;li&amp;gt;Have a beer.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;!-- from way near top --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=Template:Warning&amp;diff=29</id>
		<title>Template:Warning</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=Template:Warning&amp;diff=29"/>
		<updated>2009-07-17T06:43:11Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#FFEEEE;padding:3px;&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:warning.jpg]] '''WARNING:''' {{{1}}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=Template:Warning&amp;diff=28</id>
		<title>Template:Warning</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=Template:Warning&amp;diff=28"/>
		<updated>2009-07-17T06:42:43Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#f9ffff;padding:3px;&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:warning.jpg]] '''WARNING:''' {{{1}}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=File:Warning.jpg&amp;diff=27</id>
		<title>File:Warning.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=File:Warning.jpg&amp;diff=27"/>
		<updated>2009-07-17T06:42:19Z</updated>

		<summary type="html">&lt;p&gt;Kirk: Warning icon&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Warning icon&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=26</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=26"/>
		<updated>2009-07-17T06:40:18Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning| '''THIS PAGE IS NOT DONE''' }}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at /home/locl/users/kirk/ (hereafter referred to as '..../kirk/') in the &amp;lt;b&amp;gt;data&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;user&amp;lt;/b&amp;gt; subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the &amp;lt;i&amp;gt;kirk&amp;lt;/i&amp;gt; folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;i&amp;gt;Note that this file is now out of date&amp;lt;/i&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
	 Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and commented out), then copy these uncommented deployment times to&lt;br /&gt;
  the top of it to fetch the data.  Note, when in the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering start at 1.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least before or at start and a time after or at ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly&lt;br /&gt;
&amp;lt;li&amp;gt;Data will be saved in '..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;' folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
&amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
&amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      #1 drifter ID&lt;br /&gt;
      #2 year&lt;br /&gt;
      #3 month&lt;br /&gt;
      #4 day&lt;br /&gt;
      #5 hour&lt;br /&gt;
      #6 minute&lt;br /&gt;
      #7 second&lt;br /&gt;
      #8 lat&lt;br /&gt;
      #9 long&lt;br /&gt;
     #10 satelites availiable&lt;br /&gt;
     #11 satelites used&lt;br /&gt;
     #12 com flag&lt;br /&gt;
     #13 Secs to fix&lt;br /&gt;
     #14 Mobitex RSSI&lt;br /&gt;
     #15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt; at the top.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=Template:Warning&amp;diff=25</id>
		<title>Template:Warning</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=Template:Warning&amp;diff=25"/>
		<updated>2009-07-17T06:38:26Z</updated>

		<summary type="html">&lt;p&gt;Kirk: New page: &amp;lt;div style=&amp;quot;border:1px solid red;background-color:#f9ffff;padding:3px;&amp;quot;&amp;gt; Image:http://www.tomtom.com/lib/img/cs/warning.jpg '''WARNING:''' {{{1}}} &amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border:1px solid red;background-color:#f9ffff;padding:3px;&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:http://www.tomtom.com/lib/img/cs/warning.jpg]] '''WARNING:''' {{{1}}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=24</id>
		<title>HOWTO Drifter Data Processing</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=HOWTO_Drifter_Data_Processing&amp;diff=24"/>
		<updated>2009-07-17T06:35:06Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Kirk's HOWTO on processing Drifter data&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;{{warning}} '''THIS PAGE IS NOT DONE'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow these steps to process 'raw' drifter data from [http://www.pacificgyre.com pacificgyre] to final posting on our website:&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Notes:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once proficient, it takes about 20 min to process a typical day's deployment.&lt;br /&gt;
&amp;lt;li&amp;gt;Folders/files referenced here can be found on the ICESS network at /home/locl/users/kirk/ (hereafter referred to as '..../kirk/') in the &amp;lt;b&amp;gt;data&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;user&amp;lt;/b&amp;gt; subfolders.&lt;br /&gt;
&amp;lt;li&amp;gt;You should copy the &amp;lt;i&amp;gt;kirk&amp;lt;/i&amp;gt; folder contents to your local computer and run the scripts there instead of on the server.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/0_Info&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;On deployment day&amp;lt;/b&amp;gt;: be sure to fill out .../kirk/user/0_Info/&amp;lt;b&amp;gt;drifter_hist.xls&amp;lt;/b&amp;gt; (drifter history) with the&lt;br /&gt;
performance of the drifters to track if there are any consistent problems (&amp;lt;i&amp;gt;Note that this file is now out of date&amp;lt;/i&amp;gt;).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/1_get_data_from_web&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;data_dates.m&amp;lt;/b&amp;gt; with the start/stop date/times to get.&amp;lt;br&amp;gt;&lt;br /&gt;
	 Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use the [http://pacificgyre.com http://pacificgyre.com] website (log: &amp;lt;i&amp;gt;ohlmann&amp;lt;/i&amp;gt;, pass: &amp;lt;i&amp;gt;drifterguy&amp;lt;/i&amp;gt;) if you need to get an estimation of&lt;br /&gt;
 		 when the drifters went in and came out of the water (look at in-water flag values), or go to &lt;br /&gt;
             [http://www.icess.ucsb.edu/drifter/realtime/BETA.php http://www.icess.ucsb.edu/drifter/realtime/BETA.php] and enter custom times.&lt;br /&gt;
  &amp;lt;li&amp;gt;Keep adding date/times to the bottom of this file (or in the appropriate &amp;quot;deployment type&amp;quot; area (e.g. SBCLS), and commented out), then copy these uncommented deployment times to&lt;br /&gt;
  the top of it to fetch the data.  Note, when in the &amp;quot;deployment type&amp;quot; groups, I number the 'dates' sequentially, but when copying one or two of them to the top to fetch, you need to make sure those 'dates' numbering start at 1.&lt;br /&gt;
  &amp;lt;li&amp;gt;You don't have to be exact on the times (cleanup happens in following steps), just be sure you have a time at least before or at start and a time after or at ending deployment. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;b&amp;gt;get_data.m&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Be sure the &amp;lt;b&amp;gt;IRIDIUM&amp;lt;/b&amp;gt; value in it is set correctly&lt;br /&gt;
&amp;lt;li&amp;gt;Data will be saved in '..../kirk/data/Drifter_Anal/2_data/&amp;lt;i&amp;gt;yyyymmdd&amp;lt;/i&amp;gt;' folder as a &amp;lt;i&amp;gt;yyyymmdd_drifter_dat.log&amp;lt;/i&amp;gt; file.&lt;br /&gt;
&amp;lt;li&amp;gt;Now, move that folder into a 'deployment type' folder (e.g. .../kirk/data/Drifter_Anal/2_data/&amp;lt;b&amp;gt;SBCLS&amp;lt;/b&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If IRIDIUM is set, you may want to check the settings of &amp;lt;b&amp;gt;REMOVE_GPS_01&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;CONVERT_GPS_2_TO_2&amp;lt;/b&amp;gt; in the &amp;lt;b&amp;gt;convert_Iridium_reports_to_Microstar_format.m&amp;lt;/b&amp;gt; file.&lt;br /&gt;
&amp;lt;li&amp;gt;Data format (column numbers):&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      #1 drifter ID&lt;br /&gt;
      #2 year&lt;br /&gt;
      #3 month&lt;br /&gt;
      #4 day&lt;br /&gt;
      #5 hour&lt;br /&gt;
      #6 minute&lt;br /&gt;
      #7 second&lt;br /&gt;
      #8 lat&lt;br /&gt;
      #9 long&lt;br /&gt;
     #10 satelites availiable&lt;br /&gt;
     #11 satelites used&lt;br /&gt;
     #12 com flag&lt;br /&gt;
     #13 Secs to fix&lt;br /&gt;
     #14 Mobitex RSSI&lt;br /&gt;
     #15 in-water flag&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Folder:  .../kirk/user/2_clean_up&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit &amp;lt;b&amp;gt;clean_up_drifter_data.m&amp;lt;/b&amp;gt; with the correct &amp;lt;b&amp;gt;area&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;deploy_date&amp;lt;/b&amp;gt; at the top.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=PWS_Drifter_Realtime_Webpage_Info&amp;diff=23</id>
		<title>PWS Drifter Realtime Webpage Info</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=PWS_Drifter_Realtime_Webpage_Info&amp;diff=23"/>
		<updated>2009-07-17T06:17:32Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Prince William Sound, Alaska Drifter Realtime Webpage Wiki&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Page can be found at: [http://pws.drifterdata.com http://pws.drifterdata.com] or [http://www.icess.ucsb.edu/drifter/realtime-PWS/ http://www.icess.ucsb.edu/drifter/realtime-PWS/], and it's help page [http://www.icess.ucsb.edu/drifter/realtime-PWS/help/ here]. Other deployment info can be found [http://ak.aoos.org/aoos/fieldexp/data_by_pi-researcher.html here].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
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 [http://www.icess.ucsb.edu/drifter/realtime/ realtime page].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;File Locations&amp;lt;/h2&amp;gt;&lt;br /&gt;
The data files must be uploaded (e.g. via ftp or sftp, for Mac one can use [http://filezilla-project.org/download.php filezilla]) 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.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There is also a '''BOX_COORDINATES.txt''' there (and README file) for setting coordinates for a box. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;File Formats&amp;lt;/h2&amp;gt;&lt;br /&gt;
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 &amp;quot;NaN&amp;quot;.  We really only care about 5 things ('''drifter_number, date/time, lat, lon, &amp;amp; SST'''), so if any of those other 4 fields are a &amp;quot;NaN&amp;quot; it should be skipped anyway since they contain critical information.  As for any &amp;quot;non critical&amp;quot; columns, (e.g. &amp;quot;FoM&amp;quot; or &amp;quot;Batt volts&amp;quot; [if we set that up to be a valid column] or whatever) can contain anything since we're ignoring those columns anyway.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
1) SVP.  The info [http://penguin.sfos.uaf.edu/output/pws/Halverson/SVP/ASCII/20090409/ here]&lt;br /&gt;
still doesn't show which column will have the drifter number, so for now, I'm assuming it will be the first.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
% Pacific Gyre SVP  -   Drogue center: 10m   -  ARGOS telemetry&lt;br /&gt;
%  Drifter #  Date/Time (UTC)   Lat      Lon   FoM SST [C]&lt;br /&gt;
1234  2009/04/09 22:30:00 60.5503 -145.7611 1 5.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Coast Guard SLDMBs&lt;br /&gt;
The email from Rob Cermak on Jul 9th @ 17:39 has &lt;br /&gt;
[http://penguin.sfos.uaf.edu/output/pws/Ohlmann/SLDMBS/GNOME/20090528/SLDMBS_20090528_0823_processed.txt this link]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, this is the format it's ready for this type format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Shape|OBJECTID|Buoynum|ZDateTime|DateTime|Location&lt;br /&gt;
|1|38669|232030Z MAY 09|39956.85|20-57.453N  071-20.205W&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) Oil Spill Resp.&lt;br /&gt;
For now it's setup to be exactly in the same format as the SVP (but with one header line instead of two)&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%  Drifter #  Date/Time (UTC)   Lat      Lon   FoM SST [C]&lt;br /&gt;
1234  2009/04/09 22:30:00 60.5503 -145.7611 1 5.0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Parsing Files&amp;lt;/h2&amp;gt;&lt;br /&gt;
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 [http://us.php.net/manual/en/reference.pcre.pattern.syntax.php regular expression] (i.e. preg_match) checking to ensure that any misformatted data is skipped.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Other Notes&amp;lt;/h2&amp;gt;&lt;br /&gt;
If for some reason, the javascript code needs to be edited, it's at '''/home/kirk/public_html/drifter/realtime-PWS/''', and there are 2 main javascript files: '''ajax.js''', '''map.js''' (with 'message.js' and 'YFT.js' providing less important support).  Note that really, you want to edit the javascript files with __UNCOMPRESSED__ in their name (as the files w/o that in their name were compressed using [http://dean.edwards.name/packer/ this tool]).  If you want to use these uncompressed files, you need to edit the '''index.php''' file and set '''$USE_UNCOMPRESSED''' to '''1'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Iridium Notes&amp;lt;/h2&amp;gt;&lt;br /&gt;
These will show on the normal [http://www.icess.ucsb.edu/drifter/realtime/ realtime page]. If the drifter numbers to receive data for need tweaking, this file, '''/home/kirk/public_html/drifter/realtime/getdata.php''', needs to be edited around line 425. Or to show more or less hour's worth of reports, edit the '''$NUM_HRS_TO_GET''' value on line 40 (currently set to 12).&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=PWS_Drifter_Realtime_Webpage_Info&amp;diff=22</id>
		<title>PWS Drifter Realtime Webpage Info</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=PWS_Drifter_Realtime_Webpage_Info&amp;diff=22"/>
		<updated>2009-07-17T06:14:46Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Prince William Sound, Alaska Drifter Realtime Webpage Wiki&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Page can be found at: [http://pws.drifterdata.com http://pws.drifterdata.com] or [http://www.icess.ucsb.edu/drifter/realtime-PWS/ http://www.icess.ucsb.edu/drifter/realtime-PWS/], and it's help page [http://www.icess.ucsb.edu/drifter/realtime-PWS/help/ here]. Other deployment info can be found [http://ak.aoos.org/aoos/fieldexp/data_by_pi-researcher.html here].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
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 [http://www.icess.ucsb.edu/drifter/realtime/ realtime page].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;File Locations&amp;lt;/h2&amp;gt;&lt;br /&gt;
The data files must be uploaded (e.g. via ftp or sftp, for Mac one can use [http://filezilla-project.org/download.php filezilla]) 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.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There is also a '''BOX_COORDINATES.txt''' there (and README file) for setting coordinates for a box. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;File Formats&amp;lt;/h2&amp;gt;&lt;br /&gt;
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 &amp;quot;NaN&amp;quot;.  We really only care about 5 things ('''drifter_number, date/time, lat, lon, &amp;amp; SST'''), so if any of those other 4 fields are a &amp;quot;NaN&amp;quot; it should be skipped anyway since they contain critical information.  As for any &amp;quot;non critical&amp;quot; columns, (e.g. &amp;quot;FoM&amp;quot; or &amp;quot;Batt volts&amp;quot; [if we set that up to be a valid column] or whatever) can contain anything since we're ignoring those columns anyway.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
1) SVP.  The info [http://penguin.sfos.uaf.edu/output/pws/Halverson/SVP/ASCII/20090409/ here]&lt;br /&gt;
still doesn't show which column will have the drifter number, so for now, I'm assuming it will be the first.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
% Pacific Gyre SVP  -   Drogue center: 10m   -  ARGOS telemetry&lt;br /&gt;
%  Drifter #  Date/Time (UTC)   Lat      Lon   FoM SST [C]&lt;br /&gt;
1234  2009/04/09 22:30:00 60.5503 -145.7611 1 5.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Coast Guard SLDMBs&lt;br /&gt;
The email from Rob Cermak on Jul 9th @ 17:39 has &lt;br /&gt;
[http://penguin.sfos.uaf.edu/output/pws/Ohlmann/SLDMBS/GNOME/20090528/SLDMBS_20090528_0823_processed.txt this link]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, this is the format it's ready for this type format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Shape|OBJECTID|Buoynum|ZDateTime|DateTime|Location&lt;br /&gt;
|1|38669|232030Z MAY 09|39956.85|20-57.453N  071-20.205W&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) Oil Spill Resp.&lt;br /&gt;
For now it's setup to be exactly in the same format as the SVP (but with one header line instead of two)&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%  Drifter #  Date/Time (UTC)   Lat      Lon   FoM SST [C]&lt;br /&gt;
1234  2009/04/09 22:30:00 60.5503 -145.7611 1 5.0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Parsing Files&amp;lt;/h2&amp;gt;&lt;br /&gt;
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 [http://us.php.net/manual/en/reference.pcre.pattern.syntax.php regular expression] (i.e. preg_match) checking to ensure that any misformatted data is skipped.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Other Notes&amp;lt;/h2&amp;gt;&lt;br /&gt;
If for some reason, the javascript code needs to be edited, it's at '''/home/kirk/public_html/drifter/realtime-PWS/''', and there are 2 main javascript files: '''ajax.js''', '''map.js''' (with 'message.js' and 'YFT.js' providing less important support).  Note that really, you want to edit the javascript files with __UNCOMPRESSED__ in their name (as the files w/o that in their name were compressed using [http://dean.edwards.name/packer/ this tool]).  If you want to use these uncompressed files, you need to edit the '''index.php''' file and set '''$USE_UNCOMPRESSED''' to '''1'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Iridium Notes&amp;lt;/h2&amp;gt;&lt;br /&gt;
These will show on the normal [http://www.icess.ucsb.edu/drifter/realtime/ realtime page]. If the drifter numbers to receive need tweaked, this file, '''/home/kirk/public_html/drifter/realtime/getdata.php''', needs to be edited around line 425.&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=PWS_Drifter_Realtime_Webpage_Info&amp;diff=21</id>
		<title>PWS Drifter Realtime Webpage Info</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=PWS_Drifter_Realtime_Webpage_Info&amp;diff=21"/>
		<updated>2009-07-17T06:08:47Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Prince William Sound, Alaska Drifter Realtime Webpage Wiki&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Page can be found at: [http://pws.drifterdata.com http://pws.drifterdata.com] or [http://www.icess.ucsb.edu/drifter/realtime-PWS/ http://www.icess.ucsb.edu/drifter/realtime-PWS/], and it's help page [http://www.icess.ucsb.edu/drifter/realtime-PWS/help/ here]. Other deployment info can be found [http://ak.aoos.org/aoos/fieldexp/data_by_pi-researcher.html here].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
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 [http://www.icess.ucsb.edu/drifter/realtime/ realtime page].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;File Locations&amp;lt;/h2&amp;gt;&lt;br /&gt;
The data files must be uploaded (e.g. via ftp or sftp, for Mac one can use [http://filezilla-project.org/download.php filezilla]) 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.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There is also a '''BOX_COORDINATES.txt''' there (and README file) for setting coordinates for a box. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;File Formats&amp;lt;/h2&amp;gt;&lt;br /&gt;
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 &amp;quot;NaN&amp;quot;.  We really only care about 5 things ('''drifter_number, date/time, lat, lon, &amp;amp; SST'''), so if any of those other 4 fields are a &amp;quot;NaN&amp;quot; it should be skipped anyway since they contain critical information.  As for any &amp;quot;non critical&amp;quot; columns, (e.g. &amp;quot;FoM&amp;quot; or &amp;quot;Batt volts&amp;quot; [if we set that up to be a valid column] or whatever) can contain anything since we're ignoring those columns anyway.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
1) SVP.  The info [http://penguin.sfos.uaf.edu/output/pws/Halverson/SVP/ASCII/20090409/ here]&lt;br /&gt;
still doesn't show which column will have the drifter number, so for now, I'm assuming it will be the first.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
% Pacific Gyre SVP  -   Drogue center: 10m   -  ARGOS telemetry&lt;br /&gt;
%  Drifter #  Date/Time (UTC)   Lat      Lon   FoM SST [C]&lt;br /&gt;
1234  2009/04/09 22:30:00 60.5503 -145.7611 1 5.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Coast Guard SLDMBs&lt;br /&gt;
The email from Rob Cermak on Jul 9th @ 17:39 has &lt;br /&gt;
[http://penguin.sfos.uaf.edu/output/pws/Ohlmann/SLDMBS/GNOME/20090528/SLDMBS_20090528_0823_processed.txt this link]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, this is the format it's ready for this type format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Shape|OBJECTID|Buoynum|ZDateTime|DateTime|Location&lt;br /&gt;
|1|38669|232030Z MAY 09|39956.85|20-57.453N  071-20.205W&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) Oil Spill Resp.&lt;br /&gt;
For now it's setup to be exactly in the same format as the SVP (but with one header line instead of two)&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%  Drifter #  Date/Time (UTC)   Lat      Lon   FoM SST [C]&lt;br /&gt;
1234  2009/04/09 22:30:00 60.5503 -145.7611 1 5.0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Parsing Files&amp;lt;/h2&amp;gt;&lt;br /&gt;
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 [http://us.php.net/manual/en/reference.pcre.pattern.syntax.php regular expression] (i.e. preg_match) checking to ensure that any misformatted data is skipped.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Other Notes&amp;lt;/h2&amp;gt;&lt;br /&gt;
If for some reason, the javascript code needs to be edited, it's at '''/home/kirk/public_html/drifter/realtime-PWS/''', and there are 2 main javascript files: '''ajax.js''', '''map.js''' (with 'message.js' and 'YFT.js' providing less important support).  Note that really, you want to edit the javascript files with __UNCOMPRESSED__ in their name (as the files w/o that in their name were compressed using [http://dean.edwards.name/packer/ this tool]).  If you want to use these uncompressed files, you need to edit the '''index.php''' file and set '''$USE_UNCOMPRESSED''' to '''1'''.&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=PWS_Drifter_Realtime_Webpage_Info&amp;diff=20</id>
		<title>PWS Drifter Realtime Webpage Info</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=PWS_Drifter_Realtime_Webpage_Info&amp;diff=20"/>
		<updated>2009-07-17T06:06:36Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Prince William Sound, Alaska Drifter Realtime Webpage Wiki&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Page can be found at: [http://pws.drifterdata.com http://pws.drifterdata.com] or [http://www.icess.ucsb.edu/drifter/realtime-PWS/ http://www.icess.ucsb.edu/drifter/realtime-PWS/], and it's help page [http://www.icess.ucsb.edu/drifter/realtime-PWS/help/ here]. Other deployment info can be found [http://ak.aoos.org/aoos/fieldexp/data_by_pi-researcher.html here].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
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 [http://www.icess.ucsb.edu/drifter/realtime/ realtime page].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;File Locations&amp;lt;/h2&amp;gt;&lt;br /&gt;
The data files must be uploaded (e.g. via ftp or sftp, for Mac one can use [http://filezilla-project.org/download.php filezilla]) 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.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There is also a '''BOX_COORDINATES.txt''' there (and README file) for setting coordinates for a box. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;File Formats&amp;lt;/h2&amp;gt;&lt;br /&gt;
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 &amp;quot;NaN&amp;quot;.  We really only care about 5 things ('''drifter_number, date/time, lat, lon, &amp;amp; SST'''), so if any of those other 4 fields are a &amp;quot;NaN&amp;quot; it should be skipped anyway since they contain critical information.  As for any &amp;quot;non critical&amp;quot; columns, (e.g. &amp;quot;FoM&amp;quot; or &amp;quot;Batt volts&amp;quot; [if we set that up to be a valid column] or whatever) can contain anything since we're ignoring those columns anyway.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
1) SVP.  The info [http://penguin.sfos.uaf.edu/output/pws/Halverson/SVP/ASCII/20090409/ here]&lt;br /&gt;
still doesn't show which column will have the drifter number, so for now, I'm assuming it will be the first.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
% Pacific Gyre SVP  -   Drogue center: 10m   -  ARGOS telemetry&lt;br /&gt;
%  Drifter #  Date/Time (UTC)   Lat      Lon   FoM SST [C]&lt;br /&gt;
1234  2009/04/09 22:30:00 60.5503 -145.7611 1 5.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Coast Guard SLDMBs&lt;br /&gt;
The email from Rob Cermak on Jul 9th @ 17:39 has &lt;br /&gt;
[http://penguin.sfos.uaf.edu/output/pws/Ohlmann/SLDMBS/GNOME/20090528/SLDMBS_20090528_0823_processed.txt this link]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, this is the format it's ready for this type format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Shape|OBJECTID|Buoynum|ZDateTime|DateTime|Location&lt;br /&gt;
|1|38669|232030Z MAY 09|39956.85|20-57.453N  071-20.205W&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) Oil Spill Resp.&lt;br /&gt;
For now it's setup to be exactly in the same format as the SVP (but with one header line instead of two)&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%  Drifter #  Date/Time (UTC)   Lat      Lon   FoM SST [C]&lt;br /&gt;
1234  2009/04/09 22:30:00 60.5503 -145.7611 1 5.0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Parsing Files&amp;lt;/h2&amp;gt;&lt;br /&gt;
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 [http://us.php.net/manual/en/reference.pcre.pattern.syntax.php regular expression] checking to ensure that any misformatted data is skipped.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Other Notes&amp;lt;/h2&amp;gt;&lt;br /&gt;
If for some reason, the javascript code needs to be edited, it's at '''/home/kirk/public_html/drifter/realtime-PWS/''', and there are 2 main javascript files: '''ajax.js''', '''map.js''' (with 'message.js' and 'YFT.js' providing less important support).  Note that really, you want to edit the javascript files with __UNCOMPRESSED__ in their name (as the files w/o that in their name were compressed using [http://dean.edwards.name/packer/ this tool]).  If you want to use these uncompressed files, you need to edit the '''index.php''' file and set '''$USE_UNCOMPRESSED''' to '''1'''.&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=PWS_Drifter_Realtime_Webpage_Info&amp;diff=19</id>
		<title>PWS Drifter Realtime Webpage Info</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=PWS_Drifter_Realtime_Webpage_Info&amp;diff=19"/>
		<updated>2009-07-17T06:05:11Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Prince William Sound, Alaska Drifter Realtime Webpage Wiki&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Page can be found at: [http://pws.drifterdata.com http://pws.drifterdata.com] or [http://www.icess.ucsb.edu/drifter/realtime-PWS/ http://www.icess.ucsb.edu/drifter/realtime-PWS/], and it's help page [http://www.icess.ucsb.edu/drifter/realtime-PWS/help/ here]. Other deployment info can be found [http://ak.aoos.org/aoos/fieldexp/data_by_pi-researcher.html here].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
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 [http://www.icess.ucsb.edu/drifter/realtime/ realtime page].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;File Locations&amp;lt;/h2&amp;gt;&lt;br /&gt;
The data files must be uploaded (e.g. via ftp or sftp, for Mac one can use [http://filezilla-project.org/download.php filezilla]) 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.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There is also a '''BOX_COORDINATES.txt''' there (and README file) for setting coordinates for a box. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;File Formats&amp;lt;/h2&amp;gt;&lt;br /&gt;
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 &amp;quot;NaN&amp;quot;.  We really only care about 5 things ('''drifter_number, date/time, lat, lon, &amp;amp; SST'''), so if any of those other 4 fields are a &amp;quot;NaN&amp;quot; it should be skipped anyway since they contain critical information.  As for any &amp;quot;non critical&amp;quot; columns, (e.g. &amp;quot;FoM&amp;quot; or &amp;quot;Batt volts&amp;quot; [if we set that up to be a valid column] or whatever) can contain anything since we're ignoring those columns anyway.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
1) SVP.  The info [http://penguin.sfos.uaf.edu/output/pws/Halverson/SVP/ASCII/20090409/ here]&lt;br /&gt;
still doesn't show which column will have the drifter number, so for now, I'm assuming it will be the first.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
% Pacific Gyre SVP  -   Drogue center: 10m   -  ARGOS telemetry&lt;br /&gt;
%  Drifter #  Date/Time (UTC)   Lat      Lon   FoM SST [C]&lt;br /&gt;
1234  2009/04/09 22:30:00 60.5503 -145.7611 1 5.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Coast Guard SLDMBs&lt;br /&gt;
The email from Rob Cermak on Jul 9th @ 17:39 has &lt;br /&gt;
[http://penguin.sfos.uaf.edu/output/pws/Ohlmann/SLDMBS/GNOME/20090528/SLDMBS_20090528_0823_processed.txt this link]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, this is the format it's ready for this type format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Shape|OBJECTID|Buoynum|ZDateTime|DateTime|Location&lt;br /&gt;
|1|38669|232030Z MAY 09|39956.85|20-57.453N  071-20.205W&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) Oil Spill Resp.&lt;br /&gt;
For now it's setup to be exactly in the same format as the SVP (but with one header line instead of two)&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%  Drifter #  Date/Time (UTC)   Lat      Lon   FoM SST [C]&lt;br /&gt;
1234  2009/04/09 22:30:00 60.5503 -145.7611 1 5.0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Parsing Files&amp;lt;/h2&amp;gt;&lt;br /&gt;
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 [http://us.php.net/manual/en/reference.pcre.pattern.syntax.php regular expression] checking to ensure that any misformatted data is skipped.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Other&amp;lt;/h2&amp;gt;&lt;br /&gt;
If for some reason, the javascript code needs to be edited, it's at '''/home/kirk/public_html/drifter/realtime-PWS/''', and there are 2 main javascript files: '''ajax.js''', '''map.js''' (with 'message.js' and 'YFT.js' providing less important support).  Note that really, you want to edit the javascript files with __UNCOMPRESSED__ in their name (as the files w/o that in their name were compressed using [http://dean.edwards.name/packer/ this tool].  If you then want to use these uncompressed files, you need to edit the '''index.php''' file and set '''$USE_UNCOMPRESSED''' to '''0'''.&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=PWS_Drifter_Realtime_Webpage_Info&amp;diff=18</id>
		<title>PWS Drifter Realtime Webpage Info</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=PWS_Drifter_Realtime_Webpage_Info&amp;diff=18"/>
		<updated>2009-07-17T05:54:37Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Prince William Sound, Alaska Drifter Realtime Webpage Wiki&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Page can be found at: [http://pws.drifterdata.com http://pws.drifterdata.com] or [http://www.icess.ucsb.edu/drifter/realtime-PWS/ http://www.icess.ucsb.edu/drifter/realtime-PWS/]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
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 [http://www.icess.ucsb.edu/drifter/realtime/ realtime page].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;File Locations&amp;lt;/h2&amp;gt;&lt;br /&gt;
The data files must be uploaded (e.g. via ftp or sftp, for Mac one can use [http://filezilla-project.org/download.php filezilla]) 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.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There is also a '''BOX_COORDINATES.txt''' there (and README file) for setting coordinates for a box. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;File Formats&amp;lt;/h2&amp;gt;&lt;br /&gt;
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 &amp;quot;NaN&amp;quot;.  We really only care about 5 things (''drifter_number,date/time,lat,lon,SST''), so if any of those other 4 fields are a &amp;quot;NaN&amp;quot; it should be skipped anyway since they contain critical information.  As for any &amp;quot;non critical&amp;quot; columns, (e.g. &amp;quot;FoM&amp;quot; or &amp;quot;Batt volts&amp;quot; [if we set that up to be a valid column] or whatever) can contain anything since we're ignoring those columns anyway.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
1) SVP.  The info [http://penguin.sfos.uaf.edu/output/pws/Halverson/SVP/ASCII/20090409/ here]&lt;br /&gt;
still doesn't show which column will have the drifter number, so for now, I'm assuming it will be the first.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
% Pacific Gyre SVP  -   Drogue center: 10m   -  ARGOS telemetry&lt;br /&gt;
%  Drifter #  Date/Time (UTC)   Lat      Lon   FoM SST [C]&lt;br /&gt;
1234  2009/04/09 22:30:00 60.5503 -145.7611 1 5.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Coast Guard SLDMBs&lt;br /&gt;
The email from Rob Cermak on Jul 9th @ 17:39 has &lt;br /&gt;
[http://penguin.sfos.uaf.edu/output/pws/Ohlmann/SLDMBS/GNOME/20090528/SLDMBS_20090528_0823_processed.txt this link]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, this is the format it's ready for:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Shape|OBJECTID|Buoynum|ZDateTime|DateTime|Location&lt;br /&gt;
|1|38669|232030Z MAY 09|39956.85|20-57.453N  071-20.205W&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) Oil Spill Resp.&lt;br /&gt;
For now it's setup to be exactly in the same format as the SVP (but with one header line instead of two)&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%  Drifter #  Date/Time (UTC)   Lat      Lon   FoM SST [C]&lt;br /&gt;
1234  2009/04/09 22:30:00 60.5503 -145.7611 1 5.0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Parsing Files&amp;lt;/h2&amp;gt;&lt;br /&gt;
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 [http://us.php.net/manual/en/reference.pcre.pattern.syntax.php regular expression] checking to ensure that any misformatted data is skipped.&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=PWS_Drifter_Realtime_Webpage_Info&amp;diff=17</id>
		<title>PWS Drifter Realtime Webpage Info</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=PWS_Drifter_Realtime_Webpage_Info&amp;diff=17"/>
		<updated>2009-07-17T05:52:45Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Prince William Sound, Alaska Drifter Realtime Webpage Wiki&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Page can be found at: [http://pws.drifterdata.com http://pws.drifterdata.com] or [http://www.icess.ucsb.edu/drifter/realtime-PWS/ http://www.icess.ucsb.edu/drifter/realtime-PWS/]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
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 [http://www.icess.ucsb.edu/drifter/realtime/ realtime page].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;File Locations&amp;lt;/h2&amp;gt;&lt;br /&gt;
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.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There is also a '''BOX_COORDINATES.txt''' there (and README file) for setting coordinates for a box. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;File Formats&amp;lt;/h2&amp;gt;&lt;br /&gt;
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 &amp;quot;NaN&amp;quot;.  We really only care about 5 things (''drifter_number,date/time,lat,lon,SST''), so if any of those other 4 fields are a &amp;quot;NaN&amp;quot; it should be skipped anyway since they contain critical information.  As for any &amp;quot;non critical&amp;quot; columns, (e.g. &amp;quot;FoM&amp;quot; or &amp;quot;Batt volts&amp;quot; [if we set that up to be a valid column] or whatever) can contain anything since we're ignoring those columns anyway.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
1) SVP.  The info [http://penguin.sfos.uaf.edu/output/pws/Halverson/SVP/ASCII/20090409/ here]&lt;br /&gt;
still doesn't show which column will have the drifter number, so for now, I'm assuming it will be the first.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
% Pacific Gyre SVP  -   Drogue center: 10m   -  ARGOS telemetry&lt;br /&gt;
%  Drifter #  Date/Time (UTC)   Lat      Lon   FoM SST [C]&lt;br /&gt;
1234  2009/04/09 22:30:00 60.5503 -145.7611 1 5.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Coast Guard SLDMBs&lt;br /&gt;
The email from Rob Cermak on Jul 9th @ 17:39 has &lt;br /&gt;
[http://penguin.sfos.uaf.edu/output/pws/Ohlmann/SLDMBS/GNOME/20090528/SLDMBS_20090528_0823_processed.txt this link]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, this is the format it's ready for:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Shape|OBJECTID|Buoynum|ZDateTime|DateTime|Location&lt;br /&gt;
|1|38669|232030Z MAY 09|39956.85|20-57.453N  071-20.205W&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) Oil Spill Resp.&lt;br /&gt;
For now it's setup to be exactly in the same format as the SVP (but with one header line instead of two)&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%  Drifter #  Date/Time (UTC)   Lat      Lon   FoM SST [C]&lt;br /&gt;
1234  2009/04/09 22:30:00 60.5503 -145.7611 1 5.0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Parsing Files&amp;lt;/h2&amp;gt;&lt;br /&gt;
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 [http://us.php.net/manual/en/reference.pcre.pattern.syntax.php regular expression] checking to ensure that any misformatted data is skipped.&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=PWS_Drifter_Realtime_Webpage_Info&amp;diff=16</id>
		<title>PWS Drifter Realtime Webpage Info</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=PWS_Drifter_Realtime_Webpage_Info&amp;diff=16"/>
		<updated>2009-07-17T05:42:32Z</updated>

		<summary type="html">&lt;p&gt;Kirk: New page: &amp;lt;h1&amp;gt;Prince William Sound, Alaska Drifter Realtime Webpage Wiki&amp;lt;/h1&amp;gt;  Page can be found at: [http://pws.drifterdata.com http://pws.drifterdata.com] or [http://www.icess.ucsb.edu/drifter/rea...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Prince William Sound, Alaska Drifter Realtime Webpage Wiki&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Page can be found at: [http://pws.drifterdata.com http://pws.drifterdata.com] or [http://www.icess.ucsb.edu/drifter/realtime-PWS/ http://www.icess.ucsb.edu/drifter/realtime-PWS/]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
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 [http://www.icess.ucsb.edu/drifter/realtime/ realtime page].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;File Locations&amp;lt;/h2&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
There is also a 'BOX_COORDINATES.txt' there (and README file) for setting coordinates for a box. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;File Formats&amp;lt;/h2&amp;gt;&lt;br /&gt;
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 &amp;quot;NaN&amp;quot;.  I really only care about 5 things (drifter_number,date/time,lat,lon,SST), so if any of those other 4 fields are a &amp;quot;NaN&amp;quot; it should be skipped anyway since they contain critical information.  As for any &amp;quot;non critical&amp;quot; columns, (e.g. &amp;quot;FoM&amp;quot; or &amp;quot;Batt volts&amp;quot; [if we set that up to be a valid column] or whatever) can contain anything since I'm ignoring those columns anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) SVP.  The info at&lt;br /&gt;
http://penguin.sfos.uaf.edu/output/pws/Halverson/SVP/ASCII/20090409/&lt;br /&gt;
still doesn't show which column will have the drifter number, so for now, I'm assuming it will be the first.&lt;br /&gt;
e.g.&lt;br /&gt;
% Pacific Gyre SVP  -   Drogue center: 10m   -  ARGOS telemetry&lt;br /&gt;
%  Drifter #  Date/Time (UTC)   Lat      Lon   FoM SST [C]&lt;br /&gt;
1234  2009/04/09 22:30:00 60.5503 -145.7611 1 5.0&lt;br /&gt;
&lt;br /&gt;
2) Coast Guard SLDMBs&lt;br /&gt;
The email from Rob Cermak on Jul 9th @ 17:39 has this link&lt;br /&gt;
http://penguin.sfos.uaf.edu/output/pws/Ohlmann/SLDMBS/GNOME/20090528/SLDMBS_20090528_0823_processed.txt&lt;br /&gt;
&lt;br /&gt;
If this will instead be the format, let me know. Again, VERY easy to adapt my code for this. Right now, this is the format I'm ready for:&lt;br /&gt;
&lt;br /&gt;
Shape|OBJECTID|Buoynum|ZDateTime|DateTime|Location&lt;br /&gt;
|1|38669|232030Z MAY 09|39956.85|20-57.453N  071-20.205W&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Oil Spill Resp.&lt;br /&gt;
For now it's setup to be exactly in the same format as the SVP (but with one header line instead of two). I need to know if this needs to be different.&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
%  Drifter #  Date/Time (UTC)   Lat      Lon   FoM SST [C]&lt;br /&gt;
1234  2009/04/09 22:30:00 60.5503 -145.7611 1 5.0 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Parsing Files&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;&amp;lt;/h2&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=CalCOFI_Drifter_Realtime_Webpage_Info&amp;diff=15</id>
		<title>CalCOFI Drifter Realtime Webpage Info</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=CalCOFI_Drifter_Realtime_Webpage_Info&amp;diff=15"/>
		<updated>2009-07-10T06:50:12Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;CalCOFI SVP Drifter Realtime Webpage Wiki&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTES AND THINGS TO KNOW ABOUT THE SVP REALTIME PAGE&amp;lt;br&amp;gt;&lt;br /&gt;
Jun, 2009 Kirk&lt;br /&gt;
&lt;br /&gt;
Webpage:&lt;br /&gt;
[http://www.icess.ucsb.edu/drifter/realtime-SVP/ SVP Realtime Page]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are three main parts needed to display the data (details below):&amp;lt;br&amp;gt;&lt;br /&gt;
1. Fetching the data (using Python script running on dub-locl)&amp;lt;br&amp;gt;&lt;br /&gt;
2. Parsing the data (using PHP script running on dub-locl)&amp;lt;br&amp;gt;&lt;br /&gt;
3. Displaying the data (using Javascript running on your browser)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1. FETCHING THE DATA&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On dub-locl.icess.ucsb.edu in /localhome/kirk/Scripts/CalCOFI_ARGOS_SVP_scripts_and_data/ there is a Python script 'fetch_calcofi_svp_data.py'.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;There is essentially nothing to configure it, and it's well documented should you need to change anything.  It is set to fetch via ftp from ftp.aoml.noaa.gov for the last 9 days worth of positions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;It may need to be updated with drifter numbers and temperature coefficients as more are sent drifting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;It is set to run about every 6 hours (05:30, 11:30, 17:30 &amp;amp; 20:30 Pacific, and they should post the data at 8am Eastern Time) via a &amp;quot;cron job&amp;quot; on the kirk account.  To edit this job, as kirk, at the Terminal, type 'crontab -e' and use 'vi' style editing commands, or 'crontab -l' to just show it.  (To become kirk, login as drift, then in a Terminal, type 'sudo su -' (then type the drift password) to become root, then 'su kirk' to become kirk.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;It fetches their file, archives it (to /localhome/kirk/Scripts/CalCOFI_ARGOS_SVP_scripts_and_data/DATA_ARCHIVE/), uncompresses it, and starts the parsing script (see next section).&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;2. PARSING THE DATA&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This PHP script on dub-local.icess.ucsb.edu (called by the fetching script above) is /localhome/kirk/Scripts/CalCOFI_ARGOS_SVP_scripts_and_data/parse_calcofi_argos_svp_data.php and is pretty well documented. It breaks down the fairly cryptic GPS encoding and then saves it to a friendly format. It archives this file to /localhome/kirk/Scripts/CalCOFI_ARGOS_SVP_scripts_and_data/DATA_ARCHIVE/yyyymmdd_CALCOFI_SVP_LATEST_DATA.txt and copies this file to /home/kirk/public_html/drifter/realtime-SVP/CALCOFI_SVP_LATEST_DATA.txt so the website has access to it.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;There is very little configuring it, and it's well documented should you need to change anything, but it does have temperature coefficients and a couple other possible configuration settings.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
It outputs 1 record per position report in this format:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drift_no,YY-MM-DD,HH:MM:SS,milliseconds_since_Jan01_1970,orig_report_num,lat,lon,position_type(1=GPS,0=ARGOS),SST(C),batt(V),base_time,record_num&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
93561,2007-04-03,10:34:45,1175610885000,136,+26.6980,-081.9550,0,NaN,NaN,NaN,NaN    (an argos position)&lt;br /&gt;
93561,2007-04-03,10:33:37,1175610817000,137,+26.6979,-081.9557,1,NaN,12.4,2007-04-03_11:33:30,2   (a gps position)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;3. DISPLAYING THE DATA   (at [http://www.icess.ucsb.edu/drifter/realtime-SVP/ realtime page] or [http://svp.drifterdata.com http://svp.drifterdata.com]) &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Google mapping code was adapted from the Iridium/Microstar realtime page at [http://www.icess.ucsb.edu/drifter/realtime/ http://www.icess.ucsb.edu/drifter/realtime/]&lt;br /&gt;
&lt;br /&gt;
The two main javascript files are ajax.js and map.js.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The javascript files are compressed using http://www.icess.ucsb.edu/drifter/realtime/JavascriptCompressor.html, so changes made to the xxx__UNCOMPRESSED__.js files won't show up on the page unless they are compressed and saved without the &amp;quot;__UNCOMPRESSED__&amp;quot; portion in the name, '''OR*''' at the beginning of index.php those two types of files are commented/uncommented out as appropriate.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt; POTENTIAL PROBLEMS / TROUBLESHOOTING&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Prob: The data file (/home/kirk/public_html/drifter/realtime-SVP/CALCOFI_SVP_LATEST_DATA.txt) is not getting saved/updated&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Is the dub-locl computer up?&lt;br /&gt;
&amp;lt;li&amp;gt;Is /home/kirk/ mounted on dub-locl? (It should come up automatically)&lt;br /&gt;
&amp;lt;li&amp;gt;Has 6 hours passed since the last time it ran? It only runs about every 6 hours (see above), but they only update the file once per day at 8am Eastern.&lt;br /&gt;
&amp;lt;li&amp;gt;Try fetching the data yourself via ftp:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ftp://ftp.aoml.noaa.gov/phod/pub/daily_buoydata/7325/&lt;br /&gt;
login: anonymous&lt;br /&gt;
pass: e_mail&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Look for a file of today's data with the following name format:&lt;br /&gt;
ddMMMyy.LOG-GZ, for example: 15JUL09.LOG-GZ   (i.e. for july 15th, 2009)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;INFO ABOUT TIME CALCULATION&amp;lt;/h2&amp;gt;&lt;br /&gt;
Basically each data block is for three hourly reports, and data blocks can be repeated (I&lt;br /&gt;
have no idea how that's determined), and there is a slight adjustment&lt;br /&gt;
to the time based on &amp;quot;fix delay&amp;quot; (or &amp;quot;Length of Acquisition&amp;quot;, which is&lt;br /&gt;
usually on the order of &amp;lt;60 seconds).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For example (showing the second to last block in the existing file as&lt;br /&gt;
I write this):&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
07325 93575  15 27 N 3 2009-06-25 20:18:59  34.416  240.156  0.000 401652653&lt;br /&gt;
      2009-06-25 20:21:22  3         12           62          678           94&lt;br /&gt;
                                     00           01       344156           01&lt;br /&gt;
                                1198452           01           04          689&lt;br /&gt;
                                     01       344155           01      1198448&lt;br /&gt;
                                     01           04          661           01&lt;br /&gt;
                                 344156           01      1198448           01&lt;br /&gt;
                                     04          587           00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This *first line* contains ARGOS only info:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
prog_num                     07325&lt;br /&gt;
drift_num                    93575&lt;br /&gt;
lines_in_sat_pass          15&lt;br /&gt;
num_sensors                27&lt;br /&gt;
sat_name                            N&lt;br /&gt;
resolution                          3&lt;br /&gt;
time            2009-06-25 20:18:59&lt;br /&gt;
xmit_lat                     34.416&lt;br /&gt;
xmit_lon                   240.156&lt;br /&gt;
xmit_alt                      0.000&lt;br /&gt;
xmit_freq              401652653&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The next 7 lines contain 3, hourly GPS reports.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 1:  (2009-06-25 20:21:22  3     12      62       678        94)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BASE Date/Time                  2009-06-25 20:21:22&lt;br /&gt;
# identical messages rcvd                       3&lt;br /&gt;
Drogue count over last half hour               12&lt;br /&gt;
Battery voltage = n * 0.2                 62   -&amp;gt; 12.4V&lt;br /&gt;
SST(C) = x * 0.043 - 5                   678   -&amp;gt; 24.154&lt;br /&gt;
Checksum                                       94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 2:  (00      01    344156        01)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Msg ID                                   00   -&amp;gt; this is 1st message sent&lt;br /&gt;
Valid Pos #1 (1=good, 0=bad)             01   -&amp;gt; good&lt;br /&gt;
Lat #1 (ten-thousandths of degree)    344156  -&amp;gt; 34.4156&lt;br /&gt;
Lat #1 Ref (0 = South, 1 = North)        01   -&amp;gt; North&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 3:  (1198452      01        04       689)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lon #1 (ten-thousandths of degree)     1198452 -&amp;gt; 119.8452&lt;br /&gt;
Lon #1 Ref (0 = East, 1 = West)           01   -&amp;gt; West&lt;br /&gt;
Pos #1 Length of Acq (seconds = n * 4)    04   -&amp;gt; 16(seconds)&lt;br /&gt;
SST #1 (C) = x * 0.043 - 5                689  -&amp;gt; 24.627&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 4:  (01  344155        01   1198448)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Valid Pos #2 (1=good, 0=bad)                01 -&amp;gt; good&lt;br /&gt;
Lat #2 (ten-thousandths of degree)     344155  -&amp;gt; 34.4155&lt;br /&gt;
Lat #2 Ref  (0 = South, 1 = North)         01  -&amp;gt; North&lt;br /&gt;
Lon #2 (ten-thousandths of degree)     1198448 -&amp;gt; 119.8448&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 5:  (01      04       661        01)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lon #2 Ref (0 = East, 1 = West)         01   -&amp;gt; West&lt;br /&gt;
Pos #2 Length of Acq (seconds = n * 4)  04   -&amp;gt; 16(seconds)&lt;br /&gt;
SST #2  (C) = x * 0.043 - 5             661  -&amp;gt; 23.423&lt;br /&gt;
Valid Pos #3 (1=good, 0=bad)            01   -&amp;gt; good&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 6:  (344156      01   1198448        01)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lat #3 (ten-thousandths of degree)   344156  -&amp;gt; 34.4156&lt;br /&gt;
Lat #3 Ref  (0 = South, 1 = North)        01 -&amp;gt; North&lt;br /&gt;
Lon #3 (ten-thousandths of degree)   1198448 -&amp;gt; 119.8448&lt;br /&gt;
Lon #3 Ref (0 = East, 1 = West)         01   -&amp;gt; West&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 7:  (04     587        00)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Pos #3 Length of Acq (seconds = n * 4)   04   -&amp;gt; 16(seconds)&lt;br /&gt;
SST #3  (C) = x * 0.043 - 5              587  -&amp;gt; 20.241&lt;br /&gt;
Null bits                      (only for padding, ignore)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-Total bit count (a very non trivial calculation) of all 7 lines must equal the checksum value or&lt;br /&gt;
message block is considered garbled and thus ignored.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-Times of GPS reports are calculated thusly:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
1) Take BASE time, subtract (Msg ID*3)   [that is, if message has been&lt;br /&gt;
repeated, it is at least 3 hours old -- I have a switch in my code&lt;br /&gt;
(it's turned on for now) which will ignore messages with a message&lt;br /&gt;
ID&amp;gt;0 because the original may be also present, and it's possible the&lt;br /&gt;
duplicate isn't an exact duplicate and then you get slightly different&lt;br /&gt;
reports at similar times]&amp;lt;br&amp;gt;&lt;br /&gt;
2) Then, subtract 2 hours for Pos #3, and 1 hour for Pos #2 and 0 for Pos #1&amp;lt;br&amp;gt;&lt;br /&gt;
3) Then subtract the associated small &amp;quot;Length of Acq&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Thus, the 2nd GPS time (i.e. #2) would be calculated thusly:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BASE time: 2009-06-25 20:21:22&lt;br /&gt;
minus 0 hours (because Msg ID is 0)&lt;br /&gt;
minus 1 hour (because it's Pos #2)&lt;br /&gt;
minus (pos #2 length of acq) 16 seconds&lt;br /&gt;
&lt;br /&gt;
equals:  2009-06-25 19:21:06&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
An additional wacky thing is that due to repetition of the messages,&lt;br /&gt;
or god knows what, the calculations of the reports you see aren't&lt;br /&gt;
necessarily in chronological order. So, after doing all the&lt;br /&gt;
calculations, I then sort them chronologically before outputting&lt;br /&gt;
(within the parse_argos_data.php script), so that when showing the&lt;br /&gt;
track lines, the points are in order.&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=CalCOFI_Drifter_Realtime_Webpage_Info&amp;diff=14</id>
		<title>CalCOFI Drifter Realtime Webpage Info</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=CalCOFI_Drifter_Realtime_Webpage_Info&amp;diff=14"/>
		<updated>2009-07-10T06:48:50Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;CalCOFI SVP Drifter Realtime Webpage Wiki&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTES AND THINGS TO KNOW ABOUT THE SVP REALTIME PAGE&amp;lt;br&amp;gt;&lt;br /&gt;
Jun, 2009 Kirk&lt;br /&gt;
&lt;br /&gt;
Webpage:&lt;br /&gt;
[http://www.icess.ucsb.edu/drifter/realtime-SVP/ SVP Realtime Page]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are three main parts needed to display the data (details below):&amp;lt;br&amp;gt;&lt;br /&gt;
1. Fetching the data (using Python script running on dub-locl)&amp;lt;br&amp;gt;&lt;br /&gt;
2. Parsing the data (using PHP script running on dub-locl)&amp;lt;br&amp;gt;&lt;br /&gt;
3. Displaying the data (using Javascript running on your browser)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1. FETCHING THE DATA&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On dub-locl.icess.ucsb.edu in /localhome/kirk/Scripts/CalCOFI_ARGOS_SVP_scripts_and_data/ there is a Python script 'fetch_calcofi_svp_data.py'.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;There is essentially nothing to configure it, and it's well documented should you need to change anything.  It is set to fetch via ftp from ftp.aoml.noaa.gov for the last 9 days worth of positions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;It may need to be updated with drifter numbers and temperature coefficients as more are sent drifting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;It is set to run about every 6 hours (05:30, 11:30, 17:30 &amp;amp; 20:30 Pacific, and they should post the data at 8am Eastern Time) via a &amp;quot;cron job&amp;quot; on the kirk account.  To edit this job, as kirk, at the Terminal, type 'crontab -e' and use 'vi' style editing commands, or 'crontab -l' to just show it.  (To become kirk, login as drift, then in a Terminal, type 'sudo su -' (then type the drift password) to become root, then 'su kirk' to become kirk.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;It fetches their file, archives it (to /localhome/kirk/Scripts/CalCOFI_ARGOS_SVP_scripts_and_data/DATA_ARCHIVE/), uncompresses it, and starts the parsing script (see next section).&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;2. PARSING THE DATA&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This PHP script on dub-local.icess.ucsb.edu (called by the fetching script above) is /localhome/kirk/Scripts/CalCOFI_ARGOS_SVP_scripts_and_data/parse_calcofi_argos_svp_data.php and is pretty well documented. It breaks down the fairly cryptic GPS encoding and then saves it to a friendly format. It archives this file to /localhome/kirk/Scripts/CalCOFI_ARGOS_SVP_scripts_and_data/DATA_ARCHIVE/yyyymmdd_CALCOFI_SVP_LATEST_DATA.txt and copies this file to /home/kirk/public_html/drifter/realtime-SVP/CALCOFI_SVP_LATEST_DATA.txt so the website has access to it.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;There is very little configuring it, and it's well documented should you need to change anything, but it does have temperature coefficients and a couple other possible configuration settings.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
It outputs 1 record per position report in this format:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drift_no,YY-MM-DD,HH:MM:SS,milliseconds_since_Jan01_1970,orig_report_num,lat,lon,position_type(1=GPS,0=ARGOS),SST(C),batt(V),base_time,record_num&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
93561,2007-04-03,10:34:45,1175610885000,136,+26.6980,-081.9550,0,NaN,NaN,NaN,NaN    (an argos position)&lt;br /&gt;
93561,2007-04-03,10:33:37,1175610817000,137,+26.6979,-081.9557,1,NaN,12.4,2007-04-03_11:33:30,2   (a gps position)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;3. DISPLAYING THE DATA   (at [http://www.icess.ucsb.edu/drifter/realtime-SVP/ realtime page] or [http://svp.drifterdata.com http://svp.drifterdata.com]) &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Google mapping code was adapted from the Iridium/Microstar realtime page at [http://www.icess.ucsb.edu/drifter/realtime/ http://www.icess.ucsb.edu/drifter/realtime/]&lt;br /&gt;
&lt;br /&gt;
The two main javascript files are ajax.js and map.js.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The javascript files are compressed using http://www.icess.ucsb.edu/drifter/realtime/JavascriptCompressor.html, so changes made to the xxx__UNCOMPRESSED__.js files won't show up on the page unless they are compressed and saved without the &amp;quot;__UNCOMPRESSED__&amp;quot; portion in the name, '''OR*''' at the beginning of index.php those two types of files are commented/uncommented out as appropriate.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt; POTENTIAL PROBLEMS / TROUBLESHOOTING&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Prob: The data file (/home/kirk/public_html/drifter/realtime-SVP/CALCOFI_SVP_LATEST_DATA.txt) is not getting saved/updated&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Is the dub-locl computer up?&lt;br /&gt;
&amp;lt;li&amp;gt;Is /home/kirk/ mounted on dub-locl? (It should come up automatically)&lt;br /&gt;
&amp;lt;li&amp;gt;Has 6 hours passed since the last time it ran? It only runs about every 6 hours (see above), but they only update the file once per day at 8am Eastern.&lt;br /&gt;
&amp;lt;li&amp;gt;Try fetching the data yourself via ftp:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ftp://ftp.aoml.noaa.gov/phod/pub/daily_buoydata/7325/&lt;br /&gt;
login: anonymous&lt;br /&gt;
pass: e_mail&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Look for a file of today's data with the following name format:&lt;br /&gt;
ddMMMyy.LOG-GZ, for example: 15JUL09.LOG-GZ   (i.e. for july 15th, 2009)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE: if you want to get data from a specific time period, use julian dates and GMT hours after the comma after 'ds'.&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
prv,7325,ds,174/12-175/10,93561-93587   (for June 23rd at 12Z through June 24th at 10Z)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Prob: The data file (/home/locl/file_sharing/SVP_CALCOFI_LATEST_DATA.txt) shows no data&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;There probably aren't any drifters talking in the last 24hours (look for the line &amp;quot;No data available or authorization failure&amp;quot; in the file or try manually getting the data)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;INFO ABOUT TIME CALCULATION&amp;lt;/h2&amp;gt;&lt;br /&gt;
Basically each data block is for three hourly reports, and data blocks can be repeated (I&lt;br /&gt;
have no idea how that's determined), and there is a slight adjustment&lt;br /&gt;
to the time based on &amp;quot;fix delay&amp;quot; (or &amp;quot;Length of Acquisition&amp;quot;, which is&lt;br /&gt;
usually on the order of &amp;lt;60 seconds).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For example (showing the second to last block in the existing file as&lt;br /&gt;
I write this):&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
07325 93575  15 27 N 3 2009-06-25 20:18:59  34.416  240.156  0.000 401652653&lt;br /&gt;
      2009-06-25 20:21:22  3         12           62          678           94&lt;br /&gt;
                                     00           01       344156           01&lt;br /&gt;
                                1198452           01           04          689&lt;br /&gt;
                                     01       344155           01      1198448&lt;br /&gt;
                                     01           04          661           01&lt;br /&gt;
                                 344156           01      1198448           01&lt;br /&gt;
                                     04          587           00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This *first line* contains ARGOS only info:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
prog_num                     07325&lt;br /&gt;
drift_num                    93575&lt;br /&gt;
lines_in_sat_pass          15&lt;br /&gt;
num_sensors                27&lt;br /&gt;
sat_name                            N&lt;br /&gt;
resolution                          3&lt;br /&gt;
time            2009-06-25 20:18:59&lt;br /&gt;
xmit_lat                     34.416&lt;br /&gt;
xmit_lon                   240.156&lt;br /&gt;
xmit_alt                      0.000&lt;br /&gt;
xmit_freq              401652653&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The next 7 lines contain 3, hourly GPS reports.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 1:  (2009-06-25 20:21:22  3     12      62       678        94)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BASE Date/Time                  2009-06-25 20:21:22&lt;br /&gt;
# identical messages rcvd                       3&lt;br /&gt;
Drogue count over last half hour               12&lt;br /&gt;
Battery voltage = n * 0.2                 62   -&amp;gt; 12.4V&lt;br /&gt;
SST(C) = x * 0.043 - 5                   678   -&amp;gt; 24.154&lt;br /&gt;
Checksum                                       94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 2:  (00      01    344156        01)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Msg ID                                   00   -&amp;gt; this is 1st message sent&lt;br /&gt;
Valid Pos #1 (1=good, 0=bad)             01   -&amp;gt; good&lt;br /&gt;
Lat #1 (ten-thousandths of degree)    344156  -&amp;gt; 34.4156&lt;br /&gt;
Lat #1 Ref (0 = South, 1 = North)        01   -&amp;gt; North&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 3:  (1198452      01        04       689)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lon #1 (ten-thousandths of degree)     1198452 -&amp;gt; 119.8452&lt;br /&gt;
Lon #1 Ref (0 = East, 1 = West)           01   -&amp;gt; West&lt;br /&gt;
Pos #1 Length of Acq (seconds = n * 4)    04   -&amp;gt; 16(seconds)&lt;br /&gt;
SST #1 (C) = x * 0.043 - 5                689  -&amp;gt; 24.627&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 4:  (01  344155        01   1198448)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Valid Pos #2 (1=good, 0=bad)                01 -&amp;gt; good&lt;br /&gt;
Lat #2 (ten-thousandths of degree)     344155  -&amp;gt; 34.4155&lt;br /&gt;
Lat #2 Ref  (0 = South, 1 = North)         01  -&amp;gt; North&lt;br /&gt;
Lon #2 (ten-thousandths of degree)     1198448 -&amp;gt; 119.8448&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 5:  (01      04       661        01)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lon #2 Ref (0 = East, 1 = West)         01   -&amp;gt; West&lt;br /&gt;
Pos #2 Length of Acq (seconds = n * 4)  04   -&amp;gt; 16(seconds)&lt;br /&gt;
SST #2  (C) = x * 0.043 - 5             661  -&amp;gt; 23.423&lt;br /&gt;
Valid Pos #3 (1=good, 0=bad)            01   -&amp;gt; good&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 6:  (344156      01   1198448        01)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lat #3 (ten-thousandths of degree)   344156  -&amp;gt; 34.4156&lt;br /&gt;
Lat #3 Ref  (0 = South, 1 = North)        01 -&amp;gt; North&lt;br /&gt;
Lon #3 (ten-thousandths of degree)   1198448 -&amp;gt; 119.8448&lt;br /&gt;
Lon #3 Ref (0 = East, 1 = West)         01   -&amp;gt; West&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 7:  (04     587        00)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Pos #3 Length of Acq (seconds = n * 4)   04   -&amp;gt; 16(seconds)&lt;br /&gt;
SST #3  (C) = x * 0.043 - 5              587  -&amp;gt; 20.241&lt;br /&gt;
Null bits                      (only for padding, ignore)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-Total bit count (a very non trivial calculation) of all 7 lines must equal the checksum value or&lt;br /&gt;
message block is considered garbled and thus ignored.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-Times of GPS reports are calculated thusly:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
1) Take BASE time, subtract (Msg ID*3)   [that is, if message has been&lt;br /&gt;
repeated, it is at least 3 hours old -- I have a switch in my code&lt;br /&gt;
(it's turned on for now) which will ignore messages with a message&lt;br /&gt;
ID&amp;gt;0 because the original may be also present, and it's possible the&lt;br /&gt;
duplicate isn't an exact duplicate and then you get slightly different&lt;br /&gt;
reports at similar times]&amp;lt;br&amp;gt;&lt;br /&gt;
2) Then, subtract 2 hours for Pos #3, and 1 hour for Pos #2 and 0 for Pos #1&amp;lt;br&amp;gt;&lt;br /&gt;
3) Then subtract the associated small &amp;quot;Length of Acq&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Thus, the 2nd GPS time (i.e. #2) would be calculated thusly:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BASE time: 2009-06-25 20:21:22&lt;br /&gt;
minus 0 hours (because Msg ID is 0)&lt;br /&gt;
minus 1 hour (because it's Pos #2)&lt;br /&gt;
minus (pos #2 length of acq) 16 seconds&lt;br /&gt;
&lt;br /&gt;
equals:  2009-06-25 19:21:06&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
An additional wacky thing is that due to repetition of the messages,&lt;br /&gt;
or god knows what, the calculations of the reports you see aren't&lt;br /&gt;
necessarily in chronological order. So, after doing all the&lt;br /&gt;
calculations, I then sort them chronologically before outputting&lt;br /&gt;
(within the parse_argos_data.php script), so that when showing the&lt;br /&gt;
track lines, the points are in order.&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=CalCOFI_Drifter_Realtime_Webpage_Info&amp;diff=13</id>
		<title>CalCOFI Drifter Realtime Webpage Info</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=CalCOFI_Drifter_Realtime_Webpage_Info&amp;diff=13"/>
		<updated>2009-07-10T06:47:11Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;CalCOFI SVP Drifter Realtime Webpage Wiki&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTES AND THINGS TO KNOW ABOUT THE SVP REALTIME PAGE&amp;lt;br&amp;gt;&lt;br /&gt;
Jun, 2009 Kirk&lt;br /&gt;
&lt;br /&gt;
Webpage:&lt;br /&gt;
[http://www.icess.ucsb.edu/drifter/realtime-SVP/ SVP Realtime Page]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are three main parts needed to display the data (details below):&amp;lt;br&amp;gt;&lt;br /&gt;
1. Fetching the data (using Python script running on dub-locl)&amp;lt;br&amp;gt;&lt;br /&gt;
2. Parsing the data (using PHP script running on dub-locl)&amp;lt;br&amp;gt;&lt;br /&gt;
3. Displaying the data (using Javascript running on your browser)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1. FETCHING THE DATA&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On dub-locl.icess.ucsb.edu in /localhome/kirk/Scripts/CalCOFI_ARGOS_SVP_scripts_and_data/ there is a Python script 'fetch_calcofi_svp_data.py'.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;There is essentially nothing to configure it, and it's well documented should you need to change anything.  It is set to fetch via ftp from ftp.aoml.noaa.gov for the last 9 days worth of positions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;It may need to be updated with drifter numbers and temperature coefficients as more are sent drifting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;It is set to run about every 6 hours (05:30, 11:30, 17:30 &amp;amp; 20:30 Pacific, and they should post the data at 8am Eastern Time) via a &amp;quot;cron job&amp;quot; on the kirk account.  To edit this job, as kirk, at the Terminal, type 'crontab -e' and use 'vi' style editing commands, or 'crontab -l' to just show it.  (To become kirk, login as drift, then in a Terminal, type 'sudo su -' (then type the drift password) to become root, then 'su kirk' to become kirk.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;It fetches their file, archives it (to /localhome/kirk/Scripts/CalCOFI_ARGOS_SVP_scripts_and_data/DATA_ARCHIVE/), uncompresses it, and starts the parsing script (see next section).&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;2. PARSING THE DATA&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This PHP script on dub-local.icess.ucsb.edu (called by the fetching script above) is /localhome/kirk/Scripts/CalCOFI_ARGOS_SVP_scripts_and_data/parse_calcofi_argos_svp_data.php and is pretty well documented. It breaks down the fairly cryptic GPS encoding and then saves it to a friendly format. It archives this file to /localhome/kirk/Scripts/CalCOFI_ARGOS_SVP_scripts_and_data/DATA_ARCHIVE/yyyymmdd_CALCOFI_SVP_LATEST_DATA.txt and copies this file to /home/kirk/public_html/drifter/realtime-SVP/CALCOFI_SVP_LATEST_DATA.txt so the website has access to it.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It outputs 1 record per position report in this format:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drift_no,YY-MM-DD,HH:MM:SS,milliseconds_since_Jan01_1970,orig_report_num,lat,lon,position_type(1=GPS,0=ARGOS),SST(C),batt(V),base_time,record_num&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
93561,2007-04-03,10:34:45,1175610885000,136,+26.6980,-081.9550,0,NaN,NaN,NaN,NaN    (an argos position)&lt;br /&gt;
93561,2007-04-03,10:33:37,1175610817000,137,+26.6979,-081.9557,1,NaN,12.4,2007-04-03_11:33:30,2   (a gps position)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;There is very little configuring it, and it's well documented should you need to change anything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;3. DISPLAYING THE DATA   (at [http://www.icess.ucsb.edu/drifter/realtime-SVP/ realtime page] or [http://svp.drifterdata.com http://svp.drifterdata.com]) &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Google mapping code was adapted from the Iridium/Microstar realtime page at [http://www.icess.ucsb.edu/drifter/realtime/ http://www.icess.ucsb.edu/drifter/realtime/]&lt;br /&gt;
&lt;br /&gt;
The two main javascript files are ajax.js and map.js.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The javascript files are compressed using http://www.icess.ucsb.edu/drifter/realtime/JavascriptCompressor.html, so changes made to the xxx__UNCOMPRESSED__.js files won't show up on the page unless they are compressed and saved without the &amp;quot;__UNCOMPRESSED__&amp;quot; portion in the name, '''OR*''' at the beginning of index.php those two types of files are commented/uncommented out as appropriate.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt; POTENTIAL PROBLEMS / TROUBLESHOOTING&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Prob: The data file (/home/kirk/public_html/drifter/realtime-SVP/CALCOFI_SVP_LATEST_DATA.txt) is not getting saved/updated&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Is the dub-locl computer up?&lt;br /&gt;
&amp;lt;li&amp;gt;Is /home/kirk/ mounted on dub-locl? (It should come up automatically)&lt;br /&gt;
&amp;lt;li&amp;gt;Has 6 hours passed since the last time it ran? It only runs about every 6 hours (see above), but they only update the file once per day at 8am Eastern.&lt;br /&gt;
&amp;lt;li&amp;gt;Try fetching the data yourself via ftp:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ftp://ftp.aoml.noaa.gov/phod/pub/daily_buoydata/7325/&lt;br /&gt;
login: anonymous&lt;br /&gt;
pass: e_mail&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Look for a file of today's data with the following name format:&lt;br /&gt;
ddMMMyy.LOG-GZ, for example: 15JUL09.LOG-GZ   (i.e. for july 15th, 2009)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE: if you want to get data from a specific time period, use julian dates and GMT hours after the comma after 'ds'.&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
prv,7325,ds,174/12-175/10,93561-93587   (for June 23rd at 12Z through June 24th at 10Z)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Prob: The data file (/home/locl/file_sharing/SVP_CALCOFI_LATEST_DATA.txt) shows no data&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;There probably aren't any drifters talking in the last 24hours (look for the line &amp;quot;No data available or authorization failure&amp;quot; in the file or try manually getting the data)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;INFO ABOUT TIME CALCULATION&amp;lt;/h2&amp;gt;&lt;br /&gt;
Basically each data block is for three hourly reports, and data blocks can be repeated (I&lt;br /&gt;
have no idea how that's determined), and there is a slight adjustment&lt;br /&gt;
to the time based on &amp;quot;fix delay&amp;quot; (or &amp;quot;Length of Acquisition&amp;quot;, which is&lt;br /&gt;
usually on the order of &amp;lt;60 seconds).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For example (showing the second to last block in the existing file as&lt;br /&gt;
I write this):&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
07325 93575  15 27 N 3 2009-06-25 20:18:59  34.416  240.156  0.000 401652653&lt;br /&gt;
      2009-06-25 20:21:22  3         12           62          678           94&lt;br /&gt;
                                     00           01       344156           01&lt;br /&gt;
                                1198452           01           04          689&lt;br /&gt;
                                     01       344155           01      1198448&lt;br /&gt;
                                     01           04          661           01&lt;br /&gt;
                                 344156           01      1198448           01&lt;br /&gt;
                                     04          587           00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This *first line* contains ARGOS only info:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
prog_num                     07325&lt;br /&gt;
drift_num                    93575&lt;br /&gt;
lines_in_sat_pass          15&lt;br /&gt;
num_sensors                27&lt;br /&gt;
sat_name                            N&lt;br /&gt;
resolution                          3&lt;br /&gt;
time            2009-06-25 20:18:59&lt;br /&gt;
xmit_lat                     34.416&lt;br /&gt;
xmit_lon                   240.156&lt;br /&gt;
xmit_alt                      0.000&lt;br /&gt;
xmit_freq              401652653&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The next 7 lines contain 3, hourly GPS reports.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 1:  (2009-06-25 20:21:22  3     12      62       678        94)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BASE Date/Time                  2009-06-25 20:21:22&lt;br /&gt;
# identical messages rcvd                       3&lt;br /&gt;
Drogue count over last half hour               12&lt;br /&gt;
Battery voltage = n * 0.2                 62   -&amp;gt; 12.4V&lt;br /&gt;
SST(C) = x * 0.043 - 5                   678   -&amp;gt; 24.154&lt;br /&gt;
Checksum                                       94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 2:  (00      01    344156        01)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Msg ID                                   00   -&amp;gt; this is 1st message sent&lt;br /&gt;
Valid Pos #1 (1=good, 0=bad)             01   -&amp;gt; good&lt;br /&gt;
Lat #1 (ten-thousandths of degree)    344156  -&amp;gt; 34.4156&lt;br /&gt;
Lat #1 Ref (0 = South, 1 = North)        01   -&amp;gt; North&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 3:  (1198452      01        04       689)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lon #1 (ten-thousandths of degree)     1198452 -&amp;gt; 119.8452&lt;br /&gt;
Lon #1 Ref (0 = East, 1 = West)           01   -&amp;gt; West&lt;br /&gt;
Pos #1 Length of Acq (seconds = n * 4)    04   -&amp;gt; 16(seconds)&lt;br /&gt;
SST #1 (C) = x * 0.043 - 5                689  -&amp;gt; 24.627&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 4:  (01  344155        01   1198448)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Valid Pos #2 (1=good, 0=bad)                01 -&amp;gt; good&lt;br /&gt;
Lat #2 (ten-thousandths of degree)     344155  -&amp;gt; 34.4155&lt;br /&gt;
Lat #2 Ref  (0 = South, 1 = North)         01  -&amp;gt; North&lt;br /&gt;
Lon #2 (ten-thousandths of degree)     1198448 -&amp;gt; 119.8448&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 5:  (01      04       661        01)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lon #2 Ref (0 = East, 1 = West)         01   -&amp;gt; West&lt;br /&gt;
Pos #2 Length of Acq (seconds = n * 4)  04   -&amp;gt; 16(seconds)&lt;br /&gt;
SST #2  (C) = x * 0.043 - 5             661  -&amp;gt; 23.423&lt;br /&gt;
Valid Pos #3 (1=good, 0=bad)            01   -&amp;gt; good&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 6:  (344156      01   1198448        01)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lat #3 (ten-thousandths of degree)   344156  -&amp;gt; 34.4156&lt;br /&gt;
Lat #3 Ref  (0 = South, 1 = North)        01 -&amp;gt; North&lt;br /&gt;
Lon #3 (ten-thousandths of degree)   1198448 -&amp;gt; 119.8448&lt;br /&gt;
Lon #3 Ref (0 = East, 1 = West)         01   -&amp;gt; West&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 7:  (04     587        00)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Pos #3 Length of Acq (seconds = n * 4)   04   -&amp;gt; 16(seconds)&lt;br /&gt;
SST #3  (C) = x * 0.043 - 5              587  -&amp;gt; 20.241&lt;br /&gt;
Null bits                      (only for padding, ignore)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-Total bit count (a very non trivial calculation) of all 7 lines must equal the checksum value or&lt;br /&gt;
message block is considered garbled and thus ignored.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-Times of GPS reports are calculated thusly:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
1) Take BASE time, subtract (Msg ID*3)   [that is, if message has been&lt;br /&gt;
repeated, it is at least 3 hours old -- I have a switch in my code&lt;br /&gt;
(it's turned on for now) which will ignore messages with a message&lt;br /&gt;
ID&amp;gt;0 because the original may be also present, and it's possible the&lt;br /&gt;
duplicate isn't an exact duplicate and then you get slightly different&lt;br /&gt;
reports at similar times]&amp;lt;br&amp;gt;&lt;br /&gt;
2) Then, subtract 2 hours for Pos #3, and 1 hour for Pos #2 and 0 for Pos #1&amp;lt;br&amp;gt;&lt;br /&gt;
3) Then subtract the associated small &amp;quot;Length of Acq&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Thus, the 2nd GPS time (i.e. #2) would be calculated thusly:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BASE time: 2009-06-25 20:21:22&lt;br /&gt;
minus 0 hours (because Msg ID is 0)&lt;br /&gt;
minus 1 hour (because it's Pos #2)&lt;br /&gt;
minus (pos #2 length of acq) 16 seconds&lt;br /&gt;
&lt;br /&gt;
equals:  2009-06-25 19:21:06&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
An additional wacky thing is that due to repetition of the messages,&lt;br /&gt;
or god knows what, the calculations of the reports you see aren't&lt;br /&gt;
necessarily in chronological order. So, after doing all the&lt;br /&gt;
calculations, I then sort them chronologically before outputting&lt;br /&gt;
(within the parse_argos_data.php script), so that when showing the&lt;br /&gt;
track lines, the points are in order.&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-locl.eri.ucsb.edu/index.php?title=CalCOFI_Drifter_Realtime_Webpage_Info&amp;diff=12</id>
		<title>CalCOFI Drifter Realtime Webpage Info</title>
		<link rel="alternate" type="text/html" href="https://wiki-locl.eri.ucsb.edu/index.php?title=CalCOFI_Drifter_Realtime_Webpage_Info&amp;diff=12"/>
		<updated>2009-07-10T06:46:56Z</updated>

		<summary type="html">&lt;p&gt;Kirk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;CalCOFI SVP Drifter Realtime Webpage Wiki&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTES AND THINGS TO KNOW ABOUT THE SVP REALTIME PAGE&amp;lt;br&amp;gt;&lt;br /&gt;
Jun, 2009 Kirk&lt;br /&gt;
&lt;br /&gt;
Webpage:&lt;br /&gt;
[http://www.icess.ucsb.edu/drifter/realtime-SVP/ SVP Realtime Page]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are three main parts needed to display the data (details below):&amp;lt;br&amp;gt;&lt;br /&gt;
1. Fetching the data (using Python script running on dub-locl)&amp;lt;br&amp;gt;&lt;br /&gt;
2. Parsing the data (using PHP script running on dub-locl)&amp;lt;br&amp;gt;&lt;br /&gt;
3. Displaying the data (using Javascript running on your browser)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1. FETCHING THE DATA&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On dub-locl.icess.ucsb.edu in /localhome/kirk/Scripts/CalCOFI_ARGOS_SVP_scripts_and_data/ there is a Python script 'fetch_calcofi_svp_data.py'.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;There is essentially nothing to configure it, and it's well documented should you need to change anything.  It is set to fetch via ftp from ftp.aoml.noaa.gov for the last 9 days worth of positions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;It may need to be updated with drifter numbers and temperature coefficients as more are sent drifting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;It is set to run about every 6 hours (05:30, 11:30, 17:30 &amp;amp; 20:30 Pacific, and they should post the data at 8am Eastern Time) via a &amp;quot;cron job&amp;quot; on the kirk account.  To edit this job, as kirk, at the Terminal, type 'crontab -e' and use 'vi' style editing commands, or 'crontab -l' to just show it.  (To become kirk, login as drift, then in a Terminal, type 'sudo su -' (then type the drift password) to become root, then 'su kirk' to become kirk.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;It fetches their file, archives it (to /localhome/kirk/Scripts/CalCOFI_ARGOS_SVP_scripts_and_data/DATA_ARCHIVE/), uncompresses it, and starts the parsing script (see next section).&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2. PARSING THE DATA&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This PHP script on dub-local.icess.ucsb.edu (called by the fetching script above) is /localhome/kirk/Scripts/CalCOFI_ARGOS_SVP_scripts_and_data/parse_calcofi_argos_svp_data.php and is pretty well documented. It breaks down the fairly cryptic GPS encoding and then saves it to a friendly format. It archives this file to /localhome/kirk/Scripts/CalCOFI_ARGOS_SVP_scripts_and_data/DATA_ARCHIVE/yyyymmdd_CALCOFI_SVP_LATEST_DATA.txt and copies this file to /home/kirk/public_html/drifter/realtime-SVP/CALCOFI_SVP_LATEST_DATA.txt so the website has access to it.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It outputs 1 record per position report in this format:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drift_no,YY-MM-DD,HH:MM:SS,milliseconds_since_Jan01_1970,orig_report_num,lat,lon,position_type(1=GPS,0=ARGOS),SST(C),batt(V),base_time,record_num&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
93561,2007-04-03,10:34:45,1175610885000,136,+26.6980,-081.9550,0,NaN,NaN,NaN,NaN    (an argos position)&lt;br /&gt;
93561,2007-04-03,10:33:37,1175610817000,137,+26.6979,-081.9557,1,NaN,12.4,2007-04-03_11:33:30,2   (a gps position)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;There is very little configuring it, and it's well documented should you need to change anything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;3. DISPLAYING THE DATA   (at [http://www.icess.ucsb.edu/drifter/realtime-SVP/ realtime page] or [http://svp.drifterdata.com http://svp.drifterdata.com]) &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Google mapping code was adapted from the Iridium/Microstar realtime page at [http://www.icess.ucsb.edu/drifter/realtime/ http://www.icess.ucsb.edu/drifter/realtime/]&lt;br /&gt;
&lt;br /&gt;
The two main javascript files are ajax.js and map.js.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The javascript files are compressed using http://www.icess.ucsb.edu/drifter/realtime/JavascriptCompressor.html, so changes made to the xxx__UNCOMPRESSED__.js files won't show up on the page unless they are compressed and saved without the &amp;quot;__UNCOMPRESSED__&amp;quot; portion in the name, '''OR*''' at the beginning of index.php those two types of files are commented/uncommented out as appropriate.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt; POTENTIAL PROBLEMS / TROUBLESHOOTING&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Prob: The data file (/home/kirk/public_html/drifter/realtime-SVP/CALCOFI_SVP_LATEST_DATA.txt) is not getting saved/updated&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Is the dub-locl computer up?&lt;br /&gt;
&amp;lt;li&amp;gt;Is /home/kirk/ mounted on dub-locl? (It should come up automatically)&lt;br /&gt;
&amp;lt;li&amp;gt;Has 6 hours passed since the last time it ran? It only runs about every 6 hours (see above), but they only update the file once per day at 8am Eastern.&lt;br /&gt;
&amp;lt;li&amp;gt;Try fetching the data yourself via ftp:&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ftp://ftp.aoml.noaa.gov/phod/pub/daily_buoydata/7325/&lt;br /&gt;
login: anonymous&lt;br /&gt;
pass: e_mail&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Look for a file of today's data with the following name format:&lt;br /&gt;
ddMMMyy.LOG-GZ, for example: 15JUL09.LOG-GZ   (i.e. for july 15th, 2009)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE: if you want to get data from a specific time period, use julian dates and GMT hours after the comma after 'ds'.&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
prv,7325,ds,174/12-175/10,93561-93587   (for June 23rd at 12Z through June 24th at 10Z)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Prob: The data file (/home/locl/file_sharing/SVP_CALCOFI_LATEST_DATA.txt) shows no data&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;There probably aren't any drifters talking in the last 24hours (look for the line &amp;quot;No data available or authorization failure&amp;quot; in the file or try manually getting the data)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;INFO ABOUT TIME CALCULATION&amp;lt;/h2&amp;gt;&lt;br /&gt;
Basically each data block is for three hourly reports, and data blocks can be repeated (I&lt;br /&gt;
have no idea how that's determined), and there is a slight adjustment&lt;br /&gt;
to the time based on &amp;quot;fix delay&amp;quot; (or &amp;quot;Length of Acquisition&amp;quot;, which is&lt;br /&gt;
usually on the order of &amp;lt;60 seconds).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For example (showing the second to last block in the existing file as&lt;br /&gt;
I write this):&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
07325 93575  15 27 N 3 2009-06-25 20:18:59  34.416  240.156  0.000 401652653&lt;br /&gt;
      2009-06-25 20:21:22  3         12           62          678           94&lt;br /&gt;
                                     00           01       344156           01&lt;br /&gt;
                                1198452           01           04          689&lt;br /&gt;
                                     01       344155           01      1198448&lt;br /&gt;
                                     01           04          661           01&lt;br /&gt;
                                 344156           01      1198448           01&lt;br /&gt;
                                     04          587           00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This *first line* contains ARGOS only info:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
prog_num                     07325&lt;br /&gt;
drift_num                    93575&lt;br /&gt;
lines_in_sat_pass          15&lt;br /&gt;
num_sensors                27&lt;br /&gt;
sat_name                            N&lt;br /&gt;
resolution                          3&lt;br /&gt;
time            2009-06-25 20:18:59&lt;br /&gt;
xmit_lat                     34.416&lt;br /&gt;
xmit_lon                   240.156&lt;br /&gt;
xmit_alt                      0.000&lt;br /&gt;
xmit_freq              401652653&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The next 7 lines contain 3, hourly GPS reports.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 1:  (2009-06-25 20:21:22  3     12      62       678        94)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BASE Date/Time                  2009-06-25 20:21:22&lt;br /&gt;
# identical messages rcvd                       3&lt;br /&gt;
Drogue count over last half hour               12&lt;br /&gt;
Battery voltage = n * 0.2                 62   -&amp;gt; 12.4V&lt;br /&gt;
SST(C) = x * 0.043 - 5                   678   -&amp;gt; 24.154&lt;br /&gt;
Checksum                                       94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 2:  (00      01    344156        01)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Msg ID                                   00   -&amp;gt; this is 1st message sent&lt;br /&gt;
Valid Pos #1 (1=good, 0=bad)             01   -&amp;gt; good&lt;br /&gt;
Lat #1 (ten-thousandths of degree)    344156  -&amp;gt; 34.4156&lt;br /&gt;
Lat #1 Ref (0 = South, 1 = North)        01   -&amp;gt; North&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 3:  (1198452      01        04       689)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lon #1 (ten-thousandths of degree)     1198452 -&amp;gt; 119.8452&lt;br /&gt;
Lon #1 Ref (0 = East, 1 = West)           01   -&amp;gt; West&lt;br /&gt;
Pos #1 Length of Acq (seconds = n * 4)    04   -&amp;gt; 16(seconds)&lt;br /&gt;
SST #1 (C) = x * 0.043 - 5                689  -&amp;gt; 24.627&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 4:  (01  344155        01   1198448)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Valid Pos #2 (1=good, 0=bad)                01 -&amp;gt; good&lt;br /&gt;
Lat #2 (ten-thousandths of degree)     344155  -&amp;gt; 34.4155&lt;br /&gt;
Lat #2 Ref  (0 = South, 1 = North)         01  -&amp;gt; North&lt;br /&gt;
Lon #2 (ten-thousandths of degree)     1198448 -&amp;gt; 119.8448&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 5:  (01      04       661        01)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lon #2 Ref (0 = East, 1 = West)         01   -&amp;gt; West&lt;br /&gt;
Pos #2 Length of Acq (seconds = n * 4)  04   -&amp;gt; 16(seconds)&lt;br /&gt;
SST #2  (C) = x * 0.043 - 5             661  -&amp;gt; 23.423&lt;br /&gt;
Valid Pos #3 (1=good, 0=bad)            01   -&amp;gt; good&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 6:  (344156      01   1198448        01)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lat #3 (ten-thousandths of degree)   344156  -&amp;gt; 34.4156&lt;br /&gt;
Lat #3 Ref  (0 = South, 1 = North)        01 -&amp;gt; North&lt;br /&gt;
Lon #3 (ten-thousandths of degree)   1198448 -&amp;gt; 119.8448&lt;br /&gt;
Lon #3 Ref (0 = East, 1 = West)         01   -&amp;gt; West&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
---- Line 7:  (04     587        00)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Pos #3 Length of Acq (seconds = n * 4)   04   -&amp;gt; 16(seconds)&lt;br /&gt;
SST #3  (C) = x * 0.043 - 5              587  -&amp;gt; 20.241&lt;br /&gt;
Null bits                      (only for padding, ignore)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NOTES:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-Total bit count (a very non trivial calculation) of all 7 lines must equal the checksum value or&lt;br /&gt;
message block is considered garbled and thus ignored.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-Times of GPS reports are calculated thusly:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
1) Take BASE time, subtract (Msg ID*3)   [that is, if message has been&lt;br /&gt;
repeated, it is at least 3 hours old -- I have a switch in my code&lt;br /&gt;
(it's turned on for now) which will ignore messages with a message&lt;br /&gt;
ID&amp;gt;0 because the original may be also present, and it's possible the&lt;br /&gt;
duplicate isn't an exact duplicate and then you get slightly different&lt;br /&gt;
reports at similar times]&amp;lt;br&amp;gt;&lt;br /&gt;
2) Then, subtract 2 hours for Pos #3, and 1 hour for Pos #2 and 0 for Pos #1&amp;lt;br&amp;gt;&lt;br /&gt;
3) Then subtract the associated small &amp;quot;Length of Acq&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Thus, the 2nd GPS time (i.e. #2) would be calculated thusly:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BASE time: 2009-06-25 20:21:22&lt;br /&gt;
minus 0 hours (because Msg ID is 0)&lt;br /&gt;
minus 1 hour (because it's Pos #2)&lt;br /&gt;
minus (pos #2 length of acq) 16 seconds&lt;br /&gt;
&lt;br /&gt;
equals:  2009-06-25 19:21:06&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
An additional wacky thing is that due to repetition of the messages,&lt;br /&gt;
or god knows what, the calculations of the reports you see aren't&lt;br /&gt;
necessarily in chronological order. So, after doing all the&lt;br /&gt;
calculations, I then sort them chronologically before outputting&lt;br /&gt;
(within the parse_argos_data.php script), so that when showing the&lt;br /&gt;
track lines, the points are in order.&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kirk</name></author>
		
	</entry>
</feed>