Jump to content

Template:Climate chart/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Tags: Mobile edit Mobile web edit
Large precipitation numbers (with re-scaling): note of maxprecip values based on code
 
(13 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
{{Use template sandbox testcases request}}
{{Use template sandbox testcases request}}
{{Lua|Module:Climate chart}}


This template can be used to create climate charts, with average monthly minimum and maximum temperatures.
This template can be used to create climate charts, with average monthly minimum and maximum temperatures.
Line 10: Line 11:
=== Usage ===
=== Usage ===


;argument <tt>1</tt>
;argument <kbd>1</kbd>
:Appears in the heading
:Appears in the heading
;arguments <tt>2</tt>–<tt>37</tt>
;arguments <kbd>2</kbd>–<kbd>37</kbd>
:The data. Think of it as 12 rows, one for each month, with left column for average low temperature, middle column for average high temperature and right column for precipitation.
:The data. Think of it as 12 rows, one for each month, with left column for average low temperature, middle column for average high temperature and right column for precipitation.
;<tt>maxprecip=</tt>
;<kbd>maxprecip=</kbd>
:Supply highest monthly precipitation number if the blue precipitation bars pop out of the chart (happens if any of the monthly numbers is greater than about 750 mm (30 in.))
:Supply highest monthly precipitation number if the blue precipitation bars pop out of the chart (happens if any of the monthly numbers is greater than about 750 mm (30 in.))
;<tt>float=</tt>
;<kbd>float=</kbd>
:<tt>''left''</tt>, <tt>''right''</tt> or <tt>''none''</tt>.
:<kbd>''left''</kbd>, <kbd>''right''</kbd> or <kbd>''none''</kbd>.
;<tt>clear=</tt>
;<kbd>clear=</kbd>
:<tt>''left''</tt>, <tt>''right''</tt>, <tt>''both''</tt> or <tt>''none''</tt>.
:<kbd>''left''</kbd>, <kbd>''right''</kbd>, <kbd>''both''</kbd> or <kbd>''none''</kbd>.
;<tt>source=</tt>
;<kbd>source=</kbd>
:Supply the source of your data
:Supply the source of your data


====Empty syntax====
====Empty syntax====
<syntaxhighlight lang="wikitext">
<pre>
{{climate chart
{{climate chart
| <!--- Bayside --->
| <!--- India --->
|-13.8 |-4.1 |
| | |
|-11.4 |-1.9 |
| | |
|4.3 |-6.0 |
| | |
|10.1 |-1.3 |
| | |
|18.3 |7.1 |
| | |
|23.1 |11.5 |
| | |
|23.8 |12.2 |
| | |
|23.6 |11.9 |
| | |
|19.1 |8.4 |
| | |
|11.2 |-0.1 |
| | |
|5.1 |-5.5 |
| | |
|-2.3 |-12.0 |
| | |
|maxprecip = <!--- supply largest monthly precipitation, in case it's > 750 mm (30 in.) --->
|maxprecip = <!--- supply largest monthly precipitation, in case it's > 750 mm (30 in.) --->
|float = <!--- left, right, or none --->
|float = <!--- left, right, or none --->
Line 45: Line 46:
|source = <!--- source of the data --->
|source = <!--- source of the data --->
}}
}}
</syntaxhighlight>
</pre>


=== Units ===
=== Units ===
Line 71: Line 72:
}}
}}


<syntaxhighlight lang="wikitext" highlight="15,16" style="white-space: pre-wrap;">
<pre><nowiki>
{{climate chart
{{climate chart
| [[Amsterdam]]
| [[Amsterdam]]
Line 89: Line 90:
|clear=right
|clear=right
}}
}}
</syntaxhighlight>
</nowiki></pre>
{{clear}}
{{clear}}


Line 112: Line 113:
}}
}}


<syntaxhighlight lang="wikitext" highlight="15" style="white-space: pre-wrap;">
<pre><nowiki>
{{climate chart
{{climate chart
| [[Bilbao]]
| [[Bilbao]]
Line 130: Line 131:
|source=[http://www.bbc.co.uk/weather/ BBC Weather]
|source=[http://www.bbc.co.uk/weather/ BBC Weather]
}}
}}
</syntaxhighlight>
</nowiki></pre>
{{clear}}
{{clear}}


Line 151: Line 152:
}}
}}


<syntaxhighlight lang="wikitext" style="white-space: pre-wrap;">
<pre><nowiki>
{{climate chart
{{climate chart
| [[Coober Pedy, South Australia|Coober Pedy]]
| [[Coober Pedy, South Australia|Coober Pedy]]
Line 167: Line 168:
|19.1|34.6|17.5
|19.1|34.6|17.5
}}
}}
</syntaxhighlight>
</nowiki></pre>


