Template:Climate/doc

This template allows a collection of climate information to be placed on a page. Suggested usage is as follows:

Basic usage
In this example we'll create a temperature chart for average temperatures throughout the Faerûnian year.

Note that in this example, the month names are filled in automatically, but the upper limit is too great, leaving a big gap between the highest bar and the top of the empty bar.

Custom title
By default, the title of the climate chart area will say "Climate for article", where 'article' is the name of the article. If you want to change this, you can do so with the title parameter.

Source
The source parameter is useful for specifying a source for your climate data. Also, when providing a source, make sure you provide a page number unless this is absolutely not possible. Note that the reference here is not valid.

Specifying a maximum
In this example, we use the same data as before, but set a maximum value for the bars using maxtemp. The data is the same, but the excessively tall empty bars are trimmed down.

Custom periods
If you do not want a chart of the twelve months, you can specify your own periods. If you do this, you must specify labels, otherwise the default month names will be used, and will be inappropriate.

Custom units
It is possible to change the units displayed on the charts by using the tempunits parameter. This does have the unfortunate effect of making the bars quite small, but there are workarounds in the next sections.

Scaling
By default, one degree of temperature or unit of rainfall equals one pixel in height on the bar chart. If you wish to increase (or for some reason, decrease) this ratio, you may specify a scale factor. Here is the previous example scaled up by 2.5:

Minimum values
If you need to use negative values (for temperature, for example) you can specify a minimum value (mintemp) as well as a maximum. You are not required to specify a maximum if you specify a minimum&mdash;if one is not provided, the default will be used. A side effect of this is that you can make the bars longer by supplying a lower minimum. We scale by a factor of 2.5 again, for comparison with the previous example.

Widths
You can also resize the width of the bars with the width parameter. The default it 16 pixels wide.

Rainfall
You can specify rainfall in a similar way you specify temperature, using maxrain, rainunits, and rain1, rain2, etc. The key difference here is that you cannot specify negative numbers for rainfall, because this is nonsensical. The other difference is that annual precipitation is calculated automatically. Note the default unit of measurement is millimeters. This will usually produce bars of significant height, but if you want to use inches, just scale your bars up to a reasonable height.

Overriding automatic rainfall calculation
If desired, you can specify a custom total rainfall to display on the chart with totalrain. The main use for this is to specify annual precipitation without showing the rainfall bars on the chart.

Custom chart period
If your chart does not represent an annual period, you can change this label on precipitation using chartperiod. In this example, we are creating a rainfall chart that runs for 4 months of the year. Note that if you are not including rainfall on the chart, changing the chart period will have no visible effect.

High, low and average temperature, and snow days
For your chart period, you can optionally specify highest, lowest and average temperatures as well as the number of days that snow covers the ground, using hightemp, lowtemp, averagetemp, and snowdays respectively. This is independent of the need to have a temperature chart on the climate area. In fact, you need not have any charts at all, if so desired.

Full example
 This is a complete example, demonstrating all the features of the template. You will probably not need to use all the features at once like this. Here is the template call: