Skip to content

Commit

Permalink
Merge pull request #137 from gsketefian/community_develop
Browse files Browse the repository at this point in the history
Community develop
  • Loading branch information
JulieSchramm authored Jan 30, 2020
2 parents 22ef0d1 + 22915e1 commit 9bc3d81
Show file tree
Hide file tree
Showing 177 changed files with 12,648 additions and 5,730 deletions.
31 changes: 20 additions & 11 deletions Externals.cfg
Original file line number Diff line number Diff line change
@@ -1,36 +1,45 @@
[ufs_utils_develop]
branch = dtc/develop
[ufs_utils]
protocol = git
repo_url = https://github.com/NCAR/UFS_UTILS
# Specify either a branch name or a hash but not both.
#branch = dtc/develop
hash = 22d9e6ad
local_path = sorc/UFS_UTILS_develop
required = True

[ufs_utils_chgres_grib2]
[ufs_utils_chgres]
protocol = git
repo_url = https://github.com/NCAR/UFS_UTILS
#Working hash of feature/chgres_grib2 branch
hash = c29174e
# Specify either a branch name or a hash but not both.
#branch = feature/chgres_grib2
hash = b47bc84c
local_path = sorc/UFS_UTILS_chgres_grib2
required = True

[NEMSfv3gfs]
branch = gmtb/develop
[ufs_weather_model]
protocol = git
repo_url = https://github.com/NCAR/NEMSfv3gfs
local_path = sorc/NEMSfv3gfs
repo_url = https://github.com/NCAR/ufs-weather-model
# Specify either a branch name or a hash but not both.
#branch = dtc/develop
hash = 4c2d541b
local_path = sorc/ufs_weather_model
required = True

[EMC_post]
branch = develop
protocol = git
repo_url = https://github.com/NOAA-EMC/EMC_post
# Specify either a branch name or a hash but not both.
#branch = develop
hash = 78078f62
local_path = sorc/EMC_post
required = True

#[gsi]
#branch = regional
#protocol = git
#repo_url = gerrit:ProdGSI
## Specify either a branch name or a hash but not both.
#branch = regional
##hash =
#local_path = sorc/regional_gsi.fd
#required = True

Expand Down
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,12 @@ This is the community\_develop branch of the regional\_workflow used to run the

This step will checkout EMC\_post, NEMSfv3gfs and its submodules, UFS\_UTILS\_chgres\_grib2 and UFS\_UTILS\_develop in the sorc directory.

