Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "forecast"

Request forecast information for a given city and province from W.I.S.E. Builder. Forecast information is pulled from Environment Canada.

Example

//populate the calculator with some example values
let calculator = new ForecastCalculator();
calculator.province = "AB";
calculator.city = "Calgary";
calculator.model = "GEM_DETER";
calculator.date = "2019-01-01";
calculator.timezone = 13; //index retrieved from the Timezone class in wiseGlobals.js
calculator.time = "00Z"; //00Z for the midnight forecast, 12Z for the noon forecast
calculator.forecastType = "hour"; //hour for hourly forecast, day for daily forecast
await calculator.fetchForecastPromise();
//********** the calculator will now contain an array of forecasts for different hours/days. ****************

Index