weatherOz for BOM

Jonathan Carroll, Dean Marchiori, Paul Melloy, Mark Padgham, Hugh Parsonage, Keith Pembleton and Adam H. Sparks

Using {weatherOz} With BOM Data

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;

Using get_precis_forecast()

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().

Results

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.

Example 1: Getting a Forecast

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
#>      <fctr>     <char> <char>       <char>    <char>     <num>    <num> <num>
#>   1:      0   IDQ11295    QLD     Brisbane QLD_PT001 -27.48080 153.0389   8.1
#>   2:      1   IDQ11295    QLD     Brisbane QLD_PT001 -27.48080 153.0389   8.1
#>   3:      2   IDQ11295    QLD     Brisbane QLD_PT001 -27.48080 153.0389   8.1
#>   4:      3   IDQ11295    QLD     Brisbane QLD_PT001 -27.48080 153.0389   8.1
#>   5:      4   IDQ11295    QLD     Brisbane QLD_PT001 -27.48080 153.0389   8.1
#>  ---                                                                         
#> 787:      2   IDQ11295    QLD Port Douglas QLD_PT254 -16.48681 145.4635  70.4
#> 788:      3   IDQ11295    QLD Port Douglas QLD_PT254 -16.48681 145.4635  70.4
#> 789:      4   IDQ11295    QLD Port Douglas QLD_PT254 -16.48681 145.4635  70.4
#> 790:      5   IDQ11295    QLD Port Douglas QLD_PT254 -16.48681 145.4635  70.4
#> 791:      6   IDQ11295    QLD Port Douglas QLD_PT254 -16.48681 145.4635  70.4
#>         start_time_local end_time_local utc_offset      start_time_utc
#>                   <POSc>         <POSc>     <fctr>              <POSc>
#>   1: 2024-07-07 09:28:52     2024-07-08      10:00 2024-07-06 23:28:52
#>   2: 2024-07-08 00:00:00     2024-07-09      10:00 2024-07-07 14:00:00
#>   3: 2024-07-09 00:00:00     2024-07-10      10:00 2024-07-08 14:00:00
#>   4: 2024-07-10 00:00:00     2024-07-11      10:00 2024-07-09 14:00:00
#>   5: 2024-07-11 00:00:00     2024-07-12      10:00 2024-07-10 14:00:00
#>  ---                                                                  
#> 787: 2024-07-09 00:00:00     2024-07-10      10:00 2024-07-08 14:00:00
#> 788: 2024-07-10 00:00:00     2024-07-11      10:00 2024-07-09 14:00:00
#> 789: 2024-07-11 00:00:00     2024-07-12      10:00 2024-07-10 14:00:00
#> 790: 2024-07-12 00:00:00     2024-07-13      10:00 2024-07-11 14:00:00
#> 791: 2024-07-13 00:00:00     2024-07-14      10:00 2024-07-12 14:00:00
#>             end_time_utc minimum_temperature maximum_temperature
#>                   <POSc>               <num>               <num>
#>   1: 2024-07-07 14:00:00                  NA                  22
#>   2: 2024-07-08 14:00:00                  13                  21
#>   3: 2024-07-09 14:00:00                  13                  23
#>   4: 2024-07-10 14:00:00                  14                  24
#>   5: 2024-07-11 14:00:00                  12                  24
#>  ---                                                            
#> 787: 2024-07-09 14:00:00                  20                  27
#> 788: 2024-07-10 14:00:00                  19                  27
#> 789: 2024-07-11 14:00:00                  18                  27
#> 790: 2024-07-12 14:00:00                  18                  27
#> 791: 2024-07-13 14:00:00                  18                  27
#>      lower_precipitation_limit upper_precipitation_limit           precis
#>                          <num>                     <num>           <char>
#>   1:                         0                         1 Possible shower.
#>   2:                         0                         3   Shower or two.
#>   3:                         0                         7   Shower or two.
#>   4:                         0                         1  Cloud clearing.
#>   5:                        NA                        NA    Mostly sunny.
#>  ---                                                                     
#> 787:                         0                         4   Shower or two.
#> 788:                         0                         1 Possible shower.
#> 789:                         0                         1 Possible shower.
#> 790:                         0                         1   Partly cloudy.
#> 791:                        NA                        NA           Sunny.
#>      probability_of_precipitation
#>                             <num>
#>   1:                           40
#>   2:                           60
#>   3:                           70
#>   4:                           30
#>   5:                            5
#>  ---                             
#> 787:                           60
#> 788:                           40
#> 789:                           40
#> 790:                           30
#> 791:                           20

