Difference between revisions of "Module:Climate/doc"
Jump to navigation
Jump to search
blackwiki>Erutuon (→Issues: dealt with) |
m (30 revisions imported) |
||
| (7 intermediate revisions by one other user not shown) | |||
| Line 4: | Line 4: | ||
== Function == | == Function == | ||
| − | ; | + | ; {{para|Koeppen_template}} |
: Parameters: | : Parameters: | ||
| − | :; | + | :; {{para|1}}, {{para|2}} |
:: Temperatures and precipitation figures (12, one per month), separated by any characters that are not digits (0-9), hyphen-minuses (-), or periods (.). | :: Temperatures and precipitation figures (12, one per month), separated by any characters that are not digits (0-9), hyphen-minuses (-), or periods (.). | ||
| − | :; | + | :; {{para|3|yes}} |
| + | :: Indicates that the data is from a location in the Southern Hemisphere. The default is the Northern Hemisphere. This is used to determine the high-sun and low-sun halves of the year. | ||
| + | :; {{para|alt_CD}} | ||
:: Use -3 °C as the dividing line between C and D climates. The default is 0 °C. | :: Use -3 °C as the dividing line between C and D climates. The default is 0 °C. | ||
| − | :; | + | :; {{para|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. | :: 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. | ||
| − | :; | + | :; {{para|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. | :: 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. | ||
| Line 20: | Line 22: | ||
|url=http://www.weatherbase.com/weather/weather.php3?s=10227 | |url=http://www.weatherbase.com/weather/weather.php3?s=10227 | ||
|20.7 21.7 22.9 24.7 26.8 28.5 29.2 29.2 28.4 26.8 24.3 21.9 | |20.7 21.7 22.9 24.7 26.8 28.5 29.2 29.2 28.4 26.8 24.3 21.9 | ||
| − | |50.8 38.1 53.3 53.3 76.2 104.1 91.4 137.2 170.2 124.5 58.4 55.9 }} | + | |50.8 38.1 53.3 53.3 76.2 104.1 91.4 137.2 170.2 124.5 58.4 55.9}} |
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
|location=Lagos, Nigeria | |location=Lagos, Nigeria | ||
|url=http://www.weatherbase.com/weather/weather.php3?s=10256 | |url=http://www.weatherbase.com/weather/weather.php3?s=10256 | ||
|27 28 28 28 27 26 25 25 25 26 27 27 | |27 28 28 28 27 26 25 25 25 26 27 27 | ||
| − | |13 41 84 146 202 316 243 122 160 125 40 15 }} | + | |13 41 84 146 202 316 243 122 160 125 40 15}} |
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
|location=Cheyenne | |location=Cheyenne | ||
|url=http://www.weatherbase.com/weather/weather.php3?s=46527 | |url=http://www.weatherbase.com/weather/weather.php3?s=46527 | ||
|-1.8 -1.3 2.2 6 11.3 16.7 20.8 19.8 14.6 7.9 1.8 -2.4 | |-1.8 -1.3 2.2 6 11.3 16.7 20.8 19.8 14.6 7.9 1.8 -2.4 | ||
| − | |7.6 12.7 27.9 45.7 58.4 58.4 55.9 50.8 38.1 22.9 15.2 12.7 }} | + | |7.6 12.7 27.9 45.7 58.4 58.4 55.9 50.8 38.1 22.9 15.2 12.7}} |
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
|location=Leh, India | |location=Leh, India | ||
| Line 47: | Line 49: | ||
|url=http://www.weatherbase.com/weather/weather.php3?s=87227 | |url=http://www.weatherbase.com/weather/weather.php3?s=87227 | ||
|13.6 15.4 18.4 22.6 27.8 32.7 34.9 34.2 31.3 24.8 17.8 13 | |13.6 15.4 18.4 22.6 27.8 32.7 34.9 34.2 31.3 24.8 17.8 13 | ||
| − | |22.9 22.9 25.4 7.6 2.5 0<!-- actually given as "---" --> 27.9 25.4 15.2 15.2 17.8 22.9 }} | + | |22.9 22.9 25.4 7.6 2.5 0<!-- actually given as "---" --> 27.9 25.4 15.2 15.2 17.8 22.9}} |
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
|location=Los Angeles, California | |location=Los Angeles, California | ||
|url=http://www.weatherbase.com/weather/weather.php3?s=159227 | |url=http://www.weatherbase.com/weather/weather.php3?s=159227 | ||
|14.1 14.7 15.6 16.8 18.2 20.2 22.6 23 22.3 20.1 17.2 14.6 | |14.1 14.7 15.6 16.8 18.2 20.2 22.6 23 22.3 20.1 17.2 14.6 | ||
| − | |82 87 61 26 6 2 0<!-- actually given as "---" --> 1 7 12 32 62 }} | + | |82 87 61 26 6 2 0<!-- actually given as "---" --> 1 7 12 32 62}} |
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
|location=Rangpur, India | |location=Rangpur, India | ||
|url=https://en.climate-data.org/location/4997/ | |url=https://en.climate-data.org/location/4997/ | ||
|17.3 19.5 23.7 27.5 27.8 28.2 28.7 29 28.7 26.6 22.4 18.9 | |17.3 19.5 23.7 27.5 27.8 28.2 28.7 29 28.7 26.6 22.4 18.9 | ||
| − | |9 12 26 78 291 481 461 352 315 154 10 3 }} | + | |9 12 26 78 291 481 461 352 315 154 10 3}} |
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
|location= New York, New York | |location= New York, New York | ||
|url=http://www.weatherbase.com/weather/weather.php3?s=330527 | |url=http://www.weatherbase.com/weather/weather.php3?s=330527 | ||
|0.5 1.8 5.7 11.5 16.9 22.3 25.2 24.6 20.6 14.5 9.1 3.4 | |0.5 1.8 5.7 11.5 16.9 22.3 25.2 24.6 20.6 14.5 9.1 3.4 | ||
| − | |81.3 71.1 101.6 101.6 96.5 99.1 114.3 104.1 94 96.5 86.4 91.4 }} | + | |81.3 71.1 101.6 101.6 96.5 99.1 114.3 104.1 94 96.5 86.4 91.4}} |
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
|location=Issaguen, Morocco | |location=Issaguen, Morocco | ||
|url=https://en.climate-data.org/location/291935/ | |url=https://en.climate-data.org/location/291935/ | ||
|4 4.6 6.8 10.9 12.5 16.2 19.9 19.8 15.9 11.5 8.2 5.3 | |4 4.6 6.8 10.9 12.5 16.2 19.9 19.8 15.9 11.5 8.2 5.3 | ||
| − | |151 142 142 92 48 19 4 6 27 71 146 151 | + | |151 142 142 92 48 19 4 6 27 71 146 151}} |
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
|location=Maseru, Lesotho | |location=Maseru, Lesotho | ||
| Line 78: | Line 80: | ||
|url=http://www.weatherbase.com/weather/weather.php3?s=109013 | |url=http://www.weatherbase.com/weather/weather.php3?s=109013 | ||
|1.1 1.7 5.2 10.3 14.9 18.7 20.3 19.8 16.7 11.2 5.8 1.7 | |1.1 1.7 5.2 10.3 14.9 18.7 20.3 19.8 16.7 11.2 5.8 1.7 | ||
| − | |105 103 137 114 119 118 137 130 124 116 106 102 }} | + | |105 103 137 114 119 118 137 130 124 116 106 102}} |
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
|location=Quito | |location=Quito | ||
| Line 85: | Line 87: | ||
|110 120 150 170 120 40 20 20 70 120 100 100 | |110 120 150 170 120 40 20 20 70 120 100 100 | ||
|yes}} | |yes}} | ||
| + | * {{#invoke:Climate|example | ||
| + | |location=La Paz, Bolivia | ||
| + | |url=https://www.dwd.de/DWD/klima/beratung/ak/ak_852010_kt.pdf | ||
| + | |9.3 9.0 8.9 8.8 8.2 7.3 6.8 8.2 8.7 10.0 10.5 9.7 | ||
| + | |133.7 104.7 71.7 31.7 14.3 5.1 7.1 15.2 35.5 38.1 50.5 94.9 | ||
| + | |yes}} | ||
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
|location=Balmaceda | |location=Balmaceda | ||
| Line 107: | Line 115: | ||
|url=http://www.weather.go.kr/weather/climate/average_30years.jsp?yy_st=2011&stn=108&norm=M&obs=0&mm=5&dd=25&x=25&y=5 | |url=http://www.weather.go.kr/weather/climate/average_30years.jsp?yy_st=2011&stn=108&norm=M&obs=0&mm=5&dd=25&x=25&y=5 | ||
|-2.4 0.4 5.7 12.5 17.8 22.2 24.9 25.7 21.2 14.8 7.2 0.4 | |-2.4 0.4 5.7 12.5 17.8 22.2 24.9 25.7 21.2 14.8 7.2 0.4 | ||
| − | |20.8 25.0 47.2 64.5 105.9 133.2 394.7 364.2 169.3 51.8 52.5 21.5 }} | + | |20.8 25.0 47.2 64.5 105.9 133.2 394.7 364.2 169.3 51.8 52.5 21.5}} |
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
|location=Arak, Iran | |location=Arak, Iran | ||
|url=https://en.climate-data.org/location/767/ | |url=https://en.climate-data.org/location/767/ | ||
|-5.5 -3.5 6.6 10.4 14.8 21.8 26.1 24.4 21.8 14.7 6.8 3.4 | |-5.5 -3.5 6.6 10.4 14.8 21.8 26.1 24.4 21.8 14.7 6.8 3.4 | ||
| − | |55 43 50 27 16 1 1 1 1 9 38 74 | + | |55 43 50 27 16 1 1 1 1 9 38 74}} |
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
|location=Denver | |location=Denver | ||
| Line 122: | Line 130: | ||
|url=http://www.weatherbase.com/weather/weather.php3?s=38257 | |url=http://www.weatherbase.com/weather/weather.php3?s=38257 | ||
|-1.1 -0.9 -0.1 2.9 6.6 11.3 15.2 15.2 12.3 7.2 1.2 -1 | |-1.1 -0.9 -0.1 2.9 6.6 11.3 15.2 15.2 12.3 7.2 1.2 -1 | ||
| − | |165 211 210 84 51 39 18 16 45 99 169 161 }} | + | |165 211 210 84 51 39 18 16 45 99 169 161}} |
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
|location=Vladivostok | |location=Vladivostok | ||
|url=http://www.weatherbase.com/weather/weather.php3?s=6913 | |url=http://www.weatherbase.com/weather/weather.php3?s=6913 | ||
|-13.4 -9.9 -2.7 4.5 9.5 13.2 17.6 20 15.9 8.9 -1.1 -9.8 | |-13.4 -9.9 -2.7 4.5 9.5 13.2 17.6 20 15.9 8.9 -1.1 -9.8 | ||
| − | |10 10 20 40 60 90 100 140 120 50 30 10 }} | + | |10 10 20 40 60 90 100 140 120 50 30 10}} |
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
|location=St. Petersburg | |location=St. Petersburg | ||
|url=http://www.weatherbase.com/weather/weather.php3?s=36062 | |url=http://www.weatherbase.com/weather/weather.php3?s=36062 | ||
|-8 -7.9 -3.1 3.7 10.3 14.7 16.9 15.1 10 4.6 -1.3 -5.4 | |-8 -7.9 -3.1 3.7 10.3 14.7 16.9 15.1 10 4.6 -1.3 -5.4 | ||
| − | |20 20 20 30 40 50 60 70 60 50 40 30 }} | + | |20 20 20 30 40 50 60 70 60 50 40 30}} |
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
|location=Anchorage | |location=Anchorage | ||
|url=http://www.weatherbase.com/weather/weather.php3?s=428005 | |url=http://www.weatherbase.com/weather/weather.php3?s=428005 | ||
|-11.3, -9, -5.4, 1.3, 7.7, 12.2, 14.6, 12.8, 7.6, -0.2, -8.2, -10 | |-11.3, -9, -5.4, 1.3, 7.7, 12.2, 14.6, 12.8, 7.6, -0.2, -8.2, -10 | ||
| − | |25.4, 20.3, 22.9, 7.6, 17.8, 27.9, 55.9, 73.7, 73.7, 45.7, 30.5, 40.6 }} | + | |25.4, 20.3, 22.9, 7.6, 17.8, 27.9, 55.9, 73.7, 73.7, 45.7, 30.5, 40.6}} |
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
|location=Khatgal, Mongolia | |location=Khatgal, Mongolia | ||
|url=https://en.climate-data.org/location/870668/ | |url=https://en.climate-data.org/location/870668/ | ||
|-23.6 -20.4 -12.5 -2.9 4.9 10 12.2 10.6 5 -3.8 -13.9 -20.5 | |-23.6 -20.4 -12.5 -2.9 4.9 10 12.2 10.6 5 -3.8 -13.9 -20.5 | ||
| − | |1 1 3 8 14 48 83 71 34 11 5 1 }} | + | |1 1 3 8 14 48 83 71 34 11 5 1}} |
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
|location=Fairbanks | |location=Fairbanks | ||
|url=http://www.weatherbase.com/weather/weather.php3?s=16207 | |url=http://www.weatherbase.com/weather/weather.php3?s=16207 | ||
|-22.2 -18.5 -11.4 0.3 9.7 15.8 16.9 13.4 7.2 -4.3 -16.3 -20.1 | |-22.2 -18.5 -11.4 0.3 9.7 15.8 16.9 13.4 7.2 -4.3 -16.3 -20.1 | ||
| − | |15.2 10.2 7.6 7.6 15.2 35.6 55.9 48.3 27.9 20.3 17.8 15.2 }} | + | |15.2 10.2 7.6 7.6 15.2 35.6 55.9 48.3 27.9 20.3 17.8 15.2}} |
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
|location=Mount Washington, New Hampshire | |location=Mount Washington, New Hampshire | ||
|url=http://www.weatherbase.com/weather/weather.php3?s=31627 | |url=http://www.weatherbase.com/weather/weather.php3?s=31627 | ||
|-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 | * {{#invoke:Climate|example | ||
|location=Nagqu, Tibet | |location=Nagqu, Tibet | ||
|url=http://www.weatherbase.com/weather/weather.php3?s=552990 | |url=http://www.weatherbase.com/weather/weather.php3?s=552990 | ||
|-13 -10 -6 -1 3 7 9 8 5 0<!-- given as --- --> -7 -11 | |-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 | + | |2 2 3 10 26 82 106 94 69 20 3 3}} |
| − | |||
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
|location=Alert | |location=Alert | ||
|url=http://www.weatherbase.com/weather/weather.php3?s=28017 | |url=http://www.weatherbase.com/weather/weather.php3?s=28017 | ||
|-32.2 -33.2 -32.4 -24.3 -11.5 -0.4 3.4 0.8 -8.4 -18.9 -26 -29.4 | |-32.2 -33.2 -32.4 -24.3 -11.5 -0.4 3.4 0.8 -8.4 -18.9 -26 -29.4 | ||
| − | |7.2 7 7.5 10.6 11.6 12 31.8 17.9 22.3 13.4 10.4 6.8 }} | + | |7.2 7 7.5 10.6 11.6 12 31.8 17.9 22.3 13.4 10.4 6.8}} |
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
|location=McMurdo Sound | |location=McMurdo Sound | ||
| Line 174: | Line 181: | ||
|url=https://en.climate-data.org/location/4879/ | |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 | |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 | + | |124 98 75 31 14 6 7 13 32 36 51 90}} |
| − | }} | + | * {{#invoke:Climate|example |
| + | |location=Anchorage | ||
| + | |url=https://w2.weather.gov/climate/xmacis.php?wfo=pafc | ||
| + | |−5.2 −2.7 1.7 7.8 13.8 17.3 18.6 17.5 13.1 4.9 −2.6 −4.6 | ||
| + | |−11.4 −10 −7.2 −1.8 3.8 8.2 10.7 9.6 5.1 −1.7 −8.4 −10.4 | ||
| + | |19 18.5 15.5 11.9 19.3 24.4 46.5 82.6 75.7 51.8 29.7 28.4}} | ||
| + | * {{#invoke:Climate|example | ||
| + | |location=Brian Head, Utah | ||
| + | |url=https://www.wrcc.dri.edu/cgi-bin/cliMAIN.pl?ut0900 | ||
| + | |highs=29.7 31.9 37.8 43.4 53.2 64.6 70.4 68.8 60.4 47.4 35.1 28.6 | ||
| + | |lows=10.0 10.7 14.5 19.3 27.3 35.4 41.5 42.0 33.9 24.2 15.0 9.7 | ||
| + | |precip=3.77 3.97 3.99 3.53 1.42 1.13 2.14 2.66 2.17 3.11 2.67 3.03 | ||
| + | |temp_unit=F | ||
| + | |precip_unit=inch}} | ||
<!-- | <!-- | ||
* {{#invoke:Climate|example | * {{#invoke:Climate|example | ||
| Line 181: | Line 201: | ||
|url= | |url= | ||
| | | | ||
| − | | | + | |}} |
| − | |||
--> | --> | ||
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | | <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | | ||
| − | <!-- Categories below this line, please; interwikis at Wikidata --> | + | <!-- Categories below this line, please; interwikis at Wikidata -->}}</includeonly> |
| − | |||
| − | }}</includeonly> | ||
Latest revision as of 15:38, 26 September 2020
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.
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 (.).
|3=yes- Indicates that the data is from a location in the Southern Hemisphere. The default is the Northern Hemisphere. This is used to determine the high-sun and low-sun halves of the year.
|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
- Key West: Aw
- Lagos, Nigeria: Aw
- Cheyenne: BSk
- Leh, India: BWk
- Lima: BWh
- Phoenix: BWh
- Los Angeles, California: Csa
- Rangpur, India: Cwa
- New York, New York: Cfa
- Issaguen, Morocco: Csb
- Maseru, Lesotho: Cwb
- Boone, North Carolina: Cfb
- Quito: Cfb
- La Paz, Bolivia: Cwc
- Balmaceda: Csc
- Sutu Khasa, Bolivia: Cwc
- Ushuaia: Cfc
- Seoul: Dwa
- Arak, Iran: Dsa
- Denver: Dfa
- South Lake Tahoe: Dsb
- Vladivostok: Dwb
- St. Petersburg: Dfb
- Anchorage: Dsc
- Khatgal, Mongolia: Dwc
- Fairbanks: Dfc
- Mount Washington, New Hampshire: ET
- Nagqu, Tibet: ET
- Alert: ET
- McMurdo Sound: EF
- El Alto, Bolivia: ET
- Anchorage: Dsc
- Brian Head, Utah: Dsc