var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1766444449000,4.10000000],[1766444577000,4.10000000],[1766444898000,4.10000000],[1766445154000,4.10000000],[1766445473000,4.00000000],[1766445793000,3.84000000],[1766446113000,3.70000000],[1766446369000,3.64000000],[1766446689000,3.60000000],[1766446960000,3.60000000],[1766447280000,3.54000000],[1766447600000,3.50000000],[1766447852000,3.50000000],[1766448176000,3.50000000],[1766448496000,3.40000000],[1766448752000,3.40000000],[1766449072000,3.40000000],[1766449392000,3.40000000],[1766449712000,3.40000000],[1766449958000,3.40000000],[1766450288000,3.40000000],[1766450608000,3.40000000],[1766450853000,3.44000000],[1766451184000,3.42000000],[1766451504000,3.40000000],[1766451753000,3.40000000],[1766452082000,3.40000000],[1766452401000,3.47500000],[1766452654000,3.50000000],[1766452977000,3.50000000],[1766453297000,3.50000000],[1766453553000,3.50000000],[1766453872000,3.50000000],[1766454192000,3.50000000],[1766454512000,3.50000000],[1766454757000,3.50000000],[1766455088000,3.50000000],[1766455408000,3.42500000],[1766455654000,3.36000000],[1766455984000,3.30000000],[1766456304000,3.30000000],[1766456553000,3.30000000],[1766456880000,3.24000000],[1766457200000,3.20000000],[1766457453000,3.20000000],[1766457776000,3.20000000],[1766458096000,3.20000000],[1766458352000,3.20000000],[1766458672000,3.20000000],[1766458992000,3.20000000],[1766459312000,3.20000000],[1766459558000,3.20000000],[1766459888000,3.20000000],[1766460208000,3.20000000],[1766460453000,3.16000000],[1766460784000,3.10000000],[1766461105000,3.17500000],[1766461361000,3.10000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1766444449000,3.6],[1766444577000,3.5],[1766444898000,3.7],[1766445154000,3.7],[1766445473000,3.5],[1766445793000,3.4],[1766446113000,3.3],[1766446369000,3.2],[1766446689000,3.3],[1766446960000,3.3],[1766447280000,3.2],[1766447600000,3.2],[1766447852000,3.2],[1766448176000,3.2],[1766448496000,3.1],[1766448752000,3.1],[1766449072000,3.1],[1766449392000,3.1],[1766449712000,3.1],[1766449958000,3.1],[1766450288000,3.1],[1766450608000,3.1],[1766450853000,3.1],[1766451184000,3.1],[1766451504000,3.1],[1766451753000,3.1],[1766452082000,3],[1766452401000,3],[1766452654000,2.9],[1766452977000,2.9],[1766453297000,2.9],[1766453553000,2.9],[1766453872000,2.9],[1766454192000,2.9],[1766454512000,2.9],[1766454757000,2.9],[1766455088000,2.9],[1766455408000,2.8],[1766455654000,2.7],[1766455984000,2.5],[1766456304000,2.4],[1766456553000,2.4],[1766456880000,2.4],[1766457200000,2.4],[1766457453000,2.3],[1766457776000,2.3],[1766458096000,2.3],[1766458352000,2.3],[1766458672000,2.3],[1766458992000,2.2],[1766459312000,2.3],[1766459558000,2.3],[1766459888000,2.3],[1766460208000,2.3],[1766460453000,2.3],[1766460784000,2.4],[1766461105000,2.4],[1766461361000,2.4],], 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: [[1766444449000,96.50000000],[1766444577000,96.20000000],[1766444898000,97.00000000],[1766445154000,97.00000000],[1766445473000,96.80000000],[1766445793000,97.00000000],[1766446113000,97.00000000],[1766446369000,97.00000000],[1766446689000,97.75000000],[1766446960000,98.00000000],[1766447280000,98.00000000],[1766447600000,98.00000000],[1766447852000,98.00000000],[1766448176000,98.00000000],[1766448496000,98.00000000],[1766448752000,98.00000000],[1766449072000,98.00000000],[1766449392000,98.00000000],[1766449712000,98.00000000],[1766449958000,98.00000000],[1766450288000,98.00000000],[1766450608000,98.00000000],[1766450853000,98.00000000],[1766451184000,98.00000000],[1766451504000,98.00000000],[1766451753000,98.00000000],[1766452082000,97.00000000],[1766452401000,97.00000000],[1766452654000,96.20000000],[1766452977000,96.00000000],[1766453297000,96.00000000],[1766453553000,96.00000000],[1766453872000,96.00000000],[1766454192000,96.00000000],[1766454512000,96.00000000],[1766454757000,96.00000000],[1766455088000,96.00000000],[1766455408000,96.00000000],[1766455654000,95.40000000],[1766455984000,94.80000000],[1766456304000,94.00000000],[1766456553000,94.00000000],[1766456880000,94.60000000],[1766457200000,94.50000000],[1766457453000,94.00000000],[1766457776000,94.00000000],[1766458096000,94.00000000],[1766458352000,94.00000000],[1766458672000,94.00000000],[1766458992000,93.20000000],[1766459312000,93.75000000],[1766459558000,94.00000000],[1766459888000,94.00000000],[1766460208000,94.00000000],[1766460453000,94.00000000],[1766460784000,95.00000000],[1766461105000,95.00000000],[1766461361000,95.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: 'Atmosférický tlak (hPa)', data: [[1766444449000,1022.2],[1766444577000,1022.2],[1766444898000,1022.3],[1766445154000,1022.2],[1766445473000,1022.2],[1766445793000,1022.3],[1766446113000,1022.3],[1766446369000,1022.4],[1766446689000,1022.3],[1766446960000,1022.3],[1766447280000,1022.2],[1766447600000,1022.3],[1766447852000,1022.3],[1766448176000,1022.3],[1766448496000,1022.4],[1766448752000,1022.3],[1766449072000,1022.3],[1766449392000,1022.4],[1766449712000,1022.3],[1766449958000,1022.4],[1766450288000,1022.2],[1766450608000,1022.3],[1766450853000,1022.3],[1766451184000,1022.2],[1766451504000,1022.3],[1766451753000,1022.3],[1766452082000,1022.3],[1766452401000,1022.2],[1766452654000,1022.2],[1766452977000,1022.2],[1766453297000,1022.2],[1766453553000,1022.2],[1766453872000,1022.1],[1766454192000,1022.1],[1766454512000,1022],[1766454757000,1022],[1766455088000,1022],[1766455408000,1021.9],[1766455654000,1021.9],[1766455984000,1021.9],[1766456304000,1021.9],[1766456553000,1022],[1766456880000,1021.9],[1766457200000,1021.9],[1766457453000,1021.9],[1766457776000,1021.7],[1766458096000,1021.8],[1766458352000,1021.7],[1766458672000,1021.7],[1766458992000,1021.6],[1766459312000,1021.6],[1766459558000,1021.5],[1766459888000,1021.6],[1766460208000,1021.6],[1766460453000,1021.6],[1766460784000,1021.6],[1766461105000,1021.5],[1766461361000,1021.4],], 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: 'Rýchlosť vetra (km/h)', data: [[1766444449000,1.26],[1766444577000,2.016],[1766444898000,3.42],[1766445154000,4.536],[1766445473000,3.528],[1766445793000,3.744],[1766446113000,4.68],[1766446369000,3.888],[1766446689000,2.52],[1766446960000,4.104],[1766447280000,3.168],[1766447600000,4.14],[1766447852000,3.24],[1766448176000,3.6],[1766448496000,2.25],[1766448752000,3.384],[1766449072000,1.512],[1766449392000,0.648],[1766449712000,2.25],[1766449958000,0.504],[1766450288000,0.576],[1766450608000,1.71],[1766450853000,0.576],[1766451184000,2.232],[1766451504000,1.8],[1766451753000,0.36],[1766452082000,2.016],[1766452401000,2.7],[1766452654000,2.376],[1766452977000,3.528],[1766453297000,2.7],[1766453553000,0.648],[1766453872000,3.096],[1766454192000,1.008],[1766454512000,0.63],[1766454757000,1.512],[1766455088000,0.792],[1766455408000,5.49],[1766455654000,3.888],[1766455984000,2.592],[1766456304000,4.59],[1766456553000,5.184],[1766456880000,3.96],[1766457200000,2.43],[1766457453000,3.096],[1766457776000,2.304],[1766458096000,1.17],[1766458352000,2.808],[1766458672000,1.368],[1766458992000,1.512],[1766459312000,1.35],[1766459558000,1.44],[1766459888000,0.216],[1766460208000,1.44],[1766460453000,0.792],[1766460784000,2.736],[1766461105000,0.72],[1766461361000,2.16],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1766444449000,1.26],[1766444577000,3.528],[1766444898000,5.04],[1766445154000,6.048],[1766445473000,5.544],[1766445793000,5.544],[1766446113000,6.93],[1766446369000,5.544],[1766446689000,3.15],[1766446960000,5.04],[1766447280000,5.04],[1766447600000,5.67],[1766447852000,4.536],[1766448176000,5.04],[1766448496000,3.15],[1766448752000,4.536],[1766449072000,2.52],[1766449392000,1.512],[1766449712000,3.15],[1766449958000,1.008],[1766450288000,2.016],[1766450608000,2.52],[1766450853000,1.512],[1766451184000,3.024],[1766451504000,1.89],[1766451753000,1.680000012],[1766452082000,3.024],[1766452401000,3.78],[1766452654000,3.024],[1766452977000,5.04],[1766453297000,4.41],[1766453553000,1.512],[1766453872000,4.032],[1766454192000,2.52],[1766454512000,1.89],[1766454757000,2.52],[1766455088000,2.016],[1766455408000,8.19],[1766455654000,6.12],[1766455984000,5.04],[1766456304000,7.02],[1766456553000,7.632],[1766456880000,6.048],[1766457200000,4.41],[1766457453000,5.616],[1766457776000,4.032],[1766458096000,1.89],[1766458352000,3.528],[1766458672000,2.52],[1766458992000,2.52],[1766459312000,2.52],[1766459558000,2.52],[1766459888000,1.512],[1766460208000,3.78],[1766460453000,1.512],[1766460784000,4.032],[1766461105000,1.26],[1766461361000,2.52],], 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: [[1766444449000,47.00000000],[1766444577000,139.80000000],[1766444898000,164.75000000],[1766445154000,153.80000000],[1766445473000,165.00000000],[1766445793000,149.20000000],[1766446113000,149.75000000],[1766446369000,153.80000000],[1766446689000,173.00000000],[1766446960000,175.60000000],[1766447280000,147.60000000],[1766447600000,150.50000000],[1766447852000,172.00000000],[1766448176000,159.00000000],[1766448496000,180.75000000],[1766448752000,159.40000000],[1766449072000,192.60000000],[1766449392000,167.60000000],[1766449712000,165.50000000],[1766449958000,233.20000000],[1766450288000,216.60000000],[1766450608000,247.00000000],[1766450853000,263.80000000],[1766451184000,199.00000000],[1766451504000,151.25000000],[1766451753000,203.00000000],[1766452082000,117.80000000],[1766452401000,138.00000000],[1766452654000,142.20000000],[1766452977000,144.40000000],[1766453297000,140.00000000],[1766453553000,32.80000000],[1766453872000,120.80000000],[1766454192000,75.40000000],[1766454512000,96.25000000],[1766454757000,179.60000000],[1766455088000,72.60000000],[1766455408000,117.25000000],[1766455654000,128.00000000],[1766455984000,132.00000000],[1766456304000,120.50000000],[1766456553000,82.40000000],[1766456880000,134.40000000],[1766457200000,153.50000000],[1766457453000,116.40000000],[1766457776000,86.80000000],[1766458096000,53.00000000],[1766458352000,59.00000000],[1766458672000,32.40000000],[1766458992000,56.80000000],[1766459312000,33.75000000],[1766459558000,120.20000000],[1766459888000,96.40000000],[1766460208000,35.50000000],[1766460453000,48.20000000],[1766460784000,125.80000000],[1766461105000,196.00000000],[1766461361000,4.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: 'Slnečné žiarenie (W/m2)', data: [[1766444449000,0.00000000],[1766444577000,0.00000000],[1766444898000,0.00000000],[1766445154000,0.00000000],[1766445473000,0.00000000],[1766445793000,0.00000000],[1766446113000,0.00000000],[1766446369000,0.00000000],[1766446689000,0.00000000],[1766446960000,0.00000000],[1766447280000,0.00000000],[1766447600000,0.00000000],[1766447852000,0.00000000],[1766448176000,0.00000000],[1766448496000,0.00000000],[1766448752000,0.00000000],[1766449072000,0.00000000],[1766449392000,0.00000000],[1766449712000,0.00000000],[1766449958000,0.00000000],[1766450288000,0.00000000],[1766450608000,0.00000000],[1766450853000,0.00000000],[1766451184000,0.00000000],[1766451504000,0.00000000],[1766451753000,0.00000000],[1766452082000,0.00000000],[1766452401000,0.00000000],[1766452654000,0.00000000],[1766452977000,0.00000000],[1766453297000,0.00000000],[1766453553000,0.00000000],[1766453872000,0.00000000],[1766454192000,0.00000000],[1766454512000,0.00000000],[1766454757000,0.00000000],[1766455088000,0.00000000],[1766455408000,0.00000000],[1766455654000,0.00000000],[1766455984000,0.00000000],[1766456304000,0.00000000],[1766456553000,0.00000000],[1766456880000,0.00000000],[1766457200000,0.00000000],[1766457453000,0.00000000],[1766457776000,0.00000000],[1766458096000,0.00000000],[1766458352000,0.00000000],[1766458672000,0.00000000],[1766458992000,0.00000000],[1766459312000,0.00000000],[1766459558000,0.00000000],[1766459888000,0.00000000],[1766460208000,0.00000000],[1766460453000,0.00000000],[1766460784000,0.00000000],[1766461105000,0.00000000],[1766461361000,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); }); $(document).ready(function() { dataset = [ { label: 'UV žiarenie', data: [[1766444449000,0.00000000],[1766444577000,0.00000000],[1766444898000,0.00000000],[1766445154000,0.00000000],[1766445473000,0.00000000],[1766445793000,0.00000000],[1766446113000,0.00000000],[1766446369000,0.00000000],[1766446689000,0.00000000],[1766446960000,0.00000000],[1766447280000,0.00000000],[1766447600000,0.00000000],[1766447852000,0.00000000],[1766448176000,0.00000000],[1766448496000,0.00000000],[1766448752000,0.00000000],[1766449072000,0.00000000],[1766449392000,0.00000000],[1766449712000,0.00000000],[1766449958000,0.00000000],[1766450288000,0.00000000],[1766450608000,0.00000000],[1766450853000,0.00000000],[1766451184000,0.00000000],[1766451504000,0.00000000],[1766451753000,0.00000000],[1766452082000,0.00000000],[1766452401000,0.00000000],[1766452654000,0.00000000],[1766452977000,0.00000000],[1766453297000,0.00000000],[1766453553000,0.00000000],[1766453872000,0.00000000],[1766454192000,0.00000000],[1766454512000,0.00000000],[1766454757000,0.00000000],[1766455088000,0.00000000],[1766455408000,0.00000000],[1766455654000,0.00000000],[1766455984000,0.00000000],[1766456304000,0.00000000],[1766456553000,0.00000000],[1766456880000,0.00000000],[1766457200000,0.00000000],[1766457453000,0.00000000],[1766457776000,0.00000000],[1766458096000,0.00000000],[1766458352000,0.00000000],[1766458672000,0.00000000],[1766458992000,0.00000000],[1766459312000,0.00000000],[1766459558000,0.00000000],[1766459888000,0.00000000],[1766460208000,0.00000000],[1766460453000,0.00000000],[1766460784000,0.00000000],[1766461105000,0.00000000],[1766461361000,0.00000000],], color: '#802674' } ]; var options = { xaxes: [{ axisLabel: 'uv', }], 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.0' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-uv-legend' } }; graphs['#chart-uv'] = $.plot('#chart-uv', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Zrážky', data: [[1766444449000,0.00000000],[1766444577000,0.00000000],[1766444898000,0.00000000],[1766445154000,0.00000000],[1766445473000,0.00000000],[1766445793000,0.00000000],[1766446113000,0.00000000],[1766446369000,0.00000000],[1766446689000,0.00000000],[1766446960000,0.00000000],[1766447280000,0.00000000],[1766447600000,0.00000000],[1766447852000,0.00000000],[1766448176000,0.00000000],[1766448496000,0.00000000],[1766448752000,0.00000000],[1766449072000,0.00000000],[1766449392000,0.00000000],[1766449712000,0.00000000],[1766449958000,0.00000000],[1766450288000,0.00000000],[1766450608000,0.00000000],[1766450853000,0.00000000],[1766451184000,0.00000000],[1766451504000,0.00000000],[1766451753000,0.00000000],[1766452082000,0.00000000],[1766452401000,0.00000000],[1766452654000,0.00000000],[1766452977000,0.00000000],[1766453297000,0.00000000],[1766453553000,0.00000000],[1766453872000,0.00000000],[1766454192000,0.00000000],[1766454512000,0.00000000],[1766454757000,0.00000000],[1766455088000,0.00000000],[1766455408000,0.00000000],[1766455654000,0.00000000],[1766455984000,0.00000000],[1766456304000,0.00000000],[1766456553000,0.00000000],[1766456880000,0.00000000],[1766457200000,0.00000000],[1766457453000,0.00000000],[1766457776000,0.00000000],[1766458096000,0.00000000],[1766458352000,0.00000000],[1766458672000,0.00000000],[1766458992000,0.00000000],[1766459312000,0.00000000],[1766459558000,0.00000000],[1766459888000,0.00000000],[1766460208000,0.00000000],[1766460453000,0.00000000],[1766460784000,0.00000000],[1766461105000,0.00000000],[1766461361000,0.00000000],], 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; }