publicStmt.tcl

INSTALLATION:

To extract the needed files from **publicstmt.tar**:

Create the directory /home/local/lclapps/pcpnPublic.

Move or copy the tar file, **publicstmt.tar**, to the pcpnPublic
directory.

Change (**cd**) to the pcpnPublic directory.

As user fxa, extract the files from **publicstmt.tar** by:

**tar --xvf publicstmt.tar**

In the pcpnPublic directory:

**mkdir asosData**

**mkdir hydData**

**cp confighydpcpnPublic.pl**

**cp configmetarpcpnPublic.pl**

There should be three directories. The main directory should be
pcpnPublic and there should be two sub-directories. All directories are
listed below, along with their function or use.

-   pcpnPublic- Contains all the Tcl/Tk and Perl/Tk scripts.

-   asosData- Contains daily asos/metar precipitation totals and
    latitude and longitude coordinates for asos/metar stations.

-   hydData -- Contains the daily HYD (co-op hydrologic precipitation
    reports).

SETUP: awpdecode_metar.pl

This PERL program will decode selected surface aviation
observations(metar) to obtain daily precipitation data (00 UTC-12
UTC...nighttime data and 12 UTC-24 UTC...daytime data) for use by the
**publicStmtGen.tcl** main program. The script must be run from a
trigger or cron. It is recommended that the script run once daily around
0115 UTC. The output **(asosData** **subdirectory pcpn_obs.dat**) will
be a matrix of precipitation data for the user defined metar stations.
The format for the data matrix is shown below:

Date PD STN STN STN...

YYYYMMDD NIT P P P...

YYYYMMDD DAY P P P... where YYYY is the year, MM is the month, DD is the
day, STN is the metar/asos id, and P is the precipitation (decimal
omitted ex. 1.00 inch will be 100). Also note NIT will be the night time
12-hr period and DAY will be the day time 12-hr period.

To setup the program to decode the metar/asos precipitation data, run
**configmetarpcpnPublic.pl**. Using the GUI enter the metar stations to
decode along with latitude and longitude coordinates. Click the
"configure" button when done. This will create the
**awpdecode_metar.config** file and store it in the default pcpnPublic
directory.

Example of script that runs from cron:

#!/bin/csh

\# csh script to decode mtr data for publicStmtGen.tcl program.

\# Should run from cron.

\#

source \$FXA_HOME/readenv.csh

cd /home/local/lclapps/pcpnPublic

perl awpdecode_metar.pl

SETUP:display_precip.pl

This Perl program will display the last seven days of precipitation at
the selected metar/asos sites. Awpdecode_metar.pl will call this script.
The output is used as the input file for the main program
publicStmtGen.tcl. The output file **asosdata.txt** is located in the
asosData subdirectory.

SETUP: decode_asos.pl

This Perl program will decode the latest metar/asos reports from a
selected list of stations. The program needs the
**awpdecode_metar.config** file. Unlike the awpdecode_metar.pl script,
decode_asos.pl will not run from a cron. The main program
publicStmtGen.tcl will call decode_asos.pl at runtime to get the latest
metar/asos reports. The output file will be stored in the asosData
subdirectory and similar in format to the awpdecode_metar.pl output.

SETUP: asoslatlon.pl

This Perl program will set up a latitude and longitude file
(asoslatlon.txt) for the decoded asos/metar stations. The file is stored
in the asosData subdirectory in the following format:

ASOS REPORTS

PLACE , XXXX, COUNTY/STATE, SOURCE, LAT, LON

Where PLACE is the station name, XXXX is the station identifier,
COUNTY/STATE is the county and state location, SOURCE is the type of
station...example ASOS, LAT is the latitude coordinate, and LON is the
longitude coordinate. The program needs the **awpdecode_metar.config**
file.

SETUP:decode_hyd.pl

This Perl program will decode the hydrologic area (CO-OP) daily
precipitation totals product (HYD). The script must be run from a
trigger or cron. It is recommended that the script run once daily around
1700 UTC. The script is also called by the main program
publicStmtGen.tcl at runtime. To ensure proper decoding of the HYD
product, the template must be in the basic format similar to the
following example: (stations reporting temperature and precipitation,
the precipitation is column four after the SID. Stations reporting
precipitation only, column one after SID).

