Webtags (preserving history): Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
(26 intermediate revisions by the same user not shown)
Line 841: Line 841:
|-
|-
|<#feelslike>
|<#feelslike>
|The current [[Feels_Like|Feels Like]] temperature.  The referenced page in weather terminology section of this Wiki explains it. Although output from version 3.5.4 build 3075, the correct value is only available from version 3.6.10 (build 3086) onwards as incorrect formula used in builds 3084 and 3085, and a different formula used in builds from 3075 to 3083.
|Not available in Cumulus 1. Not available in all MX versions. Please see sub-section below this table regarding availability by MX versions if you are using a MX version earlier than 3.6.10.
 
The current [[Feels_Like|Feels Like]] temperature.  The referenced page in weather terminology section of this Wiki explains it.
|-
|-
|<#IsFreezing>
|<#IsFreezing>
Line 1,028: Line 1,030:
|The same as <#currcond> but also has all characters above (decimal base) code 159 encoded as HTML entities for example this would encode any use of symbol for degree.
|The same as <#currcond> but also has all characters above (decimal base) code 159 encoded as HTML entities for example this would encode any use of symbol for degree.
|}
|}
==== Feels Like ====
The figures quoted for this derivative vary between versions:
* The first formula was used from MX version 3.5.4 (25 Apr 2020) build 3075 until version 3.6.7 (4 June 2020) build 3083
* The second formula, which was coded incorrectly, and so gave strange results, applied in versions 3.6.8 to 3.6.9 (build 3084, 3085)
* The third, and hopefully final, formula applies from version 3.6.10 (build 3086).
A php script for adding feels like as calculated in version 3.6.10 to any standard log line created either without feels like, or with an older calculation, can be downloaded from [https://cumulus.hosiene.co.uk/viewtopic.php?f=18&t=18096 Create Missing topic on support forum]


==Extra Sensors Davis (and a few others)==
==Extra Sensors Davis (and a few others)==
Line 1,208: Line 1,218:
|-
|-
|<#RecentWindChill>
|<#RecentWindChill>
|Wind Chill
|Wind Chill (if temperature is below 10°C or 50 °F, then the new Feels Like now available in MX will report this same value).
| <#RecentWindChill d=48 m=1> reports the wind chill temperature 2 days ago
| <#RecentWindChill d=48 m=1> reports the wind chill temperature 2 days ago
|-
|-
Line 1,269: Line 1,279:
| d=n (where n runs 0 to 6) days ago; h=n (where n is any number of hours ago); m=n (where n is any number of minutes ago)
| d=n (where n runs 0 to 6) days ago; h=n (where n is any number of hours ago); m=n (where n is any number of minutes ago)
|}
|}