==== Imperial units ====
==== Imperial units ====
Line 190: Line 191:
}}
}}


<syntaxhighlight lang="wikitext" highlight="17" style="white-space: pre-wrap;">
<pre><nowiki>
{{climate chart
{{climate chart
| [[Anchorage, Alaska|Anchorage]]
| [[Anchorage, Alaska|Anchorage]]
Line 209: Line 210:
|units=imperial
|units=imperial
}}
}}
</syntaxhighlight>
</nowiki></pre>


==== Large precipitation numbers (without re-scaling) ====
==== Large precipitation numbers (without re-scaling) ====
Line 231: Line 232:
}}
}}


<syntaxhighlight lang="wikitext" highlight="" style="white-space: pre-wrap;">
<pre><nowiki>
{{climate chart
{{climate chart
|[[Baguio City, Philippines]]
|[[Baguio City, Philippines]]
Line 249: Line 250:
|clear=right
|clear=right
}}
}}
</syntaxhighlight>
</nowiki></pre>


==== Large precipitation numbers (with re-scaling) ====
==== Large precipitation numbers (with re-scaling) ====
Line 272: Line 273:
}}
}}


<syntaxhighlight lang="wikitext" highlight="10,15" style="white-space: pre-wrap;">
<pre><nowiki>
{{climate chart
{{climate chart
|[[Baguio City, Philippines]]
|[[Baguio City, Philippines]]
Line 291: Line 292:
|clear=right
|clear=right
}}
}}
</syntaxhighlight>
</nowiki></pre>
Values of {{para|maxprecip}} less than or equal to 750 have no effect.


<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox |
<includeonly>{{Sandbox other|
| <!-- CATEGORIES BELOW THIS LINE, PLEASE: -->
| <!-- CATEGORIES BELOW THIS LINE, PLEASE: -->
[[Category:Weather templates]]
[[Category:Weather templates]]
[[Category:Chart, diagram and graph formatting and function templates]]
[[Category:Chart, diagram and graph formatting and function templates]]
[[Category:Exclude in print]]
}}</includeonly><noinclude>
}}</includeonly><noinclude>
</noinclude>
</noinclude>

Latest revision as of 11:15, 24 March 2024

This template can be used to create climate charts, with average monthly minimum and maximum temperatures.

How to read a climate chart

[edit]

Climate charts provide an overview of the climate in a particular place. The letters in the top row stand for months: January, February, etc. The bars and numbers convey the following information: The blue bars represent the average amount of precipitation (rain, snow etc.) that falls in each month. The blue numbers are the amount of precipitation in either millimeters (liters per square meter) or inches. The red numbers are the average daily high and low temperatures for each month, and the red bars represent the average daily temperature span for each month. The thin gray line is 0 °C or 32 °F, the point of freezing, for orientation.

