forked from NOAA-EMC/global-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexglobal_atmos_vminmon.sh
More file actions
executable file
·65 lines (54 loc) · 2.33 KB
/
exglobal_atmos_vminmon.sh
File metadata and controls
executable file
·65 lines (54 loc) · 2.33 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#! /usr/bin/env bash
################################################################################
#### UNIX Script Documentation Block
# . .
# Script name: exglobal_atmos_vminmon.sh
# Script description: Runs data extract/validation for GSI normalization diag data
#
# Author: Ed Safford Org: NP23 Date: 2015-04-10
#
# Abstract: This script runs the data extract/validation portion of the
# MinMon package.
#
# Condition codes
# 0 - no problem encountered
# >0 - some problem encountered
#
################################################################################
if [[ ! -s "${gsistat}" ]]; then
export err=1
err_exit "Required GSI statistics file is missing!"
fi
#-----------------------------------------------------------------------
# Copy the $MINMON_SUFFIX.gnorm_data.txt file to the working directory
# It's ok if it doesn't exist; we'll create a new one if needed.
#
# Note: The logic below is to accomodate two different data storage
# methods. Some parallels (and formerly ops) dump all MinMon data for
# a given day in the same directory (if condition). Ops now separates
# data into ${cyc} subdirectories (elif condition).
#-----------------------------------------------------------------------
if [[ -s "${M_TANKverf}/gnorm_data.txt" ]]; then
cpreq "${M_TANKverf}/gnorm_data.txt" gnorm_data.txt
elif [[ -s "${M_TANKverfM1}/gnorm_data.txt" ]]; then
cpreq "${M_TANKverfM1}/gnorm_data.txt" gnorm_data.txt
fi
#------------------------------------------------------------------
# Run the child sccripts.
#------------------------------------------------------------------
"${USHglobal}/minmon_xtrct_costs.pl" "${MINMON_SUFFIX}" "${PDY}" "${cyc}" "${gsistat}"
rc_costs=$?
echo "rc_costs = ${rc_costs}"
"${USHglobal}/minmon_xtrct_gnorms.pl" "${MINMON_SUFFIX}" "${PDY}" "${cyc}" "${gsistat}"
rc_gnorms=$?
echo "rc_gnorms = ${rc_gnorms}"
"${USHglobal}/minmon_xtrct_reduct.pl" "${MINMON_SUFFIX}" "${PDY}" "${cyc}" "${gsistat}"
rc_reduct=$?
echo "rc_reduct = ${rc_reduct}"
#####################################################################
# Postprocessing
err=$((rc_costs + rc_gnorms + rc_reduct))
export err=${err}
if [[ ${err} -ne 0 ]]; then
err_exit "One or more minimization monitor subjobs failed!!"
fi