var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1787954400000,19.96666667],[1787954580000,20.06000000],[1787954880000,20.00000000],[1787955180000,19.92000000],[1787955480000,19.88000000],[1787955780000,19.82000000],[1787956080000,19.82000000],[1787956380000,19.70000000],[1787956680000,19.64000000],[1787956980000,19.62000000],[1787957280000,19.72000000],[1787957580000,19.86000000],[1787957880000,20.10000000],[1787958180000,20.20000000],[1787958480000,20.16000000],[1787958780000,20.06000000],[1787959080000,20.00000000],[1787959380000,20.02000000],[1787959680000,20.06000000],[1787959980000,20.04000000],[1787960280000,20.14000000],[1787960580000,20.12000000],[1787960880000,20.12000000],[1787961180000,20.26000000],[1787961480000,20.26000000],[1787961780000,20.34000000],[1787962080000,20.40000000],[1787962380000,20.38000000],[1787962680000,20.50000000],[1787962980000,20.68000000],[1787963280000,20.72000000],[1787963580000,21.00000000],[1787963880000,21.02000000],[1787964180000,21.10000000],[1787964480000,20.98000000],[1787964780000,21.00000000],[1787965080000,20.98000000],[1787965380000,21.00000000],[1787965680000,20.92000000],[1787965980000,20.82000000],[1787966280000,20.90000000],[1787966580000,21.12000000],[1787966880000,21.10000000],[1787967180000,21.14000000],[1787967480000,21.18000000],[1787967780000,21.06000000],[1787968080000,20.98000000],[1787968380000,20.96000000],[1787968680000,21.00000000],[1787968980000,20.98000000],[1787969280000,21.00000000],[1787969580000,20.92000000],[1787969880000,20.76000000],[1787970180000,20.60000000],[1787970480000,20.34000000],[1787970780000,20.08000000],[1787971080000,19.78000000],[1787971380000,19.58000000],[1787971680000,19.42000000],[1787971980000,19.18000000],[1787972280000,18.98000000],[1787972580000,18.82000000],[1787972880000,18.58000000],[1787973180000,18.36000000],[1787973480000,18.20000000],[1787973780000,17.96000000],[1787974080000,17.68000000],[1787974380000,17.50000000],[1787974680000,17.38000000],[1787974980000,17.22000000],[1787975280000,17.08000000],[1787975580000,16.98000000],[1787975880000,16.82000000],[1787976180000,16.62000000],[1787976480000,16.42000000],[1787976780000,16.24000000],[1787977080000,16.16000000],[1787977380000,16.06000000],[1787977680000,16.10000000],[1787977980000,16.10000000],[1787978280000,16.10000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1787954400000,5.7],[1787954580000,5.7],[1787954880000,6],[1787955180000,5.8],[1787955480000,5.7],[1787955780000,5.4],[1787956080000,5.4],[1787956380000,5.4],[1787956680000,5.2],[1787956980000,5.2],[1787957280000,5.2],[1787957580000,5],[1787957880000,5.1],[1787958180000,5.2],[1787958480000,5.5],[1787958780000,5.4],[1787959080000,5],[1787959380000,5],[1787959680000,5.1],[1787959980000,5],[1787960280000,4.9],[1787960580000,5],[1787960880000,5.2],[1787961180000,5.4],[1787961480000,5.6],[1787961780000,5.8],[1787962080000,6.1],[1787962380000,6.1],[1787962680000,6.1],[1787962980000,6.3],[1787963280000,6.3],[1787963580000,6.3],[1787963880000,6.4],[1787964180000,6.4],[1787964480000,6.5],[1787964780000,6.4],[1787965080000,6.5],[1787965380000,6.3],[1787965680000,6.5],[1787965980000,6.8],[1787966280000,7.2],[1787966580000,7.3],[1787966880000,7.5],[1787967180000,7.8],[1787967480000,8],[1787967780000,8],[1787968080000,7.9],[1787968380000,8.2],[1787968680000,8.7],[1787968980000,8.7],[1787969280000,8.6],[1787969580000,8.3],[1787969880000,7.8],[1787970180000,7.5],[1787970480000,7],[1787970780000,6.9],[1787971080000,7],[1787971380000,6.6],[1787971680000,7],[1787971980000,7.1],[1787972280000,6.7],[1787972580000,7],[1787972880000,6.8],[1787973180000,6.6],[1787973480000,6.7],[1787973780000,7.1],[1787974080000,7],[1787974380000,6.8],[1787974680000,6.6],[1787974980000,7.1],[1787975280000,7],[1787975580000,7.2],[1787975880000,7],[1787976180000,7.3],[1787976480000,7.5],[1787976780000,7.6],[1787977080000,7.9],[1787977380000,7.8],[1787977680000,7.4],[1787977980000,7.5],[1787978280000,7.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,18.73333333],[1787954580000,18.70000000],[1787954880000,18.10000000],[1787955180000,18.02000000],[1787955480000,17.78000000],[1787955780000,17.54000000],[1787956080000,17.26000000],[1787956380000,17.16000000],[1787956680000,17.38000000],[1787956980000,17.68000000],[1787957280000,18.16000000],[1787957580000,18.62000000],[1787957880000,19.26000000],[1787958180000,19.14000000],[1787958480000,18.76000000],[1787958780000,18.38000000],[1787959080000,18.42000000],[1787959380000,18.36000000],[1787959680000,18.24000000],[1787959980000,18.48000000],[1787960280000,18.78000000],[1787960580000,18.68000000],[1787960880000,18.86000000],[1787961180000,19.14000000],[1787961480000,19.08000000],[1787961780000,18.76000000],[1787962080000,18.66000000],[1787962380000,18.52000000],[1787962680000,19.06000000],[1787962980000,19.36000000],[1787963280000,19.50000000],[1787963580000,19.98000000],[1787963880000,20.18000000],[1787964180000,20.08000000],[1787964480000,19.48000000],[1787964780000,19.74000000],[1787965080000,19.52000000],[1787965380000,19.74000000],[1787965680000,19.46000000],[1787965980000,19.18000000],[1787966280000,19.58000000],[1787966580000,19.80000000],[1787966880000,19.58000000],[1787967180000,19.72000000],[1787967480000,19.86000000],[1787967780000,19.68000000],[1787968080000,19.48000000],[1787968380000,19.66000000],[1787968680000,19.72000000],[1787968980000,19.62000000],[1787969280000,19.98000000],[1787969580000,19.90000000],[1787969880000,19.74000000],[1787970180000,19.30000000],[1787970480000,19.04000000],[1787970780000,18.74000000],[1787971080000,18.38000000],[1787971380000,18.34000000],[1787971680000,17.78000000],[1787971980000,17.58000000],[1787972280000,17.68000000],[1787972580000,17.04000000],[1787972880000,16.80000000],[1787973180000,16.46000000],[1787973480000,15.94000000],[1787973780000,15.80000000],[1787974080000,15.74000000],[1787974380000,15.58000000],[1787974680000,15.16000000],[1787974980000,14.88000000],[1787975280000,14.88000000],[1787975580000,14.72000000],[1787975880000,14.92000000],[1787976180000,14.42000000],[1787976480000,14.26000000],[1787976780000,14.36000000],[1787977080000,14.96000000],[1787977380000,15.10000000],[1787977680000,15.50000000],[1787977980000,15.22000000],[1787978280000,15.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,39.40000000],[1787954580000,39.18000000],[1787954880000,40.26000000],[1787955180000,39.84000000],[1787955480000,39.58000000],[1787955780000,39.06000000],[1787956080000,39.08000000],[1787956380000,39.42000000],[1787956680000,38.94000000],[1787956980000,38.84000000],[1787957280000,38.68000000],[1787957580000,37.72000000],[1787957880000,37.64000000],[1787958180000,37.58000000],[1787958480000,38.46000000],[1787958780000,38.28000000],[1787959080000,37.54000000],[1787959380000,37.48000000],[1787959680000,37.52000000],[1787959980000,37.30000000],[1787960280000,36.98000000],[1787960580000,37.32000000],[1787960880000,37.62000000],[1787961180000,38.04000000],[1787961480000,38.58000000],[1787961780000,38.78000000],[1787962080000,39.46000000],[1787962380000,39.54000000],[1787962680000,39.18000000],[1787962980000,39.30000000],[1787963280000,39.10000000],[1787963580000,38.62000000],[1787963880000,38.68000000],[1787964180000,38.68000000],[1787964480000,39.16000000],[1787964780000,38.90000000],[1787965080000,39.08000000],[1787965380000,38.58000000],[1787965680000,39.20000000],[1787965980000,40.32000000],[1787966280000,41.22000000],[1787966580000,41.10000000],[1787966880000,41.70000000],[1787967180000,42.28000000],[1787967480000,42.90000000],[1787967780000,43.04000000],[1787968080000,43.08000000],[1787968380000,44.00000000],[1787968680000,45.32000000],[1787968980000,45.42000000],[1787969280000,45.06000000],[1787969580000,44.48000000],[1787969880000,43.42000000],[1787970180000,42.82000000],[1787970480000,42.10000000],[1787970780000,42.46000000],[1787971080000,43.68000000],[1787971380000,43.00000000],[1787971680000,44.72000000],[1787971980000,45.50000000],[1787972280000,44.96000000],[1787972580000,46.20000000],[1787972880000,46.36000000],[1787973180000,46.44000000],[1787973480000,47.24000000],[1787973780000,49.14000000],[1787974080000,49.82000000],[1787974380000,49.76000000],[1787974680000,49.50000000],[1787974980000,51.54000000],[1787975280000,51.82000000],[1787975580000,52.66000000],[1787975880000,52.68000000],[1787976180000,54.32000000],[1787976480000,55.62000000],[1787976780000,56.88000000],[1787977080000,58.30000000],[1787977380000,58.36000000],[1787977680000,56.54000000],[1787977980000,56.86000000],[1787978280000,58.00000000],], 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,6.84],[1787954580000,5.328],[1787954880000,6.336],[1787955180000,6.768],[1787955480000,4.536],[1787955780000,7.2],[1787956080000,5.472],[1787956380000,5.904],[1787956680000,5.832],[1787956980000,4.968],[1787957280000,6.264],[1787957580000,6.696],[1787957880000,7.56],[1787958180000,6.048],[1787958480000,2.592],[1787958780000,4.968],[1787959080000,6.552],[1787959380000,4.968],[1787959680000,5.4],[1787959980000,6.048],[1787960280000,7.704],[1787960580000,5.4],[1787960880000,5.688],[1787961180000,6.408],[1787961480000,5.832],[1787961780000,6.84],[1787962080000,6.84],[1787962380000,7.992],[1787962680000,10.08],[1787962980000,6.84],[1787963280000,8.64],[1787963580000,8.496],[1787963880000,8.064],[1787964180000,6.624],[1787964480000,5.976],[1787964780000,9.792],[1787965080000,9.576],[1787965380000,8.64],[1787965680000,4.968],[1787965980000,8.496],[1787966280000,9.36],[1787966580000,9.864],[1787966880000,7.848],[1787967180000,10.008],[1787967480000,7.128],[1787967780000,8.424],[1787968080000,7.992],[1787968380000,7.776],[1787968680000,7.344],[1787968980000,6.552],[1787969280000,6.408],[1787969580000,4.968],[1787969880000,5.616],[1787970180000,4.824],[1787970480000,4.68],[1787970780000,5.112],[1787971080000,3.096],[1787971380000,2.376],[1787971680000,1.8],[1787971980000,3.024],[1787972280000,2.88],[1787972580000,2.16],[1787972880000,2.664],[1787973180000,2.448],[1787973480000,1.512],[1787973780000,2.448],[1787974080000,3.528],[1787974380000,3.96],[1787974680000,0.864],[1787974980000,1.224],[1787975280000,1.368],[1787975580000,0.72],[1787975880000,2.376],[1787976180000,2.736],[1787976480000,3.528],[1787976780000,3.6],[1787977080000,2.736],[1787977380000,4.68],[1787977680000,3.456],[1787977980000,2.016],[1787978280000,3.6],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1787954400000,15.48],[1787954580000,12.888],[1787954880000,12.888],[1787955180000,14.976],[1787955480000,10.224],[1787955780000,17.496],[1787956080000,11.808],[1787956380000,14.976],[1787956680000,12.96],[1787956980000,10.8],[1787957280000,11.592],[1787957580000,13.032],[1787957880000,13.32],[1787958180000,12.96],[1787958480000,5.4],[1787958780000,10.224],[1787959080000,12.888],[1787959380000,9.72],[1787959680000,9.72],[1787959980000,11.448],[1787960280000,13.896],[1787960580000,8.856],[1787960880000,8.712],[1787961180000,12.672],[1787961480000,11.232],[1787961780000,13.68],[1787962080000,13.392],[1787962380000,15.336],[1787962680000,20.952],[1787962980000,13.752],[1787963280000,19.152],[1787963580000,16.848],[1787963880000,16.128],[1787964180000,14.688],[1787964480000,12.816],[1787964780000,18.072],[1787965080000,17.496],[1787965380000,17.352],[1787965680000,11.808],[1787965980000,18.072],[1787966280000,21.672],[1787966580000,24.624],[1787966880000,20.448],[1787967180000,19.728],[1787967480000,16.416],[1787967780000,18.936],[1787968080000,18.216],[1787968380000,16.416],[1787968680000,14.616],[1787968980000,13.176],[1787969280000,11.016],[1787969580000,7.776],[1787969880000,9.792],[1787970180000,8.856],[1787970480000,8.136],[1787970780000,9.864],[1787971080000,5.544],[1787971380000,3.888],[1787971680000,2.736],[1787971980000,5.04],[1787972280000,5.256],[1787972580000,4.32],[1787972880000,4.824],[1787973180000,4.392],[1787973480000,3.24],[1787973780000,3.096],[1787974080000,4.32],[1787974380000,4.464],[1787974680000,1.368],[1787974980000,1.872],[1787975280000,2.376],[1787975580000,1.296],[1787975880000,3.024],[1787976180000,3.312],[1787976480000,4.104],[1787976780000,3.96],[1787977080000,3.384],[1787977380000,5.832],[1787977680000,4.824],[1787977980000,2.592],[1787978280000,4.32],], 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,127.90000000],[1787954580000,123.06000000],[1787954880000,113.94000000],[1787955180000,119.42000000],[1787955480000,100.14000000],[1787955780000,108.62000000],[1787956080000,107.66000000],[1787956380000,91.00000000],[1787956680000,111.74000000],[1787956980000,112.04000000],[1787957280000,144.74000000],[1787957580000,148.36000000],[1787957880000,166.68000000],[1787958180000,121.14000000],[1787958480000,144.08000000],[1787958780000,123.88000000],[1787959080000,128.48000000],[1787959380000,107.04000000],[1787959680000,100.50000000],[1787959980000,113.60000000],[1787960280000,152.96000000],[1787960580000,162.98000000],[1787960880000,193.80000000],[1787961180000,106.90000000],[1787961480000,109.16000000],[1787961780000,109.22000000],[1787962080000,111.56000000],[1787962380000,107.66000000],[1787962680000,131.58000000],[1787962980000,101.44000000],[1787963280000,135.06000000],[1787963580000,125.52000000],[1787963880000,143.08000000],[1787964180000,121.00000000],[1787964480000,102.70000000],[1787964780000,118.80000000],[1787965080000,114.92000000],[1787965380000,116.00000000],[1787965680000,114.46000000],[1787965980000,116.86000000],[1787966280000,116.64000000],[1787966580000,118.02000000],[1787966880000,119.76000000],[1787967180000,119.24000000],[1787967480000,116.12000000],[1787967780000,115.00000000],[1787968080000,117.84000000],[1787968380000,113.62000000],[1787968680000,102.62000000],[1787968980000,138.82000000],[1787969280000,170.52000000],[1787969580000,202.20000000],[1787969880000,139.82000000],[1787970180000,148.58000000],[1787970480000,157.60000000],[1787970780000,140.38000000],[1787971080000,165.06000000],[1787971380000,151.24000000],[1787971680000,137.94000000],[1787971980000,168.78000000],[1787972280000,149.18000000],[1787972580000,132.04000000],[1787972880000,165.64000000],[1787973180000,141.08000000],[1787973480000,183.42000000],[1787973780000,289.60000000],[1787974080000,290.48000000],[1787974380000,280.04000000],[1787974680000,231.32000000],[1787974980000,126.38000000],[1787975280000,207.88000000],[1787975580000,250.08000000],[1787975880000,267.60000000],[1787976180000,293.06000000],[1787976480000,278.48000000],[1787976780000,266.50000000],[1787977080000,275.86000000],[1787977380000,288.68000000],[1787977680000,250.42000000],[1787977980000,266.90000000],[1787978280000,263.80000000],], 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; }