var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1787954400000,13.76666667],[1787954580000,13.70000000],[1787954880000,13.86000000],[1787955180000,13.92000000],[1787955480000,14.10000000],[1787955780000,14.40000000],[1787956080000,14.74000000],[1787956380000,15.00000000],[1787956680000,15.44000000],[1787956980000,15.76000000],[1787957280000,15.84000000],[1787957580000,15.70000000],[1787957880000,15.72000000],[1787958180000,15.70000000],[1787958480000,15.62000000],[1787958780000,15.88000000],[1787959080000,16.60000000],[1787959380000,16.90000000],[1787959680000,16.62000000],[1787959980000,16.38000000],[1787960280000,16.12000000],[1787960580000,15.88000000],[1787960880000,15.70000000],[1787961180000,15.48000000],[1787961480000,15.28000000],[1787961780000,15.16000000],[1787962080000,15.16000000],[1787962380000,15.16000000],[1787962680000,15.10000000],[1787962980000,15.10000000],[1787963280000,15.06000000],[1787963580000,15.00000000],[1787963880000,15.00000000],[1787964180000,15.10000000],[1787964480000,15.10000000],[1787964780000,15.10000000],[1787965080000,15.00000000],[1787965380000,15.00000000],[1787965680000,14.84000000],[1787965980000,14.80000000],[1787966280000,14.80000000],[1787966580000,14.76000000],[1787966880000,14.70000000],[1787967180000,14.60000000],[1787967480000,14.64000000],[1787967780000,14.80000000],[1787968080000,14.78000000],[1787968380000,14.80000000],[1787968680000,14.90000000],[1787968980000,15.14000000],[1787969280000,15.20000000],[1787969580000,15.20000000],[1787969880000,15.22000000],[1787970180000,15.24000000],[1787970480000,15.30000000],[1787970780000,15.32000000],[1787971080000,15.44000000],[1787971380000,15.68000000],[1787971680000,15.86000000],[1787971980000,16.04000000],[1787972280000,16.38000000],[1787972580000,16.78000000],[1787972880000,17.14000000],[1787973180000,17.20000000],[1787973480000,17.38000000],[1787973780000,17.40000000],[1787974080000,17.40000000],[1787974380000,17.44000000],[1787974680000,17.56000000],[1787974980000,17.70000000],[1787975280000,17.70000000],[1787975580000,17.80000000],[1787975880000,17.80000000],[1787976180000,18.08000000],[1787976480000,18.36000000],[1787976780000,18.48000000],[1787977080000,18.40000000],[1787977380000,18.36000000],[1787977680000,18.30000000],[1787977980000,18.22000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1787954400000,7.8],[1787954580000,7.7],[1787954880000,7.7],[1787955180000,7.6],[1787955480000,7.5],[1787955780000,7.4],[1787956080000,7.4],[1787956380000,7.3],[1787956680000,7.4],[1787956980000,7.5],[1787957280000,7.9],[1787957580000,8.2],[1787957880000,7.9],[1787958180000,8.3],[1787958480000,8.1],[1787958780000,7.3],[1787959080000,7.1],[1787959380000,7.9],[1787959680000,8.6],[1787959980000,8.4],[1787960280000,8.4],[1787960580000,8.5],[1787960880000,8.4],[1787961180000,8.6],[1787961480000,8.6],[1787961780000,8.6],[1787962080000,8.3],[1787962380000,8.3],[1787962680000,8.5],[1787962980000,8.6],[1787963280000,8.5],[1787963580000,8.5],[1787963880000,8.5],[1787964180000,8.8],[1787964480000,8.8],[1787964780000,8.7],[1787965080000,8.6],[1787965380000,8.7],[1787965680000,8.7],[1787965980000,8.6],[1787966280000,8.6],[1787966580000,8.6],[1787966880000,8.8],[1787967180000,9],[1787967480000,8.6],[1787967780000,8.9],[1787968080000,8.9],[1787968380000,9],[1787968680000,8.8],[1787968980000,8.9],[1787969280000,9.1],[1787969580000,9.2],[1787969880000,9.2],[1787970180000,9.3],[1787970480000,9.7],[1787970780000,9.6],[1787971080000,9.6],[1787971380000,9.6],[1787971680000,9.5],[1787971980000,9.5],[1787972280000,9.2],[1787972580000,9.2],[1787972880000,9.3],[1787973180000,9.6],[1787973480000,9.4],[1787973780000,9.3],[1787974080000,9.2],[1787974380000,9.2],[1787974680000,9.2],[1787974980000,9.3],[1787975280000,9.2],[1787975580000,9.1],[1787975880000,8.9],[1787976180000,8.7],[1787976480000,8.8],[1787976780000,9],[1787977080000,9.2],[1787977380000,9.4],[1787977680000,9.5],[1787977980000,9.5],], 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,8.60000000],[1787954580000,8.60000000],[1787954880000,8.68000000],[1787955180000,8.82000000],[1787955480000,9.12000000],[1787955780000,9.46000000],[1787956080000,9.82000000],[1787956380000,9.98000000],[1787956680000,10.20000000],[1787956980000,10.70000000],[1787957280000,10.66000000],[1787957580000,10.60000000],[1787957880000,10.50000000],[1787958180000,10.64000000],[1787958480000,11.00000000],[1787958780000,11.36000000],[1787959080000,11.46000000],[1787959380000,11.68000000],[1787959680000,11.14000000],[1787959980000,10.82000000],[1787960280000,10.64000000],[1787960580000,10.70000000],[1787960880000,10.76000000],[1787961180000,10.70000000],[1787961480000,10.68000000],[1787961780000,10.56000000],[1787962080000,10.56000000],[1787962380000,10.56000000],[1787962680000,10.54000000],[1787962980000,10.60000000],[1787963280000,10.70000000],[1787963580000,11.10000000],[1787963880000,11.44000000],[1787964180000,11.58000000],[1787964480000,11.20000000],[1787964780000,11.04000000],[1787965080000,11.10000000],[1787965380000,11.10000000],[1787965680000,11.12000000],[1787965980000,11.28000000],[1787966280000,11.30000000],[1787966580000,11.20000000],[1787966880000,11.10000000],[1787967180000,11.18000000],[1787967480000,11.22000000],[1787967780000,11.38000000],[1787968080000,11.42000000],[1787968380000,11.46000000],[1787968680000,11.70000000],[1787968980000,12.16000000],[1787969280000,12.20000000],[1787969580000,12.44000000],[1787969880000,12.66000000],[1787970180000,12.90000000],[1787970480000,13.30000000],[1787970780000,13.72000000],[1787971080000,14.26000000],[1787971380000,14.78000000],[1787971680000,15.12000000],[1787971980000,15.36000000],[1787972280000,15.50000000],[1787972580000,15.66000000],[1787972880000,15.62000000],[1787973180000,14.56000000],[1787973480000,14.02000000],[1787973780000,14.34000000],[1787974080000,14.52000000],[1787974380000,15.02000000],[1787974680000,15.54000000],[1787974980000,15.34000000],[1787975280000,15.04000000],[1787975580000,15.36000000],[1787975880000,15.58000000],[1787976180000,16.32000000],[1787976480000,16.70000000],[1787976780000,16.68000000],[1787977080000,17.04000000],[1787977380000,17.32000000],[1787977680000,17.60000000],[1787977980000,17.84000000],], 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,67.70000000],[1787954580000,67.34000000],[1787954880000,66.44000000],[1787955180000,66.00000000],[1787955480000,64.90000000],[1787955780000,62.92000000],[1787956080000,61.86000000],[1787956380000,60.26000000],[1787956680000,58.98000000],[1787956980000,58.18000000],[1787957280000,59.54000000],[1787957580000,61.08000000],[1787957880000,60.04000000],[1787958180000,61.46000000],[1787958480000,61.28000000],[1787958780000,57.10000000],[1787959080000,53.80000000],[1787959380000,55.62000000],[1787959680000,59.34000000],[1787959980000,59.44000000],[1787960280000,60.58000000],[1787960580000,61.86000000],[1787960880000,61.90000000],[1787961180000,63.94000000],[1787961480000,64.66000000],[1787961780000,65.18000000],[1787962080000,63.98000000],[1787962380000,64.00000000],[1787962680000,65.06000000],[1787962980000,65.32000000],[1787963280000,65.06000000],[1787963580000,65.26000000],[1787963880000,65.44000000],[1787964180000,66.28000000],[1787964480000,66.40000000],[1787964780000,65.92000000],[1787965080000,65.68000000],[1787965380000,66.32000000],[1787965680000,67.00000000],[1787965980000,66.58000000],[1787966280000,66.66000000],[1787966580000,66.86000000],[1787966880000,67.82000000],[1787967180000,69.12000000],[1787967480000,67.18000000],[1787967780000,68.06000000],[1787968080000,68.12000000],[1787968380000,68.30000000],[1787968680000,67.18000000],[1787968980000,66.68000000],[1787969280000,67.20000000],[1787969580000,67.84000000],[1787969880000,67.42000000],[1787970180000,67.94000000],[1787970480000,69.44000000],[1787970780000,68.72000000],[1787971080000,68.44000000],[1787971380000,67.30000000],[1787971680000,66.30000000],[1787971980000,65.56000000],[1787972280000,62.58000000],[1787972580000,61.22000000],[1787972880000,60.26000000],[1787973180000,60.96000000],[1787973480000,59.56000000],[1787973780000,59.30000000],[1787974080000,58.94000000],[1787974380000,58.68000000],[1787974680000,58.04000000],[1787974980000,57.92000000],[1787975280000,57.66000000],[1787975580000,56.88000000],[1787975880000,56.30000000],[1787976180000,54.46000000],[1787976480000,53.90000000],[1787976780000,54.10000000],[1787977080000,55.04000000],[1787977380000,55.96000000],[1787977680000,56.80000000],[1787977980000,56.92000000],], 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,3.359999988],[1787954580000,2.52],[1787954880000,2.232],[1787955180000,3.96],[1787955480000,2.592],[1787955780000,3.168],[1787956080000,4.032],[1787956380000,4.176],[1787956680000,4.392],[1787956980000,4.536],[1787957280000,4.104],[1787957580000,3.744],[1787957880000,4.608],[1787958180000,4.248],[1787958480000,4.968],[1787958780000,4.824],[1787959080000,4.68],[1787959380000,3.96],[1787959680000,3.312],[1787959980000,2.304],[1787960280000,2.52],[1787960580000,0.936],[1787960880000,1.44],[1787961180000,1.08],[1787961480000,2.376],[1787961780000,2.736],[1787962080000,1.512],[1787962380000,1.8],[1787962680000,2.016],[1787962980000,2.376],[1787963280000,1.008],[1787963580000,1.8],[1787963880000,3.744],[1787964180000,3.888],[1787964480000,2.592],[1787964780000,2.088],[1787965080000,1.584],[1787965380000,1.656],[1787965680000,1.512],[1787965980000,1.368],[1787966280000,1.872],[1787966580000,2.592],[1787966880000,2.304],[1787967180000,2.16],[1787967480000,2.304],[1787967780000,2.664],[1787968080000,2.952],[1787968380000,2.448],[1787968680000,2.808],[1787968980000,2.376],[1787969280000,2.736],[1787969580000,2.664],[1787969880000,2.232],[1787970180000,2.232],[1787970480000,2.88],[1787970780000,2.808],[1787971080000,2.736],[1787971380000,3.168],[1787971680000,3.096],[1787971980000,3.024],[1787972280000,3.672],[1787972580000,3.528],[1787972880000,3.6],[1787973180000,3.96],[1787973480000,6.048],[1787973780000,5.76],[1787974080000,3.456],[1787974380000,4.392],[1787974680000,4.752],[1787974980000,5.328],[1787975280000,5.76],[1787975580000,4.968],[1787975880000,5.04],[1787976180000,6.12],[1787976480000,4.464],[1787976780000,4.896],[1787977080000,3.96],[1787977380000,3.312],[1787977680000,4.464],[1787977980000,5.544],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1787954400000,4.799999988],[1787954580000,3.456],[1787954880000,3.312],[1787955180000,5.76],[1787955480000,3.888],[1787955780000,4.752],[1787956080000,5.976],[1787956380000,6.192],[1787956680000,6.264],[1787956980000,5.904],[1787957280000,5.544],[1787957580000,5.112],[1787957880000,6.408],[1787958180000,6.12],[1787958480000,7.416],[1787958780000,7.272],[1787959080000,5.904],[1787959380000,5.544],[1787959680000,4.608],[1787959980000,3.096],[1787960280000,3.168],[1787960580000,1.368],[1787960880000,1.944],[1787961180000,1.656],[1787961480000,3.312],[1787961780000,3.528],[1787962080000,2.376],[1787962380000,2.88],[1787962680000,2.952],[1787962980000,3.096],[1787963280000,1.512],[1787963580000,3.096],[1787963880000,6.624],[1787964180000,5.472],[1787964480000,3.816],[1787964780000,3.168],[1787965080000,2.16],[1787965380000,2.376],[1787965680000,2.304],[1787965980000,2.304],[1787966280000,2.52],[1787966580000,3.312],[1787966880000,3.24],[1787967180000,3.024],[1787967480000,3.312],[1787967780000,3.384],[1787968080000,5.04],[1787968380000,3.816],[1787968680000,4.176],[1787968980000,3.384],[1787969280000,3.528],[1787969580000,3.96],[1787969880000,3.96],[1787970180000,3.96],[1787970480000,3.96],[1787970780000,3.816],[1787971080000,3.672],[1787971380000,4.104],[1787971680000,4.176],[1787971980000,4.104],[1787972280000,5.112],[1787972580000,4.968],[1787972880000,4.896],[1787973180000,5.184],[1787973480000,7.488],[1787973780000,7.92],[1787974080000,5.544],[1787974380000,6.696],[1787974680000,6.48],[1787974980000,8.64],[1787975280000,8.28],[1787975580000,7.776],[1787975880000,7.848],[1787976180000,9.936],[1787976480000,6.336],[1787976780000,7.056],[1787977080000,5.688],[1787977380000,5.04],[1787977680000,6.48],[1787977980000,7.128],], 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,72.80000000],[1787954580000,51.72000000],[1787954880000,47.16000000],[1787955180000,68.96000000],[1787955480000,86.90000000],[1787955780000,105.46000000],[1787956080000,119.58000000],[1787956380000,133.96000000],[1787956680000,142.60000000],[1787956980000,133.44000000],[1787957280000,137.90000000],[1787957580000,163.10000000],[1787957880000,141.60000000],[1787958180000,140.30000000],[1787958480000,135.46000000],[1787958780000,137.60000000],[1787959080000,145.22000000],[1787959380000,165.18000000],[1787959680000,183.02000000],[1787959980000,144.82000000],[1787960280000,117.62000000],[1787960580000,222.90000000],[1787960880000,20.14000000],[1787961180000,134.34000000],[1787961480000,130.00000000],[1787961780000,145.60000000],[1787962080000,191.68000000],[1787962380000,155.86000000],[1787962680000,185.54000000],[1787962980000,218.20000000],[1787963280000,208.14000000],[1787963580000,157.28000000],[1787963880000,158.36000000],[1787964180000,179.84000000],[1787964480000,217.60000000],[1787964780000,215.16000000],[1787965080000,220.94000000],[1787965380000,203.46000000],[1787965680000,225.16000000],[1787965980000,173.82000000],[1787966280000,129.26000000],[1787966580000,127.54000000],[1787966880000,139.56000000],[1787967180000,160.64000000],[1787967480000,186.52000000],[1787967780000,217.88000000],[1787968080000,189.72000000],[1787968380000,196.36000000],[1787968680000,204.12000000],[1787968980000,226.88000000],[1787969280000,226.70000000],[1787969580000,210.40000000],[1787969880000,188.64000000],[1787970180000,192.92000000],[1787970480000,185.26000000],[1787970780000,177.60000000],[1787971080000,206.46000000],[1787971380000,195.76000000],[1787971680000,179.60000000],[1787971980000,171.46000000],[1787972280000,170.18000000],[1787972580000,196.00000000],[1787972880000,196.60000000],[1787973180000,160.86000000],[1787973480000,117.12000000],[1787973780000,121.94000000],[1787974080000,143.30000000],[1787974380000,140.46000000],[1787974680000,125.94000000],[1787974980000,147.54000000],[1787975280000,156.24000000],[1787975580000,168.08000000],[1787975880000,152.44000000],[1787976180000,147.64000000],[1787976480000,152.64000000],[1787976780000,172.28000000],[1787977080000,230.28000000],[1787977380000,241.16000000],[1787977680000,232.30000000],[1787977980000,230.24000000],], 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.02],[1787957280000,0.024],[1787957580000,0.028],[1787957880000,0.028],[1787958180000,0.028],[1787958480000,0.028],[1787958780000,0.028],[1787959080000,0.028],[1787959380000,0.048],[1787959680000,0.052],[1787959980000,0.056],[1787960280000,0.056],[1787960580000,0.056],[1787960880000,0.056],[1787961180000,0.056],[1787961480000,0.056],[1787961780000,0.056],[1787962080000,0.056],[1787962380000,0.056],[1787962680000,0.056],[1787962980000,0.056],[1787963280000,0.056],[1787963580000,0.056],[1787963880000,0.056],[1787964180000,0.056],[1787964480000,0.056],[1787964780000,0.056],[1787965080000,0.056],[1787965380000,0.056],[1787965680000,0.056],[1787965980000,0.056],[1787966280000,0.056],[1787966580000,0.056],[1787966880000,0.056],[1787967180000,0.056],[1787967480000,0.056],[1787967780000,0.056],[1787968080000,0.056],[1787968380000,0.056],[1787968680000,0.056],[1787968980000,0.056],[1787969280000,0.056],[1787969580000,0.066],[1787969880000,0.066],[1787970180000,0.07],[1787970480000,0.07],[1787970780000,0.07],[1787971080000,0.07],[1787971380000,0.07],[1787971680000,0.07],[1787971980000,0.07],[1787972280000,0.07],[1787972580000,0.07],[1787972880000,0.07],[1787973180000,0.07],[1787973480000,0.07],[1787973780000,0.07],[1787974080000,0.07],[1787974380000,0.07],[1787974680000,0.07],[1787974980000,0.07],[1787975280000,0.07],[1787975580000,0.07],[1787975880000,0.07],[1787976180000,0.07],[1787976480000,0.07],[1787976780000,0.07],[1787977080000,0.096],[1787977380000,0.1],[1787977680000,0.1],[1787977980000,0.1],], 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; }