Ticket #522: test3.sh

File test3.sh, 4.8 KB (added by Ian Culverwell, 6 years ago)

test3.sh

Line 
1#!/bin/sh
2# Run ropp_1dvar_bangle on Stig's RE1 examples
3
4ulimit -S -s unlimited
5
6obs_file=data/atm_20160101_000028_METB_G021_R_2305_0010.nc
7
8#bgr_file=data/bgf_20160101_000028_METB_G021_R_2305_0010.nc # 60L
9#bgr_covfile=data/ropp_bg_ses_ecmwf_error_corr_L60.nc
10
11bgr_file=data/bgo_20160101_000028_METB_G021_R_2305_0010.nc # 137L
12bgr_covfile=data/ropp_bg_ses_ecmwf_error_corr_L137.nc
13
14config_file=data/ecmwf_refrac_1dvar.cf
15
16#-------------------------------------------------------------------------------
17# 0. ROPP9.0 CNTL
18#-------------------------------------------------------------------------------
19
20#if false ; then
21
22exec_base=/data/users/idculv/ROPP/ropp_src/branches/dev/Share/ROPP90_prototype/ropp_1dvar
23
24txt_file=$(echo $bgr_file |sed -es/'.nc'/'_cntl.txt'/) ; rm $txt_file ; touch $txt_file
25
26
27# Add obs errors (default obs proc = VSDC)
28# ----------------------------------------
29
30obs_file1=$(echo $obs_file |sed -es/'0010.nc'/'0010a_cntl.nc'/)
31
32exec=$exec_base/errors/ropp_1dvar_add_refrac_error
33
34echo "$exec $obs_file -Omod MO -o $obs_file1 >> $txt_file 2>&1"
35 $exec $obs_file -Omod MO -o $obs_file1 >> $txt_file 2>&1
36
37
38# Add bgr errors (default obs proc = VSFC)
39# ----------------------------------------
40
41bgr_file1=$(echo $bgr_file |sed -es/'0010.nc'/'0010a_cntl.nc'/)
42
43exec=$exec_base/errors/ropp_1dvar_add_bgr_error
44
45echo "$exec $bgr_file -c $bgr_covfile -o $bgr_file1 >> $txt_file 2>&1"
46 $exec $bgr_file -c $bgr_covfile -o $bgr_file1 >> $txt_file 2>&1
47
48
49# Run 1dvar
50# ---------
51
52out_file=$(echo $bgr_file |sed -es/'.nc'/'_cntl.nc'/)
53
54echo "ncks -H -Q -vyear,month,day,hour,minute,second $obs_file1 >> $txt_file 2>&1"
55echo "ncks -H -Q -vyear,month,day,hour,minute,second $obs_file1" >> $txt_file 2>&1
56 ncks -H -Q -vyear,month,day,hour,minute,second $obs_file1 >> $txt_file 2>&1
57
58echo "ncks -H -Q -vyear,month,day,hour,minute,second $bgr_file1 >> $txt_file 2>&1"
59echo "ncks -H -Q -vyear,month,day,hour,minute,second $bgr_file1" >> $txt_file 2>&1
60 ncks -H -Q -vyear,month,day,hour,minute,second $bgr_file1 >> $txt_file 2>&1
61
62echo "ncks -H -Q -vbg_year,bg_month,bg_day,bg_hour,bg_minute,bg_fcperiod $bgr_file1 >> $txt_file 2>&1"
63echo "ncks -H -Q -vbg_year,bg_month,bg_day,bg_hour,bg_minute,bg_fcperiod $bgr_file1" >> $txt_file 2>&1
64 ncks -H -Q -vbg_year,bg_month,bg_day,bg_hour,bg_minute,bg_fcperiod $bgr_file1 >> $txt_file 2>&1
65
66exec=$exec_base/tools/ropp_1dvar_refrac
67
68echo "$exec -y $obs_file1 -b $bgr_file1 --bg-corr $bgr_covfile -c $config_file -d -o $out_file >> $txt_file 2>&1"
69 $exec -y $obs_file1 -b $bgr_file1 --bg-corr $bgr_covfile -c $config_file -d -o $out_file >> $txt_file 2>&1
70
71
72#fi
73
74
75#-------------------------------------------------------------------------------
76# 1. ROPP9.1 TEST
77#-------------------------------------------------------------------------------
78
79exec_base=/data/users/idculv/ROPP/ropp_src/branches/dev/Share/ROPP91_prototype/ropp_1dvar
80
81txt_file=$(echo $bgr_file |sed -es/'.nc'/'_test.txt'/) ; rm $txt_file ; touch $txt_file
82
83
84# Add obs errors (default obs proc = VSDC)
85# ----------------------------------------
86
87obs_file1=$(echo $obs_file |sed -es/'0010.nc'/'0010a_test.nc'/)
88
89exec=$exec_base/errors/ropp_1dvar_add_refrac_error
90
91echo "$exec $obs_file -Omod MO -o $obs_file1 >> $txt_file 2>&1"
92 $exec $obs_file -Omod MO -o $obs_file1 >> $txt_file 2>&1
93
94
95# Add bgr errors (default obs proc = VSFC)
96# ----------------------------------------
97
98bgr_file1=$(echo $bgr_file |sed -es/'0010.nc'/'0010a_test.nc'/)
99
100exec=$exec_base/errors/ropp_1dvar_add_bgr_error
101
102echo "$exec $bgr_file -c $bgr_covfile -o $bgr_file1 >> $txt_file 2>&1"
103 $exec $bgr_file -c $bgr_covfile -o $bgr_file1 >> $txt_file 2>&1
104
105
106# Run 1dvar
107# ---------
108
109out_file=$(echo $bgr_file |sed -es/'.nc'/'_test.nc'/)
110
111echo "ncks -H -Q -vyear,month,day,hour,minute,second $obs_file1 >> $txt_file 2>&1"
112echo "ncks -H -Q -vyear,month,day,hour,minute,second $obs_file1" >> $txt_file 2>&1
113 ncks -H -Q -vyear,month,day,hour,minute,second $obs_file1 >> $txt_file 2>&1
114
115echo "ncks -H -Q -vyear,month,day,hour,minute,second $bgr_file1 >> $txt_file 2>&1"
116echo "ncks -H -Q -vyear,month,day,hour,minute,second $bgr_file1" >> $txt_file 2>&1
117 ncks -H -Q -vyear,month,day,hour,minute,second $bgr_file1 >> $txt_file 2>&1
118
119echo "ncks -H -Q -vbg_year,bg_month,bg_day,bg_hour,bg_minute,bg_fcperiod $bgr_file1 >> $txt_file 2>&1"
120echo "ncks -H -Q -vbg_year,bg_month,bg_day,bg_hour,bg_minute,bg_fcperiod $bgr_file1" >> $txt_file 2>&1
121 ncks -H -Q -vbg_year,bg_month,bg_day,bg_hour,bg_minute,bg_fcperiod $bgr_file1 >> $txt_file 2>&1
122
123exec=$exec_base/tools/ropp_1dvar_refrac
124
125echo "$exec -y $obs_file1 -b $bgr_file1 --bg-corr $bgr_covfile -c $config_file -d -o $out_file >> $txt_file 2>&1"
126 $exec -y $obs_file1 -b $bgr_file1 --bg-corr $bgr_covfile -c $config_file -d -o $out_file >> $txt_file 2>&1
127
128