**AWIPS Text Weather Display (wxd)**

**Craig Searcy & Carl Dierking**

**DESCRIPTION**

This set of utilities, written primarily in Perl, supports a common text
viewing interface that fills a variety of needs:

-   It can serve as a window to the AWIPS **[netCDF]{.underline}
    database** for a variety of data types, such as: Metar, Maritime,
    Mesonet, and Pirep observations which can be displayed, either by
    station or collective, in decoded or undecoded form. Collectives can
    be predefined or based on a selected radius from a given location.

-   It can display tables of interpolated values from netCDF model
    guidance, such as a table with several model forecasts of 850, 700,
    500 temperatures for a given location.

-   It can display text data stored in the informix database by PIL or
    WMO Header. Some text can be retrieved along with the latest
    observations for the requested site, such as the current MOS and the
    last 6 decoded observations.

-   It can provide a launch mechanism and viewing window for local
    applications or scripts.

*NOTE: METAR, SHIP, BUOY and PIREP observations are accessed from the
**netCDF files** not the informix database.*

**INSTALLATION**

To install wxd, just untar the package in your designated directory for
local applications.

For example:

cp wxd.tar.gz /data/local/localapps

cd /data/local/localapps

tar -zxvf wxd.tar.gz

The main Perl application script "**wxd.pl**" will be copied to the
"**wxd-awips"** directory and all supporting scripts and Perl modules
will be unpacked to subdirectories below. Subdirectories include:

perllibs - directory for Perl modules used by this application.

doc - directory for help files and the "news" file.

resource - directory for lookup tables and supporting text files used by
the application.

datatools - directory for custom Perl scripts to add functionality to
the base application. (i.e. local tables, conversion tools, etc)

scripts - directory for locally added commands. Shell scripts located in
this directory are run as commands.

**STARTUP**

There is a startup script in the base directory. To start the
application, just run:

./start_wxd.sh

The application starts up in decoded single station decoded mode "S". To
simply view an observation just enter the station ID at the prompt\...

S\[6\] =\> pajn

PAJN SKY CONDITIONS VSBY WX SLP TT DP WIND ALT APP RH PP

141553 FEW020 OVC043 10 121 52 47 1115 989 82

141653 OVC043 7-RA 124 52 47 1114 990 82 1

141753 FEW029 OVC041 10 124 52 46 1113 990 +05 80

141853 FEW027 OVC041 10 126 53 46 1215 990 76

141953 FEW027 OVC039 10 128 53 46 1115 991 76

142053 FEW027 OVC039 10 130 53 45 1115 992 +07 73

There are a number of viewing modes that can be selected. So, to change
modes, you would enter a letter for the mode, and an optional number
following the mode letter to set the number of observations to be
displayed. If a number is not selected, the default is used. For
example, the first command below changes to "M" mode with 10
observations. Then the buoy ID is entered to display the
observations\...

S\[6\] =\> m 10

M\[10\] =\> 46084

46084 LAT LON SKY VS WX SLP TT DP WIND SWT DDSS APP WHSDSPSH CS

141300 56.6 136.2 119 52 49 3006G10 -06 01 1703 03

141400 56.6 136.2 119 51 48 2706G08 -06 01 1703 03

141500 56.6 136.2 122 51 47 3406G10 -00 01 1703 04

141600 56.6 136.2 125 51 48 0000G06 +06 01 0903 03

141700 56.6 136.2 126 51 48 0702G02 +06 01 0903 04

141800 56.6 136.2 126 50 47 0902G04 +04 01 0803 04

141900 56.6 136.2 127 51 47 1104G06 -00 01 0903 03

142000 56.6 136.2 130 51 47 1504G06 +04 01 1704 04

142100 56.6 136.2 133 51 47 1706G06 +06 01 0904 04

There is also undecoded mode "U" which displays raw metar\...

U\[3\] =\> pajn

PAJN RAW MESSAGE

METAR PAJN 071353Z 09011KT 10SM FEW024 SCT048 OVC090 12/11 A2966 RMK AO2
SLP044 LWR ST/CU SW T01220106

METAR PAJN 071453Z 10012KT 10SM FEW025 BKN050 OVC085 13/09 A2967 RMK AO2
SLP047 CIG LWR SW T01330094 51008

METAR PAJN 071553Z 11013KT 10SM SCT042 BKN049 OVC075 14/09 A2968 RMK AO2
SLP051 T01390089

Or raw BBXX for ships and buoys\...

U\[1\] =\> 46084

