Subject: | Missing Temperature Bug |
Date: | Thu, 26 Feb 2009 16:29:00 +0000 |
To: | <bug-Geo-METAR [...] rt.cpan.org> |
From: | "Harder, Paul" <paul.harder [...] weatherinsight.com> |
Sir:
Partly, I am writing to thank you for already fixing the bug we were
experiencing. At present, we are running version 1.14 of Geo::METAR, and
I just inherited the job of finding out why some Canadian stations had
temperatures around zero Fahrenheit for hours, then suddenly 32.0, then
back to zero-ish. It turned out that the bad METAR obs had a temperature
but no dewpoint, and your code was insisting that stations must be
reporting both temperature and dewpoint. But I see that version 1.15 has
changed that line to read like this:
elsif (($parsestate >= $expect_modifier) and ($parsestate <
$expect_pressure) and ($tok =~ /^(M?\d\d)\/(M?\d{0,2})/i))
Clearly, that problem has now been fixed. Thank you.
As soon as my sysadmin gets in today, I plan to have him update our
Geo::METAR to the current release, and that will fix our immediate
problem.
But I wonder whether you might consider making the code just a bit more
flexible. I don't know how likely this is, but it is certainly possible
for a station to report a dewpoint but no temperature -- probably not
likely, but possible. If that ever happened, your code appears likely
to miss the dewpoint. But if you recoded the temperature parser the way
you recoded the dewpoint parser, that should not happen.
Yes, I recognize that such a change could create new problems. And,
while I was an expert in reading METAR many years ago in the Air Force,
I have forgotten much. I don't know for sure that changing the regex
that way would not cause the parser to confuse this token with some
other. I would have to defer to your expertise on that. But if it's
possible to do this without causing new problems, please consider it.
Thank you.
Show quoted text
_______________________________
Paul H. Harder II, Ph.D., AMS
Meteorologist and Software Developer
Weather Insight, L.P.
www.WeatherInsight.com
Direct: 713-361-4966, Tech Support: 713-361-4985
Weather Insight - Redefining Weather Risk Management
This e-mail is strictly confidential and may be privileged and is only
for the use or retention of the intended recipients. Please notify
sender immediately if you have received this in error and delete it from
your system. Unauthorized interception of this e-mail is a violation of
federal criminal law.