Thread: Problem when there's no dew-point
Brought to you by:
iridium
From: Tom M. <to...@un...> - 2003-06-14 12:43:07
|
Hello PHPWeather doesn't seem to like Leeds Bradford Airport's (EGNM) metar reports at the moment. Since about 14:00 GMT on Friday they stopped including the dew point temperature on the metars. Eg. 2003/06/14 11:50 EGNM 141150Z 12005KT 040V210 9999 FEW038 SCT080 18/// Q1023 The "18///" bit. The 18 represents the temperature, but there should be another figure in place of the last two "//". PHPWeather doesn't like this. I can understand it not returning a value for dew point, but it doesn't return a value for the temperature either. It just ignores all temperature readings. I assume that Leeds Bradford Airport are returning their metar reports in the wrong format, and should just be returning "18/" if they are not including dew point rather than "18///". Any ideas? Tom |
From: Nick B <nic...@ya...> - 2003-06-14 15:41:57
|
Tom McDonald wrote: >I assume that Leeds Bradford Airport are returning their metar reports in >the wrong format, and should just be returning "18/" if they are not >including dew point rather than "18///". > > > Thats the correct format Tom. The UK METAR coding rules say that if dew point is not available the it should be replaced by a double ellipsis "//". I must have a word with my friends in ATC Engineering there and ask them to fix it ;-) To quote from UK AIP GEN 3.5.10: ----snip---- 9 Air Temperature/Dewpoint 9.1 These are given in Degrees Celsius, M indicates a negative value . Examples 10/03, 01/M01. If the dew point is missing, the temperature would be reported as 10/// ----unsnip---- If anyone would like access to the UK AIP you can register for free at http://www.ais.org.uk/ . Publications are available in PDF format. Regards, Nick B. |
From: Tom M. <to...@un...> - 2003-06-14 20:54:19
|
Ahhhh I see. So it's a bug with PHPWeather's handling of the METAR feed. Interesting that the UK have different METAR coding rules than everyone else. You'd have expected ICAO to have standardised it all. Though I guess getting everyone to agree on something might be a tad optimistic ;) Thanks for the reply, anyway. Tom > From: Nick B <nic...@ya...> > Date: Sat, 14 Jun 2003 16:48:49 +0100 > To: php...@li... > Subject: Re: Problem when there's no dew-point > > Tom McDonald wrote: > >> I assume that Leeds Bradford Airport are returning their metar reports in >> the wrong format, and should just be returning "18/" if they are not >> including dew point rather than "18///". >> >> >> > Thats the correct format Tom. The UK METAR coding rules say that if dew > point is not available the it should be replaced by a double ellipsis > "//". I must have a word with my friends in ATC Engineering there and > ask them to fix it ;-) > > > To quote from UK AIP GEN 3.5.10: > ----snip---- > 9 Air Temperature/Dewpoint > 9.1 These are given in Degrees Celsius, M indicates a negative value . > Examples 10/03, 01/M01. > > If the dew point is missing, the temperature would be reported as > 10/// > ----unsnip---- > > If anyone would like access to the UK AIP you can register for free at > http://www.ais.org.uk/ . Publications are available in PDF format. > > Regards, > Nick B. > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: eBay > Great deals on office technology -- on eBay now! Click here: > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 > _______________________________________________ > PHPWeather-devel mailing list > PHP...@li... > https://lists.sourceforge.net/lists/listinfo/phpweather-devel |
From: Martin G. <gim...@gi...> - 2003-06-14 23:41:56
|
Tom McDonald <to...@un...> writes: > Ahhhh I see. So it's a bug with PHPWeather's handling of the METAR feed. Oh no, a bug?! :-) I believe I've fixed this now with this very simple fix around line 447 in phpweather.php: - } elseif (ereg('^(M?[0-9]{2})/(M?[0-9]{2})?$', $part, $regs)) { + } elseif (ereg('^(M?[0-9]{2})/(M?[0-9]{2}|//)?$', $part, $regs)) { ... - if (!empty($regs[2])) { + if (!empty($regs[2]) && $regs[2] != '//') { It simply makes the 'xx///'-case the same as the 'xx/'-case that PhpWeather already handles. > Interesting that the UK have different METAR coding rules than > everyone else. You'd have expected ICAO to have standardised it > all. Though I guess getting everyone to agree on something might be > a tad optimistic ;) Yes, this doesn't make things any easier for projects like this one... Thanks (to both of you) for pointing this out. -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather: Shows the current weather on your webpage and PHP Shell: A telnet-connection (almost :-) in a PHP page. |
From: Nick B <nic...@ya...> - 2003-06-15 14:21:26
|
>>interesting that the UK have different METAR coding rules than >>everyone else. You'd have expected ICAO to have standardised it >>all. Though I guess getting everyone to agree on something might be >>a tad optimistic ;) >> >> I just checked the on-line FMH-1, the US version but as it is 1995 it may well have been updated. I've also got some information on Canadian reporting, but thats in the office. Will check in a few days time. >Yes, this doesn't make things any easier for projects like this >one... Thanks (to both of you) for pointing this out. > > > Thanks Martin, if anyone wants to check, EGNM is still without dewpoint. I've also got my own perl script that decodes metars at http://www.nowindows.net/cms/wxstuff.php (Must tidy it up and release it for public consumption sometime.) Nick. |