46084 07191 99566 71362 46/// /1507 10133 20118 40025 51017 91850 22200
10804 20503 3//// 40802 70019 333 91208 555 11076 22081 31806 41510
61849 146071 145072 145077 142075 144083 142079=

There are two type of group modes. The "G" mode displays all
observations for the latest hour within a defined radius of the
requested site. The distance in nautical miles is determined by the
number entered after the "G". So, the example below displays all current
observations within 20 nm of station "pajn"\...

G\[20\] =\> pajn

PAJN DDTTTT SKY CONDITIONS VSBY WX SLP TT DP WIND ALT APP RH PP

SDIA2 071900 066 58 0 1104G09 82

NDIA2 071902 071 57 52 0608G17 83

PAJN 071853 FEW023 BKN038 OVC060 10 066 57 48 1113G19 973 71 0

PAJK 071854 072 59 40 1702 974 49

The other collective mode is "CL" which checks a lookup table for
defined collectives\...

CL\[1\] =\> ASOS

ASOS DDTTTT SKY CONDITIONS VSBY WX SLP TT DP WIND ALT APP RH PP

PAYA 071853 SCT009 BKN013 OVC055 10 040 58 55 0000 965 90

PAGY 071853 FEW032 OVC055 10 059 55 49 2207 971 79 0

PAHN 071854 OVC060 10 062 61 49 0809 971 64

PAJN 071853 FEW023 BKN038 OVC060 10 066 57 48 1113G19 973 71 0

PASI 071853 OVC050 10 038 61 48 1113 964 62

PAKW 071853 FEW047 OVC060 9-RA 071 56 51 0505 974 83 0

PAKT 071853 SCT011 BKN017 OVC028 7-RA 101 54 52 1412G17 983 92 2

PANT 071853 SCT012 BKN017 OVC045 10-RA 105 55 52 1510 984 89 1

A list of the defined collectives can be displayed with the "collect"
command\...

CL\[1\] =\> collect

ASOS: PAYA PAGY PAHN PAJN PASI PAKW PAKT PANT

BUOYS: 46082 46083 46084 46184 46145 46205 46004

MESO: SM TRAM EC SDIA2 EGNA2 LMNA2 NDIA2 RW RE RC GOAA2 COHA2 SWDA2
HWWA2

MOSSTNS: PAYA PAGY PAHN PAJN PAGS PASI PAFE PAPG PAWG PAKT PAMM PANT
PAKW PAHY

OBS: PAGY PAHN PAJP PAHT PAJN JFBA2 JDKA2 TRAM MAYA2 PBP SISA2 PAGS PAOH
PACA PAEL PASI FFIA2 PAFE PAPG PAWG PAAP PACE PAKW PAHY PAKT PAMM PANT
PAYA 46082 46083 46084

OTHERPUBOB: PAYA PAFA PANC KSEA KPDX

SEAKMAROB: 46079 46060 46061 46066 46001 46082 46083 46084 46184 46205
46145 46183 46181 46208 46185 46147 46004 46204 46207 46132 46131 46146

Some modes, such as the TAF or "T" mode will display observations along
with the TAF\...

T\[6\] =\> pajn

PAJN

071353 FEW024 SCT048 OVC090 10 044 54 51 0911 966 89

071453 FEW025 BKN050 OVC085 10 047 56 49 1012 967 +08 77

071553 SCT042 BKN049 OVC075 10 051 57 48 1113 968 71

071653 FEW023 BKN047 OVC075 10-RA 055 57 49 1212 969 74 0

071753 FEW023 BKN042 OVC060 10 060 57 49 1113 971 +13 74 0

071853 FEW023 BKN038 OVC060 10 066 57 48 1113G19 973 71 0

FTUS80 PAJN 071745 RRB

PAJN 071743Z 071818 11014KT P6SM OVC045

FM2000 12012G22KT P6SM -SHRA SCT025 OVC035

TEMPO 2024 5SM SHRA BKN025

FM0400 10009KT P6SM BKN050 BKN100

FM0900 VRB03KT P6SM SCT100

This is also true for all of the MOS modes such as the Eta MOS mode
"ME"\...

ME\[6\] =\> pajn

PAJN

071353 FEW024 SCT048 OVC090 10 044 54 51 0911 966 89

071453 FEW025 BKN050 OVC085 10 047 56 49 1012 967 +08 77

071553 SCT042 BKN049 OVC075 10 051 57 48 1113 968 71

071653 FEW023 BKN047 OVC075 10-RA 055 57 49 1212 969 74 0

