Skip to content

Commit

Permalink
Add option to link different orog/ugwd fix files for global nest (NOA…
Browse files Browse the repository at this point in the history
…A-EMC#2532)

The global nest runs use a different set of tiles and need a different
set of orog and ugwd fix files.
The PR add an option to link correct fix files for global nest.

Resolves NOAA-EMC#2530 
Resolves NOAA-EMC#2529
  • Loading branch information
guoqing-noaa committed Apr 27, 2024
1 parent 7911f12 commit 48489b4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 11 additions & 2 deletions sorc/link_workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function usage() {
Builds all of the global-workflow components by calling the individual build
scripts in sequence.
Usage: ${BASH_SOURCE[0]} [-h][-o]
Usage: ${BASH_SOURCE[0]} [-h][-o][--nest]
-h:
Print this help message and exit
-o:
Expand All @@ -23,12 +23,17 @@ RUN_ENVIR="emc"

# Reset option counter in case this script is sourced
OPTIND=1
while getopts ":ho" option; do
while getopts ":ho-:" option; do
case "${option}" in
h) usage ;;
o)
echo "-o option received, configuring for NCO"
RUN_ENVIR="nco";;
-)
if [[ "${OPTARG}" == "nest" ]]; then
LINK_NEST=ON
fi
;;
:)
echo "[${BASH_SOURCE[0]}]: ${option} requires an argument"
usage
Expand Down Expand Up @@ -78,6 +83,10 @@ esac

# Source fix version file
source "${HOMEgfs}/versions/fix.ver"
# global-nest uses different versions of orog and ugwd
if [[ "${LINK_NEST:-OFF}" == "ON" ]] ; then
source "${HOMEgfs}/versions/fix.nest.ver"
fi

# Link wxflow in ush/python, workflow and ci/scripts
# TODO: This will be unnecessary when wxflow is part of the virtualenv
Expand Down
4 changes: 4 additions & 0 deletions versions/fix.nest.ver
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
# Fix file subfolder versions
export orog_ver=global-nest.20240419
export ugwd_ver=global-nest.20240419

0 comments on commit 48489b4

Please sign in to comment.