COLUMBIA HYDROLOGIC AREA TEMPERATURES AND PRECIPITATION

NATIONAL WEATHER SERVICE COLUMBIA SC

1059 AM EDT THU OCT 11 2007

.B CAE 1011 E DH07/TX/TN/TA/PPP/TSIRZX/TSIRZN/TSIRZ/EP

:

:MAX..HIGH TEMPERATURE LAST 24 HRS MIN..LOW TEMPERATURE LAST 24 HRS

:CUR..CURRENT TEMPERATURE PCPN..PRECIPITATION LAST 24 HRS

:EVAPORATION IN INCHES

:

: AIR TEMP SOIL TEMP

:STATION SID MAX MIN CUR PCPN MAX MIN CUR EVAP

:

:\...NORTH MIDLANDS\...

:CEDAR CREEK :BLYS1 M/ M/ M/ M / M/ M/ M/

:CHERAW :CHES1 M/ M/ M/ M ////

:CHESTERFIELD :CTFS1 M/ M/ M/ M / M/ M//

:BISHOPVILLE :BSPS1 87/ 51/ 56/ 0.00 ////

:PAGELAND :PGLS1 87/ 51/ 55/ 0.00 ////

:SUMTER :SMRS1 M/ M/ M/ M ////

:WINNSBORO :WNBS1 M/ M/ M/ M ////

:LONGTOWN :LNTS1 87/ 52/ 63/ 0.00 ////

:

:\...SOUTH MIDLANDS\...

:COLUMBIA METRO APT:CAE 89/ 53/ 61/ 0.00 / 84/ 77/ 77/

:COLUMBIA OWENS APT:CUB 89/ 59/ 60/ 0.00 ////

:EUTAWVILLE :EUTS1 M/ M/ M/ M / M/ M//

:ORANGEBURG WTR PLT:ORBS1 M/ M/ M/ M ////

:ORANGEBURG AIRPORT:OGB 89/ 54/ 55/ 0.00 ////

:PELION :PLNS1 M/ M/ M/ 0.00 ////

:SANDHILL :SAHS1 88/ 54/ 59/ 0.00 / 75/ 75/ 75/ 0.26

:SANDY RUN :SANS1 88/ 55/ 58/ 0.00 ////

:BAMBERG :BAMS1 M/ M/ M/ M ////

:BATESBURG :BATS1 87/ 53/ 55/ 0.00 ////

:

:\...CENTRAL SAVANNAH RIVER AREA\...

:AIKEN :AIKS1 89/ 47/ 53/ 0.00 ////

:AUGUSTA BUSH APT :AGS 93/ 49/ 49/ 0.00 ////

:AUGUSTA DANIEL APT:DNL 89/ 57/ 57/ 0.00 ////

:BARNWELL :BNLS1 91/ 48/ 50/ 0.00 / 84/ 68/ 69/ 0.23

:JOHNSTON :JOHS1 87/ 50/ 50/ 0.00 / 75/ 73/ 73/

:WAYNESBORO :WYNG1 91/ 54/ 55/ 0.00 ////

.END

: PRECIPITATION ONLY STATIONS

:

.B CAE 1011 E DH07/PPP

:APPLING :APPG1 0.00 :AUGUSTA 11TH ST:AGUG1 0.00

:CLARKS HILL LK :CHDS1 0.00 :CHAPPELLS :CHAS1 0.00

:EDGEFIELD :EDGS1 0.00 :LK GREENWOOD :CHPS1 0.00

:LAKE MURRAY :IRMS1 0.00 :LAKE WATEREE :WATS1 0.00

:NEWBERRY :NEWS1 0.00 :PARR SHOALS :PASS1 M

:NEAL SHOALS :NELS1 0.00 :RIMINI :RIMS1 0.00

:SALUDA FLTR PLT :SADS1 0.00 :SPRINGFIELD :SPRS1 0.00

:JEFFERIES HYDRO :PINS1 0.00 :LAKE MARION :PNVS1 0.00

.END

The output will be a text file of the decoded CO-OP reports located in
the hydData subdirectory in the following format:

