var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1787954400000,19.60000000],[1787954580000,19.58000000],[1787954880000,19.50000000],[1787955180000,19.42000000],[1787955480000,19.28000000],[1787955780000,19.20000000],[1787956080000,19.54000000],[1787956380000,20.38000000],[1787956680000,21.10000000],[1787956980000,21.66000000],[1787957280000,21.98000000],[1787957580000,21.64000000],[1787957880000,21.26000000],[1787958180000,21.06000000],[1787958480000,20.90000000],[1787958780000,20.76000000],[1787959080000,20.64000000],[1787959380000,20.60000000],[1787959680000,20.52000000],[1787959980000,20.18000000],[1787960280000,20.00000000],[1787960580000,19.90000000],[1787960880000,19.90000000],[1787961180000,19.90000000],[1787961480000,19.98000000],[1787961780000,20.18000000],[1787962080000,20.20000000],[1787962380000,20.20000000],[1787962680000,20.26000000],[1787962980000,20.20000000],[1787963280000,20.14000000],[1787963580000,20.12000000],[1787963880000,20.20000000],[1787964180000,20.22000000],[1787964480000,20.34000000],[1787964780000,20.88000000],[1787965080000,20.88000000],[1787965380000,20.96000000],[1787965680000,21.08000000],[1787965980000,21.00000000],[1787966280000,21.02000000],[1787966580000,21.10000000],[1787966880000,21.00000000],[1787967180000,21.12000000],[1787967480000,21.24000000],[1787967780000,21.40000000],[1787968080000,21.58000000],[1787968380000,21.76000000],[1787968680000,21.62000000],[1787968980000,21.36000000],[1787969280000,21.20000000],[1787969580000,21.12000000],[1787969880000,21.02000000],[1787970180000,20.86000000],[1787970480000,20.72000000],[1787970780000,20.56000000],[1787971080000,20.50000000],[1787971380000,20.50000000],[1787971680000,20.42000000],[1787971980000,20.30000000],[1787972280000,20.20000000],[1787972580000,20.12000000],[1787972880000,20.04000000],[1787973180000,19.84000000],[1787973480000,19.70000000],[1787973780000,19.64000000],[1787974080000,19.52000000],[1787974380000,19.44000000],[1787974680000,19.46000000],[1787974980000,19.16000000],[1787975280000,18.78000000],[1787975580000,18.50000000],[1787975880000,18.22000000],[1787976180000,18.02000000],[1787976480000,17.90000000],[1787976780000,17.90000000],[1787977080000,17.96000000],[1787977380000,18.00000000],[1787977680000,18.04000000],[1787977980000,18.10000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1787954400000,11.9],[1787954580000,11.9],[1787954880000,12],[1787955180000,12],[1787955480000,12.2],[1787955780000,12],[1787956080000,10.7],[1787956380000,10.1],[1787956680000,9.9],[1787956980000,9.9],[1787957280000,10.4],[1787957580000,11.4],[1787957880000,11.6],[1787958180000,11.7],[1787958480000,11.9],[1787958780000,12],[1787959080000,11.9],[1787959380000,12],[1787959680000,12.5],[1787959980000,12.6],[1787960280000,12.7],[1787960580000,12.2],[1787960880000,12.2],[1787961180000,12.3],[1787961480000,12],[1787961780000,11.9],[1787962080000,11.8],[1787962380000,11.9],[1787962680000,11.9],[1787962980000,12],[1787963280000,12],[1787963580000,11.9],[1787963880000,12.1],[1787964180000,12],[1787964480000,11.5],[1787964780000,10.9],[1787965080000,11.7],[1787965380000,11.1],[1787965680000,11.6],[1787965980000,11.5],[1787966280000,11.2],[1787966580000,11.3],[1787966880000,11.2],[1787967180000,10.9],[1787967480000,10.8],[1787967780000,10.7],[1787968080000,10.5],[1787968380000,10.7],[1787968680000,11.1],[1787968980000,11.6],[1787969280000,11.2],[1787969580000,11.4],[1787969880000,11.8],[1787970180000,12],[1787970480000,12.5],[1787970780000,12.3],[1787971080000,11.9],[1787971380000,11.9],[1787971680000,12.1],[1787971980000,12.2],[1787972280000,12.2],[1787972580000,12.2],[1787972880000,12.6],[1787973180000,13],[1787973480000,12.9],[1787973780000,13],[1787974080000,12.9],[1787974380000,12.8],[1787974680000,12.9],[1787974980000,13.3],[1787975280000,13.8],[1787975580000,14],[1787975880000,14.1],[1787976180000,14.1],[1787976480000,14],[1787976780000,14],[1787977080000,14.1],[1787977380000,14.1],[1787977680000,14.1],[1787977980000,14.2],], 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,17.10000000],[1787954580000,17.02000000],[1787954880000,16.88000000],[1787955180000,16.74000000],[1787955480000,16.64000000],[1787955780000,16.62000000],[1787956080000,16.82000000],[1787956380000,17.46000000],[1787956680000,17.98000000],[1787956980000,18.44000000],[1787957280000,18.62000000],[1787957580000,18.50000000],[1787957880000,18.50000000],[1787958180000,18.60000000],[1787958480000,18.70000000],[1787958780000,18.78000000],[1787959080000,18.80000000],[1787959380000,18.86000000],[1787959680000,18.82000000],[1787959980000,18.50000000],[1787960280000,18.14000000],[1787960580000,17.92000000],[1787960880000,17.88000000],[1787961180000,17.88000000],[1787961480000,18.24000000],[1787961780000,18.46000000],[1787962080000,18.50000000],[1787962380000,18.46000000],[1787962680000,18.34000000],[1787962980000,18.20000000],[1787963280000,18.10000000],[1787963580000,18.14000000],[1787963880000,18.32000000],[1787964180000,18.56000000],[1787964480000,18.70000000],[1787964780000,19.06000000],[1787965080000,19.12000000],[1787965380000,19.16000000],[1787965680000,19.22000000],[1787965980000,19.18000000],[1787966280000,19.10000000],[1787966580000,19.10000000],[1787966880000,19.18000000],[1787967180000,19.28000000],[1787967480000,19.36000000],[1787967780000,19.32000000],[1787968080000,19.46000000],[1787968380000,19.48000000],[1787968680000,18.84000000],[1787968980000,17.42000000],[1787969280000,16.84000000],[1787969580000,16.58000000],[1787969880000,16.62000000],[1787970180000,16.82000000],[1787970480000,16.98000000],[1787970780000,16.96000000],[1787971080000,16.92000000],[1787971380000,16.90000000],[1787971680000,17.06000000],[1787971980000,17.32000000],[1787972280000,17.70000000],[1787972580000,17.90000000],[1787972880000,17.88000000],[1787973180000,17.80000000],[1787973480000,17.80000000],[1787973780000,17.90000000],[1787974080000,17.80000000],[1787974380000,17.70000000],[1787974680000,17.78000000],[1787974980000,17.74000000],[1787975280000,17.48000000],[1787975580000,17.28000000],[1787975880000,17.08000000],[1787976180000,16.96000000],[1787976480000,16.90000000],[1787976780000,16.90000000],[1787977080000,16.96000000],[1787977380000,17.06000000],[1787977680000,17.16000000],[1787977980000,17.20000000],], 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,61.46666667],[1787954580000,61.34000000],[1787954880000,61.96000000],[1787955180000,62.50000000],[1787955480000,63.70000000],[1787955780000,63.24000000],[1787956080000,56.96000000],[1787956380000,51.88000000],[1787956680000,49.02000000],[1787956980000,47.22000000],[1787957280000,47.98000000],[1787957580000,52.44000000],[1787957880000,54.30000000],[1787958180000,55.34000000],[1787958480000,56.56000000],[1787958780000,57.38000000],[1787959080000,57.58000000],[1787959380000,58.08000000],[1787959680000,60.26000000],[1787959980000,61.74000000],[1787960280000,63.06000000],[1787960580000,61.16000000],[1787960880000,61.36000000],[1787961180000,61.54000000],[1787961480000,60.20000000],[1787961780000,59.24000000],[1787962080000,58.80000000],[1787962380000,58.90000000],[1787962680000,58.98000000],[1787962980000,59.44000000],[1787963280000,59.78000000],[1787963580000,59.52000000],[1787963880000,59.76000000],[1787964180000,59.32000000],[1787964480000,56.86000000],[1787964780000,52.88000000],[1787965080000,55.92000000],[1787965380000,53.50000000],[1787965680000,54.70000000],[1787965980000,54.68000000],[1787966280000,53.66000000],[1787966580000,53.68000000],[1787966880000,53.72000000],[1787967180000,52.36000000],[1787967480000,51.40000000],[1787967780000,50.56000000],[1787968080000,49.32000000],[1787968380000,49.48000000],[1787968680000,51.44000000],[1787968980000,53.78000000],[1787969280000,53.16000000],[1787969580000,54.06000000],[1787969880000,55.80000000],[1787970180000,57.08000000],[1787970480000,59.48000000],[1787970780000,59.30000000],[1787971080000,58.02000000],[1787971380000,57.94000000],[1787971680000,58.92000000],[1787971980000,59.80000000],[1787972280000,60.26000000],[1787972580000,60.32000000],[1787972880000,62.44000000],[1787973180000,65.02000000],[1787973480000,65.08000000],[1787973780000,65.56000000],[1787974080000,65.88000000],[1787974380000,65.82000000],[1787974680000,65.86000000],[1787974980000,69.08000000],[1787975280000,72.78000000],[1787975580000,75.14000000],[1787975880000,76.90000000],[1787976180000,77.88000000],[1787976480000,78.14000000],[1787976780000,78.26000000],[1787977080000,78.18000000],[1787977380000,78.02000000],[1787977680000,77.88000000],[1787977980000,77.87500000],], 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.040000012],[1787954580000,1.872],[1787954880000,1.008],[1787955180000,1.368],[1787955480000,1.728],[1787955780000,2.448],[1787956080000,3.24],[1787956380000,3.456],[1787956680000,5.184],[1787956980000,3.888],[1787957280000,5.112],[1787957580000,2.16],[1787957880000,2.376],[1787958180000,3.024],[1787958480000,2.592],[1787958780000,2.736],[1787959080000,3.024],[1787959380000,3.384],[1787959680000,3.168],[1787959980000,2.664],[1787960280000,3.6],[1787960580000,3.96],[1787960880000,2.736],[1787961180000,2.736],[1787961480000,5.112],[1787961780000,2.952],[1787962080000,4.536],[1787962380000,2.304],[1787962680000,1.44],[1787962980000,2.232],[1787963280000,3.024],[1787963580000,3.384],[1787963880000,2.88],[1787964180000,3.312],[1787964480000,3.024],[1787964780000,3.312],[1787965080000,3.096],[1787965380000,4.176],[1787965680000,7.776],[1787965980000,3.672],[1787966280000,4.248],[1787966580000,8.064],[1787966880000,10.584],[1787967180000,7.128],[1787967480000,5.04],[1787967780000,5.256],[1787968080000,7.416],[1787968380000,5.184],[1787968680000,4.248],[1787968980000,3.96],[1787969280000,6.624],[1787969580000,4.248],[1787969880000,2.52],[1787970180000,2.592],[1787970480000,4.176],[1787970780000,3.456],[1787971080000,4.32],[1787971380000,3.672],[1787971680000,3.816],[1787971980000,4.104],[1787972280000,2.736],[1787972580000,1.152],[1787972880000,2.304],[1787973180000,2.592],[1787973480000,1.656],[1787973780000,2.736],[1787974080000,1.584],[1787974380000,4.752],[1787974680000,11.16],[1787974980000,9.432],[1787975280000,7.56],[1787975580000,4.968],[1787975880000,6.192],[1787976180000,4.32],[1787976480000,4.464],[1787976780000,2.88],[1787977080000,3.456],[1787977380000,2.664],[1787977680000,3.096],[1787977980000,3.33],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1787954400000,2.760000012],[1787954580000,2.808],[1787954880000,1.728],[1787955180000,2.088],[1787955480000,2.88],[1787955780000,5.04],[1787956080000,6.984],[1787956380000,6.912],[1787956680000,9.288],[1787956980000,6.768],[1787957280000,8.496],[1787957580000,3.168],[1787957880000,3.168],[1787958180000,3.96],[1787958480000,3.744],[1787958780000,3.816],[1787959080000,3.744],[1787959380000,5.4],[1787959680000,4.536],[1787959980000,3.384],[1787960280000,4.968],[1787960580000,5.616],[1787960880000,3.6],[1787961180000,4.608],[1787961480000,7.056],[1787961780000,4.968],[1787962080000,5.832],[1787962380000,3.816],[1787962680000,2.52],[1787962980000,3.024],[1787963280000,4.536],[1787963580000,5.184],[1787963880000,4.32],[1787964180000,6.48],[1787964480000,6.048],[1787964780000,5.76],[1787965080000,5.04],[1787965380000,6.48],[1787965680000,11.016],[1787965980000,6.984],[1787966280000,6.624],[1787966580000,12.744],[1787966880000,17.712],[1787967180000,12.672],[1787967480000,8.496],[1787967780000,9.216],[1787968080000,12.24],[1787968380000,10.224],[1787968680000,7.344],[1787968980000,8.064],[1787969280000,11.304],[1787969580000,7.488],[1787969880000,4.392],[1787970180000,3.672],[1787970480000,5.328],[1787970780000,4.68],[1787971080000,7.128],[1787971380000,5.256],[1787971680000,6.264],[1787971980000,6.264],[1787972280000,4.32],[1787972580000,1.728],[1787972880000,2.88],[1787973180000,3.744],[1787973480000,2.52],[1787973780000,3.456],[1787974080000,2.304],[1787974380000,6.84],[1787974680000,20.088],[1787974980000,16.488],[1787975280000,11.808],[1787975580000,8.712],[1787975880000,10.008],[1787976180000,6.696],[1787976480000,7.2],[1787976780000,5.184],[1787977080000,5.688],[1787977380000,4.896],[1787977680000,4.32],[1787977980000,4.5],], 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,175.40000000],[1787954580000,88.38000000],[1787954880000,96.32000000],[1787955180000,113.04000000],[1787955480000,155.82000000],[1787955780000,105.60000000],[1787956080000,72.22000000],[1787956380000,75.98000000],[1787956680000,58.84000000],[1787956980000,66.44000000],[1787957280000,145.28000000],[1787957580000,217.30000000],[1787957880000,218.00000000],[1787958180000,213.02000000],[1787958480000,250.06000000],[1787958780000,204.16000000],[1787959080000,242.92000000],[1787959380000,188.54000000],[1787959680000,139.50000000],[1787959980000,224.98000000],[1787960280000,175.24000000],[1787960580000,233.58000000],[1787960880000,192.86000000],[1787961180000,253.14000000],[1787961480000,152.62000000],[1787961780000,192.24000000],[1787962080000,237.04000000],[1787962380000,150.42000000],[1787962680000,220.12000000],[1787962980000,178.48000000],[1787963280000,304.06000000],[1787963580000,246.66000000],[1787963880000,227.70000000],[1787964180000,222.30000000],[1787964480000,124.00000000],[1787964780000,211.92000000],[1787965080000,234.54000000],[1787965380000,227.46000000],[1787965680000,256.64000000],[1787965980000,265.28000000],[1787966280000,304.06000000],[1787966580000,287.00000000],[1787966880000,305.48000000],[1787967180000,294.96000000],[1787967480000,283.56000000],[1787967780000,298.14000000],[1787968080000,316.50000000],[1787968380000,313.90000000],[1787968680000,304.54000000],[1787968980000,302.12000000],[1787969280000,304.70000000],[1787969580000,297.22000000],[1787969880000,277.72000000],[1787970180000,235.76000000],[1787970480000,234.04000000],[1787970780000,261.72000000],[1787971080000,293.46000000],[1787971380000,320.58000000],[1787971680000,320.28000000],[1787971980000,291.98000000],[1787972280000,259.30000000],[1787972580000,219.00000000],[1787972880000,310.74000000],[1787973180000,210.26000000],[1787973480000,110.86000000],[1787973780000,109.24000000],[1787974080000,104.24000000],[1787974380000,298.30000000],[1787974680000,297.82000000],[1787974980000,297.64000000],[1787975280000,296.88000000],[1787975580000,305.84000000],[1787975880000,277.32000000],[1787976180000,252.46000000],[1787976480000,225.84000000],[1787976780000,231.64000000],[1787977080000,235.40000000],[1787977380000,246.50000000],[1787977680000,244.36000000],[1787977980000,187.90000000],], 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.016],[1787969580000,0.016],[1787969880000,0.016],[1787970180000,0.016],[1787970480000,0.016],[1787970780000,0.016],[1787971080000,0.016],[1787971380000,0.016],[1787971680000,0.016],[1787971980000,0.016],[1787972280000,0.016],[1787972580000,0.016],[1787972880000,0.016],[1787973180000,0.016],[1787973480000,0.016],[1787973780000,0.016],[1787974080000,0.016],[1787974380000,0.016],[1787974680000,0.016],[1787974980000,0.016],[1787975280000,0.016],[1787975580000,0.016],[1787975880000,0.016],[1787976180000,0.016],[1787976480000,0.016],[1787976780000,0.016],[1787977080000,0.016],[1787977380000,0.016],[1787977680000,0.016],[1787977980000,0.016],], 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; }