var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1787954400000,8.50000000],[1787954580000,8.50000000],[1787954880000,8.40000000],[1787955180000,8.40000000],[1787955480000,8.34000000],[1787955780000,8.26000000],[1787956080000,8.20000000],[1787956380000,8.26000000],[1787956680000,8.22000000],[1787956980000,8.20000000],[1787957280000,8.20000000],[1787957580000,8.18000000],[1787957880000,8.20000000],[1787958180000,8.20000000],[1787958480000,8.20000000],[1787958780000,8.26000000],[1787959080000,8.32000000],[1787959380000,8.30000000],[1787959680000,8.32000000],[1787959980000,8.44000000],[1787960280000,8.44000000],[1787960580000,8.48000000],[1787960880000,8.60000000],[1787961180000,8.60000000],[1787961480000,8.62000000],[1787961780000,8.68000000],[1787962080000,8.70000000],[1787962380000,8.70000000],[1787962680000,8.70000000],[1787962980000,8.76000000],[1787963280000,8.80000000],[1787963580000,8.90000000],[1787963880000,8.94000000],[1787964180000,9.00000000],[1787964480000,9.04000000],[1787964780000,9.08000000],[1787965080000,9.10000000],[1787965380000,9.04000000],[1787965680000,9.06000000],[1787965980000,9.10000000],[1787966280000,9.06000000],[1787966580000,9.06000000],[1787966880000,9.10000000],[1787967180000,9.10000000],[1787967480000,9.16000000],[1787967780000,9.20000000],[1787968080000,9.26000000],[1787968380000,9.30000000],[1787968680000,9.38000000],[1787968980000,9.40000000],[1787969280000,9.52000000],[1787969580000,9.60000000],[1787969880000,9.56000000],[1787970180000,9.50000000],[1787970480000,9.56000000],[1787970780000,9.62000000],[1787971080000,9.70000000],[1787971380000,9.70000000],[1787971680000,9.78000000],[1787971980000,9.80000000],[1787972280000,9.94000000],[1787972580000,10.08000000],[1787972880000,10.20000000],[1787973180000,10.32000000],[1787973480000,10.48000000],[1787973780000,10.58000000],[1787974080000,10.66000000],[1787974380000,10.78000000],[1787974680000,10.90000000],[1787974980000,10.90000000],[1787975280000,10.94000000],[1787975580000,11.00000000],[1787975880000,11.06000000],[1787976180000,11.22000000],[1787976480000,11.42000000],[1787976780000,11.56000000],[1787977080000,11.74000000],[1787977380000,12.56000000],[1787977680000,13.22000000],[1787977980000,14.38000000],[1787978280000,15.40000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1787954400000,6.3],[1787954580000,6.4],[1787954880000,6.3],[1787955180000,6.3],[1787955480000,6.3],[1787955780000,6.2],[1787956080000,6.2],[1787956380000,6.3],[1787956680000,6.3],[1787956980000,6.2],[1787957280000,6.3],[1787957580000,6.3],[1787957880000,6.3],[1787958180000,6.3],[1787958480000,6.3],[1787958780000,6.4],[1787959080000,6.4],[1787959380000,6.3],[1787959680000,6.4],[1787959980000,6.5],[1787960280000,6.4],[1787960580000,6.4],[1787960880000,6.5],[1787961180000,6.5],[1787961480000,6.5],[1787961780000,6.6],[1787962080000,6.6],[1787962380000,6.6],[1787962680000,6.6],[1787962980000,6.7],[1787963280000,6.7],[1787963580000,6.8],[1787963880000,6.8],[1787964180000,6.8],[1787964480000,6.8],[1787964780000,6.8],[1787965080000,6.8],[1787965380000,6.8],[1787965680000,6.9],[1787965980000,6.9],[1787966280000,6.9],[1787966580000,6.9],[1787966880000,6.9],[1787967180000,7],[1787967480000,7],[1787967780000,7.1],[1787968080000,7.1],[1787968380000,7.1],[1787968680000,7.2],[1787968980000,7.2],[1787969280000,7.3],[1787969580000,7.4],[1787969880000,7.3],[1787970180000,7.3],[1787970480000,7.4],[1787970780000,7.4],[1787971080000,7.4],[1787971380000,7.4],[1787971680000,7.5],[1787971980000,7.5],[1787972280000,7.6],[1787972580000,7.7],[1787972880000,7.9],[1787973180000,7.9],[1787973480000,8.1],[1787973780000,8.1],[1787974080000,8.2],[1787974380000,8.3],[1787974680000,8.4],[1787974980000,8.4],[1787975280000,8.3],[1787975580000,8.3],[1787975880000,8.4],[1787976180000,8.6],[1787976480000,8.7],[1787976780000,8.7],[1787977080000,8.5],[1787977380000,8.5],[1787977680000,8.8],[1787977980000,8.6],[1787978280000,8.8],], 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,7.20000000],[1787954580000,7.30000000],[1787954880000,7.24000000],[1787955180000,7.20000000],[1787955480000,7.02000000],[1787955780000,7.06000000],[1787956080000,7.36000000],[1787956380000,7.44000000],[1787956680000,7.44000000],[1787956980000,7.28000000],[1787957280000,7.24000000],[1787957580000,7.42000000],[1787957880000,7.54000000],[1787958180000,7.44000000],[1787958480000,7.54000000],[1787958780000,7.64000000],[1787959080000,7.72000000],[1787959380000,7.64000000],[1787959680000,7.84000000],[1787959980000,7.88000000],[1787960280000,7.84000000],[1787960580000,8.04000000],[1787960880000,8.20000000],[1787961180000,7.98000000],[1787961480000,8.00000000],[1787961780000,8.04000000],[1787962080000,8.12000000],[1787962380000,8.14000000],[1787962680000,8.18000000],[1787962980000,8.08000000],[1787963280000,8.26000000],[1787963580000,8.40000000],[1787963880000,8.48000000],[1787964180000,8.50000000],[1787964480000,8.58000000],[1787964780000,8.58000000],[1787965080000,8.58000000],[1787965380000,8.40000000],[1787965680000,8.40000000],[1787965980000,8.34000000],[1787966280000,8.30000000],[1787966580000,8.44000000],[1787966880000,8.48000000],[1787967180000,8.42000000],[1787967480000,8.46000000],[1787967780000,8.62000000],[1787968080000,8.80000000],[1787968380000,8.80000000],[1787968680000,8.94000000],[1787968980000,9.08000000],[1787969280000,9.06000000],[1787969580000,9.10000000],[1787969880000,9.08000000],[1787970180000,8.98000000],[1787970480000,8.94000000],[1787970780000,8.96000000],[1787971080000,9.14000000],[1787971380000,9.26000000],[1787971680000,9.30000000],[1787971980000,9.38000000],[1787972280000,9.64000000],[1787972580000,9.74000000],[1787972880000,9.90000000],[1787973180000,10.00000000],[1787973480000,10.12000000],[1787973780000,10.40000000],[1787974080000,10.64000000],[1787974380000,10.74000000],[1787974680000,10.70000000],[1787974980000,10.56000000],[1787975280000,10.44000000],[1787975580000,10.50000000],[1787975880000,10.68000000],[1787976180000,10.92000000],[1787976480000,11.18000000],[1787976780000,11.32000000],[1787977080000,11.70000000],[1787977380000,12.70000000],[1787977680000,13.40000000],[1787977980000,15.08000000],[1787978280000,16.00000000],], 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,86.30000000],[1787954580000,86.62000000],[1787954880000,86.70000000],[1787955180000,87.02000000],[1787955480000,87.16000000],[1787955780000,87.10000000],[1787956080000,87.38000000],[1787956380000,87.56000000],[1787956680000,87.60000000],[1787956980000,87.64000000],[1787957280000,87.80000000],[1787957580000,87.88000000],[1787957880000,87.96000000],[1787958180000,88.02000000],[1787958480000,88.08000000],[1787958780000,87.92000000],[1787959080000,87.90000000],[1787959380000,87.66000000],[1787959680000,87.66000000],[1787959980000,87.50000000],[1787960280000,86.88000000],[1787960580000,87.14000000],[1787960880000,86.92000000],[1787961180000,86.88000000],[1787961480000,86.82000000],[1787961780000,86.68000000],[1787962080000,86.66000000],[1787962380000,86.80000000],[1787962680000,86.76000000],[1787962980000,86.80000000],[1787963280000,86.84000000],[1787963580000,86.62000000],[1787963880000,86.58000000],[1787964180000,86.54000000],[1787964480000,86.18000000],[1787964780000,86.06000000],[1787965080000,85.94000000],[1787965380000,86.00000000],[1787965680000,86.40000000],[1787965980000,86.36000000],[1787966280000,86.48000000],[1787966580000,86.40000000],[1787966880000,86.38000000],[1787967180000,86.66000000],[1787967480000,86.74000000],[1787967780000,86.76000000],[1787968080000,86.64000000],[1787968380000,86.56000000],[1787968680000,86.62000000],[1787968980000,86.46000000],[1787969280000,86.16000000],[1787969580000,86.18000000],[1787969880000,86.12000000],[1787970180000,86.24000000],[1787970480000,86.28000000],[1787970780000,86.10000000],[1787971080000,85.90000000],[1787971380000,85.64000000],[1787971680000,85.72000000],[1787971980000,85.68000000],[1787972280000,85.70000000],[1787972580000,85.58000000],[1787972880000,85.60000000],[1787973180000,85.32000000],[1787973480000,85.10000000],[1787973780000,84.94000000],[1787974080000,84.76000000],[1787974380000,84.56000000],[1787974680000,84.80000000],[1787974980000,84.62000000],[1787975280000,83.78000000],[1787975580000,83.62000000],[1787975880000,83.94000000],[1787976180000,84.22000000],[1787976480000,83.40000000],[1787976780000,82.98000000],[1787977080000,80.66000000],[1787977380000,76.38000000],[1787977680000,74.82000000],[1787977980000,68.52000000],[1787978280000,65.10000000],], 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,1.08],[1787954580000,1.656],[1787954880000,2.736],[1787955180000,2.736],[1787955480000,2.448],[1787955780000,3.168],[1787956080000,3.24],[1787956380000,3.888],[1787956680000,3.528],[1787956980000,2.808],[1787957280000,2.592],[1787957580000,4.32],[1787957880000,4.68],[1787958180000,3.672],[1787958480000,4.464],[1787958780000,4.104],[1787959080000,4.536],[1787959380000,5.112],[1787959680000,5.76],[1787959980000,5.544],[1787960280000,6.048],[1787960580000,7.416],[1787960880000,5.472],[1787961180000,4.248],[1787961480000,4.896],[1787961780000,6.552],[1787962080000,5.472],[1787962380000,5.328],[1787962680000,3.528],[1787962980000,4.68],[1787963280000,6.048],[1787963580000,5.976],[1787963880000,5.904],[1787964180000,3.816],[1787964480000,4.608],[1787964780000,3.744],[1787965080000,2.952],[1787965380000,2.808],[1787965680000,1.584],[1787965980000,0.936],[1787966280000,1.656],[1787966580000,1.656],[1787966880000,1.152],[1787967180000,0.936],[1787967480000,1.152],[1787967780000,2.376],[1787968080000,1.224],[1787968380000,2.664],[1787968680000,3.456],[1787968980000,1.224],[1787969280000,1.512],[1787969580000,2.088],[1787969880000,1.944],[1787970180000,1.368],[1787970480000,2.088],[1787970780000,2.376],[1787971080000,2.16],[1787971380000,2.592],[1787971680000,0.648],[1787971980000,1.296],[1787972280000,3.744],[1787972580000,5.616],[1787972880000,4.896],[1787973180000,2.664],[1787973480000,1.512],[1787973780000,1.152],[1787974080000,1.584],[1787974380000,3.24],[1787974680000,3.528],[1787974980000,4.536],[1787975280000,1.944],[1787975580000,2.304],[1787975880000,3.024],[1787976180000,3.312],[1787976480000,1.44],[1787976780000,3.528],[1787977080000,5.544],[1787977380000,6.264],[1787977680000,9.504],[1787977980000,14.112],[1787978280000,17.28],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1787954400000,1.320000012],[1787954580000,2.088],[1787954880000,3.168],[1787955180000,3.096],[1787955480000,2.664],[1787955780000,3.384],[1787956080000,3.384],[1787956380000,4.392],[1787956680000,4.176],[1787956980000,3.384],[1787957280000,3.168],[1787957580000,4.752],[1787957880000,5.76],[1787958180000,4.032],[1787958480000,4.968],[1787958780000,4.608],[1787959080000,5.184],[1787959380000,5.832],[1787959680000,6.84],[1787959980000,6.624],[1787960280000,6.912],[1787960580000,8.568],[1787960880000,7.344],[1787961180000,5.256],[1787961480000,5.544],[1787961780000,7.488],[1787962080000,7.128],[1787962380000,6.408],[1787962680000,4.32],[1787962980000,5.544],[1787963280000,6.696],[1787963580000,6.984],[1787963880000,6.912],[1787964180000,4.968],[1787964480000,5.832],[1787964780000,4.824],[1787965080000,3.528],[1787965380000,3.744],[1787965680000,2.232],[1787965980000,1.728],[1787966280000,2.088],[1787966580000,1.872],[1787966880000,1.512],[1787967180000,1.224],[1787967480000,1.584],[1787967780000,2.88],[1787968080000,1.656],[1787968380000,3.312],[1787968680000,4.104],[1787968980000,1.656],[1787969280000,2.016],[1787969580000,3.024],[1787969880000,2.736],[1787970180000,1.872],[1787970480000,2.592],[1787970780000,2.592],[1787971080000,3.672],[1787971380000,3.456],[1787971680000,1.08],[1787971980000,2.016],[1787972280000,4.464],[1787972580000,6.12],[1787972880000,5.76],[1787973180000,3.384],[1787973480000,2.304],[1787973780000,1.656],[1787974080000,2.088],[1787974380000,3.816],[1787974680000,4.464],[1787974980000,5.832],[1787975280000,2.664],[1787975580000,3.168],[1787975880000,3.816],[1787976180000,4.824],[1787976480000,2.808],[1787976780000,5.184],[1787977080000,8.136],[1787977380000,9],[1787977680000,13.536],[1787977980000,20.304],[1787978280000,27],], 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,231.00000000],[1787954580000,14.76000000],[1787954880000,204.20000000],[1787955180000,323.56000000],[1787955480000,334.08000000],[1787955780000,284.84000000],[1787956080000,145.60000000],[1787956380000,346.56000000],[1787956680000,334.36000000],[1787956980000,215.70000000],[1787957280000,150.12000000],[1787957580000,275.50000000],[1787957880000,329.56000000],[1787958180000,341.46000000],[1787958480000,214.80000000],[1787958780000,345.14000000],[1787959080000,337.54000000],[1787959380000,217.78000000],[1787959680000,325.22000000],[1787959980000,352.30000000],[1787960280000,351.04000000],[1787960580000,348.04000000],[1787960880000,341.50000000],[1787961180000,148.42000000],[1787961480000,342.78000000],[1787961780000,343.88000000],[1787962080000,346.02000000],[1787962380000,348.32000000],[1787962680000,191.02000000],[1787962980000,75.92000000],[1787963280000,343.74000000],[1787963580000,345.98000000],[1787963880000,333.52000000],[1787964180000,346.52000000],[1787964480000,337.34000000],[1787964780000,148.02000000],[1787965080000,255.96000000],[1787965380000,213.14000000],[1787965680000,273.62000000],[1787965980000,227.62000000],[1787966280000,78.42000000],[1787966580000,135.62000000],[1787966880000,195.92000000],[1787967180000,71.36000000],[1787967480000,216.16000000],[1787967780000,211.38000000],[1787968080000,275.76000000],[1787968380000,200.14000000],[1787968680000,73.52000000],[1787968980000,266.60000000],[1787969280000,143.88000000],[1787969580000,123.42000000],[1787969880000,202.46000000],[1787970180000,200.74000000],[1787970480000,188.72000000],[1787970780000,167.20000000],[1787971080000,154.90000000],[1787971380000,162.34000000],[1787971680000,177.38000000],[1787971980000,314.74000000],[1787972280000,331.94000000],[1787972580000,349.58000000],[1787972880000,323.46000000],[1787973180000,325.08000000],[1787973480000,277.28000000],[1787973780000,250.88000000],[1787974080000,194.18000000],[1787974380000,200.60000000],[1787974680000,177.98000000],[1787974980000,182.18000000],[1787975280000,124.24000000],[1787975580000,139.04000000],[1787975880000,330.54000000],[1787976180000,299.94000000],[1787976480000,143.02000000],[1787976780000,48.38000000],[1787977080000,123.72000000],[1787977380000,153.76000000],[1787977680000,167.24000000],[1787977980000,186.44000000],[1787978280000,184.00000000],], 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; }