2. Build the utilities:
2. Build the utilities, post and FV3:
```
cd regional
./build_regional theia >& out.build_regional
```
3. Build FV3:
```
cd sorc/NEMSfv3gfs/tests
compile.sh $BASEDIR/regional_workflow/sorc/NEMSfv3gfs/FV3 theia.intel "CCPP=Y STATIC=N 32BIT=Y REPRO=Y" >& out.compile_32bit
cd sorc
./build_all.sh
```
This step will also copy the executables to the `exec` directory and link the fix files.
4. Create a `config.sh` file in the `ush` directory (see Users Guide).
5. Generate a workflow:
```
Expand Down
91 changes: 50 additions & 41 deletions jobs/JREGIONAL_GET_EXTRN_FILES
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,32 @@
#-----------------------------------------------------------------------
#
# This script gets either from the system directory or from mass store
# (HPSS) the files generated by the external model (specified by the va-
# riable EXTRN_MDL_NAME) for either the initial conditions (ICs) or the
# (HPSS) the files generated by the external model (specified by the
# variable EXTRN_MDL_NAME) for either the initial conditions (ICs) or the
# lateral boundary conditions (LBCs). Which of these we are considering
# depends on the value of the variable ICS_OR_LBCS. Also, when we
# refer to ICs, we are also referring to the surface fields and the 0-th
# hour LBC, and when we refer to LBCs, we are referring to the LBCs ex-
# cluding the one at 0-th hour. If considering ICs, this script places
# these external model files in a subdirectory under the one specified
# by the variable EXTRN_MDL_FILES_BASEDIR_ICS, and if considering
# LBCs, it places the files in a subdirectory under the one specified by
# the variable EXTRN_MDL_FILES_BASEDIR_LBCS.
# depends on the value of the variable ICS_OR_LBCS, which should be
# defined in the environment (when calling this script from a rocoto
# workflow, the workflow should define this variable, e.g. using rocoto's
# <envar> tag).
#
# Note that when we refer to ICs, we are referring to not only the
# atmospheric fields at the initial time but also various surface fields
# (which are for now time-independent) as well as the 0-th forecast hour
# LBCs. Also, when we refer to LBCs, we are referring to the LBCs excluding
# the one at the 0-th hour.
#
#-----------------------------------------------------------------------
#

#
#-----------------------------------------------------------------------
#
# Source the variable definitions script and the function definitions
# file.
# Source the variable definitions file and the bash utility functions.
#
#-----------------------------------------------------------------------
#
. $SCRIPT_VAR_DEFNS_FP
. $USHDIR/source_funcs.sh
. ${GLOBAL_VAR_DEFNS_FP}
. $USHDIR/source_util_funcs.sh
#
#-----------------------------------------------------------------------
#
Expand All @@ -50,15 +51,27 @@
#
#-----------------------------------------------------------------------
#
# Set the script name and print out an informational message informing
# the user that we've entered this script.
# 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}" )
#
#-----------------------------------------------------------------------
#
script_name=$( basename "${BASH_SOURCE[0]}" )
print_info_msg "\n\
# Print message indicating entry into script.
#
#-----------------------------------------------------------------------
#
print_info_msg "
========================================================================
Entering script: \"${script_name}\"
Entering script: \"${scrfunc_fn}\"
In directory: \"${scrfunc_dir}\"
This is the J-job script for the task that copies/fetches to a local di-
rectory (either from disk or HPSS) the external model files from which
initial or boundary condition files for the FV3 will be generated.
Expand All @@ -79,14 +92,13 @@ case $EXTRN_MDL_NAME in
# last CDATE for the GSMGFS to the one 6 hours before this.
CDATE_max="2019061206"
if [ "$CDATE" -gt "$CDATE_max" ]; then
print_err_msg_exit "${script_name}" "\
print_err_msg_exit "\
Output from the specified external model (EXTRN_MDL_NAME) is not availa-
ble for the specified cycle date and time (CDATE) because the latter is
later than the last forecast date and time (CDATE_max) with this model:
EXTRN_MDL_NAME = \"${EXTRN_MDL_NAME}\"
CDATE_max = \"${CDATE_max}\"
CDATE = \"${CDATE}\"
"
CDATE = \"${CDATE}\""
fi
;;

Expand All @@ -98,14 +110,13 @@ later than the last forecast date and time (CDATE_max) with this model:
# CDATE_min="2019061212"
CDATE_min="2018121500"
if [ "$CDATE" -lt "$CDATE_min" ]; then
print_err_msg_exit "${script_name}" "\
print_err_msg_exit "\
Output from the specified external model (EXTRN_MDL_NAME) is not availa-
ble for the specified cycle date and time (CDATE) because the latter is
earlier than the implementation date of this model:
EXTRN_MDL_NAME = \"${EXTRN_MDL_NAME}\"
CDATE_min = \"${CDATE_min}\"
CDATE = \"${CDATE}\"
"
CDATE = \"${CDATE}\""
fi
;;

Expand All @@ -114,14 +125,13 @@ earlier than the implementation date of this model:
# July 01, 2015.
CDATE_min="2015070100"
if [ "$CDATE" -lt "$CDATE_min" ]; then
print_err_msg_exit "${script_name}" "\
print_err_msg_exit "\
Output from the specified external model (EXTRN_MDL_NAME) is not availa-
ble for the specified cycle date and time (CDATE) because the latter is
earlier than the implementation date of this model:
EXTRN_MDL_NAME = \"${EXTRN_MDL_NAME}\"
CDATE_min = \"${CDATE_min}\"
CDATE = \"${CDATE}\"
"
CDATE = \"${CDATE}\""
fi
;;

Expand All @@ -131,14 +141,13 @@ earlier than the implementation date of this model:
# ber 30, 2014.
CDATE_min="2014103000"
if [ "$CDATE" -lt "$CDATE_min" ]; then
print_err_msg_exit "${script_name}" "\
print_err_msg_exit "\
Output from the specified external model (EXTRN_MDL_NAME) is not availa-
ble for the specified cycle date and time (CDATE) because the latter is
earlier than the implementation date of this model:
EXTRN_MDL_NAME = \"${EXTRN_MDL_NAME}\"
CDATE_min = \"${CDATE_min}\"
CDATE = \"${CDATE}\"
"
CDATE = \"${CDATE}\""
fi
;;

Expand All @@ -164,12 +173,11 @@ elif [ "$ICS_OR_LBCS" = "LBCS" ]; then
TIME_OFFSET_HRS="$EXTRN_MDL_LBCS_OFFSET_HRS"
else
valid_vals_ICS_OR_LBCS_str=$( printf "\"%s\" " "${valid_vals_ICS_OR_LBCS[@]}" )
print_err_msg_exit "${script_name}" "\
print_err_msg_exit "\
Invalid value specified for ICS_OR_LBCS:
ICS_OR_LBCS = \"$ICS_OR_LBCS\"
Valid values are:
${valid_vals_ICS_OR_LBCS_str}
"
${valid_vals_ICS_OR_LBCS_str}"
fi
#
#-----------------------------------------------------------------------
Expand All @@ -191,10 +199,10 @@ EXTRN_MDL_FILES_DIR="${CYCLE_DIR}/${EXTRN_MDL_NAME}/${ICS_OR_LBCS}"
#
#-----------------------------------------------------------------------
#
mkdir_vrfy -p "$EXTRN_MDL_FILES_DIR"
cd_vrfy $EXTRN_MDL_FILES_DIR || print_err_msg_exit "${script_name}" "\
mkdir_vrfy -p "${EXTRN_MDL_FILES_DIR}"
cd_vrfy ${EXTRN_MDL_FILES_DIR} || print_err_msg_exit "\
Could not change directory to EXTRN_MDL_FILES_DIR:
EXTRN_MDL_FILES_DIR = \"$EXTRN_MDL_FILES_DIR\""
EXTRN_MDL_FILES_DIR = \"${EXTRN_MDL_FILES_DIR}\""
#
#-----------------------------------------------------------------------
#
Expand Down Expand Up @@ -237,18 +245,19 @@ $SCRIPTSDIR/exregional_get_extrn_files.sh \
EXTRN_MDL_ARCV_FPS="${EXTRN_MDL_ARCV_FPS_str}" \
EXTRN_MDL_ARCV_FMT="${EXTRN_MDL_ARCV_FMT}" \
EXTRN_MDL_ARCVREL_DIR="${EXTRN_MDL_ARCVREL_DIR}" || \
print_err_msg_exit "${script_name}" "\
Call to ex-script corresponding to J-job \"${script_name}\" failed."
print_err_msg_exit "\
Call to ex-script corresponding to J-job \"${scrfunc_fn}\" failed."
#
#-----------------------------------------------------------------------
#
# Print exit message.
#
#-----------------------------------------------------------------------
#
print_info_msg "\n\
print_info_msg "
========================================================================
Exiting script: \"${script_name}\"
Exiting script: \"${scrfunc_fn}\"
In directory: \"${scrfunc_dir}\"
========================================================================"
#
#-----------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 9bc3d81

Please sign in to comment.