Maribor, Slovenia
Climate chart (explanation)
J
F
M
A
M
J
J
A
S
O
N
D
 
 
33
 
 
4
−4
 
 
43
 
 
7
−3
 
 
49
 
 
12
1
 
 
62
 
 
17
5
 
 
97
 
 
21
10
 
 
107
 
 
25
13
 
 
103
 
 
27
15
 
 
101
 
 
27
14
 
 
113
 
 
21
10
 
 
87
 
 
16
6
 
 
82
 
 
10
2
 
 
60
 
 
5
−3
Average max. and min. temperatures in °C
Precipitation totals in mm
Imperial conversion
JFMAMJJASOND
 
 
1.3
 
 
39
25
 
 
1.7
 
 
45
27
 
 
1.9
 
 
54
34
 
 
2.4
 
 
63
41
 
 
3.8
 
 
70
50
 
 
4.2
 
 
77
55
 
 
4.1
 
 
81
59
 
 
4
 
 
81
57
 
 
4.4
 
 
70
50
 
 
3.4
 
 
61
43
 
 
3.2
 
 
50
36
 
 
2.4
 
 
41
27
Average max. and min. temperatures in °F
Precipitation totals in inches
Labuan, Malaysia
Climate chart (explanation)
J
F
M
A
M
J
J
A
S
O
N
D
 
 
112
 
 
30
24
 
 
117
 
 
30
24
 
 
150
 
 
31
24
 
 
297
 
 
32
24
 
 
345
 
 
32
24
 
 
351
 
 
31
24
 
 
318
 
 
31
25
 
 
297
 
 
31
24
 
 
417
 
 
31
24
 
 
465
 
 
31
24
 
 
419
 
 
31
24
 
 
285
 
 
30
24
Average max. and min. temperatures in °C
Precipitation totals in mm
Imperial conversion
JFMAMJJASOND
 
 
4.4
 
 
86
75
 
 
4.6
 
 
86
75
 
 
5.9
 
 
88
75
 
 
12
 
 
90
75
 
 
14
 
 
90
75
 
 
14
 
 
88
75
 
 
13
 
 
88
77
 
 
12
 
 
88
75
 
 
16
 
 
88
75
 
 
18
 
 
88
75
 
 
16
 
 
88
75
 
 
11
 
 
86
75
Average max. and min. temperatures in °F
Precipitation totals in inches
Cusco, Peru
Climate chart (explanation)
J
F
M
A
M
J
J
A
S
O
N
D
 
 
163
 
 
20
7
 
 
150
 
 
21
7
 
 
109
 
 
21
7
 
 
51
 
 
22
4
 
 
15
 
 
21
2
 
 
5
 
 
21
1
 
 
5
 
 
21
−1
 
 
10
 
 
21
1
 
 
25
 
 
22
4
 
 
67
 
 
22
6
 
 
76
 
 
23
6
 
 
137
 
 
22
7
Average max. and min. temperatures in °C
Precipitation totals in mm
Imperial conversion
JFMAMJJASOND
 
 
6.4
 
 
68
45
 
 
5.9
 
 
70
45
 
 
4.3
 
 
70
45
 
 
2
 
 
72
39
 
 
0.6
 
 
70
36
 
 
0.2
 
 
70
34
 
 
0.2
 
 
70
30
 
 
0.4
 
 
70
34
 
 
1
 
 
72
39
 
 
2.6
 
 
72
43
 
 
3
 
 
73
43
 
 
5.4
 
 
72
45
Average max. and min. temperatures in °F
Precipitation totals in inches

As displayed in the accompanying chart, Maribor has a temperate climate with warm summers and chilly winters. It lies in the northern hemisphere, so the temperatures peak in July and August. The temperature in Labuan, which lies near the equator, hardly changes through the year. Instead of summers and winters, there is a dry season in the beginning of the year, followed by a wet season with high rainfall. Cusco also lies in the Tropical Zone, but at a much higher altitude in the Andean highlands, and also much drier. Almost like in Labuan, the daily high temperature barely changes through the year, but they are significantly cooler due to the altitude. Nights in Cusco are much colder than during the day, especially in the dry months from May to August.

Usage

[edit]
argument 1
Appears in the heading
arguments 237
The data. Think of it as 12 rows, one for each month, with left column for average low temperature, middle column for average high temperature and right column for precipitation.
maxprecip=
Supply highest monthly precipitation number if the blue precipitation bars pop out of the chart (happens if any of the monthly numbers is greater than about 750 mm (30 in.))
float=
left, right or none.
clear=
left, right, both or none.
source=
Supply the source of your data

Empty syntax

[edit]
{{climate chart
| <!--- India --->
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
|maxprecip = <!--- supply largest monthly precipitation, in case it's > 750 mm (30 in.) --->
|float     = <!--- left, right, or none --->
|clear     = <!--- left, right, both, or none --->
|units     = <!--- set to "imperial" if the values are in °F and inches --->
|source    = <!--- source of the data --->
}}

Units

[edit]

In articles where SI units (°C, mm) are preferred, input the data in those units. This is the default state — no further parameters are needed. In articles where imperial units (°F, inches) are preferred, input data in those units and specify the parameter units=imperial (see below). This parameter must be used so that the units are labeled correctly and so the conversion is done properly.

Examples

[edit]

Float: right

