var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1787954400000,21.56666667],[1787954580000,21.56000000],[1787954880000,21.44000000],[1787955180000,21.42000000],[1787955480000,21.46000000],[1787955780000,21.34000000],[1787956080000,21.32000000],[1787956380000,21.14000000],[1787956680000,21.18000000],[1787956980000,21.26000000],[1787957280000,20.84000000],[1787957580000,20.44000000],[1787957880000,20.12000000],[1787958180000,19.88000000],[1787958480000,19.86000000],[1787958780000,19.82000000],[1787959080000,19.54000000],[1787959380000,19.32000000],[1787959680000,20.30000000],[1787959980000,20.96000000],[1787960280000,21.26000000],[1787960580000,21.22000000],[1787960880000,20.84000000],[1787961180000,20.56000000],[1787961480000,20.64000000],[1787961780000,20.60000000],[1787962080000,20.84000000],[1787962380000,21.42000000],[1787962680000,21.76000000],[1787962980000,21.88000000],[1787963280000,21.88000000],[1787963580000,21.90000000],[1787963880000,21.84000000],[1787964180000,21.56000000],[1787964480000,21.26000000],[1787964780000,21.04000000],[1787965080000,21.16000000],[1787965380000,21.34000000],[1787965680000,21.22000000],[1787965980000,21.06000000],[1787966280000,20.90000000],[1787966580000,20.62000000],[1787966880000,20.48000000],[1787967180000,20.24000000],[1787967480000,20.22000000],[1787967780000,20.72000000],[1787968080000,20.52000000],[1787968380000,20.18000000],[1787968680000,20.10000000],[1787968980000,19.94000000],[1787969280000,19.82000000],[1787969580000,19.74000000],[1787969880000,19.74000000],[1787970180000,19.74000000],[1787970480000,19.90000000],[1787970780000,19.72000000],[1787971080000,19.52000000],[1787971380000,19.60000000],[1787971680000,19.60000000],[1787971980000,19.60000000],[1787972280000,19.58000000],[1787972580000,19.60000000],[1787972880000,19.54000000],[1787973180000,19.40000000],[1787973480000,19.16000000],[1787973780000,18.88000000],[1787974080000,18.72000000],[1787974380000,18.62000000],[1787974680000,18.52000000],[1787974980000,18.36000000],[1787975280000,18.14000000],[1787975580000,18.04000000],[1787975880000,17.98000000],[1787976180000,17.90000000],[1787976480000,17.90000000],[1787976780000,17.98000000],[1787977080000,18.00000000],[1787977380000,18.00000000],[1787977680000,18.08000000],[1787977980000,18.22000000],[1787978280000,18.40000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1787954400000,7.4],[1787954580000,7.4],[1787954880000,7.4],[1787955180000,7.4],[1787955480000,7.4],[1787955780000,7.3],[1787956080000,7.3],[1787956380000,7.4],[1787956680000,7.2],[1787956980000,7.6],[1787957280000,8.3],[1787957580000,8.4],[1787957880000,8.4],[1787958180000,8.4],[1787958480000,8.2],[1787958780000,8.7],[1787959080000,8.9],[1787959380000,8.3],[1787959680000,7.1],[1787959980000,7.1],[1787960280000,7.2],[1787960580000,7.6],[1787960880000,8.2],[1787961180000,8.1],[1787961480000,8.1],[1787961780000,8],[1787962080000,7.2],[1787962380000,7.1],[1787962680000,7],[1787962980000,7.1],[1787963280000,6.9],[1787963580000,7],[1787963880000,7.2],[1787964180000,7.6],[1787964480000,7.9],[1787964780000,7.9],[1787965080000,7.3],[1787965380000,7.3],[1787965680000,7.4],[1787965980000,8.1],[1787966280000,8.2],[1787966580000,8.3],[1787966880000,8.5],[1787967180000,8],[1787967480000,8],[1787967780000,8],[1787968080000,8.2],[1787968380000,8.6],[1787968680000,8.4],[1787968980000,8.9],[1787969280000,8.8],[1787969580000,8.8],[1787969880000,8.8],[1787970180000,8.6],[1787970480000,8.7],[1787970780000,9.5],[1787971080000,9.3],[1787971380000,9],[1787971680000,8.9],[1787971980000,9],[1787972280000,8.9],[1787972580000,8.7],[1787972880000,8.9],[1787973180000,9.2],[1787973480000,9.3],[1787973780000,9.3],[1787974080000,9.1],[1787974380000,9.3],[1787974680000,9.2],[1787974980000,9.5],[1787975280000,9.8],[1787975580000,9.8],[1787975880000,10.1],[1787976180000,10],[1787976480000,10.1],[1787976780000,9.9],[1787977080000,10.1],[1787977380000,10.1],[1787977680000,9.9],[1787977980000,9.5],[1787978280000,9.9],], 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.83333333],[1787954580000,18.76000000],[1787954880000,18.24000000],[1787955180000,18.10000000],[1787955480000,18.08000000],[1787955780000,17.46000000],[1787956080000,17.14000000],[1787956380000,16.60000000],[1787956680000,16.60000000],[1787956980000,17.08000000],[1787957280000,17.20000000],[1787957580000,17.30000000],[1787957880000,17.42000000],[1787958180000,17.42000000],[1787958480000,17.80000000],[1787958780000,17.78000000],[1787959080000,17.14000000],[1787959380000,16.42000000],[1787959680000,17.26000000],[1787959980000,17.84000000],[1787960280000,18.16000000],[1787960580000,18.40000000],[1787960880000,18.10000000],[1787961180000,17.92000000],[1787961480000,18.08000000],[1787961780000,18.26000000],[1787962080000,18.40000000],[1787962380000,19.02000000],[1787962680000,19.40000000],[1787962980000,19.52000000],[1787963280000,19.74000000],[1787963580000,19.84000000],[1787963880000,19.70000000],[1787964180000,19.12000000],[1787964480000,18.80000000],[1787964780000,18.46000000],[1787965080000,17.56000000],[1787965380000,16.86000000],[1787965680000,16.50000000],[1787965980000,16.76000000],[1787966280000,17.22000000],[1787966580000,17.30000000],[1787966880000,17.24000000],[1787967180000,17.12000000],[1787967480000,17.18000000],[1787967780000,17.56000000],[1787968080000,17.44000000],[1787968380000,17.34000000],[1787968680000,17.32000000],[1787968980000,17.74000000],[1787969280000,18.00000000],[1787969580000,18.10000000],[1787969880000,18.00000000],[1787970180000,18.02000000],[1787970480000,18.02000000],[1787970780000,17.74000000],[1787971080000,17.52000000],[1787971380000,17.52000000],[1787971680000,17.42000000],[1787971980000,17.30000000],[1787972280000,17.34000000],[1787972580000,17.40000000],[1787972880000,17.22000000],[1787973180000,16.90000000],[1787973480000,16.40000000],[1787973780000,15.90000000],[1787974080000,15.70000000],[1787974380000,15.70000000],[1787974680000,15.60000000],[1787974980000,15.66000000],[1787975280000,15.60000000],[1787975580000,15.66000000],[1787975880000,15.74000000],[1787976180000,15.84000000],[1787976480000,15.96000000],[1787976780000,16.00000000],[1787977080000,16.02000000],[1787977380000,16.14000000],[1787977680000,16.26000000],[1787977980000,16.38000000],[1787978280000,16.50000000],], 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,40.16666667],[1787954580000,40.18000000],[1787954880000,40.54000000],[1787955180000,40.44000000],[1787955480000,40.34000000],[1787955780000,40.50000000],[1787956080000,40.36000000],[1787956380000,41.18000000],[1787956680000,40.66000000],[1787956980000,41.34000000],[1787957280000,44.76000000],[1787957580000,46.04000000],[1787957880000,46.84000000],[1787958180000,47.78000000],[1787958480000,47.10000000],[1787958780000,48.86000000],[1787959080000,50.38000000],[1787959380000,49.04000000],[1787959680000,42.62000000],[1787959980000,40.72000000],[1787960280000,40.42000000],[1787960580000,41.52000000],[1787960880000,44.48000000],[1787961180000,44.66000000],[1787961480000,44.48000000],[1787961780000,44.34000000],[1787962080000,41.44000000],[1787962380000,39.72000000],[1787962680000,38.64000000],[1787962980000,38.50000000],[1787963280000,38.12000000],[1787963580000,38.18000000],[1787963880000,38.94000000],[1787964180000,40.74000000],[1787964480000,42.20000000],[1787964780000,42.86000000],[1787965080000,41.00000000],[1787965380000,40.34000000],[1787965680000,41.06000000],[1787965980000,43.34000000],[1787966280000,44.22000000],[1787966580000,45.14000000],[1787966880000,46.22000000],[1787967180000,45.52000000],[1787967480000,45.46000000],[1787967780000,44.02000000],[1787968080000,45.22000000],[1787968380000,47.30000000],[1787968680000,46.96000000],[1787968980000,49.04000000],[1787969280000,49.22000000],[1787969580000,49.34000000],[1787969880000,49.32000000],[1787970180000,48.80000000],[1787970480000,48.54000000],[1787970780000,51.72000000],[1787971080000,51.68000000],[1787971380000,50.42000000],[1787971680000,50.24000000],[1787971980000,50.38000000],[1787972280000,50.26000000],[1787972580000,49.56000000],[1787972880000,50.26000000],[1787973180000,51.86000000],[1787973480000,53.06000000],[1787973780000,53.76000000],[1787974080000,53.88000000],[1787974380000,54.70000000],[1787974680000,54.78000000],[1787974980000,56.56000000],[1787975280000,58.40000000],[1787975580000,58.72000000],[1787975880000,60.00000000],[1787976180000,60.18000000],[1787976480000,60.62000000],[1787976780000,59.48000000],[1787977080000,60.08000000],[1787977380000,60.26000000],[1787977680000,59.20000000],[1787977980000,56.88000000],[1787978280000,57.70000000],], 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,7.800000012],[1787954580000,7.128],[1787954880000,7.344],[1787955180000,9.288],[1787955480000,6.336],[1787955780000,4.536],[1787956080000,5.4],[1787956380000,2.448],[1787956680000,4.464],[1787956980000,2.736],[1787957280000,2.376],[1787957580000,4.968],[1787957880000,2.448],[1787958180000,3.6],[1787958480000,5.76],[1787958780000,3.96],[1787959080000,2.232],[1787959380000,4.896],[1787959680000,9.72],[1787959980000,8.136],[1787960280000,6.48],[1787960580000,3.816],[1787960880000,4.248],[1787961180000,2.376],[1787961480000,3.672],[1787961780000,3.96],[1787962080000,5.688],[1787962380000,9.216],[1787962680000,6.552],[1787962980000,7.56],[1787963280000,8.928],[1787963580000,7.848],[1787963880000,4.968],[1787964180000,3.312],[1787964480000,2.736],[1787964780000,7.272],[1787965080000,8.64],[1787965380000,5.112],[1787965680000,3.456],[1787965980000,5.544],[1787966280000,5.04],[1787966580000,6.696],[1787966880000,5.472],[1787967180000,3.96],[1787967480000,4.104],[1787967780000,3.168],[1787968080000,4.176],[1787968380000,5.544],[1787968680000,6.192],[1787968980000,3.528],[1787969280000,7.632],[1787969580000,3.384],[1787969880000,3.96],[1787970180000,4.104],[1787970480000,2.16],[1787970780000,2.736],[1787971080000,5.112],[1787971380000,5.256],[1787971680000,4.68],[1787971980000,4.248],[1787972280000,6.048],[1787972580000,3.744],[1787972880000,3.6],[1787973180000,2.592],[1787973480000,1.512],[1787973780000,1.512],[1787974080000,1.512],[1787974380000,1.944],[1787974680000,1.44],[1787974980000,4.104],[1787975280000,2.304],[1787975580000,2.16],[1787975880000,1.728],[1787976180000,1.728],[1787976480000,3.96],[1787976780000,2.592],[1787977080000,1.944],[1787977380000,0.936],[1787977680000,1.8],[1787977980000,2.088],[1787978280000,2.16],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1787954400000,11.760000012],[1787954580000,12.024],[1787954880000,12.312],[1787955180000,16.632],[1787955480000,10.152],[1787955780000,6.84],[1787956080000,8.496],[1787956380000,4.968],[1787956680000,6.84],[1787956980000,4.032],[1787957280000,4.464],[1787957580000,7.992],[1787957880000,4.032],[1787958180000,5.832],[1787958480000,8.568],[1787958780000,5.4],[1787959080000,3.384],[1787959380000,8.352],[1787959680000,16.344],[1787959980000,14.184],[1787960280000,10.584],[1787960580000,6.624],[1787960880000,6.12],[1787961180000,4.32],[1787961480000,5.544],[1787961780000,6.84],[1787962080000,9.504],[1787962380000,15.48],[1787962680000,12.456],[1787962980000,12.6],[1787963280000,14.04],[1787963580000,13.032],[1787963880000,8.064],[1787964180000,5.4],[1787964480000,4.32],[1787964780000,11.088],[1787965080000,13.104],[1787965380000,7.632],[1787965680000,5.616],[1787965980000,7.56],[1787966280000,6.912],[1787966580000,9.072],[1787966880000,7.488],[1787967180000,5.256],[1787967480000,7.632],[1787967780000,5.616],[1787968080000,5.616],[1787968380000,8.784],[1787968680000,8.64],[1787968980000,6.264],[1787969280000,11.808],[1787969580000,5.256],[1787969880000,7.344],[1787970180000,6.624],[1787970480000,3.96],[1787970780000,4.176],[1787971080000,7.344],[1787971380000,8.136],[1787971680000,8.064],[1787971980000,7.128],[1787972280000,8.64],[1787972580000,6.264],[1787972880000,5.184],[1787973180000,3.816],[1787973480000,2.304],[1787973780000,2.592],[1787974080000,2.736],[1787974380000,2.736],[1787974680000,2.16],[1787974980000,4.824],[1787975280000,2.952],[1787975580000,2.736],[1787975880000,2.232],[1787976180000,2.52],[1787976480000,4.824],[1787976780000,3.384],[1787977080000,2.664],[1787977380000,1.656],[1787977680000,3.24],[1787977980000,3.312],[1787978280000,5.4],], 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,117.90000000],[1787954580000,125.58000000],[1787954880000,115.66000000],[1787955180000,114.28000000],[1787955480000,130.32000000],[1787955780000,122.90000000],[1787956080000,146.54000000],[1787956380000,129.50000000],[1787956680000,125.86000000],[1787956980000,205.96000000],[1787957280000,229.94000000],[1787957580000,236.64000000],[1787957880000,259.16000000],[1787958180000,278.18000000],[1787958480000,245.14000000],[1787958780000,262.08000000],[1787959080000,245.24000000],[1787959380000,167.76000000],[1787959680000,108.44000000],[1787959980000,107.60000000],[1787960280000,130.94000000],[1787960580000,176.44000000],[1787960880000,192.46000000],[1787961180000,142.14000000],[1787961480000,255.66000000],[1787961780000,294.52000000],[1787962080000,61.70000000],[1787962380000,73.42000000],[1787962680000,69.14000000],[1787962980000,57.92000000],[1787963280000,66.10000000],[1787963580000,62.36000000],[1787963880000,169.78000000],[1787964180000,149.94000000],[1787964480000,111.36000000],[1787964780000,139.82000000],[1787965080000,136.46000000],[1787965380000,146.26000000],[1787965680000,176.36000000],[1787965980000,307.90000000],[1787966280000,308.94000000],[1787966580000,322.98000000],[1787966880000,304.50000000],[1787967180000,277.32000000],[1787967480000,181.52000000],[1787967780000,237.28000000],[1787968080000,322.88000000],[1787968380000,278.22000000],[1787968680000,270.40000000],[1787968980000,262.76000000],[1787969280000,273.02000000],[1787969580000,87.98000000],[1787969880000,252.34000000],[1787970180000,280.40000000],[1787970480000,174.84000000],[1787970780000,175.32000000],[1787971080000,137.88000000],[1787971380000,143.00000000],[1787971680000,150.86000000],[1787971980000,152.14000000],[1787972280000,158.18000000],[1787972580000,167.98000000],[1787972880000,155.96000000],[1787973180000,152.60000000],[1787973480000,237.72000000],[1787973780000,125.14000000],[1787974080000,40.10000000],[1787974380000,129.26000000],[1787974680000,147.30000000],[1787974980000,317.32000000],[1787975280000,197.12000000],[1787975580000,164.44000000],[1787975880000,166.12000000],[1787976180000,181.68000000],[1787976480000,158.14000000],[1787976780000,162.76000000],[1787977080000,171.32000000],[1787977380000,161.88000000],[1787977680000,212.24000000],[1787977980000,154.10000000],[1787978280000,290.10000000],], 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; }