Introduction

WindBorne is a pip installable library built to interact with Data and Forecasts APIs.

WindBorne uses API keys to authenticate API requests. If an API request is not properly authenticated, it will fail. To get an API key, email data@windbornesystems.com.

In order to authenticate with the api, you must set the following environment variables:

  1. WB_CLIENT_ID
  2. WB_API_KEY
On unix systems (mac and linux), you can add these to your shell configuration file (e.g. ~/.bashrc, ~/.bash_profile, ~/.zshrc). On windows, you can set these as user environment variables. See the instructions on the right for examples of how to do this.

Need access?

Email data@windbornesystems.com
Installation
Bash
Set Credentials on mac and linux
Bash
Set Credentials on windows

get_point_forecasts

This function gets the forecast at a given point or set of points. This runs WindBorne's custom point forecasting model, making it more accurate than simple interpolation of the gridded output.

It returns a custom points response.

It accepts the following parameters:

NameTypeDescription
coordinatesstringA list of coordinates. This may be a list of latitude,longitude tuples, eg [(37, -121), (40.3, -100)], or a string with coordinates separated by semicolons, eg 37,-121;40.3,-100
min_forecast_timestringOptional. An ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the minimum forecast time to calculate point forecasts for.
max_forecast_timestringOptional. An ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the maximum forecast time to calculate point forecasts for.
min_forecast_hourintegerOptional. The minimum forecast hour to calculate point forecasts for.
max_forecast_hourintegerOptional. The maximum forecast hour to calculate point forecasts for.
initialization_timestringOptional. An ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the time at which the forecast was made. This looks solely at the date and the hour; minutes and seconds are discarded. If nothing is provided, the latest forecast is used.

Available initialization times for point forecasts can be found using get_initialization_times.
output_filestringOptional. If provided, the response data will be saved to this file. The file extension determines the format: .csv or .json.
print_responsebooleanOptional. If true, the response data will be printed to stdout. Default is false.

Example
Python

get_initialization_times

This function retrieves which initialization times are available in the API for generating point forecasts. It accepts no parameters.

It returns the following:

NameTypeDescription
available[string]An array of ISO8601 timestamps of available initialization times for point forecasts, ordered from newest to oldest.
lateststringThe ISO8601 timestamp of latest available initialization time for point forecasts.

Example
Python

get_forecast_hours

This function allows getting the available forecast hours for different model initialization times. This may include initialization times that are not included in the get_initialization_times function, representing forecasts that are still in the process of being generated.

It can optionally accept the following parameters:

NameTypeDescription
ensemble_memberstring or numberThe ensemble member to get forecast hours for. Can be mean or a number between 1 and 25. Cannot be used with intracycle. Defaults to main deterministic run if not specified.
intracyclebooleanWhether to return forecast hours for our intracycle model. This model comes out several hours before the main model or other models like GFS and ECMWF, and can give a directional signal on how the forecast is likely to evolve. Defaults to false. Cannot be used with ensemble_member.

It returns a dictionary where:

NameTypeDescription
keystring (ISO8601 timestamp)An initialization time for which forecast hours are available.
value[integer]An array of available forecast hours for that specific initialization time.

Example Usage
Python
Example Output Snippet

get_gridded_forecast

This function downloads gridded forecast data to a specified NetCDF file. It can fetch either the latest available forecast for a specific time, or a historical forecast based on initialization time and forecast hour.

Variable Specification:The variable parameter determines which data is fetched. It can be specified in several ways:

  • 'FULL': Downloads all available variables at all pressure levels.
  • 'surface_variable_name': Downloads a specific surface variable (e.g., 'temperature_2m', 'pressure_msl').
  • 'level/variable_name': Downloads a specific variable at a given pressure level (e.g., '500/temperature', '850/wind_v').
Refer to the API documentation for single gridded forecasts for a list of available variables.

Parameters:

