LABEL WAVE WATCH (Version 2.0) Matthew Hirsch

Background:

LABEL WAVE WATCH is a locally developed program which labels the periods
of the Wave Watch III text product (OSBW##). At the Melbourne, FL (MLB)
office, data for buoy 41009 is stored under the MIAOSBW06 pil, usually
one or two versions back. The initial release of this program (1.0) was
hardcoded to look back a specified number of versions. The latest
release will wait (40 seconds) for all OSB products to arrive before
looking for the version that contains the correct buoy.

Sample output (from 2006 for buoy 41009):

AGNT42 KWBJ 101652

OSBW06

LOCATION : 41009 (28.50N 80.23W)

MODEL : WESTERN NORTH ATLANTIC 0.25DEG

CYCLE : 20061210 T12Z

DDHH HS SS PP DDD SS PP DDD SS PP DDD SS PP DDD SS PP DDD SS PP DDD

\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\--

1006 7 7 07 059

1007 7 7 07 061

1008 7 7 07 061

1009 7 6 07 063 2 10 047

1010 7 6 07 063 2 10 042

1011 7 6 07 064 2 10 047

1012 7 7 07 064 2 10 041

1013 7 7 07 064 2 10 046

1014 7 7 06 065 1 10 040

1015 7 7 06 066 1 10 044

1016 7 7 06 068 1 10 040

1017 7 7 07 069

1018 7 7 07 070

1019 7 7 07 072

\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-- TONIGHT
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\--

1020 7 7 07 074

1021 8 8 07 076

1022 8 8 07 077

1023 8 8 07 079

1100 8 8 07 080

1101 8 8 07 081

1102 8 8 07 082

1103 8 8 07 083

1104 8 8 07 083

1105 8 8 07 084

1106 8 8 07 084

1107 8 8 07 085

1108 8 7 07 081 4 09 101

1109 7 7 07 086

1110 7 6 07 082 4 09 102

\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-- MONDAY
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\--

1111 7 7 07 088

1112 7 7 07 089

1113 7 7 07 089

1114 7 7 08 090

1115 7 7 08 090

1116 7 7 08 091

1117 7 7 09 091

1118 6 6 09 091

1119 6 6 09 091

1120 6 6 09 092

1121 6 6 09 091

1122 6 6 09 091

\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-- MONDAY NIGHT
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\--

1123 6 6 09 090

1200 6 6 09 089

1201 6 6 09 087

1202 6 6 09 087

1203 6 6 09 085

1204 6 6 09 085

1205 7 7 09 084

1206 7 7 09 084

1207 7 7 09 084

1208 7 7 08 084

1209 7 7 08 084

1210 7 7 08 085

\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-- TUESDAY
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\--

1211 7 7 08 084

1212 8 8 08 085

1213 8 8 08 085

1214 8 8 08 086

1215 8 8 08 086

Installation:

1\) Download the tarred file from the NWS Local Applications Database
website:

-waves.tar

2\) Copy the file into your localapps directory and untar it:

-   cd /data/local

-   tar -xvf waves.tar

-   This will create a waves directory which contains the following
    files:

    -   config.py ‑ simple configuration file

    -   waves.py ‑ the main python program that does the labeling

    -   temp\* files -- the program creates temp files to see if the
        station is a match with one specified in config.py

    -   in\*files -- the program has found the correct bulletin and
        outputs the raw text

    -   out\*files -- labeled files that are written to the text
        database

3\) Modify config.py:

-Here at MLB, the program runs out of /data/local/waves/ but you can
change this if you'd like. Don\'t forget the last slash.

-Buoys is a python dictionary which contains keys for each buoy. Each
key corresponds to a value, which is a list in the format \[AWIPS pil
for OSB product, pil for output file\]

-The offset tuples contain times in GMT for each of the labels
corresponding to different days. For example, offset_12Z says the first
label will appear at 20Z on Day 0 (Tonight). The second label will occur
at 11Z on Day 1. If today is Monday (Day 0), this will take on the value
of Tuesday. The third label will occur at 23Z on Day 1 (Tuesday Night).

4\) Run the program

-From /data/local/waves/

-   ./waves.py 41009 format is .waves.py with the buoy \# as the
    argument

> -If you run this from a trigger (off the OSB products), remember to
> spell out the entire path

5\) Other information:

-When the program runs from the command line or more commonly from a
trigger, it creates a \"lock\" file which terminates the next few
triggered calls, so they don\'t run parallel to the first run. If the
program doesn't run successfully, it will not delete the lock file and
all subsequent runs of the program will fail. You can manually delete
the lock files if needed.

6\) Contact:

Please feel free to contact me, Matthew Hirsch, at
[matthew.hirsch@noaa.gov]{.underline} or 321-255-0212 with any of your
questions or comments.