This document explains how to access the Point Weather Forecast (derived from BoM's ADFD - Australian Digital Forecast Database) data in Senaps. In particular this document focuses on using the THREDDS Data Manager (TDM) API in Senaps to extract specific point locations and return the data as JSON time series.
- Senaps authorisation and license agreement. You must have Senaps credentials which have access to the ADFD data within Senaps. You can purchase a subscription through our Ag Climate Data Shop
- An Understanding of how BoM ADFD data is structured. Please see the BoM ADFD User Guide document for details.
Please refer to the shop Terms and Conditions for specific terms relating to accessing ADFD data.
Senaps provides an API called TDM (THREDDS Data Manager) which allows for extracting point (longitude, latitude) location forecasts for ADFD data, sometimes referred to as 'drilling' the dataset.
TDM is a REST API with JSON encoded responses.
Senaps provides a drill operation as part of the TDM API to provide an easy to use end-point for drilling gridded datasets.
ADFD in Senaps
Currently the ADFD data is being synchronised from the BoM twice daily at 00:00Z (10am AEST) and 12:00Z (10pm AEST).
The latest set of files will always be available in our THREDDS data server catalog at consistent URLs.
The listing of latest files is available as a web page:
and also as an XML catalog:
Drilling ADFD - Example Test
As an example, we can use the interactive API documentation to test the drill operation.
The TDM drill API operation is documented here: https://senaps.io/api-docs/#/. To access the correct API select THREDDS Data Manager API from the drop down box, enter your credentials (username + password or apikey) and select 'explore', and then click 'operations' to see the list of API endpoints.
Expand the GET /drill operation, by clicking on the 'GET' button, which allows you to interactively drill the time series for a given location for a given variable. Optionally, temporal constraints can be applied.
I.e. if we want to drill the MaxT_SFC variable we need to:
Step 1: Find the dataset path of the latest MaxT ADFD forecast.
- Look in the ADFD latest catalog (https://senaps.io/thredds/catalog/org_catalogs/csiro/BoM_ADFD/latest/catalog.html)
- select the file/variable of interest
- the dataset path is the shown in the URL: in this case: /csiro/BoM_ADFD/latest/IDZ71002_AUS_MaxT_SFC.nc
- Note these dataset paths are persistent and should not change.
Step 2: Once you have your dataset path of you can query the drill API
Having previously expanded the GET /drill operation you can now enter the parameters to drill the time series for a given location for a given variable.
Fill in the mandatory path, longitude, latitude and variable fields as shown below (temporal constraints can optionally be applied).
- full dataset path from above is /csiro/BoM_ADFD/latest/IDZ71002_AUS_MaxT_SFC.nc
- as the BoM ADFD data set has one variable per file the variable name can be derived from the file name - the bit between the "_AUS_" and the ".nc" i.e. in this case it is MaxT_SFC. The one exception is the HazWind file who's variable name is HWA_SFC. The variable names are described in detail in the BoM ADFD user guide (http://www.bom.gov.au/catalogue/adfdUserGuide.pdf).
Step 3: Execute request
The final request with authentication and parameters will look similar to below - the values for the slices at the nearest grid cell are contained in the 'results' array. The values are extracted directly from the netCDF file and are not manipulated at all by the drill operation.
Click on the 'Try it out!' button to execute the request.
If the request is successful the status code will be 200 and the response will contain the JSON encoded response similar to
Directly using the API endpoint:
(Most of this can be deduced from the API Docs example above.)
a. The URL for the request is https://senaps.io/tdm/drill
b. The request method is GET
c. Every request needs authenticating. Which can either be done either with a URL parameter API key, or a HTTP header API key or a HTTP Basic auth username and password. eg '&apikey=.....'
d. Example parameters can be seen in the api-docs and the above example.
The equivalent call to above is:
The 'Try it out!' functionality in the API Docs also provides examples of making the API calls using the common command line tool curl.
API fair usage limits
To maintain quality and low cost service the ADFD-P product includes a fair use policy for API requests.
A single subscription of the ADFD-P product entitles the subscriber to 1000 requests per day to the TDM /drill end-point described in this document.
Please contact the Ag Climate Data Shop to discus options for higher usage.