How to use BOM Api for weather, tide and swell
Asked Answered
I

3

14

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

Incorporate answered 16/9, 2016 at 14:30 Comment(0)
S
20

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
}
Sutra answered 12/10, 2017 at 2:27 Comment(1)
This is just the information returning from weather stations. I find that it doesn't have a way to tell today is a Sunny Day or a Rainy Day.Scabrous
C
11

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.

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

Crackpot answered 26/10, 2020 at 5:40 Comment(2)
Im getting a forbiddon StatusCode when tryng to access a .jsonSharenshargel
what is the best way to map station id. ? I believe the "lat" and "long" from stations.zip is the only way . Also found not all the station are available.Haroldharolda
E
1

The AAC codes can be linked with the précis forecast given in the XML files, they also specify the AAC code if you want a forecast for a location.

I've been working on an R package with a couple other people, bomrang, that does this and a couple other things, it's still under development right now but it is installable from GitHub if you use R.

The current weather is served in json files and can be retrieved and returned in a data frame.

The forecast can be retrieved and linked to location names via AAC codes and returned as a data frame.

https://github.com/ToowoombaTrio/bomrang

Evildoer answered 24/5, 2017 at 10:10 Comment(1)
thanks for sharing information about bomrang. I find it useful but I did not get an idea on how to utilize that .Haroldharolda

© 2022 - 2024 — McMap. All rights reserved.