Filename: YYYYMMDDcoopdata.txt ,where YYYY is the year. MM is the month,
and DD is the day.

Output: LAT, LON, STN, SID, P , where LAT is the latitude. LON is the
longitude. STN is the co-op station. SID is the station id. P is the
24-hr precipitation total.

To setup the program to decode the HYD precipitation data, run
**confighydpcpnPublic.pl**. Using the GUI enter the CO-OP stations to
decode along with latitude and longitude coordinates. Note that precip
only stations are entered separately. Click the "configure" button when
done. This will create the **decode_hyd.config** file and store it in
the default pcpnPublic directory.

SETUP:coopdatalatlon.pl

This Perl program will set up a latitude and longitude file
(cooplatlon.txt) for the decoded

CO-OP stations. The file is stored in the hydData subdirectory in the
following format:

OFFICIAL REPORTS

PLACE, XXXXX, COUNTY/STATE, SOURCE, LAT, LON

Where PLACE is the station name, XXXXX is the station identifier,
COUNTY/STATE is the county and state location, source is the type of
station...example COOP, LAT is the latitude coordinate, and LON is the
longitude coordinate. The program needs the **decode_hyd.config** file

SETUP: Installation of GUI section of the application:

Place publicStmt.tcl, publicStmt.dat, stmtProgres.tcl, and
publicStmtInit.bat into the ../lclapps/pcpnPublic directory.

You will have to edit publicStmt.dat. Changes must be made to the
variables: keyOut, office, and zoneStg.

keyOut is the product's AWIPS key, e.g., set keyOut "KCAEPNSCAE"

Note the leading "K"

The office variable is your office name, e.g., set office "COLUMBIA SC"

Finally, zoneStg is the zone listing which will appear at the top of the
formatted product, e.g., set zoneStg
"GAZ040-063\>065-077-SCZ015-016-020-"

Note the dash appended to the string.

publicStmt.tcl is the main GUI application. You should not have to make
any changes to this file.

publicStmtInit.bat is the batch file used to launch the application.

e.g., /home/local/lclapps/pcpnPublic/publicStmtInit.bat :0.1 &

Note the display number :0.1. This will cause the application to display
on the left most AWIPS screen. The argument :0.0 will cause a display on
the center screen, and :02 will result in a display on the right screen.
The ending ampersand just allows the application to run in the
background.

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

Description of Making the Public Information Statement

Launch the application as described above with the publicStmtInit.bat
file.

After a progress window an input GUI will display.

The box displayed near the top is a description of the event. You may
want to make some edits to the text in this box to better fit the
weather situation.

The next section shows the cooperative weather observer rainfall amounts
as obtained from the decoded HYD product. The check boxes correspond to
the 24-hour amounts ending at 12z for the date. The check boxes are
labeled in the month-day format, MMDD.

Selecting or de-selecting the check boxes will result in a display of
rainfall totals along the right most boxes.

The middle section corresponds to the ASOS reports. Here, the amounts
are 12-hour totals compared to 24-hour totals for the cooperative
observer reports. Again, selecting or de-selecting the period check
boxes results in the rainfall total displayed along the right part of
the screen.

The bottom section allows the input of unofficial reports. Here, you can
manually type the location, county, source and amount.

Four commands are listed along the bottom of the GUI. These commands
are: Last Sent, Sort, Format, and Exit.

Selecting Last Sent will load totals from the last Public Information
Statement Sent into the AWIPS database.

The sort order will arrange the formatted rainfall reports into either a
listing corresponding to the alphabetical order of the location name, or
numerical order with the higher amounts at the top of the product.

Selecting Exit will end the program without transmitting data.

Selecting Format will result in the public information statement being
displayed in an editable window. Here you can review the product and
make any additional edits before transmitting. If the rainfall total for
a location was left as missing or set to zero, then the location will
not be included in the formatted product.

There are also four commands along the bottom of the public information
edit page. These commands are Spell Check, SEND KCCCPNSXXX, Page Back,
and Exit.

Select spell check with check the product spelling.

Page back will display the previous input screen.

Exit will halt the program without transmission.

Finally, selecting Send will transmit the product.