Ticket #429: test1.sh

File test1.sh, 2.4 KB (added by Ian Culverwell, 9 years ago)

test1.sh

Line 
1#/usr/bin/ksh
2#
3# Script to test the -l option to eum2ropp, by emulating Axel's studies.
4#
5
6DIR=/data/nwp1/idculv/ROPP/ropp_src/branches/dev/Share/ROPP81_prototype/ropp_io/tools
7
8IFILE0=data/GRAS_1B_M02_20080701000214Z_20080701000329Z_R_O_20150413081448Z_G19_NN.nc
9
10input=$IFILE0
11
12
13
14# run with -l to netCDF
15output1="eum2ropp_l1a.nc"
16echo "Generating netCDF file with level 1a content: " $output1
17$DIR/eum2ropp -l $input -o $output1 > /dev/null
18echo "r_leo from eum2ropp -l:"
19ncdump -h $output1 | grep 'r_leo:reference_frame'
20ncks -H -Q -ddim_lev1a,0 -vr_leo $output1
21echo ""
22echo ""
23
24# run without to netCDF
25output2="eum2ropp_l1b.nc"
26echo "Generating netCDF file without level 1a content: " $output1
27$DIR/eum2ropp $input -o $output2 > /dev/null
28echo "r_leo from eum2ropp:"
29ncdump -h $output2 | grep 'r_leo:reference_frame'
30ncks -H -Q -ddim_lev1a,0 -vr_leo $output2
31echo ""
32echo ""
33
34
35
36# generate bufr from the 2
37output3="eum2ropp_l1a.nc.bufr"
38echo "Generating BUFR file from ROPP file with level 1a content: " $output3
39$DIR/ropp2bufr $output1 -o $output3 > /dev/null
40echo "r_leo from eum2ropp -l | ropp2bufr:"
41$ROPP_ROOT/gfortran/bin/decbufr -d $output3 | grep 'IN DIRECTION' | head -3
42echo ""
43echo ""
44
45output4="eum2ropp_l1b.nc.bufr"
46echo "Generating BUFR file from ROPP file without level 1a content: " $output4
47$DIR/ropp2bufr $output2 -o $output4 > /dev/null
48echo "r_leo from eum2ropp | ropp2bufr:"
49$ROPP_ROOT/gfortran/bin/decbufr -d $output4 | grep 'IN DIRECTION' | head -3
50echo ""
51echo ""
52
53
54
55# go back to netcdf with the 2
56output5="eum2ropp_l1a.nc.bufr.nc"
57echo "Generating netCDF file from BUFR file with level 1a content: " $output5
58$DIR/bufr2ropp $output3 -o $output5 > /dev/null
59echo "r_leo from eum2ropp -l | ropp2bufr | bufr2ropp:"
60ncdump -h $output5 | grep 'r_leo:reference_frame'
61ncks -H -Q -ddim_lev1a,0 -vr_leo $output5
62echo ""
63echo ""
64
65output6="eum2ropp_l1b.nc.bufr.nc"
66echo "Generating BUFR file from ROPP file without level 1a content: " $output6
67$DIR/bufr2ropp $output4 -o $output6 > /dev/null
68echo "r_leo from eum2ropp | ropp2bufr | bufr2ropp:"
69ncdump -h $output6 | grep 'r_leo:reference_frame'
70ncks -H -Q -ddim_lev1a,0 -vr_leo $output6
71echo ""
72echo ""
73
74
75
76
77
78
79
80echo "**** Axel's equivalent output ***"
81
82# show r_leo of the two
83echo "r_leo when going with level 1a:"
84ncdump -v r_leo $output5 | tail -5
85echo ""
86echo ""
87
88# show r_leo of the two
89echo "r_leo when going without level 1a:"
90ncdump -v r_leo $output6 | tail -5
91