Skip to content

Commit

Permalink
disable shellcheck on external sources in this function
Browse files Browse the repository at this point in the history
  • Loading branch information
aerorahul committed Jul 13, 2023
1 parent 932be44 commit ea91d12
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion sorc/link_workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#--make symbolic links for EMC installation and hardcopies for NCO delivery

declare -r HOMEgfs="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null 2>&1 && pwd )"
HOMEgfs="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null 2>&1 && pwd )"
TRACE=NO source "${HOMEgfs}/ush/preamble.sh"

function usage() {
Expand Down
19 changes: 10 additions & 9 deletions ush/nems_configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
## This is a child script of modular
## forecast script. This script is definition only (Is it? There is nothing defined here being used outside this script.)
#####
writing_nems_configure()
{
# shellcheck disable=SC2034
writing_nems_configure() {

echo "SUB ${FUNCNAME[0]}: nems.configure.sh begins"

# Setup nems.configure
Expand Down Expand Up @@ -40,11 +41,11 @@ else
fi

local atm_model="fv3"
local atm_petlist_bounds="0 $(( ${ATMPETS}-1 ))"
local atm_petlist_bounds="0 $(( ATMPETS-1 ))"
local atm_omp_num_threads="${ATMTHREADS}"

local med_model="cmeps"
local med_petlist_bounds="0 $(( ${MEDPETS}-1 ))"
local med_petlist_bounds="0 $(( MEDPETS-1 ))"
local med_omp_num_threads="${MEDTHREADS}"

if [[ "${cpl}" = ".true." ]]; then
Expand All @@ -57,7 +58,7 @@ if [[ "${cplflx}" = ".true." ]]; then
local use_mommesh=${USE_MOMMESH:-"true"}

local ocn_model="mom6"
local ocn_petlist_bounds="${ATMPETS} $(( ${ATMPETS}+${OCNPETS}-1 ))"
local ocn_petlist_bounds="${ATMPETS} $(( ATMPETS+OCNPETS-1 ))"
local ocn_omp_num_threads="${OCNTHREADS}"
local RUNTYPE="${cmeps_run_type}"
local CPLMODE="${cplmode}"
Expand All @@ -69,7 +70,7 @@ fi
if [[ "${cplice}" = ".true." ]]; then

local ice_model="cice6"
local ice_petlist_bounds="$(( ${ATMPETS}+${OCNPETS} )) $(( ${ATMPETS}+${OCNPETS}+${ICEPETS}-1 ))"
local ice_petlist_bounds="$(( ATMPETS+OCNPETS )) $(( ATMPETS+OCNPETS+ICEPETS-1 ))"
local ice_omp_num_threads="${ICETHREADS}"
local MESH_OCN_ICE=${MESH_OCN_ICE:-"mesh.mx${ICERES}.nc"}
local FHMAX="${FHMAX_GFS}" # TODO: How did this get in here hard-wired to FHMAX_GFS?
Expand All @@ -78,7 +79,7 @@ fi
if [[ "${cplwav}" = ".true." ]]; then

local wav_model="ww3"
local wav_petlist_bounds="$(( ${ATMPETS}+${OCNPETS}+${ICEPETS} )) $(( ${ATMPETS}+${OCNPETS}+${ICEPETS}+${WAVPETS}-1 ))"
local wav_petlist_bounds="$(( ATMPETS+OCNPETS+ICEPETS )) $(( ATMPETS+OCNPETS+ICEPETS+WAVPETS-1 ))"
local wav_omp_num_threads="${WAVTHREADS}"
local MULTIGRID="${waveMULTIGRID}"

Expand All @@ -87,7 +88,7 @@ fi
if [[ "${cplchm}" = ".true." ]]; then

local chm_model="gocart"
local chm_petlist_bounds="0 $(( ${CHMPETS}-1 ))"
local chm_petlist_bounds="0 $(( CHMPETS-1 ))"
local chm_omp_num_threads="${CHMTHREADS}"
local coupling_interval_fast_sec="${CPL_FAST}"

Expand All @@ -97,7 +98,7 @@ source "${HOMEgfs}/ush/atparse.bash"
rm -f "${DATA}/nems.configure"
atparse < "${infile}" >> "${DATA}/nems.configure"

echo "$(cat nems.configure)"
cat nems.configure

${NCP} "${HOMEgfs}/sorc/ufs_model.fd/tests/parm/fd_nems.yaml" fd_nems.yaml

Expand Down

0 comments on commit ea91d12

Please sign in to comment.