Skip to content

Commit

Permalink
Fix saving GSI output files (fit, diag, stdout) for ensemble runs (NO…
Browse files Browse the repository at this point in the history
  • Loading branch information
chunhuazhou authored Jan 31, 2023
1 parent 713008a commit 84a9941
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
7 changes: 6 additions & 1 deletion jobs/JREGIONAL_RUN_ANAL
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,14 @@ gridspec_dir=${NWGES_BASEDIR}/grid_spec
#-----------------------------------------------------------------------

if [ "${RUN_ENVIR}" = "nco" ]; then
COMOUT="${COMOUT_BASEDIR}/$RUN.$PDY/$cyc${SLASH_ENSMEM_SUBDIR}"
if [ ${CYCLE_TYPE} == "spinup" ]; then
COMOUT="${COMOUT_BASEDIR}/$RUN.$PDY/${cyc}_spinup${SLASH_ENSMEM_SUBDIR}"
else
if [ ${MEM_TYPE} == "MEAN" ]; then
COMOUT="${COMOUT_BASEDIR}/$RUN.$PDY/$cyc/ensmean"
else
COMOUT="${COMOUT_BASEDIR}/$RUN.$PDY/${cyc}${SLASH_ENSMEM_SUBDIR}"
fi
fi
mkdir_vrfy -p "${COMOUT}"
fi
Expand Down
30 changes: 17 additions & 13 deletions scripts/exregional_run_analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -914,22 +914,26 @@ fi
$APRUN ./gsi.x < gsiparm.anl > stdout 2>&1 || print_err_msg_exit "\
Call to executable to run GSI returned with nonzero exit code."

if [ ${gsi_type} == "ANALYSIS" ]; then
if [ ${ob_type} == "radardbz" ]; then
if [ ${ob_type} == "radardbz" ]; then
cat fort.238 > $comout/rrfs_a.t${HH}z.fits3.tm00
else
mv fort.207 fit_rad1
sed -e 's/ asm all/ps asm 900/; s/ rej all/ps rej 900/; s/ mon all/ps mon 900/' fort.201 > fit_p1
sed -e 's/ asm all/uv asm 900/; s/ rej all/uv rej 900/; s/ mon all/uv mon 900/' fort.202 > fit_w1
sed -e 's/ asm all/ t asm 900/; s/ rej all/ t rej 900/; s/ mon all/ t mon 900/' fort.203 > fit_t1
sed -e 's/ asm all/ q asm 900/; s/ rej all/ q rej 900/; s/ mon all/ q mon 900/' fort.204 > fit_q1
sed -e 's/ asm all/pw asm 900/; s/ rej all/pw rej 900/; s/ mon all/pw mon 900/' fort.205 > fit_pw1
sed -e 's/ asm all/rw asm 900/; s/ rej all/rw rej 900/; s/ mon all/rw mon 900/' fort.209 > fit_rw1

cat fit_p1 fit_w1 fit_t1 fit_q1 fit_pw1 fit_rad1 fit_rw1 > $comout/rrfs_a.t${HH}z.fits.tm00
cat fort.208 fort.210 fort.211 fort.212 fort.213 fort.220 > $comout/rrfs_a.t${HH}z.fits2.tm00
if [ ${gsi_type} == "OBSERVER" ]; then
cat fort.238 > $comout/rrfs_a.t${HH}z.fits3.tm00
else
mv fort.207 fit_rad1
sed -e 's/ asm all/ps asm 900/; s/ rej all/ps rej 900/; s/ mon all/ps mon 900/' fort.201 > fit_p1
sed -e 's/ asm all/uv asm 900/; s/ rej all/uv rej 900/; s/ mon all/uv mon 900/' fort.202 > fit_w1
sed -e 's/ asm all/ t asm 900/; s/ rej all/ t rej 900/; s/ mon all/ t mon 900/' fort.203 > fit_t1
sed -e 's/ asm all/ q asm 900/; s/ rej all/ q rej 900/; s/ mon all/ q mon 900/' fort.204 > fit_q1
sed -e 's/ asm all/pw asm 900/; s/ rej all/pw rej 900/; s/ mon all/pw mon 900/' fort.205 > fit_pw1
sed -e 's/ asm all/rw asm 900/; s/ rej all/rw rej 900/; s/ mon all/rw mon 900/' fort.209 > fit_rw1

cat fit_p1 fit_w1 fit_t1 fit_q1 fit_pw1 fit_rad1 fit_rw1 > $comout/rrfs_a.t${HH}z.fits.tm00
cat fort.208 fort.210 fort.211 fort.212 fort.213 fort.220 > $comout/rrfs_a.t${HH}z.fits2.tm00
fi

fi

cp stdout $comout/stdout_${ob_type}
#
#-----------------------------------------------------------------------
#
Expand Down

0 comments on commit 84a9941

Please sign in to comment.