I need a weather module for an Iraqi website, however, Iraq seems not supported by this module. Is there any reason for this? And is it possible to add Iraq-support?

Kind regards

Comments

toddy’s picture

The reason is that I could not find a source for weather data from Iraq. It seems that the country does not provide the data to some website. If you can tell me where to get the needed data, I'll be happy to add support for Iraq.

Regards,
Tobias

mixhael’s picture

I don't know exactly what kind of data you need, but the your module speaks of METAR data and wunderground seems to use this for Iraq too (http://www.wunderground.com/global/stations/40650.html)

mixhael’s picture

It seems here are weather stations for iraq: http://aviationweather.gov/adds/metars/stations.txt

mixhael’s picture

The weird thing is indeed that if you check the source you use for metar weather.noaa.gov it seems they don't have weather for iraq, since iraq is not listed under 'international locations'. But the weather stations listed in the link from aviation weather are available in the metar data of weather.noaa.gov.

So it seems it's only a matter of adding the cities, codes, coordinates and their stations into the database no?

mixhael’s picture

I'm figuring out how to do it myself, so now generated the following code. However, don't know how to properly translating the lat/longitutes

db_query("INSERT INTO {weather_icao} (icao, country, name, latitude, longitude) VALUES ('%s', '%s', '%s', %f, %f)", 'EQBC', 'Iraq', 'Al Kut', x, x);
db_query("INSERT INTO {weather_icao} (icao, country, name, latitude, longitude) VALUES ('%s', '%s', '%s', %f, %f)", 'ORBB', 'Iraq', 'Baghdad-Sirsenk', x, x);
db_query("INSERT INTO {weather_icao} (icao, country, name, latitude, longitude) VALUES ('%s', '%s', '%s', %f, %f)", 'ORBI', 'Iraq', 'Baghdad Intl', x, x);
db_query("INSERT INTO {weather_icao} (icao, country, name, latitude, longitude) VALUES ('%s', '%s', '%s', %f, %f)", 'ORBM', 'Iraq', 'Mosul (IRQ-AFB)', x, x);
db_query("INSERT INTO {weather_icao} (icao, country, name, latitude, longitude) VALUES ('%s', '%s', '%s', %f, %f)", 'ORBS', 'Iraq', 'Saddam (IRQ-AFB/C)', x, x);
db_query("INSERT INTO {weather_icao} (icao, country, name, latitude, longitude) VALUES ('%s', '%s', '%s', %f, %f)", 'ORER', 'Iraq', 'Erbil Intl', x, x);
db_query("INSERT INTO {weather_icao} (icao, country, name, latitude, longitude) VALUES ('%s', '%s', '%s', %f, %f)", 'ORMM', 'Iraq', 'Basrah/Magal', x, x);
db_query("INSERT INTO {weather_icao} (icao, country, name, latitude, longitude) VALUES ('%s', '%s', '%s', %f, %f)", 'ORMS', 'Iraq', 'Shaibah/Basrah', x, x);
db_query("INSERT INTO {weather_icao} (icao, country, name, latitude, longitude) VALUES ('%s', '%s', '%s', %f, %f)", 'ORSU', 'Iraq', 'Sulaymaniyah', x, x);

This is the METAR data:

   AL KUT           EQBC        99878  32 28N  045 45E   20   X                6 IQ
   BAGHDAD-SIRSENK  ORBB        40650  33 13N  044 13E   34   X                7 IQ
   BAGHDAD INTL     ORBI               33 16N  044 14E   35   X                3 IQ
   MOSUL (IRQ-AFB)  ORBM        40608  36 19N  043 08E  223   X                7 IQ
   SADDAM(IRQ-AFB/C ORBS               33 16N  044 13E   34   X                7 IQ
   ERBIL INTL       ORER               36 14N  043 58E  409   X                8 IQ
   BASRAH/MAGAL     ORMM        40689  30 34N  047 46E    2   X     T          6 IQ
   SHAIBAH/BASRAH   ORMS        40688  30 25N  047 38E   19   X                7 IQ
   SULAYMANIYAH     ORSU               35 34N  045 19E  761   X                8 IQ
toddy’s picture

Version: 6.x-5.9 » 7.x-1.1
Assigned: Unassigned » toddy
Status: Active » Fixed

This is fixed now and will be part of the next release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.