Forecast API/Software?

Heya, I am curious how to create forecasts from the data that’s collected from the WF station(s), however I haven’t gotten too far with this yet.

Could someone advise if there is a API or software that could be used to create hyperlocal forecasts, based on the data collected by WF? I am assuming multiple data points are required and that would be fine as it’s a community project.

Any help would be much appreciated.

If it matters, we would like to keep the data private and use it solely for our own purposes.

1 Like

WXSim -


wxsim is provably the best solution for long term forecast however at a cost . what I have been using is a short term forecaster based on a script originally compiled by a guy called Buford T. Justice at

Ive spent over a year adapting this script and fine tuning it for this location here in Istanbul it is quite amazingly relatively accurate in terms predicting wind and cloud conditions .particularly the predicting of strong winds some 24-48 hours in advance .

I tend to view as using a traditional barometer analogue method ,when you understand the logic behind one of those you can see how this script works and produces a human readable output. I use it confidently now having made adjustments to the outputs based on the seasons we go through here , i would say 80-90% accurate in terms of short term forecasting.

i basically set it to run once every 8 hours it uses stored historical data from previous 24 hours therefore reflecting changes in pressure and temperature trends , and wind direction averages in that period.

its quite a complex script but incredibly useful and reliable once you made the adjustment to your particular location. its based on the original idea from way back in the 1940s .

Im not sure but correct me if I am wrong the software weather-display has this feature or the Zambretti forecast algorithm built in.

i think overall you need access to good historical models and compilers to get anything reliable beyond a 24-48 hour period… but both the sager and zambretti scripts use your actual station data . hope it is of use and good luck on your quest…brian

some reference here


how i use it on the website at



Hi Brian, thanks for sharing this. I’d never come across the Sager Forecast before, but it has made for some interesting reading!

One question. On your website, how do you get the cloud cover information? Is this something you measure, or do you get it from a larger scale forecast? I’m interested in using the algorithms for my own setup, but don’t know anything about the cloud cover!


when you say cloudcover do you mean the cloudbase gauge in the air quality pop module , if so its an old pilot aviation formula to determine an aprox cloud height based on realtime hardware data . again its a modified script from the cumulus forum . there is a wealth of hidden formulas on that forum so well,worth going through some of the threads on there. wherever possible i try to a oid using external data from other sites and try to use realtime hardware data however not always possible

i use it as a relative indicator not an accurate result but most of the time its pretty near the view outside the window,

here is the simple formula others also take in consideration of station ASL



i recall other scripts based solar sensor data but obviously after sunset there of no use .


Interesting! I’ll definitely check out the Cumulus forum. My question though was more to do with the Sager algorithm. How do you define whether it is Clear, Partly Cloudy, Mostly Overcast or Overcast, which seems to be a required input? (at least according to you second link:

you basically automatically take historical 24 hour data stored in this case for me i use mysql and also use current realtime data so when the script runs it looks for that data and genrates the outpt. important thing here is to create a stored method of data for the last 24 hours .

so if barometer was 1024.6 24 hours ago at the time the script runs and is now 1018.6 for example

same for wind direction, and so on… think like its a traditional barometer its looking for trends .

so for example its january and the pressure here is 1036.1 basically its cold and clear skies if the pressure was to rapidly drop and winds swing northerly with temperature and dewpoint falling then a change is imminent most likely snow or sleet its just one example of localized scenarios.

confused ? its a complex script of 100s or more scenarios



Would you mind putting together a quick tutorial on how you set it up? I currently have a 24-hour database of my Wx data and would like to add in a forecasting option.



nope there is no short write up i kind of reap the benefit of using meteobridge to do it all for me because its all automated in the background to run at 0800 1400 2000 hrs

you need to able to get

wind bearing direction average for last 12 hours in numbers
a barometer reading at 12 hours ago in mb
current barometer
current wind direction bearing
current temp
current month to determine season

you can set output to return in kmh,mph,kts,ms

script runs more accurately for me at 0800 1400 2000 most just run script once per day at 0600 hrs

i think use the link from above and study the info i took a few moths before I really understood it all and how to tweak it for reliable use

// ONLY CHANGE THIS IF ABSOLUTELY NECESSARY! Sometimes, depending on your location, a barometric pressure offset is needed if the wind is consistently being forecasted too high or too low. On Line 17 below, change 0 to 10 if the winds are being predicted too high or -10 if they are being predicted too low. If 10 is not enough, try 15 or 20. If 10 is too much, try 5. Barometric pressure is converted to hPa in these PHP Scripts. The number below simply adds or subtracts from the hPa barometric pressure:

$po =0;

// Coordinates:
$lt = $lat;
$lg = $lon;

// Temperature Information:
$tr = $weather[‘temp’];
$ts = ‘C’ ;

// Barometric pressure, trend, and unit used:
$bp = $weather[‘barometer’];
$bt = $weather[‘barotrend’];//trend 12 hours
$bu = $weather[“barometer_units”];

// Month Name to determine season:
$mn = date(‘F’);

// Wind Bearing:wind bearing now
$bd = $weather[‘wind_direction’];

// Average wind bearing from 12 hours ago and wind speed unit used:
$b6 = $weather[“wind_direction_avg”];
$wu = $weather[“wind_unit”];;// Can be entered manually as “km/h”, “kts”, “m/s”, or “mph”.
// End WEATHER34 Variables.


Thanks, I’ll look over the PHP and see where I can get…


id loved to help you but now is not good timing but if i can help out late June i sure will

I messaged Dark Sky and some other weather API services, none of them supports uploading your own data unfortunately.

Seems like DIY project, Weather34 - great work on your site! :slight_smile:

Does WF team have any plans to create open source forecasting project to support WF ecosystem?

1 Like

One of our medium-term goals is creating a better forecast for your location, using data from your station. Long-term, data from 1000’s of Smart Weather Stations will help improve forecasting in many areas. We have a strong internal modeling/forecasting group who are very excited about how all of this new data will help improve their models. I’m not sure if this effort will lend itself to an open-source project, but that would be fun if it could!


This is interesting, are you saying that forecasts will be available in the future for us to use? Or saying that data collected from our weather stations will be used by your team to generate forecasts to public?

He saying that the goal is to say Yes to both of your questions.

1 Like

Yes to both (eventually)!


I have been in touch with WXSIM developer, however it seems the software requires data in specific format.

Quote: What WXSIM (actually the data-reader module, WXSIMATE) wants to see is text data in either of three different formats (Weather Display, Cumulus, or Virtual Weather Station), or binary files from Davis WeatherLink.

Has anyone found a way or built a script that transforms WF data into one of the following formats?

@dsj Regarding using WF station data to your forecasts, I believe it’s only done from public stations? Or are you using the private station data as well?

Cos if we are looking to invest into 20 stations to build our private forecasts, if our data is used for another public forecast it doesn’t make it too attractive option for us.

Getting it to work… will publish my changes and suggestions for others this week.


Great! I’d be very interested to see how you get on :grinning: