forked from ufs-community/ufs-srweather-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/METplus_templates
- Loading branch information
Showing
102 changed files
with
1,084 additions
and
897 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
#!/bin/bash | ||
|
||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# This script runs wgrib2 to create various subdomain GRIB2 files from | ||
# the raw UPP-generated GRIB2 output from the run_post task of the | ||
# FV3-LAM model. | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
|
||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# Source the variable definitions file and the bash utility functions. | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
. $USHdir/source_util_funcs.sh | ||
source_config_for_task "task_run_prdgen|task_run_post" ${GLOBAL_VAR_DEFNS_FP} | ||
. $USHdir/job_preamble.sh | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# 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 wgrib2 on the output | ||
files corresponding to a specified forecast hour. | ||
========================================================================" | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# Set the run directory. | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
DATA="${DATA:-${COMIN}${SLASH_ENSMEM_SUBDIR}}" | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# If it doesn't already exist, create the directory (postprd_dir) in which | ||
# to store post-processing output. (Note that postprd_dir may already | ||
# have been created by this post-processing script run for a different | ||
# forecast hour of the same cycle and/or ensemble member.) Also, create | ||
# a temporary work directory (DATA_FHR) for the current forecast hour. | ||
# DATA_FHR will be deleted later after the processing for the current | ||
# forecast hour is complete. Then change location to DATA_FHR. | ||
# | ||
# Note that there may be a preexisting version of DATA_FHR from previous | ||
# runs of this script for the current forecast hour (and current cycle), | ||
# e.g. from the workflow task that runs this script failing and then being | ||
# called again. Thus, we first make sure preexisting versions are deleted. | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
if [ "${RUN_ENVIR}" = "community" ]; then | ||
export COMOUT="${DATA}/postprd" | ||
fi | ||
mkdir_vrfy -p "${COMOUT}" | ||
|
||
# subhourly post | ||
if [ "${SUB_HOURLY_POST}" = "TRUE" ]; then | ||
export DATA_FHR="${DATA:-$COMOUT}/$fhr$fmn" | ||
else | ||
export DATA_FHR="${DATA:-$COMOUT}/$fhr" | ||
fi | ||
check_for_preexist_dir_file "${DATA_FHR}" "delete" | ||
mkdir_vrfy -p "${DATA_FHR}" | ||
|
||
cd_vrfy "${DATA_FHR}" | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# Call the ex-script for this J-job and pass to it the necessary varia- | ||
# bles. | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
$SCRIPTSdir/exregional_run_prdgen.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 |
Oops, something went wrong.