forked from ufs-community/land-DA_workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck_gdas_outputs.sh
executable file
·43 lines (32 loc) · 949 Bytes
/
check_gdas_outputs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
# get OUTDIR
export SETTINGS_FILE=${1:-"settings_DA_cycle_gdas"}
source ./${SETTINGS_FILE}
export TEST_BASEDIR=${TEST_BASEDIR:-${EPICTESTS}}
for TEST_DATE in 2016-01-01_18-00-00 2016-01-02_18-00-00
do
for state in anal
do
cmp ${OUTDIR}/mem000/restarts/vector/ufs_land_restart_${state}.${TEST_DATE}.nc ${TEST_BASEDIR}/ufs_land_restart_${state}.${TEST_DATE}.nc
echo "testing ${state} on ${TEST_DATE}"
if [[ $? != 0 ]]; then
echo TEST FAILED
echo "$TEST_DATE $state are different"
exit 98
fi
done
done
#TEST_DATE=2016-01-03_18-00-00
for TEST_DATE in 2016-01-02_18-00-00 2016-01-03_18-00-00
do
state='back'
echo "testing ${state} on ${TEST_DATE}"
cmp ${OUTDIR}/mem000/restarts/vector/ufs_land_restart_${state}.${TEST_DATE}.nc ${TEST_BASEDIR}/ufs_land_restart_${state}.${TEST_DATE}.nc
if [[ $? != 0 ]]; then
echo TEST FAILED
echo "$TEST_DATE $state are different"
exit 99
fi
done
echo "TEST PASSED"
exit