awips2/edexOsgi/com.raytheon.edex.plugin.shef/documents/metar_to_shef/metar_ver.6.9.doc.txt
2022-05-05 12:34:50 -05:00

3101 lines
122 KiB
Text

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
This_software_was_developed_and_/_or_modified_by_Raytheon_Company,
pursuant_to_Contract_DG133W-05-CQ-1067_with_the_US_Government.
U.S._EXPORT_CONTROLLED_TECHNICAL_DATA
This_software_product_contains_export-restricted_data_whose
export/transfer/disclosure_is_restricted_by_U.S._law._Dissemination
to_non-U.S._persons_whether_in_the_United_States_or_abroad_requires
an_export_license_or_other_authorization.
Contractor_Name:________Raytheon_Company
Contractor_Address:_____6825_Pine_Street,_Suite_340
________________________Mail_Stop_B8
________________________Omaha,_NE_68106
________________________402.291.0100
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
further_licensing_information.
May 27, 2010 - This document included for historical purposes.
-->
************************************************
CBRFC METAR/SM/SDO/SCD Decoder Documentation
************************************************
November 20, 2004
David.Brandon@noaa.gov
801-524-5130
Dave Brandon
*************
Release Notes
*************
********************
Release metar_ver6.9
November 20, 2004
********************
Change 128:
New Command Line Option: -log
When this option is included in the command line, a log
will be turned on. This will tell the decoder to first
copy the current file being processed to the ../err
directory, before any decoding takes place. The name
of the file will be, 'latest_metar_file'. It will be overwritten
each time a new file is processed. The default for this
option is set to off, and no file will be produced.
Change 129:
New Command Line Option: -pct #
When this option is included in the command line, the decoder
will check the metar.cfg file for a list of id's that may
have a reset time associated with resetting the hourly
precipitation gage. The reset times are not necessarilly
on the hour. They need to be accounted for so that the
proper duration for preciptation can be computed.
If the id is found in the list, it
will use the reset time (associated with the id) to compute
the duration of precipitation. The '#' is an integer that
represents a Tolerance level, described below.
The algorithm is as follows:
if ( observation_minute > reset_minute) && observation_minute <= 60.0 )
{
duration_time = observation_minute - reset_minute);
}
else
{
duration_time = observation_minute + 60.0 - reset_minute);
}
if ( (60.0 - duration_time ) <= TOLERANCE )
duration_time = 60.;
Note: The tolerance value is only used for observation times that
are very near the reset time, but the reset has not yet occured.
In this case, the duration_time is set to the full hour (60 minutes).
If the observation occurs just after the reset time, the tolerance
value is not used.
The shef encoding for this precipitation uses the variable duration
code, i.e. 'PPV'.
IMPORTANT: This option requires that the metar.cfg file be edited.
A sample of a metar.cfg file is below. The section that needs to
be added is, e.g.,
.begin_pc_reset
KABC 20
PAYA 20
.end_pc_reset
The first group is the id, the second group is the reset time (minutes).
Below is a sample metar.cfg file with the additional reset group included.
/local/apps/decoders/metar/alpha/test/in
/local/apps/decoders/metar/alpha/test/out
/local/apps/decoders/metar/alpha/test/err
+SAOOUT
-ERRORFILE
-SHEFPASS
XC TA PC UP SW SFQ SFD SD TX TN PPT PPQ UQ PPH PPD PTIR TAIRZZ TAIRZR TAIRZH TAIRZP TAIRZY
.begin_names
KTEX
KTAD
KC96
.end_names
.begin_pc_reset
KABC 20
PAYA 20
.end_pc_reset
Change 130:
The precipitation type, PTIR was corrected so that now it will not
be encoded in shef if there is no current type. Previoulsy, a value
of -1 was encoded.
Change 131:
The shef code for, new 24 snowfall depth was added. This is encoded
as, SFDRZZZ. This is the 24/931sss group located in SCD reports.
The code for new 6 hour snowfall depth is, SFQRZZZ.
The water equivalent codes are, SWIRZZZ.
Change 132:
An internal change was made on how the decoder determined whether
a line was the begnning of a METAR ob, or a continuation line.
Previous versions looked (among other things) for the wind group,
and if found assummed that was the first line of an ob.
It was determined that winds groups showed up in the RMKs section,
and made this assumption invalid.
Change 134:
If more than a trace of precip has fallen, but the amount cannot
be determined, the 7 group is decoded as 7////. Previously, when
this occurred, a 0 was encoded. The current version sends no value.
********************
Release metar_ver6.8
January 16, 2004
********************
Change 127:
The following fixes fixes Change 126. When that changed
was made, it complicated other problems, e.g., the
maintenance indicator could not be read and a segmentation
fault occurred. This change simply first bumped the token
and checked for a null. The subsequent bumping was removed
since it was already bumped for the null check.
********************
Release metar_ver6.7
December 17, 2003
********************
Change 126:
Found another place where if you bumped the token, (++token)
it went to a NULL. Put a check for a NULL. This was in
routine isVsby2ndSite.
********************
Release metar_ver6.6
April 03, 2002
********************
Change 125:
Redo section of code using the -p12z, -p24 and -pall24
switches.
The following logic now applies:
-p12z only applies to seven groups ( e.g. 70020 )
that exist. If the -p12z switch exists (true) and
a seven group exists, the 24 data will ONLY be
encoded for obs in the time window ( 1140 - 1230Z ).
If the -p12z switch does not exist (false ) and
a seven group exists, the 24 hour data will be
encoded for any observation time. Note: the -p12z
has no affect on determining if zero observations
will be generated or not.
The generation of 24 hour amounts of zero is determined
by the existence of the -pall24 and/or -p24 switches.
NOTE: a zero amount will ONLY be generated for an
observation that exists in the 1140-1230Z window.
There is no way to distinguish in a METAR ob which
stations report or do not report 24 hour precipitation
data.
If the -pall24 switch is true, a zero amount for the
24 hours ending at 12z will be generated for every
site ( as long as the site does not explicitly have
a 7 group..in which case the data in the 7 group will
be transmitted.)
If the -p24 switch is true, a zero amount for 24 hours
ending at 12Z will be generated for ONLY automated sites
( that have a A01 or AO2 indicator) ( as long as the site
does not explicitly have a 7 group..in which case the
data in the 7 group will be transmitted.)
********************
Release metar_ver6.5
August 09, 2002
********************
Change 124: Fix core dump problem when encountering an SDO/SCD
observation with no data.
********************
Release metar_ver6.4
June 02, 2002
********************
Change 123: Loosen tolerance times for decoding 3 and 6 hour
precip groups in a regular metar ob.
Function: shef_it_metar
They are now:
code as a 6 hour total
if ( (HRMN_time > 531 && HRMN_time < 830 ) ||
(HRMN_time > 1131 && HRMN_time < 1430 ) ||
(HRMN_time > 1731 && HRMN_time < 2030 ) ||
(HRMN_time > 2331 && HRMN_time < 2400 ) ||
(HRMN_time > 0000 && HRMN_time < 0230 )
)
code as a 3 hour total
if ( (HRMN_time > 231 && HRMN_time < 530 ) ||
(HRMN_time > 831 && HRMN_time < 1130 ) ||
(HRMN_time > 1431 && HRMN_time < 1730 ) ||
(HRMN_time > 2031 && HRMN_time < 2330 )
********************
Release metar_ver6.3
February 26, 2002
********************
Change 122:
Add a blank before the "SPECI" string, making it " SPECI", in function metardrive.
Before this change, NOSPECI was incorrectly detected as SPECI. Obs that were
noted with NOSPECI in the remarks section were encoded ( incorrectly ) as
SPECI obs.
********************
Release metar_ver6.2
September 16, 2001
********************
Change 120: Change to -2147483648 -2147483647
Change 121: Change <local.h> and <metar.h> to
"local.h" and "metar.h"
in numerous routines.
********************
Release metar_ver6.1
February 02, 2001
********************
Change 118: Use Prevailing visibility
Change from putting out: Mptr->SFC_VSBY to
the prevailing visibility: Mptr->prevail_vsbySM
Change 119: Remove rounding for wind in UQ
Remove the +.5 for rounding wind speeds for
the UQ since the speed is reported to ss.s
and not ss ( or unity )..no need to round.
********************
Release metar_ver6.0
December 01, 2000
********************
Change 117: Return statement
Add a return(0) at the bottom of function metar_ob_time.
Apparently the gcc compiler would choke at runtime if
this was not added.
********************
Release metar_ver5.9
October 31, 2000
********************
Change 113:
Check to see if the three mandatory directories
exist ... as a precaution.
Change 114: Fix PE and PD Codes
Switch pe codes of PD and PE. PD should be
pressure change/tendency and PE pressure
characteristic. This is in the shef_it_metar
function and the output is switched.
Change 115:
Change -asosts switch to -l .
Change 116: New switch -q1
Add new switch, -q1. When set this will output
wind direction in hundreds and not tens.
********************
Release metar_ver5.8
October 31, 2000
********************
Change 112: New switch, -j1, -j2, -j3
Add code for -j switch for normal output in individual files.
j1 = output observation + decode list
j2 = output observation only
j3 = output decode list only
********************
Release metar_ver5.7
February 18, 2000
********************
Change 111: New switch, -salias
New switch, -salias. When present, the decoder will
check an alias id table in the cfg file and alias
numerical 'sm' ids to three characters ids.
********************
Release metar_ver5.6
February 4, 2000
********************
Change 109: Handle SPECI's in Collectives
Collectives can now contain all SPECI's. However, each
individual ob is not marked as a SPECI. The token 'SPECI'
is contained at the top of file, indicating that all obs
in the file are SPECI. The decoder now handles this and
notes individual obs as SPECI's.
Change 110: New Switch '-g'
{ The default is to decode and produce shef output for all ids. }
NOTE: If you trigger your metars from INFORMIX (AIWPS) you will
probably not want to use this option. It is designed for offices
that send collectives directly from the SBN (bypassing triggers)
to the decoder queues.
When this switch is included on the command line the decoder will
read in a list of ids from the configuration file. SHEF output will
only be produced for these ids. All other observations will be
tossed out. The decoder arrays are sized to read in up to
2000 ids. The decoder will key off the phrases:
.begin_names
and
.end_names
The ids must be within the phrases, with one id per line.
If you use the four character ids then you must enter the
four characters. If you use the -a option and strip off the
'k' then you can either enter the four or three character id.
A sample of how to include the ids in the metar.cfg file is shown below:
/tmp/queue/metar/in
/tmp/queue/metar/out
/tmp/queue/metar/err
+SAOOUT
+ERRORFILE
-SHEFPASS
SW XW XC XV PD PE PL PT PC TAIRZZ TD UG SD UD US UQ UP UR TX TN PPT PPQ PPH PPD XR PA TAIRZR TAIRZH TAIRZP TAIRZY SDQ
.begin_names
KP01
KP06
KIFP
KCGZ
.end_names
********************
Release metar_ver5.5
January 10, 2000
********************
Change 100: Use Temperatures in T Group
The decoder will use and output the temperatures in the
'T' group if one exists. These temperatures are reported
to tenths of a degree. Previously, the decoder used the
the temperatures/dew points ( which were not in tenths of
a degree ) located in the main body of the observation.
This change was requested by OH, Jeff Zimmerman. If not
'T' group exists the decoder will use the temperatures in
the main body of the observations.
Change 101: Internal Code Change for Setting File Pointers
All file pointers are now set to NULL after they are closed.
The compiler on LINUX does not set file pointers to NULL
after they are closed. This caused a segmentation fault
on Linux systems.
Change 102: Add a New Switch -x #
This switch is strictly used in testing, and will not be
used in operations. The switch allows a user/developer to
internally set/override the system date/time. This switch
will only work if the -t (test) switch is also on.
Allow for year, month, and day. For example:
-x 2000 override system year & set to 2000
-x 200012 override year and month
-x 20001231 override year, month and day
-x 2000123100 override year,month, day, hour
-x 200012311010 override year,month,day,hour,min
Change 103: Set the -b Switch on Permanently
The -b switch is set if collectives are decoded. The logic
is now set that single observations or collectives are decoded.
It makes no difference to the decoder.
Change 104: Change in Observation Time Computation
There is now a change in the way that the observation date/time
is determined. Some observations explicitly contain the
day and time. Others may only contain the time (but not the day).
The algorithm used depends on whether the day is explicitly contained
in the observation or not.
*** No Day in Observation **
If the day is not included in the observation, the system year,
month and day are used along with the observation time.
*** Day Explicitly Provided in Observation */
If the day is included in the observation, the system year and
month are used, but the day is checked/compared with the
system day.
If the day in the observation is > than the system
day, it is assumed that the month is the previous month
( otherwise decrement the system month and the system year
if necessary).
If the day in the observation is equal to the system day,
and the observation time is greater than the system time,
use the current day, but print out a warning. If the observation
time is less than the system time, use the current day
( and no warning is printed ).
If the day in the observation is < the system day, it is assumed
to use the system month and year.
Change 105: Fix check for NULL pointer in dcdmtrmk routines
On Linus and QNX versions a segmentation error would occur on
the following (incorrectly encoded ) observation.
KMKG 101324Z 18022G29KT 3SM BR BKN018 24/22 A2995 RMK A02 VIS 2
The VIS 2 is not correct. However, the Linus and QNX versions
did not handle the NULL correctly at the end of the ob. This
was fixed.
Change 106: Remove Code to Decode SAO's
The decoder will no longer SAO format. This makes the decoder
about 37,000 bytes smaller.
Change 107: Remove -oh switch
Change 108: New switch, -howold #
The decoder will not begin processing a file until it is
a certain number of seconds old. Previously this was set at
60 seconds. The user can now configure this number by
using the -howold # switch, with the # sign in seconds.
********************
Release metar_ver5.4
December 13, 1999
********************
Change 99: Make err and out files even more unique
There is a very remote chance that two obs from the same site
will be be in the input queue at the same time. If this does
occur the err and out files may not be opened properly. This
change will ensure uniqueness.
********************
Release metar_ver5.3
October 26, 1999
********************
Change 98: Output a 'T' for 00000 amounts in precipitation groups
If a 0 amount is received in the 3, 6 or 24 hour group a 'T'
for trace will now be output in the shef file.
********************
Release metar_ver5.2
January 04, 1999
********************
Change 97: Add new switch '-kt'
When this switch is included on the command line, the value of
the wind speed will be in knots. If not include, which is the
default, the value of the wind speed will be in miles per hour.
This switch also affects the peak wind speed (UP) and the gust (UG)
if they are available and the UQ. The change is for both METAR and SM obs.
Previously, all speeds were provided in knots. It was detected and noted by
OH (John Roe) that wind speeds in SHEF shall be in MPH or Meters/sec.
I have taken the liberty to include the '-kt' switch for flexibility so
that a user can still output speeds in knots.
Change 98: Include UP, UR and UG
In previous versions of the decoder, the peak gust (near the time of
the observation) was reported with a shef code of UP. This was in error
and is now coded as UG. If a peak wind speed and direction is
provided ( which could occur anytime during the past hour and is not
necessarily the gust) it can be output with shef codes 'UP for peak wind'
and 'UR or direction of the peak wind'.
Change 99: Wind Direction Changes
Wind direction for UD and UR is now output in tens on degrees
to conform with SHEF specifications. Wind direction for UQ is
still output in degrees.
If a wind direction is reported as variable 'VRB', it is encoded
as a 0.
********************
Release metar_ver5.1
November 17, 1998
********************
Change 96: Change MAX_LOOP
Change MAX_LOOP in metardrive from 5000 to 50000...the
maximum number of obs that can be processed in a single
group file.
********************
Release metar_ver5.0
August 17, 1998
********************
Change 93: Add '-y2k' Switch for SM Observations
When present on the command line, this switch will tell the
decoder to output the 4 digit century/year in the SHEF
output. The default is to output the 2 digit year.
Change 94: Add Command Line Switch '-strip'
This switch will tell the decoder to 'strip' off potentially
'bad' ASCII codes that may have been put into the observation
from other sources. These sources could be local data
managers, the SBN from AWIPS, etc. When the switch is not
set (which is the default) all characters are passed as
is. The character values are not actually stripped off
but converted to blanks.
If ASCII value > 0 and ASCII value < 10
or
If ASCII value > 10 and ASCII value < 32
convert to 32.
Change 95: Change Command Line Switch '-s' to 'sw'
Change the command line switch that was '-s' to '-sw'.
This allows easier identification of switches that begin
with 's'.
********************
Release metar_ver4.9
August 5, 1998
********************
Change 92: Add '-y2k' Switch
When present on the command line, this switch will tell the
decoder to output the 4 digit century/year in the SHEF
output. The default is to output the 2 digit year.
********************
Release metar_ver4.8
July 1, 1998
********************
Change 91: Add '-e' Switch
This switch will tell the decoder NOT to convert temperatures
and dew points to English units. Without the switch the default
is to convert to English units.
********************
Release metar_ver4.7
May 15, 1998
********************
Change 90: Non Printable Characters on WMO LINE for AWIPS
Two non printable characters are found on the 2nd line of a
WMO header when used in AWIPS. When using the -w option, an
error would occur when printing out the WMO line. This was fixed.
********************
Release metar_ver4.6
April 4, 1998
********************
Change 88: Indeterminate 24 hour precip problem
Previously, if a 7//// group was decoded, and the -p12z
and -pall24 or -p24 flags were set, a zero was decoded for
the amount. It is now set to 'M' for missing.
Change 89: Fix Detection of -p12z Switch
The detection of the -p12z switch is case sensitive. One user
entered -p12Z (with a capital Z). The decoder did not detect
this. This has been changed.
When the -pall24 and/or -p24 switch was set, and the -p12z
switch was not set (or not detected), the decoder would output
zero amounts for every hour. This was fixed.
********************
Release metar_ver4.5
February 25, 1998
********************
Change 87: Another Endless Loop Problem
Fix endless loop problem in the isLTGfreq function...via
Carl McCalla. Also, change keyword from 'CNS' to 'CONS'.
Certain incorrectly encoded observations with lightning
remarks would cause endless loop problems.
********************
Release metar_ver4.4
January 5, 1998
********************
Change 85: Endless Loop Comments for test option
If an endless loop is detected during a 'test' run, an
error message is printed to the screen along with the name
of the file containing error messages and a copy of the
'bad' metar report.
Change 86: Correct Endless Loop for Certain Obs
Certain observations would throw the decoder into
an endless loop. The problem occurred in the sector vsby
section. Carl McCalla (OSO) corrected this problem.
********************
Release metar_ver4.3
November 11, 1997
********************
Change 80: Revised Sky/Cloud Cover Conversions
The ABRFC requested that the Sky/Cover conversions be changed as
indicated in the table below. It was their thought that not enough
sunshine was getting through and that the MAPE values were not
correct. I received no negative comments from anyone about the
proposed change, so it was made in this release.
scale is:
OLD NEW After dgb:11/10/97
CLR = 0 0( tenths )
SKC = 0 0
FEW = 3 1
SCT = 5 3
BKN = 7 6
OVC = 10 10
VV = 10 10
Change 81: Changed "RY" References In Second Visibility
In function isVsby2ndSite, in dcdmtrmk.c all "RY" references
were changed to "RWY". This change should have no affect on
RFC operations, but was included for completeness. This
change provided by Carl McCalla.
Change 82: Changed Sector Visibility Function
Function isSectorVsby in dcdmtrmk.c was changed. Previously
the sector visibility may have been parsed off incorrectly if
VSBY was used instead of VIS. This change was provided
by Carl McCalla.
Change 83: Provide Better Checking For 3/6 and 24 Hour
Precipitation If Missing
If '6' and/or '7' groups report missing precipitation, e.g.,
6//// or 7////, the decoder now sets an internal flag stating
that the precipitation report was missing. The output in SHEF
will be translated to an 'M' for the value.
Change 84: Provide Checks for Endless While Loops
Checks were put into all routines which have while loops. If
iterations of while loops are excessive, a new routine call
metar_error_handler is called, an error message is written,
and the program is terminated. The file is written to the
'err' directory with the name 'looperr.' along with the name
of the bad file.
********************
Release metar_ver4.2
October 10, 1997
********************
Change 76: NEW SWITCH '-p1'
Add -p1 option. This option will generate a zero report for
automated rain gage sites if no value is reported and there is
no PNO { Precipitation Not Operating } token. The value will
be associated with SHEF code PPH. Remember that an automated
rain gage is detected when either an A01 or A02 is detected in
the report. If the PNO is detected a report value of 'M' will
be generated. Also a check is made for either a AO1, A01, AO2
or A02 to determine if the automatic indicator is on.
This was detected by Craig Peterson at the CBRFC.
Fix 77: FIX ERROR ASSOCIATED WITH -pall24 SWITCH
Fixed an obscure error associated with the -pall24 switch and
the PNO token. Previously, an 'M' would not be generated if the
PNO token was detected and the -pall24 switch was on. The 'M'
is now generated. This was detected by Dave Brandon at the CBRFC.
Fix 78: FIX ERROR ASSOCIATED WITH LIGHTNING REMARK
Previously when a comment such as FRQ LTGCG VC or LTGCCG SE
occurred followed by an hourly precipitation group, e.g. P0001, the
precipitation group was not decoded. Actually the token that
followed the lighting group was not decoded. This has been
fixed by OSO (Carl McCalla). This was detected by John LaGue
at the MBRFC.
Change 79: ALPHABETIZED THE SWITCHES FOR DISPLAY USING -?
When 'metar_decode -?' is entered, the switches along with
their description is printed to the screen. The switches are now
displayed in alphabetical order.
********************
Release metar_ver4.1
June 4, 1997
********************
Fix 73: CHECK FOR AO1,AO2 AS WELL AS A01 AND A02
Add the capabilities to check for the AO1 indicator as well as the
AO2 indicator. Previously only a check was made for the AO2 indicator.
AO1 means automated stations without a present weather sensor.
AO2 means automated stations with a present weather station.
Fix 74: -nospeci SWITCH
Previously, automatic stations which transmitted observations
other than 'on the hour', would encode the observation as a
'METAR' and not a 'SPECI'. This would cause the software to
produce, for example, an hourly precipitation value of PPH for
times other than on the hour. Now what happens, if the -nospeci
switch is on, all observations with times greater than 5 minutes
after the hour and less than 50 minutes after the hour are
considered in the 'SPECI' range, and will not be decoded.
Fix 75: FIX 7 GROUP
Previously, on the 7 group (24 hr precipitation), if slash signs were
sent, (e.g. 7////), no value was transmitted. The decoder will
now generate an 'M' character in the SHEF message.
********************
Release metar_ver4.0
February 27, 1997
********************
Fix 70 - MAKE IT SO THAT THE OBSERVATION IS DELETED BEFORE
PROCESSING OCCURS
This is important for observations that may crash the software.
The file is deleted before decoding, so that the file will not be
decoded again if the program crashes. If the -b collectives
switch is on this feature will not occur. The input file will
not be deleted if the decoder is run in test mode.
Fix 71 - FIX ERROR IN REMARKS
Previously, a remark ( which incidentally is encoded incorrectly )
such as RMK VIS 20= would crash the decoder. This has been fixed.
Change 72 - CHANGE PEAK WIND SHEF CODE
The SHEF code for the peak wind is now, UP. It was previously
YU. In order to get peak winds decoded you must place the 'UP'
in the metar.cfg file.
********************
Release metar_ver3.9
01/22/97
********************
Fix 69 - FIX ERROR ON VRB WIND GROUP
Previously, a wind group such as VRB05KT would decode the
incorrectly. This has been fixed. Other wind group
combinations seem to work OK. Thanks to Jean Wallace at
MARFC for pointing this out.
********************
Release metar_ver3.8
01/09/97
********************
Fix 65 - PROBLEM WITH COMPLEX WIND GROUPS
On occasion, a complex wind group would be decoded incorrectly
resulting in very large unrealistic numbers. This was fixed.
Fix 66 - DECODING THE 931 GROUP IN SCO/SCD OBSERVATIONS
The previous version of the decoder did not decode the 931
group ( 6 hour snow depth in SCO/SDC. This has been changed.
You must place the SHEF code, SDQ in the last line of the
'metar.cfg' file if you want to receive these values.
FIX 67 - FIX NO_SPECI FLAG
For whatever reason, the -nospeci flag did not work. This
was fixed. When this switch is on, no special reports will
be decoded.
FIX 68 - INTERNAL CHANGES ON THE SHEF PECODES LINE
Internally, the decoder now checks the last line of the 'metar.cfg'
file ( the line with all of the SHEF PE codes you want ) a little
different.
********************
Release metar_ver3.7
12/24/96
********************
Fix 64 - MISSING FILES - FCLOSE/FFLUSH/FGETS DISCONTINUITIES
Release 3.6 contained an interesting I/O error that caused
problems in retaining the output files. The error had
to do with the way that different Unix systems and compilers
handled the functions, fclose, fflush, and fgets. This has
been fixed.
********************
Release metar_ver3.6
12/22/96
********************
Change 58 - NEW COLLECTIVES OPTION SWITCH, '-b'
Very early versions of the decoder decoded collectives. As things
developed, and the decoder was used operationally, upon
occasion, an observation (or bad code) would crash the decoder.
The 'bad' observation would never get deleted, and the decoder would
endlessly try to decode the observation over and over. To
eliminate this problem it was decided to read and put the first
observation in memory, delete the file (which may have contained many
observations), and then proceeded to decode the observation. Using
this approach, only the first observation in any file would be decoded.
Collectives would not be decoded.
A few offices have asked for the ability to decode collectives.
I have added a new switch, '-b'. When this switch is present
in the command line, the decoder will attempt to decode all
observations in the a particular file, before deleting the file.
If you want to decode collectives, use this option. If you
do find that the decoder gets 'stuck' on a particular observation,
I and OSO would like to know about it so we could see where the
problem lies.
REMEMBER THIS RULE: When using the collective option you
can place files of different types of observations in the
input queue, e.g., a file of METAR observations, a file of SM
observations, a file of SAO observations (if there are any left)
and a file of SDO/SCD observations. HOWEVER, each individual
file can ONLY CONTAIN ONE TYPE OF OBSERVATIONS.
( You cannot place, e.g., a METAR observation and an SM observation
in the same file and expect it to work.)
For more information on this Fix and problem see FIX 39.
Fix 59: CORRECT ALGORITHM FOR CONVERTING C TO F
The algorithm for converting C to F was slightly incorrect.
Previously, +.5 degree was added for rounding, to all
observations. If the value was negative, this would make
the readings ( slightly too warm ). The algorithm/formula
now used is: F = ( 1.8 * C ) + 32. If the value on the
left (( 1.8 * C ) + 32 ) is positive, add +.5. If negative,
add -.5. This was changed both in the SM and METAR
portions of the code.
Thanks to Larry Ellis at the NCRFC for pointing this out.
Fix 60: EXPAND STRING PATTERN SEARCH FOR SM OBSERVATIONS WITH "//"
Previously, a SM observation that started, e.g., with the following:
YHE 71114 174// 81005 ...
would not be detected, because of the '//' marks in the
"iihvv" group. This has been fixed.
Thanks to Tyree Wilde at the NWRFC for sleuthing this out.
Change 61 - INCLUDE DECODING OF SDO AND SCD TYPE OBSERVATIONS
The OH, through Ben Weiger, requested that the decoder be
able to handle reports received in SDO and SCD products. For
a description of these type of reports see "NWS Observing
Handbook No. 7 - Surface Weather Observations and Reports -
PART IV - Supplementary Observations - July 1996".
The decoder will now detect and decode these types of
observations. They must adhere to the encoding rules as stated
in the handbook. The present weather will be decoded if
detected. The coded remarks (RMK) section will be decoded.
The free flowing, non decodable plain language remarks after the
" / " will not be decoded ( Paragraph 2.2.3.6.4 ).
Change 62 - OUTPUT PPH FOR ROUTINE OBSERVATIONS ONLY...NOT SPECIALS
Hour precipitation will only be reported for routine reports,
i.e., hourly reports. PPH will not be output for SPECI type
observations. Previously, PPH would be transmitted for routine
and specials.
Thanks to Mark Fenbers (OHRFC) for this fix/change.
Change 63 - OUTPUT ORDER OF WX ELEMENT SYNOPTIC CODE
Previously, if more than one weather element was reported, the
lowest synoptic code would be the one that prints out. In
other words, HZ with a code of 5 would take precedence over
heavy rain +RA with a code of 64 (see list in Fix 55). This
was fixed so that the most important ( or first element )
in the synoptic list would print first if multiple elements
existed. ( The order in the list will take precedence.)
********************
Release metar_ver3.5
11/24/96
********************
Fix 57 - SPECI PROBLEM
The previous internal search algorithm looked for the string
'SPECI ' within the first 30 characters of a string. If found,
it assumed the observation was a special METAR observation. However,
as was found, it is possible that the token 'NOSPECI ' could
exist within the first 30 characters of a line, and be associated
with the observation started several lines before. The pattern
search was tightened up to be more restrictive, and hopefully
alleviate this problem.
It was previously thought that a trailing blank was a problem...
this was found out not to be the case.
********************
Release metar_ver3.4
11/08/96
********************
Fix 56 - RADAT PROBLEM
Previously, if the acronym RADAT was encoded, the decoder would
not handle this correctly. Even though RADAT is no longer a valid
token for a METAR observation, observers still use it. This is
now handled correctly.
********************
Release metar_ver3.3
10/31/96
********************
Change 55 - ADD CAPABILITY TO OUTPUT A SHEF VALUE FOR CURRENT WEATHER
AND CLOUD COVER.
The OHRFC ( Mark Fenbers ) requested this enhancement.
The SHEF code for current weather is XW and for cloud cover is XC.
To turn this option on simply place XW and/or XC in the list of
SHEF parameter codes in the file, 'metar.cfg'.
For a list of the NWS synoptic codes see the SHEF manual, Appendix C.
Several current weather codes can be sent with an observation. Since
only one code can be sent in the SHEF stream, the most important
weather will be encoded. A list of the current weather tokens and the
synoptic code is given below. They are in order of priority. For
example, if a tornado { +FC } is sent along with light rain { -RA },
the current weather synoptic code will be sent as 19, not 60. In
almost all cases, this should not be a significant problem.
Code Token
{ 19, "+FC" }, /* +FC tornado/waterspout */
{ 19, "FC" }, /* FC funnel cloud */
{ 97, "+TSRA" }, /* +TSRA thunderstorm/heavy rain */
{ 96, "TSRA" }, /* TSRA thunderstorm/moderate rain */
{ 95, "-TSRA" }, /* -TSRA THUNDERSTORM/LIGHT RAIN */
{ 81, "+SHRA" }, /* +SHRA RAIN SHOWER/HEAVY */
{ 81, "SHRA" }, /* SHRA RAIN SHOWER/MODERATE */
{ 80, "-SHRA" }, /* -SHRA RAIN SHOWER/LIGHT */
{ 64, "+RA" }, /* +RA RAIN HEAVY */
{ 62, "RA" }, /* RA RAIN MODERATE */
{ 60, "-RA" }, /* -RA RAIN LIGHT */
{ 97, "+TSSN" }, /* +TSSN THUNDERSTORM/HEAVY SNOW */
{ 97, "TSSN" }, /* TSSN THUNDERSTORM/MODERATE SNOW */
{ 97, "-TSSN" }, /* -TSSN THUNDERSTORM/LIGHT SNOW */
{ 74, "+SN" }, /* +SN SNOW/HEAVY */
{ 72, "SN" }, /* SN SNOW/MODERATE */
{ 70, "-SN" }, /* -SN SNOW/LIGHT */
{ 86, "+SHSN" }, /* +SHSN SNOW SHOWER/HEAVY */
{ 86, "SHSN" }, /* SHSN SNOW SHOWER/MODERATE */
{ 85, "-SHSN" }, /* -SHSN SNOW SHOWER/LIGHT */
{ 97, "+TSPE" }, /* +TSPE THUNDERSTORM/HEAVY ICE
PELLETS */
{ 97, "TSPE" }, /* TSPE THUNDERSTORM/MODERATE ICE
PELLETS */
{ 97, "-TSPE" }, /* -TSPE THUNDERSTORM/LIGHT LIGHT
PELLETS */
{ 67, "+FZRA" }, /* +FZRA FREEZING RAIN/HEAVY */
{ 67, "FZRA" }, /* FZRA FREEZING RAIN/MODERATE */
{ 66, "-FZRA" }, /* -FZRA FREEZING RAIN/LIGHT */
{ 57, "+FZDZ" }, /* +FZDZ FREEZING DRIZZLE/HEAVY */
{ 57, "FZDZ" }, /* FZFZ FREEZING DRIZZLE/MODERATE */
{ 56, "-FZDZ" }, /* -FZFZ FREEZING DIRZZLE/LIGHT */
{ 54, "+DZ" }, /* +DZ DRIZZLE/HEAVY */
{ 52, "DZ" }, /* DZ DRIZZLE/MODERATE */
{ 50, "-DZ" }, /* -DZ DRIZZLE/LIGHT */
{ 87, "+SHPE" }, /* +SHPE ICE PELLET SHOWERS/HEAVY */
{ 87, "-SHPE" }, /* -SHPE ICE PELLET SHOWERS/LIGHT */
{ 79, "+PE" }, /* +PE ICE PELLET/HEAVY */
{ 79, "PE" }, /* PE ICE PELLET/MODERATE */
{ 79, "-PE" }, /* -PE ICE PELLET/LIGHT */
{ 87, "SHGR" }, /* SHGR HAIL/SNOW PELLET SHOWER
> 1/4" */
{ 87, "SHGS" }, /* SHGS HAIL/SNOW PELLET SHOWER
< 1/4" */
{ 76, "IC" }, /* IC ICE CRYSTALS NO INTENSITY */
{ 17, "TS" }, /* TS THUNDERSTORM/NO RAIN */
{ 16, "VCSH" }, /* VCSH SHOWERS IN VICINITY BUT
NOT AT STATION */
{ 41, "BR" }, /* +BR MIST/ FOG */
{ 41, "FG" }, /* FG FOG */
{ 42, "MIFG" }, /* MIFG FOG SHALLOW */
{ 43, "PRFG" }, /* PRFG FOG PARTIAL */
{ 42, "BCFG" }, /* BCFG FOG PASTCHES */
{ 40, "VCFG" }, /* VCFG FOG VICINITY NOT AT STATION */
{ 41, "FZFG" }, /* FZFG FOG TEMP BELOW 0 C */
{ 4, "FU" }, /* FU SMOKE */
{ 4, "VA" }, /* VA VOLCANIC ASH */
{ 5, "HZ" }, /* HZ HAZE */
{ 38, "BLSN" }, /* BLSN BLOWING SNOW 6 FT OR HIGHER */
{ 38, "VCBLSN" }, /* VCBLSN BLOWING SNOW VICINITY */
{ 37, "DRSN" }, /* DRSN LOW DRIFTING SNOW */
{ 6, "DU" }, /* DU WIDESPREAD DUST */
{ 7, "BLDU" }, /* BLDU BLOWING DUST */
{ 7, "VCBLDU" }, /* VCBLDU BLOWING DUST VICINITY FOG*/
{ 7, "DRDU" }, /* DRDU LOW DRIFTING DUST */
{ 7, "SA" }, /* SA SAND */
{ 8, "BLSA" }, /* BLSA BLOWING SAND */
{ 8, "VCBLSA" }, /* VCBLSA BLOWING SAND VICINITY */
{ 7, "DRSA" }, /* DRSA LOW DRIFTING SAND */
{ 7, "PY" }, /* PY SPRAY */
{ 8, "PO" }, /* PO DUST WHIRLS */
{ 8, "VCPO" }, /* VCPO DUST WHIRLS IN VICINITY */
{ 30, "SS" }, /* SS SANDSTORM LIGHT > 1/4 M */
{ 33, "+SS" }, /* +SS SANDSTORM HEAVY < 1/4 M */
{ 30, "VCSS" }, /* VCSS SANDSTORM VICINITY */
{ 30, "DS" }, /* DS DUSTSORM LIGHT > 1/4 M */
{ 33, "+DS" }, /* +DS DUSTROMS HEAVY < 1/4 M */
{ 30, "VCDS" }, /* VCDS DUSTSTORM IN VICINITY */
{ 77, "+SG" }, /* +SG SNOW GRAINS HEAVY */
{ 77, "SG" }, /* SG SNOW GRAINS MODERATE */
{ 77, "-SG" } /* -SG SNOW GRAINS LIGHT */
Cloud cover is transmitted as tenths. The following translations are
made.
Sky Token Tenths
CLR = 0
SKC = 0
FEW = 3
SCT = 5
BKN = 7
OVC = 10
VV = 10
*******************
Release metar_ver3.2
09/18/96
*******************
FIX 53 - Fix autoIndicator flag for use with '-asosts' switch and
other statements which check for the presence of an automatic
site.
FIX 54 - Tighten up bounds for -p12z, -pall24, -p24 switch from
11:40 - 13:10 to 11:40 - 12:30z. Zero amounts will now be produced
for observations within the window 11:40-12:30z if the switches are
set.
*******************
Release metar_ver3.1
07/28/96
*******************
FIX 51 - FIX THE -pall6 & -pall24 OPTIONS FOR METAR AND SM REPORTS
When the -pall6 switch was set, and not 6 hour precipitation
was reported in the observation, a zero precipitation value
was generated only for non-automated sites, and automated
stations did not get set to zero. This was fixed.
It was also noted that for the -pall24 option, if the -p12z option
was not set, zero values were being generated for all times.
This was fixed. If you do not use the -p12z option, only actual
24 hour coded values transmitted in the observation will be sent.
For example, a 24 hour amount may be coded in the 00Z observation.
If one is not sent, no zero amounts are assumed or generated.
Zero amounts are only generated for observations ending around
the hydrologic day.
FIX 52 - NEW SWITCH -asosts SET TYPE/SOURCE FOR ASOS SITES
This switch was requested by the CBRFC (me). It allows the user
to distinguish the type of report, that is manual or automated (ASOS).
With this switch set, the type/source of the SHEF PEDTSEP will be
'RO' and stand for ASOS type reports, and 'RV' will stand for
manual reports. For example, precipitation from an ASOS site
would be coded as PCIROZZ and precipitation from a non automated
site would be coded as PCIRVZZ. Our quality control software has
option to toggle on/off values from different types of sources
e.g., SNOTEL, ASOS, ALERT, MANUAL, LARCS, GOES/DCPs etc. This
switch allows us to distinguish the types.
The default, if -asosts is not present is to set the type/source
to RZ, e.g., PCIRZZZ.
*******************
Release metar_ver3.0
07/22/96
*******************
Change 48 - TIME ROUNDING OPTION FOR ROUTINE REPORTS
A new optional switch has been added. When '-round' is
located in the command line, the observation will be rounded
to the hour. This switch will only apply to routine or
non-SPECI observations. Routine or non special observations
are detected if:
(1) the specification METAR is located at the beginning
of the observation,
(2) no METAR or SPECI is detected in the observation.
If the specification SPECI is detected, the observation is a
special. All special observations are required to have the
specification SPECI in the observation.
When no -round switch is found, the time will be specified as is
in the observation (default).
Examples: With the -round switch on:
0255Z -> rounded to: 0300Z
2345Z -> 0000Z
0010Z -> 0000Z
This was requested by John Lague at the MBRFC.
FIX 49 - READING CONFIGURATION FILE PATH/NAME FROM THE COMMAND LINE
A new optional switch has been added. When '-fcfg filename' is located
in the command line, the decoder will read in the configuration
file specified in the variable 'filename'. The path and filename
are required if the file is located elsewhere than the directory
where the decoder was started. The default is to open a file
called 'metar.cfg' in the directory where the decoder is started.
Example:
metar_decode -fcfg /lets/open/the/metar.cfg file ...etc
This option was requested by OHRFC, Mark Fenbers.
FIX 50 - REWORK OF THE 24 HOUR PRECIPITATION SWITCHES
Please consult FIX 46 for philosophy. The same pattern
has been followed for the 24 hour precipitation.
There are three cases/options: ( CHOOSE ONLY ONE )
The three cases for the 24 hour precipitation are:
case 1: no switches ( no -p24 or -pall24 )
case 2: -p24 switch set on
case 3: -pall24 switch set on
The rules which apply for the 6 hour methodology apply for
the 24 hour (see FIX 46).
Another new switch, -p12z, will only decode 24 precipitation
reports for observations located in the window, 1140z-1310z.
In other words, if a 24 hour amount is send at midnight, it
will not get sent if this switch is on. Only 24 hour precipitation
ending at 12Z would be sent. The default is to send all 24 hour
precipitation groups detected at any hour.
*******************
Release metar_ver2.9
07/19/96
********************
FIX 46 - REWORK OF THE 6 HOUR PRECIPITATION SWITCHES
Several RFC's have had questions/comments about the philosophy
of decoding and generating 6 hourly precipitation. My
philosophy is to be as flexible as possible, knowing that RFC's
have special needs, but trying to keep within the guidelines of
observing practices. I have provided a new switch ( -pall6 ).
This along with the -p6 switch and no (6 hourly ) switches
gives the RFCs flexibility. Here is how it now works.
Please note, that the following assumes that the observation
is a regular (non special) observation and that the observation
falls within a six hour window. (Remember: There are no longer
record special type observations).
There are three cases/options: ( CHOOSE ONLY ONE )
case 1: no switches ( no -p6 or -pall6 )
case 2: -p6 switch set on
case 3: -pall6 switch set on
case 1: no switch(s) present ( no -p6 or -pall6 )
If no switches are set, the following will occur:
(a) if a precipitation value is indicated, it will
be transmitted as given,
(b) an 'M' will be sent if the observation
indicates a missing value
(No zero values will be assumed or transmitted with this option.)
case 2: -p6 switch set on
If the -p6 switch is on, the following will occur:
(a) if a precipitation value is indicated, it will
be transmitted as given
(b) an 'M' will be sent if the observation indicates
a missing value
(c) an 'M' will be sent if the observation is
an automatic site and PNO is sent in the message,
(d) a zero amount of precipitation will be sent if the
site is an automatic site, PNO is not present, and
no value is transmitted in the observation.
case 3: -pall6 switch set on
If the -pall6 switch is on, the following will occur:
(a) if a precipitation value is indicated, it will
be transmitted as given
(b) an 'M' will be sent if the observation
indicates a missing value
(c) a zero amount will be transmitted in all other cases
FIX 47 - CHECK THE PNO STATUS FOR HOURLY OBSERVATIONS
For hourly observations, check the PNO flag. If present,
transmit 'M' in the SHEF message.
(Thanks to ABRFC - Bill Lawrence for pointing this out.)
*******************
Release metar_ver2.8
07/15/96
********************
FIX 44 - ELIMINATE THE PRINTING OF ENCODED METAR TO THE STDOUT(SCREEN)
This was left in by mistake, and has been fixed.
FIX 45 - '=' SIGN AT THE END OF AN OB
METAR does not expect to find an '=' sign at the end of
the observation. However, some stations continue to place an
'=' sign at the end, and quite frequently it will be appended
to and considered to be part of the last token in the observation.
If this was the case, this token would nor previously be decoded.
This has been changed, and the decoder now simply replaces
the = sign with a blank before parsing, and the last token is decoded.
********************
Release metar_ver2.7
07/12/96
********************
FIX - 39 MINIMIZE CORE DUMPS FROM BAD OBSERVATIONS & OTHER REASONS
Some office have reported core dumps from the decoder. Core
dumps are bad and frustrating. There are things that can be
done with the code in conjunction with the methodology that the
decoder is executed. Hopefully, the new code provided with this
release, plus some comments about execution will help.
Carl McCalla, the supporter of the METAR decoding algorithms, was
notified of the core dump problems. For you 'C' programmers, the
main problems were traced to string pointers, which occurred with
incorrect encoding of METAR observations. Carl supplied new code
which is incorporated in this release.
Other things were also done to minimize core dump problems.
Here is what happens now internally in the decoder. The impute file
containing the METAR message is first read from disk, and placed in
an internal memory buffer. The buffer is immediately written to the
error file (before processing). The original input file is then
deleted from the disk. Decoding begins. If core problems occur,
the decoder could crash, however, upon the next iteration of
execution, it will not re-read the bad file (as was the case
previously). This also has the advantage that if the error file
exists, you can trace which observations trashed the decoder. One
problem with this new method is that if the message is a collective,
only observations up to the bad observation would be decoded.
The rest of the message would not be decoded (small price to pay).
RFCs have various ways of executing the decoder. OHRFC, e.g., runs
the decoder in continuous mode. They have a script which periodically
checks if the decoder is still executing. If not, it is restarted.
Other RFCs run the decoder from CRON, proc_loop, etc. Whichever way
you choose, I believe that this new feature of deleting the bad
file before processing should help.
FIX - 40 DO NOT PROCESS OBSERVATIONS WITH BAD DATE/TIME
Some observations have been transmitted without date/times,
and they were decoded anyway. observations with bad date/times
are not decoded and flagged with an error.
Change - 41 CHANGE IN SHEF CODE IN CONFIGURATION FILE
- TA IS NOW TAIRZZ
I you want to receive hourly temperatures, you must, in your
configuration file include TAIRZZ instead of TA. These changes
were made for METAR, SM and SAO reports.
FIX - 42 3/6 HOUR PRECIPITATION PROCESSING CHANGES
The decoder now checks the 3/6 hour precipitation remark for
missing indicator. If missing is reported, the SHEF value
will be sent as a M. If the -p6 option is set, and precipitation
is not present, the decoder would previously send a 0. An
additional check is now made to see if the station is an
automatic site (i.e., you would expect a precipitation amount).
If its automatic, and the p6 option is set, and not precipitation is
reported, a 0 is transmitted.
Change - 43 REMOVED TESTM AND OTHER CODE WHICH WAS USED DURING TESTING
Self explanatory.
********************
Release metar_ver2.6
07/09/96
********************
NOTE: Some METAR messages are being received with an "=" sign
at the end of the observation, e.g., T01330106=. This could
happen on any of the tokens, usually in the remarks section.
OSO has been informed of this, and will come up with a fix in a
future release. For now, tokens ending with an "=" sign will not be
decoded.
The decoder now sends out a zero for three and six hour precipitation
groups which are included in the observation but indicate missing
with the '/'. OSO has also been informed of this and will
probably come up with a fix in a future release.
Change 35 - RELAX TIME CHECK FOR 'Z' IN METAR OBSERVATIONS
The METAR encoding instructions call for the time in the observation
be coded with a 'Z' at the end of the time token. For example,
a time could be coded as 0150Z, or 020150Z (in this case the month
is included). Some stations are not placing the 'Z' at the end
of the time. The current version relaxes this requirement, thus,
for example, 0150 and 020159 will now be recognized, and the
remainder of the observation decoded.
FIX 36 - nospeci SWITCH NOW WORKS PROPERLY
Version 2.5 released the '-nospeci' switch. When a SPECI observation
was encountered, the decoder when into never land. This has been
fixed, and the -nospeci option should now work.
FIX 37 - ADDITIONAL CHECKS FOR METAR OBSERVATIONS
The decoder internally uses a pattern recognizing scheme to
Determine the type of message, i.e., METAR, SAO or SM. Additional
patterns have been added to further check if the observation
is a METAR type. The pattern check uses the wind group as a
last option for checking if the message is a METAR observation.
Other options are checked prior to this method.
FIX 38 - REMOVAL OF ERR AND OUT FILES THAT ARE ZERO LENGTH
The decoder can produce error files ( err.xxx ) and always produces
( out.xxx ) files. If, for example, a file was decoded that did
not have a recognized observation type, err and out files of zero
length would be produced. The decoder now checks for zero length
files, and if found, removes them.
********************
Release metar_ver2.5
07/03/96
********************
Change 34 - ALLOW NUMBERS IN A METAR ID
The METAR code does not allow for numbers in a station id.
However, in reality numbers are being sent in some METAR
observations, and RFC's cannot decode the data. The code has
been changed, at least temporarily to allow for numbers within
a station id.
********************
Release metar_ver2.4
07/03/96
********************
NOTE: For those of you who compile locally, please note that
there is a new local.h and metar.h files. They must be moved
to /usr/include before you compile. This change is a result of
changes provided by OSO.
Change 32 - ADD SWITCH "-nospeci"
No special observations will be decoded if this switch is included.
This applies to METAR as well as SAO observations. For METAR
observations, all hourly observations will be decoded, even it
they meet special criteria. For SAO observations, RS
(Record Specials) will be decoded since they are on the hour.
FIX 33 - OSO Internal Module Changes
The OSO (via Carl McCalla) has provided new versions of the
Functions charcmp, dcdmetar, dcdmtrmk and stspack3. This will
fix some obscure errors with endless loops. It will also
contain additional features for current weather, tornadoes,
and other items which are not used by RFCs', but included
just to have the latest and complete versions.
********************
Release metar_ver2.3
06/20/96
********************
FIX 31 - INTERNAL ARRAY SIZE PROBLEM
In the function, 'extract_type', a strcpy routine was changed
to strncpy, in order to be sure that the destination array
would not have a string copied into it that was larger than could
be held. Before this fix, unpredicted things could happen.
********************
Release metar_ver2.2
06/18/96
********************
FIX 30 - ENDLESS LOOP PROBLEM ON METAR OBSERVATIONS ON MAX AND MIN
TEMPERATURES
It was discovered that the decoder would go into an endless loop
for METAR observations which had missing data encoded in the
1$$$$ or 2$$$$ groups (e.g., 1//// would put the decoder into an
endless loop, while 14334 would not). OSO was informed of this
problem and provided a fix which is included within this release.
********************
Release metar_ver2.1
06/10/96
********************
FIX 28 - OBSERVATION DATE FOR SOME METAR OBSERVATIONS
INCORRECTLY COMPUTED
Some METAR observations encode the observation day in the date/time
group, while some do not. The previous version of the decoder tried
to use the day, if it was given. On occasion, this would create
problems when attempting to use the system time to construct the
entire date. This was especially a problem when the decoder
after 00Z for older observations. The decoder now uses, as was
in the past, only the system date in companion with the observation
time. See release notes for version 1.6. The bottom line is to
be sure your system clock is set correctly and in Z. Run the
decoder in near real-time, at least every hour. Do not run the
decoder on observations that are older than 23 hours.
Thanks to Bob Corby at the WGRFC for pointing this out. The time
algorithm may be reworked in the future but for you should not have
problems if you follow the guidelines above.
FIX 29 - DECODER GOING INTO AN ENDLESS LOOP ON CERTAIN CANADIAN
OBSERVATIONS AND POTENTIALLY SOME U.S. OBSERVATIONS
The following problem is being passed on to OSO (Carl McCalla) to
be fixed. I provided a crude temporary fix, so that the decoder
would not go into suspension.
Some tokens (character strings) in the RMKs sections expect/require
digits. For example, the token 'DUE' stands for 'dew ended some
minutes past the hour'. The correct encoding should be 'DUE10' or
something like this which would indicate ending 10 minutes after
the hour. I have found that the decoder will go into an endless
loop if no ending time is specified or if the time is less than
two digits. ( The exact observation that caused the problem had
the token word 'DUE' as part of an implied sentence in the RMK, i.e.,
'VSBY RDCD DUE LO CLD'. This caused an endless loop. )
Tokens such as FZDZE also cause a problem if no time is specified.
This temporary fix I applied should at least keep the decoder
from going into never-never land. When the permanent fix comes from
OSO, I'll place it in the code and notify you.
********************
Release metar_ver2.0
06/04/96
********************
Change 27 CHANGE NUMBER OF FILES ON -oh SWITCH FROM 4 TO 999
This is only important for those using the '-oh' switch.
On the previous release, the max number of files that could
be created was 4. This was left in by mistake during testing.
The value was changed to 999. According to OHRFC,
(Mark Fenbers) this is the correct value to use.
********************
Release metar_ver1.9
06/03/96
********************
IMPORTANT: Release version 1.8 and possibly 1.7 had a serious
problem. All of the SAOs were being time stamped with the same
date/time. When testing date/time features, I have the capability
to fake out the system date/time. I failed to comment out this
part of the code when the release was made. This has been
changed.
For those using Canadian observations, I have learned the following
preliminary information. The RMKs section of the U.S. is
different than for Canadian observations, especially for
precipitation. Therefore, the METAR portion of the decoder
may have to be changed. I will coordinate with the Canadians
and OSO to see if we can at least decode precipitation remarks.
The NWRFC will collect a 'bunch' of Canadian METAR observations
for evaluation. The Canadians suggested that we rely upon the
SMs for accurate precipitation data.
********************
Release metar_ver1.8
05/28/96
********************
Fix 24 CODED REMARKS FOR SOME CANADIAN OBSERVATIONS
On at least one Canadian observation, a plain language remark
was coded as " 241300Z". The decoder pattern matching algorithm
thought this to be a pattern " 2$$$$", or a six hourly temperature.
The pattern was changed to search for " 2$$$$ ". Other coded
remarks patterns were also changed by including a blank at the
end of the pattern search string.
Change 25 OH FILE NAMING OUTPUT SWITCH
IMPORTANT: The following option was included at the request of
ABRFC. I understand that OH will/is working on an option that
could make this option obsolete (that is let the decoder look
for any file in the directory irrespective of name). Any way,
hopefully for the short term, the option is now included.
The OH SHEF decoder setup requires that SHEF products have a
specific naming convention. The filename must have the following
naming convention: shef_prod#, where # is a number between
1 and 999. The metar_decoder can now construct an output filename
with this convention. The METAR decoder will first look into the
output directory specified in the configuration file. It will loop
through numbers 1 through 999 and look for an available file. If
one is found it will write the SHEF output to this file.
If the queue is full, the decoder will sleep for a few seconds
and try again. The decoder will continue trying until a free
file is found.
To use this option include the following switch in the command
line: -oh
Change 26 EXPANDING THE TIME TOLERANCE WINDOW FOR
6 HOUR OBSERVATIONS
The NWRFC stated that several of stations which report to them
report between as early as 30 minutes past the hour, valid for
the next hour. The time window on the SAO and METAR has been
changed to from 40 to 30 minutes past the hour. This changed was
made for 3 and 6 hour observations.
********************
Release metar_ver1.7
05/02/96
********************
Fix 22 HOURLY PRECIPITATION FOR METAR REPORTS.
On previous versions hourly precipitation for METAR reports would
only be generated if the 'P' (precipitation) group had a value.
Zero reports would not be generated. This has been changed with
version 1.7. If the report is a METAR, and the report comes from an
automated site, and the report has precipitation capabilities,
and the observation is not a special (its a regular hourly
observation), and no hourly precipitation was reported,
then the software will generate a zero value for the hourly
precipitation. This is only in effect for METAR type observations.
Change 23 PROCESSING COLLECTIVES.
On previous versions only a single observation per file was allowed.
Version 1.7 allows for multiple observations to be included in a
single file. The software will automatically skip over lines with
WMO headers, ZCZC, and NNNN. The only restriction (which should
not be a problem) is that the collective CANNOT contain different
types of observations (METAR, SM. SAO). In other words you cannot
have a METAR observation, followed by an SM or SA in the same file.
The collective must contain the same type of observations. However,
you can continue to place METAR, SA and SM in different files
as before.
********************
Release metar_ver1.6
05/02/96
********************
Fix 20 Time problem. On occasion, observations will arrive with
observation times stamped a few minutes in the future. Another way
of describing this is that the observation time is greater (in the
future) as compared to your system time, when the decoder was
executed. In reality this is impossible since you can't measure
something before it happens. In the computer world, where local
system clocks could be off, these things can and do happen. As far
as the METAR decoder up to this point is concerned, when this happens
the observation was timed stamped as occurring on the previous day.
In order to minimize this problem, a fix was provided. The fix
allows for tolerance windows based on the observations and
system time. The tolerance window is 1 hour.
The following offers a few examples:
obs time system date/time final obs time
2351 2355 MAY 5, 1996 2331 May 5, 1996
2359 2355 MAY 5, 1996 2337 MAY 5, 1996
0030 2355 MAY 5, 1996 0030 MAY 5, 1996
0130 2355 MAY 5, 1996 0130 MAY 4, 1996
2325 0010 MAY 5, 2996 2325 MAY 4, 1996
Change 21 Include a new switch, '-c'. This switch allows the
decoder to be executed in continuous mode, snoozing a little
in between execution. The number of seconds to snooze is
a number that immediately follows the -c switch. For example,
'-c 15' will snooze 15 seconds between iterations. This was
requested by ABRFC.
********************
Release metar_ver1.5
04/23/96
********************
Fix 18 The problem described in Fix 16 (below) also occurs for
'PT' and PPT'. This was fixed for SAO, METAR and SSM. The user
should place 'PTIR' in the 'metar.cfg' file instead of 'PT' to
use the precipitation type. The code 'PPT' for the 3 hour
precipitation does not change.
Fix 19 Include TSRA for determining the PTIR code for
METAR observations.
********************
Release metar_ver1.4
04/22/96
********************
Fix 17 The 'PPD' 'PD' problem described in Fix 16
(immediately below) was fixed for SAO messages, but was not
fixed for METAR or SSM. The fix now applies for SAO, METAR
and SM. (I will be extremely happy in the year 2015
when we only need to support METAR.)
********************
Release metar_ver1.3
04/17/96
********************
Fix 16 On the version 1.2, if you included the SHEF code 'PPD'
in the 'metar.cfg' file, the software would find a match for 'PD'
and include this in the SHEF output. To get 'PD' data please encode
'PDIR' in the 'metar.cfg' file. This will make the string unique.
********************
Release metar_ver1.2
04/15/96
********************
Fix 4 Add a new switch, '-a'. When set, this switch will tell
the METAR decoder to strip off the first character of
the station id. For example, the id 'KPIT' will be
changed to 'PIT' in the SHEF encoded message. The
default (if the -a switch does not exist) is to output
the id exactly as given in the METAR message.
(Request made by: OH - Ben Weiger and coordinated with
several other RFCs.)
Fix 5 Internal software fix. Initialize SM reports in the
function 'metardrive'.
Fix 6 The software will now truncate the WMO line to 18
characters, and truncated blanks at the end of the
filename after the ZCZC line. On occasion, blanks would
exist at the end of the WMO line and at the end of
the filename.
Fix 7 Add a search for plain language RIVER STAGE readings
located in the remarks section of some SAO observations
in Alaska. The patterns added were:
RIV $
RIVOB $
RIV OB $
These are encoded using the SHEF code: HGIRGZZ.
The user should place: HG in the 'metar.cfg' file
to receive this data. (ARRFC)
Fix 8 Prevailing Visibility is now extracted from SAO, SM
and METAR observations. Visibility data are encoded
using the SHEF code: XVIRGZZ. The visibility's are in
statute miles. The user should place: XV in the
'metar.cfg' file to receive this data.
Fix 9 The precipitation type was previously reported using
the SHEF code: XWIRGZZ. This has been changed to
correspond to the official SHEF code: PTIRGZZ.
(See table 17 in the SHEF documentation.) The code
XW has been removed. The user should place PTIR in the
'metar.cfg' file to receive this data.
The codes reported are as follows:
PTIR Code Reported Type of Precipitation
-1 no precipitation (pseudo code)
1 Rain
2 Freezing Rain
3 Drizzle
4 Freezing Drizzle
5 Snow
7 Snow Grains
Fix 10 Make some minor changes in the labels that are output
in the error files to accommodate visibility, pressure,
pressure characteristics, etc.
Fix 11 For METAR, SAO and SM reports add the ability to output
Station Pressure, Sea Level Pressure, 3 hour pressure
characteristic and the 3 hour pressure tendency. (ARRFC)
Sea level pressure: SHEF PEDTSEP: PLIRGZZ
Station pressure: SHEF PEDTSEP: PAIRGZZ
3 hr pressure characteristic: SHEF PEDTSEP: PDIRGZZ
3 hr pressure tendency: SHEF PEDTSEP: PEIRGZZ
To turn these parameters on simply enter into the
'metar.cfg' file the following two character combinations:
PL for PLIRGZZ
PA for PAIRGZZ
PD for PDIRGZZ (This is a pseudo SHEF code.)
PE for PEIRGZZ (This is a pseudo SHEF code.)
Pseudo means that no known code exists, so I made one up.
Fix 12 For SM reports, calculate precipitation for values
990 through 999 (0 mm through 0.9 mm). This was not done
previously. For 24 hour reports, translate 9999
to a zero amount. (NWRFC)
Fix 13 Increase the array buffer for storing the PE codes
as read in from the 'metar.cfg' line. The increase went
from 81 characters to 200 characters.
Fix 14 Hourly precipitation bug fixed in METAR decoder. Previously
the decoder would only pick up, e.g., 'P 0001'. It will
now pick up this syntax as well as 'P0001'.
Fix 15 Previously the SAO decoder would not handle an observation
coded as an 'RTD', e.g., XXX RTD 0445 ...etc. This has
been corrected. (NERFC)
********************
Release metar_ver1.1
04/02/96
********************
Please note that this release changes the way the observation
times are computed for SM reports (Fix 2).
Fix 1 Internal fix to the main driver program. The filename
for the 'stat' function was changed to include the full
path name.
Fix 2 Change the way that times for SM reports are computed.
Since SM are synoptic observations, they will always
occur every three hours, i.e., 00,03,06,09,12,15,18,21 Z.
The decoder now allows for a window of time according
to the chart below. The algorithm grabs the system
time when the observation is decoded. This time is
entered into the table shown below and the observation
time is computed back to the nearest 3 hourly time.
(Requested by MBRFC.)
530Z <= system time <= 0830Z observation time is 06Z
1130Z <= " <= 1430Z " 12Z
1730Z <= " <= 2030Z " 18Z
2330Z <= " <= 2400Z " 00Z
0000Z <= " <= 0230Z " 00Z
230Z < " < 0530Z " 03Z
830Z < " < 1130Z " 09Z
1430Z < " < 1730Z " 15Z
2030Z < " < 2330Z " 21Z
Fix 3 An internal fix that adds a function called shef_it_sm.
This functions makes it easier to handle SM and SAO
reports, since the SHEF encoding is cleanly divided
between the functions shef_it (SAOs) and shef_it_sm (SMs).
********************
Release metar_ver1.0
04/01/96
********************
Release Notes: 1.0
This is the first release of the METAR decoder. This documentation
file will always display the most recent release notes, description
of fixes, and other information first. All release notes, etc. will
be displayed in reverse chronological order.
If you are currently running the CBRFC SAO/SM decoder locally, you
should have little trouble implementing the METAR decoder. If this
is your first time, please carefully read sections 1 through 6 on
installation, configuring, executing, etc.
This version of the metar_decoder combines the capabilities to
Decode METAR, SAO and SM reports in one software package. The
decoder will automatically detect the type of report, and call
the appropriate decoder within the software. The decoder will
decode, METAR, SA, RS, SP, and SMs from manual and automatic,
AMOS, ASOS, RAMOS, and AWOS sites.
The METAR decoder is very thorough and decodes the entire message.
The SAO and SM decoders decodes most observed parameters, as well as
most coded remarks. It also can decode many obscure plain
language remarks. The decoder also decodes Canadian observations
( via a command line option ). The Canadian observations
and SM observations are translated into English units.
The decoding software is only a decoder. It does not compute
averages, or retain memory about what happened 3, 6 or 24 hours
earlier. Computations, averages, etc. need to be made at the RFC
using the database and appropriate local applications.
See section 7 for reporting problems, errors, or suggestions.
*************
Documentation
*************
---------------------------------------------------------------------
1. OBTAINING THE DECODER
---------------------------------------------------------------------
The decoder, and any files associated with the decoder, can be
obtained through FTP or HOME PAGE access. Instructions are below.
The minimum files you will need are:
metar_decode < executable HPUX >
metar.cfg < configuration file >
metar_ver1.0.doc < detailed documentation >
readme < minimal information on releases >
You are welcome to the source or any other files in the directory.
If you want to compile in a different environment, e.g. AIX, you
need to download the Makefile, source ( *.c ), headers ( *.h ).
You will also need to move the two header files, 'local.h' and
'metar.h' to your directory, /usr/include. The source from OSO
for the METAR portion of the code was written to look for the
header files in /usr/include. This was not changed.
All of the code and files are contained in a single compressed file
named, 'metar.tar.Z'. See section c below for instructions on
uncompressing and unTARing the file.
The decoder has been compiled an executed under HPUX, IBM-AIX
QNX 4.x, and LINUX operating systems.
NOTE: The executable file is compiled for the HPUX environment.
a. FTP SERV
The code can be obtained from an FTP server set up at the CBRFC.
FTP address: ftp.cbrfc.gov
Login: ftp
pass: < anything >
cd pub/metar < code is located in /pub/metar directory >
b. UNCOMPRESSING AND UNTARING
FTP/get the file: metar.tar.Z
Move the metar.tar.Z file to your directory where you keep the
METAR files.
CD to the your directory where you keep the METAR files.
Uncompress the files by entering: uncompress metar.tar.Z
Un_tar the files by entering: tar -xvf metar.tar
---------------------------------------------------------------------
2. LOADING
---------------------------------------------------------------------
Move the executable program, 'metar_decode' and the configuration
file, 'metar.cfg' to the working directory.
*** They must be in the same directory ***
Any user executing the decoder must also have correct permissions.
---------------------------------------------------------------------
3. CONFIGURING
---------------------------------------------------------------------
The configuration file, 'metar.cfg' must be set up correctly for
the decoder to operate. It provides a flexible way for the
user to provide directory paths and some options to the decoder.
DO NOT ADD EXTRA LINES to the configuration file.
A typical configuration file, along with a description, is shown
below.
/tmp/queue/metar/in
/tmp/queue/metar/out
/tmp/queue/metar/err
+SAOOUT
-ERRORFILE
-SHEFPASS
TA UP SD UD US TX TN PPT PPQ PPH PPD PA TAIRZR TAIRZH TAIRZP TAIRZY
.begin_names
KP01
KP06
KIFP
KCGZ
.end_names
.begin_sm_alias
12123 ABCA3
12323 ABGA3
.end_sm_alias
line 1 - > /tmp/queue/metar/in
The full path name of the directory where the METAR, SAO or SM files
are to be placed. In most cases your LDM or AFOS product manager
will write files to this directory.
When executed, the decoder will look in this directory and
attempt to decode every file, until the directory is empty.
The decoder will bypass sub-directories and files that begin
with a '.'. As files are decoded, they will automatically be
removed from the directory.
line 2 - > /tmp/queue/metar/out
The full path name of the directory where the decoder will write
the SHEF encoded output files.
These files will be encoded in SHEF, using the .A format. Most
likely, you will want to write the SHEF files to the directory
where your SHEF decoder looks for data. If the flag SAOOUT is
set to -SAOOUT, no output will be written. (see line 4).
line 3 - > /tmp/queue/metar/err
The full path name of the directory where the decoder will write
any error files. (See line 5 for the ERRORFILE flag).
line 4 - > -SAOOUT or +SAOOUT
The two options for this line are: +SAOOUT or -SAOOUT
+SAOOUT
Always create a SHEF encoded output file.
YOU WILL WANT THIS OPTION SET TO ON OR +.
-SAOOUT
Do not create a SHEF output file.
line 5 - > +ERRORFILE or -ERRORFILE
The errorfile contains the data message, the parsed and decoded
elements, and the encoded SHEF message. It also contain any
parsing errors.
The two options for this line are: +ERRORFILE or -ERRORFILE
The '+ option always write an error file, even if there are no
errors. Initially, you will probably want to turn this on so
that you can monitor if you decoder is working. After testing,
you will probably want this off, or your directory could fill
up fast.
-ERRORFILE
Only write an error file if there are errors.
THIS IS NORMALLY THE OPTION TO SET after initial testing.
+ERRORFILE
Always write error messages, even if there are no errors.
line 6 - > -SHEFPASS or +SHEFPASS
Leave this option set to:
-SHEFPASS
This is an internal hook that users can use to directly pass data
to a DB. THIS OPTION IS CURRENTLY ONLY WORKING FOR QNX HYDROMET
USERS.
line 7 - > desired SHEF codes and filter
This line allows the user to determine which SHEF values are to
be written to the output file. The decoder decodes many
values, but, for example, it is unlikely you will use the
altimeter, etc. Pick your codes from the table below.
USE THE CODES AS GIVEN.
For example, use TA for instantaneous temperature, not TAIR
or TAIRZZZ.
Another example: If you only wanted 24 HR MAX and MIN temps and
24 HR precipitation you would use:
TX TN PPD
You must have at least one blank between SHEF codes, and the
codes MUST BE ON ONE LINE (it does NOT have to be 80 characters
or less). Also see APPENDIX A.
The valid PE codes and the resulting translation are:
HG HGIRGZZ Instantaneous river stage
PA PAIRZZZ Altimeter, Station Pressure
PC PCIRZZZ Precipitation Accumulator
PE PEIRGZZ 3 hour pressure characteristic, 0 - 8
PDIR PDIRGZZ 3 hour pressure tendency
PL PLIRGZZ Sea Level Pressure
PPQ PPQRZZZ Precipitation 6 hour
PPD PPDRZZZ Precipitation 24 hour
PPH PPHRZZZ Precipitation 1 hour
PPT PPTRZZZ Precipitation past 3 hours
PTIR PTIRGZZ Precipitation Type ( SHEF table 17)
RT RTIRZZZ Sunshine
SD SDIRZZZ Snow depth on ground
SDQ SDQRZZZ New Snow Depth in Past 6 hours xx.x
SW SWIRZZZ Water Equivalent
TAIRZZ TAIRZZZ Temperature Instantaneous
TAIRZY TAIRZYZ Max Temp past 12 hours
TAIRZP TAIRZPZ Min Temp past 12 hours
** TAIRZR TAIRZRZ Max Temp past 6 hours
** TAIRZH TAIRZHZ Min Temp past 6 hours
TD TDIRZZZ Dew Point
TN TAIRZNZ Temperature Min 24 hour
TX TAIRZXZ Temperature Max 24 hour
US USIRZZZ Wind Speed
UD UDIRZZZ Wind Direction
UQ UQIRZZZ Speed/Direction sss.sddd
XV XVIRGZZ Prevailing Visibility
UG UGIRZZZ Peak Wind/Gust
UP UPIRGZZ Peak wind speed during the past hour
UR URIRGZZ Peak wind direction for the peak wind speed
UQ UQIRZZZ SSS.SDDD wind speed and direction together
XW XWIRZZZ Present Weather Synoptic Code
Appendix C - SHEF
XC XCIRZZZ Cloud Cover in tenths
** The SHEF decoder you use may not recognize the new
extremum codes for six hour periods, i.e. R and H. These
are very new codes.
line 8 through 13 - > Optional names/id filter
This is an optional filter that will tell the decoder to
produce output only for these ids. Other IDs and associated
output will be thrown out. The '-g' switch must be set
in the command line.
The decoder will key off the EXACT phrases in the cfg file:
.begin_names
and
.end_names
The ids must be within the phrases, with one id per line.
If you use the four character ids then you must enter the
four characters. If you use the -a option and strip off the
'k' then you can either enter the four or three character id.
line 14 through 17 - > Optional alias id table for sm reports
This is an option that tells the decoder to turn on checking of
an alias id table for only sm observations. The numerical id of
an SM can be converted or 'aliased' to the id that exists in the
table. The alias id table is read in through the cfg file
(see information about the cfg file).
The decoder will key off the EXACT phrases in the cfg file:
.begin_sm_alias
and
.end_sm_alias
The pair of the id and alias id must be entered between the
phrases, with one pair per line. The numerical id is first
followed by the alias ID.
12123 ABCA3
12323 ABGA3
---------------------------------------------------------------------
4. EXECUTING
---------------------------------------------------------------------
There are at least two ways that you can set up the decoder for
execution: (a) Stand Alone/Manual or (b) Automatic.
a. Stand Alone
Once you get the decoder loaded and configured, you may want to
first run the decoder in manual mode. This means that you can
execute the decoder from a command line. This mode is handy to
test specific METAR/SAO/SMs that are suspect.
To run the decoder in test mode at the command line simply enter:
metar_decode -t -v
This is the test (-t) and verbose (-v) mode. You will be
prompted for a file name. The file should contain a valid
METAR, SAO or SM observation preceded by a valid WMO header
line. The names of the ERRORFILE and OUTPUT file will be
provided back to you.
Another option is the -d, or debug option. You will get lots of
stuff written to the screen with this option. This option is used
for software debugging:
metar_decode -t -v -d
b. Automatic Mode
This is the operational mode which you will want to use in
operations. In order for this mode to work, you must be able
to automatically place/write METAR/SAO/SM products to the input
directory. You then have several choices for automatically
executing the decoder. You can place the decoder in a cron task,
and for example, execute every few minutes or hour.
An alternative option, is to use an executor which will start
programs on the receipt/existence of files in a directory. The
CBRFC has written such an executor. This executor, called
'proc_loop' (stands for process loop) is a multipurpose
executor and can be used to look in any user specified directory
and start any program if a file is found in the directory.
The executor looks every 5 seconds, but it can be configured by the
user.
The command line options as of the release are:
-? list version number and all options
-a strip off the first character in the id of a
-b turn on decoder to accept collectives
METAR observation
-c seconds run decoder in continuous mode every seconds
-d turn on debug information
-e do NOT convert temps/dew points to English units
-fcfg filename input configuration path/filename from command line
-g only produce shef output for ids read in the cfg file
-howold #sec how old a file needs to be in seconds before processing(default=15)\n",
-i filename provide filename from command line
-j# output each metar in it's own file - j1=ob + decode, j2=ob, j3=decode - no shef
-kt output all wind speeds in knots (default miles/hour)
-l switch type/source to RO for ASOS, RV for manual
-m assume SAO (Canadian) observations are in metric
and convert to English
-nospeci do not decode special (SPECI) observations
-oh output files with the prefix shef_prod# where
-pall6 generate a 0 value for PPQ for 6 hour periods if
precipitation group is missing for all stations
-pall24 generate a 0 value for PPD for 24 hour periods if
-p24 generate a 0 value for PPD for 24 hour period if
precipitation group is missing for automatic
stations only generate an 'M' if the PNO flag is on
-p1 generate a 0 value for PPH for 1 hourly periods if
precipitation group is missing for automatic
stations only generate an 'M' if the PNO flag is on
-p6 generate a 0 value for PPQ for 6 hour periods if
precipitation group is missing for automatic
stations only generate an 'M' if the PNO flag is on
-p12z only decode 24 precipitation amount in the
window 1140-1310Z
-q1 output wind direction in hundreds ( default is tens )
-round round time to nearest whole hour for non-special
observations
-sw switch source of PEDTSEP form 'Z' to 'V' for
testing METAR
-strip convert bad ASCII characters to blanks
(1 <= # <= 999
-salias turn on check of alias id table for sm observations
-t execute test version
precipitation group is missing for all stations
-v turn on verbose option
-w output WMO line and ZCZC CCCNNNXXX with output
-x # override system ccyymmdyhrmn to the value = #\n",
-y2k output the century in the shef output
Example: sao_decode -v -m -w -t -fcfg /usr/local/metar/metar.cfg
'-?'
This option will write to the screen a list and brief description
of all of the options. The decoder will not be executed. This
option is used to provide the user with a quick list.
'-v'
The verbose option will write to the standard output (screen)
key information such as the observation and the SHEF output.
This option is designed to be used in testing and evaluation.
'-d'
The debug option will write to the standard output (screen)
detailed information during the decoding process. For example,
the pattern matching information used by the SAO and SM decoders
will be output. This option is used for debugging.
'-a'
When set, this option will strip off the first character of the
station id in a METAR message. For example, the id 'KPIT' in
the original message will be changed to 'PIT' in the SHEF message.
The default is not to change the station id.
'e'
When set, the decoder will NOT convert temperatures and dew points
to English units. The default, when the switch is not present, is
to convert to English units.
'-g'
When this switch is included on the command line the decoder will
read in a list of ids from the configuration file. SHEF output will
only be produced for these ids. All other observations will be
tossed out. This is entered in the cfg file.
The decoder will key off the phrases:
.begin_names
and
.end_names
The ids must be within the phrases, with one id per line.
If you use the four character ids then you must enter the
four characters. If you use the -a option and strip off the
'k' then you can either enter the four or three character id.
A sample of how to include the ids in the metar.cfg file is shown below:
/tmp/queue/metar/in
/tmp/queue/metar/out
/tmp/queue/metar/err
+SAOOUT
+ERRORFILE
-SHEFPASS
SW XW XC XV PD PE PL PT PC TAIRZZ TD UG SD UD US UQ UP UR TX TN PPT PPQ PPH PPD XR PA TAIRZR TAIRZH TAIRZP TAIRZY SDQ
.begin_names
KP01
KP06
KIFP
KCGZ
.end_names
'-t'
Execute the decoder in test mode. This mode will provide the
user an easy way of testing individual observations. In this mode
the user will be prompted for the name of the input file. The
error and output files will be generated, along with their filenames.
For example, if the filename of the test observation was
testdata, the error and output filenames may look like:
testdata.err.0203.121212
testdata.out.0203.121212
'-w'
Write a ZCZC, WMO line and NNNN as part of the output file. Some
SHEF decoders require this information.
'-i'
Provide the input filename from the command line. If you use this
option, do not include any directory path information. The
decoder will append the filename to the input directory path
specified in the 'metar.cfg' file. An example command line
could look like the following, "metar_decode -i my_metar_file_name".
'q1'
output wind direction in hundreds ( default is tens )
'-salias'
This switch tells the decoder to turn on checking of alias id table
for sm observations. The numerical id of an SM can be converted
or 'aliased' to the id that exists in the table. The alias id table
is read in through the cfg file (see information about the cfg file).
A sample of how to include the sm alias id table in the metar.cfg
file is shown below:
/tmp/queue/metar/in
/tmp/queue/metar/out
/tmp/queue/metar/err
+SAOOUT
+ERRORFILE
-SHEFPASS
SW XW XC XV PD PE PL PT PC TAIRZZ TD UG SD UD US UQ UP UR TX TN PPT PPQ PPH PPD XR PA TAIRZR TAIRZH TAIRZP TAIRZY SDQ
.begin_sm_alias
12123 ABCA3
12323 ABGA3
.end_sm_alias
'-sw'
This switch will tell the decoder to output 'V' for the source
code located in the PEDTSEP instead of 'Z'. This will only occur
for METAR type observations, and will have no affect on SAO/SM.
This option will allow a user to store and identify the observation
as a METAR observation. SAOs for the same station will be stored
with a 'Z'. For example, the PEDTSEP for a PPQ received from a
METAR with the '-s' switch would be, PPQRVZZ. This should make
it easy to identify the observations and make comparisons, etc.
After the METAR test is over, this switch should go away.
'j#'
No shef will be output with this mode. Filenames will be named the
9 character PIL.
Output each metar in it's own file - j1=ob + decode, j2=ob, j3=decode - no shef
'-strip'
This switch will tell the decoder to 'strip' off potentially
'bad' ASCII codes that may have been put into the observation
from other sources. These sources could be local data
managers, the SBN from AWIPS, etc. When the switch is not
set (which is the default) all characters are passed as
is. The character values are not actually stripped off
but converted to blanks.
If ASCII vale > 0 and ASCII value < 10
or
If ASCII value > 10 and ASCII value < 32
convert to 32.
'-p1'
This option will generate a zero report for automated
rain gage sites if no value is reported and there is no PNO
{ Precipitation Not Operating } token. The value will be associated with
a PPH. Remember that an automated rain gage is detected when either
a A01 or A02 is detected in the report. If the PNO is detected
a report value of 'M' will be generated.
'-p6'
-p6 switch set on
If the -p6 switch is on, the following will occur:
(a) if a precipitation value is indicated, it will
be transmitted as given
(b) an 'M' will be sent if the observation indicates a
missing value
(c) an 'M' will be sent if the observation is an automatic site
and PNO is sent in the message,
(d) a zero amount of precipitation will be sent if the
site is an automatic site, PNO is not present, and
no value is transmitted in the observation.
'-pall6'
-pall6 switch set on
If the -pall6 switch is on, the following will occur:
(a) if a precipitation value is indicated, it will
be transmitted as given
(b) an 'M' will be sent if the observation indicates a missing
value
(c) a zero amount will be transmitted in all other cases
'-p24'
Same as -p6 but for 24 hour precipitation.
'-pall24'
Same as -pall6 but for 24 hour precipitation.
'-p12z'
Only decode 24 hour precipitation in the window 1140Z - 1310Z,
Default is to decode 24 hour amounts for all observation times.
'-m'
When this switch is set, the decoder will assume the observation
is a Canadian SAO, and that the data are in Metric. Do not use
this option when decoding U.S. SAOs or METAR observations.
'-c seconds'
When this switch is set the decoder will be executed in
continuous mode, snoozing a little in between execution.
The number of seconds to snooze is a number that immediately
follows the -c switch. For example, '-c 15' will snooze 15
seconds between iterations. This was requested by ABRFC.
'-oh'
The OH SHEF decoder setup requires that SHEF products have a
specific naming convention. The filename must have the following
naming convention: shef_prod#, where # is a number between
1 and 999. The metar_decoder can now construct an output filename
with this convention. The METAR decoder will first look into the
output directory specified in the configuration file. It will loop
through numbers 1 through 999 and look for an available file.
If one is found it will write the SHEF output to this file.
If the queue is full, the decoder will sleep for a few seconds
and try again. The decoder will continue trying until a free
file is found.
'-howold #'
The decoder will not begin processing a file until it is
a certain number of seconds old. Previously this was set at
60 seconds. The user can now configure this number by
using the -howold # switch, with the # sign in seconds.
'-nospeci'
Do not decode special observations.
No special observations will be decoded if this switch is included.
This applies to METAR as well as SAO observations. For METAR
observations, all hourly observations will be decoded, even it
they meet special criteria. For SAO observations,
RS (Record Specials) will be decoded since they are on the hour.
'-round'
When '-round' is located in the command line, the observation will
be rounded to the hour. This switch will only apply to routine or
non-SPECI observations. Routine or non special observations
are detected if: (1) the specification METAR is located at
the beginning of the observation, (2) no METAR or SPECI is
detected in the observation. If the specification SPECI is
detected, the observation is a special. All special observations
are required to have the specification SPECI in the observation.
When no -round switch is found, the time will be specified as is
in the observation (default).
Examples: With the -round switch on:
0255Z -> rounded to: 0300Z
2345Z -> 0000Z
0010Z -> 0000Z
'-fcfg filename'
When '-fcfg filename' is located in the command line, the decoder
will read in the configuration file specified in the variable
'filename'. The path and filename are required if the file is
located elsewhere than the directory where the decoder was started.
The default is to open a file called 'metar.cfg' in the directory
where the decoder is started.
Example:
metar_decode -fcfg /lets/open/the/metar.cfg.file -a ...
'-l'
When -l is set, it allows the user to distinguish the type
of report, that is manual or automated (ASOS).
With this switch set, the type/source of the SHEF PEDTSEP will be
'RO' and stand for ASOS type reports, and 'RV' will stand for
manual reports. For example, precipitation from an ASOS site
would be coded as PCIROZZ and precipitation from a non automated
site would be coded as PCIRVZZ.
The default, if -asosts is not present, is to set the type/source
to RZ, e.g., PCIRZZZ.
'-b'
When present, the decoder will attempt to decode all observations
in a particular file (known as a collective of observations). The
observations in each file must be of the same type, e.g.,
all METAR, all SM.
'-x #'
This switch is strictly used in testing, and will not be
used in operations. The switch allows a user/developer to
internally set/override the system date/time. This switch
will only work if the -t (test) switch is also on.
Allow for year, month, and day. For example:
-x 2000 override system year & set to 2000
-x 200012 override year and month
-x 20001231 override year, month and day
-x 2000123100 override year,month, day, hour
-x 200012311010 override year,month,day,hour,min
'-y2k'
When present on the command line, this switch will tell the
decoder to output the 4 digit century/year in the SHEF
output. The default is to output the 2 digit year.
'-kt'
When present, all values of wind speeds will be in knots. If
the switch is not present (which is the default) wind speeds
will be in miles/hour.
---------------------------------------------------------------------
5. METAR INPUT FILES
---------------------------------------------------------------------
The decoder requires that the METAR input file have a WMO header
line, followed by a valid METAR, SAO, or SM. A few examples are
shown in the documentation in APPENDIX B.
The starting location of an observation is found when an official
WMO header line is encountered in the file. An example of this is:
SMUS90 CWVR 060000. After finding a valid WMO line, the decoder
will next search for a METAR, SAO or SM report. You may have
as many observations in a file as desired, but each one must
be preceded by a valid WMO line. This should not be a problem
for most users.
It is suggested that you do not decode collectives, but rather
individual observations as they are received.
Evidently, the OH supported SHEF parser/poster requires files
that are to be decoded and posted to have hard-wired filenames,
that look like 'shef_prod.$$$', where $$$ is a number between
1 & 999. You will be responsible for creating these names.
At least two alternatives exist to handle this problem, a local
script and AFOS redirecting.
The NWRFC has been kind enough to supply a script which renames
and copies MEATR/SAO/SM files to the SHEF input directory. This
will ensure that the files have names of shef_prod.$$$, where $$$
is a number between 1 and 999. If you have questions about this
you can contact Harold Optiz at the NWRFC. The name of the script
is 'run_sao' and is contained on the ftp server along with the
decoder.
The MARFC redirects the output files back to AFOS, which in turn
sends them back to the LDM or AFOS product_manager. Appropriate
file names are then constructed within the current system.
---------------------------------------------------------------------
6. DOCUMENTATION DESCRIPTION
---------------------------------------------------------------------
Documentation will be posted to the FTP server/HOME PAGE as
changes are made. The documentation will be provided in two
files:
1. readme (file)
The readme file will contain a chronology of documentation versions.
You can quickly see what the most current version of the decoder.
2. metar_ver$.$.doc (file)
This file will contain all of the documentation. Versions will
be numbered in the filename. An example would be
metar_ver2.1.doc. The first number refers to the main release,
the second number references minor changes/fixes.
As changes/fixes are being made, they will be noted at the top
of the documentation. The most recent changes will always be at
the top. Release notes, if appropriate, will be provided.
---------------------------------------------------------------------
7. REPORTING PROBLEMS
---------------------------------------------------------------------
Any problems, suggestions, etc. can be sent to the CBRFC via
E-MAIL. If the problems are with the METAR portion of the
decoding package, they will be forwarded to the Office of Systems
Operations, where the decoding portion of the decoder is
maintained. The CBRFC will handle the SAO, SM and file system
portion of the decoder.
If you have any questions, problems give us a call or drop a
message at: dgb@wasatch.cbrfc.gov
---------------------------------------------------------------------
8. OTHER
---------------------------------------------------------------------
a. Time Stamping
The date time is computed from the system time
in concert with the observation time. If the system
time (HRMN) is greater than the observation time,
the YR,MO,DAY is assumed to be the system date.
If the system time is less than the observation time,
the observation YR,MO and DAY are adjusted back from
the system date.
For example:
If the observation is as follows:
P69 SA 2349 RAMOS ....etc.
and the system date/time is:
96 01 31 2359
then
2359 > 2349
and the time stamp is:
1996 01 31 2349.
If the observation is as follows:
P69 SA 2353 RAMOS ....etc.
and the system date/time is:
96 01 1 0005
then
0005 < 2353
and the time stamp is:
1995 12 31 2353.
In the second case above, the decoder starts to
decode the observation a few minutes past the hour on the
next day. Therefor you have to back the time up
to compensate. Leap years are checked.
An assumption is made that the observations will be
decoded, shortly after they arrive, usually within
a few hours. If you run the decoder on observations that
are 24 hours old, you risk having incorrect date/time
problems.
Date/times are not carried in an SSM observation. Therefore, for
this version, the system date time will be used.
METAR observations usually contain the day, hour and minute.
b. File Contention
Unfortunately, under UNIX (POSIX) there is no easy way to
determine if a file is in use by another process. This is
important when running tasks automatically since you may be
trying to decode/read a file that is still being written
to by another process. UNIX does support file locking, however
all applications, FTP being one of them, does not support the
protocol. The decoder attempts to resolve this problem by
making a two way check. This first check is to decode only files
that are at least 1 minute old (user specified time). The second
check is to measure the growth rate of the file over a one second
time period, and to be sure the rate is zero. Since METAR messages
are small, file contention should not be a problem.
The affect on the user is that only files that are one minute or
older will be decoded.
c. IDs
All station ID's in METAR observations begin with a character
that is not part of the station id. For example, KPIT, usually
is referred to as PIT. The first character can be stripped from
the observation by using the '-a' switch.
To locate the three character station ID of an SM, the decoder first
looks for three ALPHA characters in the message. If they are found,
the ID is obtained. If there is no ALPHA 3 char ID in the message,
the ID is parsed off of the file name, i.e., the XXX in the
CCCNNNXXX. The first nine characters of the SM file should be
the CCCNNXXX of the AFOS product. The 5 digit International ID
is contained in the SHEF product as a comment.
---------------------------------------------------------------------
APPENDIX A - Translations
---------------------------------------------------------------------
The values that are decoded and translated are shown below. An *
means that the values are decoded, but not encoded into SHEF. None
of the * values are used by RFC's operationally.
The following main values in the METAR/SAO/SM are translated
into SHEF.
TAIRZZ TAIRZZZ air temperature
TD TDIRZZZ dew point temperature
PL PLIRGZZ Sea Level Pressure
PA PAIRGZZ Station Pressure
PDIR PDIRGZZ 3 hour pressure characteristic
PE PEIRGZZ 3 hour pressure change
PA PAIRZZZ Station Pressure
UD UDIRZZZ wind direction
US USIRZZZ wind speed
UG UGIRZZZ wind gust
UP UPIRGZZ peak wind speed during the past hour
UR URIRGZZ direction for the peak wind during the past hour
UQ UQIRZZZ SSS.SDDD speed and direction together
PT PTIRGZZ Precipitation type
XV XVIRGZZ Prevailing Visibility
The following coded remarks in SAOs are translated into SHEF.
1sTTT TAIRZRZ Max temp past 6 hours
2sTTT TAIRZHZ Min temp past 6 hour
4sTTTsTTT TAIRZXZ, TAIRZNZ 24 hour max/min temperatures (midnight LST)
4/sss SDIRZZZ depth of snow on ground in whole inches
5appp PDIRGZZ, PEIRGZZ 3 hour pressure tendency and change
6RRR/ PPTRZZZ, PPQRZZZ precipitation (3 or 6 hourly)
7RRRR PPDRZZZ 24 hour precipitation (##.## inches ) (12Z)
98xxx RTIRZZZ duration of sunshine (08Z)
933RRR SWIRZZZ water equivalent of snow on ground (##.#)
PCPN PPHIZZZ hourly precipitation from ASOS
The following free text plain language remarks for SAOs are
translated in SHEF.
Decimals and '-' signs are accounted for.
12 HR MAX $ TAIRZYZ
12HR MAX $ TAIRZYZ
12HR MIN $ TAIRZPZ
12 HR MIN $ TAIRZPZ
MAX YDA $ TAIRZXZ
24 HR MAX $ TAIRZXZ
24HR MAX $ TAIRZXZ
YSDYMAX $ TAIRZXZ
TDYS MAX $ TAIRZXZ
TDY MAX $ TAIRZXZ
MAX TEMP $ TAIRZXZ
YSTDYMAX $ TAIRZXZ
HI $ TAIRZXZ
MAX $ TAIRZXZ
MIN YDA $ TAIRZNZ
24HR MIN $ TAIRZNZ
24 HR MIN $ TAIRZNZ
MRNG MIN $ TAIRZNZ
MIN TEMP $ TAIRZNZ
MIN $ TAIRZNZ
24 HR PCPN $ PPDRZZZ
24HR PCPN $ PPDRZZZ
24PCPN $ PPDRZZZ
24 HR PRECIP $ PPDRZZZ
$$$$ PRECIP LAST PPDRZZZ
PRECIP/MAX/MIN $$/$$/$$ PPDRZZZ/TAIRZXZ/TAIRZNZ
MAX/MIN $$/$$ TAIRZXZ/TAIRZNZ
SNW DEPTH $ SDIRZZZ
SLP $ * (none)
PK WND $$$$/$$$ * (none)
RIV $ HGIRGZZ
RIV OB $ HGIRGZZ
RIVOB $ HGIRGZZ
---------------------------------------------------------------------
APPENDIX B - Examples
---------------------------------------------------------------------
This appendix contains samples of the error and output files.
There are examples for METAR, SAO and SM observations.
All error files are divided into three sections:
(1) INPUT OBSERVATION
The actual observation is listed. If the '-w' option was
requested, the ZCZC, WMO line and NNNN will be included.
(2) DECODED OBSERVATION,
The extracted elements of the observation.
(3) ENCODED SHEF OBSERVATION.
The extracted elements turned into SHEF.
All output files are in SHEF. The observation is always included
as a SHEF comment. If the '-w' option was requested, the ZCZC,
WMO line and NNNN will be included.
*************************
METAR Errorfile Example 1
*************************
----------------------------
INPUT: OBSERVATION
----------------------------
METAR KAHN 070853Z 03003KT 6SM -TSRA BR OVC003 15/15 A2964 RMK AO2
PRESFR SLP 033 P0013 60044 T01500150 58049 $
----------------------------
DECODED: METAR OBSERVATION
----------------------------
REPORT CODE NAME : METAR
STATION ID : KAHN
OBSERVATION DAY : 7
OBSERVATION HOUR : 8
OBSERVATION MINUTE : 53
WIND DIRECTION : 30
WIND SPEED : 3
WIND UNITS : KT
PREVAIL VSBY (SM) : 6.00
WX/OBSTRUCT VISION : -TS
WX/OBSTRUCT VISION : RA
WX/OBSTRUCT VISION : BR
CLOUD TYPE : OVC
CLOUD HGT (CHARAC.) : 003
CLOUD HGT (METERS) : 90
TEMP. (CELSIUS) : 15
D.P. TEMP. (CELSIUS): 15
ALTIMETER (INCHES) : 29.64
AUTO INDICATOR : AO2
PRESFR : TRUE
SLP (hPa) : 1003.3
PRECIP AMT (INCHES) : 0.44
TMP2TENTHS (CELSIUS): 15.0
DPT2TENTHS (CELSIUS): 15.0
CHAR PRESS TENDENCY : 8
PRES. TENDENCY (hPa): 4.9
DOLLAR $IGN INDCATR : TRUE
----------------------------
ENCODED: SHEF OBSERVATION
----------------------------
.A KAHN :METAR MANUAL : 960307 Z DH0853/DC9603272313/TAIRZZZ 59
.A KAHN :METAR MANUAL : 960307 Z DH0853/DC9603272313/TDIRZZZ 59
.A KAHN :METAR MANUAL : 960307 Z DH0853/DC9603272313/USIRZZZ 3
.A KAHN :METAR MANUAL : 960307 Z DH0853/DC9603272313/UDIRZZZ 30
.A KAHN :METAR MANUAL : 960307 Z DH0853/DC9603272313/UQIRZZZ 3.0030
.A KAHN :METAR MANUAL : 960307 Z DH0853/DC9603272313/PAIRZZZ 29.64
.A KAHN :METAR MANUAL : 960307 Z DH0853/DC9603272313/PPTRZZZ 0.44
.A KAHN :METAR MANUAL : 960307 Z DH0853/DC9603272313/XWIRZZZ 1
*************************
METAR Errorfile Example 2
*************************
----------------------------
INPUT: OBSERVATION
----------------------------
METAR KAHN 071153Z 17005KT 6SM -RA BR FEW002 SCT008 OVC016 15/15 A2965
RMK AO2 TSE10 SLP 039 P0011 60148 T01500150 10150 20150 51009 $
----------------------------
DECODED: METAR OBSERVATION
----------------------------
REPORT CODE NAME : METAR
STATION ID : KAHN
OBSERVATION DAY : 7
OBSERVATION HOUR : 11
OBSERVATION MINUTE : 53
WIND DIRECTION : 170
WIND SPEED : 5
WIND UNITS : KT
PREVAIL VSBY (SM) : 6.00
WX/OBSTRUCT VISION : -RA
WX/OBSTRUCT VISION : BR
CLOUD TYPE : FEW
CLOUD HGT (CHARAC.) : 002
CLOUD HGT (METERS) : 60
CLOUD TYPE : SCT
CLOUD HGT (CHARAC.) : 008
CLOUD HGT (METERS) : 240
CLOUD TYPE : OVC
CLOUD HGT (CHARAC.) : 016
CLOUD HGT (METERS) : 480
TEMP. (CELSIUS) : 15
D.P. TEMP. (CELSIUS): 15
ALTIMETER (INCHES) : 29.65
AUTO INDICATOR : AO2
RECENT WEATHER : TS END_mm = 10
SLP (hPa) : 1003.9
PRECIP AMT (INCHES) : 1.48
TMP2TENTHS (CELSIUS): 15.0
DPT2TENTHS (CELSIUS): 15.0
MAX TEMP (CELSIUS) : 15.0
MIN TEMP (CELSIUS) : 15.0
CHAR PRESS TENDENCY : 1
PRES. TENDENCY (hPa): 0.9
DOLLAR $IGN INDCATR : TRUE
----------------------------
ENCODED: SHEF OBSERVATION
----------------------------
.A KAHN :METAR MANUAL : 960307 Z DH1153/DC9603272313/TAIRZZZ 59
.A KAHN :METAR MANUAL : 960307 Z DH1153/DC9603272313/TDIRZZZ 59
.A KAHN :METAR MANUAL : 960307 Z DH1153/DC9603272313/USIRZZZ 5
.A KAHN :METAR MANUAL : 960307 Z DH1153/DC9603272313/UDIRZZZ 170
.A KAHN :METAR MANUAL : 960307 Z DH1153/DC9603272313/UQIRZZZ 5.0170
.A KAHN :METAR MANUAL : 960307 Z DH1153/DC9603272313/PAIRZZZ 29.65
.A KAHN :METAR MANUAL : 960307 Z DH1153/DC9603272313/PPQRZZZ 1.48
.A KAHN :METAR MANUAL : 960307 Z DH1153/DC9603272313/TAIRZRZ 59
.A KAHN :METAR MANUAL : 960307 Z DH1153/DC9603272313/TAIRZHZ 59
.A KAHN :METAR MANUAL : 960307 Z DH1153/DC9603272313/XWIRZZZ 1
***********************
SAO Errorfile Example 1
***********************
----------------------------
INPUT: OBSERVATION
----------------------------
ZCZC z_sao
TTAA00 KMFR 102036
GEG SA 0256 AO2A M40 OVC 5ZR-F 088/28/27/0607/971/ 58017 6003/ PCPN
0002 $
NNNN
----------------------------
DECODED: SAO
----------------------------
STATION ID : GEG
OBSERVATION TIME : 0256
TYPE OF REPORT : SA
PRESSURE (MB) : 88
TEMP (F) : 28
D.P. TEMP (F) : 27
WIND DIRECTION : 6
WIND SPEED (KTS) : 7
ALTIMETER (IN) : 971
3/6HR PRECIP (IN) : 3
PRES. TENDENCY : 8
PRES CHANGE : 17
HRLY PRECIP (IN) : 2
----------------------------
ENCODED: SHEF OBSERVATION
----------------------------
.A GEG : SAO AO2A SA: 960316 Z DH0256/DC9603170033/TAIRZZZ 28
.A GEG : SAO AO2A SA: 960316 Z DH0256/DC9603170033/TDIRZZZ 27
.A GEG : SAO AO2A SA: 960316 Z DH0256/DC9603170033/USIRZZZ 7
.A GEG : SAO AO2A SA: 960316 Z DH0256/DC9603170033/UDIRZZZ 6
.A GEG : SAO AO2A SA: 960316 Z DH0256/DC9603170033/UQIRZZZ 7.0060
.A GEG : SAO AO2A SA: 960316 Z DH0256/DC9603170033/PAIRZZZ 29.71
.A GEG : SAO AO2A SA: 960316 Z DH0256/DC9603170033/PPHRZZZ 0.02
.A GEG : SAO AO2A SA: 960316 Z DH0256/DC9603170033/PPTRZZZ 0.03