Difference between revisions of "Module:Climate/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>Erutuon
m (→‎Function: simpler wording)
blackwiki>Erutuon
(issue)
Line 2: Line 2:
 
== Usage ==
 
== Usage ==
 
Exports a function that calculates the [[Köppen climate classification]] of monthly average temperature and precipitation data in degrees Celsius and millimeters, based on the formulas described in the Wikipedia article.
 
Exports a function that calculates the [[Köppen climate classification]] of monthly average temperature and precipitation data in degrees Celsius and millimeters, based on the formulas described in the Wikipedia article.
 +
 +
== Issues ==
 +
* Does E override B or the other way around? That is, if a climate has no month above 10 °C, but is below the aridity threshold, is it B or E? (Because of the formula for the aridity threshold, such a conflict is most likely to arise with an ET climate.)
  
 
== Function ==
 
== Function ==
Line 153: Line 156:
 
|-14.8 -14.5 -10.7 -4.9 1.7 7.1 9.3 8.7 4.9 -0.8 -6.2 -12.2
 
|-14.8 -14.5 -10.7 -4.9 1.7 7.1 9.3 8.7 4.9 -0.8 -6.2 -12.2
 
|173 181 199 185 183 194 195 200 190 196 232 207 }}
 
|173 181 199 185 183 194 195 200 190 196 232 207 }}
 +
* {{#invoke:Climate|example
 +
|location=Nagqu, Tibet
 +
|url=http://www.weatherbase.com/weather/weather.php3?s=552990
 +
|-13 -10 -6 -1 3 7 9 8 5 0<!-- given as --- --> -7 -11
 +
|2 2 3 10 26 82 106 94 69 20 3 3
 +
    }}
 
* {{#invoke:Climate|example
 
* {{#invoke:Climate|example
 
|location=Alert
 
|location=Alert
Line 164: Line 173:
 
|10 20 10 10 20 20 10 10 10 10 10 10
 
|10 20 10 10 20 20 10 10 10 10 10 10
 
|yes}}
 
|yes}}
 +
* {{#invoke:Climate|example
 +
|location=El Alto, Bolivia
 +
|url=https://en.climate-data.org/location/4879/
 +
|8.3 8.2 8.4 7.5 6 4.8 4.6 5.7 6.7 8.7 9.3 8.5
 +
|124 98 75 31 14 6 7 13 32 36 51 90
 +
    }}
 
<!--
 
<!--
 
* {{#invoke:Climate|example
 
* {{#invoke:Climate|example

Revision as of 01:17, 28 June 2018

Usage

Exports a function that calculates the Köppen climate classification of monthly average temperature and precipitation data in degrees Celsius and millimeters, based on the formulas described in the Wikipedia article.

Issues

  • Does E override B or the other way around? That is, if a climate has no month above 10 °C, but is below the aridity threshold, is it B or E? (Because of the formula for the aridity threshold, such a conflict is most likely to arise with an ET climate.)

Function

Koeppen_template
Parameters:
1, 2
Temperatures and precipitation figures (12, one per month), separated by any characters that are not digits (0-9), hyphen-minuses (-), or periods (.).
alt_CD
Use -3 °C as the dividing line between C and D climates. The default is 0 °C.
alt_hk
Cold semi-arid and arid climates (last letter k) have mean annual temperatures below 18 °C. The default is that they have at least one month below 0 °C.
alt_w
Dry-winter climates (last letter w) have more than 70% of precipitation in high-sun half of year. Default is that wettest summer month has ten times as much precipitation as driest winter month.

Examples