forked from NOAA-EMC/global-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexglobal_enkf_select_obs.sh
More file actions
executable file
·100 lines (87 loc) · 3.33 KB
/
exglobal_enkf_select_obs.sh
File metadata and controls
executable file
·100 lines (87 loc) · 3.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#! /usr/bin/env bash
################################################################################
#### UNIX Script Documentation Block
# . .
# Script name: exgdas_enkf_select_obs.sh
# Script description: Compute global_gsi innovations
#
# Author: Rahul Mahajan Org: NCEP/EMC Date: 2017-03-02
#
# Abstract: This script computes global_gsi innovations
#
# $Id$
#
# Attributes:
# Language: POSIX shell
#
################################################################################
# Directories.
pwd=$(pwd)
# Scripts.
ANALYSISSH=${ANALYSISSH:-${SCRglobal}/exglobal_atmos_analysis.sh}
# Select obs
export RUN_SELECT=${RUN_SELECT:-"YES"}
export USE_SELECT=${USE_SELECT:-"NO"}
# Observation Operator GSI namelist initialization
SETUP_INVOBS=${SETUP_INVOBS:-""}
GRIDOPTS_INVOBS=${GRIDOPTS_INVOBS:-""}
BKGVERR_INVOBS=${BKGVERR_INVOBS:-""}
ANBKGERR_INVOBS=${ANBKGERR_INVOBS:-""}
JCOPTS_INVOBS=${JCOPTS_INVOBS:-""}
STRONGOPTS_INVOBS=${STRONGOPTS_INVOBS:-""}
OBSQC_INVOBS=${OBSQC_INVOBS:-""}
OBSINPUT_INVOBS=${OBSINPUT_INVOBS:-""}
SUPERRAD_INVOBS=${SUPERRAD_INVOBS:-""}
SINGLEOB_INVOBS=${SINGLEOB_INVOBS:-""}
LAGDATA_INVOBS=${LAGDATA_INVOBS:-""}
HYBRID_ENSEMBLE_INVOBS=${HYBRID_ENSEMBLE_INVOBS:-""}
RAPIDREFRESH_CLDSURF_INVOBS=${RAPIDREFRESH_CLDSURF_INVOBS:-""}
CHEM_INVOBS=${CHEM_INVOBS:-""}
################################################################################
# ObsInput file from ensemble mean
rm -f obs*input*
${NLN} "${SELECT_OBS}" obsinput.tar
# Whether to save or skip obs
if [[ "${RUN_SELECT}" == "YES" && "${USE_SELECT}" == "NO" ]]; then
lread_obs_save=".true."
lread_obs_skip=".false."
elif [[ "${RUN_SELECT}" == "NO" && "${USE_SELECT}" == "YES" ]]; then
lread_obs_save=".false."
lread_obs_skip=".true."
fi
################################################################################
# Innovation Specific setup for ANALYSISSH
export DIAG_SUFFIX=${DIAG_SUFFIX:-""}
export DIAG_COMPRESS=${DIAG_COMPRESS:-"NO"}
export DIAG_TARBALL=${DIAG_TARBALL:-"YES"}
export DOHYBVAR="NO"
export DO_CALC_INCREMENT="NO"
export DO_CALC_ANALYSIS="NO"
export USE_CORRELATED_OBERRS="NO"
export write_fv3_increment=".false."
# GSI Namelist options for observation operator only
export SETUP="miter=0,niter=1,lread_obs_save=${lread_obs_save},lread_obs_skip=${lread_obs_skip},lwrite_predterms=.true.,lwrite_peakwt=.true.,reduce_diag=.true.,${SETUP_INVOBS}"
export GRIDOPTS="${GRIDOPTS_INVOBS}"
export BKGVERR="bkgv_flowdep=.false.,${BKGVERR_INVOBS}"
export ANBKGERR="${ANBKGERR_INVOBS}"
export JCOPTS="${JCOPTS_INVOBS}"
export STRONGOPTS="tlnmc_option=0,nstrong=0,nvmodes_keep=0,baldiag_full=.false.,baldiag_inc=.false.,${STRONGOPTS_INVOBS}"
export OBSQC="${OBSQC_INVOBS}"
export OBSINPUT="${OBSINPUT_INVOBS}"
export SUPERRAD="${SUPERRAD_INVOBS}"
export SINGLEOB="${SINGLEOB_INVOBS}"
export LAGDATA="${LAGDATA_INVOBS}"
export HYBRID_ENSEMBLE=""
export RAPIDREFRESH_CLDSURF="${RAPIDREFRESH_CLDSURF_INVOBS}"
export CHEM="${CHEM_INVOBS}"
################################################################################
# Execute GSI as a forward operator
"${ANALYSISSH}" && true
export err=$?
if [[ ${err} -ne 0 ]]; then
err_exit "Failed to run the GSI!"
fi
################################################################################
# Postprocessing
cd "${pwd}" || exit 1
exit "${err}"