1 | #/usr/bin/ksh
|
---|
2 | #
|
---|
3 | # Script to compare old and revised ECMWF BUFR libaries,
|
---|
4 | # as used at ROPP9.0 and ROPP9.1.
|
---|
5 | #
|
---|
6 |
|
---|
7 | IFILE0=data2/ropp_test_bufr # Metop-A data
|
---|
8 | IFILE0=data2/bfrPrf_KOM5.2018.182.00.04.G27_0001.0007_bufr # K5 data
|
---|
9 | IFILE0=data2/A_IUTA14BAWX160008_C_BAWX_20170616025049_bufr # FY3C data
|
---|
10 | IFILE0=data2/A_IUTA14BAWX160008_C_BAWX_20170616025049_new_bufr # FY3D data
|
---|
11 | IFILE0=data2/T_IUTF14_C_DEMS_20180223075850_G05_ROSA_MT1_bufr # MT-ROSA data
|
---|
12 | IFILE0=data2/GA-AI-3-NRT+2011_052_1100_G23_zdif_006_bufr # GRACE-A data
|
---|
13 | IFILE0=data2/GB-AI-3-NRT+2011_052_1100_G23_zdif_006_bufr # GRACE-B data
|
---|
14 | IFILE0=data2/GC-AI-3-NRT+2011_052_1100_G23_zdif_006_bufr # GRACE-C FO data
|
---|
15 | IFILE0=data2/GD-AI-3-NRT+2011_052_1100_G23_zdif_006_bufr # GRACE-D FO data
|
---|
16 |
|
---|
17 | #------------------------------------------------------
|
---|
18 | #0. Cntl: Old ECMWF BUFR: bufr_000387, built with gfortran
|
---|
19 | #------------------------------------------------------
|
---|
20 |
|
---|
21 | #if false ; then # bypass the control
|
---|
22 |
|
---|
23 | # Move the appropriate files are placed in $BUFR_TABLES, in case
|
---|
24 | # the other BUFR lib was built last. Note that we have to use the MetDB files,
|
---|
25 | # because decbufr is only an element of the MetDB BUFR library.
|
---|
26 |
|
---|
27 | #SRC_DIR=libs/bufr_000387/bufrtables
|
---|
28 | #TGT_DIR=$BUFR_LIBRARY
|
---|
29 |
|
---|
30 | #for file in C0000000000098013001.TXT ; do
|
---|
31 | # cp $SRC_DIR/$file $TGT_DIR
|
---|
32 | #done
|
---|
33 |
|
---|
34 | SRC_DIR=libs/bufr-24.0.2/extra
|
---|
35 | TGT_DIR=$BUFR_TABLES
|
---|
36 |
|
---|
37 | for file in bufr_codefig bufr_origcentre ; do
|
---|
38 | cp $SRC_DIR/$file $TGT_DIR
|
---|
39 | done
|
---|
40 |
|
---|
41 |
|
---|
42 | IFILE=$IFILE0
|
---|
43 |
|
---|
44 | # Dump the bufr
|
---|
45 | EXEC=$ROPP_ROOT/gfortran/bin/decbufr
|
---|
46 |
|
---|
47 | TFILE1=`echo $IFILE0 |sed -es/'_bufr'/'_decbufr_old'/`
|
---|
48 |
|
---|
49 | echo "$EXEC -d $IFILE > $TFILE1 2>&1"
|
---|
50 | $EXEC -d $IFILE > $TFILE1 2>&1
|
---|
51 |
|
---|
52 | # Convert to nc
|
---|
53 | EXEC=$ROPP_ROOT/gfortran/bin/bufr2ropp
|
---|
54 |
|
---|
55 | OFILE=`echo $IFILE0 |sed -es/'_bufr'/'_nc_old'/`
|
---|
56 |
|
---|
57 | TFILE=`echo $IFILE0 |sed -es/'_bufr'/'_txt_old'/`
|
---|
58 |
|
---|
59 | echo "$EXEC $IFILE -o $OFILE -d > $TFILE 2>&1"
|
---|
60 | $EXEC $IFILE -o $OFILE -d > $TFILE 2>&1
|
---|
61 |
|
---|
62 |
|
---|
63 | echo "grep 'Originating Centre' $TFILE1"
|
---|
64 | echo "grep 'Originating Sub-Centre' $TFILE1"
|
---|
65 | echo "grep 'SATELLITE IDENTIFIER' $TFILE1"
|
---|
66 | echo "grep 'SATELLITE INSTRUMENTS' $TFILE1"
|
---|
67 | echo "grep 'IDENTIFICATION OF ORIGINATING/GENERATING CENTRE' $TFILE1"
|
---|
68 |
|
---|
69 | grep 'Originating Centre' $TFILE1
|
---|
70 | grep 'Originating Centre' $TFILE1 >> $TFILE
|
---|
71 |
|
---|
72 | grep 'Originating Sub-Centre' $TFILE1
|
---|
73 | grep 'Originating Sub-Centre' $TFILE1 >> $TFILE
|
---|
74 |
|
---|
75 | grep 'SATELLITE IDENTIFIER' $TFILE1
|
---|
76 | grep 'SATELLITE IDENTIFIER' $TFILE1 >> $TFILE
|
---|
77 |
|
---|
78 | grep 'SATELLITE INSTRUMENTS' $TFILE1
|
---|
79 | grep 'SATELLITE INSTRUMENTS' $TFILE1 >> $TFILE
|
---|
80 |
|
---|
81 | grep 'SATELLITE CLASSIFICATION' $TFILE1
|
---|
82 | grep 'SATELLITE CLASSIFICATION' $TFILE1 >> $TFILE
|
---|
83 |
|
---|
84 | grep 'IDENTIFICATION OF ORIGINATING/GENERATING CENTRE' $TFILE1
|
---|
85 | grep 'IDENTIFICATION OF ORIGINATING/GENERATING CENTRE' $TFILE1 >> $TFILE
|
---|
86 |
|
---|
87 |
|
---|
88 | echo "ncks -H -Q -vleo_id,gns_id,occ_id $OFILE"
|
---|
89 | ncks -H -Q -vleo_id,gns_id,occ_id $OFILE
|
---|
90 | ncks -H -Q -vleo_id,gns_id,occ_id $OFILE >> $TFILE
|
---|
91 |
|
---|
92 | #fi # bypass the control
|
---|
93 |
|
---|
94 | #------------------------------------------------------
|
---|
95 | #1. Test: New ECMWF BUFR: bufr_000387a, built with ifort12
|
---|
96 | #------------------------------------------------------
|
---|
97 |
|
---|
98 | #if false ; then # bypass the test
|
---|
99 |
|
---|
100 | # Move the appropriate files are placed in $BUFR_TABLES, in case
|
---|
101 | # the other BUFR lib was built last. Note that we have to use the MetDB files,
|
---|
102 | # because decbufr is only an element of the MetDB BUFR library.
|
---|
103 |
|
---|
104 | #SRC_DIR=libs/bufr_000387a/bufrtables
|
---|
105 | #TGT_DIR=$BUFR_LIBRARY
|
---|
106 |
|
---|
107 | #for file in C0000000000098013001.TXT ; do
|
---|
108 | # cp $SRC_DIR/$file $TGT_DIR
|
---|
109 | #done
|
---|
110 |
|
---|
111 | SRC_DIR=libs/bufr-24.0.2a/extra
|
---|
112 | TGT_DIR=$BUFR_TABLES
|
---|
113 |
|
---|
114 | for file in bufr_codefig bufr_origcentre ; do
|
---|
115 | cp $SRC_DIR/$file $TGT_DIR
|
---|
116 | done
|
---|
117 |
|
---|
118 |
|
---|
119 | IFILE=$IFILE0
|
---|
120 |
|
---|
121 | # Dump the bufr
|
---|
122 | EXEC=$ROPP_ROOT/ifort12/bin/decbufr
|
---|
123 |
|
---|
124 | TFILE1=`echo $IFILE0 |sed -es/'_bufr'/'_decbufr_new'/`
|
---|
125 |
|
---|
126 | echo "$EXEC -d $IFILE > $TFILE1 2>&1"
|
---|
127 | $EXEC -d $IFILE > $TFILE1 2>&1
|
---|
128 |
|
---|
129 | # Convert to nc
|
---|
130 | EXEC=$ROPP_ROOT/ifort12/bin/bufr2ropp
|
---|
131 |
|
---|
132 | OFILE=`echo $IFILE0 |sed -es/'_bufr'/'_nc_new'/`
|
---|
133 |
|
---|
134 | TFILE=`echo $IFILE0 |sed -es/'_bufr'/'_txt_new'/`
|
---|
135 |
|
---|
136 | echo "$EXEC $IFILE -o $OFILE -d > $TFILE 2>&1"
|
---|
137 | $EXEC $IFILE -o $OFILE -d > $TFILE 2>&1
|
---|
138 |
|
---|
139 |
|
---|
140 | echo "grep 'Originating Centre' $TFILE1"
|
---|
141 | echo "grep 'Originating Sub-Centre' $TFILE1"
|
---|
142 | echo "grep 'SATELLITE IDENTIFIER' $TFILE1"
|
---|
143 | echo "grep 'SATELLITE INSTRUMENTS' $TFILE1"
|
---|
144 | echo "grep 'IDENTIFICATION OF ORIGINATING/GENERATING CENTRE' $TFILE1"
|
---|
145 |
|
---|
146 | grep 'Originating Centre' $TFILE1
|
---|
147 | grep 'Originating Centre' $TFILE1 >> $TFILE
|
---|
148 |
|
---|
149 | grep 'Originating Sub-Centre' $TFILE1
|
---|
150 | grep 'Originating Sub-Centre' $TFILE1 >> $TFILE
|
---|
151 |
|
---|
152 | grep 'SATELLITE IDENTIFIER' $TFILE1
|
---|
153 | grep 'SATELLITE IDENTIFIER' $TFILE1 >> $TFILE
|
---|
154 |
|
---|
155 | grep 'SATELLITE INSTRUMENTS' $TFILE1
|
---|
156 | grep 'SATELLITE INSTRUMENTS' $TFILE1 >> $TFILE
|
---|
157 |
|
---|
158 | grep 'SATELLITE CLASSIFICATION' $TFILE1
|
---|
159 | grep 'SATELLITE CLASSIFICATION' $TFILE1 >> $TFILE
|
---|
160 |
|
---|
161 | grep 'IDENTIFICATION OF ORIGINATING/GENERATING CENTRE' $TFILE1
|
---|
162 | grep 'IDENTIFICATION OF ORIGINATING/GENERATING CENTRE' $TFILE1 >> $TFILE
|
---|
163 |
|
---|
164 |
|
---|
165 | echo "ncks -H -Q -vleo_id,gns_id,occ_id $OFILE"
|
---|
166 | ncks -H -Q -vleo_id,gns_id,occ_id $OFILE
|
---|
167 | ncks -H -Q -vleo_id,gns_id,occ_id $OFILE >> $TFILE
|
---|
168 |
|
---|
169 | #fi # bypass the test
|
---|