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
|
|
|
|
${tools_dir}bufr_dump $fBufrTmp > $REDIRECT
|
2015-11-10 20:45:59 +00:00
|
|
|
|
2015-11-11 10:24:37 +00:00
|
|
|
numSubsets=`${tools_dir}bufr_get -p numberOfSubsets $fBufrTmp`
|
|
|
|
[ "$numSubsets" = "185" ]
|
|
|
|
|
|
|
|
rm -f $fBufrTmp
|