var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1624485600000,25.00000000],[1624486200000,24.90000000],[1624486800000,25.00000000],[1624487400000,25.10000000],[1624488000000,25.30000000],[1624488600000,25.40000000],[1624489200000,25.10000000],[1624489800000,24.80000000],[1624490400000,24.80000000],[1624491000000,25.10000000],[1624491600000,25.10000000],[1624492200000,25.10000000],[1624492800000,25.20000000],[1624493400000,25.20000000],[1624494000000,25.20000000],[1624494600000,25.10000000],[1624495200000,25.20000000],[1624495800000,25.30000000],[1624496400000,25.30000000],[1624497000000,25.10000000],[1624497600000,24.70000000],[1624498200000,24.50000000],[1624498800000,24.40000000],[1624499400000,24.40000000],[1624500000000,24.20000000],[1624500600000,24.20000000],[1624501200000,24.30000000],[1624501800000,24.60000000],[1624502400000,24.60000000],[1624503000000,24.60000000],[1624503600000,24.80000000],[1624504200000,24.90000000],[1624504800000,24.90000000],[1624505400000,24.90000000],[1624506000000,25.00000000],[1624506600000,25.10000000],[1624507200000,25.30000000],[1624507800000,25.50000000],[1624508400000,25.70000000],[1624509000000,26.00000000],[1624509600000,26.30000000],[1624510200000,26.50000000],[1624510800000,26.40000000],[1624511400000,26.60000000],[1624512000000,26.70000000],[1624512600000,26.80000000],[1624513200000,26.90000000],[1624513800000,27.00000000],[1624514400000,27.20000000],[1624515000000,27.50000000],[1624515600000,27.80000000],[1624516200000,28.00000000],[1624516800000,27.90000000],[1624517400000,28.00000000],[1624518000000,28.20000000],[1624518600000,28.20000000],[1624519200000,28.30000000],[1624519800000,28.40000000],[1624520400000,28.80000000],[1624521000000,28.90000000],[1624521600000,29.10000000],[1624522200000,29.30000000],[1624522800000,29.30000000],[1624523400000,29.40000000],[1624524000000,30.00000000],[1624524600000,30.20000000],[1624525200000,30.50000000],[1624525800000,30.70000000],[1624526400000,30.60000000],[1624527000000,30.70000000],[1624527600000,30.90000000],[1624528200000,30.90000000],[1624528800000,31.10000000],[1624529400000,31.00000000],[1624530000000,31.20000000],[1624530600000,31.70000000],[1624531200000,31.30000000],[1624531800000,31.50000000],[1624532400000,31.50000000],[1624533000000,31.80000000],[1624533600000,31.60000000],[1624534200000,31.70000000],[1624534800000,31.90000000],[1624535400000,31.80000000],[1624536000000,32.10000000],[1624536600000,32.30000000],[1624537200000,32.50000000],[1624537800000,32.20000000],[1624538400000,32.20000000],[1624539000000,32.10000000],[1624539600000,32.30000000],[1624540200000,31.80000000],[1624540800000,32.00000000],[1624541400000,32.30000000],[1624542000000,32.40000000],[1624542600000,32.60000000],[1624543200000,32.60000000],[1624543800000,32.30000000],[1624544400000,32.10000000],[1624545000000,32.60000000],[1624545600000,33.00000000],[1624546200000,32.70000000],[1624546800000,32.20000000],[1624547400000,32.30000000],[1624548000000,32.70000000],[1624548600000,32.30000000],[1624549200000,32.00000000],[1624549800000,32.00000000],[1624550400000,32.00000000],[1624551000000,31.80000000],[1624551600000,31.20000000],[1624552200000,30.60000000],[1624552800000,30.20000000],[1624553400000,29.80000000],[1624554000000,29.70000000],[1624554600000,29.70000000],[1624555200000,29.50000000],[1624555800000,29.30000000],[1624556400000,29.00000000],[1624557000000,28.90000000],[1624557600000,28.60000000],[1624558200000,28.30000000],[1624558800000,28.10000000],[1624559400000,28.20000000],[1624560000000,28.50000000],[1624560600000,28.60000000],[1624561200000,28.60000000],[1624561800000,28.40000000],[1624562400000,28.20000000],[1624563000000,28.00000000],[1624563600000,27.70000000],[1624564200000,27.50000000],[1624564800000,27.30000000],[1624565400000,27.20000000],[1624566000000,27.30000000],[1624566600000,27.40000000],[1624567200000,27.20000000],[1624567800000,27.10000000],[1624568400000,27.10000000],[1624569000000,27.00000000],[1624569600000,26.90000000],[1624570200000,27.00000000],[1624570800000,26.80000000],[1624571400000,26.70000000],[1624572000000,26.50000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1624485600000,20.2],[1624486200000,20.2],[1624486800000,20.2],[1624487400000,20.2],[1624488000000,20.3],[1624488600000,20.3],[1624489200000,20],[1624489800000,20],[1624490400000,20],[1624491000000,20.2],[1624491600000,20],[1624492200000,20],[1624492800000,19.9],[1624493400000,19.8],[1624494000000,19.7],[1624494600000,19.6],[1624495200000,19.5],[1624495800000,19.2],[1624496400000,19.1],[1624497000000,19],[1624497600000,18.8],[1624498200000,18.8],[1624498800000,18.8],[1624499400000,18.8],[1624500000000,18.6],[1624500600000,18.6],[1624501200000,18.6],[1624501800000,18.8],[1624502400000,18.6],[1624503000000,18.6],[1624503600000,18.7],[1624504200000,18.6],[1624504800000,18.6],[1624505400000,18.6],[1624506000000,18.6],[1624506600000,18.6],[1624507200000,18.8],[1624507800000,19.1],[1624508400000,19.2],[1624509000000,19.5],[1624509600000,19.8],[1624510200000,19.9],[1624510800000,19.7],[1624511400000,19.9],[1624512000000,19.8],[1624512600000,20.1],[1624513200000,20],[1624513800000,20.2],[1624514400000,20.2],[1624515000000,20.5],[1624515600000,20.6],[1624516200000,20.7],[1624516800000,20.3],[1624517400000,20.5],[1624518000000,20.5],[1624518600000,20.5],[1624519200000,20.7],[1624519800000,20.9],[1624520400000,21.4],[1624521000000,21.2],[1624521600000,21.1],[1624522200000,21.2],[1624522800000,21],[1624523400000,20.9],[1624524000000,21],[1624524600000,21.4],[1624525200000,21.1],[1624525800000,20.8],[1624526400000,20.4],[1624527000000,20.5],[1624527600000,20.6],[1624528200000,20.5],[1624528800000,20.4],[1624529400000,20.2],[1624530000000,20.6],[1624530600000,20.5],[1624531200000,19.9],[1624531800000,20.7],[1624532400000,20.6],[1624533000000,20.7],[1624533600000,20.5],[1624534200000,20.6],[1624534800000,20.7],[1624535400000,20.6],[1624536000000,20.9],[1624536600000,21],[1624537200000,21.4],[1624537800000,20.9],[1624538400000,20.9],[1624539000000,20.7],[1624539600000,20.8],[1624540200000,20.6],[1624540800000,21.1],[1624541400000,21],[1624542000000,20.8],[1624542600000,20.9],[1624543200000,20.7],[1624543800000,20.7],[1624544400000,20.5],[1624545000000,21.1],[1624545600000,20.8],[1624546200000,20.2],[1624546800000,20.1],[1624547400000,20.8],[1624548000000,21.4],[1624548600000,20.8],[1624549200000,20.7],[1624549800000,20.9],[1624550400000,21.7],[1624551000000,21.9],[1624551600000,22.3],[1624552200000,22.3],[1624552800000,22.1],[1624553400000,21.3],[1624554000000,20.8],[1624554600000,20.6],[1624555200000,20.3],[1624555800000,20.1],[1624556400000,20.1],[1624557000000,20.3],[1624557600000,20.2],[1624558200000,19.8],[1624558800000,19.3],[1624559400000,18.5],[1624560000000,18.1],[1624560600000,17.7],[1624561200000,17.5],[1624561800000,17.5],[1624562400000,17.4],[1624563000000,17.5],[1624563600000,17.4],[1624564200000,17.5],[1624564800000,17.5],[1624565400000,17.5],[1624566000000,17.6],[1624566600000,17.6],[1624567200000,17.5],[1624567800000,17.7],[1624568400000,17.7],[1624569000000,17.7],[1624569600000,17.8],[1624570200000,18],[1624570800000,17.9],[1624571400000,17.9],[1624572000000,17.8],], 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: [[1624485600000,75.00000000],[1624486200000,75.20000000],[1624486800000,74.80000000],[1624487400000,74.40000000],[1624488000000,73.80000000],[1624488600000,73.40000000],[1624489200000,73.60000000],[1624489800000,74.60000000],[1624490400000,74.80000000],[1624491000000,74.20000000],[1624491600000,73.60000000],[1624492200000,73.40000000],[1624492800000,72.60000000],[1624493400000,72.20000000],[1624494000000,71.60000000],[1624494600000,71.60000000],[1624495200000,70.60000000],[1624495800000,69.20000000],[1624496400000,68.80000000],[1624497000000,69.00000000],[1624497600000,70.00000000],[1624498200000,70.80000000],[1624498800000,71.00000000],[1624499400000,71.00000000],[1624500000000,71.00000000],[1624500600000,71.00000000],[1624501200000,70.80000000],[1624501800000,70.00000000],[1624502400000,69.40000000],[1624503000000,69.20000000],[1624503600000,68.80000000],[1624504200000,68.00000000],[1624504800000,68.00000000],[1624505400000,68.00000000],[1624506000000,67.80000000],[1624506600000,67.40000000],[1624507200000,67.40000000],[1624507800000,67.60000000],[1624508400000,67.40000000],[1624509000000,67.60000000],[1624509600000,67.40000000],[1624510200000,67.20000000],[1624510800000,66.80000000],[1624511400000,66.60000000],[1624512000000,66.00000000],[1624512600000,66.80000000],[1624513200000,66.00000000],[1624513800000,66.20000000],[1624514400000,65.80000000],[1624515000000,65.60000000],[1624515600000,64.80000000],[1624516200000,64.40000000],[1624516800000,63.20000000],[1624517400000,63.80000000],[1624518000000,63.20000000],[1624518600000,63.00000000],[1624519200000,63.60000000],[1624519800000,63.80000000],[1624520400000,64.20000000],[1624521000000,63.20000000],[1624521600000,62.00000000],[1624522200000,61.80000000],[1624522800000,60.80000000],[1624523400000,60.20000000],[1624524000000,58.60000000],[1624524600000,59.20000000],[1624525200000,57.20000000],[1624525800000,55.40000000],[1624526400000,54.60000000],[1624527000000,54.60000000],[1624527600000,54.20000000],[1624528200000,53.80000000],[1624528800000,53.00000000],[1624529400000,52.60000000],[1624530000000,53.20000000],[1624530600000,51.40000000],[1624531200000,50.80000000],[1624531800000,52.60000000],[1624532400000,52.40000000],[1624533000000,51.80000000],[1624533600000,51.60000000],[1624534200000,51.80000000],[1624534800000,51.60000000],[1624535400000,51.40000000],[1624536000000,51.60000000],[1624536600000,51.40000000],[1624537200000,51.80000000],[1624537800000,51.20000000],[1624538400000,51.20000000],[1624539000000,51.00000000],[1624539600000,50.60000000],[1624540200000,51.40000000],[1624540800000,52.40000000],[1624541400000,51.20000000],[1624542000000,50.40000000],[1624542600000,50.00000000],[1624543200000,49.60000000],[1624543800000,50.20000000],[1624544400000,50.40000000],[1624545000000,50.60000000],[1624545600000,48.80000000],[1624546200000,47.60000000],[1624546800000,48.80000000],[1624547400000,50.60000000],[1624548000000,51.40000000],[1624548600000,50.80000000],[1624549200000,51.20000000],[1624549800000,51.80000000],[1624550400000,54.40000000],[1624551000000,55.60000000],[1624551600000,59.00000000],[1624552200000,61.40000000],[1624552800000,62.00000000],[1624553400000,60.20000000],[1624554000000,59.00000000],[1624554600000,58.20000000],[1624555200000,57.80000000],[1624555800000,57.80000000],[1624556400000,58.80000000],[1624557000000,59.60000000],[1624557600000,60.40000000],[1624558200000,60.00000000],[1624558800000,58.80000000],[1624559400000,55.60000000],[1624560000000,53.20000000],[1624560600000,51.80000000],[1624561200000,51.20000000],[1624561800000,51.60000000],[1624562400000,52.00000000],[1624563000000,52.80000000],[1624563600000,53.60000000],[1624564200000,54.40000000],[1624564800000,55.00000000],[1624565400000,55.40000000],[1624566000000,55.60000000],[1624566600000,55.20000000],[1624567200000,55.60000000],[1624567800000,56.40000000],[1624568400000,56.60000000],[1624569000000,56.80000000],[1624569600000,57.60000000],[1624570200000,57.80000000],[1624570800000,58.20000000],[1624571400000,58.60000000],[1624572000000,59.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: [[1624485600000,1017.1],[1624486200000,1017.1],[1624486800000,1017],[1624487400000,1016.9],[1624488000000,1016.9],[1624488600000,1016.9],[1624489200000,1017.1],[1624489800000,1017.2],[1624490400000,1017.4],[1624491000000,1017.3],[1624491600000,1017.2],[1624492200000,1017.3],[1624492800000,1017.2],[1624493400000,1017.1],[1624494000000,1016.9],[1624494600000,1016.8],[1624495200000,1016.8],[1624495800000,1016.8],[1624496400000,1016.8],[1624497000000,1017],[1624497600000,1017.1],[1624498200000,1017.1],[1624498800000,1017.2],[1624499400000,1017.2],[1624500000000,1017.3],[1624500600000,1017.3],[1624501200000,1017.2],[1624501800000,1017.1],[1624502400000,1017.1],[1624503000000,1017.2],[1624503600000,1017.2],[1624504200000,1017],[1624504800000,1017.1],[1624505400000,1017.2],[1624506000000,1017.2],[1624506600000,1017.2],[1624507200000,1017.2],[1624507800000,1017.2],[1624508400000,1017.1],[1624509000000,1017],[1624509600000,1017],[1624510200000,1016.8],[1624510800000,1016.9],[1624511400000,1016.8],[1624512000000,1016.7],[1624512600000,1016.7],[1624513200000,1016.7],[1624513800000,1016.7],[1624514400000,1016.6],[1624515000000,1016.6],[1624515600000,1016.7],[1624516200000,1016.7],[1624516800000,1016.6],[1624517400000,1016.5],[1624518000000,1016.4],[1624518600000,1016.4],[1624519200000,1016.4],[1624519800000,1016.3],[1624520400000,1016.2],[1624521000000,1016.2],[1624521600000,1016.2],[1624522200000,1016.2],[1624522800000,1016.1],[1624523400000,1016.1],[1624524000000,1016],[1624524600000,1016],[1624525200000,1015.9],[1624525800000,1015.8],[1624526400000,1015.8],[1624527000000,1015.8],[1624527600000,1015.8],[1624528200000,1015.7],[1624528800000,1015.6],[1624529400000,1015.6],[1624530000000,1015.5],[1624530600000,1015.3],[1624531200000,1015.3],[1624531800000,1015.2],[1624532400000,1015.2],[1624533000000,1015],[1624533600000,1015],[1624534200000,1015],[1624534800000,1014.9],[1624535400000,1015],[1624536000000,1014.9],[1624536600000,1014.7],[1624537200000,1014.6],[1624537800000,1014.6],[1624538400000,1014.5],[1624539000000,1014.5],[1624539600000,1014.4],[1624540200000,1014.4],[1624540800000,1014.2],[1624541400000,1014.1],[1624542000000,1013.9],[1624542600000,1013.7],[1624543200000,1013.6],[1624543800000,1013.6],[1624544400000,1013.7],[1624545000000,1013.5],[1624545600000,1013.4],[1624546200000,1013.4],[1624546800000,1013.4],[1624547400000,1013.2],[1624548000000,1012.9],[1624548600000,1012.8],[1624549200000,1012.7],[1624549800000,1012.6],[1624550400000,1012.5],[1624551000000,1012.2],[1624551600000,1012.1],[1624552200000,1012.1],[1624552800000,1012.2],[1624553400000,1012.3],[1624554000000,1012.3],[1624554600000,1012.3],[1624555200000,1012.2],[1624555800000,1012.1],[1624556400000,1012],[1624557000000,1011.8],[1624557600000,1011.8],[1624558200000,1011.9],[1624558800000,1012.1],[1624559400000,1012.1],[1624560000000,1012.1],[1624560600000,1012.3],[1624561200000,1012.4],[1624561800000,1012.6],[1624562400000,1012.7],[1624563000000,1012.6],[1624563600000,1012.6],[1624564200000,1012.7],[1624564800000,1012.9],[1624565400000,1012.9],[1624566000000,1012.9],[1624566600000,1012.7],[1624567200000,1012.7],[1624567800000,1012.7],[1624568400000,1012.7],[1624569000000,1012.8],[1624569600000,1013.1],[1624570200000,1013.2],[1624570800000,1013.1],[1624571400000,1013.2],[1624572000000,1013.1],], 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: [[1624485600000,0.00000000],[1624486200000,0.00000000],[1624486800000,0.00000000],[1624487400000,0.00000000],[1624488000000,0.00000000],[1624488600000,0.00000000],[1624489200000,0.00000000],[1624489800000,0.00000000],[1624490400000,0.00000000],[1624491000000,0.00000000],[1624491600000,0.00000000],[1624492200000,0.00000000],[1624492800000,0.00000000],[1624493400000,0.00000000],[1624494000000,0.00000000],[1624494600000,0.00000000],[1624495200000,0.00000000],[1624495800000,0.00000000],[1624496400000,0.00000000],[1624497000000,0.00000000],[1624497600000,0.00000000],[1624498200000,0.00000000],[1624498800000,0.00000000],[1624499400000,0.00000000],[1624500000000,0.00000000],[1624500600000,0.00000000],[1624501200000,0.00000000],[1624501800000,0.00000000],[1624502400000,0.00000000],[1624503000000,2.00000000],[1624503600000,4.00000000],[1624504200000,10.00000000],[1624504800000,16.00000000],[1624505400000,26.00000000],[1624506000000,38.00000000],[1624506600000,50.00000000],[1624507200000,64.00000000],[1624507800000,82.00000000],[1624508400000,100.00000000],[1624509000000,122.00000000],[1624509600000,144.00000000],[1624510200000,166.00000000],[1624510800000,190.00000000],[1624511400000,214.00000000],[1624512000000,236.00000000],[1624512600000,264.00000000],[1624513200000,292.00000000],[1624513800000,320.00000000],[1624514400000,346.00000000],[1624515000000,374.00000000],[1624515600000,400.00000000],[1624516200000,428.00000000],[1624516800000,458.00000000],[1624517400000,486.00000000],[1624518000000,508.00000000],[1624518600000,534.00000000],[1624519200000,560.00000000],[1624519800000,584.00000000],[1624520400000,608.00000000],[1624521000000,632.00000000],[1624521600000,656.00000000],[1624522200000,680.00000000],[1624522800000,700.00000000],[1624523400000,718.00000000],[1624524000000,734.00000000],[1624524600000,752.00000000],[1624525200000,770.00000000],[1624525800000,784.00000000],[1624526400000,798.00000000],[1624527000000,810.00000000],[1624527600000,822.00000000],[1624528200000,832.00000000],[1624528800000,844.00000000],[1624529400000,850.00000000],[1624530000000,858.00000000],[1624530600000,862.00000000],[1624531200000,864.00000000],[1624531800000,862.00000000],[1624532400000,862.00000000],[1624533000000,862.00000000],[1624533600000,858.00000000],[1624534200000,860.00000000],[1624534800000,858.00000000],[1624535400000,846.00000000],[1624536000000,842.00000000],[1624536600000,844.00000000],[1624537200000,850.00000000],[1624537800000,812.00000000],[1624538400000,792.00000000],[1624539000000,790.00000000],[1624539600000,680.00000000],[1624540200000,634.00000000],[1624540800000,750.00000000],[1624541400000,738.00000000],[1624542000000,684.00000000],[1624542600000,704.00000000],[1624543200000,596.00000000],[1624543800000,488.00000000],[1624544400000,448.00000000],[1624545000000,580.00000000],[1624545600000,534.00000000],[1624546200000,290.00000000],[1624546800000,258.00000000],[1624547400000,460.00000000],[1624548000000,356.00000000],[1624548600000,282.00000000],[1624549200000,282.00000000],[1624549800000,258.00000000],[1624550400000,188.00000000],[1624551000000,148.00000000],[1624551600000,148.00000000],[1624552200000,136.00000000],[1624552800000,104.00000000],[1624553400000,88.00000000],[1624554000000,92.00000000],[1624554600000,80.00000000],[1624555200000,60.00000000],[1624555800000,46.00000000],[1624556400000,42.00000000],[1624557000000,40.00000000],[1624557600000,38.00000000],[1624558200000,28.00000000],[1624558800000,18.00000000],[1624559400000,10.00000000],[1624560000000,4.00000000],[1624560600000,2.00000000],[1624561200000,0.00000000],[1624561800000,0.00000000],[1624562400000,0.00000000],[1624563000000,0.00000000],[1624563600000,0.00000000],[1624564200000,0.00000000],[1624564800000,0.00000000],[1624565400000,0.00000000],[1624566000000,0.00000000],[1624566600000,0.00000000],[1624567200000,0.00000000],[1624567800000,0.00000000],[1624568400000,0.00000000],[1624569000000,0.00000000],[1624569600000,0.00000000],[1624570200000,0.00000000],[1624570800000,0.00000000],[1624571400000,0.00000000],[1624572000000,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; }