var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1787954400000,16.10000000],[1787954580000,15.98000000],[1787954880000,15.88000000],[1787955180000,15.76000000],[1787955480000,15.24000000],[1787955780000,14.90000000],[1787956080000,15.00000000],[1787956380000,15.16000000],[1787956680000,15.32000000],[1787956980000,15.40000000],[1787957280000,15.44000000],[1787957580000,15.64000000],[1787957880000,15.72000000],[1787958180000,15.64000000],[1787958480000,15.64000000],[1787958780000,15.60000000],[1787959080000,15.40000000],[1787959380000,15.16000000],[1787959680000,15.08000000],[1787959980000,15.00000000],[1787960280000,15.10000000],[1787960580000,14.90000000],[1787960880000,15.06000000],[1787961180000,15.00000000],[1787961480000,14.90000000],[1787961780000,14.80000000],[1787962080000,14.70000000],[1787962380000,14.76000000],[1787962680000,14.72000000],[1787962980000,14.70000000],[1787963280000,14.70000000],[1787963580000,14.66000000],[1787963880000,14.56000000],[1787964180000,14.48000000],[1787964480000,14.38000000],[1787964780000,14.26000000],[1787965080000,14.12000000],[1787965380000,14.10000000],[1787965680000,14.10000000],[1787965980000,14.04000000],[1787966280000,14.06000000],[1787966580000,14.16000000],[1787966880000,14.28000000],[1787967180000,14.24000000],[1787967480000,14.40000000],[1787967780000,14.40000000],[1787968080000,14.38000000],[1787968380000,14.34000000],[1787968680000,14.12000000],[1787968980000,14.02000000],[1787969280000,14.08000000],[1787969580000,13.98000000],[1787969880000,14.00000000],[1787970180000,14.02000000],[1787970480000,13.90000000],[1787970780000,13.78000000],[1787971080000,13.70000000],[1787971380000,13.56000000],[1787971680000,13.60000000],[1787971980000,13.64000000],[1787972280000,13.64000000],[1787972580000,13.76000000],[1787972880000,13.90000000],[1787973180000,14.04000000],[1787973480000,14.08000000],[1787973780000,13.90000000],[1787974080000,13.94000000],[1787974380000,14.20000000],[1787974680000,14.28000000],[1787974980000,14.10000000],[1787975280000,13.72000000],[1787975580000,13.52000000],[1787975880000,13.42000000],[1787976180000,13.40000000],[1787976480000,13.22000000],[1787976780000,13.04000000],[1787977080000,12.90000000],[1787977380000,12.74000000],[1787977680000,12.64000000],[1787977980000,12.38000000],[1787978280000,12.20000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1787954400000,12],[1787954580000,12.1],[1787954880000,11.8],[1787955180000,11.9],[1787955480000,11.7],[1787955780000,11.5],[1787956080000,11.4],[1787956380000,11.4],[1787956680000,11.4],[1787956980000,11.5],[1787957280000,11.5],[1787957580000,11.6],[1787957880000,11.8],[1787958180000,12],[1787958480000,12.2],[1787958780000,12.4],[1787959080000,12.3],[1787959380000,12.2],[1787959680000,12.3],[1787959980000,12.5],[1787960280000,12.2],[1787960580000,12.2],[1787960880000,12.5],[1787961180000,12.4],[1787961480000,12.1],[1787961780000,11.7],[1787962080000,11.8],[1787962380000,11.8],[1787962680000,11.4],[1787962980000,11.5],[1787963280000,11.5],[1787963580000,11.3],[1787963880000,11.2],[1787964180000,11.2],[1787964480000,10.9],[1787964780000,10.7],[1787965080000,10.4],[1787965380000,10.5],[1787965680000,10.3],[1787965980000,10.2],[1787966280000,10.7],[1787966580000,10.9],[1787966880000,11.2],[1787967180000,11.2],[1787967480000,12],[1787967780000,11.7],[1787968080000,11.5],[1787968380000,11.3],[1787968680000,10.9],[1787968980000,11.2],[1787969280000,11.1],[1787969580000,11],[1787969880000,11.4],[1787970180000,11.4],[1787970480000,11.1],[1787970780000,11.2],[1787971080000,11],[1787971380000,10.8],[1787971680000,11.5],[1787971980000,11.1],[1787972280000,11.6],[1787972580000,11.9],[1787972880000,12.4],[1787973180000,12.4],[1787973480000,12.3],[1787973780000,12.1],[1787974080000,12.8],[1787974380000,13.2],[1787974680000,13.1],[1787974980000,12.9],[1787975280000,12.6],[1787975580000,12.8],[1787975880000,12.8],[1787976180000,12.7],[1787976480000,12],[1787976780000,12.1],[1787977080000,12],[1787977380000,11.7],[1787977680000,11.5],[1787977980000,10.8],[1787978280000,10.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,15.46666667],[1787954580000,15.04000000],[1787954880000,14.94000000],[1787955180000,14.46000000],[1787955480000,13.84000000],[1787955780000,13.80000000],[1787956080000,14.28000000],[1787956380000,14.46000000],[1787956680000,14.60000000],[1787956980000,14.72000000],[1787957280000,14.74000000],[1787957580000,15.04000000],[1787957880000,14.90000000],[1787958180000,14.88000000],[1787958480000,14.80000000],[1787958780000,14.78000000],[1787959080000,14.56000000],[1787959380000,14.48000000],[1787959680000,14.40000000],[1787959980000,14.54000000],[1787960280000,14.62000000],[1787960580000,14.38000000],[1787960880000,14.64000000],[1787961180000,14.50000000],[1787961480000,14.40000000],[1787961780000,14.24000000],[1787962080000,14.26000000],[1787962380000,14.36000000],[1787962680000,14.36000000],[1787962980000,14.30000000],[1787963280000,14.34000000],[1787963580000,14.22000000],[1787963880000,14.16000000],[1787964180000,13.98000000],[1787964480000,13.92000000],[1787964780000,13.86000000],[1787965080000,13.80000000],[1787965380000,13.84000000],[1787965680000,13.84000000],[1787965980000,13.74000000],[1787966280000,13.86000000],[1787966580000,13.94000000],[1787966880000,14.04000000],[1787967180000,14.04000000],[1787967480000,14.30000000],[1787967780000,14.20000000],[1787968080000,14.06000000],[1787968380000,14.00000000],[1787968680000,13.74000000],[1787968980000,13.76000000],[1787969280000,13.72000000],[1787969580000,13.60000000],[1787969880000,13.58000000],[1787970180000,13.66000000],[1787970480000,13.56000000],[1787970780000,13.50000000],[1787971080000,13.40000000],[1787971380000,13.24000000],[1787971680000,13.42000000],[1787971980000,13.32000000],[1787972280000,13.42000000],[1787972580000,13.58000000],[1787972880000,13.84000000],[1787973180000,13.84000000],[1787973480000,13.86000000],[1787973780000,13.60000000],[1787974080000,13.88000000],[1787974380000,14.10000000],[1787974680000,14.06000000],[1787974980000,13.80000000],[1787975280000,13.46000000],[1787975580000,13.26000000],[1787975880000,13.04000000],[1787976180000,12.98000000],[1787976480000,12.72000000],[1787976780000,12.60000000],[1787977080000,12.50000000],[1787977380000,12.36000000],[1787977680000,12.28000000],[1787977980000,12.00000000],[1787978280000,11.70000000],], 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,76.66666667],[1787954580000,77.84000000],[1787954880000,76.78000000],[1787955180000,77.78000000],[1787955480000,79.56000000],[1787955780000,80.42000000],[1787956080000,79.28000000],[1787956380000,78.26000000],[1787956680000,77.62000000],[1787956980000,77.76000000],[1787957280000,77.74000000],[1787957580000,77.10000000],[1787957880000,77.88000000],[1787958180000,79.22000000],[1787958480000,80.12000000],[1787958780000,81.22000000],[1787959080000,82.02000000],[1787959380000,82.90000000],[1787959680000,83.46000000],[1787959980000,85.24000000],[1787960280000,83.18000000],[1787960580000,83.96000000],[1787960880000,85.04000000],[1787961180000,84.38000000],[1787961480000,83.62000000],[1787961780000,81.86000000],[1787962080000,82.78000000],[1787962380000,82.60000000],[1787962680000,80.86000000],[1787962980000,81.36000000],[1787963280000,81.44000000],[1787963580000,80.22000000],[1787963880000,80.42000000],[1787964180000,80.64000000],[1787964480000,79.80000000],[1787964780000,79.18000000],[1787965080000,78.54000000],[1787965380000,79.04000000],[1787965680000,78.30000000],[1787965980000,77.90000000],[1787966280000,80.36000000],[1787966580000,80.84000000],[1787966880000,82.08000000],[1787967180000,81.96000000],[1787967480000,85.50000000],[1787967780000,83.84000000],[1787968080000,82.80000000],[1787968380000,82.12000000],[1787968680000,81.32000000],[1787968980000,83.02000000],[1787969280000,82.46000000],[1787969580000,82.52000000],[1787969880000,84.56000000],[1787970180000,84.46000000],[1787970480000,83.52000000],[1787970780000,84.54000000],[1787971080000,83.92000000],[1787971380000,83.32000000],[1787971680000,87.38000000],[1787971980000,84.56000000],[1787972280000,87.76000000],[1787972580000,88.76000000],[1787972880000,90.64000000],[1787973180000,89.98000000],[1787973480000,88.94000000],[1787973780000,89.20000000],[1787974080000,93.00000000],[1787974380000,94.00000000],[1787974680000,92.78000000],[1787974980000,92.50000000],[1787975280000,93.16000000],[1787975580000,95.48000000],[1787975880000,95.98000000],[1787976180000,95.34000000],[1787976480000,92.50000000],[1787976780000,93.84000000],[1787977080000,94.14000000],[1787977380000,93.56000000],[1787977680000,92.68000000],[1787977980000,89.94000000],[1787978280000,89.50000000],], 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,29.88],[1787954580000,24.408],[1787954880000,21.888],[1787955180000,13.824],[1787955480000,10.296],[1787955780000,14.472],[1787956080000,18.648],[1787956380000,24.768],[1787956680000,27.216],[1787956980000,29.088],[1787957280000,31.392],[1787957580000,32.976],[1787957880000,28.584],[1787958180000,26.064],[1787958480000,26.136],[1787958780000,25.776],[1787959080000,23.4],[1787959380000,26.928],[1787959680000,32.976],[1787959980000,39.024],[1787960280000,34.848],[1787960580000,36.432],[1787960880000,34.56],[1787961180000,25.056],[1787961480000,36.144],[1787961780000,31.68],[1787962080000,36.864],[1787962380000,35.928],[1787962680000,39.384],[1787962980000,41.256],[1787963280000,40.896],[1787963580000,49.32],[1787963880000,40.248],[1787964180000,45.216],[1787964480000,49.608],[1787964780000,51.192],[1787965080000,51.696],[1787965380000,41.256],[1787965680000,44.928],[1787965980000,42.552],[1787966280000,41.184],[1787966580000,42.336],[1787966880000,42.984],[1787967180000,51.624],[1787967480000,41.544],[1787967780000,37.008],[1787968080000,23.904],[1787968380000,30.024],[1787968680000,25.992],[1787968980000,32.112],[1787969280000,16.92],[1787969580000,26.136],[1787969880000,18.504],[1787970180000,22.896],[1787970480000,32.976],[1787970780000,32.616],[1787971080000,26.784],[1787971380000,24.912],[1787971680000,24.48],[1787971980000,23.4],[1787972280000,33.12],[1787972580000,25.416],[1787972880000,27.432],[1787973180000,19.368],[1787973480000,36.36],[1787973780000,29.88],[1787974080000,37.224],[1787974380000,22.392],[1787974680000,31.968],[1787974980000,34.632],[1787975280000,42.984],[1787975580000,28.008],[1787975880000,8.424],[1787976180000,11.232],[1787976480000,14.544],[1787976780000,14.616],[1787977080000,15.552],[1787977380000,5.256],[1787977680000,6.48],[1787977980000,6.336],[1787978280000,7.56],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1787954400000,34.2],[1787954580000,28.08],[1787954880000,24.912],[1787955180000,17.856],[1787955480000,13.032],[1787955780000,19.224],[1787956080000,23.976],[1787956380000,30.744],[1787956680000,32.976],[1787956980000,34.272],[1787957280000,38.808],[1787957580000,40.104],[1787957880000,34.92],[1787958180000,33.84],[1787958480000,32.832],[1787958780000,32.04],[1787959080000,30.312],[1787959380000,32.76],[1787959680000,43.2],[1787959980000,46.728],[1787960280000,43.992],[1787960580000,48.6],[1787960880000,49.896],[1787961180000,38.088],[1787961480000,46.656],[1787961780000,39.888],[1787962080000,45.432],[1787962380000,46.224],[1787962680000,52.704],[1787962980000,59.112],[1787963280000,57.96],[1787963580000,64.8],[1787963880000,50.616],[1787964180000,54.648],[1787964480000,61.632],[1787964780000,60.768],[1787965080000,61.056],[1787965380000,51.696],[1787965680000,58.392],[1787965980000,54.864],[1787966280000,59.688],[1787966580000,56.088],[1787966880000,59.184],[1787967180000,66.888],[1787967480000,55.44],[1787967780000,48.312],[1787968080000,30.024],[1787968380000,37.8],[1787968680000,31.104],[1787968980000,40.608],[1787969280000,22.608],[1787969580000,35.208],[1787969880000,29.304],[1787970180000,32.112],[1787970480000,41.04],[1787970780000,39.384],[1787971080000,33.984],[1787971380000,32.616],[1787971680000,31.176],[1787971980000,29.52],[1787972280000,44.568],[1787972580000,35.64],[1787972880000,38.736],[1787973180000,31.32],[1787973480000,47.304],[1787973780000,41.616],[1787974080000,51.912],[1787974380000,29.016],[1787974680000,45.144],[1787974980000,46.008],[1787975280000,55.872],[1787975580000,36.936],[1787975880000,12.24],[1787976180000,18.576],[1787976480000,18.36],[1787976780000,18.864],[1787977080000,18.936],[1787977380000,7.056],[1787977680000,10.08],[1787977980000,9.936],[1787978280000,9.36],], 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,219.56666667],[1787954580000,225.40000000],[1787954880000,217.98000000],[1787955180000,195.42000000],[1787955480000,180.52000000],[1787955780000,197.88000000],[1787956080000,201.66000000],[1787956380000,213.12000000],[1787956680000,209.64000000],[1787956980000,220.74000000],[1787957280000,213.72000000],[1787957580000,207.08000000],[1787957880000,193.40000000],[1787958180000,204.02000000],[1787958480000,224.42000000],[1787958780000,197.74000000],[1787959080000,224.14000000],[1787959380000,203.84000000],[1787959680000,202.48000000],[1787959980000,203.86000000],[1787960280000,198.96000000],[1787960580000,210.42000000],[1787960880000,229.86000000],[1787961180000,206.96000000],[1787961480000,206.84000000],[1787961780000,206.38000000],[1787962080000,207.84000000],[1787962380000,218.76000000],[1787962680000,206.66000000],[1787962980000,208.10000000],[1787963280000,209.12000000],[1787963580000,209.34000000],[1787963880000,210.00000000],[1787964180000,207.24000000],[1787964480000,215.84000000],[1787964780000,220.10000000],[1787965080000,210.30000000],[1787965380000,216.10000000],[1787965680000,203.04000000],[1787965980000,210.64000000],[1787966280000,195.38000000],[1787966580000,198.08000000],[1787966880000,209.06000000],[1787967180000,205.84000000],[1787967480000,242.90000000],[1787967780000,218.06000000],[1787968080000,208.10000000],[1787968380000,197.40000000],[1787968680000,207.76000000],[1787968980000,206.98000000],[1787969280000,207.44000000],[1787969580000,227.62000000],[1787969880000,208.40000000],[1787970180000,200.20000000],[1787970480000,209.36000000],[1787970780000,206.56000000],[1787971080000,217.70000000],[1787971380000,206.74000000],[1787971680000,212.68000000],[1787971980000,207.10000000],[1787972280000,201.70000000],[1787972580000,227.12000000],[1787972880000,240.90000000],[1787973180000,237.66000000],[1787973480000,198.46000000],[1787973780000,205.24000000],[1787974080000,224.26000000],[1787974380000,236.00000000],[1787974680000,234.90000000],[1787974980000,216.66000000],[1787975280000,200.58000000],[1787975580000,208.20000000],[1787975880000,204.64000000],[1787976180000,255.84000000],[1787976480000,186.48000000],[1787976780000,184.00000000],[1787977080000,185.70000000],[1787977380000,171.86000000],[1787977680000,153.46000000],[1787977980000,126.88000000],[1787978280000,128.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; }