var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1564869608000,15.80000000],[1564870208000,15.80000000],[1564870809000,15.80000000],[1564871409000,15.90000000],[1564872008000,16.10000000],[1564872609000,16.20000000],[1564873209000,16.60000000],[1564873808000,16.70000000],[1564874409000,16.60000000],[1564875009000,16.60000000],[1564875608000,16.70000000],[1564876208000,16.70000000],[1564876809000,16.60000000],[1564877408000,16.60000000],[1564878008000,16.20000000],[1564878609000,15.90000000],[1564879209000,15.80000000],[1564879809000,15.60000000],[1564880408000,15.40000000],[1564881009000,15.40000000],[1564881609000,15.30000000],[1564882208000,15.20000000],[1564882809000,15.20000000],[1564883409000,15.00000000],[1564884008000,14.90000000],[1564884608000,15.00000000],[1564885209000,15.00000000],[1564885809000,15.00000000],[1564886409000,15.00000000],[1564887008000,15.00000000],[1564887608000,15.20000000],[1564888209000,15.30000000],[1564888808000,15.40000000],[1564889409000,15.40000000],[1564890008000,15.60000000],[1564890609000,15.50000000],[1564891209000,15.50000000],[1564891809000,15.60000000],[1564892408000,15.60000000],[1564893009000,15.60000000],[1564893609000,16.00000000],[1564894208000,16.50000000],[1564894809000,17.00000000],[1564895409000,17.30000000],[1564896008000,17.70000000],[1564896609000,18.20000000],[1564897208000,18.50000000],[1564897809000,18.80000000],[1564898409000,18.80000000],[1564899009000,19.10000000],[1564899609000,19.70000000],[1564900209000,20.00000000],[1564900808000,20.20000000],[1564901409000,20.30000000],[1564902009000,20.30000000],[1564902609000,20.50000000],[1564903208000,20.70000000],[1564903809000,20.90000000],[1564904408000,20.80000000],[1564905008000,21.00000000],[1564905609000,21.30000000],[1564906209000,21.80000000],[1564906808000,21.70000000],[1564907409000,22.10000000],[1564908009000,22.20000000],[1564908609000,22.40000000],[1564909209000,22.60000000],[1564909809000,22.90000000],[1564910409000,22.80000000],[1564911009000,22.80000000],[1564911609000,22.80000000],[1564912209000,23.10000000],[1564912809000,22.90000000],[1564913409000,22.60000000],[1564914009000,22.50000000],[1564914609000,22.20000000],[1564915209000,22.10000000],[1564915809000,22.70000000],[1564916409000,23.40000000],[1564917009000,23.70000000],[1564917609000,23.90000000],[1564918209000,24.00000000],[1564918809000,24.10000000],[1564919412000,24.50000000],[1564920009000,24.00000000],[1564920609000,24.00000000],[1564921209000,23.50000000],[1564921809000,23.20000000],[1564922409000,22.90000000],[1564923009000,23.10000000],[1564923609000,23.60000000],[1564924209000,23.10000000],[1564924809000,22.90000000],[1564925409000,23.70000000],[1564926009000,24.00000000],[1564926609000,24.30000000],[1564927209000,24.00000000],[1564927809000,24.20000000],[1564928409000,24.00000000],[1564929009000,24.10000000],[1564929608000,24.30000000],[1564930209000,24.20000000],[1564930809000,24.30000000],[1564931409000,23.90000000],[1564932009000,23.90000000],[1564932609000,23.50000000],[1564933209000,23.60000000],[1564933809000,23.20000000],[1564934409000,23.30000000],[1564935009000,23.50000000],[1564935610000,23.20000000],[1564936209000,23.20000000],[1564936809000,23.10000000],[1564937410000,22.30000000],[1564938009000,21.80000000],[1564938609000,21.50000000],[1564939209000,21.30000000],[1564939809000,21.00000000],[1564940409000,20.90000000],[1564941009000,20.60000000],[1564941609000,20.40000000],[1564942209000,20.20000000],[1564942809000,20.00000000],[1564943409000,20.00000000],[1564944009000,19.80000000],[1564944609000,19.60000000],[1564945209000,19.40000000],[1564945809000,19.20000000],[1564946409000,19.00000000],[1564947009000,18.80000000],[1564947609000,18.70000000],[1564948209000,18.70000000],[1564948809000,18.90000000],[1564949409000,19.00000000],[1564950009000,18.90000000],[1564950609000,18.60000000],[1564951209000,18.50000000],[1564951809000,18.20000000],[1564952409000,18.10000000],[1564953009000,17.90000000],[1564953609000,17.70000000],[1564954209000,17.80000000],[1564954809000,18.00000000],[1564955409000,17.90000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1564869608000,11.7],[1564870208000,11.9],[1564870809000,11.9],[1564871409000,11.8],[1564872008000,11.8],[1564872609000,11.8],[1564873209000,11.9],[1564873808000,11.9],[1564874409000,11.8],[1564875009000,11.9],[1564875608000,12],[1564876208000,12],[1564876809000,12],[1564877408000,12.1],[1564878008000,11.9],[1564878609000,11.8],[1564879209000,11.8],[1564879809000,11.9],[1564880408000,11.8],[1564881009000,11.9],[1564881609000,11.9],[1564882208000,11.8],[1564882809000,11.8],[1564883409000,11.7],[1564884008000,11.6],[1564884608000,11.7],[1564885209000,11.6],[1564885809000,11.6],[1564886409000,11.6],[1564887008000,11.5],[1564887608000,11.6],[1564888209000,11.5],[1564888808000,11.6],[1564889409000,11.4],[1564890008000,11.5],[1564890609000,11.4],[1564891209000,11.4],[1564891809000,11.4],[1564892408000,11.5],[1564893009000,11.6],[1564893609000,11.9],[1564894208000,12.3],[1564894809000,12.5],[1564895409000,12.5],[1564896008000,12.3],[1564896609000,12.3],[1564897208000,12.4],[1564897809000,12.3],[1564898409000,12.1],[1564899009000,12.1],[1564899609000,12.3],[1564900209000,12.1],[1564900808000,12.1],[1564901409000,11.9],[1564902009000,12],[1564902609000,12],[1564903208000,12.2],[1564903809000,12],[1564904408000,11.7],[1564905008000,11.8],[1564905609000,11.9],[1564906209000,12],[1564906808000,11.8],[1564907409000,12],[1564908009000,12],[1564908609000,11.9],[1564909209000,12.1],[1564909809000,12.2],[1564910409000,12],[1564911009000,11.4],[1564911609000,11.4],[1564912209000,10.9],[1564912809000,10.8],[1564913409000,10.9],[1564914009000,11.2],[1564914609000,11.1],[1564915209000,11.2],[1564915809000,11],[1564916409000,11.2],[1564917009000,10.8],[1564917609000,11],[1564918209000,10.8],[1564918809000,11.1],[1564919412000,10.8],[1564920009000,10.4],[1564920609000,10.4],[1564921209000,10.1],[1564921809000,10.6],[1564922409000,10.4],[1564923009000,10.9],[1564923609000,11.5],[1564924209000,10.8],[1564924809000,10.8],[1564925409000,11],[1564926009000,10.8],[1564926609000,10.7],[1564927209000,10.5],[1564927809000,10.7],[1564928409000,10.7],[1564929009000,10.9],[1564929608000,11.2],[1564930209000,11.4],[1564930809000,11.7],[1564931409000,11.4],[1564932009000,11.6],[1564932609000,11.6],[1564933209000,11.9],[1564933809000,11.6],[1564934409000,11.6],[1564935009000,11.3],[1564935610000,10.9],[1564936209000,11],[1564936809000,10.7],[1564937410000,10],[1564938009000,9.9],[1564938609000,9.7],[1564939209000,9.4],[1564939809000,9.2],[1564940409000,9.1],[1564941009000,9],[1564941609000,8.9],[1564942209000,9],[1564942809000,8.9],[1564943409000,9],[1564944009000,9],[1564944609000,9.1],[1564945209000,9.1],[1564945809000,9.2],[1564946409000,9.2],[1564947009000,9.1],[1564947609000,9.1],[1564948209000,9.1],[1564948809000,9],[1564949409000,9],[1564950009000,9],[1564950609000,8.9],[1564951209000,8.9],[1564951809000,8.9],[1564952409000,9],[1564953009000,9],[1564953609000,9.1],[1564954209000,9.3],[1564954809000,9.4],[1564955409000,9.6],], color: '#5b9f4a' } ]; var options = { xaxes: [{ axisLabel: 'temperature', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.1°C' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-temperature-legend' } }; graphs['#chart-temperature'] = $.plot('#chart-temperature', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Vlhkosť (%)', data: [[1564869608000,77.00000000],[1564870208000,77.60000000],[1564870809000,77.60000000],[1564871409000,76.80000000],[1564872008000,75.80000000],[1564872609000,75.20000000],[1564873209000,74.00000000],[1564873808000,73.60000000],[1564874409000,73.60000000],[1564875009000,73.80000000],[1564875608000,74.00000000],[1564876208000,74.20000000],[1564876809000,74.40000000],[1564877408000,74.80000000],[1564878008000,75.80000000],[1564878609000,76.80000000],[1564879209000,77.40000000],[1564879809000,78.60000000],[1564880408000,79.20000000],[1564881009000,79.60000000],[1564881609000,80.20000000],[1564882208000,80.20000000],[1564882809000,80.20000000],[1564883409000,80.60000000],[1564884008000,81.00000000],[1564884608000,80.60000000],[1564885209000,80.40000000],[1564885809000,80.40000000],[1564886409000,80.20000000],[1564887008000,79.80000000],[1564887608000,79.00000000],[1564888209000,78.40000000],[1564888808000,78.00000000],[1564889409000,77.20000000],[1564890008000,76.60000000],[1564890609000,76.60000000],[1564891209000,76.60000000],[1564891809000,76.20000000],[1564892408000,77.00000000],[1564893009000,77.40000000],[1564893609000,76.80000000],[1564894208000,76.40000000],[1564894809000,74.80000000],[1564895409000,73.60000000],[1564896008000,70.60000000],[1564896609000,68.60000000],[1564897208000,67.60000000],[1564897809000,66.20000000],[1564898409000,65.20000000],[1564899009000,64.00000000],[1564899609000,62.40000000],[1564900209000,60.40000000],[1564900808000,59.80000000],[1564901409000,58.60000000],[1564902009000,59.00000000],[1564902609000,58.20000000],[1564903208000,58.20000000],[1564903809000,56.80000000],[1564904408000,56.00000000],[1564905008000,55.80000000],[1564905609000,55.20000000],[1564906209000,54.00000000],[1564906808000,53.60000000],[1564907409000,53.00000000],[1564908009000,52.40000000],[1564908609000,51.40000000],[1564909209000,51.60000000],[1564909809000,51.00000000],[1564910409000,50.60000000],[1564911009000,48.80000000],[1564911609000,48.80000000],[1564912209000,46.20000000],[1564912809000,46.40000000],[1564913409000,47.80000000],[1564914009000,49.00000000],[1564914609000,49.40000000],[1564915209000,50.00000000],[1564915809000,47.80000000],[1564916409000,46.40000000],[1564917009000,44.40000000],[1564917609000,44.40000000],[1564918209000,43.60000000],[1564918809000,44.00000000],[1564919412000,42.20000000],[1564920009000,42.40000000],[1564920609000,42.40000000],[1564921209000,42.80000000],[1564921809000,45.00000000],[1564922409000,45.40000000],[1564923009000,46.20000000],[1564923609000,46.60000000],[1564924209000,46.00000000],[1564924809000,46.40000000],[1564925409000,45.00000000],[1564926009000,43.60000000],[1564926609000,42.40000000],[1564927209000,42.60000000],[1564927809000,42.60000000],[1564928409000,43.20000000],[1564929009000,43.60000000],[1564929608000,43.80000000],[1564930209000,44.60000000],[1564930809000,45.20000000],[1564931409000,45.60000000],[1564932009000,46.20000000],[1564932609000,47.20000000],[1564933209000,47.80000000],[1564933809000,48.20000000],[1564934409000,48.00000000],[1564935009000,46.40000000],[1564935610000,46.00000000],[1564936209000,46.20000000],[1564936809000,45.60000000],[1564937410000,45.60000000],[1564938009000,47.00000000],[1564938609000,47.00000000],[1564939209000,46.60000000],[1564939809000,47.00000000],[1564940409000,47.00000000],[1564941009000,47.40000000],[1564941609000,47.80000000],[1564942209000,48.60000000],[1564942809000,49.00000000],[1564943409000,49.40000000],[1564944009000,50.00000000],[1564944609000,50.80000000],[1564945209000,51.60000000],[1564945809000,52.60000000],[1564946409000,53.00000000],[1564947009000,53.60000000],[1564947609000,54.00000000],[1564948209000,53.80000000],[1564948809000,52.80000000],[1564949409000,52.60000000],[1564950009000,52.80000000],[1564950609000,53.60000000],[1564951209000,53.80000000],[1564951809000,54.80000000],[1564952409000,55.60000000],[1564953009000,56.40000000],[1564953609000,57.20000000],[1564954209000,57.60000000],[1564954809000,57.40000000],[1564955409000,58.60000000],], color: '#ff9000' } ]; var options = { xaxes: [{ axisLabel: 'humidity', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.1%' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-humidity-legend' } }; graphs['#chart-humidity'] = $.plot('#chart-humidity', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Atmosférický tlak (hPa)', data: [[1564869608000,1015.3],[1564870208000,1015.4],[1564870809000,1015.4],[1564871409000,1015.3],[1564872008000,1015.3],[1564872609000,1015.2],[1564873209000,1015.2],[1564873808000,1015.1],[1564874409000,1015.1],[1564875009000,1015.2],[1564875608000,1015.2],[1564876208000,1015.2],[1564876809000,1015],[1564877408000,1015],[1564878008000,1015.2],[1564878609000,1015.3],[1564879209000,1015.3],[1564879809000,1015.4],[1564880408000,1015.5],[1564881009000,1015.4],[1564881609000,1015.5],[1564882208000,1015.5],[1564882809000,1015.5],[1564883409000,1015.6],[1564884008000,1015.6],[1564884608000,1015.5],[1564885209000,1015.6],[1564885809000,1015.8],[1564886409000,1015.9],[1564887008000,1015.9],[1564887608000,1015.9],[1564888209000,1015.9],[1564888808000,1015.8],[1564889409000,1015.8],[1564890008000,1015.9],[1564890609000,1016.1],[1564891209000,1016.1],[1564891809000,1016.2],[1564892408000,1016.3],[1564893009000,1016.4],[1564893609000,1016.4],[1564894208000,1016.4],[1564894809000,1016.5],[1564895409000,1016.4],[1564896008000,1016.5],[1564896609000,1016.5],[1564897208000,1016.5],[1564897809000,1016.5],[1564898409000,1016.5],[1564899009000,1016.4],[1564899609000,1016.6],[1564900209000,1017.5],[1564900808000,1017.5],[1564901409000,1017.4],[1564902009000,1017.4],[1564902609000,1017.4],[1564903208000,1017.4],[1564903809000,1017.4],[1564904408000,1017.5],[1564905008000,1017.5],[1564905609000,1017.5],[1564906209000,1017.4],[1564906808000,1017.4],[1564907409000,1017.3],[1564908009000,1017.2],[1564908609000,1017.2],[1564909209000,1017.2],[1564909809000,1017.1],[1564910409000,1017.2],[1564911009000,1017.2],[1564911609000,1017.2],[1564912209000,1017.1],[1564912809000,1017.2],[1564913409000,1017.2],[1564914009000,1017.2],[1564914609000,1017.3],[1564915209000,1017.2],[1564915809000,1017.1],[1564916409000,1016.9],[1564917009000,1016.7],[1564917609000,1016.7],[1564918209000,1016.6],[1564918809000,1016.6],[1564919412000,1016.6],[1564920009000,1016.7],[1564920609000,1016.7],[1564921209000,1016.8],[1564921809000,1016.8],[1564922409000,1016.8],[1564923009000,1016.7],[1564923609000,1016.5],[1564924209000,1016.6],[1564924809000,1016.6],[1564925409000,1016.4],[1564926009000,1016.3],[1564926609000,1016.3],[1564927209000,1016.3],[1564927809000,1016.3],[1564928409000,1016.3],[1564929009000,1016.3],[1564929608000,1016.2],[1564930209000,1016.3],[1564930809000,1016.2],[1564931409000,1016.3],[1564932009000,1016.3],[1564932609000,1016.3],[1564933209000,1016.3],[1564933809000,1016.4],[1564934409000,1016.4],[1564935009000,1016.3],[1564935610000,1016.4],[1564936209000,1016.4],[1564936809000,1016.4],[1564937410000,1016.7],[1564938009000,1016.8],[1564938609000,1016.9],[1564939209000,1017],[1564939809000,1017.1],[1564940409000,1017.2],[1564941009000,1017.3],[1564941609000,1017.4],[1564942209000,1017.6],[1564942809000,1017.8],[1564943409000,1017.8],[1564944009000,1017.4],[1564944609000,1017.1],[1564945209000,1017.2],[1564945809000,1017.4],[1564946409000,1017.5],[1564947009000,1017.5],[1564947609000,1017.5],[1564948209000,1017.5],[1564948809000,1017.5],[1564949409000,1017.5],[1564950009000,1017.6],[1564950609000,1017.7],[1564951209000,1017.7],[1564951809000,1017.8],[1564952409000,1017.9],[1564953009000,1017.9],[1564953609000,1017.9],[1564954209000,1017.9],[1564954809000,1017.8],[1564955409000,1017.9],], color: '#000000' } ]; var options = { xaxes: [{ axisLabel: 'pressure', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.1hPa' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-pressure-legend' } }; graphs['#chart-pressure'] = $.plot('#chart-pressure', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Slnečné žiarenie (W/m2)', data: [[1564869608000,0.00000000],[1564870208000,0.00000000],[1564870809000,0.00000000],[1564871409000,0.00000000],[1564872008000,0.00000000],[1564872609000,0.00000000],[1564873209000,0.00000000],[1564873808000,0.00000000],[1564874409000,0.00000000],[1564875009000,0.00000000],[1564875608000,0.00000000],[1564876208000,0.00000000],[1564876809000,0.00000000],[1564877408000,0.00000000],[1564878008000,0.00000000],[1564878609000,0.00000000],[1564879209000,0.00000000],[1564879809000,0.00000000],[1564880408000,0.00000000],[1564881009000,0.00000000],[1564881609000,0.00000000],[1564882208000,0.00000000],[1564882809000,0.00000000],[1564883409000,0.00000000],[1564884008000,0.00000000],[1564884608000,0.00000000],[1564885209000,0.00000000],[1564885809000,0.00000000],[1564886409000,0.00000000],[1564887008000,0.00000000],[1564887608000,0.00000000],[1564888209000,0.00000000],[1564888808000,0.00000000],[1564889409000,4.00000000],[1564890008000,10.00000000],[1564890609000,18.00000000],[1564891209000,26.00000000],[1564891809000,38.00000000],[1564892408000,54.00000000],[1564893009000,68.00000000],[1564893609000,82.00000000],[1564894208000,102.00000000],[1564894809000,142.00000000],[1564895409000,168.00000000],[1564896008000,198.00000000],[1564896609000,224.00000000],[1564897208000,252.00000000],[1564897809000,282.00000000],[1564898409000,310.00000000],[1564899009000,338.00000000],[1564899609000,368.00000000],[1564900209000,394.00000000],[1564900808000,422.00000000],[1564901409000,452.00000000],[1564902009000,478.00000000],[1564902609000,508.00000000],[1564903208000,534.00000000],[1564903809000,560.00000000],[1564904408000,584.00000000],[1564905008000,606.00000000],[1564905609000,632.00000000],[1564906209000,654.00000000],[1564906808000,678.00000000],[1564907409000,702.00000000],[1564908009000,722.00000000],[1564908609000,742.00000000],[1564909209000,762.00000000],[1564909809000,768.00000000],[1564910409000,732.00000000],[1564911009000,588.00000000],[1564911609000,846.00000000],[1564912209000,830.00000000],[1564912809000,674.00000000],[1564913409000,446.00000000],[1564914009000,246.00000000],[1564914609000,288.00000000],[1564915209000,428.00000000],[1564915809000,856.00000000],[1564916409000,728.00000000],[1564917009000,898.00000000],[1564917609000,904.00000000],[1564918209000,918.00000000],[1564918809000,922.00000000],[1564919412000,746.00000000],[1564920009000,588.00000000],[1564920609000,332.00000000],[1564921209000,262.00000000],[1564921809000,212.00000000],[1564922409000,280.00000000],[1564923009000,546.00000000],[1564923609000,462.00000000],[1564924209000,300.00000000],[1564924809000,670.00000000],[1564925409000,722.00000000],[1564926009000,692.00000000],[1564926609000,496.00000000],[1564927209000,492.00000000],[1564927809000,630.00000000],[1564928409000,588.00000000],[1564929009000,562.00000000],[1564929608000,540.00000000],[1564930209000,512.00000000],[1564930809000,496.00000000],[1564931409000,472.00000000],[1564932009000,490.00000000],[1564932609000,464.00000000],[1564933209000,422.00000000],[1564933809000,340.00000000],[1564934409000,300.00000000],[1564935009000,264.00000000],[1564935610000,198.00000000],[1564936209000,202.00000000],[1564936809000,82.00000000],[1564937410000,48.00000000],[1564938009000,44.00000000],[1564938609000,36.00000000],[1564939209000,32.00000000],[1564939809000,28.00000000],[1564940409000,22.00000000],[1564941009000,18.00000000],[1564941609000,14.00000000],[1564942209000,8.00000000],[1564942809000,4.00000000],[1564943409000,2.00000000],[1564944009000,0.00000000],[1564944609000,0.00000000],[1564945209000,0.00000000],[1564945809000,0.00000000],[1564946409000,0.00000000],[1564947009000,0.00000000],[1564947609000,0.00000000],[1564948209000,0.00000000],[1564948809000,0.00000000],[1564949409000,0.00000000],[1564950009000,0.00000000],[1564950609000,0.00000000],[1564951209000,0.00000000],[1564951809000,0.00000000],[1564952409000,0.00000000],[1564953009000,0.00000000],[1564953609000,0.00000000],[1564954209000,0.00000000],[1564954809000,0.00000000],[1564955409000,0.00000000],], color: '#ffb92f' } ]; var options = { xaxes: [{ axisLabel: 'solar_radiation', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, yaxis: { min: 0, }, xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.1W/m2' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-solar-radiation-legend' } }; graphs['#chart-solar-radiation'] = $.plot('#chart-solar-radiation', dataset, options); }); $('.modal').on('hide.bs.modal', function() { var memory = $(this).html(); $(this).html(memory); }); function meteo_wind_direction_name(wind_direction) { if (wind_direction >= 0.00 && wind_direction <= 11.25) { ret = 'S'; } else if (wind_direction > 11.25 && wind_direction <= 33.75) { ret = 'SSV'; } else if (wind_direction > 33.75 && wind_direction <= 56.25) { ret = 'SV'; } else if (wind_direction > 56.25 && wind_direction <= 78.75) { // 67.5 ret = 'VSV'; } else if (wind_direction > 78.75 && wind_direction <= 101.25) { // 90 ret = 'V'; } else if (wind_direction > 101.25 && wind_direction <= 123.75) { //112.5 ret = 'VJV'; } else if (wind_direction > 123.75 && wind_direction <= 146.25) { // 135 ret = 'JV'; } else if (wind_direction > 146.25 && wind_direction <= 168.75) { // 157.5 ret = 'JJV'; } else if (wind_direction > 168.75 && wind_direction <= 191.25) { // 180 ret = 'J'; } else if (wind_direction > 191.25 && wind_direction <= 213.75) { // 202.5 ret = 'JJZ'; } else if (wind_direction > 213.75 && wind_direction <= 236.25) { // 225 ret = 'JZ'; } else if (wind_direction > 236.25 && wind_direction <= 258.75) { // 247.5 ret = 'ZJZ'; } else if (wind_direction > 258.75 && wind_direction <= 281.25) { // 270 ret = 'Z'; } else if (wind_direction > 281.25 && wind_direction <= 303.75) { // 292.5 ret = 'ZSZ'; } else if (wind_direction > 303.75 && wind_direction <= 326.25) { // 315 ret = 'SZ'; } else if (wind_direction > 326.25 && wind_direction <= 348.75) { // 337.5 ret = 'SSZ'; } else if (wind_direction > 348.75 && wind_direction <= 360.0) { // 337.5 ret = 'S'; } else { return ''; } return ret; }