station_code: A character string or factor from get_stations_metadata() of the BOM station code for the station of interest.
start_date: A character string or Date object representing the beginning of the range to query in the format yyyy-mm-dd
(ISO8601). Data returned is inclusive of this date.
end_date: A character string or Date object representing the end of the range query in the format yyyy-mm-dd (ISO8601). Data returned is inclusive of this date. Defaults to the current system date.
api_key: A character string containing your API key from DPIRD , https://www.dpird.wa.gov.au/online-tools/apis/, for the DPIRD Weather 2.0 API . Defaults to automatically detecting your key from your local .Renviron, .Rprofile or similar. Alternatively, you may directly provide your key as a string here. If nothing is provided, you will be prompted on how to set up your session so that it is auto-detected.
To save met objects the apsimx::write_apsim_met() is reexported. Note that when saving, comments from SILO will be included, but these will not be printed as a part of the resulting met object in your session.
Examples
## Not run:# Get an APSIM format object for Binnu# Note that you need to supply your own API keywd <- get_dpird_apsim( station_code ="BI", start_date ="20220101", end_date ="20221231", api_key ="your_api_key")## End(Not run)