Ticket #377: test1.sh

File test1.sh, 2.5 KB (added by Ian Culverwell, 10 years ago)
Line 
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
10IFILE0=ropp_test.nc
11
12cp /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
16ncatted -h -ainstitution,global,o,c,"CMA" $IFILE0
17ncdump -h $IFILE0 |grep institution
18
19
20ncatted -h -aprocessing_centre,global,o,c,"CMA" $IFILE0
21ncdump -h $IFILE0 |grep processing_centre
22
23
24ncap2 -h -s 'gns_id(:,0:3)="B027";leo_id(:,0:3)="FY3C"' $IFILE0 -O temp.nc
25mv temp.nc $IFILE0
26ncks -H -vgns_id,leo_id $IFILE0
27
28
29# -------------------
30# Cntl: ROPP6.1 ifort
31# -------------------
32
33NLFILE=roppbufrcodes_old.nl
34
35cp $NLFILE /data/nwp1/idculv/ROPP/data/bufr/roppbufrcodes.nl
36
37TOOL=ropp_io/tools/ropp2bufr
38
39EXEC=/data/nwp1/idculv/ROPP/ropp_src/branches/dev/Share/ROPP61_prototype/$TOOL
40
41IFILE=$IFILE0
42
43OFILE=`echo $IFILE |sed -es/'.nc'/'_cntl.bufr'/`
44TFILE=`echo $IFILE |sed -es/'.nc'/'_cntl.out'/`
45
46echo "$EXEC $IFILE -o $OFILE -d"
47echo "$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
64NLFILE=roppbufrcodes_new.nl
65#NLFILE=roppbufrcodes_old.nl
66
67cp $NLFILE /data/nwp1/idculv/ROPP/data/bufr/roppbufrcodes.nl
68
69TOOL=ropp_io/tools/ropp2bufr
70
71EXEC=/data/nwp1/idculv/ROPP/ropp_src/branches/dev/Share/ROPP80_prototype/$TOOL
72
73IFILE=$IFILE0
74
75OFILE=`echo $IFILE |sed -es/'.nc'/'_test.bufr'/`
76TFILE=`echo $IFILE |sed -es/'.nc'/'_test.out'/`
77
78echo "$EXEC $IFILE -o $OFILE -d"
79echo "$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