Several functions are provided by {weatherOz} to retrieve Australian Bureau of Meteorology (BOM) data. A family of functions retrieve data files from BOM or parse local files from BOM and return data frames;
get_precis_forecast()
and
parse_precis_forecast()
, which return the précis (short)
forecast;get_ag_bulletin()
and parse_ag_bulletin()
,
which return the agriculture bulletin (defunct as of version
v2.0.0);get_coastal_forecast()
and
parse_coastal_forecast()
, which return coastal waters
forecasts for each state.This function only takes one argument, state
. The
state
parameter allows the user to select the forecast for
just one state or a national forecast. States or territories are
specified using the official postal codes or full name with fuzzy
matching performed via agrep()
.
ACT - Australian Capital Territory
NSW - New South Wales
NT - Northern Territory
QLD - Queensland
SA - South Australia
TAS - Tasmania
VIC - Victoria
WA - Western Australia
AUS - Australia, returns national forecast including all states, NT and ACT.
The function, get_precis_forecast()
, will return a data
frame of the weather forecast for the daily forecast for selected towns.
See Appendix 1 for a full description of the fields and values.
Following is an example fetching the forecast for Queensland.
library(weatherOz)
(QLD_forecast <- get_precis_forecast(state = "QLD"))
#> ----------- Australian Bureau of Meteorology (BOM) Precis Forecast. -
#> The HTML version of Short Form (Precis) Forecast for
#> QLD can be found at:
#> <http://www.bom.gov.au/qld/forecasts/state.shtml>
#> Please note information at the page
#> <http://www.bom.gov.au/catalogue/data-feeds.shtml#precis>.
#> --------------------------------------------------------------------------------
#> index product_id state town aac lat lon elev start_time_local end_time_local utc_offset
#> <fctr> <char> <char> <char> <char> <num> <num> <num> <POSc> <POSc> <fctr>
#> 1: 0 IDQ11295 QLD Brisbane QLD_PT001 -27.48080 153.0389 8.1 2025-02-25 09:01:53 2025-02-26 10:00
#> 2: 1 IDQ11295 QLD Brisbane QLD_PT001 -27.48080 153.0389 8.1 2025-02-26 00:00:00 2025-02-27 10:00
#> 3: 2 IDQ11295 QLD Brisbane QLD_PT001 -27.48080 153.0389 8.1 2025-02-27 00:00:00 2025-02-28 10:00
#> 4: 3 IDQ11295 QLD Brisbane QLD_PT001 -27.48080 153.0389 8.1 2025-02-28 00:00:00 2025-03-01 10:00
#> 5: 4 IDQ11295 QLD Brisbane QLD_PT001 -27.48080 153.0389 8.1 2025-03-01 00:00:00 2025-03-02 10:00
#> ---
#> 787: 2 IDQ11295 QLD Port Douglas QLD_PT254 -16.48681 145.4635 70.4 2025-02-27 00:00:00 2025-02-28 10:00
#> 788: 3 IDQ11295 QLD Port Douglas QLD_PT254 -16.48681 145.4635 70.4 2025-02-28 00:00:00 2025-03-01 10:00
#> 789: 4 IDQ11295 QLD Port Douglas QLD_PT254 -16.48681 145.4635 70.4 2025-03-01 00:00:00 2025-03-02 10:00
#> 790: 5 IDQ11295 QLD Port Douglas QLD_PT254 -16.48681 145.4635 70.4 2025-03-02 00:00:00 2025-03-03 10:00
#> 791: 6 IDQ11295 QLD Port Douglas QLD_PT254 -16.48681 145.4635 70.4 2025-03-03 00:00:00 2025-03-04 10:00
#> start_time_utc end_time_utc minimum_temperature maximum_temperature lower_precipitation_limit
#> <POSc> <POSc> <num> <num> <num>
#> 1: 2025-02-24 23:01:53 2025-02-25 14:00:00 NA 31 NA
#> 2: 2025-02-25 14:00:00 2025-02-26 14:00:00 22 30 0
#> 3: 2025-02-26 14:00:00 2025-02-27 14:00:00 21 30 0
#> 4: 2025-02-27 14:00:00 2025-02-28 14:00:00 21 31 NA
#> 5: 2025-02-28 14:00:00 2025-03-01 14:00:00 21 30 0
#> ---
#> 787: 2025-02-26 14:00:00 2025-02-27 14:00:00 23 32 0
#> 788: 2025-02-27 14:00:00 2025-02-28 14:00:00 23 32 0
#> 789: 2025-02-28 14:00:00 2025-03-01 14:00:00 22 32 NA
#> 790: 2025-03-01 14:00:00 2025-03-02 14:00:00 22 34 0
#> 791: 2025-03-02 14:00:00 2025-03-03 14:00:00 23 34 0
#> upper_precipitation_limit precis probability_of_precipitation
#> <num> <char> <num>
#> 1: NA Partly cloudy. 30
#> 2: 1 Partly cloudy. 30
#> 3: 1 Partly cloudy. 30
#> 4: NA Mostly sunny. 20
#> 5: 1 Partly cloudy. 30
#> ---
#> 787: 1 Partly cloudy. 30
#> 788: 1 Partly cloudy. 30
#> 789: NA Sunny. 20
#> 790: 1 Mostly sunny. 30
#> 791: 1 Possible shower. 40
This function only takes one argument, state
. The
state
parameter allows the user to select the forecast for
just one state or a national forecast. States or territories are
specified using the official postal codes or full name with fuzzy
matching performed via agrep()
ACT - Australian Capital Territory
NSW - New South Wales
NT - Northern Territory
QLD - Queensland
SA - South Australia
TAS - Tasmania
VIC - Victoria
WA - Western Australia
AUS - Australia, returns national forecast including all states, NT and ACT.
The function, get_coastal_forecast()
, will return a data
frame of the coastal waters forecast for marine zones in each state. See
Appendix 6 for a full description of the fields and values.
Following is an example fetching the forecast for Queensland.
library(weatherOz)
(QLD_coastal_forecast <- get_coastal_forecast(state = "QLD"))
#> ------- Australian Bureau of Meteorology (BOM) Coastal Waters Forecast. -------
#> Please note information at the foot of
#> <http://www.bom.gov.au/cgi-bin/wrap_fwo.pl?IDQ11290.html>,
#> the HTML version of Coastal Waters Forecast for
#> QLD.
#> Also see
#> <http://www.bom.gov.au/catalogue/observations/about-coastal-observations.shtml>.
#> --------------------------------------------------------------------------------
#> index product_id type state_code dist_name pt_1_name pt_2_name
#> <fctr> <char> <char> <char> <char> <char> <char>
#> 1: <NA> IDQ11290 <NA> QLD Queensland <NA> <NA>
#> 2: <NA> IDQ11290 <NA> QLD Queensland Gulf of Carpentaria <NA> <NA>
#> 3: <NA> IDQ11290 <NA> QLD North Queensland <NA> <NA>
#> 4: <NA> IDQ11290 <NA> QLD South Queensland <NA> <NA>
#> 5: 0 IDQ11290 <NA> QLD South East Gulf of Carpentaria: QLD-NT Border to Cape Keerweer <NA> <NA>
#> ---
#> 45: 1 IDQ11290 <NA> QLD Gold Coast Waters: Cape Moreton to Point Danger <NA> <NA>
#> 46: 2 IDQ11290 <NA> QLD Gold Coast Waters: Cape Moreton to Point Danger <NA> <NA>
#> 47: 0 IDQ11290 <NA> QLD Great Barrier Reef Offshore Waters <NA> <NA>
#> 48: 1 IDQ11290 <NA> QLD Great Barrier Reef Offshore Waters <NA> <NA>
#> 49: 2 IDQ11290 <NA> QLD Great Barrier Reef Offshore Waters <NA> <NA>
#> aac start_time_local end_time_local utc_offset start_time_utc end_time_utc
#> <char> <POSc> <POSc> <fctr> <POSc> <POSc>
#> 1: QLD_FA001 2025-02-25 10:00:22 2025-02-25 10:00:22 10:00 2025-02-25 10:00:22 2025-02-25 10:00:22
#> 2: QLD_FA002 2025-02-25 05:00:00 2025-02-25 05:00:00 10:00 2025-02-25 05:00:00 2025-02-25 05:00:00
#> 3: QLD_FA003 2025-02-25 05:00:00 2025-02-25 05:00:00 10:00 2025-02-25 05:00:00 2025-02-25 05:00:00
#> 4: QLD_FA004 2025-02-25 05:00:00 2025-02-25 05:00:00 10:00 2025-02-25 05:00:00 2025-02-25 05:00:00
#> 5: QLD_MW001 2025-02-25 10:00:00 2025-02-25 10:00:00 10:00 2025-02-25 10:00:00 2025-02-25 10:00:00
#> ---
#> 45: QLD_MW014 2025-02-26 00:00:00 2025-02-26 00:00:00 10:00 2025-02-26 00:00:00 2025-02-26 00:00:00
#> 46: QLD_MW014 2025-02-27 00:00:00 2025-02-27 00:00:00 10:00 2025-02-27 00:00:00 2025-02-27 00:00:00
#> 47: QLD_MW015 2025-02-25 10:00:00 2025-02-25 10:00:00 10:00 2025-02-25 10:00:00 2025-02-25 10:00:00
#> 48: QLD_MW015 2025-02-26 00:00:00 2025-02-26 00:00:00 10:00 2025-02-26 00:00:00 2025-02-26 00:00:00
#> 49: QLD_MW015 2025-02-27 00:00:00 2025-02-27 00:00:00 10:00 2025-02-27 00:00:00 2025-02-27 00:00:00
#> forecast_seas forecast_weather
#> <char> <char>
#> 1: <NA> <NA>
#> 2: <NA> <NA>
#> 3: <NA> <NA>
#> 4: <NA> <NA>
#> 5: Below 1 metre. Mostly sunny. The chance of a thunderstorm.
#> ---
#> 45: 1 to 1.5 metres. Partly cloudy.
#> 46: Around 1 metre, increasing to 1 to 1.5 metres offshore. Partly cloudy.
#> 47: 1.5 to 2.5 metres. Partly cloudy. 50% chance of showers.
#> 48: 2 to 3 metres. Partly cloudy. 70% chance of showers.
#> 49: 2 to 3 metres. Partly cloudy. 60% chance of showers.
#> forecast_winds
#> <char>
#> 1: <NA>
#> 2: <NA>
#> 3: <NA>
#> 4: <NA>
#> 5: East to southeasterly 10 to 15 knots becoming variable about 10 knots in the middle of the day.
#> ---
#> 45: Southeasterly 15 to 20 knots.
#> 46: Southeasterly 15 to 20 knots.
#> 47: Southeasterly 20 to 25 knots increasing to 25 to 30 knots in the early afternoon.
#> 48: Southeasterly 25 to 30 knots.
#> 49: Southeasterly 25 to 30 knots.
#> forecast_swell1 forecast_swell2
#> <char> <char>
#> 1: <NA> <NA>
#> 2: <NA> <NA>
#> 3: <NA> <NA>
#> 4: <NA> <NA>
#> 5: Below 0.5 metres. <NA>
#> ---
#> 45: Easterly 1.5 metres. <NA>
#> 46: Easterly 1.5 to 2.5 metres. <NA>
#> 47: East to southeasterly 1.5 to 2.5 metres. <NA>
#> 48: East to southeasterly 1 to 2 metres, increasing to 2 to 3 metres through the Capricorn Channel. <NA>
#> 49: East to southeasterly 1.5 to 2.5 metres, increasing to 2.5 to 4 metres through the Capricorn Channel. <NA>
#> forecast_caution marine_forecast tropical_system_location forecast_waves
#> <char> <char> <lgcl> <lgcl>
#> 1: <NA> <NA> NA NA
#> 2: <NA> <NA> NA NA
#> 3: <NA> <NA> NA NA
#> 4: <NA> <NA> NA NA
#> 5: <NA> <NA> NA NA
#> ---
#> 45: <NA> <NA> NA NA
#> 46: <NA> <NA> NA NA
#> 47: <NA> <NA> NA NA
#> 48: <NA> <NA> NA NA
#> 49: <NA> <NA> NA NA
A second family of functions retrieve information pertaining to satellite and radar imagery.
get_available_imagery()
, which returns available
satellite imagery;get_satelllite_imagery()
which returns a
[terra::SpatRaster] or [stars] object as requested;get_available_radar()
, which returns available radar
images; andget_radar_imagery()
which returns radar images as a
[magick] object.{weatherOz} provides functionality to retrieve high-definition GeoTIFF satellite imagery provided by BOM through public FTP with the following types of imagery being available: i.) Infrared images, ii.) Visible images and iii.) Clouds/surface composite.
Valid BOM satellite Product IDs for GeoTIFF files include:
Product ID | Description | Type | Delete time |
---|---|---|---|
IDE00420 | AHI cloud cover only 2km FD GEOS | Satellite | 24 |
IDE00421 | AHI IR (Ch13) greyscale 2km FD GEOS | Satellite | 24 |
IDE00422 | AHI VIS (Ch3) greyscale 2km FD GEOS | Satellite | 24 |
IDE00423 | AHI IR (Ch13) Zehr 2km FD GEOS | Satellite | 24 |
IDE00425 | AHI VIS (true colour) / IR (Ch13 greyscale) composite 1km FD GEOS | Satellite | 24 |
IDE00426 | AHI VIS (true colour) / IR (Ch13 greyscale) composite 2km FD GEOS | Satellite | 24 |
IDE00427 | AHI WV (Ch8) 2km FD GEOS | Satellite | 24 |
IDE00430 | AHI cloud cover only 2km AUS equirect. | Satellite | 24 |
IDE00431 | AHI IR (Ch13) greyscale 2km AUS equirect. | Satellite | 24 |
IDE00432 | AHI VIS (Ch3) greyscale 2km AUS equirect. | Satellite | 24 |
IDE00433 | AHI IR (Ch13) Zehr 2km AUS equirect. | Satellite | 24 |
IDE00435 | AHI VIS (true colour) / IR (Ch13 greyscale) composite 1km AUS equirect. | Satellite | 24 |
IDE00436 | AHI VIS (true colour) / IR (Ch13 greyscale) composite 2km AUS equirect. | Satellite | 24 |
IDE00437 | AHI WV (Ch8) 2km AUS equirect. | Satellite | 24 |
IDE00439 | AHI VIS (Ch3) greyscale 0.5km AUS equirect. | Satellite | 24 |
Information gathered from Australian Bureau of Meteorology (BOM) |
get_available_imagery()
only takes one argument,
product_id
, a BOM identifier for the imagery that you wish
to check for available imagery. Using this function will fetch a listing
of BOM GeoTIFF satellite imagery from ftp://ftp.bom.gov.au/anon/gen/gms/
to display which files are currently available for download. These files
are available at ten minute update frequency with a 24 hour delete time.
This function can be used see the most recent files available and then
specify in the _imagery()
function. If no valid Product ID
is supplied, defaults to all GeoTIFF images currently available.
library(weatherOz)
(avail <- get_available_imagery(product_id = "IDE00425"))
#> [1] "IDE00425.202502240410.tif" "IDE00425.202502240420.tif" "IDE00425.202502240430.tif" "IDE00425.202502240440.tif"
#> [5] "IDE00425.202502240450.tif" "IDE00425.202502240500.tif" "IDE00425.202502240510.tif" "IDE00425.202502240520.tif"
#> [9] "IDE00425.202502240530.tif" "IDE00425.202502240540.tif" "IDE00425.202502240550.tif" "IDE00425.202502240600.tif"
#> [13] "IDE00425.202502240610.tif" "IDE00425.202502240620.tif" "IDE00425.202502240630.tif" "IDE00425.202502240640.tif"
#> [17] "IDE00425.202502240720.tif" "IDE00425.202502240730.tif" "IDE00425.202502240740.tif" "IDE00425.202502240750.tif"
#> [21] "IDE00425.202502240800.tif" "IDE00425.202502240810.tif" "IDE00425.202502240830.tif" "IDE00425.202502240840.tif"
#> [25] "IDE00425.202502240850.tif" "IDE00425.202502240900.tif" "IDE00425.202502240910.tif" "IDE00425.202502240920.tif"
#> [29] "IDE00425.202502240930.tif" "IDE00425.202502240940.tif" "IDE00425.202502240950.tif" "IDE00425.202502241000.tif"
#> [33] "IDE00425.202502241010.tif" "IDE00425.202502241020.tif" "IDE00425.202502241030.tif" "IDE00425.202502241040.tif"
#> [37] "IDE00425.202502241050.tif" "IDE00425.202502241100.tif" "IDE00425.202502241110.tif" "IDE00425.202502241120.tif"
#> [41] "IDE00425.202502241130.tif" "IDE00425.202502241140.tif" "IDE00425.202502241150.tif" "IDE00425.202502241200.tif"
#> [45] "IDE00425.202502241210.tif" "IDE00425.202502241220.tif" "IDE00425.202502241230.tif" "IDE00425.202502241240.tif"
#> [49] "IDE00425.202502241250.tif" "IDE00425.202502241300.tif" "IDE00425.202502241310.tif" "IDE00425.202502241320.tif"
#> [53] "IDE00425.202502241330.tif" "IDE00425.202502241340.tif" "IDE00425.202502241350.tif" "IDE00425.202502241400.tif"
#> [57] "IDE00425.202502241410.tif" "IDE00425.202502241420.tif" "IDE00425.202502241430.tif" "IDE00425.202502241450.tif"
#> [61] "IDE00425.202502241500.tif" "IDE00425.202502241510.tif" "IDE00425.202502241520.tif" "IDE00425.202502241530.tif"
#> [65] "IDE00425.202502241540.tif" "IDE00425.202502241550.tif" "IDE00425.202502241600.tif" "IDE00425.202502241610.tif"
#> [69] "IDE00425.202502241620.tif" "IDE00425.202502241630.tif" "IDE00425.202502241640.tif" "IDE00425.202502241650.tif"
#> [73] "IDE00425.202502241700.tif" "IDE00425.202502241710.tif" "IDE00425.202502241720.tif" "IDE00425.202502241730.tif"
#> [77] "IDE00425.202502241740.tif" "IDE00425.202502241750.tif" "IDE00425.202502241800.tif" "IDE00425.202502241810.tif"
#> [81] "IDE00425.202502241830.tif" "IDE00425.202502241840.tif" "IDE00425.202502241850.tif" "IDE00425.202502241900.tif"
#> [85] "IDE00425.202502241910.tif" "IDE00425.202502241920.tif" "IDE00425.202502241930.tif" "IDE00425.202502241940.tif"
#> [89] "IDE00425.202502241950.tif" "IDE00425.202502242000.tif" "IDE00425.202502242010.tif" "IDE00425.202502242020.tif"
#> [93] "IDE00425.202502242030.tif" "IDE00425.202502242040.tif" "IDE00425.202502242050.tif" "IDE00425.202502242100.tif"
#> [97] "IDE00425.202502242110.tif" "IDE00425.202502242120.tif" "IDE00425.202502242130.tif" "IDE00425.202502242140.tif"
#> [101] "IDE00425.202502242150.tif" "IDE00425.202502242200.tif" "IDE00425.202502242210.tif" "IDE00425.202502242220.tif"
#> [105] "IDE00425.202502242240.tif" "IDE00425.202502242250.tif" "IDE00425.202502242300.tif" "IDE00425.202502242310.tif"
#> [109] "IDE00425.202502242320.tif" "IDE00425.202502242330.tif" "IDE00425.202502242340.tif" "IDE00425.202502242350.tif"
#> [113] "IDE00425.202502250000.tif" "IDE00425.202502250040.tif" "IDE00425.202502250050.tif" "IDE00425.202502250100.tif"
#> [117] "IDE00425.202502250110.tif" "IDE00425.202502250130.tif" "IDE00425.202502250140.tif" "IDE00425.202502250150.tif"
#> [121] "IDE00425.202502250200.tif" "IDE00425.202502250210.tif" "IDE00425.202502250220.tif" "IDE00425.202502250230.tif"
#> [125] "IDE00425.202502250250.tif" "IDE00425.202502250300.tif" "IDE00425.202502250310.tif" "IDE00425.202502250320.tif"
#> [129] "IDE00425.202502250330.tif" "IDE00425.202502250340.tif" "IDE00425.202502250350.tif" "IDE00425.202502250400.tif"
#> [133] "IDE00425.202502250410.tif" "IDE00425.202502250420.tif" "IDE00425.202502250430.tif" "IDE00425.202502250440.tif"
#> [137] "IDE00425.202502250450.tif" "IDE00425.202502250500.tif"
get_satellite_imagery()
fetches BOM satellite GeoTIFF
imagery, returning a SpatRaster object and takes two arguments. Files
are available at ten minute update frequency with a 24 hour delete time.
It is suggested to check file availability first by using
get_available_imagery()
. The arguments are:
product_id
, a character value of the BOM product ID
to download. Alternatively, a vector of values from
get_available_imagery()
may be used here. This argument is
mandatory.
scans
a numeric value for the number of scans to
download, starting with the most recent and progressing backwards,
e.g., 1
- the most recent single scan available ,
6
- the most recent hour available, 12
- the
most recent 2 hours available, etc. Negating will return the oldest
files first. Defaults to 1. This argument is optional.
{weatherOz} provides functionality to retrieve the latest radar imagery provided by BOM through a public FTP server. These are the latest snapshots for each radar locations at various radar ranges e.g., 512km, 256km, 128km and 64km for some stations.
get_available_radar()
fetches the available radar
imagery from the BOM FTP and returns a data frame for reference. This
data frame contains the product_id, which is required when using the
get_radar_imagery()
function. The files available are the
latest .png
files of BOM radar imagery which are typically
updated each 6-10 minutes. Only the most recent image is retrieved for
each radar location. There are usually several radar ranges available
for each radar location, such as 512km, 256km, 128km and possibly 64km.
The arguments are:
radar_id
which is the BOM radar ID number; this
defaults to ‘all’ which will return a data frame of all radar IDs in
Australia.library(weatherOz)
x <- get_available_radar()
head(x)
#> product_id LocationID range Name Longitude Latitude Radar_id Full_Name IDRnn0name IDRnn1name State
#> <char> <char> <char> <fctr> <num> <num> <int> <fctr> <fctr> <fctr> <fctr>
#> 1: IDR641 64 512km Adelaide 138.4689 -34.6169 64 Adelaide (Buckland Park) BuckPk BucklandPk SA
#> 2: IDR642 64 256km Adelaide 138.4689 -34.6169 64 Adelaide (Buckland Park) BuckPk BucklandPk SA
#> 3: IDR643 64 128km Adelaide 138.4689 -34.6169 64 Adelaide (Buckland Park) BuckPk BucklandPk SA
#> 4: IDR644 64 64km Adelaide 138.4689 -34.6169 64 Adelaide (Buckland Park) BuckPk BucklandPk SA
#> 5: IDR311 31 512km Albany 117.8163 -34.9418 31 Albany Albany Albany WA
#> 6: IDR312 31 256km Albany 117.8163 -34.9418 31 Albany Albany Albany WA
#> Type Group_ Status Archive as.is
#> <fctr> <fctr> <fctr> <fctr> <lgcl>
#> 1: Doppler Yes Public BuckPk TRUE
#> 2: Doppler Yes Public BuckPk TRUE
#> 3: Doppler Yes Public BuckPk TRUE
#> 4: Doppler Yes Public BuckPk TRUE
#> 5: Doppler Yes Public Albany TRUE
#> 6: Doppler Yes Public Albany TRUE
get_radar_imagery()
fetches the latest BOM radar imagery
for a given product ID. The files available are the latest
.png
files of BOM radar imagery, which are typically
updated each 6-10 minutes. Only the most recent image is retrieved for
each radar location. There are usually several radar ranges available
for each radar location, such as 512km, 256km, 128km and possibly 64km.
The only argument is:
product_id
the BOM product_id associated with each
radar imagery file. These can be obtained from the
get_available_radar()
function. This value must be
specified and the function will accept only one at a time.Australian Bureau of Meteorology (BOM) Weather Data Services
Australian Bureau of Meteorology (BOM) FTP Public Products
Australian Bureau of Meteorology (BOM) Weather Data Services Observation of Rainfall
Australian Bureau of Meteorology (BOM) High-definition satellite images
The functions, get_precis_forecast()
or
`parse_precis_forecast(), will return a data frame of the 7 day short
forecast with the following fields:
start_time_local
and
end_time_local
The output of get_coastal_forecast()
or
parse_coastal_forecast()
will return a data frame with
coastal waters forecast values of each area within the given state with
the following fields:
start_time_local
and
end_time_local