=== Other weather derivatives ===
=== Other weather derivatives ===
Line 1,290: Line 1,299:
H = (5/9 * (<#RecentHumidity h=3> /100 * svp - 10)) + <#RecentOutsideTemp h=3;
H = (5/9 * (<#RecentHumidity h=3> /100 * svp - 10)) + <#RecentOutsideTemp h=3;


==== Apparent Temperature ====
==== Apparent Temperature and Feels Like ====


Note this formula uses Celsius for temperature and metres per second for wind speed. You will need to do the appropriate conversions if you use different units.  Formula is same for Cumulus 1 and MX.
Note this apparent temperature formula uses Celsius for temperature and '''metres per second''' for wind speed. You will need to do the appropriate conversions from the quoted recent history tags if you use different units.  The Australian Apparent temperature formula is same for Cumulus 1 and MX:


var actualVaporPress = <#RecentHumidity h=3>/100) * 6.105 * Math.exp(17.27 * <#RecentOutsideTemp h=3>) / (237.7 + parseFloat(<#RecentOutsideTemp h=3>))));
var actualVaporPress = <#RecentHumidity h=3>/100) * 6.105 * Math.exp(17.27 * <#RecentOutsideTemp h=3>) / (237.7 + parseFloat(<#RecentOutsideTemp h=3>))));
var appTempDegC = parseFloat(<#RecentOutsideTemp h=3) + (0.33 * actualVaporPress) - (0.7 * <#RecentWindSpeed h=3>) - 4;
var appTempDegC = parseFloat(<#RecentOutsideTemp h=3) + (0.33 * actualVaporPress) - (0.7 * <#RecentWindSpeed h=3>) - 4;


==== Feels Like ====
Feels Like as implemented at version 3.6.10 (see [[#Feels_Like|Feels Like section below Current condition web tags]]) uses Celsius for temperature and '''km per hour''' for wind speed. Again, you will need to do the appropriate conversions from the quoted recent history tags if you use different units.
 
Calculation from recent history tags is much more complicated because there are 3 different calculations: Feels Like reports exactly same as wind chill for temperatures '''below''' 10°C or 50°F so the WC here should equal <#RecentWindChill h=3>:
<pre>if(<#RecentWindSpeed h=3> < 4.828) WC =  <#RecentOutsideTemp h=3>;
else{
wind_pow =  Math.pow(<#RecentWindSpeed h=3>, 0.16);
WC = (13.12 + 0.1625 * <#RecentOutsideTemp h=3>) - (11.37 * wind_pow) + (0.3965 * <#RecentOutsideTemp h=3> * wind_pow);// Brackets used to ensure "+" is interpreted as addition not concatenation
} </pre>
 
For temperatures '''above''' 20°C or 68°F Feels Like uses a different way to calculate apparent temperature that it uses at these higher temperatures (this formula only used for 3.6.10 onwards):
<pre>var actualVaporPress = <#RecentHumidity h=3>/100) * 6.112* Math.exp((17.62 * <#RecentOutsideTemp h=3>)/(243.12 + <#RecentOutsideTemp h=3>)) / 10.0;  // Not same as at build 3084
/* uses kilometres per hour for wind speed */
/*  What Cumulus MX will use to calculate apparent temperature for feels like is changed very slightly */
if(<#RecentWindSpeed h=3> > 72) <#RecentWindSpeed h=3> =72;
AT= (1.04 * <#RecentOutsideTemp h=3>) + (2 * actualVaporPress) - (0.1805553 * <#RecentWindSpeed h=3>) - 2.7;</pre>
 
For in-between temperatures it uses a more complicated merge of the two formulas for AT and WC as defined above:
<pre>app_temp_mult = (<#RecentOutsideTemp h=3> - 10) / 10;
wind_chill_mult = 1 - app_temp_mult;


Formula deleted, as only used from MX version 3.5.4 (25 Apr 2020) build 3075 until version 3.6.7 (4 June 2020) build 3083
FL= AT * app_temp_mult + WC * wind_chill_mult;</pre>


==Today==
==Today==
Many of these web tags are used on the supplied '''todayT.htm''' template, and the supplied '''todayyest.html''' page within the MX admin interface.
For web tags that report values that refer to a particular time of day, there is a corresponding web tag that can give the time of day, shown in same row of table below.  
For web tags that report values that refer to a particular time of day, there is a corresponding web tag that can give the time of day, shown in same row of table below.  


Line 1,308: Line 1,338:
|-
|-
!style="width:150px" | Web tag_name
!style="width:150px" | Web tag_name
!style="width:450px" | Function
!style="width:650px" | Function
!style="width:150px" | Time tag_name
!style="width:150px" | Time tag_name
|-
|-
Line 1,338: Line 1,368:
|-
|-
|<#feelslikeTH>
|<#feelslikeTH>
|[[File:Badge vMx.png]] Available from version 3.6.0 Today's high feels like temperature
|[[File:Badge vMx.png]] Available from version 3.6.10 Today's high feels like temperature
|<#TfeelslikeH>
|<#TfeelslikeTH>
|-
|-
|<#feelslikeL>
|<#feelslikeTL>
|[[File:Badge vMx.png]] Available from version 3.6.0 Today's low feels like temperature
|[[File:Badge vMx.png]] Available from version 3.6.10 Today's low feels like temperature
|<#TfeelslikeL>
|<#TfeelslikeTL>
|-
|-
|<#heatindexTH>
|<#heatindexTH>
Line 1,472: Line 1,502:


==Yesterday==
==Yesterday==
Note that the Y indicating yesterday is sometimes a prefix, sometimes a suffix (with H for High, L for Low), web tags are not named consistently!
Note that the Y indicating yesterday is sometimes a prefix, sometimes a suffix (with H for High, L for Low), web tags are not named consistently!


Many of these web tags are used on the supplied yesterdayT.htm template, and the supplied todayyest.html page within the MX user interface.
Many of these web tags are used on the supplied '''yesterdayT.htm''' template, and the supplied '''todayyest.html''' page within the MX admin interface.


For web tags that refer to a particular time of day, there is a corresponding web tag that can give the time of day. Please note none of the time web tags can be modified by output parameters to give a date, but they can be changed from the default time format that is 'h:mm'.
For web tags that refer to a particular time of day, there is a corresponding web tag that can give the time of day. Please note none of the time web tags can be modified by output parameters to give a date, but they can be changed from the default time format that is 'h:mm'.
Line 1,480: Line 1,511:
|-
|-
!style="width:150px" | Web tag_name
!style="width:150px" | Web tag_name
!style="width:450px" | Function
!style="width:550px" | Function
!style="width:150px" | Time
!style="width:150px" | Time
|-
|-
Line 1,627: Line 1,658:


==Monthly==
==Monthly==
This table shows the web tags used on the "thismonthT.htm" web page, the rainfall this month does not appear  on that page, does not appear  on that page, it is shown in [[#Current_Conditions|indexT.htm]] table earlier on this page.


The web tags in the date column output dates in the format "dd MMMM" (same for Cumulus 1 and Cumulus MX), this can be changed using the [[#Time.2FDate_.27format.27_Parameter|format parameters]] described above. For web tags that represent daily values, there are (obviously) no corresponding time web tags, but for high and low spot values the default 'h:mm' format of the time output can be changed using output parameters.
This table shows the web tags used on the '''thismonthT.htm''' web page,and the '''records.html''' page (accessed by penultimate tab) in the admin interface.
 
Because the rainfall this month does not appear on '''thismonthT.htm''' web page, it is shown in [[#Current_Conditions|indexT.htm]] table earlier in this article which is for the web page where it does appear.
 
The web tags in the date column output dates in the format "dd MMMM" (for once this is same for Cumulus 1 and Cumulus MX). Should you require a different output format, this can be changed using the [[#Time.2FDate_.27format.27_Parameter|format parameters]] described above. For web tags that represent daily values, there are (obviously) no corresponding time web tags, but for high and low spot values the default 'h:mm' format of the time output can be changed using output parameters. Do make sure that you get the web tag names right and the output form at parameters right.
 
As another example of inconsistency in how web tags added in different versions are coded, there are two web tags (highest minimum/lowest maximum temperatures) where a standard web tag is not provided by Cumulus (1 or MX) for the associated time-stamp. Consequently, for these 2 (and their corresponding tags in the this year group), there are mandatory output parameters required as shown in the table. Obviously Cumulus 1 lets you use "NN", "nn", "MM", or "mm" for the minutes, but minutes can only be represented in one way in Cumulus MX.


NB This table shows time of extremes for two daily figures (highest minimum/lowest maximum temperatures as of course these are actually associated with a particular time although a standard web tag was not provided for that), by including Cumulus time modifiers, and how minutes in time modifiers can be specified in two ways in Cumulus 1 but only in one way in Cumulus MX.
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 1,781: Line 1,816:


==Yearly==
==Yearly==
This table shows the web tags used on the "thisyearT.htm" web page, the rainfall this season (it need not start on 1 January) does not appear  on that page, it is shown on [[#Current_Conditions|indexT.htm]].
This table shows the web tags used on the "thisyearT.htm" web page, and the '''records.html''' page (accessed by final tab) in the admin interface.


The default format for web tags in the date column is (like the monthly web tags) "dd MMMM" (same for Cumulus 1 and Cumulus MX), this can be changed using the [[#Time.2FDate_.27format.27_Parameter|format parameters]] described above. For web tags that represent daily values, there are (obviously) no corresponding time web tags, but for high and low spot values the default 'h:mm' format of the time output can be changed using output parameters.
Because the rainfall this year does not appear on '''thisyearT.htm''' web page, it is shown in [[#Current_Conditions|indexT.htm]] table earlier in this article which is for the web page where it does appear.


NB Year runs from roll-over time on 1 January for all web tags listed here
The web tags in the date column output dates in the format "dd MMMM" (for once this is same for Cumulus 1 and Cumulus MX). Should you require a different output format, this can be changed using the [[#Time.2FDate_.27format.27_Parameter|format parameters]] described above. For web tags that represent daily values, there are (obviously) no corresponding time web tags, but for high and low spot values the default 'h:mm' format of the time output can be changed using output parameters. Do make sure that you get the web tag names right and the output form at parameters right.
 
As another example of inconsistency in how web tags added in different versions are coded, there are two web tags (highest minimum/lowest maximum temperatures) where a standard web tag is not provided by Cumulus (1 or MX) for the associated time-stamp. Consequently, for these 2 (and their corresponding tags in the this month group), there are mandatory output parameters required as shown in the table. Obviously Cumulus 1 lets you use "NN", "nn", "MM", or "mm" for the minutes, but minutes can only be represented in one way in Cumulus MX.
 
Remember that the Year-to-date runs from roll-over time on 1 January for all web tags listed here. Although, some web tags represent seasonal derivatives, i.e. where you define the month from which they start counting, this does not apply to any listed in this group.




Line 1,792: Line 1,831:
!style="width:150px"|Web tag_name
!style="width:150px"|Web tag_name
!style="width:300px"|Function
!style="width:300px"|Function
!style="width:150px"|Time
!style="width:350px"|Time
!style="width:150px"|Date
!style="width:150px"|Date
|-
|-
Line 1,859: Line 1,898:
|<#YearMinTempH>
|<#YearMinTempH>
|This years highest daily minimum temperature
|This years highest daily minimum temperature
|<#YearMinTempHD format=HH:nn> for Cumulus 1, <#YearMinTempHD format=HH:mm> for Cumulus MX
|Flavour specific mandatory output parameters:
* <#YearMinTempHD format=HH:nn> ''for Cumulus 1'',
* <#YearMinTempHD format=HH:mm> ''for Cumulus MX''
|<#YearMinTempHD>
|<#YearMinTempHD>
|-
|-
|<#YearMaxTempL>
|<#YearMaxTempL>
|This years lowest daily maximum temperature
|This years lowest daily maximum temperature
|<#YearMaxTempHD format=HH:nn> for Cumulus 1, <#YearMaxTempHD format=HH:mm> for Cumulus MX
|Flavour specific mandatory output parameters:
* <#YearMaxTempHD format=HH:nn> ''for Cumulus 1'',
* <#YearMaxTempHD format=HH:mm> ''for Cumulus MX''
 
|<#YearMaxTempLD>
|<#YearMaxTempLD>
|-
|-
Line 1,940: Line 1,984:


==All Time==
==All Time==
The web tags in the date/time column have the default format seen on "records.htm". So for an extreme month it just shows the month name in full i.e. format 'MMMM'. For an extreme day it shows the day of the month and the month name in full i.e. format "dd MMMM" (same for Cumulus 1 and Cumulus MX), prefixed with the word 'on'. For the highest/lowest within a day in the year it shows both time and date adding the word "at" before the time, and the word 'on' before the date.


You can change the default output using the [[#Time.2FDate_.27format.27_Parameter|formats features described above, but this can involve complicated use of single and double quotes and there are differences between Cumulus 1 and Cumulus MX.
The web tags in the date/time column have the default format as seen on "records.htm" in the standard web pages.
 
These are also available in the admin interface on "records.html" where they appear in the first tab, although the format used there is different and not able to be edited (any time is shown after the date).
 
*The default format for an extreme month is to show the month name in full i.e. format 'MMMM' followed by the year in full.
*For an extreme day it shows the day of the month and the month name in full i.e. format "dd MMMM" (same for Cumulus 1 and Cumulus MX), prefixed with the word 'on' again ending with the year.
*For the highest/lowest within a day in the year it shows both time and date adding the word "at" before the time, and the word 'on' before the date (i.e. on the standard web page the time comes first, not as seen in admin interface).
 
You can change the default output on either the standard web template, or in your own file,  by using the [[#Time.2FDate_.27format.27_Parameter|formats features described above, but this can involve complicated use of single and double quotes and there are differences between Cumulus 1 and Cumulus MX. Please see examples section above for advice.
 
Note that unlike the this month and this year web tags, the time and the date are both included in the default format of the standard time-stamp web tags for the 'highest minimum' and 'lowest maximum' temperatures, yet another inconsistency!


Note that unlike the monthly web tags, the time is included in the default format of the standard web tags for the 'highest minimum' and 'lowest maximum'.
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
!style="width:150px" | Web tag_name
!style="width:150px" | Web tag_name
!style="width:300px" | Function
!style="width:400px" | Function
!style="width:150px" | Date/Time
!style="width:150px" | Date/Time
|-
|-
Line 2,014: Line 2,066:
|-
|-
|<#wchillH>
|<#wchillH>
|All time greatest wind chill (i.e. lowest temperature)  
|All time greatest wind chill (i.e. lowest temperature, but highest wind speed)  
|<#TwchillH>
|<#TwchillH>
|-
|-
Line 2,070: Line 2,122:
==Monthly All Time Records==
==Monthly All Time Records==


There are a set of tags for monthly all-time highs and lows, in other words the highest and lowest values for a particular month of the year. For example, the highest ever temperature in July. Each Value tag has an optional input parameter "mon=N" where N is the index of the month of the year that you want the value for (January=1 and so on). For example, <#ByMonthTempH mon=7> will give you the highest ever temperature in July.  The corresponding date/time web tags are formatted like the all time records directly above this section.
There are a set of tags for monthly all-time highs and lows, in other words the highest and lowest values for a particular month of the year. To supply both optional input, and optional output parameters, separate them with spaces, e.g. <#ByMonthTempHT mon=7 format=hh:nn>. In that example,  the highest ever temperature in July is returned in the value after processing by Cumulus.


If you don't supply a parameter (or supply an invalid value) the current month will be used. You can customise the date and time formats using the 'format' parameter on the web tag. To supply both input and output parameters, separate them with spaces, e.g. <#ByMonthTempHT mon=7 format=hh:nn>
Each Monthly All Time Records web tag has an optional input parameter "mon=N" where N is the index of the month of the year that you want the value for (January=1 and so on).  The corresponding date/time web tags are formatted like the all time records directly above this section. You can customise the date and time formats using the output  'format' parameter on the web tag.
 
If you don't supply an input parameter (or supply an invalid value like zero) the current month will be used. This is useful if you want to write a template that will always supply values for the current month and don't want to use a script to enter the correct input parameter by processing with that script before Cumulus processes the template.




Line 2,078: Line 2,132:
|-
|-
!style="width:150px"|Web tag_name
!style="width:150px"|Web tag_name
!style="width:300px"|Function
!style="width:400px"|Function
!style="width:150px"|Date/Time
!style="width:150px"|Date/Time
|-
|-
Line 2,096: Line 2,150:
|-
|-
|<#ByMonthWChillL>
|<#ByMonthWChillL>
|Greatest wind chill (i.e. lowest temperature)
|Greatest wind chill (i.e. lowest temperature and highest wind speed)
|<#ByMonthWChillLT>
|<#ByMonthWChillLT>
|-
|-
Line 2,203: Line 2,257:
|-
|-
!style="width:150px" | Web tag_name
!style="width:150px" | Web tag_name
!style="width:600px" | Function
!style="width:900px" | Function
|-
|-
|<#sunrise>
|<#sunrise>
5,838

edits

Navigation menu