मोड्युल:Weather box
स्वरूप
मोड्युल कागजात[हेर्नुहोस्] [सम्पादन गर्नुहोस्] [इतिहास] [ताजा गर्नुहोस्]
This Lua module is used on approximately १८,००० pages and changes may be widely noticed. Test changes in the module's /sandbox or /testcases subpages, or in your own module sandbox. Consider discussing changes on the talk page before implementing them. |
This module is rated as ready for general use. It has reached a mature form and is thought to be relatively bug-free and ready for use wherever appropriate. It is ready to mention on help pages and other Wikipedia resources as an option for new users to learn. To reduce server load and bad output, it should be improved by sandbox testing rather than repeated trial-and-error editing. |
This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
Usage
This module is used by {{Weather box}}.
{{#invoke:Weather box|function_name}}
Edmonton City Centre (Blatchford Field) Airport (1981−2010)को मौसम जानकारी | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
महिना | जनवरी | फेब्रुअरी | मार्च | अप्रिल | मे | जुन | जुलाई | अगस्ट | सेप्टेम्बर | अक्टोबर | नोभेम्बर | डिसेम्बर | वर्ष |
उच्चतम रेकर्ड °से (°फे) | ११.७ (५३.१) |
१४.० (५७.२) |
२३.९ (७५.०) |
३१.१ (८८.०) |
३२.३ (९०.१) |
३४.९ (९४.८) |
३४.६ (९४.३) |
३४.५ (९४.१) |
३३.९ (९३.०) |
२८.६ (८३.५) |
२१.७ (७१.१) |
१६.७ (६२.१) |
३४.९ (९४.८) |
उच्चतम औसत °से (°फे) | −६.० (२१.२) |
−२.७ (२७.१) |
२.२ (३६.०) |
११.२ (५२.२) |
१७.५ (६३.५) |
२१.० (६९.८) |
२३.१ (७३.६) |
२२.६ (७२.७) |
१७.१ (६२.८) |
१०.४ (५०.७) |
०.० (३२.०) |
−४.५ (२३.९) |
९.३ (४८.७) |
दैनिक औसत °से (°फे) | −१०.४ (१३.३) |
−७.६ (१८.३) |
−२.५ (२७.५) |
५.४ (४१.७) |
११.५ (५२.७) |
१५.५ (५९.९) |
१७.७ (६३.९) |
१६.९ (६२.४) |
११.४ (५२.५) |
५.१ (४१.२) |
−४.१ (२४.६) |
−८.८ (१६.२) |
४.२ (३९.६) |
न्यूनतम औसत °से (°फे) | −१४.८ (५.४) |
−१२.५ (९.५) |
−७.२ (१९.०) |
−०.५ (३१.१) |
५.४ (४१.७) |
९.९ (४९.८) |
१२.३ (५४.१) |
११.३ (५२.३) |
५.८ (४२.४) |
−०.२ (३१.६) |
−८.२ (१७.२) |
−१३.१ (८.४) |
−१.० (३०.२) |
न्यूनतम रेकर्ड °से (°फे) | −४४.४ (−४७.९) |
−४६.१ (−५१.०) |
−३६.१ (−३३.०) |
−२५.६ (−१४.१) |
−१२.२ (१०.०) |
−१.१ (३०.०) |
०.६ (३३.१) |
−१.२ (२९.८) |
−११.७ (१०.९) |
−२५.० (−१३.०) |
−३४.१ (−२९.४) |
−४८.३ (−५४.९) |
−४८.३ (−५४.९) |
औसत हिउँ न्यूनतम रेकर्ड | −५२.८ | −५०.७ | −४४.६ | −३७.५ | −१४.५ | ०.० | ०.० | −३.७ | −१३.३ | −३४.३ | −५०.२ | −५५.५ | −५५.५ |
औसत वर्षा मिमी (इन्च) | २१.७ (०.८५) |
१२.० (०.४७) |
१५.८ (०.६२) |
२८.८ (१.१३) |
४६.१ (१.८१) |
७७.५ (३.०५) |
९३.८ (३.६९) |
६१.९ (२.४४) |
४३.५ (१.७१) |
२१.७ (०.८५) |
१८.० (०.७१) |
१५.० (०.५९) |
४५५.७ (१७.९४) |
औसत वर्षा मिमी (इन्च) | १.३ (०.०५) |
०.७६ (०.०३) |
१.७ (०.०७) |
१४.५ (०.५७) |
४०.७ (१.६०) |
७७.५ (३.०५) |
९३.८ (३.६९) |
६१.८ (२.४३) |
४२.४ (१.६७) |
१०.९ (०.४३) |
१.६ (०.०६) |
०.७३ (०.०३) |
३४७.८ (१३.६९) |
औसत हिउँ सेमी (इन्च) | २४.५ (९.६) |
१३.४ (५.३) |
१७.४ (६.९) |
१५.३ (६.०) |
४.९ (१.९) |
०.० (०.०) |
०.० (०.०) |
०.० (०.०) |
१.० (०.४) |
११.६ (४.६) |
१९.१ (७.५) |
१६.४ (६.५) |
१२३.५ (४८.६) |
दैनिक औसत वर्षा (≥ ०.२ mm) | ११.० | ७.९ | ८.३ | ८.८ | ११.० | १४.२ | १४.६ | ११.१ | ९.८ | ८.० | ८.८ | ९.४ | १२२.९ |
वर्षा दिनको औसत (≥ ०.२ mm) | १.१ | ०.८३ | १.४ | ५.९ | १०.५ | १४.२ | १४.६ | ११.१ | ९.६ | ५.६ | १.५ | ०.७५ | ७७.३ |
हिमपात दिनको औसत (≥ ०.२ cm) | १०.७ | ७.७ | ७.७ | ४.२ | १.२ | ०.० | ०.० | ०.० | ०.५० | ३.२ | ७.९ | ९.३ | ५२.४ |
औसत सापेक्ष आर्द्रता (%) | ६५.२ | ६१.२ | ५६.५ | ४२.९ | ४०.४ | ४८.२ | ५२.६ | ५१.४ | ५०.१ | ५०.५ | ६४.७ | ६५.४ | ५४.१ |
मासिक सौर्यप्रकाश घण्टा औसत | १००.८ | १२१.७ | १७६.३ | २४४.२ | २७९.९ | २८५.९ | ३०७.५ | २८२.३ | १९२.७ | १७०.८ | ९८.४ | ८४.५ | २,३४४.८ |
घामको सम्भावित प्रतिशत | ४०.२ | ४४.१ | ४८.१ | ५८.२ | ५६.८ | ५६.२ | ६०.२ | ६१.५ | ५०.४ | ५२.० | ३७.८ | ३६.० | ५०.१ |
पराबैगनी सूचकाङ्क औसत | ० | १ | ३ | ५ | ७ | ९ | ११ | ९ | ७ | ५ | ३ | १ | ५ |
स्रोत: Environment Canada,[१] Weather Atlas[२] |
References
These references will appear in the article, but this list appears only on this page.
- ↑ "Edmonton City Centre Airport", Canadian Climate Normals 1981−2010, Environment Canada, अगस्ट १९, २०१३, अन्तिम पहुँच सेप्टेम्बर १०, २०१३।
- ↑ "Monthly weather forecast and Climate: Edmonton, Canada", Weather Atlas, अन्तिम पहुँच मार्च १२, २०१९।
-- Implement [[Template:Weather box]].
local precision = require('Module:Math')._precision
local DevnagiriSankhya = require('Module:NepaliRupantar').convert
local function stripToNil(text)
-- If text is a non-empty string, return its trimmed content.
-- Otherwise, return nothing (text is an empty string or is not a string).
if type(text) == 'string' then
return text:match('(%S.-)%s*$')
end
end
local function isAny(args, suffix)
local months = { 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' }
for _, month in ipairs(months) do
if stripToNil(args[month .. suffix]) then
return true
end
end
end
local function makeLabel(args, is_first, base, what)
local first
if isAny(args, ' ' .. what .. ' cm') then
first = 'सेमी'
else
if isAny(args, ' ' .. what .. ' mm') then
first = 'मिमी'
else
first = (what == 'snow' or
precision(args['Jan ' .. what .. ' inch'] or '0') < 1)
and 'सेमी'
or 'मिमी'
end
end
local second = 'इन्च'
if not stripToNil(args['metric first']) then
first, second = second, first
end
if is_first then
if stripToNil(args['single line']) then
first = first .. ' (' .. second .. ')'
end
else
first = second
end
return base .. ' ' .. first
end
local function makeSources(frame, args)
local source1 = stripToNil(args.source) or stripToNil(args['source 1'])
local source2 = stripToNil(args['source 2']) or stripToNil(args['source2'])
local result = '|-\n|colspan="14" style="text-align:center;font-size:95%;"|'
local text
if source1 or source2 then
if source1 and source2 then
text = 'स्रोत १: ' .. source1 .. '\n' .. result .. 'स्रोत २: ' .. source2
else
text = 'स्रोत: ' .. (source1 and source1 or source2)
end
else
text = frame:expandTemplate({ title = 'सन्दर्भ आवश्यक', args = {date = stripToNil(args.date)} })
end
return result .. text .. '\n|}'
end
local function getDefinitions(frame, args)
-- Return a list of tables or strings that define each row.
local navbar = require('Module:Navbar')._navbar
local function _if(parm, a, b)
return stripToNil(args[parm]) and a or b or ''
end
local function _ifset(parm, a)
return stripToNil(args[parm]) and args[parm] or a
end
local function _ifany(suffix)
return isAny(args, suffix)
end
return {
----------- HEADER ----------
'{| class="wikitable ' .. _if('open', '', 'collapsible' .. _if('collapsed', ' collapsed')) ..
'" style="width:' .. _ifset('width', '100%') ..
'; text-align:center; line-height: 1.2em; margin:' ..
_ifset('margin', 'auto') .. ';"' ..
_if('open',
-- Following intentionally shows "{{{location}}}" if parameter is blank to alert editor.
'\n|+' .. _if('location', args.location, '{{{location}}}') .. 'को मौसम जानकारी ',
'\n|-' ..
'\n!colspan="14" | ' ..
_if('name',
navbar({_if('location', args.location, '{{{location}}}'), args.name, collapsible=1 .. 'को मौसम जानकारी '}),
_if('location', args.location, '{{{location}}}') .. 'को मौसम जानकारी '
)
) ..
[=[
|-
!scope="row" |महिना
!scope="col" |जनवरी
!scope="col" |फेब्रुअरी
!scope="col" |मार्च
!scope="col" |अप्रिल
!scope="col" |मे
!scope="col" |जुन
!scope="col" |जुलाई
!scope="col" |अगस्ट
!scope="col" |सेप्टेम्बर
!scope="col" |अक्टोबर
!scope="col" |नोभेम्बर
!scope="col" |डिसेम्बर
!scope="col" style="border-left-width:medium" |वर्ष
]=],
{---------- FIRST LINE MAXIMUM HUMIDEX ----------
WANTROW = _ifany(' maximum humidex') and (_ifset('metric first') or _ifset('single line')),
mode = 'basic',
group_name = 'maximum humidex',
color_scheme = _ifset('temperature colour', 't'),
scale_factor = '1',
label = 'आर्द्रता सूचकाङ्कमा उच्चतम रेकर्ड',
annual_mode = 'max',
},
{---------- FIRST LINE RECORD HIGH TEMPERATURES ----------
WANTROW = _ifany(' record high C') or _ifany(' record high F'),
mode = 'temperature',
group_name = 'record high',
color_scheme = _ifset('temperature colour', 't'),
scale_factor = '1',
label = 'उच्चतम रेकर्ड °' .. _if('metric first', 'से', 'फे') .. _if('single line', ' (°' .. _if('metric first', 'फे', 'से') .. ')'),
annual_mode = 'max',
},
{---------- FIRST-SECOND LINE AVG MONTHLY MAXIMUM TEMPERATURES ----------
WANTROW = _ifany(' avg record high C') or _ifany(' avg record high F'),
mode = 'temperature',
group_name = 'avg record high',
color_scheme = _ifset('temperature colour', 't'),
scale_factor = '1',
label = 'मासिक अधिकतम औसत °' .. _if('metric first', 'से', 'फे') .. _if('single line', ' (°' .. _if('metric first', 'फे', 'से') .. ')'),
annual_mode = 'max',
},
{---------- FIRST LINE AVERAGE HIGH TEMPERATURES ----------
WANTROW = _ifany(' high C') or _ifany(' high F'),
mode = 'temperature',
group_name = 'high',
color_scheme = _ifset('temperature colour', 't'),
scale_factor = '1',
label = 'उच्चतम औसत °' .. _if('metric first', 'से', 'फे') .. _if('single line', ' (°' .. _if('metric first', 'फे', 'से') .. ')'),
annual_mode = 'avg',
},
{---------- FIRST LINE DAILY MEAN TEMPERATURES ----------
WANTROW = _ifany(' mean C') or _ifany(' mean F'),
mode = 'temperature',
group_name = 'mean',
color_scheme = _ifset('temperature colour', 't'),
scale_factor = '1',
label = 'दैनिक औसत °' .. _if('metric first', 'से', 'फे') .. _if('single line', ' (°' .. _if('metric first', 'फे', 'से') .. ')'),
annual_mode = 'avg',
},
{---------- FIRST LINE AVERAGE LOW TEMPERATURES ----------
WANTROW = _ifany(' low C') or _ifany(' low F'),
mode = 'temperature',
group_name = 'low',
color_scheme = _ifset('temperature colour', 't'),
scale_factor = '1',
label = 'न्यूनतम औसत °' .. _if('metric first', 'से', 'फे') .. _if('single line', ' (°' .. _if('metric first', 'फे', 'से') .. ')'),
annual_mode = 'avg',
},
{---------- FIRST-SECOND LINE AVG MONTHLY MINIMUM TEMPERATURES ----------
WANTROW = _ifany(' avg record low C') or _ifany(' avg record low F'),
mode = 'temperature',
group_name = 'avg record low',
color_scheme = _ifset('temperature colour', 't'),
scale_factor = '1',
label = 'मासिक न्यूनतम औसत °' .. _if('metric first', 'से', 'फे') .. _if('single line', ' (°' .. _if('metric first', 'फे', 'से') .. ')'),
annual_mode = 'min',
},
{---------- FIRST LINE RECORD LOW TEMPERATURES ----------
WANTROW = _ifany(' record low C') or _ifany(' record low F'),
mode = 'temperature',
group_name = 'record low',
color_scheme = _ifset('temperature colour', 't'),
scale_factor = '1',
label = 'न्यूनतम रेकर्ड °' .. _if('metric first', 'से', 'फे') .. _if('single line', ' (°' .. _if('metric first', 'फे', 'से') .. ')'),
annual_mode = 'min',
},
{---------- FIRST LINE MINIMUM WIND CHILL ----------
WANTROW = _ifany(' chill') and (_ifset('metric first') or _ifset('single line')),
mode = 'basic',
group_name = 'chill',
color_scheme = _ifset('temperature colour', 't'),
scale_factor = '1',
label = 'औसत हिउँ न्यूनतम रेकर्ड',
annual_mode = 'min',
},
{---------- FIRST LINE TOTAL PRECIPITATION ----------
WANTROW = _ifany(' precipitation cm') or _ifany(' precipitation mm') or _ifany(' precipitation inch'),
mode = 'precipitation',
group_name = 'precipitation',
color_scheme = _ifset('precipitation colour', 'p'),
date_mode = true,
scale_factor = '1',
prefer_cm = precision(_ifset('Jan precipitation inch', '0')) < 1,
label = makeLabel(args, true, 'औसत वर्षा', 'precipitation'),
annual_mode = 'sum',
},
{---------- FIRST LINE RAINFALL ----------
WANTROW = _ifany(' rain cm') or _ifany(' rain mm') or _ifany(' rain inch'),
mode = 'precipitation',
group_name = 'rain',
color_scheme = _ifset('rain colour', 'p'),
date_mode = true,
scale_factor = '1',
prefer_cm = precision(_ifset('Jan rain inch', '0')) < 1,
label = makeLabel(args, true, 'औसत [[वर्षा]]', 'rain'),
annual_mode = 'sum',
},
{---------- FIRST LINE SNOWFALL ----------
WANTROW = _ifany(' snow cm') or _ifany(' snow mm') or _ifany(' snow inch'),
mode = 'precipitation',
group_name = 'snow',
prefer_cm = true,
color_scheme = _ifset('snow colour', 'p'),
date_mode = true,
scale_factor = '1',
label = makeLabel(args, true, 'औसत हिउँ', 'snow'),
annual_mode = 'sum',
},
{---------- SECOND LINE MAXIMUM HUMIDEX ----------
WANTROW = not _ifset('single line') and _ifany(' maximum humidex'),
mode = 'basic',
group_name = 'maximum humidex',
color_scheme = _ifset('temperature colour', 't'),
scale_factor = '1',
label = 'आर्द्रता सूचक',
annual_mode = 'max',
second_line = true,
},
{---------- SECOND LINE RECORD HIGH TEMPERATURES ----------
WANTROW = not _ifset('single line') and (_ifany(' record high C') or _ifany(' record high F')),
mode = 'temperature',
group_name = 'record high',
second_line = true,
color_scheme = _ifset('temperature colour', 't'),
scale_factor = '1',
label = 'उच्चतम रेकर्ड °' .. _if('metric first', 'फे', 'से'),
annual_mode = 'max',
},
{---------- SECOND LINE AVERAGE HIGH TEMPERATURES ----------
WANTROW = not _ifset('single line') and (_ifany(' high C') or _ifany(' high F')),
mode = 'temperature',
group_name = 'high',
second_line = true,
color_scheme = _ifset('temperature colour', 't'),
scale_factor = '1',
label = 'उच्चतम औसत °' .. _if('metric first', 'फे', 'से'),
annual_mode = 'avg',
},
{---------- SECOND LINE DAILY MEAN TEMPERATURES ----------
WANTROW = not _ifset('single line') and (_ifany(' mean C') or _ifany(' mean F')),
mode = 'temperature',
group_name = 'mean',
second_line = true,
color_scheme = _ifset('temperature colour', 't'),
scale_factor = '1',
label = 'दैनिक औसत °' .. _if('metric first', 'फे', 'से'),
show = _if('metric first', '2', '1'),
annual_mode = 'avg',
},
{---------- SECOND LINE AVERAGE LOW TEMPERATURES ----------
WANTROW = not _ifset('single line') and (_ifany(' low C') or _ifany(' low F')),
mode = 'temperature',
group_name = 'low',
second_line = true,
color_scheme = _ifset('temperature colour', 't'),
scale_factor = '1',
label = 'न्यूनतम औसत °' .. _if('metric first', 'फे', 'से'),
show = _if('metric first', '2', '1'),
annual_mode = 'avg',
},
{---------- SECOND LINE RECORD LOW TEMPERATURES ----------
WANTROW = not _ifset('single line') and (_ifany(' record low C') or _ifany(' record low F')),
mode = 'temperature',
group_name = 'record low',
second_line = true,
color_scheme = _ifset('temperature colour', 't'),
scale_factor = '1',
label = 'न्यूनतम रेकर्ड °' .. _if('metric first', 'फे', 'से'),
show = _if('metric first', '2', '1'),
annual_mode = 'min',
},
{---------- SECOND LINE MINIMUM WIND CHILL ----------
WANTROW = not _ifset('single line') and (_ifany(' chill') and _if('metric first')),
mode = 'basic',
group_name = 'chill',
color_scheme = _ifset('temperature colour', 't'),
scale_factor = '1',
label = 'बतासे चिसो',
annual_mode = 'min',
},
{---------- SECOND LINE TOTAL PRECIPITATION ----------
WANTROW = not _ifset('single line') and (_ifany(' precipitation cm') or _ifany(' precipitation mm') or _ifany(' precipitation inch')),
mode = 'precipitation',
group_name = 'precipitation',
second_line = true,
color_scheme = _ifset('precipitation colour', 'p'),
date_mode = true,
scale_factor = '1',
prefer_cm = precision(_ifset('Jan precipitation inch', '0')) < 1,
label = makeLabel(args, false, 'औसत वर्षा', 'precipitation'),
annual_mode = 'sum',
},
{---------- SECOND LINE RAINFALL ----------
WANTROW = not _ifset('single line') and (_ifany(' rain cm') or _ifany(' rain mm') or _ifany(' rain inch')),
mode = 'precipitation',
group_name = 'rain',
second_line = true,
color_scheme = _ifset('rain colour', 'p'),
date_mode = true,
scale_factor = '1',
prefer_cm = precision(_ifset('Jan rain inch', '0')) < 1,
label = makeLabel(args, false, 'औसत [[वर्षा]]', 'rain'),
annual_mode = 'sum',
},
{---------- SECOND LINE SNOWFALL ----------
WANTROW = not _ifset('single line') and (_ifany(' snow cm') or _ifany(' snow mm') or _ifany(' snow inch')),
mode = 'precipitation',
group_name = 'snow',
second_line = true,
prefer_cm = true,
color_scheme = _ifset('snow colour', 'p'),
date_mode = true,
scale_factor = '1',
label = makeLabel(args, false, 'औसत हिमपात', 'snow'),
annual_mode = 'sum',
},
{---------- PRECIPITATION DAYS ----------
WANTROW = _ifany(' precipitation days'),
mode = 'basic',
group_name = 'precipitation days',
color_scheme = _ifset('precip days colour', 'd'),
date_mode = true,
scale_factor = '1',
label = 'दैनिक औसत वर्षा' .. _if('unit precipitation days', ' <span style="font-size:90%;" class="nowrap">(≥ ' .. DevnagiriSankhya('ne',_ifset('unit precipitation days', '')) .. ')</span>'),
annual_mode = 'sum',
},
{---------- RAINY DAYS ----------
WANTROW = _ifany(' rain days'),
mode = 'basic',
group_name = 'rain days',
color_scheme = _ifset('precip days colour', 'd'),
date_mode = true,
scale_factor = '1',
label = 'वर्षा दिनको औसत' .. _if('unit rain days', ' <span style="font-size:90%;" class="nowrap">(≥ ' .. DevnagiriSankhya('ne',_ifset('unit rain days', '')) .. ')</span>'),
annual_mode = 'sum',
},
{---------- SNOWY DAYS ----------
WANTROW = _ifany(' snow days'),
mode = 'basic',
group_name = 'snow days',
color_scheme = _ifset('precip days colour', 'd'),
date_mode = true,
scale_factor = '1',
label = 'हिमपात दिनको औसत' .. _if('unit snow days', ' <span style="font-size:90%;" class="nowrap">(≥ ' .. DevnagiriSankhya('ne',_ifset('unit snow days', '')) .. ')</span>'),
annual_mode = 'sum',
},
{---------- PERCENT RELATIVE HUMIDITY ----------
WANTROW = _ifany(' humidity'),
mode = 'basic',
group_name = 'humidity',
color_scheme = _ifset('humidity colour', 'h'),
scale_factor = '1',
label = 'औसत सापेक्ष आर्द्रता (%)' ..
_if('time day', ' <span style="font-size:90%;" class="nowrap">(' .. _ifset('time day', '') .. ')</span>') ..
_if('daily', ' <span style="font-size:90%;" class="nowrap">(दैनिक औसत)</span>'),
annual_mode = 'avg',
},
{---------- AFTERNOON PERCENT RELATIVE HUMIDITY ----------
WANTROW = _ifany(' afthumidity'),
mode = 'basic',
group_name = 'afthumidity',
color_scheme = _ifset('humidity colour', 'h'),
scale_factor = '1',
label = 'दिउँसो औसत सापेक्ष आर्द्रता (%)' ..
_if('time day', ' <span style="font-size:90%;" class="nowrap">(' .. _ifset('time day', '') .. ')</span>') ..
_if('daily', ' <span style="font-size:90%;" class="nowrap">(दैनिक औसत)</span>'),
annual_mode = 'avg',
},
{---------- FIRST LINE AVERAGE DEW POINT ----------
WANTROW = _ifany(' dew point C') or _ifany(' dew point F'),
mode = 'temperature',
group_name = 'dew point',
color_scheme = _ifset('temperature colour', 't'),
scale_factor = '1',
label = 'हिम बिन्दुको औसत °' .. _if('metric first', 'से', 'फे') .. _if('single line', ' (°' .. _if('metric first', 'फे', 'से') .. ')'),
annual_mode = 'avg',
},
{---------- SECOND LINE AVERAGE DEW POINT----------
WANTROW = not _ifset('single line') and (_ifany(' dew point C') or _ifany(' dew point F')),
mode = 'temperature',
group_name = 'dew point',
second_line = true,
color_scheme = _ifset('temperature colour', 't'),
scale_factor = '1',
label = 'हिम बिन्दुको औसत °' .. _if('metric first', 'फे', 'से'),
show = _if('metric first', '2', '1'),
annual_mode = 'avg',
},
{---------- MONTHLY SUNSHINE HOURS ----------
WANTROW = _ifany(' sun'),
mode = 'basic',
group_name = 'sun',
color_scheme = _ifset('sun colour', 's'),
date_mode = true,
scale_factor = '1',
label = 'मासिक सौर्यप्रकाश घण्टा औसत',
annual_mode = 'sum',
},
{---------- DAILY SUNSHINE HOURS ----------
WANTROW = _ifany('d sun'),
mode = 'basic',
group_name = 'd sun',
color_scheme = _ifset('sun colour', 's'),
include_space = false,
scale_factor = '30.44',
label = 'दैनिक सौर्यप्रकाश घण्टा औसत',
annual_mode = 'avg',
},
{---------- DAILY DAYLIGHT HOURS ----------
WANTROW = _ifany(' light'),
mode = 'basic',
group_name = ' light',
color_scheme = _ifset('sun colour', 's'),
include_space = false,
scale_factor = '30.44',
label = 'दैनिक दिवाप्रकाश घण्टा औसत',
annual_mode = 'avg',
},
{---------- PERCENT SUNSHINE ----------
WANTROW = _ifany(' percentsun'),
mode = 'basic',
group_name = 'percentsun',
color_scheme = _ifset('sun colour', 's'),
scale_factor = '7.2',
label = 'घामको सम्भावित प्रतिशत',
annual_mode = 'avg',
},
{---------- ULTRAVIOLET INDEX ----------
WANTROW = _ifany(' uv'),
mode = 'basic',
group_name = 'uv',
color_scheme = _ifset('uv colour', 'u'),
scale_factor = '1',
label = 'पराबैगनी सूचकाङ्क औसत',
annual_mode = 'avg',
},
----------- SOURCES ----------
makeSources(frame, args),
}
end
local function makeFrame(self_args, parent_args)
-- Kludge to pass arguments for a single row to buildRow.
-- Later: Refactor buildRow so this is not needed.
return {
args = self_args,
getParent = function (self) return makeFrame(parent_args, nil) end,
}
end
local function main(frame)
local buildRow = require('Module:Weather box/row').buildRow
local args = frame:getParent().args
local results = {}
for i, def in ipairs(getDefinitions(frame, args)) do
local row
if type(def) == 'string' then
row = def
elseif def.WANTROW then
row = buildRow(makeFrame(def, args))
else
row = ''
end
results[i] = row
end
return '<div>\n'..table.concat(results)..'\n</div>' -- prevent Scribunto from inserting a blank line before the table
end
return {
main = main,
}