var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1787954400000,14.20000000],[1787954580000,14.20000000],[1787954880000,14.16000000],[1787955180000,14.14000000],[1787955480000,14.10000000],[1787955780000,14.16000000],[1787956080000,14.20000000],[1787956380000,14.24000000],[1787956680000,14.22000000],[1787956980000,14.24000000],[1787957280000,14.28000000],[1787957580000,14.30000000],[1787957880000,14.24000000],[1787958180000,14.12000000],[1787958480000,14.02000000],[1787958780000,13.90000000],[1787959080000,13.90000000],[1787959380000,13.90000000],[1787959680000,14.00000000],[1787959980000,14.06000000],[1787960280000,14.14000000],[1787960580000,14.32000000],[1787960880000,14.40000000],[1787961180000,14.40000000],[1787961480000,14.32000000],[1787961780000,14.58000000],[1787962080000,14.38000000],[1787962380000,14.30000000],[1787962680000,14.32000000],[1787962980000,14.40000000],[1787963280000,14.50000000],[1787963580000,14.56000000],[1787963880000,14.60000000],[1787964180000,14.56000000],[1787964480000,14.50000000],[1787964780000,14.50000000],[1787965080000,14.60000000],[1787965380000,14.80000000],[1787965680000,14.94000000],[1787965980000,15.00000000],[1787966280000,14.80000000],[1787966580000,14.60000000],[1787966880000,14.58000000],[1787967180000,14.54000000],[1787967480000,14.48000000],[1787967780000,14.20000000],[1787968080000,14.04000000],[1787968380000,14.00000000],[1787968680000,13.94000000],[1787968980000,13.94000000],[1787969280000,14.00000000],[1787969580000,14.06000000],[1787969880000,14.24000000],[1787970180000,14.44000000],[1787970480000,14.60000000],[1787970780000,14.60000000],[1787971080000,14.60000000],[1787971380000,14.72000000],[1787971680000,14.86000000],[1787971980000,15.28000000],[1787972280000,16.16000000],[1787972580000,16.20000000],[1787972880000,16.26000000],[1787973180000,16.54000000],[1787973480000,16.72000000],[1787973780000,16.80000000],[1787974080000,16.72000000],[1787974380000,16.88000000],[1787974680000,17.00000000],[1787974980000,17.02000000],[1787975280000,16.80000000],[1787975580000,16.76000000],[1787975880000,16.66000000],[1787976180000,16.70000000],[1787976480000,16.76000000],[1787976780000,16.80000000],[1787977080000,16.80000000],[1787977380000,16.84000000],[1787977680000,16.64000000],[1787977980000,16.60000000],[1787978280000,16.60000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1787954400000,10.3],[1787954580000,10],[1787954880000,10.4],[1787955180000,10.4],[1787955480000,10.2],[1787955780000,10.2],[1787956080000,10.1],[1787956380000,9.9],[1787956680000,10.3],[1787956980000,9.8],[1787957280000,9.6],[1787957580000,9.7],[1787957880000,10],[1787958180000,10],[1787958480000,10.3],[1787958780000,10.1],[1787959080000,9.9],[1787959380000,9.5],[1787959680000,9.8],[1787959980000,9.4],[1787960280000,9.5],[1787960580000,9.2],[1787960880000,9.6],[1787961180000,9.5],[1787961480000,9.1],[1787961780000,9],[1787962080000,9.6],[1787962380000,9.7],[1787962680000,9.4],[1787962980000,9.3],[1787963280000,9.3],[1787963580000,9.2],[1787963880000,9.3],[1787964180000,9.8],[1787964480000,9.8],[1787964780000,9.8],[1787965080000,9.3],[1787965380000,9],[1787965680000,9],[1787965980000,9.2],[1787966280000,9.8],[1787966580000,9.8],[1787966880000,9.6],[1787967180000,9.4],[1787967480000,9.7],[1787967780000,10.1],[1787968080000,9.9],[1787968380000,9.8],[1787968680000,9.7],[1787968980000,9.3],[1787969280000,9.4],[1787969580000,9.4],[1787969880000,8.9],[1787970180000,8.8],[1787970480000,9.1],[1787970780000,9.5],[1787971080000,9.4],[1787971380000,9.6],[1787971680000,9.2],[1787971980000,8.2],[1787972280000,8.3],[1787972580000,9],[1787972880000,8.6],[1787973180000,8.8],[1787973480000,8.6],[1787973780000,9],[1787974080000,9],[1787974380000,9],[1787974680000,8.5],[1787974980000,9.9],[1787975280000,9.8],[1787975580000,9.7],[1787975880000,9.9],[1787976180000,9.6],[1787976480000,9.6],[1787976780000,9.8],[1787977080000,9.3],[1787977380000,9.6],[1787977680000,10],[1787977980000,9.8],[1787978280000,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() { var dataset = [{label: "5 cm nad povrchom (\u00b0C)", data: [[1787954400000,12.30000000],[1787954580000,12.28000000],[1787954880000,12.48000000],[1787955180000,13.04000000],[1787955480000,13.14000000],[1787955780000,13.08000000],[1787956080000,13.02000000],[1787956380000,12.78000000],[1787956680000,12.72000000],[1787956980000,12.84000000],[1787957280000,12.46000000],[1787957580000,12.64000000],[1787957880000,12.64000000],[1787958180000,12.16000000],[1787958480000,12.28000000],[1787958780000,12.34000000],[1787959080000,12.12000000],[1787959380000,12.24000000],[1787959680000,12.94000000],[1787959980000,13.42000000],[1787960280000,13.66000000],[1787960580000,13.62000000],[1787960880000,13.32000000],[1787961180000,12.98000000],[1787961480000,12.64000000],[1787961780000,13.28000000],[1787962080000,13.06000000],[1787962380000,13.38000000],[1787962680000,13.58000000],[1787962980000,13.78000000],[1787963280000,13.74000000],[1787963580000,13.64000000],[1787963880000,13.58000000],[1787964180000,13.48000000],[1787964480000,13.58000000],[1787964780000,13.50000000],[1787965080000,13.76000000],[1787965380000,14.00000000],[1787965680000,14.02000000],[1787965980000,13.68000000],[1787966280000,13.42000000],[1787966580000,13.06000000],[1787966880000,12.90000000],[1787967180000,12.94000000],[1787967480000,12.60000000],[1787967780000,12.40000000],[1787968080000,12.50000000],[1787968380000,12.52000000],[1787968680000,12.62000000],[1787968980000,12.78000000],[1787969280000,13.08000000],[1787969580000,13.32000000],[1787969880000,13.70000000],[1787970180000,13.68000000],[1787970480000,13.72000000],[1787970780000,13.70000000],[1787971080000,14.02000000],[1787971380000,14.24000000],[1787971680000,14.40000000],[1787971980000,14.84000000],[1787972280000,15.46000000],[1787972580000,15.24000000],[1787972880000,15.42000000],[1787973180000,15.62000000],[1787973480000,15.76000000],[1787973780000,15.74000000],[1787974080000,15.84000000],[1787974380000,15.92000000],[1787974680000,15.94000000],[1787974980000,15.84000000],[1787975280000,15.68000000],[1787975580000,15.62000000],[1787975880000,15.64000000],[1787976180000,15.58000000],[1787976480000,15.56000000],[1787976780000,15.64000000],[1787977080000,15.32000000],[1787977380000,15.38000000],[1787977680000,15.40000000],[1787977980000,15.58000000],[1787978280000,15.70000000],], color: "#f39c12"}]; var options = { 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-ground-temperature-legend' } }; graphs['#chart-ground-temperature'] = $.plot('#chart-ground-temperature', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Vlhkosť (%)', data: [[1787954400000,77.60000000],[1787954580000,76.02000000],[1787954880000,78.20000000],[1787955180000,78.14000000],[1787955480000,77.78000000],[1787955780000,77.42000000],[1787956080000,76.50000000],[1787956380000,75.16000000],[1787956680000,77.58000000],[1787956980000,74.88000000],[1787957280000,73.72000000],[1787957580000,74.10000000],[1787957880000,75.72000000],[1787958180000,76.32000000],[1787958480000,78.36000000],[1787958780000,78.26000000],[1787959080000,76.82000000],[1787959380000,74.94000000],[1787959680000,75.88000000],[1787959980000,73.68000000],[1787960280000,73.70000000],[1787960580000,71.48000000],[1787960880000,72.90000000],[1787961180000,72.78000000],[1787961480000,71.00000000],[1787961780000,69.20000000],[1787962080000,73.12000000],[1787962380000,74.04000000],[1787962680000,72.64000000],[1787962980000,71.78000000],[1787963280000,71.36000000],[1787963580000,70.44000000],[1787963880000,70.72000000],[1787964180000,73.22000000],[1787964480000,73.40000000],[1787964780000,73.56000000],[1787965080000,70.58000000],[1787965380000,68.48000000],[1787965680000,67.62000000],[1787965980000,68.44000000],[1787966280000,72.32000000],[1787966580000,72.92000000],[1787966880000,72.36000000],[1787967180000,71.46000000],[1787967480000,73.20000000],[1787967780000,76.70000000],[1787968080000,76.50000000],[1787968380000,75.98000000],[1787968680000,75.94000000],[1787968980000,73.92000000],[1787969280000,73.86000000],[1787969580000,73.80000000],[1787969880000,70.32000000],[1787970180000,69.00000000],[1787970480000,69.86000000],[1787970780000,71.50000000],[1787971080000,71.02000000],[1787971380000,71.48000000],[1787971680000,69.06000000],[1787971980000,62.84000000],[1787972280000,59.90000000],[1787972580000,62.68000000],[1787972880000,60.60000000],[1787973180000,60.28000000],[1787973480000,58.82000000],[1787973780000,60.06000000],[1787974080000,60.38000000],[1787974380000,60.04000000],[1787974680000,57.52000000],[1787974980000,63.20000000],[1787975280000,63.52000000],[1787975580000,63.16000000],[1787975880000,64.52000000],[1787976180000,63.00000000],[1787976480000,62.78000000],[1787976780000,63.36000000],[1787977080000,61.44000000],[1787977380000,62.66000000],[1787977680000,65.14000000],[1787977980000,64.46000000],[1787978280000,63.50000000],], 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: 'Rýchlosť vetra (km/h)', data: [[1787954400000,2.760000012],[1787954580000,2.376],[1787954880000,2.304],[1787955180000,3.528],[1787955480000,1.944],[1787955780000,2.304],[1787956080000,2.232],[1787956380000,2.016],[1787956680000,2.952],[1787956980000,2.808],[1787957280000,3.6],[1787957580000,3.384],[1787957880000,3.384],[1787958180000,2.52],[1787958480000,2.304],[1787958780000,3.456],[1787959080000,2.232],[1787959380000,2.952],[1787959680000,3.312],[1787959980000,2.808],[1787960280000,2.376],[1787960580000,3.384],[1787960880000,5.256],[1787961180000,3.6],[1787961480000,3.024],[1787961780000,4.32],[1787962080000,2.952],[1787962380000,4.464],[1787962680000,3.024],[1787962980000,3.744],[1787963280000,2.304],[1787963580000,3.528],[1787963880000,2.88],[1787964180000,3.168],[1787964480000,2.952],[1787964780000,3.312],[1787965080000,5.04],[1787965380000,5.328],[1787965680000,3.96],[1787965980000,3.096],[1787966280000,3.96],[1787966580000,3.384],[1787966880000,3.024],[1787967180000,4.32],[1787967480000,3.528],[1787967780000,3.744],[1787968080000,3.528],[1787968380000,3.096],[1787968680000,3.384],[1787968980000,2.736],[1787969280000,5.472],[1787969580000,4.32],[1787969880000,4.536],[1787970180000,2.592],[1787970480000,3.024],[1787970780000,3.24],[1787971080000,3.384],[1787971380000,3.672],[1787971680000,3.672],[1787971980000,5.76],[1787972280000,6.264],[1787972580000,4.464],[1787972880000,4.176],[1787973180000,5.184],[1787973480000,4.608],[1787973780000,2.952],[1787974080000,4.032],[1787974380000,4.392],[1787974680000,7.992],[1787974980000,5.976],[1787975280000,2.952],[1787975580000,3.096],[1787975880000,3.96],[1787976180000,3.888],[1787976480000,3.384],[1787976780000,4.32],[1787977080000,3.744],[1787977380000,3.384],[1787977680000,3.744],[1787977980000,2.592],[1787978280000,3.24],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1787954400000,4.560000012],[1787954580000,5.4],[1787954880000,4.824],[1787955180000,5.76],[1787955480000,4.176],[1787955780000,4.392],[1787956080000,3.456],[1787956380000,3.96],[1787956680000,5.328],[1787956980000,5.688],[1787957280000,6.336],[1787957580000,6.192],[1787957880000,5.832],[1787958180000,5.184],[1787958480000,3.744],[1787958780000,6.48],[1787959080000,4.104],[1787959380000,4.752],[1787959680000,5.76],[1787959980000,5.4],[1787960280000,4.464],[1787960580000,6.264],[1787960880000,8.496],[1787961180000,7.128],[1787961480000,6.048],[1787961780000,6.624],[1787962080000,6.048],[1787962380000,6.912],[1787962680000,5.184],[1787962980000,6.624],[1787963280000,3.816],[1787963580000,6.12],[1787963880000,5.328],[1787964180000,4.68],[1787964480000,5.184],[1787964780000,5.76],[1787965080000,9],[1787965380000,7.92],[1787965680000,6.696],[1787965980000,5.4],[1787966280000,6.192],[1787966580000,5.976],[1787966880000,5.616],[1787967180000,7.2],[1787967480000,6.696],[1787967780000,6.624],[1787968080000,5.184],[1787968380000,5.328],[1787968680000,5.976],[1787968980000,5.4],[1787969280000,7.776],[1787969580000,7.56],[1787969880000,7.416],[1787970180000,4.608],[1787970480000,6.336],[1787970780000,5.976],[1787971080000,6.264],[1787971380000,6.12],[1787971680000,6.696],[1787971980000,10.224],[1787972280000,9.288],[1787972580000,7.128],[1787972880000,6.48],[1787973180000,9.072],[1787973480000,7.776],[1787973780000,5.328],[1787974080000,7.488],[1787974380000,7.128],[1787974680000,11.304],[1787974980000,8.784],[1787975280000,4.824],[1787975580000,5.832],[1787975880000,6.264],[1787976180000,6.912],[1787976480000,6.48],[1787976780000,6.84],[1787977080000,6.696],[1787977380000,5.976],[1787977680000,6.624],[1787977980000,4.392],[1787978280000,6.48],], color: '#EF9856', points: { show: true }, lines: { show: false }, } ]; var options = { xaxes: [{ axisLabel: 'wind', }], 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.1km/h' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-wind-legend' } }; graphs['#chart-wind'] = $.plot('#chart-wind', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Smer vetra', data: [[1787954400000,92.36666667],[1787954580000,115.78000000],[1787954880000,123.50000000],[1787955180000,111.04000000],[1787955480000,82.40000000],[1787955780000,223.96000000],[1787956080000,105.48000000],[1787956380000,101.80000000],[1787956680000,117.08000000],[1787956980000,128.10000000],[1787957280000,231.98000000],[1787957580000,73.08000000],[1787957880000,146.16000000],[1787958180000,245.56000000],[1787958480000,99.80000000],[1787958780000,101.34000000],[1787959080000,78.06000000],[1787959380000,70.26000000],[1787959680000,128.18000000],[1787959980000,88.32000000],[1787960280000,85.28000000],[1787960580000,51.56000000],[1787960880000,253.46000000],[1787961180000,138.92000000],[1787961480000,253.10000000],[1787961780000,172.94000000],[1787962080000,69.94000000],[1787962380000,114.80000000],[1787962680000,69.22000000],[1787962980000,124.44000000],[1787963280000,90.66000000],[1787963580000,108.58000000],[1787963880000,131.74000000],[1787964180000,213.46000000],[1787964480000,129.70000000],[1787964780000,96.10000000],[1787965080000,153.10000000],[1787965380000,315.10000000],[1787965680000,238.86000000],[1787965980000,84.78000000],[1787966280000,137.04000000],[1787966580000,90.54000000],[1787966880000,264.94000000],[1787967180000,246.14000000],[1787967480000,172.96000000],[1787967780000,71.46000000],[1787968080000,97.86000000],[1787968380000,110.50000000],[1787968680000,111.10000000],[1787968980000,82.78000000],[1787969280000,127.10000000],[1787969580000,95.70000000],[1787969880000,116.26000000],[1787970180000,86.42000000],[1787970480000,164.24000000],[1787970780000,138.66000000],[1787971080000,246.52000000],[1787971380000,137.74000000],[1787971680000,78.58000000],[1787971980000,26.64000000],[1787972280000,82.46000000],[1787972580000,152.58000000],[1787972880000,121.62000000],[1787973180000,167.64000000],[1787973480000,105.16000000],[1787973780000,161.98000000],[1787974080000,146.50000000],[1787974380000,297.16000000],[1787974680000,77.06000000],[1787974980000,135.32000000],[1787975280000,91.16000000],[1787975580000,134.48000000],[1787975880000,113.42000000],[1787976180000,109.32000000],[1787976480000,113.78000000],[1787976780000,121.62000000],[1787977080000,150.22000000],[1787977380000,191.92000000],[1787977680000,147.10000000],[1787977980000,82.34000000],[1787978280000,52.20000000],], color: '#002f80', points: { show: true }, lines: { show: false }, } ]; var options = { xaxes: [{ axisLabel: 'wind_direction', }], xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, yaxis: { min: 0, max: 360, ticks: [[0, 'S'], [90, 'V'], [180, 'J'], [270, 'Z'], [360, 'S']] }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: function(label, xval, yval, flotItem) { dir = meteo_wind_direction_name(yval); format_date = moment(xval).format('DD.MM., hh:mm') return format_date+' - '+dir; } }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-wind-direction-legend' } }; graphs['#chart-wind-direction'] = $.plot('#chart-wind-direction', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Zrážky', data: [[1787954400000,0],[1787954580000,0],[1787954880000,0],[1787955180000,0],[1787955480000,0],[1787955780000,0],[1787956080000,0],[1787956380000,0],[1787956680000,0],[1787956980000,0],[1787957280000,0],[1787957580000,0],[1787957880000,0],[1787958180000,0],[1787958480000,0],[1787958780000,0],[1787959080000,0],[1787959380000,0],[1787959680000,0],[1787959980000,0],[1787960280000,0],[1787960580000,0],[1787960880000,0],[1787961180000,0],[1787961480000,0],[1787961780000,0],[1787962080000,0],[1787962380000,0],[1787962680000,0],[1787962980000,0],[1787963280000,0],[1787963580000,0],[1787963880000,0],[1787964180000,0],[1787964480000,0],[1787964780000,0],[1787965080000,0],[1787965380000,0],[1787965680000,0],[1787965980000,0],[1787966280000,0],[1787966580000,0],[1787966880000,0],[1787967180000,0],[1787967480000,0],[1787967780000,0],[1787968080000,0],[1787968380000,0],[1787968680000,0],[1787968980000,0],[1787969280000,0],[1787969580000,0],[1787969880000,0],[1787970180000,0],[1787970480000,0],[1787970780000,0],[1787971080000,0],[1787971380000,0],[1787971680000,0],[1787971980000,0],[1787972280000,0],[1787972580000,0],[1787972880000,0],[1787973180000,0],[1787973480000,0],[1787973780000,0],[1787974080000,0],[1787974380000,0],[1787974680000,0],[1787974980000,0],[1787975280000,0],[1787975580000,0],[1787975880000,0],[1787976180000,0],[1787976480000,0],[1787976780000,0],[1787977080000,0],[1787977380000,0],[1787977680000,0],[1787977980000,0],[1787978280000,0],], color: '#008fbf' } ]; var options = { xaxes: [{ axisLabel: 'rain', }], 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.3mm' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-rain-legend' } }; graphs['#chart-rain'] = $.plot('#chart-rain', 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; }