Template:Tropical cyclone season effects
This template uses Lua: |
Usage
Creates the tropical cyclone season effects table found in tropical cyclone articles.
If the season spans multiple years, you need to use the start-year
and end-year
parameters to specify the start and end of the season article. You also need to set the force-year
parameter on each
- REDIRECT Template:Template link
This page is a redirect. The following categories are used to track and monitor this redirect:
|
true
(or similarly truthy) in order to show the full year instead of just the months.
The footer values are automatically calculated. The {{{1}}}
of the template must always be a set of {{Tropical cyclone season effects (cyclone)}} templates, as this template contains the tracking metadata required to automatically calculate the season aggregates. You can include other templates, however if this were a row for a storm, its data will not be used in calculations unless the proper metadata tag is added.
Examples
The following is a reconstruction of the 2020 Pacific typhoon season effects table. Note that the final calculation for damages are different. This is because the damages listed in the original article is incorrect. You can use any calculator at your disposal to confirm this.
2020 Pacific typhoon season
|
---|
The header can be hidden with no-header
.
When the table is empty, it becomes unsortable and no values are displayed in the season aggregates. Lua error in package.lua at line 80: module 'Module:Template invocation' not found.
When the season is ongoing and cyclones are currently active, the season's period will show the entire period of the season. If the season is ongoing but no cyclones are active, the active
argument must be set to any truthy value in order to display the period as "Season ongoing".
Lua error in package.lua at line 80: module 'Module:Template invocation' not found.
Wikitext
|
---|
{{Tropical cyclone season effects|no-header=yes|year=2021|basin=WPac| {{Tropical cyclone season effects (cyclone)|name=Storm A|formed=2020-01-17|dissipated=2020-01-21|category=nwpstorm|winds=20|pressure=1004|damages=10000000|deaths=0}} {{Tropical cyclone season effects (cyclone)|name=Storm B|formed=2020-10-01|dissipated=|category=depression|winds=40|pressure=960|damages=50000|deaths-prefix=>|deaths=2322}} }} |
Lua error in package.lua at line 80: module 'Module:Template invocation' not found.
Wikitext
|
---|
{{Tropical cyclone season effects|active=yes|no-header=yes|year=2021|basin=WPac| {{Tropical cyclone season effects (cyclone)|name=Storm B|formed={{CURRENTYEAR}}-01-01|dissipated={{CURRENTYEAR}}-01-04|category=depression|winds=Not specified|damages=0|deaths=0}} }} |
Mechanism
{{Tropical cyclone season effects (cyclone)}} automatically inserts the following element inside the "name" cell.
<syntaxhighlight lang="html">
</syntaxhighlight>
This metadata element is not displayed, and should be invisible from the user in all cases. The data-tcse-entry
attribute is the primary search target for the template module. It contains a JSON string that includes specific data about the storm. This is then parsed by the main template to automatically summarize the values.
The default units are the units most used internationally – kilometers per hour (kph), hectopascals (hPa), and US dollars ($). These units may be overriden in the cyclone entry template using the winds-unit
, pressure-unit
, and damages-currency
parameters. These same parameters can be used in the main template in order to override the results of the final computation. The currency link at the header can be modified with the currency-link
parameter.
This template disallows mixed units in each row. If different units are used in one of the rows, the entire table will return an error.
See also
This template is composed of two other templates and requires one template for its content.
- Template:Tropical cyclone season effects (top)
- Template:Tropical cyclone season effects (bottom)
- Template:Tropical cyclone season effects (cyclone), which denotes entries in the template
- Template:Australian cyclone season effects (top), the basis for the header
<templatedata> { "params": { "1": { "label": "Storms", "description": "A set of Template:Tropical cyclone season effects (cyclone templates, which will provide the data for this template.", "example": "Template:TCSEC", "type": "content", "required": true, "suggested": true }, "no-header": { "label": "Don't show header?", "description": "Whether or not to hide the table header. If true, `basin` and `year` are no longer required.", "type": "boolean", "suggested": true }, "basin": { "label": "Basin", "description": "The basin of the season article", "example": "WPac, Atl, EPac, etc.", "type": "string", "suggested": true }, "winds-target": { "label": "Wind speed target unit", "description": "The targeted unit for conversion. This is automatically guessed, but can be forced by the user.", "example": "kph, mph, kn", "type": "string" }, "pressure-target": { "label": "Pressure target unit", "description": "The targeted unit for conversion. This is automatically guessed, but can be forced by the user.", "example": "hPa, inHg, mbar", "type": "string" }, "currency": { "label": "Currency", "description": "The currency symbol for damages. This should be the same as the currency used in the main table content.", "example": "€, £, ¥, etc.", "type": "string", "default": "$" }, "footer-refs": { "label": "References", "description": "References placed in the footer (season aggregates).", "type": "content", "suggested": true }, "active": { "label": "Active?", "description": "Forces the footer of the template to show \"Season ongoing\".", "example": "yes", "type": "boolean", "suggested": true }, "season-start-year": { "aliases": [ "year" ], "label": "Season (start) year", "description": "If this is a single-year article, this is the year of the season. If this is a multi-year article, this is the first year this article handles.", "type": "number", "suggested": true }, "season-end-year": { "label": "Season end year", "description": "If this is a multi-year season article, this is the last year this article handles.", "type": "number", "suggested": true } }, "description": "Aggregates the overall effects of tropical cyclones in a given year range and basin.", "format": "block", "paramOrder": [ "no-header", "basin", "season-start-year", "season-end-year", "winds-target", "pressure-target", "currency", "footer-refs", "active", "1" ] } </templatedata>
The above documentation is transcluded from Template:Tropical cyclone season effects/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |