synoptic decoder

_From cowie@xxxxxxxxxxxx  Fri Jul  9 10:27:36 1999
Received: from jane.witicorp.com (jane.witicorp.com [128.117.169.208])
        by unidata.ucar.edu (8.8.8/8.8.8) with ESMTP id KAA01585
        for <support@xxxxxxxxxxxxxxxx>; Fri, 9 Jul 1999 10:27:36 -0600 (MDT)
Organization: .
Keywords: 199907091627.KAA01585
Received: from wwindev.witicorp.com ([128.117.170.9]) by jane.witicorp.com
          (Post.Office MTA v3.5.3 release 223 ID# 0-0U10L2S100V35)
          with ESMTP id com; Fri, 9 Jul 1999 10:27:35 -0600
Received: from witicorp.com (localhost [127.0.0.1])
        by wwindev.witicorp.com (8.9.1b+Sun/8.9.1) with ESMTP id KAA26119;
        Fri, 9 Jul 1999 10:26:57 -0600 (MDT)
Sender: cowie@xxxxxxxxxxxxxxxxxxxx
X-Mailer: Mozilla 4.51 [en] (X11; I; SunOS 5.7 sun4u)
X-Accept-Language: en
MIME-Version: 1.0
CC: Peter Neilley <neilley@xxxxxxxxxxxx>, John Murphy <murf@xxxxxxxxxxxx>,
        Bill Myers <myers@xxxxxxxxxxxx>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


Robb,

I found a small bug in the syn2nc decoder that affects the nc filename
and nominal time that gets generated for each report. The problem is
related to the decoding of the "obs time" group(9hhmm) that a few
reports have. What happens is that once a report that has one of
these groups is found, the $mm (minutes) part gets used for the
rest of the life of the decoder until the next report with
one of these groups changes it. This causes many of the reports
to get the wrong time (hour) and filename. $mm is used in theTime()
to determine the nominal report time and filename.

The way to fix this would be to undefine the value of $mm after (or
before) each report. I did that, and went a bit further to force 
all reports into the hourly file/time found in the WMO header or
hour part of the "AAXX ddhhw" line. In other words, if a site reports
a 9hhmm group, it still saves the time_obs value, but uses the bulletin
hour
(with minutes=0) for setting the nominal time and getting the filename.
In general I think it's better to group the reports this way, you 
get much fewer "stragglers" in files that are an hour or two
off. And since you have time_obs for those that report it, your app can
always calculate the difference of time_obs and time_nominal to see if
it is large. Let me know if you want me to send the changes...

-jim

-- 
Jim Cowie                               Software Engineer
WITI Corporation                        cowie@xxxxxxxxxxxx
3300 Mitchell Lane 
Boulder, CO 80301                       (303) 497-8584