Using get_ag_bulletin()

get_ag_bulletin() only takes one argument, state. The state parameter allows the user to select the bulletin 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().

Results

The function, get_ag_bulletin(), will return a data frame of the agriculture bulletin for selected stations. See Appendix 3 for a full list and description of the fields and values.

Example 2: Getting an Ag Bulletin

Following is an example fetching the ag bulletin for Western Australia.

library(weatherOz)
(WA_bulletin <- get_ag_bulletin(state = "WA"))
#>   -----------  Australian Bureau of Meteorology (BOM) Ag Bulletin. -----------
#>   Please note information at the foot of
#>   <http://www.bom.gov.au/cgi-bin/wrap_fwo.pl?IDW65176.html>,
#>   the HTML version of Agricultural Observations Bulletin for 
#>   WA.  Also see 
#>   <http://www.bom.gov.au/catalogue/observations/about-agricultural.shtml>.
#>   ----------------------------------------------------------------------------  
#>     product_id  state         station   site      obs_time_local
#>         <fctr> <char>          <char> <fctr>              <POSc>
#>  1:   IDW65176     WA        Beverley  10515 2024-07-07 09:00:00
#>  2:   IDW65176     WA        Brookton  10524 2024-07-07 09:00:00
#>  3:   IDW65176     WA          Broome  03003 2024-07-07 09:00:00
#>  4:   IDW65176     WA       Carnarvon  06011 2024-07-07 09:00:00
#>  5:   IDW65176     WA      Donnybrook  09534 2024-07-07 09:00:00
#> ---                                                             
#> 28:   IDW65176     WA    Ravensthorpe  10633 2024-07-07 09:00:00
#> 29:   IDW65176     WA  Salmon Gums RS  12071 2024-07-07 09:00:00
#> 30:   IDW65176     WA       Wandering  10917 2024-07-07 09:00:00
#> 31:   IDW65176     WA Wongan Hills RS  08137 2024-07-07 09:00:00
#> 32:   IDW65176     WA            York  10311 2024-07-07 09:00:00
#>            obs_time_utc time_zone     r    tn    tx   twd    ev    tg    sn
#>                  <POSc>    <char> <num> <num> <num> <num> <num> <num> <num>
#>  1: 2024-07-07 01:00:00       WST   4.0   8.8  15.0   0.2    NA    NA    NA
#>  2: 2024-07-07 01:00:00       WST   2.0   6.0  15.0   0.6    NA    NA    NA
#>  3: 2024-07-07 01:00:00       WST   0.0  11.9  27.3   9.9    NA    NA    NA
#>  4: 2024-07-07 01:00:00       WST  21.8  15.9  24.4   0.0    NA    NA    NA
#>  5: 2024-07-07 01:00:00       WST    NA   6.0  16.9   0.3    NA    NA    NA
#> ---                                                                        
#> 28: 2024-07-07 01:00:00       WST   0.0   3.0  15.0   1.0    NA    NA    NA
#> 29: 2024-07-07 01:00:00       WST   0.0   6.2  15.9    NA    NA    NA    NA
#> 30: 2024-07-07 01:00:00       WST   1.8   7.9  13.6    NA    NA    NA    NA
#> 31: 2024-07-07 01:00:00       WST   8.8   8.0  16.6   0.2    NA     8    NA
#> 32: 2024-07-07 01:00:00       WST   5.7   7.5  17.0   0.7    NA    NA    NA
#>      solr    t5   t10   t20   t50   t1m    wr
#>     <num> <num> <num> <num> <num> <num> <num>
#>  1:   8.1    NA    NA    NA    NA    NA    NA
#>  2:   8.8    NA    NA    NA    NA    NA    NA
#>  3:  18.2    NA    NA    NA    NA    NA    NA
#>  4:  14.9    NA    NA    NA    NA    NA    NA
#>  5:   5.8    NA    NA    NA    NA    NA    NA
#> ---                                          
#> 28:  10.6    NA    NA    NA    NA    NA    NA
#> 29:  11.4    NA    NA    NA    NA    NA    NA
#> 30:   7.7    NA    NA    NA    NA    NA    NA
#> 31:   9.6    NA    NA    NA    NA    NA    NA
#> 32:   9.2    NA    NA    NA    NA    NA    NA

