1 | #/usr/bin/ksh
|
---|
2 | #
|
---|
3 | # Script to test effect of allowing FY3C data in
|
---|
4 | # ropp_io/bufr/roppbufrcodes.nl and ropp_io/bufr/convertcodes.f90.
|
---|
5 | # Ref #377.
|
---|
6 | #
|
---|
7 | # IDC, 28/7/2014.
|
---|
8 | #
|
---|
9 |
|
---|
10 | IFILE0=ropp_test.nc
|
---|
11 |
|
---|
12 | cp /data/nwp1/idculv/ROPP/ropp_src/branches/dev/Share/ROPP80_prototype/ropp_io/data/$IFILE0 .
|
---|
13 |
|
---|
14 | # Make this appear to come from FY3C.
|
---|
15 |
|
---|
16 | ncatted -h -ainstitution,global,o,c,"CMA" $IFILE0
|
---|
17 | ncdump -h $IFILE0 |grep institution
|
---|
18 |
|
---|
19 |
|
---|
20 | ncatted -h -aprocessing_centre,global,o,c,"CMA" $IFILE0
|
---|
21 | ncdump -h $IFILE0 |grep processing_centre
|
---|
22 |
|
---|
23 |
|
---|
24 | ncap2 -h -s 'gns_id(:,0:3)="B027";leo_id(:,0:3)="FY3C"' $IFILE0 -O temp.nc
|
---|
25 | mv temp.nc $IFILE0
|
---|
26 | ncks -H -vgns_id,leo_id $IFILE0
|
---|
27 |
|
---|
28 |
|
---|
29 | # -------------------
|
---|
30 | # Cntl: ROPP6.1 ifort
|
---|
31 | # -------------------
|
---|
32 |
|
---|
33 | NLFILE=roppbufrcodes_old.nl
|
---|
34 |
|
---|
35 | cp $NLFILE /data/nwp1/idculv/ROPP/data/bufr/roppbufrcodes.nl
|
---|
36 |
|
---|
37 | TOOL=ropp_io/tools/ropp2bufr
|
---|
38 |
|
---|
39 | EXEC=/data/nwp1/idculv/ROPP/ropp_src/branches/dev/Share/ROPP61_prototype/$TOOL
|
---|
40 |
|
---|
41 | IFILE=$IFILE0
|
---|
42 |
|
---|
43 | OFILE=`echo $IFILE |sed -es/'.nc'/'_cntl.bufr'/`
|
---|
44 | TFILE=`echo $IFILE |sed -es/'.nc'/'_cntl.out'/`
|
---|
45 |
|
---|
46 | echo "$EXEC $IFILE -o $OFILE -d"
|
---|
47 | echo "$EXEC $IFILE -o $OFILE -d" > $TFILE
|
---|
48 | $EXEC $IFILE -o $OFILE -d >> $TFILE
|
---|
49 |
|
---|
50 |
|
---|
51 | $ROPP_ROOT/ifort/bin/decbufr -d $OFILE |grep "Originating Centre" >> $TFILE
|
---|
52 | $ROPP_ROOT/ifort/bin/decbufr -d $OFILE |grep "SATELLITE IDENTIFIER" >> $TFILE
|
---|
53 | $ROPP_ROOT/ifort/bin/decbufr -d $OFILE |grep "SATELLITE INSTRUMENTS" >> $TFILE
|
---|
54 | $ROPP_ROOT/ifort/bin/decbufr -d $OFILE |grep "IDENTIFICATION OF ORIGINATING/GENERATING CENTRE" >> $TFILE
|
---|
55 | $ROPP_ROOT/ifort/bin/decbufr -d $OFILE |grep "SATELLITE CLASSIFICATION" >> $TFILE
|
---|
56 |
|
---|
57 |
|
---|
58 |
|
---|
59 |
|
---|
60 | # --------------
|
---|
61 | # Test1: ROPP8.0
|
---|
62 | # --------------
|
---|
63 |
|
---|
64 | NLFILE=roppbufrcodes_new.nl
|
---|
65 | #NLFILE=roppbufrcodes_old.nl
|
---|
66 |
|
---|
67 | cp $NLFILE /data/nwp1/idculv/ROPP/data/bufr/roppbufrcodes.nl
|
---|
68 |
|
---|
69 | TOOL=ropp_io/tools/ropp2bufr
|
---|
70 |
|
---|
71 | EXEC=/data/nwp1/idculv/ROPP/ropp_src/branches/dev/Share/ROPP80_prototype/$TOOL
|
---|
72 |
|
---|
73 | IFILE=$IFILE0
|
---|
74 |
|
---|
75 | OFILE=`echo $IFILE |sed -es/'.nc'/'_test.bufr'/`
|
---|
76 | TFILE=`echo $IFILE |sed -es/'.nc'/'_test.out'/`
|
---|
77 |
|
---|
78 | echo "$EXEC $IFILE -o $OFILE -d"
|
---|
79 | echo "$EXEC $IFILE -o $OFILE -d" > $TFILE
|
---|
80 | $EXEC $IFILE -o $OFILE -d >> $TFILE
|
---|
81 |
|
---|
82 |
|
---|
83 | $ROPP_ROOT/ifort/bin/decbufr -d $OFILE |grep "Originating Centre" >> $TFILE
|
---|
84 | $ROPP_ROOT/ifort/bin/decbufr -d $OFILE |grep "SATELLITE IDENTIFIER" >> $TFILE
|
---|
85 | $ROPP_ROOT/ifort/bin/decbufr -d $OFILE |grep "SATELLITE INSTRUMENTS" >> $TFILE
|
---|
86 | $ROPP_ROOT/ifort/bin/decbufr -d $OFILE |grep "IDENTIFICATION OF ORIGINATING/GENERATING CENTRE" >> $TFILE
|
---|
87 | $ROPP_ROOT/ifort/bin/decbufr -d $OFILE |grep "SATELLITE CLASSIFICATION" >> $TFILE
|
---|