NameTypeDescription
variablestringSpecifies the forecast variable(s) to download. See "Variable Specification" above.
output_filestringPath (including filename) where the NetCDF (.nc) file will be saved.
timestringThe time at which the forecast is valid (for latest forecasts). Formats: ISO 8601, YYYYMMDDHH, or YYYY-MM-DDTHH. Minutes/seconds are discarded. Cannot be used with initialization_time and forecast_hour.
initialization_timestringThe initialization time for the forecast (for historical forecasts). Formats: ISO 8601, YYYYMMDDHH, or YYYY-MM-DDTHH. Minutes/seconds are discarded. Must be used with forecast_hour. Cannot be used with time.
forecast_hourintegerNumber of hours from initialization_time for which to get the historical forecast. Must be used with initialization_time. Cannot be used with time.
ensemble_memberstring or numberOptional. The ensemble member to fetch. Can be 'mean' or a number (e.g., 1 to 25). Cannot be used with intracycle.
intracyclebooleanOptional. Set to True to use the intracycle forecast model. Defaults to False. Cannot be used with ensemble_member.

The function does not return any data directly but saves it to the specified output_file. It will print status messages to the console.

Example: Latest Full Forecast
Python
Example: Latest Surface Variable Forecast
Python
Example: Latest Upper-Level Ensemble Mean Forecast
Python
Example: Historical Forecast
Python

get_full_gridded_forecast

This command allows getting the full gridded output of global forecasts, including data for all variables at all levels. These outputs are saved as a netCDF (.nc) file.

If there is no forecast available within an hour of the requested time, a 404 status code will be displayed.

It returns a python response object with content being the bytes of the netcdf file. While we typically recommend using the output_file parameter, this can be used for custom handling of the response.

It accepts the following parameters:

NameTypeDescription
timestringAn ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the time for which to get the forecast. This looks solely at the date and the hour; minutes and seconds are discarded.
output_filestringPath to save the file.

EXAMPLE
Python

get_temperature_2m

This function allows getting the gridded output of global 2m temperature forecasts. These outputs are saved as a netCDF (.nc) file.

If there is no forecast available within an hour of the requested time, a 404 status code will be displayed.

It returns a python response object with content being the bytes of the netcdf file. While we typically recommend using the output_file parameter, this can be used for custom handling of the response.

It accepts the following parameters:

NameTypeDescription
timestringAn ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the time for which to get the forecast. This looks solely at the date and the hour; minutes and seconds are discarded.
output_filestringPath to save the file.

EXAMPLE
Python

get_wind_u_10m

This function allows getting the gridded output of global 10m u-component of wind forecasts. These outputs are saved as a netCDF (.nc) file.

If there is no forecast available within an hour of the requested time, a 404 status code will be displayed.

It returns a python response object with content being the bytes of the netcdf file. While we typically recommend using the output_file parameter, this can be used for custom handling of the response.

It accepts the following parameters:

NameTypeDescription
timestringAn ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the time for which to get the forecast. This looks solely at the date and the hour; minutes and seconds are discarded.
output_filestringPath to save the file.

EXAMPLE
Python

get_wind_v_10m

This function allows getting the gridded output of global 10m v-component of wind forecasts. These outputs are saved as a netCDF (.nc) file.

If there is no forecast available within an hour of the requested time, a 404 status code will be displayed.

It returns a python response object with content being the bytes of the netcdf file. While we typically recommend using the output_file parameter, this can be used for custom handling of the response.

It accepts the following parameters:

NameTypeDescription
timestringAn ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the time for which to get the forecast. This looks solely at the date and the hour; minutes and seconds are discarded.
output_filestringPath to save the file.

EXAMPLE
Python

get_pressure_msl

This function allows getting the gridded output of global mean sea level pressure forecasts. These outputs are saved as a netCDF (.nc) file.

If there is no forecast available within an hour of the requested time, a 404 status code will be displayed.

It returns a python response object with content being the bytes of the netcdf file. While we typically recommend using the output_file parameter, this can be used for custom handling of the response.

It accepts the following parameters:

NameTypeDescription
timestringAn ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the time for which to get the forecast. This looks solely at the date and the hour; minutes and seconds are discarded.
output_filestringPath to save the file.

EXAMPLE
Python

get_500hpa_temperature

This function allows getting the gridded output of global 500hPa temperature forecasts. These outputs are saved as a netCDF (.nc) file.