[edit]
Amsterdam
Climate chart (explanation)
J
F
M
A
M
J
J
A
S
O
N
D
 
 
62
 
 
5
1
 
 
43
 
 
6
0
 
 
59
 
 
9
2
 
 
41
 
 
12
4
 
 
48
 
 
17
8
 
 
68
 
 
19
10
 
 
66
 
 
21
13
 
 
61
 
 
22
12
 
 
82
 
 
18
10
 
 
85
 
 
14
7
 
 
89
 
 
9
4
 
 
75
 
 
6
2
Average max. and min. temperatures in °C
Precipitation totals in mm
Imperial conversion
JFMAMJJASOND
 
 
2.4
 
 
42
33
 
 
1.7
 
 
43
32
 
 
2.3
 
 
49
36
 
 
1.6
 
 
54
39
 
 
1.9
 
 
63
46
 
 
2.7
 
 
67
51
 
 
2.6
 
 
71
55
 
 
2.4
 
 
71
54
 
 
3.2
 
 
65
50
 
 
3.4
 
 
57
45
 
 
3.5
 
 
49
39
 
 
2.9
 
 
43
35
Average max. and min. temperatures in °F
Precipitation totals in inches
{{climate chart
| [[Amsterdam]]
|0.5|5.4|62.1
|0.2|6.0|43.4
|2.4|9.2|58.9
|4.0|12.4|41.0
|7.8|17.1|48.3
|10.4|19.2|67.5
|12.5|21.4|65.8
|12.3|21.8|61.4
|10.2|18.4|82.1
|7.0|14.1|85.1
|3.9|9.2|89.0
|1.9|6.2|74.9
|float=right
|clear=right
}}

Float: left

