var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1593468010000,16.60000000],[1593468610000,16.60000000],[1593469210000,16.50000000],[1593469810000,16.50000000],[1593470410000,16.40000000],[1593471010000,16.40000000],[1593471610000,16.40000000],[1593472210000,16.40000000],[1593472810000,16.30000000],[1593473410000,16.30000000],[1593474010000,16.20000000],[1593474610000,16.20000000],[1593475210000,16.00000000],[1593475810000,15.90000000],[1593476410000,15.90000000],[1593477010000,15.70000000],[1593477610000,15.50000000],[1593478210000,15.30000000],[1593478810000,15.20000000],[1593479410000,15.00000000],[1593480010000,14.70000000],[1593480610000,14.80000000],[1593481210000,14.80000000],[1593481810000,14.80000000],[1593482410000,14.70000000],[1593483010000,14.50000000],[1593483610000,14.70000000],[1593484210000,14.90000000],[1593484811000,15.00000000],[1593485410000,14.90000000],[1593486010000,14.80000000],[1593486610000,14.80000000],[1593487210000,15.20000000],[1593487811000,15.60000000],[1593488410000,15.80000000],[1593489010000,16.10000000],[1593489610000,16.30000000],[1593490211000,15.10000000],[1593490810000,15.20000000],[1593491410000,15.80000000],[1593492010000,16.40000000],[1593492610000,16.30000000],[1593493210000,16.30000000],[1593493811000,16.60000000],[1593494410000,16.70000000],[1593495010000,16.80000000],[1593495610000,17.10000000],[1593496210000,17.30000000],[1593496811000,17.70000000],[1593497411000,17.90000000],[1593498010000,18.20000000],[1593498610000,18.60000000],[1593499210000,18.90000000],[1593499810000,19.10000000],[1593500410000,19.40000000],[1593501011000,19.80000000],[1593501610000,20.10000000],[1593502210000,20.50000000],[1593502811000,20.80000000],[1593503410000,21.30000000],[1593504010000,21.50000000],[1593504611000,21.50000000],[1593505210000,21.70000000],[1593505810000,21.70000000],[1593506411000,22.00000000],[1593507010000,22.30000000],[1593507610000,22.00000000],[1593508211000,22.10000000],[1593508810000,22.20000000],[1593509410000,22.40000000],[1593510011000,22.80000000],[1593510610000,22.70000000],[1593511210000,22.70000000],[1593511811000,22.30000000],[1593512410000,22.80000000],[1593513010000,22.70000000],[1593513611000,23.20000000],[1593514210000,23.30000000],[1593514810000,23.50000000],[1593515411000,23.50000000],[1593516010000,23.60000000],[1593516610000,23.10000000],[1593517211000,23.90000000],[1593517810000,23.40000000],[1593518410000,23.70000000],[1593519011000,23.80000000],[1593519610000,24.10000000],[1593520210000,24.10000000],[1593520811000,24.30000000],[1593521411000,24.60000000],[1593522010000,24.30000000],[1593522611000,23.90000000],[1593523210000,24.60000000],[1593523810000,24.90000000],[1593524411000,24.30000000],[1593525010000,24.60000000],[1593525610000,24.10000000],[1593526211000,24.40000000],[1593526811000,24.30000000],[1593527410000,23.40000000],[1593528011000,23.80000000],[1593528611000,24.40000000],[1593529210000,24.70000000],[1593529811000,24.40000000],[1593530411000,24.00000000],[1593531010000,23.70000000],[1593531611000,23.90000000],[1593532211000,23.70000000],[1593532810000,23.90000000],[1593533410000,23.90000000],[1593534011000,23.80000000],[1593534610000,23.60000000],[1593535211000,23.70000000],[1593535811000,23.70000000],[1593536411000,23.60000000],[1593537011000,23.20000000],[1593537611000,22.70000000],[1593538210000,22.40000000],[1593538811000,22.10000000],[1593539411000,21.90000000],[1593540010000,21.90000000],[1593540611000,21.80000000],[1593541211000,21.80000000],[1593541810000,21.60000000],[1593542411000,21.50000000],[1593543011000,21.40000000],[1593543610000,21.20000000],[1593544211000,21.00000000],[1593544811000,20.70000000],[1593545410000,20.60000000],[1593546011000,20.70000000],[1593546611000,20.60000000],[1593547210000,20.60000000],[1593547811000,20.40000000],[1593548411000,20.30000000],[1593549010000,20.20000000],[1593549611000,20.00000000],[1593550211000,19.90000000],[1593550810000,19.90000000],[1593551411000,19.80000000],[1593552011000,19.80000000],[1593552610000,19.80000000],[1593553211000,19.60000000],[1593553811000,19.40000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1593468010000,13.7],[1593468610000,13.7],[1593469210000,13.6],[1593469810000,13.6],[1593470410000,13.6],[1593471010000,13.5],[1593471610000,13.5],[1593472210000,13.4],[1593472810000,13.3],[1593473410000,13.4],[1593474010000,13.3],[1593474610000,13.2],[1593475210000,13.1],[1593475810000,13],[1593476410000,13],[1593477010000,12.9],[1593477610000,12.8],[1593478210000,12.7],[1593478810000,12.6],[1593479410000,12.4],[1593480010000,12.3],[1593480610000,12.5],[1593481210000,12.5],[1593481810000,12.4],[1593482410000,12.3],[1593483010000,12.2],[1593483610000,12.4],[1593484210000,12.5],[1593484811000,12.5],[1593485410000,12.5],[1593486010000,12.5],[1593486610000,12.5],[1593487210000,12.8],[1593487811000,13],[1593488410000,13.1],[1593489010000,13.2],[1593489610000,13.2],[1593490211000,12.3],[1593490810000,12.6],[1593491410000,13.2],[1593492010000,13.6],[1593492610000,13.5],[1593493210000,13.6],[1593493811000,13.9],[1593494410000,14],[1593495010000,14.1],[1593495610000,14.3],[1593496210000,14.4],[1593496811000,14.8],[1593497411000,14.8],[1593498010000,15],[1593498610000,15.4],[1593499210000,15.7],[1593499810000,15.7],[1593500410000,16.1],[1593501011000,16.4],[1593501610000,16.4],[1593502210000,16.3],[1593502811000,14.9],[1593503410000,14.9],[1593504010000,14.9],[1593504611000,14.4],[1593505210000,14.4],[1593505810000,14.1],[1593506411000,14.3],[1593507010000,14.1],[1593507610000,13.7],[1593508211000,13.8],[1593508810000,14.2],[1593509410000,14.6],[1593510011000,15.1],[1593510610000,14.7],[1593511210000,14.8],[1593511811000,14.6],[1593512410000,15],[1593513010000,15.1],[1593513611000,15.6],[1593514210000,15.4],[1593514810000,15.2],[1593515411000,15.1],[1593516010000,15.2],[1593516610000,14.6],[1593517211000,14.9],[1593517810000,13.6],[1593518410000,13.8],[1593519011000,13.3],[1593519610000,13.2],[1593520210000,12.9],[1593520811000,13.3],[1593521411000,13.7],[1593522010000,13.3],[1593522611000,13.4],[1593523210000,14.5],[1593523810000,14.6],[1593524411000,14.4],[1593525010000,14.5],[1593525610000,14.4],[1593526211000,14.6],[1593526811000,14.4],[1593527410000,14.1],[1593528011000,14.7],[1593528611000,15],[1593529210000,14.9],[1593529811000,14.8],[1593530411000,14.5],[1593531010000,14.6],[1593531611000,14.7],[1593532211000,14.7],[1593532810000,14.9],[1593533410000,14.8],[1593534011000,14.8],[1593534610000,14.8],[1593535211000,15],[1593535811000,15.2],[1593536411000,15.1],[1593537011000,14.9],[1593537611000,14.8],[1593538210000,14.7],[1593538811000,14.6],[1593539411000,14.4],[1593540010000,14.4],[1593540611000,14.1],[1593541211000,14.1],[1593541810000,13.9],[1593542411000,13.9],[1593543011000,13.8],[1593543610000,13.7],[1593544211000,13.7],[1593544811000,13.6],[1593545410000,13.5],[1593546011000,13.5],[1593546611000,13.4],[1593547210000,13.4],[1593547811000,13.4],[1593548411000,13.4],[1593549010000,13.4],[1593549611000,13.3],[1593550211000,13.3],[1593550810000,13.3],[1593551411000,13.2],[1593552011000,13.2],[1593552610000,13.2],[1593553211000,13.1],[1593553811000,13.1],], 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() { dataset = [ { label: 'Vlhkosť (%)', data: [[1593468010000,83.00000000],[1593468610000,83.00000000],[1593469210000,83.20000000],[1593469810000,83.20000000],[1593470410000,83.40000000],[1593471010000,83.00000000],[1593471610000,83.20000000],[1593472210000,82.80000000],[1593472810000,82.80000000],[1593473410000,83.00000000],[1593474010000,83.00000000],[1593474610000,82.80000000],[1593475210000,83.00000000],[1593475810000,83.20000000],[1593476410000,83.20000000],[1593477010000,83.60000000],[1593477610000,84.00000000],[1593478210000,84.40000000],[1593478810000,84.60000000],[1593479410000,84.80000000],[1593480010000,85.80000000],[1593480610000,86.00000000],[1593481210000,86.00000000],[1593481810000,85.80000000],[1593482410000,85.80000000],[1593483010000,86.40000000],[1593483610000,86.20000000],[1593484210000,85.80000000],[1593484811000,85.40000000],[1593485410000,85.60000000],[1593486010000,86.00000000],[1593486610000,86.20000000],[1593487210000,85.60000000],[1593487811000,84.60000000],[1593488410000,84.00000000],[1593489010000,83.00000000],[1593489610000,82.00000000],[1593490211000,83.40000000],[1593490810000,84.80000000],[1593491410000,84.40000000],[1593492010000,83.80000000],[1593492610000,83.60000000],[1593493210000,84.00000000],[1593493811000,84.00000000],[1593494410000,84.00000000],[1593495010000,84.00000000],[1593495610000,83.60000000],[1593496210000,83.40000000],[1593496811000,83.40000000],[1593497411000,82.40000000],[1593498010000,81.80000000],[1593498610000,81.80000000],[1593499210000,81.60000000],[1593499810000,81.00000000],[1593500410000,81.20000000],[1593501011000,80.80000000],[1593501610000,79.60000000],[1593502210000,76.80000000],[1593502811000,69.20000000],[1593503410000,67.00000000],[1593504010000,66.00000000],[1593504611000,64.20000000],[1593505210000,63.40000000],[1593505810000,62.20000000],[1593506411000,61.80000000],[1593507010000,59.80000000],[1593507610000,59.40000000],[1593508211000,59.60000000],[1593508810000,60.60000000],[1593509410000,61.40000000],[1593510011000,61.80000000],[1593510610000,60.80000000],[1593511210000,61.20000000],[1593511811000,62.00000000],[1593512410000,61.60000000],[1593513010000,62.20000000],[1593513611000,62.40000000],[1593514210000,61.20000000],[1593514810000,59.80000000],[1593515411000,59.20000000],[1593516010000,59.40000000],[1593516610000,59.00000000],[1593517211000,57.20000000],[1593517810000,54.20000000],[1593518410000,53.80000000],[1593519011000,51.80000000],[1593519610000,50.60000000],[1593520210000,49.80000000],[1593520811000,50.40000000],[1593521411000,50.60000000],[1593522010000,50.40000000],[1593522611000,52.00000000],[1593523210000,53.40000000],[1593523810000,53.00000000],[1593524411000,54.20000000],[1593525010000,53.40000000],[1593525610000,54.80000000],[1593526211000,54.60000000],[1593526811000,54.20000000],[1593527410000,56.00000000],[1593528011000,56.80000000],[1593528611000,56.00000000],[1593529210000,54.40000000],[1593529811000,55.20000000],[1593530411000,55.60000000],[1593531010000,56.80000000],[1593531611000,56.60000000],[1593532211000,57.00000000],[1593532810000,57.40000000],[1593533410000,57.00000000],[1593534011000,57.20000000],[1593534610000,57.80000000],[1593535211000,58.40000000],[1593535811000,59.00000000],[1593536411000,59.00000000],[1593537011000,59.80000000],[1593537611000,61.20000000],[1593538210000,62.00000000],[1593538811000,62.60000000],[1593539411000,62.60000000],[1593540010000,62.40000000],[1593540611000,61.80000000],[1593541211000,61.60000000],[1593541810000,61.80000000],[1593542411000,62.00000000],[1593543011000,62.20000000],[1593543610000,62.60000000],[1593544211000,63.20000000],[1593544811000,63.80000000],[1593545410000,63.80000000],[1593546011000,63.40000000],[1593546611000,63.40000000],[1593547210000,63.60000000],[1593547811000,64.20000000],[1593548411000,64.60000000],[1593549010000,65.00000000],[1593549611000,65.60000000],[1593550211000,66.00000000],[1593550810000,66.00000000],[1593551411000,66.00000000],[1593552011000,66.00000000],[1593552610000,65.80000000],[1593553211000,66.40000000],[1593553811000,67.20000000],], 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: 'Atmosférický tlak (hPa)', data: [[1593468010000,1013.8],[1593468610000,1013.8],[1593469210000,1013.9],[1593469810000,1014],[1593470410000,1014.1],[1593471010000,1014.2],[1593471610000,1014.3],[1593472210000,1014.5],[1593472810000,1014.5],[1593473410000,1014.6],[1593474010000,1014.6],[1593474610000,1014.6],[1593475210000,1014.6],[1593475810000,1014.8],[1593476410000,1014.9],[1593477010000,1014.9],[1593477610000,1014.9],[1593478210000,1014.9],[1593478810000,1015],[1593479410000,1015.1],[1593480010000,1015.2],[1593480610000,1015.3],[1593481210000,1015.3],[1593481810000,1015.3],[1593482410000,1015.3],[1593483010000,1015.4],[1593483610000,1015.4],[1593484210000,1015.3],[1593484811000,1015.4],[1593485410000,1015.5],[1593486010000,1015.5],[1593486610000,1015.5],[1593487210000,1015.5],[1593487811000,1015.5],[1593488410000,1015.6],[1593489010000,1015.7],[1593489610000,1015.7],[1593490211000,1016],[1593490810000,1016.1],[1593491410000,1016],[1593492010000,1016.1],[1593492610000,1016.3],[1593493210000,1016.4],[1593493811000,1016.4],[1593494410000,1016.3],[1593495010000,1016.4],[1593495610000,1016.4],[1593496210000,1016.3],[1593496811000,1016.4],[1593497411000,1016.4],[1593498010000,1016.4],[1593498610000,1016.4],[1593499210000,1016.4],[1593499810000,1016.4],[1593500410000,1016.4],[1593501011000,1016.4],[1593501610000,1017.3],[1593502210000,1017.2],[1593502811000,1017.3],[1593503410000,1017.2],[1593504010000,1017.2],[1593504611000,1017.2],[1593505210000,1017.1],[1593505810000,1017.1],[1593506411000,1017],[1593507010000,1017],[1593507610000,1017.1],[1593508211000,1017.1],[1593508810000,1017.2],[1593509410000,1017.1],[1593510011000,1016.8],[1593510610000,1016.9],[1593511210000,1016.8],[1593511811000,1016.9],[1593512410000,1016.8],[1593513010000,1016.8],[1593513611000,1016.6],[1593514210000,1016.5],[1593514810000,1016.4],[1593515411000,1016.3],[1593516010000,1016.3],[1593516610000,1016.3],[1593517211000,1016],[1593517810000,1016],[1593518410000,1015.9],[1593519011000,1015.8],[1593519610000,1015.8],[1593520210000,1015.7],[1593520811000,1015.6],[1593521411000,1015.5],[1593522010000,1015.5],[1593522611000,1015.6],[1593523210000,1015.4],[1593523810000,1015.3],[1593524411000,1015.4],[1593525010000,1015.4],[1593525610000,1015.5],[1593526211000,1015.4],[1593526811000,1015.4],[1593527410000,1015.6],[1593528011000,1015.3],[1593528611000,1015.1],[1593529210000,1015],[1593529811000,1015],[1593530411000,1015],[1593531010000,1015],[1593531611000,1014.9],[1593532211000,1014.9],[1593532810000,1014.8],[1593533410000,1014.7],[1593534011000,1014.8],[1593534610000,1014.8],[1593535211000,1014.7],[1593535811000,1014.6],[1593536411000,1014.6],[1593537011000,1014.6],[1593537611000,1014.8],[1593538210000,1014.9],[1593538811000,1014.9],[1593539411000,1014.9],[1593540010000,1014.9],[1593540611000,1014.9],[1593541211000,1014.7],[1593541810000,1014.7],[1593542411000,1014.9],[1593543011000,1015],[1593543610000,1015.2],[1593544211000,1015.2],[1593544811000,1015.4],[1593545410000,1015.5],[1593546011000,1015.6],[1593546611000,1015.6],[1593547210000,1015.6],[1593547811000,1015.7],[1593548411000,1015.8],[1593549010000,1015.8],[1593549611000,1015.4],[1593550211000,1015],[1593550810000,1015],[1593551411000,1015.1],[1593552011000,1015.1],[1593552610000,1015.2],[1593553211000,1015.3],[1593553811000,1015.5],], color: '#000000' } ]; var options = { xaxes: [{ axisLabel: 'pressure', }], 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.1hPa' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-pressure-legend' } }; graphs['#chart-pressure'] = $.plot('#chart-pressure', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Slnečné žiarenie (W/m2)', data: [[1593468010000,0.00000000],[1593468610000,0.00000000],[1593469210000,0.00000000],[1593469810000,0.00000000],[1593470410000,0.00000000],[1593471010000,0.00000000],[1593471610000,0.00000000],[1593472210000,0.00000000],[1593472810000,0.00000000],[1593473410000,0.00000000],[1593474010000,0.00000000],[1593474610000,0.00000000],[1593475210000,0.00000000],[1593475810000,0.00000000],[1593476410000,0.00000000],[1593477010000,0.00000000],[1593477610000,0.00000000],[1593478210000,0.00000000],[1593478810000,0.00000000],[1593479410000,0.00000000],[1593480010000,0.00000000],[1593480610000,0.00000000],[1593481210000,0.00000000],[1593481810000,0.00000000],[1593482410000,0.00000000],[1593483010000,0.00000000],[1593483610000,0.00000000],[1593484210000,0.00000000],[1593484811000,0.00000000],[1593485410000,2.00000000],[1593486010000,6.00000000],[1593486610000,10.00000000],[1593487210000,18.00000000],[1593487811000,26.00000000],[1593488410000,38.00000000],[1593489010000,54.00000000],[1593489610000,72.00000000],[1593490211000,92.00000000],[1593490810000,114.00000000],[1593491410000,136.00000000],[1593492010000,160.00000000],[1593492610000,184.00000000],[1593493210000,210.00000000],[1593493811000,238.00000000],[1593494410000,268.00000000],[1593495010000,296.00000000],[1593495610000,324.00000000],[1593496210000,352.00000000],[1593496811000,378.00000000],[1593497411000,406.00000000],[1593498010000,438.00000000],[1593498610000,468.00000000],[1593499210000,496.00000000],[1593499810000,524.00000000],[1593500410000,550.00000000],[1593501011000,578.00000000],[1593501610000,606.00000000],[1593502210000,632.00000000],[1593502811000,660.00000000],[1593503410000,684.00000000],[1593504010000,706.00000000],[1593504611000,730.00000000],[1593505210000,752.00000000],[1593505810000,772.00000000],[1593506411000,794.00000000],[1593507010000,812.00000000],[1593507610000,828.00000000],[1593508211000,854.00000000],[1593508810000,882.00000000],[1593509410000,862.00000000],[1593510011000,908.00000000],[1593510610000,784.00000000],[1593511210000,686.00000000],[1593511811000,772.00000000],[1593512410000,844.00000000],[1593513010000,808.00000000],[1593513611000,928.00000000],[1593514210000,986.00000000],[1593514810000,742.00000000],[1593515411000,838.00000000],[1593516010000,540.00000000],[1593516610000,786.00000000],[1593517211000,998.00000000],[1593517810000,492.00000000],[1593518410000,872.00000000],[1593519011000,780.00000000],[1593519610000,896.00000000],[1593520210000,886.00000000],[1593520811000,802.00000000],[1593521411000,882.00000000],[1593522010000,644.00000000],[1593522611000,534.00000000],[1593523210000,820.00000000],[1593523810000,650.00000000],[1593524411000,638.00000000],[1593525010000,568.00000000],[1593525610000,656.00000000],[1593526211000,504.00000000],[1593526811000,332.00000000],[1593527410000,292.00000000],[1593528011000,424.00000000],[1593528611000,644.00000000],[1593529210000,590.00000000],[1593529811000,370.00000000],[1593530411000,366.00000000],[1593531010000,268.00000000],[1593531611000,316.00000000],[1593532211000,338.00000000],[1593532810000,312.00000000],[1593533410000,352.00000000],[1593534011000,270.00000000],[1593534610000,276.00000000],[1593535211000,254.00000000],[1593535811000,226.00000000],[1593536411000,188.00000000],[1593537011000,62.00000000],[1593537611000,36.00000000],[1593538210000,32.00000000],[1593538811000,32.00000000],[1593539411000,36.00000000],[1593540010000,36.00000000],[1593540611000,18.00000000],[1593541211000,14.00000000],[1593541810000,10.00000000],[1593542411000,8.00000000],[1593543011000,4.00000000],[1593543610000,2.00000000],[1593544211000,0.00000000],[1593544811000,0.00000000],[1593545410000,0.00000000],[1593546011000,0.00000000],[1593546611000,0.00000000],[1593547210000,0.00000000],[1593547811000,0.00000000],[1593548411000,0.00000000],[1593549010000,0.00000000],[1593549611000,0.00000000],[1593550211000,0.00000000],[1593550810000,0.00000000],[1593551411000,0.00000000],[1593552011000,0.00000000],[1593552610000,0.00000000],[1593553211000,0.00000000],[1593553811000,0.00000000],], color: '#ffb92f' } ]; var options = { xaxes: [{ axisLabel: 'solar_radiation', }], 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.1W/m2' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-solar-radiation-legend' } }; graphs['#chart-solar-radiation'] = $.plot('#chart-solar-radiation', 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; }