Variable: Abweichung Tagesmitteltemperatur zum Monatsmittel
Verfasst: 07 Nov 2014 17:56
Um zu berechnen wie sich die Temperatur des aktuelle Tages zum langjähren Monatsmittel verhält, habe ich folgende Variable gebastelt:
Es wird automatisch der jeweilige Monat benannt.
Beispiel:
Sie gibt einen neutralen Wert ohne Vorzeichen heraus, mit anschließendem Kommentar: zu warm / zu kalt<tr><td width="22%" height="25"><font color="Gray"><b><nobr>für einen %monthtxt%tag ist es heute ⇒</nobr></b></font></td>
<td align="center" width="7%" height="25"><img border="0" src="yearicon.gif" width="25" height="25"></td>
<td align="center" width="52%" height="25" colspan="7"><b><font size="3">
%unit_off%
%curminmaxhour_on%
%ws_setmem[1]=%ws_calc[-]=%ws_avgtempmonth[1]%~ %ws_STDV_year[01~0000]%~1%%
%ws_setmem[2]=%ws_calc[-]=%ws_avgtempmonth[2]%~ %ws_STDV_year[02~0000]%~1%%
%ws_setmem[3]=%ws_calc[-]=%ws_avgtempmonth[3]%~ %ws_STDV_year[03~0000]%~1%%
%ws_setmem[4]=%ws_calc[-]=%ws_avgtempmonth[4]%~ %ws_STDV_year[04~0000]%~1%%
%ws_setmem[5]=%ws_calc[-]=%ws_avgtempmonth[5]%~ %ws_STDV_year[05~0000]%~1%%
%ws_setmem[6]=%ws_calc[-]=%ws_avgtempmonth[6]%~ %ws_STDV_year[06~0000]%~1%%
%ws_setmem[7]=%ws_calc[-]=%ws_avgtempmonth[7]%~ %ws_STDV_year[07~0000]%~1%%
%ws_setmem[8]=%ws_calc[-]=%ws_avgtempmonth[8]%~ %ws_STDV_year[08~0000]%~1%%
%ws_setmem[9]=%ws_calc[-]=%ws_avgtempmonth[9]%~ %ws_STDV_year[09~0000]%~1%%
%ws_setmem[10]=%ws_calc[-]=%ws_avgtempmonth[10]%~ %ws_STDV_year[10~0000]%~1%%
%ws_setmem[11]=%ws_calc[-]=%ws_avgtempmonth[11]%~ %ws_STDV_year[11~0000]%~1%%
%ws_setmem[12]=%ws_calc[-]=%ws_avgtempmonth[12]%~ %ws_STDV_year[12~0000]%~1%%
%ws_setmem[14]=%ws_compare[3]=%ws_month%~1~%ws_getmem[1]%~0%%
%ws_setmem[15]=%ws_compare[3]=%ws_month%~2~%ws_getmem[2]%~0%%
%ws_setmem[16]=%ws_compare[3]=%ws_month%~3~%ws_getmem[3]%~0%%
%ws_setmem[17]=%ws_compare[3]=%ws_month%~4~%ws_getmem[4]%~0%%
%ws_setmem[18]=%ws_compare[3]=%ws_month%~5~%ws_getmem[5]%~0%%
%ws_setmem[19]=%ws_compare[3]=%ws_month%~6~%ws_getmem[6]%~0%%
%ws_setmem[20]=%ws_compare[3]=%ws_month%~7~%ws_getmem[7]%~0%%
%ws_setmem[21]=%ws_compare[3]=%ws_month%~8~%ws_getmem[8]%~0%%
%ws_setmem[22]=%ws_compare[3]=%ws_month%~9~%ws_getmem[9]%~0%%
%ws_setmem[23]=%ws_compare[3]=%ws_month%~10~%ws_getmem[10]%~0%%
%ws_setmem[24]=%ws_compare[3]=%ws_month%~11~%ws_getmem[11]%~0%%
%ws_setmem[25]=%ws_compare[3]=%ws_month%~12~%ws_getmem[12]%~0%%
%ws_setmem[26]=%ws_calc[+]=%ws_getmem[14]%~%ws_getmem[15]%~2%%
%ws_setmem[27]=%ws_calc[+]=%ws_getmem[16]%~%ws_getmem[17]%~2%%
%ws_setmem[28]=%ws_calc[+]=%ws_getmem[18]%~%ws_getmem[19]%~2%%
%ws_setmem[29]=%ws_calc[+]=%ws_getmem[20]%~%ws_getmem[21]%~2%%
%ws_setmem[30]=%ws_calc[+]=%ws_getmem[22]%~%ws_getmem[23]%~2%%
%ws_setmem[31]=%ws_calc[+]=%ws_getmem[24]%~%ws_getmem[25]%~2%%
%ws_setmem[32]=%ws_calc[+]=%ws_getmem[26]%~%ws_getmem[27]%~2%%
%ws_setmem[33]=%ws_calc[+]=%ws_getmem[28]%~%ws_getmem[29]%~2%%
%ws_setmem[34]=%ws_calc[+]=%ws_getmem[30]%~%ws_getmem[31]%~2%%
%ws_setmem[35]=%ws_calc[+]=%ws_getmem[32]%~%ws_getmem[33]%~2%%
%ws_setmem[36]=%ws_calc[+]=%ws_getmem[34]%~%ws_getmem[35]%~2%%
%ws_setmem[37]=%ws_calc[-]=%curminmaxhour[3,0,2]%~%ws_getmem[36]%~1%%
%ws_setmem[38]=%ws_compare[2]=%ws_getmem[37]%~0~1~-1%%
%ws_setmem[39]=%ws_calc[*]=%ws_getmem[37]%~%ws_getmem[38]%~1%%
%ws_setmem[40]=%ws_compare[2]=%ws_getmem[37]%~0~zu warm~zu kalt%%
%ws_getmem[39]%° %ws_getmem[40]%
%unit_on%
<nobr><font size="2"></nobr></font></b></td></tr>
Es wird automatisch der jeweilige Monat benannt.
Beispiel:
Vorraussetzung ist, daß man im WSWIN unter Statistikdaten die entsprechenden Monatsmittelwerte hinterlegt hat.für einen Novembertag ist es heute 4,4° zu warm