Re: Decoding of METAR Wx-groups

2001-06-28 Thread Martin Geisler

"Funder, Johnny  OTP" <[EMAIL PROTECTED]> writes:

> Hi,
> 
> I have a couple of "complaints" about the decoding of the
> weathergroup(s).
> 
> Ref ver 1.55

> In the exampel below (from today) we have RA BR. This is translated
> to Moderate Rain Moderate Mist.. The prefix "Moderate" is not
> valid for Mist. The correct translation is Moderate Rain plus Mist
> (I found a metar in version 1.9.5 where BR was reported correct).
> 
> EKYT 280620Z 13004KT 5000 RA BR SCT018 BKN040 BKN060 16/15 Q1011
> TEMPO 3000 BKN005
>
> [lots of examples]

Okay - I can see that we have to work some with the weather-string...
Am I correct in thinking that this regexp should match all the
different groups:

(ereg('^(-|\+|VC)?' .  /* Intensity or proximity */
  '(MI|PR|BC|DR|BL|SH|TS|FZ)?' .   /* Descriptor */
  '((DZ|RA|SN|SG|IC|PE|GR|GS|UP)+)?' . /* Precipitation */
  '(BR|FG|FU|VA|DU|SA|HZ|PY)?' .   /* Obscuration */
  '(PO|SQ|FC|SS)?$',   /* Other */
  $part, $regs)

If so, then I think the general rule must be something like this:

$weather = "$description $intensity $precipitation";

like in 'Showers of heavy rain and snow'.

-- 
Best regards,
Martin Geisler

Checkout http://www.gimpster.com for:
PHP Weather => Shows the current weather on your webpages.
PHP Shell   => A telnet-connection (almost :-) in a PHP page.



Decoding of METAR Wx-groups

2001-06-28 Thread Funder, Johnny OTP

Hi,

I have a couple of "complaints" about the decoding of the weathergroup(s).

Ref ver 1.55
In the exampel below (from today) we have RA BR. This is translated to
Moderate Rain Moderate Mist.. The prefix "Moderate" is not valid for
Mist. The correct translation is Moderate Rain plus Mist (I found a metar in
version 1.9.5 where BR was reported correct).

EKYT 280620Z 13004KT 5000 RA BR SCT018 BKN040 BKN060 16/15 Q1011 TEMPO 3000
BKN005


Ref ver 1.9.5:
In the METAR below (MWCR) the WX group is LGTN which is noncense. Looking at
the clouds, what they ment was probably something like "light thunderstorm -
LGTS" which is also noncense. Note that only weather can have a prefix and
TS is NOT in the category of weather (TS is a descriptor, just like MI, BC,
FZ aso.). E.g. -TS is NOT vaid, but -TSRA is (being Thunderstorm with light
rain).
I think that decoding this report should flag to the user that an invalid
Wx-group was encountered instead of just skipping it.

MWCR 270300Z 07010KT  LGTN SCT018CB 29/26 Q1018

Following error causing below METAR to be decoded wrong.
Warning: Undefined index: VC in locale_common.php on line 320
This is a report for YPCC. The report was made one hour and 21
minutes ago, at 06:00 UTC. The wind was blowing at a speed of 6.2 meters per
second (13.8 miles per hour) from east/southeast (120°). The temperature was
28 °C (82 °F), with a dew-point at 23 °C (73 °F). The atmospheric pressure
was 1011 hPa (29.85 inHg). The relative humidity was 74.3%. There were a few
clouds at a height of 640 meter (2100 feet), broken clouds at a height of
1402 meter (4600 feet), and broken clouds at a height of 2743 meter (9000
feet). The overall visibility was greater than 10 kilometers (6.2 miles).
Currently showers of rain 
YPCC 270600Z 12012KT  VCSHRA FEW021 BKN046 BKN090 28/23 Q1011


>From an operational view, the METAR below has the worst error The METAR has
Wx-groups VCTS +SHRA, which is translated to "Currently showers of rain".
The correct translation would be: "Thunderstorm in the vicinity plus showers
of moderate rain".
This is a report for VHHH. The report was made one hour and 21
minutes ago, at 06:00 UTC. The wind was blowing at a speed of 5.7 meters per
second (12.7 miles per hour) from south (180°), varying between southeast
(140°) and south/southwest (210°). The temperature was 25 °C (77 °F), with a
dew-point at 24 °C (75 °F). The atmospheric pressure was 1006 hPa (29.71
inHg). The relative humidity was 94.2%. There were a few clouds at a height
of 213 meter (700 feet), a few cumulonimbus clouds at a height of 457 meter
(1500 feet), and scattered clouds at a height of 549 meter (1800 feet). The
overall visibility was 2500 meter (8202 feet). Currently showers of rain 
VHHH 270600Z 18011KT 140V210 2500 VCTS SHRA FEW007 FEW015CB SCT018
BKN080 25/24 Q1006 TEMPO VRB18G28KT 1500 TSRA +SHRA FEW006 FEW012CB SCT018
BKN080

In the metar below the wx-group -SHRA is translated to "light showers of
rain"  showers (being a descriptor) can not be "light", but rain
can..the correct version is "showers of light rain".

This is a report for CYOD. The report was made one hour and 7
minutes ago, at 06:00 UTC. The wind was blowing at a speed of 6.2 meters per
second (13.8 miles per hour) from east (090°). The temperature was 15 °C (59
°F), with a dew-point at 14 °C (57 °F). The atmospheric pressure was 1015
hPa (29.96 inHg). The relative humidity was 93.7%. There were scattered
cumulonimbus clouds at a height of 914 meter (3000 feet) and the sky was
overcast from a height of 2134 meter (7000 feet). The overall visibility was
16.1 kilometers (10.0 miles). Currently light showers of rain 
CYOD 280600Z 09012KT 10SM -SHRA SCT030CB OVC070 15/14 A2996 RERA RMK
CB3AC5 SFERICS OCNL LTNG 10-BYD 30 S CB SW MOVG NE SLP153

I know that these items are not that significant to most people, but I have
seen aeronautical people showing interest (latest Francesco from LIRF), then
it suddently becomes important.

Regards
Johnny Funder