Using get_coastal_forecast()

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()

Results

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.

Example 3: Getting a Coastal Forecast

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
#>     <fctr>     <char> <char>     <char>
#>  1:   <NA>   IDQ11290   <NA>        QLD
#>  2:   <NA>   IDQ11290   <NA>        QLD
#>  3:   <NA>   IDQ11290   <NA>        QLD
#>  4:   <NA>   IDQ11290   <NA>        QLD
#>  5:      0   IDQ11290   <NA>        QLD
#> ---                                    
#> 45:      1   IDQ11290   <NA>        QLD
#> 46:      2   IDQ11290   <NA>        QLD
#> 47:      0   IDQ11290   <NA>        QLD
#> 48:      1   IDQ11290   <NA>        QLD
#> 49:      2   IDQ11290   <NA>        QLD
#>                                                          dist_name pt_1_name
#>                                                             <char>    <char>
#>  1:                                                     Queensland      <NA>
#>  2:                                 Queensland Gulf of Carpentaria      <NA>
#>  3:                                               North Queensland      <NA>
#>  4:                                               South Queensland      <NA>
#>  5: South East Gulf of Carpentaria: QLD-NT Border to Cape Keerweer      <NA>
#> ---                                                                         
#> 45:                Gold Coast Waters: Cape Moreton to Point Danger      <NA>
#> 46:                Gold Coast Waters: Cape Moreton to Point Danger      <NA>
#> 47:                             Great Barrier Reef Offshore Waters      <NA>
#> 48:                             Great Barrier Reef Offshore Waters      <NA>
#> 49:                             Great Barrier Reef Offshore Waters      <NA>
#>     pt_2_name       aac    start_time_local      end_time_local utc_offset
#>        <char>    <char>              <POSc>              <POSc>     <fctr>
#>  1:      <NA> QLD_FA001 2024-07-07 10:00:08 2024-07-07 10:00:08      10:00
#>  2:      <NA> QLD_FA002 2024-07-07 05:00:00 2024-07-07 05:00:00      10:00
#>  3:      <NA> QLD_FA003 2024-07-07 05:00:00 2024-07-07 05:00:00      10:00
#>  4:      <NA> QLD_FA004 2024-07-07 05:00:00 2024-07-07 05:00:00      10:00
#>  5:      <NA> QLD_MW001 2024-07-07 05:00:00 2024-07-07 05:00:00      10:00
#> ---                                                                       
#> 45:      <NA> QLD_MW014 2024-07-08 00:00:00 2024-07-08 00:00:00      10:00
#> 46:      <NA> QLD_MW014 2024-07-09 00:00:00 2024-07-09 00:00:00      10:00
#> 47:      <NA> QLD_MW015 2024-07-07 05:00:00 2024-07-07 05:00:00      10:00
#> 48:      <NA> QLD_MW015 2024-07-08 00:00:00 2024-07-08 00:00:00      10:00
#> 49:      <NA> QLD_MW015 2024-07-09 00:00:00 2024-07-09 00:00:00      10:00
#>          start_time_utc        end_time_utc
#>                  <POSc>              <POSc>
#>  1: 2024-07-07 10:00:08 2024-07-07 10:00:08
#>  2: 2024-07-07 05:00:00 2024-07-07 05:00:00
#>  3: 2024-07-07 05:00:00 2024-07-07 05:00:00
#>  4: 2024-07-07 05:00:00 2024-07-07 05:00:00
#>  5: 2024-07-07 05:00:00 2024-07-07 05:00:00
#> ---                                        
#> 45: 2024-07-08 00:00:00 2024-07-08 00:00:00
#> 46: 2024-07-09 00:00:00 2024-07-09 00:00:00
#> 47: 2024-07-07 05:00:00 2024-07-07 05:00:00
#> 48: 2024-07-08 00:00:00 2024-07-08 00:00:00
#> 49: 2024-07-09 00:00:00 2024-07-09 00:00:00
#>                                                          forecast_seas
#>                                                                 <char>
#>  1:                                                               <NA>
#>  2:                                                               <NA>
#>  3:                                                               <NA>
#>  4:                                                               <NA>
#>  5: 1 to 2 metres, decreasing to 1 to 1.5 metres during the afternoon.
#> ---                                                                   
#> 45:                                                    Around 1 metre.
#> 46:                                                     Below 1 metre.
#> 47:                                                   1.5 to 2 metres.
#> 48:                                                   1 to 1.5 metres.
#> 49: Around 1 metre, increasing to 1 to 1.5 metres north of Creal Reef.
#>                                                 forecast_weather
#>                                                           <char>
#>  1:                                                         <NA>
#>  2:                                                         <NA>
#>  3:                                                         <NA>
#>  4:                                                         <NA>
#>  5:                                               Partly cloudy.
#> ---                                                             
#> 45:                               Cloudy. 70% chance of showers.
#> 46: Cloudy. 90% chance of showers. The chance of a thunderstorm.
#> 47:                        Partly cloudy. 50% chance of showers.
#> 48:                                                Mostly sunny.
#> 49:                                                Mostly sunny.
#>                                                                                                                                                             forecast_winds
#>                                                                                                                                                                     <char>
#>  1:                                                                                                                                                                   <NA>
#>  2:                                                                                                                                                                   <NA>
#>  3:                                                                                                                                                                   <NA>
#>  4:                                                                                                                                                                   <NA>
#>  5: Easterly 15 to 20 knots, reaching up to 25 knots offshore north of Kowanyama early in the morning. Winds turning south to southeasterly 10 to 15 knots in the evening.
#> ---                                                                                                                                                                       
#> 45:                                                                                           Easterly 10 to 15 knots decreasing to about 10 knots in the early afternoon.
#> 46:                                                                                                                                          Northeasterly about 10 knots.
#> 47:                                                                                                                                               Easterly 20 to 25 knots.
#> 48:                                                                                                                                               Easterly 15 to 20 knots.
#> 49:                                                                                                                                  East to southeasterly 10 to 15 knots.
#>                                                                              forecast_swell1
#>                                                                                       <char>
#>  1:                                                                                     <NA>
#>  2:                                                                                     <NA>
#>  3:                                                                                     <NA>
#>  4:                                                                                     <NA>
#>  5:                                                             Northeasterly below 1 metre.
#> ---                                                                                         
#> 45:                     Easterly 1.5 metres inshore, increasing to 1.5 to 2 metres offshore.
#> 46:                     Easterly 1.5 metres inshore, increasing to 1.5 to 2 metres offshore.
#> 47:   Easterly 1 to 1.5 metres, increasing to 2 to 2.5 metres through the Capricorn Channel.
#> 48: Easterly 1 to 1.5 metres, increasing to 1.5 to 2.5 metres through the Capricorn Channel.
#> 49:   Easterly 1 to 1.5 metres, increasing to 1.5 to 2 metres through the Capricorn Channel.
#>               forecast_swell2 forecast_caution marine_forecast
#>                        <char>           <char>          <char>
#>  1:                      <NA>             <NA>            <NA>
#>  2:                      <NA>             <NA>            <NA>
#>  3:                      <NA>             <NA>            <NA>
#>  4:                      <NA>             <NA>            <NA>
#>  5:                      <NA>             <NA>            <NA>
#> ---                                                           
#> 45: Southerly around 1 metre.             <NA>            <NA>
#> 46: Southerly around 1 metre.             <NA>            <NA>
#> 47:                      <NA>             <NA>            <NA>
#> 48:                      <NA>             <NA>            <NA>
#> 49:                      <NA>             <NA>            <NA>
#>     tropical_system_location forecast_waves
#>                       <lgcl>         <lgcl>
#>  1:                       NA             NA
#>  2:                       NA             NA
#>  3:                       NA             NA
#>  4:                       NA             NA
#>  5:                       NA             NA
#> ---                                        
#> 45:                       NA             NA
#> 46:                       NA             NA
#> 47:                       NA             NA
#> 48:                       NA             NA
#> 49:                       NA             NA

