Forecast: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
(Initial edit)
(No difference)

Revision as of 10:42, 25 March 2021

Introduction

CumulusUtils has a minimal forcast module. Every weathersite must have some kind of forecasting so the choice has been made to take four different existing possibilities and present the forecast of the users choice. It is not a true forecasting system.

Operation

This module is included in the website. When needed as a single output the following command is given:

   utils/bin/cumulusutils.exe Forecast

Output

The output is the file: forecast.txt

Inifile parameters

   [Forecasts]
   ForecastSystem=SpotWx (default, other possibilities: Yourweather, Norway, WxSim)
   SevenDayPredictionURL=
   NorwegianURL=
   WXsimURL=

SpotWx

When setting the ForecastSystem to SpotWx, the prediction for the latitude and longitude of the station is fetched and displayed in an iframe.
The iframe is formed as: <iframe src='{SpotwxPredictionURL}' frameborder='0' style='border: 0; width:100%; height: 75vh;'></iframe> and written to the output file.

Yourwether

When setting the ForecastSystem to Yourweather, the user must have:

  1. Go to yourweather.co.uk
  2. Scroll down until you see (in a bordered block): “API - Access to xml”;
  3. Click on it, register, and follow the instructions;
  4. Once on the API page, choose your location;
  5. Choose the XML API, address 1: “Address 1: XML file with the 7-day forecast and general daily information”;
  6. Fill in that link, in the cumlusutils.ini for the parameter: SevenDayPredictionURL. In the section [Forecast]. You may have to run CumulusUtils with the argument Forecast one time to see that parameter.

When CumulusUtils is run with the argument forecast, it fetched the corresponding XML with the ECMWF model forecast and reworks that into a table and written to the outputfile. The icons the user installed in CUicons are used.

Norway