diff --git a/examples/python/bufr_encode_flight.py b/examples/python/bufr_encode_flight.py index b24b850fd..7fbd41531 100644 --- a/examples/python/bufr_encode_flight.py +++ b/examples/python/bufr_encode_flight.py @@ -65,19 +65,19 @@ def example(csvfile, input_filename, output_filename): codes_set(bufr,'BufrTemplate','aircraftReportWithSecondsAndPressure'); - codes_set_double_array(bufr, 'year', years) - codes_set_double_array(bufr, 'month', months) - codes_set_double_array(bufr, 'day', days) - codes_set_double_array(bufr, 'hour', hours) - codes_set_double_array(bufr, 'minute', minutes) - codes_set_double_array(bufr, 'second', seconds) - codes_set_double_array(bufr, 'latitude', latitudes) - codes_set_double_array(bufr, 'longitude', longitudes) - codes_set_double_array(bufr, 'height', altitudes) - codes_set_double_array(bufr, 'pressure', pressures) - codes_set_double_array(bufr, 'windSpeed', windSpeeds) - codes_set_double_array(bufr, 'windDirection', windDirections) - codes_set_double_array(bufr, 'airTemperature', temperatures) + codes_set_array(bufr, 'year', years) + codes_set_array(bufr, 'month', months) + codes_set_array(bufr, 'day', days) + codes_set_array(bufr, 'hour', hours) + codes_set_array(bufr, 'minute', minutes) + codes_set_array(bufr, 'second', seconds) + codes_set_array(bufr, 'latitude', latitudes) + codes_set_array(bufr, 'longitude', longitudes) + codes_set_array(bufr, 'height', altitudes) + codes_set_array(bufr, 'pressure', pressures) + codes_set_array(bufr, 'windSpeed', windSpeeds) + codes_set_array(bufr, 'windDirection', windDirections) + codes_set_array(bufr, 'airTemperature', temperatures) codes_set(bufr, 'pack', 1) diff --git a/examples/python/flight_data.csv b/examples/python/flight_data.csv index 85d0d10e8..0666c39cc 100644 --- a/examples/python/flight_data.csv +++ b/examples/python/flight_data.csv @@ -1,186 +1,186 @@ ymd,time,latitude,longitude,altitude,pressure,windSpeed,windDirection,temperature -20150101,05:30:00,51.75794 ,1.7008 ,2362,759.32 ,19.28 ,81.95 ,14.18 -20150101,05:30:01,51.75738 ,1.7014 ,2369,758.64 ,19.71 ,81.24 ,14.17 -20150101,05:30:02,51.75681 ,1.7020 ,2375,758.16 ,19.80 ,80.82 ,14.15 -20150101,05:30:03,51.75624 ,1.7026 ,2382,757.66 ,19.84 ,80.84 ,14.13 -20150101,05:30:04,51.75567 ,1.7031 ,2388,757.08 ,19.77 ,80.71 ,14.08 -20150101,05:30:05,51.75511 ,1.7037 ,2395,756.60 ,19.79 ,80.55 ,14.08 -20150101,05:30:06,51.75454 ,1.7043 ,2401,755.96 ,19.70 ,80.24 ,14.11 -20150101,05:30:07,51.75398 ,1.7049 ,2406,755.26 ,19.77 ,80.21 ,14.08 -20150101,05:33:41,51.61353 ,1.8529 ,2558,742.34 ,19.66 ,82.84 ,13.74 -20150101,05:33:42,51.61281 ,1.8536 ,2558,742.30 ,19.54 ,82.59 ,13.76 -20150101,05:33:43,51.61209 ,1.8543 ,2557,742.34 ,19.47 ,82.56 ,13.77 -20150101,05:33:44,51.61137 ,1.8551 ,2557,742.42 ,19.61 ,82.47 ,13.78 -20150101,05:33:45,51.61065 ,1.8558 ,2557,742.40 ,19.55 ,82.83 ,13.75 -20150101,05:33:46,51.60994 ,1.8565 ,2557,742.34 ,19.72 ,82.40 ,13.75 -20150101,05:33:47,51.60922 ,1.8573 ,2557,742.42 ,19.70 ,82.86 ,13.74 -20150101,05:33:48,51.60851 ,1.8580 ,2558,742.42 ,19.72 ,83.18 ,13.74 -20150101,05:33:49,51.60779 ,1.8588 ,2558,742.36 ,19.87 ,83.18 ,13.76 -20150101,05:33:50,51.60707 ,1.8595 ,2558,742.24 ,19.87 ,82.71 ,13.76 -20150101,05:33:51,51.60635 ,1.8602 ,2558,742.20 ,19.89 ,82.98 ,13.76 -20150101,05:33:52,51.60564 ,1.8609 ,2558,742.26 ,19.74 ,82.40 ,13.79 -20150101,05:33:53,51.60492 ,1.8617 ,2558,742.22 ,19.71 ,82.27 ,13.80 -20150101,05:33:54,51.60420 ,1.8624 ,2558,742.20 ,19.51 ,82.61 ,13.84 -20150101,05:33:55,51.60349 ,1.8631 ,2557,742.44 ,19.85 ,81.95 ,13.82 -20150101,05:33:56,51.60277 ,1.8639 ,2556,742.32 ,19.61 ,82.23 ,13.78 -20150101,05:33:57,51.60205 ,1.8646 ,2555,742.54 ,19.57 ,81.95 ,13.81 -20150101,05:35:59,51.51433 ,1.9565 ,2553,742.30 ,18.21 ,81.25 ,14.45 -20150101,05:36:00,51.51360 ,1.9572 ,2553,742.34 ,18.42 ,80.25 ,14.45 -20150101,05:36:01,51.51288 ,1.9580 ,2553,742.40 ,18.38 ,79.72 ,14.43 -20150101,05:36:02,51.51215 ,1.9588 ,2552,742.42 ,18.34 ,79.76 ,14.37 -20150101,05:36:03,51.51142 ,1.9595 ,2552,742.48 ,18.38 ,80.23 ,14.34 -20150101,05:36:04,51.51070 ,1.9603 ,2552,742.58 ,18.39 ,80.07 ,14.35 -20150101,05:36:05,51.50997 ,1.9610 ,2551,742.42 ,18.29 ,80.05 ,14.35 -20150101,05:36:06,51.50924 ,1.9618 ,2551,742.68 ,18.22 ,80.20 ,14.35 -20150101,05:36:07,51.50852 ,1.9625 ,2551,742.54 ,18.21 ,80.20 ,14.35 -20150101,05:36:08,51.50779 ,1.9633 ,2551,742.38 ,18.17 ,80.11 ,14.30 -20150101,05:36:09,51.50706 ,1.9641 ,2551,742.60 ,18.20 ,80.35 ,14.27 -20150101,05:36:10,51.50634 ,1.9648 ,2551,742.48 ,18.05 ,80.69 ,14.27 -20150101,05:36:11,51.50561 ,1.9656 ,2551,742.58 ,18.03 ,80.87 ,14.27 -20150101,05:36:12,51.50489 ,1.9664 ,2552,742.48 ,18.29 ,81.89 ,14.25 -20150101,05:36:13,51.50416 ,1.9671 ,2552,742.52 ,18.14 ,82.59 ,14.31 -20150101,05:36:14,51.50343 ,1.9679 ,2553,742.34 ,18.23 ,83.10 ,14.35 -20150101,05:36:15,51.50271 ,1.9686 ,2553,742.28 ,18.56 ,84.18 ,14.31 -20150101,05:36:16,51.50198 ,1.9694 ,2554,742.30 ,18.55 ,84.49 ,14.33 -20150101,05:36:17,51.50126 ,1.9702 ,2554,742.24 ,18.72 ,84.70 ,14.37 -20150101,05:36:18,51.50054 ,1.9709 ,2554,742.30 ,18.74 ,85.26 ,14.36 -20150101,05:36:19,51.49981 ,1.9717 ,2554,742.12 ,18.80 ,85.39 ,14.37 -20150101,05:36:20,51.49909 ,1.9724 ,2555,742.24 ,18.99 ,85.95 ,14.34 -20150101,05:36:21,51.49837 ,1.9732 ,2555,742.24 ,19.02 ,86.23 ,14.32 -20150101,05:36:22,51.49765 ,1.9739 ,2555,742.12 ,19.06 ,86.45 ,14.31 -20150101,05:36:23,51.49693 ,1.9747 ,2554,742.16 ,19.12 ,86.76 ,14.28 -20150101,05:36:24,51.49621 ,1.9754 ,2554,742.26 ,18.87 ,86.29 ,14.30 -20150101,05:36:25,51.49549 ,1.9762 ,2554,742.26 ,19.11 ,85.92 ,14.26 -20150101,05:36:26,51.49476 ,1.9769 ,2553,742.20 ,19.03 ,86.29 ,14.22 -20150101,05:36:27,51.49405 ,1.9777 ,2553,742.34 ,19.18 ,86.32 ,14.20 -20150101,05:36:28,51.49333 ,1.9784 ,2553,742.24 ,19.24 ,86.36 ,14.17 -20150101,05:36:29,51.49260 ,1.9792 ,2553,742.32 ,19.29 ,85.54 ,14.20 -20150101,05:36:30,51.49189 ,1.9799 ,2553,742.34 ,19.36 ,85.71 ,14.20 -20150101,05:36:31,51.49117 ,1.9807 ,2554,742.38 ,19.39 ,85.95 ,14.19 -20150101,05:36:32,51.49045 ,1.9814 ,2554,742.32 ,19.55 ,86.33 ,14.20 -20150101,05:36:33,51.48973 ,1.9822 ,2554,742.22 ,19.52 ,85.98 ,14.21 -20150101,05:36:34,51.48902 ,1.9829 ,2554,742.36 ,19.51 ,85.53 ,14.23 -20150101,05:36:35,51.48830 ,1.9837 ,2554,742.20 ,19.34 ,85.73 ,14.26 -20150101,05:36:36,51.48759 ,1.9844 ,2554,742.00 ,19.37 ,85.62 ,14.26 -20150101,05:36:37,51.48688 ,1.9852 ,2554,742.24 ,19.40 ,85.86 ,14.27 -20150101,05:36:38,51.48616 ,1.9859 ,2554,742.22 ,19.63 ,86.06 ,14.28 -20150101,05:36:39,51.48545 ,1.9867 ,2553,742.26 ,19.95 ,85.89 ,14.27 -20150101,05:36:40,51.48474 ,1.9874 ,2553,742.16 ,19.81 ,86.01 ,14.22 -20150101,05:36:41,51.48403 ,1.9881 ,2553,742.34 ,19.32 ,87.45 ,14.22 -20150101,05:36:42,51.48333 ,1.9889 ,2552,742.10 ,20.22 ,90.31 ,14.11 -20150101,05:36:43,51.48262 ,1.9896 ,2552,742.50 ,19.74 ,89.33 ,14.24 -20150101,05:36:44,51.48191 ,1.9904 ,2552,742.66 ,18.69 ,87.18 ,14.46 -20150101,05:36:45,51.48121 ,1.9911 ,2552,742.38 ,19.41 ,89.47 ,14.41 -20150101,05:36:46,51.48050 ,1.9919 ,2551,742.40 ,19.71 ,86.92 ,14.45 -20150101,05:36:47,51.47980 ,1.9926 ,2551,742.48 ,18.47 ,86.49 ,14.40 -20150101,05:36:48,51.47910 ,1.9933 ,2551,742.18 ,17.70 ,85.66 ,14.39 -20150101,05:36:49,51.47840 ,1.9941 ,2551,742.58 ,17.84 ,89.68 ,14.39 -20150101,05:36:50,51.47770 ,1.9948 ,2551,742.38 ,19.76 ,83.78 ,14.57 -20150101,05:36:51,51.47700 ,1.9955 ,2551,742.24 ,18.98 ,83.07 ,14.39 -20150101,05:36:52,51.47630 ,1.9963 ,2551,742.34 ,20.36 ,86.14 ,14.28 -20150101,05:36:53,51.47560 ,1.9970 ,2552,742.08 ,20.66 ,84.28 ,14.20 -20150101,05:36:54,51.47490 ,1.9978 ,2553,742.58 ,20.01 ,82.04 ,14.27 -20150101,05:36:55,51.47420 ,1.9985 ,2553,742.04 ,20.43 ,80.02 ,14.13 -20150101,05:36:56,51.47350 ,1.9992 ,2554,742.10 ,18.79 ,80.63 ,14.16 -20150101,05:36:57,51.47280 ,2.0000 ,2555,741.98 ,17.62 ,82.50 ,14.08 -20150101,05:36:58,51.47209 ,2.0007 ,2556,742.06 ,17.42 ,81.05 ,14.06 -20150101,05:36:59,51.47139 ,2.0014 ,2557,742.16 ,16.87 ,83.43 ,13.97 -20150101,05:37:00,51.47069 ,2.0022 ,2558,741.94 ,19.95 ,81.32 ,13.80 -20150101,05:37:01,51.46999 ,2.0029 ,2557,741.52 ,19.05 ,90.09 ,13.45 -20150101,05:37:02,51.46928 ,2.0036 ,2557,741.96 ,18.63 ,89.85 ,13.40 -20150101,05:37:03,51.46858 ,2.0044 ,2556,741.94 ,18.00 ,90.13 ,13.29 -20150101,05:37:04,51.46787 ,2.0051 ,2556,742.08 ,18.69 ,90.18 ,13.13 -20150101,05:37:05,51.46717 ,2.0058 ,2555,742.12 ,19.07 ,88.68 ,13.15 -20150101,05:37:06,51.46647 ,2.0066 ,2555,742.34 ,18.67 ,88.31 ,13.07 -20150101,05:37:07,51.46577 ,2.0073 ,2555,742.38 ,18.84 ,88.24 ,13.04 -20150101,05:37:08,51.46506 ,2.0080 ,2554,742.42 ,18.82 ,88.60 ,13.03 -20150101,05:37:09,51.46437 ,2.0088 ,2554,742.36 ,19.10 ,88.56 ,12.99 -20150101,05:37:10,51.46366 ,2.0095 ,2553,742.40 ,19.04 ,88.77 ,12.93 -20150101,05:37:11,51.46296 ,2.0102 ,2553,742.46 ,18.96 ,89.76 ,12.90 -20150101,05:37:12,51.46226 ,2.0110 ,2552,742.48 ,19.03 ,89.55 ,12.94 -20150101,05:37:13,51.46156 ,2.0117 ,2552,742.40 ,18.97 ,89.18 ,12.89 -20150101,05:37:14,51.46087 ,2.0124 ,2552,742.54 ,19.12 ,89.01 ,12.88 -20150101,05:37:15,51.46017 ,2.0132 ,2552,742.48 ,19.18 ,89.28 ,12.95 -20150101,05:37:16,51.45947 ,2.0139 ,2552,742.70 ,19.05 ,88.65 ,13.01 -20150101,05:37:17,51.45878 ,2.0146 ,2552,742.40 ,19.49 ,88.38 ,13.04 -20150101,05:37:18,51.45808 ,2.0154 ,2552,742.50 ,19.64 ,88.37 ,13.06 -20150101,05:37:19,51.45739 ,2.0161 ,2552,742.30 ,19.56 ,87.36 ,13.11 -20150101,05:37:20,51.45670 ,2.0168 ,2551,742.48 ,19.67 ,88.22 ,13.12 -20150101,05:37:21,51.45600 ,2.0175 ,2551,742.42 ,19.66 ,87.64 ,13.14 -20150101,05:37:22,51.45531 ,2.0183 ,2551,742.42 ,19.82 ,86.73 ,13.19 -20150101,05:37:23,51.45462 ,2.0190 ,2551,742.66 ,19.97 ,86.84 ,13.24 -20150101,05:37:24,51.45393 ,2.0197 ,2550,742.72 ,19.14 ,88.26 ,13.24 -20150101,05:37:25,51.45324 ,2.0204 ,2550,742.68 ,19.32 ,87.69 ,13.28 -20150101,05:37:26,51.45255 ,2.0212 ,2549,742.70 ,19.29 ,87.74 ,13.27 -20150101,05:37:27,51.45186 ,2.0219 ,2549,742.58 ,19.31 ,87.45 ,13.34 -20150101,05:37:28,51.45117 ,2.0226 ,2549,742.48 ,19.05 ,87.32 ,13.34 -20150101,05:37:29,51.45048 ,2.0233 ,2548,742.54 ,19.06 ,86.75 ,13.36 -20150101,05:37:30,51.44980 ,2.0241 ,2548,742.72 ,18.84 ,86.56 ,13.36 -20150101,05:37:31,51.44911 ,2.0248 ,2548,742.56 ,19.01 ,86.95 ,13.35 -20150101,05:37:32,51.44856 ,2.0254 ,2548,742.58 ,19.09 ,86.76 ,13.42 -20150101,05:37:33,51.44774 ,2.0262 ,2549,742.48 ,19.02 ,86.02 ,13.46 -20150101,05:37:34,51.44719 ,2.0268 ,2549,742.40 ,18.97 ,86.71 ,13.46 -20150101,05:37:35,51.44637 ,2.0277 ,2549,742.52 ,19.03 ,86.81 ,13.50 -20150101,05:37:36,51.44582 ,2.0282 ,2549,742.46 ,19.08 ,87.69 ,13.52 -20150101,05:37:37,51.44500 ,2.0291 ,2549,742.60 ,18.94 ,87.25 ,13.57 -20150101,05:37:38,51.44446 ,2.0297 ,2549,742.60 ,18.89 ,87.57 ,13.60 -20150101,05:37:39,51.44377 ,2.0304 ,2549,742.66 ,18.89 ,88.48 ,13.57 -20150101,05:37:40,51.44295 ,2.0312 ,2549,742.50 ,18.79 ,88.90 ,13.65 -20150101,05:37:41,51.44241 ,2.0318 ,2549,742.40 ,19.04 ,88.92 ,13.67 -20150101,05:37:42,51.44173 ,2.0325 ,2550,742.44 ,18.96 ,89.12 ,13.71 -20150101,05:37:43,51.44105 ,2.0332 ,2550,742.34 ,19.05 ,88.92 ,13.75 -20150101,05:37:44,51.44037 ,2.0340 ,2550,742.44 ,19.15 ,90.00 ,13.70 -20150101,05:37:45,51.43969 ,2.0347 ,2550,742.44 ,18.94 ,89.15 ,13.78 -20150101,05:37:46,51.43901 ,2.0354 ,2551,742.40 ,19.10 ,90.27 ,13.74 -20150101,05:37:47,51.43833 ,2.0361 ,2552,742.34 ,19.45 ,90.77 ,13.74 -20150101,05:37:48,51.43752 ,2.0369 ,2552,742.32 ,19.65 ,90.73 ,13.77 -20150101,05:37:49,51.43698 ,2.0375 ,2553,742.22 ,19.68 ,90.82 ,13.79 -20150101,05:37:50,51.43617 ,2.0383 ,2553,742.20 ,19.57 ,91.64 ,13.81 -20150101,05:37:51,51.43563 ,2.0389 ,2554,742.14 ,19.45 ,91.21 ,13.87 -20150101,05:37:52,51.43482 ,2.0398 ,2554,742.12 ,19.60 ,90.35 ,13.88 -20150101,05:37:53,51.43428 ,2.0403 ,2554,742.10 ,18.98 ,90.66 ,13.90 -20150101,05:37:54,51.43347 ,2.0412 ,2554,742.18 ,18.95 ,89.06 ,13.93 -20150101,05:37:55,51.43293 ,2.0417 ,2554,742.16 ,18.98 ,87.92 ,13.93 -20150101,05:37:56,51.43227 ,2.0424 ,2554,742.24 ,19.15 ,88.50 ,13.89 -20150101,05:37:57,51.43159 ,2.0431 ,2554,742.20 ,18.86 ,88.21 ,13.91 -20150101,05:37:58,51.43092 ,2.0438 ,2554,742.06 ,18.80 ,88.54 ,13.89 -20150101,05:37:59,51.43025 ,2.0445 ,2554,742.10 ,18.98 ,89.64 ,13.89 -20150101,05:38:00,51.42945 ,2.0454 ,2554,742.16 ,18.91 ,89.70 ,13.92 -20150101,05:38:01,51.42891 ,2.0459 ,2555,742.14 ,18.91 ,89.12 ,13.91 -20150101,05:38:02,51.42824 ,2.0466 ,2555,742.12 ,18.82 ,89.36 ,13.94 -20150101,05:38:03,51.42758 ,2.0473 ,2555,742.02 ,18.56 ,89.75 ,13.93 -20150101,05:38:04,51.42691 ,2.0480 ,2555,741.92 ,18.64 ,89.48 ,13.93 -20150101,05:38:05,51.42624 ,2.0487 ,2556,742.12 ,18.72 ,89.02 ,13.94 -20150101,05:38:06,51.42557 ,2.0494 ,2556,741.94 ,18.61 ,89.20 ,13.93 -20150101,05:38:07,51.42490 ,2.0501 ,2556,741.98 ,18.80 ,89.66 ,13.95 -20150101,05:38:08,51.42424 ,2.0508 ,2556,742.00 ,18.98 ,89.61 ,13.88 -20150101,05:38:09,51.42344 ,2.0516 ,2556,741.86 ,18.71 ,89.60 ,13.87 -20150101,05:38:10,51.42291 ,2.0522 ,2557,741.88 ,18.74 ,89.72 ,13.90 -20150101,05:38:11,51.42224 ,2.0529 ,2557,741.86 ,18.61 ,90.03 ,13.94 -20150101,05:45:15,51.15340 ,2.3331 ,3086,695.96 ,18.43 ,99.02 ,11.88 -20150101,05:45:16,51.15277 ,2.3338 ,3085,695.94 ,18.38 ,99.05 ,11.92 -20150101,05:45:17,51.15214 ,2.3344 ,3085,695.94 ,18.31 ,98.23 ,11.99 -20150101,05:45:18,51.15151 ,2.3351 ,3085,695.98 ,18.77 ,98.64 ,11.94 -20150101,05:45:19,51.15089 ,2.3357 ,3084,695.98 ,18.85 ,98.20 ,11.86 -20150101,05:45:20,51.15025 ,2.3364 ,3084,696.04 ,18.69 ,98.27 ,11.86 -20150101,05:45:21,51.14963 ,2.3371 ,3084,696.02 ,18.50 ,98.86 ,11.85 -20150101,05:45:22,51.14899 ,2.3377 ,3084,696.16 ,18.60 ,97.66 ,11.89 -20150101,05:45:23,51.14836 ,2.3384 ,3084,696.04 ,18.65 ,98.39 ,11.94 -20150101,05:45:24,51.14773 ,2.3390 ,3083,696.14 ,18.33 ,99.42 ,12.00 -20150101,05:45:25,51.14710 ,2.3397 ,3083,696.18 ,18.32 ,98.28 ,12.05 -20150101,05:45:26,51.14647 ,2.3404 ,3083,696.18 ,18.54 ,97.09 ,12.05 -20150101,05:45:27,51.14583 ,2.3410 ,3083,696.14 ,18.53 ,96.26 ,12.03 -20150101,05:45:28,51.14520 ,2.3417 ,3082,696.24 ,18.54 ,96.85 ,11.98 -20150101,05:45:29,51.14456 ,2.3424 ,3082,696.26 ,18.47 ,97.91 ,12.04 -20150101,05:45:30,51.14392 ,2.3430 ,3082,696.16 ,18.49 ,97.83 ,12.07 -20150101,05:45:31,51.14328 ,2.3437 ,3082,696.32 ,18.88 ,96.75 ,12.06 -20150101,05:45:32,51.14264 ,2.3444 ,3082,696.28 ,18.78 ,97.59 ,12.04 -20150101,05:45:33,51.14200 ,2.3450 ,3081,696.24 ,19.18 ,97.85 ,11.94 -20150101,05:45:34,51.14137 ,2.3457 ,3081,696.18 ,19.32 ,98.90 ,11.89 -20150101,05:45:35,51.14073 ,2.3464 ,3082,696.38 ,19.24 ,99.30 ,11.90 -20150101,05:45:36,51.14009 ,2.3470 ,3082,696.32 ,19.42 ,99.04 ,11.95 -20150101,05:45:37,51.13945 ,2.3477 ,3081,696.42 ,19.30 ,99.94 ,12.01 -20150101,05:45:38,51.13881 ,2.3484 ,3081,696.42 ,19.02 ,99.29 ,12.08 -20150101,05:45:39,51.13817 ,2.3490 ,3080,696.46 ,19.15 ,98.20 ,12.13 -20150101,05:45:40,51.13753 ,2.3497 ,3079,696.52 ,19.25 ,98.24 ,12.11 -20150101,05:45:41,51.13689 ,2.3504 ,3078,696.58 ,19.28 ,98.89 ,12.07 +20150101,05:30:00,51.75794 ,1.7008 ,2362.0,759.32 ,19.28 ,81.95 ,14.18 +20150101,05:30:01,51.75738 ,1.7014 ,2369.0,758.64 ,19.71 ,81.24 ,14.17 +20150101,05:30:02,51.75681 ,1.7020 ,2375.0,758.16 ,19.80 ,80.82 ,14.15 +20150101,05:30:03,51.75624 ,1.7026 ,2382.0,757.66 ,19.84 ,80.84 ,14.13 +20150101,05:30:04,51.75567 ,1.7031 ,2388.0,757.08 ,19.77 ,80.71 ,14.08 +20150101,05:30:05,51.75511 ,1.7037 ,2395.0,756.60 ,19.79 ,80.55 ,14.08 +20150101,05:30:06,51.75454 ,1.7043 ,2401.0,755.96 ,19.70 ,80.24 ,14.11 +20150101,05:30:07,51.75398 ,1.7049 ,2406.0,755.26 ,19.77 ,80.21 ,14.08 +20150101,05:33:41,51.61353 ,1.8529 ,2558.0,742.34 ,19.66 ,82.84 ,13.74 +20150101,05:33:42,51.61281 ,1.8536 ,2558.0,742.30 ,19.54 ,82.59 ,13.76 +20150101,05:33:43,51.61209 ,1.8543 ,2557.0,742.34 ,19.47 ,82.56 ,13.77 +20150101,05:33:44,51.61137 ,1.8551 ,2557.0,742.42 ,19.61 ,82.47 ,13.78 +20150101,05:33:45,51.61065 ,1.8558 ,2557.0,742.40 ,19.55 ,82.83 ,13.75 +20150101,05:33:46,51.60994 ,1.8565 ,2557.0,742.34 ,19.72 ,82.40 ,13.75 +20150101,05:33:47,51.60922 ,1.8573 ,2557.0,742.42 ,19.70 ,82.86 ,13.74 +20150101,05:33:48,51.60851 ,1.8580 ,2558.0,742.42 ,19.72 ,83.18 ,13.74 +20150101,05:33:49,51.60779 ,1.8588 ,2558.0,742.36 ,19.87 ,83.18 ,13.76 +20150101,05:33:50,51.60707 ,1.8595 ,2558.0,742.24 ,19.87 ,82.71 ,13.76 +20150101,05:33:51,51.60635 ,1.8602 ,2558.0,742.20 ,19.89 ,82.98 ,13.76 +20150101,05:33:52,51.60564 ,1.8609 ,2558.0,742.26 ,19.74 ,82.40 ,13.79 +20150101,05:33:53,51.60492 ,1.8617 ,2558.0,742.22 ,19.71 ,82.27 ,13.80 +20150101,05:33:54,51.60420 ,1.8624 ,2558.0,742.20 ,19.51 ,82.61 ,13.84 +20150101,05:33:55,51.60349 ,1.8631 ,2557.0,742.44 ,19.85 ,81.95 ,13.82 +20150101,05:33:56,51.60277 ,1.8639 ,2556.0,742.32 ,19.61 ,82.23 ,13.78 +20150101,05:33:57,51.60205 ,1.8646 ,2555.0,742.54 ,19.57 ,81.95 ,13.81 +20150101,05:35:59,51.51433 ,1.9565 ,2553.0,742.30 ,18.21 ,81.25 ,14.45 +20150101,05:36:00,51.51360 ,1.9572 ,2553.0,742.34 ,18.42 ,80.25 ,14.45 +20150101,05:36:01,51.51288 ,1.9580 ,2553.0,742.40 ,18.38 ,79.72 ,14.43 +20150101,05:36:02,51.51215 ,1.9588 ,2552.0,742.42 ,18.34 ,79.76 ,14.37 +20150101,05:36:03,51.51142 ,1.9595 ,2552.0,742.48 ,18.38 ,80.23 ,14.34 +20150101,05:36:04,51.51070 ,1.9603 ,2552.0,742.58 ,18.39 ,80.07 ,14.35 +20150101,05:36:05,51.50997 ,1.9610 ,2551.0,742.42 ,18.29 ,80.05 ,14.35 +20150101,05:36:06,51.50924 ,1.9618 ,2551.0,742.68 ,18.22 ,80.20 ,14.35 +20150101,05:36:07,51.50852 ,1.9625 ,2551.0,742.54 ,18.21 ,80.20 ,14.35 +20150101,05:36:08,51.50779 ,1.9633 ,2551.0,742.38 ,18.17 ,80.11 ,14.30 +20150101,05:36:09,51.50706 ,1.9641 ,2551.0,742.60 ,18.20 ,80.35 ,14.27 +20150101,05:36:10,51.50634 ,1.9648 ,2551.0,742.48 ,18.05 ,80.69 ,14.27 +20150101,05:36:11,51.50561 ,1.9656 ,2551.0,742.58 ,18.03 ,80.87 ,14.27 +20150101,05:36:12,51.50489 ,1.9664 ,2552.0,742.48 ,18.29 ,81.89 ,14.25 +20150101,05:36:13,51.50416 ,1.9671 ,2552.0,742.52 ,18.14 ,82.59 ,14.31 +20150101,05:36:14,51.50343 ,1.9679 ,2553.0,742.34 ,18.23 ,83.10 ,14.35 +20150101,05:36:15,51.50271 ,1.9686 ,2553.0,742.28 ,18.56 ,84.18 ,14.31 +20150101,05:36:16,51.50198 ,1.9694 ,2554.0,742.30 ,18.55 ,84.49 ,14.33 +20150101,05:36:17,51.50126 ,1.9702 ,2554.0,742.24 ,18.72 ,84.70 ,14.37 +20150101,05:36:18,51.50054 ,1.9709 ,2554.0,742.30 ,18.74 ,85.26 ,14.36 +20150101,05:36:19,51.49981 ,1.9717 ,2554.0,742.12 ,18.80 ,85.39 ,14.37 +20150101,05:36:20,51.49909 ,1.9724 ,2555.0,742.24 ,18.99 ,85.95 ,14.34 +20150101,05:36:21,51.49837 ,1.9732 ,2555.0,742.24 ,19.02 ,86.23 ,14.32 +20150101,05:36:22,51.49765 ,1.9739 ,2555.0,742.12 ,19.06 ,86.45 ,14.31 +20150101,05:36:23,51.49693 ,1.9747 ,2554.0,742.16 ,19.12 ,86.76 ,14.28 +20150101,05:36:24,51.49621 ,1.9754 ,2554.0,742.26 ,18.87 ,86.29 ,14.30 +20150101,05:36:25,51.49549 ,1.9762 ,2554.0,742.26 ,19.11 ,85.92 ,14.26 +20150101,05:36:26,51.49476 ,1.9769 ,2553.0,742.20 ,19.03 ,86.29 ,14.22 +20150101,05:36:27,51.49405 ,1.9777 ,2553.0,742.34 ,19.18 ,86.32 ,14.20 +20150101,05:36:28,51.49333 ,1.9784 ,2553.0,742.24 ,19.24 ,86.36 ,14.17 +20150101,05:36:29,51.49260 ,1.9792 ,2553.0,742.32 ,19.29 ,85.54 ,14.20 +20150101,05:36:30,51.49189 ,1.9799 ,2553.0,742.34 ,19.36 ,85.71 ,14.20 +20150101,05:36:31,51.49117 ,1.9807 ,2554.0,742.38 ,19.39 ,85.95 ,14.19 +20150101,05:36:32,51.49045 ,1.9814 ,2554.0,742.32 ,19.55 ,86.33 ,14.20 +20150101,05:36:33,51.48973 ,1.9822 ,2554.0,742.22 ,19.52 ,85.98 ,14.21 +20150101,05:36:34,51.48902 ,1.9829 ,2554.0,742.36 ,19.51 ,85.53 ,14.23 +20150101,05:36:35,51.48830 ,1.9837 ,2554.0,742.20 ,19.34 ,85.73 ,14.26 +20150101,05:36:36,51.48759 ,1.9844 ,2554.0,742.00 ,19.37 ,85.62 ,14.26 +20150101,05:36:37,51.48688 ,1.9852 ,2554.0,742.24 ,19.40 ,85.86 ,14.27 +20150101,05:36:38,51.48616 ,1.9859 ,2554.0,742.22 ,19.63 ,86.06 ,14.28 +20150101,05:36:39,51.48545 ,1.9867 ,2553.0,742.26 ,19.95 ,85.89 ,14.27 +20150101,05:36:40,51.48474 ,1.9874 ,2553.0,742.16 ,19.81 ,86.01 ,14.22 +20150101,05:36:41,51.48403 ,1.9881 ,2553.0,742.34 ,19.32 ,87.45 ,14.22 +20150101,05:36:42,51.48333 ,1.9889 ,2552.0,742.10 ,20.22 ,90.31 ,14.11 +20150101,05:36:43,51.48262 ,1.9896 ,2552.0,742.50 ,19.74 ,89.33 ,14.24 +20150101,05:36:44,51.48191 ,1.9904 ,2552.0,742.66 ,18.69 ,87.18 ,14.46 +20150101,05:36:45,51.48121 ,1.9911 ,2552.0,742.38 ,19.41 ,89.47 ,14.41 +20150101,05:36:46,51.48050 ,1.9919 ,2551.0,742.40 ,19.71 ,86.92 ,14.45 +20150101,05:36:47,51.47980 ,1.9926 ,2551.0,742.48 ,18.47 ,86.49 ,14.40 +20150101,05:36:48,51.47910 ,1.9933 ,2551.0,742.18 ,17.70 ,85.66 ,14.39 +20150101,05:36:49,51.47840 ,1.9941 ,2551.0,742.58 ,17.84 ,89.68 ,14.39 +20150101,05:36:50,51.47770 ,1.9948 ,2551.0,742.38 ,19.76 ,83.78 ,14.57 +20150101,05:36:51,51.47700 ,1.9955 ,2551.0,742.24 ,18.98 ,83.07 ,14.39 +20150101,05:36:52,51.47630 ,1.9963 ,2551.0,742.34 ,20.36 ,86.14 ,14.28 +20150101,05:36:53,51.47560 ,1.9970 ,2552.0,742.08 ,20.66 ,84.28 ,14.20 +20150101,05:36:54,51.47490 ,1.9978 ,2553.0,742.58 ,20.01 ,82.04 ,14.27 +20150101,05:36:55,51.47420 ,1.9985 ,2553.0,742.04 ,20.43 ,80.02 ,14.13 +20150101,05:36:56,51.47350 ,1.9992 ,2554.0,742.10 ,18.79 ,80.63 ,14.16 +20150101,05:36:57,51.47280 ,2.0000 ,2555.0,741.98 ,17.62 ,82.50 ,14.08 +20150101,05:36:58,51.47209 ,2.0007 ,2556.0,742.06 ,17.42 ,81.05 ,14.06 +20150101,05:36:59,51.47139 ,2.0014 ,2557.0,742.16 ,16.87 ,83.43 ,13.97 +20150101,05:37:00,51.47069 ,2.0022 ,2558.0,741.94 ,19.95 ,81.32 ,13.80 +20150101,05:37:01,51.46999 ,2.0029 ,2557.0,741.52 ,19.05 ,90.09 ,13.45 +20150101,05:37:02,51.46928 ,2.0036 ,2557.0,741.96 ,18.63 ,89.85 ,13.40 +20150101,05:37:03,51.46858 ,2.0044 ,2556.0,741.94 ,18.00 ,90.13 ,13.29 +20150101,05:37:04,51.46787 ,2.0051 ,2556.0,742.08 ,18.69 ,90.18 ,13.13 +20150101,05:37:05,51.46717 ,2.0058 ,2555.0,742.12 ,19.07 ,88.68 ,13.15 +20150101,05:37:06,51.46647 ,2.0066 ,2555.0,742.34 ,18.67 ,88.31 ,13.07 +20150101,05:37:07,51.46577 ,2.0073 ,2555.0,742.38 ,18.84 ,88.24 ,13.04 +20150101,05:37:08,51.46506 ,2.0080 ,2554.0,742.42 ,18.82 ,88.60 ,13.03 +20150101,05:37:09,51.46437 ,2.0088 ,2554.0,742.36 ,19.10 ,88.56 ,12.99 +20150101,05:37:10,51.46366 ,2.0095 ,2553.0,742.40 ,19.04 ,88.77 ,12.93 +20150101,05:37:11,51.46296 ,2.0102 ,2553.0,742.46 ,18.96 ,89.76 ,12.90 +20150101,05:37:12,51.46226 ,2.0110 ,2552.0,742.48 ,19.03 ,89.55 ,12.94 +20150101,05:37:13,51.46156 ,2.0117 ,2552.0,742.40 ,18.97 ,89.18 ,12.89 +20150101,05:37:14,51.46087 ,2.0124 ,2552.0,742.54 ,19.12 ,89.01 ,12.88 +20150101,05:37:15,51.46017 ,2.0132 ,2552.0,742.48 ,19.18 ,89.28 ,12.95 +20150101,05:37:16,51.45947 ,2.0139 ,2552.0,742.70 ,19.05 ,88.65 ,13.01 +20150101,05:37:17,51.45878 ,2.0146 ,2552.0,742.40 ,19.49 ,88.38 ,13.04 +20150101,05:37:18,51.45808 ,2.0154 ,2552.0,742.50 ,19.64 ,88.37 ,13.06 +20150101,05:37:19,51.45739 ,2.0161 ,2552.0,742.30 ,19.56 ,87.36 ,13.11 +20150101,05:37:20,51.45670 ,2.0168 ,2551.0,742.48 ,19.67 ,88.22 ,13.12 +20150101,05:37:21,51.45600 ,2.0175 ,2551.0,742.42 ,19.66 ,87.64 ,13.14 +20150101,05:37:22,51.45531 ,2.0183 ,2551.0,742.42 ,19.82 ,86.73 ,13.19 +20150101,05:37:23,51.45462 ,2.0190 ,2551.0,742.66 ,19.97 ,86.84 ,13.24 +20150101,05:37:24,51.45393 ,2.0197 ,2550.0,742.72 ,19.14 ,88.26 ,13.24 +20150101,05:37:25,51.45324 ,2.0204 ,2550.0,742.68 ,19.32 ,87.69 ,13.28 +20150101,05:37:26,51.45255 ,2.0212 ,2549.0,742.70 ,19.29 ,87.74 ,13.27 +20150101,05:37:27,51.45186 ,2.0219 ,2549.0,742.58 ,19.31 ,87.45 ,13.34 +20150101,05:37:28,51.45117 ,2.0226 ,2549.0,742.48 ,19.05 ,87.32 ,13.34 +20150101,05:37:29,51.45048 ,2.0233 ,2548.0,742.54 ,19.06 ,86.75 ,13.36 +20150101,05:37:30,51.44980 ,2.0241 ,2548.0,742.72 ,18.84 ,86.56 ,13.36 +20150101,05:37:31,51.44911 ,2.0248 ,2548.0,742.56 ,19.01 ,86.95 ,13.35 +20150101,05:37:32,51.44856 ,2.0254 ,2548.0,742.58 ,19.09 ,86.76 ,13.42 +20150101,05:37:33,51.44774 ,2.0262 ,2549.0,742.48 ,19.02 ,86.02 ,13.46 +20150101,05:37:34,51.44719 ,2.0268 ,2549.0,742.40 ,18.97 ,86.71 ,13.46 +20150101,05:37:35,51.44637 ,2.0277 ,2549.0,742.52 ,19.03 ,86.81 ,13.50 +20150101,05:37:36,51.44582 ,2.0282 ,2549.0,742.46 ,19.08 ,87.69 ,13.52 +20150101,05:37:37,51.44500 ,2.0291 ,2549.0,742.60 ,18.94 ,87.25 ,13.57 +20150101,05:37:38,51.44446 ,2.0297 ,2549.0,742.60 ,18.89 ,87.57 ,13.60 +20150101,05:37:39,51.44377 ,2.0304 ,2549.0,742.66 ,18.89 ,88.48 ,13.57 +20150101,05:37:40,51.44295 ,2.0312 ,2549.0,742.50 ,18.79 ,88.90 ,13.65 +20150101,05:37:41,51.44241 ,2.0318 ,2549.0,742.40 ,19.04 ,88.92 ,13.67 +20150101,05:37:42,51.44173 ,2.0325 ,2550.0,742.44 ,18.96 ,89.12 ,13.71 +20150101,05:37:43,51.44105 ,2.0332 ,2550.0,742.34 ,19.05 ,88.92 ,13.75 +20150101,05:37:44,51.44037 ,2.0340 ,2550.0,742.44 ,19.15 ,90.00 ,13.70 +20150101,05:37:45,51.43969 ,2.0347 ,2550.0,742.44 ,18.94 ,89.15 ,13.78 +20150101,05:37:46,51.43901 ,2.0354 ,2551.0,742.40 ,19.10 ,90.27 ,13.74 +20150101,05:37:47,51.43833 ,2.0361 ,2552.0,742.34 ,19.45 ,90.77 ,13.74 +20150101,05:37:48,51.43752 ,2.0369 ,2552.0,742.32 ,19.65 ,90.73 ,13.77 +20150101,05:37:49,51.43698 ,2.0375 ,2553.0,742.22 ,19.68 ,90.82 ,13.79 +20150101,05:37:50,51.43617 ,2.0383 ,2553.0,742.20 ,19.57 ,91.64 ,13.81 +20150101,05:37:51,51.43563 ,2.0389 ,2554.0,742.14 ,19.45 ,91.21 ,13.87 +20150101,05:37:52,51.43482 ,2.0398 ,2554.0,742.12 ,19.60 ,90.35 ,13.88 +20150101,05:37:53,51.43428 ,2.0403 ,2554.0,742.10 ,18.98 ,90.66 ,13.90 +20150101,05:37:54,51.43347 ,2.0412 ,2554.0,742.18 ,18.95 ,89.06 ,13.93 +20150101,05:37:55,51.43293 ,2.0417 ,2554.0,742.16 ,18.98 ,87.92 ,13.93 +20150101,05:37:56,51.43227 ,2.0424 ,2554.0,742.24 ,19.15 ,88.50 ,13.89 +20150101,05:37:57,51.43159 ,2.0431 ,2554.0,742.20 ,18.86 ,88.21 ,13.91 +20150101,05:37:58,51.43092 ,2.0438 ,2554.0,742.06 ,18.80 ,88.54 ,13.89 +20150101,05:37:59,51.43025 ,2.0445 ,2554.0,742.10 ,18.98 ,89.64 ,13.89 +20150101,05:38:00,51.42945 ,2.0454 ,2554.0,742.16 ,18.91 ,89.70 ,13.92 +20150101,05:38:01,51.42891 ,2.0459 ,2555.0,742.14 ,18.91 ,89.12 ,13.91 +20150101,05:38:02,51.42824 ,2.0466 ,2555.0,742.12 ,18.82 ,89.36 ,13.94 +20150101,05:38:03,51.42758 ,2.0473 ,2555.0,742.02 ,18.56 ,89.75 ,13.93 +20150101,05:38:04,51.42691 ,2.0480 ,2555.0,741.92 ,18.64 ,89.48 ,13.93 +20150101,05:38:05,51.42624 ,2.0487 ,2556.0,742.12 ,18.72 ,89.02 ,13.94 +20150101,05:38:06,51.42557 ,2.0494 ,2556.0,741.94 ,18.61 ,89.20 ,13.93 +20150101,05:38:07,51.42490 ,2.0501 ,2556.0,741.98 ,18.80 ,89.66 ,13.95 +20150101,05:38:08,51.42424 ,2.0508 ,2556.0,742.00 ,18.98 ,89.61 ,13.88 +20150101,05:38:09,51.42344 ,2.0516 ,2556.0,741.86 ,18.71 ,89.60 ,13.87 +20150101,05:38:10,51.42291 ,2.0522 ,2557.0,741.88 ,18.74 ,89.72 ,13.90 +20150101,05:38:11,51.42224 ,2.0529 ,2557.0,741.86 ,18.61 ,90.03 ,13.94 +20150101,05:45:15,51.15340 ,2.3331 ,3086.0,695.96 ,18.43 ,99.02 ,11.88 +20150101,05:45:16,51.15277 ,2.3338 ,3085.0,695.94 ,18.38 ,99.05 ,11.92 +20150101,05:45:17,51.15214 ,2.3344 ,3085.0,695.94 ,18.31 ,98.23 ,11.99 +20150101,05:45:18,51.15151 ,2.3351 ,3085.0,695.98 ,18.77 ,98.64 ,11.94 +20150101,05:45:19,51.15089 ,2.3357 ,3084.0,695.98 ,18.85 ,98.20 ,11.86 +20150101,05:45:20,51.15025 ,2.3364 ,3084.0,696.04 ,18.69 ,98.27 ,11.86 +20150101,05:45:21,51.14963 ,2.3371 ,3084.0,696.02 ,18.50 ,98.86 ,11.85 +20150101,05:45:22,51.14899 ,2.3377 ,3084.0,696.16 ,18.60 ,97.66 ,11.89 +20150101,05:45:23,51.14836 ,2.3384 ,3084.0,696.04 ,18.65 ,98.39 ,11.94 +20150101,05:45:24,51.14773 ,2.3390 ,3083.0,696.14 ,18.33 ,99.42 ,12.00 +20150101,05:45:25,51.14710 ,2.3397 ,3083.0,696.18 ,18.32 ,98.28 ,12.05 +20150101,05:45:26,51.14647 ,2.3404 ,3083.0,696.18 ,18.54 ,97.09 ,12.05 +20150101,05:45:27,51.14583 ,2.3410 ,3083.0,696.14 ,18.53 ,96.26 ,12.03 +20150101,05:45:28,51.14520 ,2.3417 ,3082.0,696.24 ,18.54 ,96.85 ,11.98 +20150101,05:45:29,51.14456 ,2.3424 ,3082.0,696.26 ,18.47 ,97.91 ,12.04 +20150101,05:45:30,51.14392 ,2.3430 ,3082.0,696.16 ,18.49 ,97.83 ,12.07 +20150101,05:45:31,51.14328 ,2.3437 ,3082.0,696.32 ,18.88 ,96.75 ,12.06 +20150101,05:45:32,51.14264 ,2.3444 ,3082.0,696.28 ,18.78 ,97.59 ,12.04 +20150101,05:45:33,51.14200 ,2.3450 ,3081.0,696.24 ,19.18 ,97.85 ,11.94 +20150101,05:45:34,51.14137 ,2.3457 ,3081.0,696.18 ,19.32 ,98.90 ,11.89 +20150101,05:45:35,51.14073 ,2.3464 ,3082.0,696.38 ,19.24 ,99.30 ,11.90 +20150101,05:45:36,51.14009 ,2.3470 ,3082.0,696.32 ,19.42 ,99.04 ,11.95 +20150101,05:45:37,51.13945 ,2.3477 ,3081.0,696.42 ,19.30 ,99.94 ,12.01 +20150101,05:45:38,51.13881 ,2.3484 ,3081.0,696.42 ,19.02 ,99.29 ,12.08 +20150101,05:45:39,51.13817 ,2.3490 ,3080.0,696.46 ,19.15 ,98.20 ,12.13 +20150101,05:45:40,51.13753 ,2.3497 ,3079.0,696.52 ,19.25 ,98.24 ,12.11 +20150101,05:45:41,51.13689 ,2.3504 ,3078.0,696.58 ,19.28 ,98.89 ,12.07 diff --git a/src/grib_accessor_class_bufr_data_element.c b/src/grib_accessor_class_bufr_data_element.c index 1ae2d87cc..8a404ad3a 100644 --- a/src/grib_accessor_class_bufr_data_element.c +++ b/src/grib_accessor_class_bufr_data_element.c @@ -156,407 +156,407 @@ static void init_class(grib_accessor_class* c) static grib_accessor* make_clone(grib_accessor* a,grib_section* s,int* err) { - grib_accessor* operatorAccessor=NULL; - grib_action operatorCreator = {0, }; - grib_accessor* the_clone=NULL; - grib_accessor* attribute=NULL; - grib_accessor_bufr_data_element* elementAccessor; - grib_accessor_bufr_data_element* self; - int i; - grib_action creator = {0, }; - creator.op = "bufr_data_element"; - creator.name_space = ""; - creator.set = 0; - creator.name="unknown"; - if (strcmp(a->cclass->name,"bufr_data_element")) { - grib_context_log(a->context,GRIB_LOG_FATAL,"wrong accessor type: '%s' should be '%s'",a->cclass->name,"bufr_data_element"); - } - *err=0; + grib_accessor* operatorAccessor=NULL; + grib_action operatorCreator = {0, }; + grib_accessor* the_clone=NULL; + grib_accessor* attribute=NULL; + grib_accessor_bufr_data_element* elementAccessor; + grib_accessor_bufr_data_element* self; + int i; + grib_action creator = {0, }; + creator.op = "bufr_data_element"; + creator.name_space = ""; + creator.set = 0; + creator.name="unknown"; + if (strcmp(a->cclass->name,"bufr_data_element")) { + grib_context_log(a->context,GRIB_LOG_FATAL,"wrong accessor type: '%s' should be '%s'",a->cclass->name,"bufr_data_element"); + } + *err=0; - the_clone = grib_accessor_factory(s, &creator, 0, NULL); - the_clone->name=grib_context_strdup(a->context,a->name); - elementAccessor=(grib_accessor_bufr_data_element*)the_clone; - self=(grib_accessor_bufr_data_element*)a; - the_clone->flags=a->flags; - the_clone->parent=NULL; - the_clone->h=s->h; - elementAccessor->index=self->index; - elementAccessor->type=self->type; - elementAccessor->numberOfSubsets=self->numberOfSubsets; - elementAccessor->subsetNumber=self->subsetNumber; - elementAccessor->compressedData=self->compressedData; - elementAccessor->descriptors=self->descriptors; - elementAccessor->numericValues=self->numericValues; - elementAccessor->stringValues=self->stringValues; - elementAccessor->elementsDescriptorsIndex=self->elementsDescriptorsIndex; + the_clone = grib_accessor_factory(s, &creator, 0, NULL); + the_clone->name=grib_context_strdup(a->context,a->name); + elementAccessor=(grib_accessor_bufr_data_element*)the_clone; + self=(grib_accessor_bufr_data_element*)a; + the_clone->flags=a->flags; + the_clone->parent=NULL; + the_clone->h=s->h; + elementAccessor->index=self->index; + elementAccessor->type=self->type; + elementAccessor->numberOfSubsets=self->numberOfSubsets; + elementAccessor->subsetNumber=self->subsetNumber; + elementAccessor->compressedData=self->compressedData; + elementAccessor->descriptors=self->descriptors; + elementAccessor->numericValues=self->numericValues; + elementAccessor->stringValues=self->stringValues; + elementAccessor->elementsDescriptorsIndex=self->elementsDescriptorsIndex; - i=0; - while (a->attributes[i]) { - attribute=grib_accessor_clone(a->attributes[i],s,err); - /* attribute->parent=a->parent; */ - grib_accessor_add_attribute(the_clone,attribute); - i++; - } - - return the_clone; + i=0; + while (a->attributes[i]) { + attribute=grib_accessor_clone(a->attributes[i],s,err); + /* attribute->parent=a->parent; */ + grib_accessor_add_attribute(the_clone,attribute); + i++; + } + return the_clone; } void accessor_bufr_data_element_set_index(grib_accessor* a,long index) { - grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; - self->index=index; + grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; + self->index=index; } void accessor_bufr_data_element_set_type(grib_accessor* a,int type) { - grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; - self->type=type; + grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; + self->type=type; } void accessor_bufr_data_element_set_numberOfSubsets(grib_accessor* a,long numberOfSubsets) { - grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; - self->numberOfSubsets=numberOfSubsets; + grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; + self->numberOfSubsets=numberOfSubsets; } void accessor_bufr_data_element_set_subsetNumber(grib_accessor* a,long subsetNumber) { - grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; - self->subsetNumber=subsetNumber; + grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; + self->subsetNumber=subsetNumber; } void accessor_bufr_data_element_set_compressedData(grib_accessor* a,int compressedData) { - grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; - self->compressedData=compressedData; + grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; + self->compressedData=compressedData; } void accessor_bufr_data_element_set_descriptors(grib_accessor* a,bufr_descriptors_array* descriptors) { - grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; - self->descriptors=descriptors; + grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; + self->descriptors=descriptors; } void accessor_bufr_data_element_set_numericValues(grib_accessor* a,grib_vdarray* numericValues) { - grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; - self->numericValues=numericValues; + grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; + self->numericValues=numericValues; } void accessor_bufr_data_element_set_stringValues(grib_accessor* a,grib_vsarray* stringValues) { - grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; - self->stringValues=stringValues; + grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; + self->stringValues=stringValues; } void accessor_bufr_data_element_set_elementsDescriptorsIndex(grib_accessor* a,grib_viarray* elementsDescriptorsIndex) { - grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; - self->elementsDescriptorsIndex=elementsDescriptorsIndex; + grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; + self->elementsDescriptorsIndex=elementsDescriptorsIndex; } static void init(grib_accessor* a, const long len, grib_arguments* params) { - a->length = 0; - /* a->flags |= GRIB_ACCESSOR_FLAG_READ_ONLY; */ + a->length = 0; + /* a->flags |= GRIB_ACCESSOR_FLAG_READ_ONLY; */ } static void dump(grib_accessor* a, grib_dumper* dumper) { - int type=get_native_type(a); + int type=get_native_type(a); - switch (type) { + switch (type) { case GRIB_TYPE_LONG: - grib_dump_long(dumper,a,NULL); - break; + grib_dump_long(dumper,a,NULL); + break; case GRIB_TYPE_DOUBLE: - grib_dump_values(dumper,a); - break; + grib_dump_values(dumper,a); + break; case GRIB_TYPE_STRING: - grib_dump_string_array(dumper,a,NULL); - break; - } + grib_dump_string_array(dumper,a,NULL); + break; + } } static int unpack_string_array (grib_accessor* a, char** val, size_t *len) { - grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; + grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; - int ret=0,i,idx; - long count=0; - grib_context* c=a->context; + int ret=0,i,idx; + long count=0; + grib_context* c=a->context; - if (self->compressedData) { - idx=((int)self->numericValues->v[self->index]->v[0]/1000-1)/self->numberOfSubsets; - count=grib_sarray_used_size(self->stringValues->v[idx]); - for (i=0;istringValues->v[idx]->v[i]); + if (self->compressedData) { + idx=((int)self->numericValues->v[self->index]->v[0]/1000-1)/self->numberOfSubsets; + count=grib_sarray_used_size(self->stringValues->v[idx]); + for (i=0;istringValues->v[idx]->v[i]); + } + *len=count; + } else { + idx=(int)self->numericValues->v[self->subsetNumber]->v[self->index]/1000-1; + val[0]=grib_context_strdup(c,self->stringValues->v[idx]->v[0]); + *len=1; } - *len=count; - } else { - idx=(int)self->numericValues->v[self->subsetNumber]->v[self->index]/1000-1; - val[0]=grib_context_strdup(c,self->stringValues->v[idx]->v[0]); - *len=1; - } - return ret; + return ret; } +static int pack_string_array(grib_accessor*a , const char** v, size_t *len) +{ + grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; -static int pack_string_array(grib_accessor*a , const char** v, size_t *len){ - grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; + int ret=0,i,idx; + char* s=NULL; + grib_context* c=a->context; - int ret=0,i,idx; - char* s=NULL; - grib_context* c=a->context; - - if (self->compressedData) { - idx=((int)self->numericValues->v[self->index]->v[0]/1000-1)/self->numberOfSubsets; - if (*len!=1 && *len!=self->numberOfSubsets) { - grib_context_log(c,GRIB_LOG_ERROR,"Number of values mismatch for %s: are %ld should be %ld", - self->descriptors->v[self->elementsDescriptorsIndex->v[0]->v[idx]]->shortName,*len,self->numberOfSubsets); - return GRIB_ARRAY_TOO_SMALL; + if (self->compressedData) { + idx=((int)self->numericValues->v[self->index]->v[0]/1000-1)/self->numberOfSubsets; + if (*len!=1 && *len!=self->numberOfSubsets) { + grib_context_log(c,GRIB_LOG_ERROR,"Number of values mismatch for %s: are %ld should be %ld", + self->descriptors->v[self->elementsDescriptorsIndex->v[0]->v[idx]]->shortName,*len,self->numberOfSubsets); + return GRIB_ARRAY_TOO_SMALL; + } + grib_sarray_delete(c,self->stringValues->v[idx]); + self->stringValues->v[idx]=grib_sarray_new(c,*len,1); + for (i=0;i<*len;i++) { + s=grib_context_strdup(c,v[i]); + grib_sarray_push(c,self->stringValues->v[idx],s); + } + } else { + ret=GRIB_NOT_IMPLEMENTED; } - grib_sarray_delete(c,self->stringValues->v[idx]); - self->stringValues->v[idx]=grib_sarray_new(c,*len,1); - for (i=0;i<*len;i++) { - s=grib_context_strdup(c,v[i]); - grib_sarray_push(c,self->stringValues->v[idx],s); - } - } else { - ret=GRIB_NOT_IMPLEMENTED; - } - return ret; + return ret; } static int unpack_string (grib_accessor* a, char* val, size_t *len) { - grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; - char* str=NULL; - char* p=0; - size_t slen=0; - char sval[100]={0,}; - double dval=0; - size_t dlen=1; + grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; + char* str=NULL; + char* p=0; + size_t slen=0; + char sval[100]={0,}; + double dval=0; + size_t dlen=1; - int ret=0,i,idx; - grib_context* c=a->context; + int ret=0,idx; + grib_context* c=a->context; - if (self->type != BUFR_DESCRIPTOR_TYPE_STRING) { - unpack_double(a,&dval,&dlen); - sprintf(sval,"%g",dval); - slen=strlen(sval); - if (*len < slen) return GRIB_ARRAY_TOO_SMALL; - strcpy(val,sval); - return GRIB_SUCCESS; - } + if (self->type != BUFR_DESCRIPTOR_TYPE_STRING) { + unpack_double(a,&dval,&dlen); + sprintf(sval,"%g",dval); + slen=strlen(sval); + if (*len < slen) return GRIB_ARRAY_TOO_SMALL; + strcpy(val,sval); + return GRIB_SUCCESS; + } - if (self->compressedData) { - idx=((int)self->numericValues->v[self->index]->v[0]/1000-1)/self->numberOfSubsets; - str=grib_context_strdup(c,self->stringValues->v[idx]->v[0]); - } else { - idx=((int)self->numericValues->v[self->subsetNumber]->v[self->index]/1000-1)/self->numberOfSubsets; - str=grib_context_strdup(c,self->stringValues->v[self->subsetNumber]->v[idx]); - } + if (self->compressedData) { + idx=((int)self->numericValues->v[self->index]->v[0]/1000-1)/self->numberOfSubsets; + str=grib_context_strdup(c,self->stringValues->v[idx]->v[0]); + } else { + idx=((int)self->numericValues->v[self->subsetNumber]->v[self->index]/1000-1)/self->numberOfSubsets; + str=grib_context_strdup(c,self->stringValues->v[self->subsetNumber]->v[idx]); + } - if (str==0 || strlen(str)==0) { - *len=0; - *val=0; - return ret; - } + if (str==0 || strlen(str)==0) { + *len=0; + *val=0; + return ret; + } - p=str; - while (*p!=0) p++; - p--; - while (p!=str) { - if (*p!=' ') break; - else *p=0; + p=str; + while (*p!=0) p++; p--; - } - slen=strlen(str); - if (slen>*len) return GRIB_ARRAY_TOO_SMALL; + while (p!=str) { + if (*p!=' ') break; + else *p=0; + p--; + } + slen=strlen(str); + if (slen>*len) return GRIB_ARRAY_TOO_SMALL; - strcpy(val,str); - grib_context_free(c,str); - *len=slen; + strcpy(val,str); + grib_context_free(c,str); + *len=slen; - return ret; + return ret; } static int pack_string(grib_accessor* a, const char* val, size_t *len) { - grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; + grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; - int ret=0,i,idx; - long count=0; - char* s=NULL; - grib_context* c=a->context; + int ret=0,idx; + long count=0; + char* s=NULL; + grib_context* c=a->context; - count=self->numberOfSubsets; - idx=((int)self->numericValues->v[self->index]->v[0]/1000-1)/self->numberOfSubsets; - grib_sarray_delete(c,self->stringValues->v[idx]); - self->stringValues->v[idx]=grib_sarray_new(c,1,1); - s=grib_context_strdup(c,val); - grib_sarray_push(c,self->stringValues->v[idx],s); + count=self->numberOfSubsets; + idx=((int)self->numericValues->v[self->index]->v[0]/1000-1)/self->numberOfSubsets; + grib_sarray_delete(c,self->stringValues->v[idx]); + self->stringValues->v[idx]=grib_sarray_new(c,1,1); + s=grib_context_strdup(c,val); + grib_sarray_push(c,self->stringValues->v[idx],s); - return ret; + return ret; } static int unpack_long (grib_accessor* a, long* val, size_t *len) { - grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; - int ret=0,i; - long count=0; + grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; + int ret=0,i; + long count=0; - value_count(a,&count); + value_count(a,&count); - if (*lencompressedData) { - for (i=0;inumericValues->v[self->index]->v[i] == GRIB_MISSING_DOUBLE ? - GRIB_MISSING_LONG : (long)self->numericValues->v[self->index]->v[i]; + if (self->compressedData) { + for (i=0;inumericValues->v[self->index]->v[i] == GRIB_MISSING_DOUBLE ? + GRIB_MISSING_LONG : (long)self->numericValues->v[self->index]->v[i]; + } + *len=count; + } else { + val[0]= self->numericValues->v[self->subsetNumber]->v[self->index] == GRIB_MISSING_DOUBLE ? + GRIB_MISSING_LONG : (long)self->numericValues->v[self->subsetNumber]->v[self->index]; + *len=1; } - *len=count; - } else { - val[0]= self->numericValues->v[self->subsetNumber]->v[self->index] == GRIB_MISSING_DOUBLE ? - GRIB_MISSING_LONG : (long)self->numericValues->v[self->subsetNumber]->v[self->index]; - *len=1; - } - return ret; + return ret; } static int unpack_double (grib_accessor* a, double* val, size_t *len) { - grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; - int ret=0,i; - long count=0; + grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; + int ret=0,i; + long count=0; - value_count(a,&count); + value_count(a,&count); - if (*lencompressedData) { - for (i=0;inumericValues->v[self->index]->v[i]; + if (self->compressedData) { + for (i=0;inumericValues->v[self->index]->v[i]; + } + *len=count; + } else { + val[0]=self->numericValues->v[self->subsetNumber]->v[self->index]; + *len=1; } - *len=count; - } else { - val[0]=self->numericValues->v[self->subsetNumber]->v[self->index]; - *len=1; - } - return ret; + return ret; } static int pack_double(grib_accessor* a, const double* val, size_t *len) { - grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; - int ret=0,i; - long count=1,n; - grib_context* c=a->context; + grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; + int ret=0,i; + long count=1; + grib_context* c=a->context; - if (self->compressedData) { - count=*len; - if (count!=1 && count!=self->numberOfSubsets) { - grib_context_log(c,GRIB_LOG_ERROR,"Number of values mismatch for %s: are %ld should be %ld", - self->descriptors->v[self->elementsDescriptorsIndex->v[0]->v[self->index]]->shortName,count,self->numberOfSubsets); - return GRIB_ARRAY_TOO_SMALL; + if (self->compressedData) { + count=*len; + if (count!=1 && count!=self->numberOfSubsets) { + grib_context_log(c,GRIB_LOG_ERROR,"Number of values mismatch for %s: are %ld should be %ld", + self->descriptors->v[self->elementsDescriptorsIndex->v[0]->v[self->index]]->shortName,count,self->numberOfSubsets); + return GRIB_ARRAY_TOO_SMALL; + } + grib_darray_delete(a->context,self->numericValues->v[self->index]); + self->numericValues->v[self->index]=grib_darray_new(a->context,count,1); + + for (i=0;icontext,self->numericValues->v[self->index],val[i]); + + *len=count; + } else { + self->numericValues->v[self->subsetNumber]->v[self->index]=val[0]; + *len=1; } - grib_darray_delete(a->context,self->numericValues->v[self->index]); - self->numericValues->v[self->index]=grib_darray_new(a->context,count,1); - for (i=0;icontext,self->numericValues->v[self->index],val[i]); - - *len=count; - } else { - self->numericValues->v[self->subsetNumber]->v[self->index]=val[0]; - *len=1; - } - - return ret; + return ret; } static int pack_long(grib_accessor* a, const long* val, size_t *len) { - grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; - int ret=0,i; - long count=1; - grib_context* c=a->context; + grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; + int ret=0,i; + long count=1; + grib_context* c=a->context; - if (self->compressedData) { - count=*len; - if (count!=1 && count!=self->numberOfSubsets) { - grib_context_log(c,GRIB_LOG_ERROR,"Number of values mismatch for %s: are %ld should be %ld", - self->descriptors->v[self->elementsDescriptorsIndex->v[0]->v[self->index]]->shortName,count,self->numberOfSubsets); - return GRIB_ARRAY_TOO_SMALL; + if (self->compressedData) { + count=*len; + if (count!=1 && count!=self->numberOfSubsets) { + grib_context_log(c,GRIB_LOG_ERROR,"Number of values mismatch for %s: are %ld should be %ld", + self->descriptors->v[self->elementsDescriptorsIndex->v[0]->v[self->index]]->shortName,count,self->numberOfSubsets); + return GRIB_ARRAY_TOO_SMALL; + } + grib_darray_delete(a->context,self->numericValues->v[self->index]); + self->numericValues->v[self->index]=grib_darray_new(a->context,count,1); + + for (i=0;icontext,self->numericValues->v[self->index], val[i] == GRIB_MISSING_LONG ? GRIB_MISSING_DOUBLE : val[i]); + } + *len=count; + } else { + self->numericValues->v[self->subsetNumber]->v[self->index] = val[0] == GRIB_MISSING_LONG ? GRIB_MISSING_DOUBLE : val[0]; + *len=1; } - grib_darray_delete(a->context,self->numericValues->v[self->index]); - for (i=0;icontext,self->numericValues->v[self->index], val[i] == GRIB_MISSING_LONG ? GRIB_MISSING_DOUBLE : val[i]); - } - *len=count; - } else { - self->numericValues->v[self->subsetNumber]->v[self->index] = val[0] == GRIB_MISSING_LONG ? GRIB_MISSING_DOUBLE : val[0]; - *len=1; - } - - return ret; + return ret; } static int value_count(grib_accessor* a,long* count) { - int ret=0,size,type,idx; - grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; + int ret=0,size,type,idx; + grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; - if (!self->compressedData) { - *count=1; - return 0; - } - type=get_native_type(a); + if (!self->compressedData) { + *count=1; + return 0; + } + type=get_native_type(a); - if (type==GRIB_TYPE_STRING) { - idx=((int)self->numericValues->v[self->index]->v[0]/1000-1)/self->numberOfSubsets; - size=grib_sarray_used_size(self->stringValues->v[idx]); - } else { - size=grib_darray_used_size(self->numericValues->v[self->index]); - } + if (type==GRIB_TYPE_STRING) { + idx=((int)self->numericValues->v[self->index]->v[0]/1000-1)/self->numberOfSubsets; + size=grib_sarray_used_size(self->stringValues->v[idx]); + } else { + size=grib_darray_used_size(self->numericValues->v[self->index]); + } - *count = size == 1 ? 1 : self->numberOfSubsets; + *count = size == 1 ? 1 : self->numberOfSubsets; - return ret; + return ret; } -static int get_native_type(grib_accessor* a){ - grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; - int ret=GRIB_TYPE_DOUBLE; +static int get_native_type(grib_accessor* a) +{ + grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; + int ret=GRIB_TYPE_DOUBLE; - switch (self->type) { + switch (self->type) { case BUFR_DESCRIPTOR_TYPE_STRING: - ret=GRIB_TYPE_STRING; - break; + ret=GRIB_TYPE_STRING; + break; case BUFR_DESCRIPTOR_TYPE_DOUBLE: - ret=GRIB_TYPE_DOUBLE; - break; + ret=GRIB_TYPE_DOUBLE; + break; case BUFR_DESCRIPTOR_TYPE_LONG: - ret=GRIB_TYPE_LONG; - break; + ret=GRIB_TYPE_LONG; + break; case BUFR_DESCRIPTOR_TYPE_TABLE: - ret=GRIB_TYPE_LONG; - break; + ret=GRIB_TYPE_LONG; + break; case BUFR_DESCRIPTOR_TYPE_FLAG: - ret=GRIB_TYPE_LONG; - break; - } + ret=GRIB_TYPE_LONG; + break; + } - return ret; + return ret; } - static void destroy(grib_context* ct, grib_accessor* a) { - int i=0; - while (iattributes[i]) { - grib_context_log(ct,GRIB_LOG_DEBUG,"deleting attribute %s->%s",a->name,a->attributes[i]->name); - /* printf("+++++ %s\n",a->attributes[i]->name); */ - grib_accessor_delete(ct,a->attributes[i]); - a->attributes[i]=NULL; - i++; - } + int i=0; + while (iattributes[i]) { + grib_context_log(ct,GRIB_LOG_DEBUG,"deleting attribute %s->%s",a->name,a->attributes[i]->name); + /* printf("+++++ %s\n",a->attributes[i]->name); */ + grib_accessor_delete(ct,a->attributes[i]); + a->attributes[i]=NULL; + i++; + } }