If there is no forecast available within an hour of the requested time, a 404 status code will be displayed.

It returns a python response object with content being the bytes of the netcdf file. While we typically recommend using the output_file parameter, this can be used for custom handling of the response.

It accepts the following parameters:

NameTypeDescription
timestringAn ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the time for which to get the forecast. This looks solely at the date and the hour; minutes and seconds are discarded.
output_filestringPath to save the file.

EXAMPLE
Python

get_850hpa_temperature

This function allows getting the gridded output of global 850hPa temperature forecasts. These outputs are saved as a netCDF (.nc) file.

If there is no forecast available within an hour of the requested time, a 404 status code will be displayed.

It returns a python response object with content being the bytes of the netcdf file. While we typically recommend using the output_file parameter, this can be used for custom handling of the response.

It accepts the following parameters:

NameTypeDescription
timestringAn ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the time for which to get the forecast. This looks solely at the date and the hour; minutes and seconds are discarded.
output_filestringPath to save the file.

EXAMPLE
Python

get_500hpa_wind_u

This function allows getting the gridded output of global 500hPa u-component of wind forecasts. These outputs are saved as a netCDF (.nc) file.

If there is no forecast available within an hour of the requested time, a 404 status code will be displayed.

It returns a python response object with content being the bytes of the netcdf file. While we typically recommend using the output_file parameter, this can be used for custom handling of the response.

It accepts the following parameters:

NameTypeDescription
timestringAn ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the time for which to get the forecast. This looks solely at the date and the hour; minutes and seconds are discarded.
output_filestringPath to save the file.

EXAMPLE
Python

get_500hpa_wind_v

This function allows getting the gridded output of global 500hPa v-component of wind forecasts. These outputs are saved as a netCDF (.nc) file.

If there is no forecast available within an hour of the requested time, a 404 status code will be displayed.

It returns a python response object with content being the bytes of the netcdf file. While we typically recommend using the output_file parameter, this can be used for custom handling of the response.

It accepts the following parameters:

NameTypeDescription
timestringAn ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the time for which to get the forecast. This looks solely at the date and the hour; minutes and seconds are discarded.
output_filestringPath to save the file.

EXAMPLE
Python

historical_temperature_2m

This function allows getting the historical output of global 2m temperature forecasts. These outputs are saved as a netCDF (.nc) file.

If the requested forecast is not available, a 404 status code will be displayed.

It accepts the following parameters:

NameTypeDescription
initialization_timestringAn ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the time for which to get the forecast. This looks solely at the date and the hour; minutes and seconds are discarded.
forecast_hourintegerHow many hours after the run time the forecast is valid at.
output_filestringPath to save the file.

EXAMPLE
Python

historical_wind_u_10m

This function allows getting the historical output of global 10m u-component of wind forecasts. These outputs are saved as a netCDF (.nc) file.

If the requested forecast is not available, a 404 status code will be displayed.

It accepts the following parameters:

NameTypeDescription
initialization_timestringAn ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the time for which to get the forecast. This looks solely at the date and the hour; minutes and seconds are discarded.
forecast_hourintegerHow many hours after the run time the forecast is valid at.
output_filestringPath to save the file.

EXAMPLE
Python

historical_wind_v_10m

This function allows getting the historical output of global 10m v-component of wind forecasts. These outputs are saved as a netCDF (.nc) file.

If the requested forecast is not available, a 404 status code will be displayed.

It accepts the following parameters:

NameTypeDescription
initialization_timestringAn ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the time for which to get the forecast. This looks solely at the date and the hour; minutes and seconds are discarded.
forecast_hourintegerHow many hours after the run time the forecast is valid at.
output_filestringPath to save the file.

EXAMPLE
Python

historical_pressure_msl

This function allows getting the historical output of global mean sea level pressure forecasts. These outputs are saved as a netCDF (.nc) file.

If the requested forecast is not available, a 404 status code will be displayed.

It accepts the following parameters:

NameTypeDescription
initialization_timestringAn ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the time for which to get the forecast. This looks solely at the date and the hour; minutes and seconds are discarded.
forecast_hourintegerHow many hours after the run time the forecast is valid at.
output_filestringPath to save the file.

