Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[develop] Add radar reflectivity task. #638

Merged
Merged
118 changes: 118 additions & 0 deletions jobs/JREGIONAL_PROCESS_RADARREF
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
#!/bin/bash


#
#-----------------------------------------------------------------------
#
# This J-JOB script runs the radar reflectivity preprocess
# for the FV3-LAM model
#
danielabdi-noaa marked this conversation as resolved.
Show resolved Hide resolved
# Description:
#
# RRFS runs a pre-processing task on MRMS radar reflectivity files.
# Specifically the process_radarref task executes process_NSSL_mosaic.exe
# from rrfs-utl on files
# like MergedReflectivityQC_00.50_${YYYY}${MM}${DD}-${HH}${min}${ss}.grib2.
#
# Arguments needed for the corresponding ex-script
#
# FIXgsi
# OBSPATH_NSSLMOSIAC
# DO_SPINUP
# CYCLE_TYPE
# CYCL_HRS_SPINSTART
# CYCL_HRS_PRODSTART
# IO_LAYOUT_Y
# RADARREF_TIMELEVEL
# RADARREF_MINS
# RADAR_REF_THINNING
# OBS_SUFFIX
#
#-----------------------------------------------------------------------
#

#
#-----------------------------------------------------------------------
#
# Source the variable definitions file and the bash utility functions.
#
#-----------------------------------------------------------------------
#
. $USHdir/source_util_funcs.sh
source_config_for_task "task_process_radarref" ${GLOBAL_VAR_DEFNS_FP}
. $USHdir/job_preamble.sh "TRUE"
#
#-----------------------------------------------------------------------
#
# Save current shell options (in a global array). Then set new options
# for this script/function.
#
#-----------------------------------------------------------------------
#
{ save_shell_opts; . $USHdir/preamble.sh; } > /dev/null 2>&1
#
#-----------------------------------------------------------------------
#
# Get the full path to the file in which this script/function is located
# (scrfunc_fp), the name of that file (scrfunc_fn), and the directory in
# which the file is located (scrfunc_dir).
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
#-----------------------------------------------------------------------
#
# Print message indicating entry into script.
#
#-----------------------------------------------------------------------
#
print_info_msg "
========================================================================
Entering script: \"${scrfunc_fn}\"
In directory: \"${scrfunc_dir}\"
This is the J-job script for the task that runs a radar reflectivity
preprocess with FV3 for the specified cycle.
========================================================================"
#
#-----------------------------------------------------------------------
#
# Create the working directory under the cycle directory.
#
#-----------------------------------------------------------------------
#
if [ ${CYCLE_TYPE} == "spinup" ]; then
DATA="${DATA:-${COMIN}/process_radarref_spinup}"
else
DATA="${DATA:-${COMIN}/process_radarref}"
fi
mkdir_vrfy -p ${DATA}
#
#-----------------------------------------------------------------------
#
# Call the ex-script for this J-job and pass to it the necessary varia-
# bles.
#
#-----------------------------------------------------------------------
#
$SCRIPTSdir/exregional_process_radarref.sh || print_err_msg_exit "\
Call to ex-script corresponding to J-job \"${scrfunc_fn}\" failed."
#
#-----------------------------------------------------------------------
#
# Run job postamble.
#
#-----------------------------------------------------------------------
#
job_postamble
#
#-----------------------------------------------------------------------
#
# Restore the shell options saved at the beginning of this script/func-
# tion.
#
#-----------------------------------------------------------------------
#
{ restore_shell_opts; } > /dev/null 2>&1
Loading