Working with BOM Image Files

A second family of functions retrieve information pertaining to satellite and radar imagery.

Using {weatherOz} to retrieve BOM satellite imagery

{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.

Working with Satellite Imagery

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)

Using get_available_imagery()

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.

Example 4: Checking Available Imagery

library(weatherOz)

(avail <- get_available_imagery(product_id = "IDE00425"))
#>   [1] "IDE00425.202407060210.tif" "IDE00425.202407060220.tif"
#>   [3] "IDE00425.202407060230.tif" "IDE00425.202407060250.tif"
#>   [5] "IDE00425.202407060300.tif" "IDE00425.202407060310.tif"
#>   [7] "IDE00425.202407060320.tif" "IDE00425.202407060330.tif"
#>   [9] "IDE00425.202407060340.tif" "IDE00425.202407060350.tif"
#>  [11] "IDE00425.202407060400.tif" "IDE00425.202407060410.tif"
#>  [13] "IDE00425.202407060420.tif" "IDE00425.202407060430.tif"
#>  [15] "IDE00425.202407060440.tif" "IDE00425.202407060450.tif"
#>  [17] "IDE00425.202407060500.tif" "IDE00425.202407060510.tif"
#>  [19] "IDE00425.202407060520.tif" "IDE00425.202407060530.tif"
#>  [21] "IDE00425.202407060540.tif" "IDE00425.202407060550.tif"
#>  [23] "IDE00425.202407060600.tif" "IDE00425.202407060610.tif"
#>  [25] "IDE00425.202407060620.tif" "IDE00425.202407060630.tif"
#>  [27] "IDE00425.202407060640.tif" "IDE00425.202407060650.tif"
#>  [29] "IDE00425.202407060700.tif" "IDE00425.202407060710.tif"
#>  [31] "IDE00425.202407060720.tif" "IDE00425.202407060730.tif"
#>  [33] "IDE00425.202407060740.tif" "IDE00425.202407060750.tif"
#>  [35] "IDE00425.202407060800.tif" "IDE00425.202407060810.tif"
#>  [37] "IDE00425.202407060820.tif" "IDE00425.202407060830.tif"
#>  [39] "IDE00425.202407060840.tif" "IDE00425.202407060850.tif"
#>  [41] "IDE00425.202407060900.tif" "IDE00425.202407060910.tif"
#>  [43] "IDE00425.202407060920.tif" "IDE00425.202407060930.tif"
#>  [45] "IDE00425.202407060940.tif" "IDE00425.202407060950.tif"
#>  [47] "IDE00425.202407061000.tif" "IDE00425.202407061010.tif"
#>  [49] "IDE00425.202407061020.tif" "IDE00425.202407061030.tif"
#>  [51] "IDE00425.202407061040.tif" "IDE00425.202407061050.tif"
#>  [53] "IDE00425.202407061100.tif" "IDE00425.202407061110.tif"
#>  [55] "IDE00425.202407061120.tif" "IDE00425.202407061130.tif"
#>  [57] "IDE00425.202407061140.tif" "IDE00425.202407061150.tif"
#>  [59] "IDE00425.202407061200.tif" "IDE00425.202407061210.tif"
#>  [61] "IDE00425.202407061220.tif" "IDE00425.202407061230.tif"
#>  [63] "IDE00425.202407061240.tif" "IDE00425.202407061250.tif"
#>  [65] "IDE00425.202407061300.tif" "IDE00425.202407061310.tif"
#>  [67] "IDE00425.202407061320.tif" "IDE00425.202407061330.tif"
#>  [69] "IDE00425.202407061340.tif" "IDE00425.202407061350.tif"
#>  [71] "IDE00425.202407061400.tif" "IDE00425.202407061410.tif"
#>  [73] "IDE00425.202407061420.tif" "IDE00425.202407061430.tif"
#>  [75] "IDE00425.202407061450.tif" "IDE00425.202407061500.tif"
#>  [77] "IDE00425.202407061510.tif" "IDE00425.202407061520.tif"
#>  [79] "IDE00425.202407061530.tif" "IDE00425.202407061540.tif"
#>  [81] "IDE00425.202407061550.tif" "IDE00425.202407061600.tif"
#>  [83] "IDE00425.202407061610.tif" "IDE00425.202407061620.tif"
#>  [85] "IDE00425.202407061630.tif" "IDE00425.202407061640.tif"
#>  [87] "IDE00425.202407061650.tif" "IDE00425.202407061700.tif"
#>  [89] "IDE00425.202407061710.tif" "IDE00425.202407061720.tif"
#>  [91] "IDE00425.202407061730.tif" "IDE00425.202407061740.tif"
#>  [93] "IDE00425.202407061750.tif" "IDE00425.202407061800.tif"
#>  [95] "IDE00425.202407061810.tif" "IDE00425.202407061820.tif"
#>  [97] "IDE00425.202407061830.tif" "IDE00425.202407061840.tif"
#>  [99] "IDE00425.202407061850.tif" "IDE00425.202407061900.tif"
#> [101] "IDE00425.202407061910.tif" "IDE00425.202407061920.tif"
#> [103] "IDE00425.202407061930.tif" "IDE00425.202407061940.tif"
#> [105] "IDE00425.202407061950.tif" "IDE00425.202407062000.tif"
#> [107] "IDE00425.202407062010.tif" "IDE00425.202407062020.tif"
#> [109] "IDE00425.202407062030.tif" "IDE00425.202407062040.tif"
#> [111] "IDE00425.202407062050.tif" "IDE00425.202407062100.tif"
#> [113] "IDE00425.202407062110.tif" "IDE00425.202407062120.tif"
#> [115] "IDE00425.202407062130.tif" "IDE00425.202407062140.tif"
#> [117] "IDE00425.202407062150.tif" "IDE00425.202407062200.tif"
#> [119] "IDE00425.202407062210.tif" "IDE00425.202407062220.tif"
#> [121] "IDE00425.202407062230.tif" "IDE00425.202407062240.tif"
#> [123] "IDE00425.202407062250.tif" "IDE00425.202407062300.tif"
#> [125] "IDE00425.202407062310.tif" "IDE00425.202407062320.tif"
#> [127] "IDE00425.202407062330.tif" "IDE00425.202407062340.tif"
#> [129] "IDE00425.202407062350.tif" "IDE00425.202407070000.tif"
#> [131] "IDE00425.202407070010.tif" "IDE00425.202407070020.tif"
#> [133] "IDE00425.202407070030.tif" "IDE00425.202407070040.tif"
#> [135] "IDE00425.202407070050.tif" "IDE00425.202407070100.tif"
#> [137] "IDE00425.202407070110.tif" "IDE00425.202407070120.tif"
#> [139] "IDE00425.202407070130.tif" "IDE00425.202407070140.tif"
#> [141] "IDE00425.202407070150.tif" "IDE00425.202407070200.tif"
#> [143] "IDE00425.202407070210.tif" "IDE00425.202407070220.tif"
#> [145] "IDE00425.202407070230.tif" "IDE00425.202407070250.tif"
#> [147] "IDE00425.202407070300.tif"

