On Fri, 9 Jul 1999, Unidata Support wrote:
------- Forwarded Message
>cc: Peter Neilley <neilley@xxxxxxxxxxxx>,
>cc: John Murphy <murf@xxxxxxxxxxxx>,
>cc: Bill Myers <myers@xxxxxxxxxxxx>
>From: Jim Cowie <cowie@xxxxxxxxxxxx>
>Subject: synoptic decoder
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
Thanks for finding that bug. I included an $mm undef after each report.
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
(with minutes=0) for setting the nominal time and getting the filename.
I understand where you are coming from with this idea but it puts the
burden on the user to check if the report is in the correct file. Also,
reports after 44 minutes should be put into the next hour. My feeling is
to ignore data that doesn't fall into correct categories because it is
worst to use wrong data verses ommitting the data. There are many Mexican
metar reports that are wrong that caused this thinking.
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...
Sure, send me the changes. I'll keep them on file incase I have a change
I also put a modified syn2nc in the decoders ftp directory.
Jim Cowie Software Engineer
WITI Corporation cowie@xxxxxxxxxxxx
3300 Mitchell Lane
Boulder, CO 80301 (303) 497-8584
------- End of Forwarded Message
Robb Kambic Unidata Program Center
Software Engineer III Univ. Corp for Atmospheric Research
rkambic@xxxxxxxxxxxxxxxx WWW: http://www.unidata.ucar.edu/