forked from NOAA-EMC/global-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexgdas_atmos_verfozn.sh
executable file
·50 lines (37 loc) · 1.12 KB
/
exgdas_atmos_verfozn.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
44
45
46
47
48
49
#! /usr/bin/env bash
source "${USHgfs}/preamble.sh"
################################################################################
# exgdas_atmos_verfozn.sh
#
# This script runs the data extract/validation portion of the Ozone Monitor
# (OznMon) DA package.
#
################################################################################
err=0
data_available=0
if [[ -s ${oznstat} ]]; then
data_available=1
#------------------------------------------------------------------
# Copy data files file to local data directory.
# Untar oznstat file.
#------------------------------------------------------------------
${NCP} "${oznstat}" "./oznstat.${PDY}${cyc}"
tar -xvf "oznstat.${PDY}${cyc}"
rm "oznstat.${PDY}${cyc}"
netcdf=0
count=$(ls diag* | grep ".nc4" | wc -l)
if [ "${count}" -gt 0 ] ; then
netcdf=1
for filenc4 in $(ls diag*nc4.gz); do
file=$(echo "${filenc4}" | cut -d'.' -f1-2).gz
mv "${filenc4}" "${file}"
done
fi
export OZNMON_NETCDF=${netcdf}
"${USHgfs}/ozn_xtrct.sh"
err=$?
else
# oznstat file not found
err=1
fi
exit ${err}