-
Wetterstation
LiveAktuelle Daten Interaktive AnsichtenInteraktive Grafik Interaktive Tabelle Zusammenfassung der Intervalle BerichteBerichte TrendsTrends
-
Wetter
This document covers my setup to provide weather data gathered by meteobridge to my WXSIM instance.
WXSIM relies on current and historic weather data which can be fed in from different sources (like Cumulus or WeatherDispplay). Meteobridge doesn't have its own format, but can generate data through a template based system. To save space meteobridge is only holding minute-based data for maximum of two days - for older data on can only access hourly aggregated data. A related aspect is the amount of available data and Tom, the author of WXSIM , recommends at least 10-minute data to create proper forecast. Given that meteobridge stores mostly hourly data, exporting historic data isn't a real option.
It turns out that a reduced cumulus file format would do the job, since it's already supported by WXSIM and CSV generation can be achieved with the meteobridge template system.
WXSIM is able to use local precipitation data to improve the forecast accuracy. Tom stated that the data isn't strictly necessary, but highly recommended. Unfortunately total-sums aren't available when using the iteratative template expansion, so a simple export appending the current data to the data log doesn't work.
Right now I have a two-step setup to generate a cumulus style export file that WXSIM can read:
#if#{*[th0hum-avg5.0:]>0*}#then#[DD]/[MM]/[YY],[hh]:[mm],[th0temp-avg5.1:],[th0hum-avg5.0:],[th0dew-avg5.1:],[wind0wind-avg5=mph.1:],[wind0wind-max5=mph.1:],[wind0dir-avg5.0:],[rain0rate-avg5.1:],[rain0total-daysum.1:],[thb0seapress-avg5.1:],[rain0total-yearsum.1:],,,,,,,[sol0rad-avg5.0:],,#else##no data - [YY][MM][DD][hh][mm] #fi#
.txt
in your template directory and trigger the following event using this template.
#!/bin/sh
#
# Script to append log lines in cumulus format to a monthly log
CUMULUS_CURRENT_FILE="/tmp/mnt/data/html/cumulus_wxsim.cur"
if [ -f "$CUMULUS_CURRENT_FILE" ]; then
CUMULUS_MONTHLY_FILE="/tmp/mnt/data/export/`date '+%b%y'`log.txt"
# Append current line and drop invalid lines
CURRENT_DATA=$(cat $CUMULUS_CURRENT_FILE | grep -v "no data" | grep -v ",,,,,,,,,")
if [[ ! -z "$CURRENT_DATA" ]]; then
printf "$CURRENT_DATA\r\n" >> $CUMULUS_MONTHLY_FILE
fi
rm $CUMULUS_CURRENT_FILE
else
echo "$CUMULUS_CURRENT_FILE doesn't exist"
fi
exit 0
One could easily adjust the script to do some more sofisticated error handling.
/tmp/mnt/data/scripts/wxsim.sh
) is executable. You may need to ssh into your meteobridge and run chmod u+x wxsim.sh
.
\\meteobridge\data\export
or the corresponding path with a mapped drive as the `Local station data directory`
mi/hr
[DD]/[MM]/[YY],[hh]:[mm],[th0temp-avg.1:],[th0hum-avg.0:],[th0dew-avg.1:],[wind0wind-avg=mph.1:],[wind0wind-max=mph.1:],[wind0dir-avg.0:],[rain0rate-avg.1:],[rain0total-daysum.1:],[thb0seapress-avg.1:],[rain0total-yearsum.1:],,,,,,,[sol0rad-avg.0:],,
Save it with the extension .exp
in template directory and export at least hourly data for the current and last month using this template. Don't forget to rename the generated files properly.
In case you don't have or want precipitaion data in the log files you can use a single event the append data to a monthly log
#pragma exportfile=[MMM].[YY]log.txt
#pragma append=y
#pragma emptylines=n
#pragma crlf=y
#if#{*[th0hum-avg5.0:]>0*}#then#[DD]/[MM]/[YY],[hh]:[mm],[th0temp-avg5.1:],[th0hum-avg5.0:],[th0dew-avg5.1:],[wind0wind-avg5=mph.1:],[wind0wind-max5=mph.1:],[wind0dir-avg5.0:],[rain0rate-avg5.1:],,[thb0seapress-avg5.1:],,,,,,,,[sol0rad-avg5.0:],,#else##no data - [YY][MM][DD][hh][mm] #fi#
.exp
and put it in your template folder
![]() |
![]() |
|||
![]() |
![]() |
|||
![]() |
![]() |