071753 FEW023 BKN042 OVC060 10 060 57 49 1113 971 +13 74 0

071853 FEW023 BKN038 OVC060 10 066 57 48 1113G19 973 71 0

FOAK47 PAJN 071200

PAJN ETA MOS GUIDANCE 7/07/2005 1200 UTC

DT /JULY 7/JULY 8 /JULY 9 /JULY 10

HR 18 21 00 03 06 09 12 15 18 21 00 03 06 09 12 15 18 21 00 06 12

N/X 48 73 54 64 52

TMP 58 60 61 60 55 51 50 53 62 68 71 69 61 57 55 56 59 62 62 55 53

DPT 53 54 53 53 53 51 50 51 53 53 52 52 52 52 52 53 55 55 55 55 53

CLD OV OV OV BK BK OV SC FW FW FW SC FW BK OV OV OV OV OV OV OV OV

WDR 11 11 11 12 09 08 00 11 21 25 27 31 09 10 10 09 11 12 09 08 09

WSP 13 13 13 09 07 01 00 01 06 04 03 03 07 08 07 05 08 08 04 08 05

P06 58 38 26 4 4 3 37 32 28 30 53

P12 49 4 42 44 53

Q06 1 0 0 0 0 0 0 0 0 0 1

Q12 1 0 0 0 1

CIG 6 6 6 6 7 7 8 8 8 8 8 8 7 7 6 6 5 5 5 6 5

Text products from the informix database can be displayed with the "P"
mode.

P\[1\] =\> afdajk

FXAK67 PAJK 071905

AFDAJK

SOUTHEAST ALASKA FORECAST DISCUSSION

1100 AM ADT THU JUL 7 2005

.SYNOPSIS\...

.SHORT RANGE\...1001 MB LOW NEAR SITKA MOVING WEST. MOIST

SOUTHERLY FLOW THROUGH INNER CHANNELS. STEADY PRECIPITATION AT 18Z IS

S OF FREDERICK SOUND. EXPECT CONDITIONS TO DETERIORATE CENTRAL AND

NORTHERN INNER CHANNELS THIS AFTN WITH PRECIPITATION LIKELY MOST

OBSERVING STATIONS. PRECIPITATION LEAST LIKELY FAR NORTH COAST BUT
OBSERVATIONS ARE SHOWING LOW CLOUDS PERSIST THERE. \...etc\...

For a list of all the available modes and commands, just enter
\"help"\...

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* WxD
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

**Available modes:**

a additive data mode

cl collective mode

g group mode (area = n nautical miles)

m Decoded Maritime mode

ma MOS AVN mode

me MOS ETA mode

mm MOS MRF mode

mn MOS NGM mode

p AFOS PIL mode

pil AFOS PIL mode

s Decoded OBS mode

sa Decoded MTR mode

sx Decoded Meso mode

t TAF mode

taf TAF mode

u Undecoded OBS mode

ucl collective mode

ug group undecoded mode (area = n nautical miles)

um Undecoded Maritime mode

ux Undecoded Meso mode

w WMOID mode

wmo WMOID mode

**Available commands:**

alias Show known aliases (=\> alias \[string\])

bye Exit

clear Clear the screen

collect Show known collectives (=\> collect \[string\])

colors Colors \[on\|off\]

date Print current time/date

debug Debug \[on\|off\]

exit Exit

help Help text

locate Show Station site information

news Display local news

page Page \[on\|off\]

q Exit

quit Exit

**Installed local scripts:**

chill Wind chill calculator

ffg Flash Flood Guidance

fog Fog potential using UPS techniques

jp Observation pres gradient table

jpfcst Model forecast pres gradient table {model}{-t offsetHour}

mpdiff Pressure difference between sites

mqpf Model Precip forecasts

mtemps Model forecast of upper lvl temps

mtempsLR Model forecast of upper lvl temps

mthk Model forecast of thickness

mthkLR Model forecast of thickness

mxmnrh Get 24 max and min RH for SE AK

pirep Retrieve PIREPs for a site.

rh Relative humidity calculator

rhfcst MOS RH forecast table

scd SCD editor

showstns Displays list of all stations in database by type and state

snow Snow forecast guidance

surge Coastal flood calculator

tmos MOS Temp forecast table

**Installed help docs**

ansitext

news

MetarAK

Mesonet

commands

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

**CUSTOMIZATION**

Local applications, scripts, and graphic tools can be configured as
commands that are launched from the **WXD** window.

To add a command for running a local application, create a special shell
scripts in the "scripts" subdirectory that is the same name as the
command you wish to add. **Make sure they have executable permissions
(chmod +x).** An example of the format of these launching scripts is
shown below\...

#!/bin/sh

#INFO:Observation pres gradient table

\####################################

\$WXDBDIR/datatools/jp.pl

The second line after "#INFO:" should contain a description of the
command. This description will then be displayed in the WXD window with
the "help" command. The last line runs the application, which in the
example above is a perl script for displaying a table of pressure
gradients. The \$WXDBDIR is an environmental variable that the main WXD
script recognizes as the base WXD directory. The output in the WXD
window of the command above is shown below\...

T\[6\] =\> jp

Time CYXY PAGY CWKX PAJN PAYA PAKT PASI CYXY PAJN CWKX CYDB PAJN

-PAJN -PAJN -PAJN -PASI -PAJN -CYZP -PAKT -PAYA-FFIA2 -PAWG -PAHN -PAKT

062000 -1.8 -0.7 -0.8 1.5 -0.7 -0.0 -2.6 -1.1 0.2 -0.9 -2.0 -1.1

062100 -2.0 -0.6 -1.0 1.3 -0.2 -0.3 -2.9 -1.8 0.2 -1.1 -2.5 -1.6

062200 -2.2 -0.3 -0.9 0.9 0.3 -1.0 -2.7 -2.5 0.0 -1.0 -2.7 -1.8

062300 -2.2 -0.1 -0.9 1.1 0.5 -1.6 -3.0 -2.7 0.1 -1.4 -2.3 -1.9

070000 -2.1 -0.1 -0.4 0.9 0.7 -1.6 -3.5 -2.8 0.1 -1.2 -1.8 -2.6

070100 -2.0 0.1 -0.6 0.9 1.0 -1.2 -4.1 -3.0 -0.2 -1.6 -2.0 -3.2

070200 -1.7 0.1 -0.3 0.8 1.0 -1.3 -4.6 -2.7 -0.2 -1.4 -2.5 -3.8

070300 -0.4 0.2 -0.2 0.7 0.8 -0.9 -4.8 -1.2 -0.4 -1.7 -2.7 -4.1

070400 -0.4 0.2 0.3 1.1 0.5 -1.2 -5.2 -0.9 -0.5 -1.4 -2.6 -4.1

070500 -0.6 -0.1 0.3 1.6 0.2 -1.1 -5.6 -0.8 -0.3 -1.7 -2.5 -4.0

070600 -0.9 -0.4 0.7 2.1 -0.3 -1.6 -5.7 -0.6 -0.3 -1.1 -1.8 -3.6

070700 -0.9 -0.6 0.9 2.1 -0.6 -0.9 -5.9 -0.3 -0.2 -0.6 -3.2 -3.8

070800 -1.0 -0.7 1.0 2.4 -0.9 -0.7 -6.2 -0.1 0.2 0.7 -3.1 -3.8

070900 -0.7 -0.3 1.6 2.3 -0.9 -0.7 -6.3 0.2 0.2 -0.1 -1.3 -4.0

071000 -0.9 -0.3 1.6 2.6 -1.4 -0.3 -6.8 0.5 0.5 -0.0 -1.7 -4.2

A sample set of user installed local scripts has been included in the
distribution package. Many of them will need to be modified for your
location, but in most cases that will only require changing station
names or model paths.

Help files and textual information should be located in the "docs"
directory. All files in this directory are displayed in WXD by typing
"help *filename*". Note that help files and user added commands files
are listed with the "help" command.

The "resources" directory contains all of the lookup tables that are
used by the WXD application\...

groups.txt - this file contains the named collectives referenced in "CL"
mode. In the file each name should be followed by the list of
observations associated with that name.

alias.txt -- this file contains aliases that can be used to call text
products from the informix database in "P" or "PIL" mode, rather than
the full PIL.

news.txt -- the contents of this file are always displayed when WXD is
first started.

maritimeStationInfo.txt

metarStationInfo.txt

mesonetStationInfo.txt

The station information files can be copies or symbolic links to the
actual AWIPS station information files used by the system METAR,
Maritime, and Mesonet decoders.

NOTE: The "mesonetStationInfo.txt" file is the LDAD mesonet station file
located in the directory: /awips/fxa/ldad/data. Since this file may be
locally configured in that directory to a different name, it will need
to be copied or linked to the WXD "resources" directory by the name
"mesonetStationInfo.txt". Otherwise, the application will not be able to
access mesonet data.