File: bufr_dump.sh

package info (click to toggle)
eccodes 2.44.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 150,248 kB
  • sloc: cpp: 163,056; ansic: 26,308; sh: 21,602; f90: 6,854; perl: 6,363; python: 5,087; java: 2,226; javascript: 1,427; yacc: 854; fortran: 543; lex: 359; makefile: 285; xml: 183; awk: 66
file content (41 lines) | stat: -rwxr-xr-x 1,501 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
set -e 

echo "-# To dump BUFR messages into a flat JSON format.\\n"
echo "\\verbatim"
echo  ">bufr_dump -jf ../data/bufr/aaen_55.bufr"
echo "\\endverbatim\\n"

echo "-# To dump BUFR messages into a structured JSON format. Note: This is the default if you omit the -j option\\n"
echo "\\verbatim"
echo  ">bufr_dump -js ../data/bufr/aaen_55.bufr"
echo "\\endverbatim\\n"

echo "-# To dump a Fortran program with instructions to create (<b>encode</b>) the input message.\\n"
echo "\\verbatim"
echo  ">bufr_dump -Efortran ../data/bufr/aaen_55.bufr > encode.aaen_55.f90"
echo "\\endverbatim\\n"
echo  "Now compile and run 'encode.aaen_55.f90'. This will create a new BUFR file called 'outfile.bufr'."
echo  "Check this is the the same as the input."
echo "\\verbatim"
echo  ">bufr_compare ../data/bufr/aaen_55.bufr outfile.bufr"
echo "\\endverbatim\\n"


echo "-# To dump a Python program with instructions to <b>decode</b> the input message.\\n"
echo "\\verbatim"
echo  ">bufr_dump -Dpython ../data/bufr/aaen_55.bufr > decode.aaen_55.py"
echo "\\endverbatim\\n"
echo  "Examine the generated Python script 'decode.aaen_55.py'. You will see how to access each of the BUFR keys"


echo "-# To dump in a WMO documentation style with hexadecimal octet values (-H).\\n"
echo "\\verbatim"
echo  ">bufr_dump -OH ../data/bufr/syno_1.bufr"
echo "\\endverbatim\\n"


echo "-# To add key type information (-t).\\n"
echo "\\verbatim"
echo  ">bufr_dump -OtH ../data/bufr/syno_1.bufr"
echo "\\endverbatim\\n"