[edit]
Bilbao
Climate chart (explanation)
J
F
M
A
M
J
J
A
S
O
N
D
 
 
15
 
 
13
6
 
 
15
 
 
14
6
 
 
15
 
 
16
7
 
 
17
 
 
17
8
 
 
16
 
 
19
11
 
 
12
 
 
22
14
 
 
11
 
 
25
16
 
 
11
 
 
25
16
 
 
11
 
 
24
14
 
 
15
 
 
21
12
 
 
15
 
 
17
9
 
 
14
 
 
14
7
Average max. and min. temperatures in °C
Precipitation totals in mm
Source: BBC Weather
Imperial conversion
JFMAMJJASOND
 
 
0.6
 
 
55
43
 
 
0.6
 
 
57
43
 
 
0.6
 
 
61
45
 
 
0.7
 
 
63
46
 
 
0.6
 
 
66
52
 
 
0.5
 
 
72
57
 
 
0.4
 
 
77
61
 
 
0.4
 
 
77
61
 
 
0.4
 
 
75
57
 
 
0.6
 
 
70
54
 
 
0.6
 
 
63
48
 
 
0.6
 
 
57
45
Average max. and min. temperatures in °F
Precipitation totals in inches
{{climate chart
| [[Bilbao]]
|6|13|15
|6|14|15
|7|16|15
|8|17|17
|11|19|16
|14|22|12
|16|25|11
|16|25|11
|14|24|11
|12|21|15
|9|17|15
|7|14|14
|float=left
|source=[http://www.bbc.co.uk/weather/ BBC Weather]
}}

Non-float

[edit]
Coober Pedy
Climate chart (explanation)
J
F
M
A
M
J
J
A
S
O
N
D
 
 
17
 
 
36
21
 
 
23
 
 
36
21
 
 
13
 
 
33
18
 
 
6.5
 
 
28
14
 
 
13
 
 
23
10
 
 
14
 
 
19
7
 
 
7.8
 
 
19
6
 
 
9.2
 
 
21
7
 
 
8.4
 
 
25
10
 
 
15
 
 
29
14
 
 
12
 
 
32
17
 
 
18
 
 
35
19
Average max. and min. temperatures in °C
Precipitation totals in mm
Imperial conversion
JFMAMJJASOND
 
 
0.7
 
 
98
69
 
 
0.9
 
 
96
69
 
 
0.5
 
 
91
65
 
 
0.3
 
 
82
57
 
 
0.5
 
 
74
50
 
 
0.6
 
 
66
45
 
 
0.3
 
 
66
43
 
 
0.4
 
 
69
45
 
 
0.3
 
 
76
50
 
 
0.6
 
 
84
56
 
 
0.5
 
 
90
62
 
 
0.7
 
 
94
66
Average max. and min. temperatures in °F
Precipitation totals in inches
{{climate chart
| [[Coober Pedy, South Australia|Coober Pedy]]
|20.7|36.4|17.4
|20.8|35.7|22.8
|18.2|32.8|12.9
|14|27.6|6.5
|10.1|23.3|13.1
|7.2|18.8|14.4
|6.3|18.7|7.8
|7.4|20.7|9.2
|10.1|24.5|8.4
|13.6|28.9|14.9
|16.6|32.1|11.6
|19.1|34.6|17.5
}}

Imperial units

[edit]
Anchorage
Climate chart (explanation)
J
F
M
A
M
J
J
A
S
O
N
D
 
 
0.7
 
 
22
9
 
 
0.7
 
 
26
12
 
 
0.7
 
 
34
18
 
 
0.5
 
 
44
29
 
 
0.7
 
 
55
39
 
 
1.1
 
 
62
47
 
 
1.7
 
 
65
52
 
 
2.9
 
 
63
49
 
 
2.9
 
 
55
41
 
 
2.1
 
 
40
28
 
 
1.1
 
 
28
16
 
 
1.1
 
 
24
11
Average max. and min. temperatures in °F
Precipitation totals in inches
Metric conversion
J
F
M
A
M
J
J
A
S
O
N
D
 
 
17
 
 
−6
−13
 
 
19
 
 
−3
−11
 
 
17
 
 
1
−8
 
 
13
 
 
7
−2
 
 
18
 
 
13
4
 
 
27
 
 
17
8
 
 
43
 
 
18
11
 
 
74
 
 
17
9
 
 
73
 
 
13
5
 
 
53
 
 
4
−2
 
 
28
 
 
−2
−9
 
 
27
 
 
−4
−12
Average max. and min. temperatures in °C
Precipitation totals in mm
{{climate chart
| [[Anchorage, Alaska|Anchorage]]
|9|22|.68
|12|26|.74
|18|34|.65
|29|44|.52
|39|55|.7
|47|62|1.06
|52|65|1.7
|49|63|2.93
|41|55|2.87
|28|40|2.09
|16|28|1.09
|11|24|1.05
|float=right
|clear=right
|units=imperial
}}

Large precipitation numbers (without re-scaling)

[edit]
Baguio City, Philippines
Climate chart (explanation)
J
F
M
A
M
J
J
A
S
O
N
D
 
 
20
 
 
22
12
 
 
20
 
 
22
13
 
 
40
 
 
24
14
 
 
100
 
 
25
15
 
 
400
 
 
24
16
 
 
430
 
 
23
16
 
 
1070
 
 
21
15
 
 
1160
 
 
21
15
 
 
710
 
 
21
15
 
 
380
 
 
22
15
 
 
120
 
 
23
15
 
 
50
 
 
23
13
Average max. and min. temperatures in °C
Precipitation totals in mm
Imperial conversion
JFMAMJJASOND
 
 
0.8
 
 
72
54
 
 
0.8
 
 
72
55
 
 
1.6
 
 
75
57
 
 
3.9
 
 
77
59
 
 
16
 
 
75
61
 
 
17
 
 
73
61
 
 
42
 
 
70
59
 
 
46
 
 
70
59
 
 
28
 
 
70
59
 
 
15
 
 
72
59
 
 
4.7
 
 
73
59
 
 
2
 
 
73
55
Average max. and min. temperatures in °F
Precipitation totals in inches
{{climate chart
|[[Baguio City, Philippines]]
|12 |22 |20
|13 |22 |20
|14 |24 |40
|15 |25 |100
|16 |24 |400
|16 |23 |430
|15 |21 |1070
|15 |21 |1160
|15 |21 |710
|15 |22 |380
|15 |23 |120
|13 |23 |50
|float=right
|clear=right
}}

Large precipitation numbers (with re-scaling)

[edit]
Baguio City, Philippines
Climate chart (explanation)
J
F
M
A
M
J
J
A
S
O
N
D
 
 
20
 
 
22
12
 
 
20
 
 
22
13
 
 
40
 
 
24
14
 
 
100
 
 
25
15
 
 
400
 
 
24
16
 
 
430
 
 
23
16
 
 
1070
 
 
21
15
 
 
1160
 
 
21
15
 
 
710
 
 
21
15
 
 
380
 
 
22
15
 
 
120
 
 
23
15
 
 
50
 
 
23
13
Average max. and min. temperatures in °C
Precipitation totals in mm
Imperial conversion
JFMAMJJASOND
 
 
0.8
 
 
72
54
 
 
0.8
 
 
72
55
 
 
1.6
 
 
75
57
 
 
3.9
 
 
77
59
 
 
16
 
 
75
61
 
 
17
 
 
73
61
 
 
42
 
 
70
59
 
 
46
 
 
70
59
 
 
28
 
 
70
59
 
 
15
 
 
72
59
 
 
4.7
 
 
73
59
 
 
2
 
 
73
55
Average max. and min. temperatures in °F
Precipitation totals in inches
{{climate chart
|[[Baguio City, Philippines]]
|12 |22 |20
|13 |22 |20
|14 |24 |40
|15 |25 |100
|16 |24 |400
|16 |23 |430
|15 |21 |1070
|15 |21 |1160
|15 |21 |710
|15 |22 |380
|15 |23 |120
|13 |23 |50
|maxprecip=1160
|float=right
|clear=right
}}

Values of |maxprecip= less than or equal to 750 have no effect.