Template:Weather box/sandbox
![]() | __EXPECTUNUSEDTEMPLATE__This is the template sandbox page for Template:Weather box (diff). See also the companion subpage for test cases. |
![]() | This template uses Lua: |
![]() | This template is used on approximately 30,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
![]() | This template should not be substituted. |
Example with default global parameters:
Month | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | Year |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Record high °F | 72.0 | 72.0 | 86.0 | 96.0 | 96.0 | 101.0 | 106.0 | 104.0 | 103.0 | 94.0 | 86.0 | 75.0 | 106.0 |
Mean maximum °F | 59.6 | 59.7 | 71.5 | 84.0 | 84.0 | 92.3 | 95.0 | 93.7 | 90.5 | 78.8 | 71.3 | 62.2 | 96.0 |
Mean daily maximum °F | 38.3 | 41.6 | 49.7 | 61.2 | 70.8 | 79.3 | 84.1 | 82.6 | 75.2 | 63.8 | 53.8 | 43.0 | 62.0 |
Daily mean °F | 32.6 | 35.2 | 42.4 | 53.0 | 62.4 | 71.5 | 76.5 | 75.2 | 68.0 | 56.9 | 47.7 | 37.5 | 55.0 |
Mean daily minimum °F | 26.9 | 28.9 | 35.2 | 44.8 | 54.0 | 63.6 | 68.8 | 67.8 | 60.8 | 50.0 | 41.6 | 32.0 | 48.0 |
Mean minimum °F | 7.2 | 9.8 | 18.5 | 32.3 | 43.5 | 52.9 | 60.3 | 58.8 | 48.6 | 38.0 | 28.7 | 18.6 | 5.0 |
Record low °F | −12.0 | −15.0 | −3.0 | 12.0 | 32.0 | 44.0 | 50.0 | 50.0 | 39.0 | 28.0 | 15.0 | −13.0 | −15.0 |
Average precipitation inches | 3.65 | 3.09 | 4.36 | 4.50 | 4.19 | 4.41 | 4.60 | 4.44 | 4.28 | 4.40 | 4.02 | 4.00 | 49.94 |
Average rainfall inches | 3.65 | 3.09 | 4.36 | 4.50 | 4.19 | 4.41 | 4.60 | 4.44 | 4.28 | 4.40 | 4.02 | 4.00 | 49.94 |
Average snowfall inches | 7.0 | 7.2 | 6.9 | 0.6 | trace | 0.0 | 0.0 | 0.0 | 0.0 | trace | 0.3 | 4.8 | 26.8 |
Average extreme snow depth inches | 14 | 12 | 10 | 8 | 6 | 4 | 2 | 4 | 6 | 8 | 10 | 12 | 14 |
Humidex | 22.2 | 22.2 | 30.0 | 35.6 | 35.6 | 38.3 | 41.1 | 40.0 | 39.4 | 34.4 | 30.0 | 23.9 | 41.1 |
Record high °C | 22.2 | 22.2 | 30.0 | 35.6 | 35.6 | 38.3 | 41.1 | 40.0 | 39.4 | 34.4 | 30.0 | 23.9 | 41.1 |
Mean daily maximum °C | 3.5 | 5.3 | 9.8 | 16.2 | 21.6 | 26.3 | 28.9 | 28.1 | 24.0 | 17.7 | 12.1 | 6.1 | 16.7 |
Daily mean °C | 0.3 | 1.8 | 5.8 | 11.7 | 16.9 | 21.9 | 24.7 | 24.0 | 20.0 | 13.8 | 8.7 | 3.1 | 12.8 |
Mean daily minimum °C | −2.8 | −1.7 | 1.8 | 7.1 | 12.2 | 17.6 | 20.4 | 19.9 | 16.0 | 10.0 | 5.3 | 0.0 | 8.9 |
Record low °C | −24.4 | −26.1 | −19.4 | −11.1 | 0.0 | 6.7 | 10.0 | 10.0 | 3.9 | −2.2 | −9.4 | −25.0 | −26.1 |
Wind chill | −24.4 | −26.1 | −19.4 | −11.1 | 0.0 | 6.7 | 10.0 | 10.0 | 3.9 | −2.2 | −9.4 | −25.0 | −26.1 |
Average precipitation mm | 93 | 78 | 111 | 114 | 106 | 112 | 117 | 113 | 109 | 112 | 102 | 102 | 1,268 |
Average rainfall mm | 93 | 78 | 111 | 114 | 106 | 112 | 117 | 113 | 109 | 112 | 102 | 102 | 1,268 |
Average snowfall cm | 18 | 18 | 18 | 1.5 | trace | 0.0 | 0.0 | 0.0 | 0.0 | trace | 0.76 | 12 | 68.26 |
Average extreme snow depth cm | 36 | 30 | 25 | 20 | 15 | 10 | 5.1 | 10 | 15 | 20 | 25 | 30 | 36 |
Average precipitation days | 10.4 | 9.2 | 10.9 | 11.5 | 11.1 | 11.2 | 10.4 | 9.5 | 8.7 | 8.9 | 9.6 | 10.6 | 122.0 |
Average rainy days | 6.4 | 6.4 | 9.1 | 11.2 | 11.1 | 11.2 | 10.4 | 9.5 | 8.7 | 8.9 | 9.4 | 8.3 | 110.6 |
Average snowy days | 4.0 | 2.8 | 1.8 | 0.3 | trace | trace | trace | trace | trace | trace | 0.2 | 2.3 | 11.4 |
Average relative humidity (%) | 61.5 | 60.2 | 58.3 | 55.3 | 62.7 | 65.2 | 64.2 | 66.0 | 67.8 | 65.6 | 64.6 | 64.1 | 63.0 |
Average afternoon relative humidity (%) | 61.5 | 60.2 | 58.3 | 55.3 | 62.7 | 65.2 | 64.2 | 66.0 | 67.8 | 65.6 | 64.6 | 64.1 | 63.0 |
Average dew point °F | 18.0 | 19.0 | 25.9 | 34.0 | 47.3 | 57.4 | 61.9 | 62.1 | 55.6 | 44.1 | 34.0 | 24.6 | 40.3 |
Average dew point °C | −7.8 | −7.2 | −3.4 | 1.1 | 8.5 | 14.1 | 16.6 | 16.7 | 13.1 | 6.7 | 1.1 | −4.1 | 4.6 |
Mean monthly sunshine hours | 162.7 | 163.1 | 212.5 | 225.6 | 256.6 | 257.3 | 268.2 | 268.2 | 219.3 | 211.2 | 151.0 | 139.0 | 2,534.7 |
Mean daily sunshine hours | 5.2 | 5.8 | 6.9 | 7.5 | 8.3 | 8.6 | 8.7 | 8.7 | 7.3 | 6.8 | 5.0 | 4.5 | 6.9 |
Mean daily daylight hours | 5.2 | 5.8 | 6.9 | 7.5 | 8.3 | 8.6 | 8.7 | 8.7 | 7.3 | 6.8 | 5.0 | 4.5 | 6.9 |
Percent possible sunshine | 54 | 55 | 57 | 57 | 57 | 57 | 59 | 63 | 59 | 61 | 51 | 48 | 57 |
Average ultraviolet index | 2 | 3 | 4 | 6 | 7 | 8 | 8 | 8 | 6 | 4 | 2 | 1 | 5 |
Source 1: Department of Weather and Environment[1] | |||||||||||||
Source 2: The Local Newspaper[2] |
Example with |width=auto
and |temperature colour=pastel
:
Month | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | Year |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Record high °F | 72.0 | 72.0 | 86.0 | 96.0 | 96.0 | 101.0 | 106.0 | 104.0 | 103.0 | 94.0 | 86.0 | 75.0 | 106.0 |
Mean maximum °F | 59.6 | 59.7 | 71.5 | 84.0 | 84.0 | 92.3 | 95.0 | 93.7 | 90.5 | 78.8 | 71.3 | 62.2 | 96.0 |
Mean daily maximum °F | 38.3 | 41.6 | 49.7 | 61.2 | 70.8 | 79.3 | 84.1 | 82.6 | 75.2 | 63.8 | 53.8 | 43.0 | 62.0 |
Daily mean °F | 32.6 | 35.2 | 42.4 | 53.0 | 62.4 | 71.5 | 76.5 | 75.2 | 68.0 | 56.9 | 47.7 | 37.5 | 55.0 |
Mean daily minimum °F | 26.9 | 28.9 | 35.2 | 44.8 | 54.0 | 63.6 | 68.8 | 67.8 | 60.8 | 50.0 | 41.6 | 32.0 | 48.0 |
Mean minimum °F | 7.2 | 9.8 | 18.5 | 32.3 | 43.5 | 52.9 | 60.3 | 58.8 | 48.6 | 38.0 | 28.7 | 18.6 | 5.0 |
Record low °F | −12.0 | −15.0 | −3.0 | 12.0 | 32.0 | 44.0 | 50.0 | 50.0 | 39.0 | 28.0 | 15.0 | −13.0 | −15.0 |
Average precipitation inches | 3.65 | 3.09 | 4.36 | 4.50 | 4.19 | 4.41 | 4.60 | 4.44 | 4.28 | 4.40 | 4.02 | 4.00 | 49.94 |
Average rainfall inches | 3.65 | 3.09 | 4.36 | 4.50 | 4.19 | 4.41 | 4.60 | 4.44 | 4.28 | 4.40 | 4.02 | 4.00 | 49.94 |
Average snowfall inches | 7.0 | 7.2 | 6.9 | 0.6 | trace | 0.0 | 0.0 | 0.0 | 0.0 | trace | 0.3 | 4.8 | 26.8 |
Average extreme snow depth inches | 14 | 12 | 10 | 8 | 6 | 4 | 2 | 4 | 6 | 8 | 10 | 12 | 14 |
Humidex | 22.2 | 22.2 | 30.0 | 35.6 | 35.6 | 38.3 | 41.1 | 40.0 | 39.4 | 34.4 | 30.0 | 23.9 | 41.1 |
Record high °C | 22.2 | 22.2 | 30.0 | 35.6 | 35.6 | 38.3 | 41.1 | 40.0 | 39.4 | 34.4 | 30.0 | 23.9 | 41.1 |
Mean daily maximum °C | 3.5 | 5.3 | 9.8 | 16.2 | 21.6 | 26.3 | 28.9 | 28.1 | 24.0 | 17.7 | 12.1 | 6.1 | 16.7 |
Daily mean °C | 0.3 | 1.8 | 5.8 | 11.7 | 16.9 | 21.9 | 24.7 | 24.0 | 20.0 | 13.8 | 8.7 | 3.1 | 12.8 |
Mean daily minimum °C | −2.8 | −1.7 | 1.8 | 7.1 | 12.2 | 17.6 | 20.4 | 19.9 | 16.0 | 10.0 | 5.3 | 0.0 | 8.9 |
Record low °C | −24.4 | −26.1 | −19.4 | −11.1 | 0.0 | 6.7 | 10.0 | 10.0 | 3.9 | −2.2 | −9.4 | −25.0 | −26.1 |
Wind chill | −24.4 | −26.1 | −19.4 | −11.1 | 0.0 | 6.7 | 10.0 | 10.0 | 3.9 | −2.2 | −9.4 | −25.0 | −26.1 |
Average precipitation mm | 93 | 78 | 111 | 114 | 106 | 112 | 117 | 113 | 109 | 112 | 102 | 102 | 1,268 |
Average rainfall mm | 93 | 78 | 111 | 114 | 106 | 112 | 117 | 113 | 109 | 112 | 102 | 102 | 1,268 |
Average snowfall cm | 18 | 18 | 18 | 1.5 | trace | 0.0 | 0.0 | 0.0 | 0.0 | trace | 0.76 | 12 | 68.26 |
Average extreme snow depth cm | 36 | 30 | 25 | 20 | 15 | 10 | 5.1 | 10 | 15 | 20 | 25 | 30 | 36 |
Average precipitation days | 10.4 | 9.2 | 10.9 | 11.5 | 11.1 | 11.2 | 10.4 | 9.5 | 8.7 | 8.9 | 9.6 | 10.6 | 122.0 |
Average rainy days | 6.4 | 6.4 | 9.1 | 11.2 | 11.1 | 11.2 | 10.4 | 9.5 | 8.7 | 8.9 | 9.4 | 8.3 | 110.6 |
Average snowy days | 4.0 | 2.8 | 1.8 | 0.3 | trace | trace | trace | trace | trace | trace | 0.2 | 2.3 | 11.4 |
Average relative humidity (%) | 61.5 | 60.2 | 58.3 | 55.3 | 62.7 | 65.2 | 64.2 | 66.0 | 67.8 | 65.6 | 64.6 | 64.1 | 63.0 |
Average afternoon relative humidity (%) | 61.5 | 60.2 | 58.3 | 55.3 | 62.7 | 65.2 | 64.2 | 66.0 | 67.8 | 65.6 | 64.6 | 64.1 | 63.0 |
Average dew point °F | 18.0 | 19.0 | 25.9 | 34.0 | 47.3 | 57.4 | 61.9 | 62.1 | 55.6 | 44.1 | 34.0 | 24.6 | 40.3 |
Average dew point °C | −7.8 | −7.2 | −3.4 | 1.1 | 8.5 | 14.1 | 16.6 | 16.7 | 13.1 | 6.7 | 1.1 | −4.1 | 4.6 |
Mean monthly sunshine hours | 162.7 | 163.1 | 212.5 | 225.6 | 256.6 | 257.3 | 268.2 | 268.2 | 219.3 | 211.2 | 151.0 | 139.0 | 2,534.7 |
Mean daily sunshine hours | 5.2 | 5.8 | 6.9 | 7.5 | 8.3 | 8.6 | 8.7 | 8.7 | 7.3 | 6.8 | 5.0 | 4.5 | 6.9 |
Mean daily daylight hours | 5.2 | 5.8 | 6.9 | 7.5 | 8.3 | 8.6 | 8.7 | 8.7 | 7.3 | 6.8 | 5.0 | 4.5 | 6.9 |
Percent possible sunshine | 54 | 55 | 57 | 57 | 57 | 57 | 59 | 63 | 59 | 61 | 51 | 48 | 57 |
Average ultraviolet index | 2 | 3 | 4 | 6 | 7 | 8 | 8 | 8 | 6 | 4 | 2 | 1 | 5 |
Source 1: Department of Weather and Environment[1] | |||||||||||||
Source 2: The Local Newspaper[2] |
For questions, see the talk page. For shorter forms of the template, see § Concise forms below.
- You can enter data in imperial units or metric units or both (but not both in the same parameter).
- You may remove unused fields.
- All fields are optional, except for
|location=
and|source=
. - Year values will be calculated provided that all month values are provided.
- Please use the same precision for all values in a row, e.g. if Jan is 0 and Feb is 0.03, then use 0.00 for Jan. Note: If a value is provided as a "trace" amount, the template supports this as of March 2019. Simply input the value as <syntaxhighlight lang="text" class="" style="" inline="1">trace</syntaxhighlight>
- A source should always be provided—if, however, there is no source, you can add
|date=May 2025
to the template, which will help sort the article into a sub-category of Category:Articles with unsourced statements. - If using multiple tables, or there are pictures or infoboxes higher up on the page, please verify that the template does not overlay, or get overlaid by, other objects used in the article. Please test your changes with several different skins, browsers, and browser window sizes. If necessary use
{{clear}}
before the climate section, or|width=
. - Some optional colours are available. For example, for green precipitation and rainfall, enter green for
|precipitation colour=
and|rain colour=
. The spelling colour or color may be used; for example|temperature colour=pastel
is the same as|temperature color=pastel
.
Imperial-only empty syntax
Will convert and display metric values automatically.
<syntaxhighlight lang="wikitext" style="overflow:auto">
Climate data for {{{location}}} | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Month | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | Year |
Source 1: [1] | |||||||||||||
Source 2: [2] |
</syntaxhighlight>
Metric-only empty syntax
Will convert and display imperial values automatically.
<syntaxhighlight lang="wikitext" style=overflow:auto">
Climate data for {{{location}}} | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Month | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | Year |
Source 1: [3] | |||||||||||||
Source 2: [4] |
</syntaxhighlight>
Full empty syntax
When one parameter of one system is filled in, then the corresponding value will be converted and displayed automatically.
<syntaxhighlight lang="wikitext" style=overflow:auto">
Climate data for {{{location}}} | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Month | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | Year |
Source 1: [5] | |||||||||||||
Source 2: [6] |
</syntaxhighlight>
View and edit links
When this template is used in template space, it may be desirable to provide view and edit links to the template (similar to a navbox). This can be accomplished by setting the name
parameter to be the name of the template.
<syntaxhighlight lang="wikitext">
| name = {{subst:PAGENAME}}
</syntaxhighlight>
Concise forms
There are shorter templates that invoke this template with 36 condensed parameters:
{{Weather box/concise C}}
: for displaying only average high and low temperatures, and precipitation, in Celsius and millimetres.{{Weather box/concise F}}
: for displaying only average high and low temperatures, and precipitation, in Fahrenheit and inches.
Tracking categories
See also
- {{Climate chart}} – Displays climate information in a graphical chart format
A table that displays climate trends for a specific location.
Parameter | Description | Type | Status | |
---|---|---|---|---|
width | width | The width of the template - use "auto" for auto width, enter a percentage for custom scaling, remove for default scaling.
| String | optional |
collapsed | collapsed | Enter anything to make template initially collapsed
| String | optional |
open | open | Enter anything to make template permanently open
| String | deprecated |
single line | single line | Display imperial and metric units in same cell
| String | suggested |
location | location | The location the data was taken from, usually an airport.
| String | required |
Source | source | The source of the data
| String | required |
trace | trace | Entry replaces "trace" text.
| String | deprecated |