Using get_satellite_imagery()

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.

Example 6: Fetching Satellite Imagery and Viewing It

library(weatherOz)

# Specify product ID and scans
i <- get_satellite_imagery(product_id = "IDE00425", scans = 1)

terra::plot() has been re-exported to simplify visualising these files while using {weatherOz}.

plot(i)

Using {weatherOz} With BOM Radar Imagery

{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.

Using get_available_radar()

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.

Example 7: Getting Available Radar Imagery

library(weatherOz)
x <- get_available_radar()
head(x)
#>    product_id LocationID  range     Name Longitude Latitude Radar_id
#>        <char>     <char> <char>   <fctr>     <num>    <num>    <int>
#> 1:     IDR641         64  512km Adelaide  138.4689 -34.6169       64
#> 2:     IDR642         64  256km Adelaide  138.4689 -34.6169       64
#> 3:     IDR643         64  128km Adelaide  138.4689 -34.6169       64
#> 4:     IDR644         64   64km Adelaide  138.4689 -34.6169       64
#> 5:     IDR311         31  512km   Albany  117.8163 -34.9418       31
#> 6:     IDR312         31  256km   Albany  117.8163 -34.9418       31
#>                   Full_Name IDRnn0name IDRnn1name  State    Type Group_ Status
#>                      <fctr>     <fctr>     <fctr> <fctr>  <fctr> <fctr> <fctr>
#> 1: Adelaide (Buckland Park)     BuckPk BucklandPk     SA Doppler    Yes Public
#> 2: Adelaide (Buckland Park)     BuckPk BucklandPk     SA Doppler    Yes Public
#> 3: Adelaide (Buckland Park)     BuckPk BucklandPk     SA Doppler    Yes Public
#> 4: Adelaide (Buckland Park)     BuckPk BucklandPk     SA Doppler    Yes Public
#> 5:                   Albany     Albany     Albany     WA Doppler    Yes Public
#> 6:                   Albany     Albany     Albany     WA Doppler    Yes Public
#>    Archive  as.is
#>     <fctr> <lgcl>
#> 1:  BuckPk   TRUE
#> 2:  BuckPk   TRUE
#> 3:  BuckPk   TRUE
#> 4:  BuckPk   TRUE
#> 5:  Albany   TRUE
#> 6:  Albany   TRUE

Using get_radar_imagery()

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.

Example 8: Fetching Radar Imagery

library(weatherOz)

y <- get_radar_imagery(product_id = "IDR032")
plot(y)

References

Australian Bureau of Meteorology (BOM) Weather Data Services

Australian Bureau of Meteorology (BOM) FTP Public Products

Australian Bureau of Meteorology (BOM) Weather Data Services Agriculture Bulletins

Australian Bureau of Meteorology (BOM) Weather Data Services Observation of Rainfall

Australian Bureau of Meteorology (BOM) High-definition satellite images

Appendix 1 - Output From get_precis_forecast()

The functions, get_precis_forecast() or `parse_precis_forecast(), will return a data frame of the 7 day short forecast with the following fields:

index
Forecast index number, 0 = current day … 7 day
product_id
BOM Product ID from which the data are derived
state
State name (postal code abbreviation)
town
Town name for forecast location
aac
AMOC Area Code, e.g., WA_MW008, a unique identifier for each location
lat
Latitude of named location (decimal degrees)
lon
Longitude of named location (decimal degrees)
elev
Elevation of named location (metres)
start_time_local
Start of forecast date and time in local TZ
end_time_local
End of forecast date and time in local TZ
UTC_offset
Hours offset from difference in hours and minutes from Coordinated Universal Time (UTC) for start_time_local and end_time_local
start_time_utc
Start of forecast date and time in UTC
end_time_utc
End of forecast date and time in UTC
maximum_temperature
Maximum forecast temperature (degrees Celsius)
minimum_temperature
Minimum forecast temperature (degrees Celsius)
lower_precipitation_limit
Lower forecast precipitation limit (millimetres)
upper_precipitation_limit
Upper forecast precipitation limit (millimetres)
precis
Précis forecast (a short summary, less than 30 characters)
probability_of_precipitation
Probability of precipitation (percent)

Appendix 2 - Output From get_ag_bulletin()

The functions, get_ag_bulletin() or `parse_ag_bulletin(), will return a data frame of the agriculture bulletin with the following fields:

product_id
BOM Product ID from which the data are derived
state
State name (postal code abbreviation)
dist
BOM rainfall district
name
Full station name (some stations have been retired so “station” will be same, this is the full designation
wmo
World Meteorological Organization number (unique ID used worldwide)
site
Unique BOM identifier for each station
station
Station name
obs-time-local
Observation time
obs-time-utc
Observation time (time in UTC)
time-zone
Time zone for observation
lat
Latitude (decimal degrees)
lon
Longitude (decimal degrees)
elev_m
Station elevation (metres)
bar_ht
Bar height (metres)
station
BOM station name
start
Year data collection starts
end
Year data collection ends (will always be current)
r
Rain to 9am (millimetres). Trace will be reported as 0.01
tn
Minimum temperature (degrees Celsius)
tx
Maximum temperature (degrees Celsius)
twd
Wet bulb depression (degrees Celsius)
ev
Evaporation (millimetres)
tg
Terrestrial minimum temperature (degrees Celsius)
sn
Sunshine (hours)
solr
Solar Radiation MJ/sq m
t5
5cm soil temperature (degrees Celsius)
t10
10cm soil temperature (degrees Celsius)
t20
20cm soil temperature (degrees Celsius)
t50
50cm soil temperature (degrees Celsius)
t1m
1m soil temperature (degrees Celsius)
wr
Wind run (kilometres)

Appendix 3 - Output From get_coastal_forecast()

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:

index
Forecast index number. 0 = current day
product_id
BOM Product ID from which the data are derived
type
Forecast Region type e.g. Coastal
state_code
State name (postal code abbreviation)
dist_name
Name of forecast district
pt_1_name
Start of forecast district
pt_2_name
End of forecast district
aac
AMOC Area Code, e.g., WA_MW008, a unique identifier for each location
start_time_local
Start of forecast date and time in local TZ
end_time_local
End of forecast date and time in local TZ
UTC_offset
Hours offset from difference in hours and minutes from Coordinated Universal Time (UTC) for start_time_local and end_time_local
start_time_utc
Start of forecast date and time in UTC
end_time_utc
End of forecast date and time in UTC
forecast_seas
Forecast sea conditions
forecast_weather
Forecast weather summary
forecast_winds
Forecast winds summary
forecast_swell1
Forecast primary swell summary
forecast_swell2
Forecast seondary swell summary (not always provided)
forecast_caution
Forecast caution issued (not always provided)
marine_forecast
Additional marine forecast warning information (not always provided)