var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1622412000000,10.90000000],[1622412600000,10.80000000],[1622413200000,10.70000000],[1622413800000,10.70000000],[1622414400000,10.60000000],[1622415000000,10.50000000],[1622415600000,10.50000000],[1622416200000,10.50000000],[1622416800000,10.60000000],[1622417400000,10.60000000],[1622418000000,10.70000000],[1622418600000,10.80000000],[1622419200000,10.70000000],[1622419800000,10.70000000],[1622420400000,10.60000000],[1622421000000,10.50000000],[1622421600000,10.50000000],[1622422200000,10.50000000],[1622422800000,10.50000000],[1622423400000,10.30000000],[1622424000000,10.30000000],[1622424600000,10.20000000],[1622425200000,10.20000000],[1622425800000,10.20000000],[1622426400000,10.20000000],[1622427000000,10.20000000],[1622427600000,10.20000000],[1622428200000,10.20000000],[1622428800000,10.30000000],[1622429400000,10.20000000],[1622430000000,10.20000000],[1622430600000,10.00000000],[1622431200000,10.00000000],[1622431800000,10.50000000],[1622432400000,11.20000000],[1622433000000,11.70000000],[1622433600000,11.70000000],[1622434200000,11.90000000],[1622434800000,12.20000000],[1622435400000,12.40000000],[1622436000000,12.10000000],[1622436600000,12.20000000],[1622437200000,12.30000000],[1622437800000,12.30000000],[1622438400000,13.10000000],[1622439000000,14.30000000],[1622439600000,15.00000000],[1622440200000,15.10000000],[1622440800000,15.40000000],[1622441400000,15.40000000],[1622442000000,15.40000000],[1622442600000,14.80000000],[1622443200000,14.90000000],[1622443800000,15.30000000],[1622444400000,14.80000000],[1622445000000,14.90000000],[1622445600000,15.80000000],[1622446200000,15.50000000],[1622446800000,15.70000000],[1622447400000,16.40000000],[1622448000000,16.80000000],[1622448600000,17.00000000],[1622449200000,17.70000000],[1622449800000,17.00000000],[1622450400000,17.20000000],[1622451000000,17.10000000],[1622451600000,16.60000000],[1622452200000,16.80000000],[1622452800000,17.30000000],[1622453400000,17.10000000],[1622454000000,16.60000000],[1622454600000,16.50000000],[1622455200000,16.10000000],[1622455800000,16.40000000],[1622456400000,16.10000000],[1622457000000,15.20000000],[1622457600000,15.10000000],[1622458200000,15.20000000],[1622458800000,15.30000000],[1622459400000,15.60000000],[1622460000000,15.90000000],[1622460600000,16.00000000],[1622461200000,15.90000000],[1622461800000,16.00000000],[1622462400000,16.30000000],[1622463000000,16.40000000],[1622463600000,16.50000000],[1622464200000,16.60000000],[1622464800000,17.10000000],[1622465400000,16.50000000],[1622466000000,16.00000000],[1622466600000,15.50000000],[1622467200000,15.00000000],[1622467800000,14.90000000],[1622468400000,15.30000000],[1622469000000,15.80000000],[1622469600000,15.90000000],[1622470200000,16.40000000],[1622470800000,16.10000000],[1622471400000,15.20000000],[1622472000000,15.10000000],[1622472600000,15.50000000],[1622473200000,15.90000000],[1622473800000,16.20000000],[1622474400000,16.50000000],[1622475000000,16.70000000],[1622475600000,16.30000000],[1622476200000,15.80000000],[1622476800000,15.30000000],[1622477400000,15.20000000],[1622478000000,15.10000000],[1622478600000,14.90000000],[1622479200000,14.90000000],[1622479800000,14.80000000],[1622480400000,14.50000000],[1622481000000,14.30000000],[1622481600000,14.20000000],[1622482200000,14.30000000],[1622482800000,14.20000000],[1622483400000,14.30000000],[1622484000000,14.20000000],[1622484600000,13.60000000],[1622485200000,13.50000000],[1622485800000,13.50000000],[1622486400000,13.40000000],[1622487000000,12.90000000],[1622487600000,12.80000000],[1622488200000,12.90000000],[1622488800000,12.90000000],[1622489400000,12.60000000],[1622490000000,12.60000000],[1622490600000,12.50000000],[1622491200000,12.30000000],[1622491800000,11.80000000],[1622492400000,11.00000000],[1622493000000,10.10000000],[1622493600000,9.70000000],[1622494200000,9.70000000],[1622494800000,10.00000000],[1622495400000,9.80000000],[1622496000000,9.40000000],[1622496600000,9.30000000],[1622497200000,9.40000000],[1622497800000,9.40000000],[1622498400000,9.50000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1622412000000,6.2],[1622412600000,6.1],[1622413200000,6.1],[1622413800000,6.1],[1622414400000,6],[1622415000000,5.9],[1622415600000,5.9],[1622416200000,5.9],[1622416800000,6.1],[1622417400000,6],[1622418000000,6],[1622418600000,6.1],[1622419200000,6],[1622419800000,6],[1622420400000,6],[1622421000000,5.9],[1622421600000,5.9],[1622422200000,5.9],[1622422800000,5.9],[1622423400000,5.8],[1622424000000,5.9],[1622424600000,5.8],[1622425200000,5.9],[1622425800000,5.9],[1622426400000,5.9],[1622427000000,5.9],[1622427600000,5.8],[1622428200000,5.8],[1622428800000,5.8],[1622429400000,5.8],[1622430000000,5.7],[1622430600000,5.6],[1622431200000,5.6],[1622431800000,5.9],[1622432400000,6.2],[1622433000000,6.4],[1622433600000,6.4],[1622434200000,6.5],[1622434800000,6.8],[1622435400000,6.9],[1622436000000,6.7],[1622436600000,6.8],[1622437200000,6.8],[1622437800000,6.8],[1622438400000,7.7],[1622439000000,8.4],[1622439600000,8.6],[1622440200000,8.6],[1622440800000,8.6],[1622441400000,8.6],[1622442000000,8.4],[1622442600000,8.1],[1622443200000,8.3],[1622443800000,8.4],[1622444400000,8],[1622445000000,8.3],[1622445600000,9.1],[1622446200000,8.5],[1622446800000,8.8],[1622447400000,8.9],[1622448000000,8.5],[1622448600000,8.6],[1622449200000,9],[1622449800000,8.3],[1622450400000,8.6],[1622451000000,8.2],[1622451600000,7.9],[1622452200000,8.4],[1622452800000,9],[1622453400000,8],[1622454000000,7.6],[1622454600000,7.9],[1622455200000,7.7],[1622455800000,8],[1622456400000,8],[1622457000000,8.5],[1622457600000,9.1],[1622458200000,9.2],[1622458800000,9.1],[1622459400000,8.3],[1622460000000,8.2],[1622460600000,7.8],[1622461200000,7],[1622461800000,6.5],[1622462400000,6.8],[1622463000000,6.4],[1622463600000,6.4],[1622464200000,6.5],[1622464800000,6.6],[1622465400000,7.9],[1622466000000,9],[1622466600000,8.7],[1622467200000,8.2],[1622467800000,8.5],[1622468400000,9],[1622469000000,9.5],[1622469600000,9.4],[1622470200000,9.8],[1622470800000,9.5],[1622471400000,8.1],[1622472000000,6.7],[1622472600000,7],[1622473200000,6.9],[1622473800000,6.9],[1622474400000,6.3],[1622475000000,6.4],[1622475600000,5.7],[1622476200000,5.4],[1622476800000,5.4],[1622477400000,5.8],[1622478000000,5.6],[1622478600000,5.4],[1622479200000,5.3],[1622479800000,5.3],[1622480400000,5.2],[1622481000000,5.3],[1622481600000,5.4],[1622482200000,5.5],[1622482800000,5.5],[1622483400000,5.3],[1622484000000,5.1],[1622484600000,4.7],[1622485200000,4.7],[1622485800000,4.7],[1622486400000,4.9],[1622487000000,4.6],[1622487600000,4.6],[1622488200000,4.6],[1622488800000,4.5],[1622489400000,4.2],[1622490000000,4.2],[1622490600000,4.1],[1622491200000,4],[1622491800000,3.9],[1622492400000,3.8],[1622493000000,3.8],[1622493600000,3.8],[1622494200000,3.9],[1622494800000,4],[1622495400000,4],[1622496000000,3.9],[1622496600000,4],[1622497200000,4],[1622497800000,4],[1622498400000,4.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: [[1622412000000,73.00000000],[1622412600000,73.20000000],[1622413200000,73.40000000],[1622413800000,73.40000000],[1622414400000,73.60000000],[1622415000000,73.60000000],[1622415600000,73.60000000],[1622416200000,73.60000000],[1622416800000,73.80000000],[1622417400000,73.40000000],[1622418000000,73.00000000],[1622418600000,72.80000000],[1622419200000,72.80000000],[1622419800000,73.20000000],[1622420400000,73.20000000],[1622421000000,73.40000000],[1622421600000,73.60000000],[1622422200000,73.60000000],[1622422800000,73.60000000],[1622423400000,74.00000000],[1622424000000,74.60000000],[1622424600000,74.60000000],[1622425200000,74.80000000],[1622425800000,74.80000000],[1622426400000,74.80000000],[1622427000000,74.80000000],[1622427600000,74.60000000],[1622428200000,74.40000000],[1622428800000,74.00000000],[1622429400000,74.20000000],[1622430000000,74.00000000],[1622430600000,74.40000000],[1622431200000,74.40000000],[1622431800000,73.40000000],[1622432400000,71.60000000],[1622433000000,70.20000000],[1622433600000,70.40000000],[1622434200000,70.00000000],[1622434800000,70.00000000],[1622435400000,69.20000000],[1622436000000,69.60000000],[1622436600000,70.00000000],[1622437200000,69.20000000],[1622437800000,69.20000000],[1622438400000,70.00000000],[1622439000000,67.80000000],[1622439600000,65.60000000],[1622440200000,65.40000000],[1622440800000,64.20000000],[1622441400000,64.00000000],[1622442000000,63.20000000],[1622442600000,64.40000000],[1622443200000,64.80000000],[1622443800000,63.80000000],[1622444400000,64.20000000],[1622445000000,65.00000000],[1622445600000,64.60000000],[1622446200000,63.40000000],[1622446800000,63.80000000],[1622447400000,61.40000000],[1622448000000,58.40000000],[1622448600000,57.80000000],[1622449200000,57.00000000],[1622449800000,56.80000000],[1622450400000,57.20000000],[1622451000000,56.20000000],[1622451600000,56.60000000],[1622452200000,58.00000000],[1622452800000,58.20000000],[1622453400000,55.20000000],[1622454000000,55.60000000],[1622454600000,57.00000000],[1622455200000,57.60000000],[1622455800000,57.80000000],[1622456400000,58.80000000],[1622457000000,64.60000000],[1622457600000,67.40000000],[1622458200000,67.60000000],[1622458800000,66.80000000],[1622459400000,62.00000000],[1622460000000,60.40000000],[1622460600000,58.40000000],[1622461200000,55.60000000],[1622461800000,53.60000000],[1622462400000,53.60000000],[1622463000000,51.80000000],[1622463600000,51.40000000],[1622464200000,51.40000000],[1622464800000,50.20000000],[1622465400000,57.20000000],[1622466000000,63.20000000],[1622466600000,64.00000000],[1622467200000,64.00000000],[1622467800000,65.60000000],[1622468400000,66.20000000],[1622469000000,66.20000000],[1622469600000,65.60000000],[1622470200000,65.20000000],[1622470800000,65.00000000],[1622471400000,63.00000000],[1622472000000,57.60000000],[1622472600000,57.00000000],[1622473200000,55.20000000],[1622473800000,54.40000000],[1622474400000,51.20000000],[1622475000000,50.80000000],[1622475600000,49.60000000],[1622476200000,50.40000000],[1622476800000,51.80000000],[1622477400000,53.60000000],[1622478000000,53.40000000],[1622478600000,53.20000000],[1622479200000,53.00000000],[1622479800000,53.20000000],[1622480400000,53.80000000],[1622481000000,55.00000000],[1622481600000,55.60000000],[1622482200000,55.80000000],[1622482800000,56.00000000],[1622483400000,55.00000000],[1622484000000,54.40000000],[1622484600000,55.00000000],[1622485200000,55.60000000],[1622485800000,55.60000000],[1622486400000,56.80000000],[1622487000000,57.40000000],[1622487600000,57.60000000],[1622488200000,57.20000000],[1622488800000,56.80000000],[1622489400000,56.80000000],[1622490000000,56.80000000],[1622490600000,57.00000000],[1622491200000,57.40000000],[1622491800000,58.80000000],[1622492400000,61.60000000],[1622493000000,65.20000000],[1622493600000,67.20000000],[1622494200000,67.60000000],[1622494800000,66.80000000],[1622495400000,67.40000000],[1622496000000,68.80000000],[1622496600000,69.60000000],[1622497200000,69.40000000],[1622497800000,69.40000000],[1622498400000,69.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: [[1622412000000,1021.8],[1622412600000,1021.8],[1622413200000,1021.8],[1622413800000,1021.8],[1622414400000,1021.8],[1622415000000,1021.8],[1622415600000,1021.8],[1622416200000,1021.8],[1622416800000,1021.8],[1622417400000,1021.6],[1622418000000,1021.5],[1622418600000,1021.4],[1622419200000,1021.3],[1622419800000,1021.2],[1622420400000,1021.1],[1622421000000,1021],[1622421600000,1020.9],[1622422200000,1020.9],[1622422800000,1020.9],[1622423400000,1020.9],[1622424000000,1021.1],[1622424600000,1021],[1622425200000,1020.9],[1622425800000,1020.9],[1622426400000,1020.9],[1622427000000,1021],[1622427600000,1020.9],[1622428200000,1020.8],[1622428800000,1020.8],[1622429400000,1020.8],[1622430000000,1020.8],[1622430600000,1020.8],[1622431200000,1020.8],[1622431800000,1020.6],[1622432400000,1020.4],[1622433000000,1020.3],[1622433600000,1020.3],[1622434200000,1020.3],[1622434800000,1020.3],[1622435400000,1020.2],[1622436000000,1020.3],[1622436600000,1020.3],[1622437200000,1020.3],[1622437800000,1020.3],[1622438400000,1020.2],[1622439000000,1019.9],[1622439600000,1019.8],[1622440200000,1019.9],[1622440800000,1019.9],[1622441400000,1019.8],[1622442000000,1019.9],[1622442600000,1020],[1622443200000,1019.9],[1622443800000,1019.9],[1622444400000,1020],[1622445000000,1020],[1622445600000,1019.8],[1622446200000,1019.8],[1622446800000,1019.8],[1622447400000,1019.6],[1622448000000,1019.4],[1622448600000,1019.4],[1622449200000,1019.2],[1622449800000,1019.2],[1622450400000,1019.2],[1622451000000,1019.1],[1622451600000,1019.2],[1622452200000,1019.1],[1622452800000,1018.8],[1622453400000,1018.8],[1622454000000,1018.8],[1622454600000,1018.9],[1622455200000,1019],[1622455800000,1018.9],[1622456400000,1018.9],[1622457000000,1019],[1622457600000,1019],[1622458200000,1018.9],[1622458800000,1018.9],[1622459400000,1018.7],[1622460000000,1018.6],[1622460600000,1018.5],[1622461200000,1018.5],[1622461800000,1018.4],[1622462400000,1018.4],[1622463000000,1018.3],[1622463600000,1018.3],[1622464200000,1018.3],[1622464800000,1018.2],[1622465400000,1018.5],[1622466000000,1018.5],[1622466600000,1018.6],[1622467200000,1018.6],[1622467800000,1018.7],[1622468400000,1018.4],[1622469000000,1018.1],[1622469600000,1018],[1622470200000,1017.8],[1622470800000,1018],[1622471400000,1018.2],[1622472000000,1018.2],[1622472600000,1018.3],[1622473200000,1018.2],[1622473800000,1018.2],[1622474400000,1018.1],[1622475000000,1018],[1622475600000,1018.1],[1622476200000,1018.1],[1622476800000,1018.3],[1622477400000,1018.2],[1622478000000,1018.1],[1622478600000,1018.1],[1622479200000,1018.1],[1622479800000,1018.1],[1622480400000,1018.2],[1622481000000,1018.2],[1622481600000,1018.3],[1622482200000,1018.3],[1622482800000,1018.3],[1622483400000,1018.3],[1622484000000,1018.2],[1622484600000,1018.3],[1622485200000,1018.4],[1622485800000,1018.4],[1622486400000,1018.5],[1622487000000,1018.7],[1622487600000,1018.7],[1622488200000,1018.8],[1622488800000,1018.9],[1622489400000,1019.1],[1622490000000,1019.1],[1622490600000,1019.3],[1622491200000,1019.3],[1622491800000,1019.6],[1622492400000,1019.8],[1622493000000,1020],[1622493600000,1020.2],[1622494200000,1020.2],[1622494800000,1020.1],[1622495400000,1020.2],[1622496000000,1020.4],[1622496600000,1020.4],[1622497200000,1020.4],[1622497800000,1020.4],[1622498400000,1020.2],], 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: [[1622412000000,0.00000000],[1622412600000,0.00000000],[1622413200000,0.00000000],[1622413800000,0.00000000],[1622414400000,0.00000000],[1622415000000,0.00000000],[1622415600000,0.00000000],[1622416200000,0.00000000],[1622416800000,0.00000000],[1622417400000,0.00000000],[1622418000000,0.00000000],[1622418600000,0.00000000],[1622419200000,0.00000000],[1622419800000,0.00000000],[1622420400000,0.00000000],[1622421000000,0.00000000],[1622421600000,0.00000000],[1622422200000,0.00000000],[1622422800000,0.00000000],[1622423400000,0.00000000],[1622424000000,0.00000000],[1622424600000,0.00000000],[1622425200000,0.00000000],[1622425800000,0.00000000],[1622426400000,0.00000000],[1622427000000,0.00000000],[1622427600000,0.00000000],[1622428200000,0.00000000],[1622428800000,0.00000000],[1622429400000,2.00000000],[1622430000000,4.00000000],[1622430600000,8.00000000],[1622431200000,12.00000000],[1622431800000,26.00000000],[1622432400000,44.00000000],[1622433000000,42.00000000],[1622433600000,48.00000000],[1622434200000,68.00000000],[1622434800000,122.00000000],[1622435400000,114.00000000],[1622436000000,110.00000000],[1622436600000,142.00000000],[1622437200000,152.00000000],[1622437800000,180.00000000],[1622438400000,360.00000000],[1622439000000,344.00000000],[1622439600000,350.00000000],[1622440200000,376.00000000],[1622440800000,406.00000000],[1622441400000,488.00000000],[1622442000000,260.00000000],[1622442600000,332.00000000],[1622443200000,490.00000000],[1622443800000,258.00000000],[1622444400000,300.00000000],[1622445000000,458.00000000],[1622445600000,490.00000000],[1622446200000,410.00000000],[1622446800000,522.00000000],[1622447400000,834.00000000],[1622448000000,724.00000000],[1622448600000,866.00000000],[1622449200000,770.00000000],[1622449800000,722.00000000],[1622450400000,720.00000000],[1622451000000,822.00000000],[1622451600000,454.00000000],[1622452200000,470.00000000],[1622452800000,786.00000000],[1622453400000,402.00000000],[1622454000000,304.00000000],[1622454600000,248.00000000],[1622455200000,320.00000000],[1622455800000,352.00000000],[1622456400000,316.00000000],[1622457000000,266.00000000],[1622457600000,336.00000000],[1622458200000,282.00000000],[1622458800000,278.00000000],[1622459400000,328.00000000],[1622460000000,480.00000000],[1622460600000,400.00000000],[1622461200000,378.00000000],[1622461800000,448.00000000],[1622462400000,516.00000000],[1622463000000,548.00000000],[1622463600000,508.00000000],[1622464200000,670.00000000],[1622464800000,978.00000000],[1622465400000,726.00000000],[1622466000000,688.00000000],[1622466600000,724.00000000],[1622467200000,396.00000000],[1622467800000,680.00000000],[1622468400000,714.00000000],[1622469000000,724.00000000],[1622469600000,792.00000000],[1622470200000,532.00000000],[1622470800000,236.00000000],[1622471400000,128.00000000],[1622472000000,172.00000000],[1622472600000,322.00000000],[1622473200000,314.00000000],[1622473800000,500.00000000],[1622474400000,506.00000000],[1622475000000,440.00000000],[1622475600000,482.00000000],[1622476200000,346.00000000],[1622476800000,138.00000000],[1622477400000,148.00000000],[1622478000000,130.00000000],[1622478600000,126.00000000],[1622479200000,148.00000000],[1622479800000,116.00000000],[1622480400000,106.00000000],[1622481000000,74.00000000],[1622481600000,66.00000000],[1622482200000,72.00000000],[1622482800000,50.00000000],[1622483400000,40.00000000],[1622484000000,32.00000000],[1622484600000,24.00000000],[1622485200000,14.00000000],[1622485800000,6.00000000],[1622486400000,2.00000000],[1622487000000,0.00000000],[1622487600000,0.00000000],[1622488200000,0.00000000],[1622488800000,0.00000000],[1622489400000,0.00000000],[1622490000000,0.00000000],[1622490600000,0.00000000],[1622491200000,0.00000000],[1622491800000,0.00000000],[1622492400000,0.00000000],[1622493000000,0.00000000],[1622493600000,0.00000000],[1622494200000,0.00000000],[1622494800000,0.00000000],[1622495400000,0.00000000],[1622496000000,0.00000000],[1622496600000,0.00000000],[1622497200000,0.00000000],[1622497800000,0.00000000],[1622498400000,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; }