2015-11-10 20:45:59 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
. ./include.sh
|
|
|
|
|
|
|
|
#-----------------------------------------------------
|
|
|
|
# Create a BUFR from flight data
|
|
|
|
#----------------------------------------------------
|
2015-11-11 10:24:37 +00:00
|
|
|
label="bufr_encode_flight_p"
|
2015-11-10 20:45:59 +00:00
|
|
|
|
|
|
|
bufr_in=${data_dir}"/bufr/syno_1.bufr"
|
|
|
|
csv_in="flight_data.csv"
|
|
|
|
|
2015-11-11 10:24:37 +00:00
|
|
|
fBufrTmp=${label}.tmp.bufr
|
2015-11-10 20:45:59 +00:00
|
|
|
|
|
|
|
REDIRECT=/dev/null
|
|
|
|
|
2015-11-11 10:30:40 +00:00
|
|
|
$PYTHON $examples_src/bufr_encode_flight.py $csv_in $bufr_in $fBufrTmp
|
2015-11-10 20:45:59 +00:00
|
|
|
|
2015-11-11 10:24:37 +00:00
|
|
|
# Make sure output is OK
|
2017-02-03 14:21:24 +00:00
|
|
|
${tools_dir}/bufr_dump $fBufrTmp > $REDIRECT
|
2015-11-10 20:45:59 +00:00
|
|
|
|
2017-02-03 14:21:24 +00:00
|
|
|
numSubsets=`${tools_dir}/bufr_get -p numberOfSubsets $fBufrTmp`
|
2015-11-11 10:24:37 +00:00
|
|
|
[ "$numSubsets" = "185" ]
|
|
|
|
|
|
|
|
rm -f $fBufrTmp
|