Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use BOM Api for weather, tide and swell

Tags:

weather

I have lot of search on the BOM api of Australia. There is no easy way to get the weather details like wind, temp, humidity etc. They provide data in by ftp in .xml format. There is no json format at all. Some where they provide the data in json format.Below is link of the json response. http://www.bom.gov.au/fwo/IDW60801/IDW60801.94802.json

but the biggest problem with the product id, there is IDW60801 product ID of west Australia for the "observations" data. It is has the following information :- weather, swell, pressure and wind. but it has the previous day details not forecast details.

There is wmo id :- 94802

I got some wmo id from somewhere but it not for all the location of the Australia. I want to access weather forecast of all the location of the Australia in json or . xml format.

If anybody know how we get all the details please let me know.

Here is the ftp link for the products :- ftp://ftp.bom.gov.au/anon/sample/catalogue/ ftp://ftp.bom.gov.au/anon/sample/catalogue/Observations/ ftp://ftp.bom.gov.au/anon/sample/catalogue/Forecasts/ ftp://ftp.bom.gov.au/anon/sample/catalogue/Tide/

I also got the AAC identifier list of the Australia's cities by the BOM.If getting the details by AAC identifier please let me know the url for that so i can retrive the details by it.

Thanks

like image 555
user3249432 Avatar asked Sep 16 '16 14:09

user3249432


People also ask

How do I access BOM API?

The Australian Bureau Meteorology API endpoint is located at http://www.bom.gov.au/fwo/. You can find the Australian Bureau Meteorology API portal / hompage here. If you need Australian Bureau Meteorology API support, you can contact the support team directly at [email protected].

How does API work in weather?

The National Weather Service (NWS) API allows developers access to critical forecasts, alerts, and observations, along with other weather data. The API was designed with a cache-friendly approach that expires content based upon the information life cycle.

Is BOM weather app accurate?

Easy to scroll across to see how the day is predicted to pan out for your area and the 'feels like' temperature is also helpful. Of course as accurate as they can be - mostly right. It's intuitive, informative and quick and easy to use.


2 Answers

It wasn't immediately clear to me how to do this, here's what I found:

You can use this endpoint: http://www.bom.gov.au/fwo/<PARAMS...> to retrieve last ~72 hours of weather observations for a particular site.

  • I got a full list of available weather stations (ID's + labels + coordinates) here:

    • ftp://ftp.bom.gov.au/anon2/home/ncc/metadata/sitelists/stations.zip
    • http://www.bom.gov.au/climate/cdo/about/site-num.shtml
  • the request format is: http://www.bom.gov.au/fwo/ID<STATE>60701/ID<STATE>60701/<STATION_ID>.json

  • an example query for Cape Bruny in Tasmania: http://www.bom.gov.au/fwo/IDT60701/IDT60701.95967.json

    • the 95967 in my above example is the station ID
    • the IDT60701 part is for the state of Tasmania, so for other states:
      • QLD: IDQ60701
      • NSW: IDN60701
      • VIC: IDV60701
      • NT: IDD60701 (slightly inconsistent convention on this one..)
      • etc.

There's also a bunch of product codes here: http://www.bom.gov.au/catalogue/anon-ftp.shtml which might be useful somehow..

like image 117
danwild Avatar answered Oct 20 '22 23:10

danwild


You expressed your problem as:

I have lot of search on the BOM api of Australia. There is no easy way to get the weather details like wind, temp, humidity etc. They provide data in by ftp in .xml format. There is no json format at all.

If I understand your need, is to pull weather data from BOM in JSON format?

So the first thing is to identify an IDV near you. In this case I'm using, for Melbourne, it's IDV60901.

So here's the JSON request: http://www.bom.gov.au/fwo/IDV60901/IDV60901.95936.json

You can find these under "Observations - individual stations" on http://www.bom.gov.au/catalogue/data-feeds.shtml

The response includes a header and then the following data on a half-hourly basis (where "sort order" is the most recent observation). Note that because this location is not on the coast it doesn't provide ocean/bay conditions. However if you select an IDV where that data is relevant, then you will find observations for ocean conditions:

{
    "sort_order": 0,
    "wmo": 95936,
    "name": "Melbourne (Olympic Park)",
    "history_product": "IDV60901",
    "local_date_time": "12/12:30pm",
    "local_date_time_full": "20171012123000",
    "aifstime_utc": "20171012013000",
    "lat": -37.8,
    "lon": 145.0,
    "apparent_t": 12.4,
    "cloud": "-",
    "cloud_base_m": null,
    "cloud_oktas": null,
    "cloud_type_id": null,
    "cloud_type": "-",
    "delta_t": 5.9,
    "gust_kmh": 28,
    "gust_kt": 15,
    "air_temp": 16.6,
    "dewpt": 4.0,
    "press": 1014.7,
    "press_qnh": 1014.7,
    "press_msl": 1014.7,
    "press_tend": "-",
    "rain_trace": "0.0",
    "rel_hum": 43,
    "sea_state": "-",
    "swell_dir_worded": "-",
    "swell_height": null,
    "swell_period": null,
    "vis_km": "-",
    "weather": "-",
    "wind_dir": "WNW",
    "wind_spd_kmh": 15,
    "wind_spd_kt": 8
}
like image 21
Lloyd Bunting Avatar answered Oct 21 '22 00:10

Lloyd Bunting