EXAMPLE
Python

historical_500hpa_temperature

This function allows getting the historical output of global 500hPa temperature forecasts. These outputs are saved as a netCDF (.nc) file.

If the requested forecast is not available, a 404 status code will be displayed.

It accepts the following parameters:

NameTypeDescription
initialization_timestringAn ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the time for which to get the forecast. This looks solely at the date and the hour; minutes and seconds are discarded.
forecast_hourintegerHow many hours after the run time the forecast is valid at.
output_filestringPath to save the file.

EXAMPLE
Python

historical_850hpa_temperature

This function allows getting the historical output of global 850hPa temperature forecasts. These outputs are saved as a netCDF (.nc) file.

If the requested forecast is not available, a 404 status code will be displayed.

It accepts the following parameters:

NameTypeDescription
initialization_timestringAn ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the time for which to get the forecast. This looks solely at the date and the hour; minutes and seconds are discarded.
forecast_hourintegerHow many hours after the run time the forecast is valid at.
output_filestringPath to save the file.

EXAMPLE
Python

historical_500hpa_wind_u

This function allows getting the historical output of global 500hPa u-component of wind forecasts. These outputs are saved as a netCDF (.nc) file.

If the requested forecast is not available, a 404 status code will be displayed.

It accepts the following parameters:

NameTypeDescription
initialization_timestringAn ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the time for which to get the forecast. This looks solely at the date and the hour; minutes and seconds are discarded.
forecast_hourintegerHow many hours after the run time the forecast is valid at.
output_filestringPath to save the file.

EXAMPLE
Python

historical_500hpa_wind_v

This function allows getting the historical output of global 500hPa v-component of wind forecasts. These outputs are saved as a netCDF (.nc) file.

If the requested forecast is not available, a 404 status code will be displayed.

It accepts the following parameters:

NameTypeDescription
initialization_timestringAn ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the time for which to get the forecast. This looks solely at the date and the hour; minutes and seconds are discarded.
forecast_hourintegerHow many hours after the run time the forecast is valid at.
output_filestringPath to save the file.

EXAMPLE
Python

Tropical Cyclones

This endpoint allows getting the predicted ground track of active tropical cyclones.

It accepts the following query string parameters:

NameTypeDescription
initialization_timestringOptional. An ISO 8601 date string, supporting formats YYYYMMDDHH, YYYY-MM-DDTHH, and YYYY-MM-DDTHH:mm:ss., representing the time at which the forecast was made. This looks solely at the date and the hour; minutes and seconds are discarded. If nothing is provided, the latest forecast is used.
basinstringOptional. A string indicating the tropical cyclones basins to be filtered in the response. If not set, all tropical cyclones will be included.
output_filestringOptional. Path to save the response data. If provided, saves the data in .json, .csv, .gpx, .geojson, .kml, .little_r format.

The basin parameter defines specific geographical regions where tropical cyclones are present:

NameTypeDescription
NAstringNorth Atlantic Basin spanning from African Coast (20°E) to 140°W and Equator to 90°N.
EPstringEastern Pacific Basin spanning from 140°W to 180°W and Equator to 90°N.
WPstringWestern Pacific Basin spanning from 100°E to 180°E and Equator to 60°N.
NIstringNorth Indian Ocean Basin spanning from 45°E to 100°E and Equator to 90°N.
SIstringSouth-West Indian Ocean Basin spanning from 20°E to 90°E and 40°S to Equator.
AUstringAustralian Region Basin spanning from 90°E to 160°E and 36°S to Equator.
SPstringSouth Pacific Basin spanning from 160°E to 120°W and 40°S to Equator.

It returns an object (dictionary) with keys being tropical cyclone IDs and values being arrays of ground track points. Each ground track point is of the form:

NameTypeDescription
latitudenumberThe latitude where the tropical cyclone is predicted to be
longitudenumberThe longitude where the tropical cyclone is predicted to be
timestringThe ISO8601 timestamp of when this forecast point is valid

Example
Python
Sample Response