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 smoke and dust capability #1127

Open
wants to merge 64 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
d5f30b4
change hash to prod for smoke/dust
chan-hoo Aug 15, 2024
8bac931
add scripts for smoke/dust
chan-hoo Aug 15, 2024
c5f546e
add hrrr_gf suite
chan-hoo Aug 15, 2024
9752184
add config for smoke/dust
chan-hoo Aug 16, 2024
56c3c12
add config for smoke/dust
chan-hoo Aug 16, 2024
49b3050
add input files for smoke/dust
chan-hoo Aug 16, 2024
58824aa
add separate external.cfg for smoke/dust
chan-hoo Aug 16, 2024
fa2fcac
update config yaml
chan-hoo Aug 16, 2024
236a1ba
update config yaml
chan-hoo Aug 16, 2024
c6bf03f
modify ex-script for smoke/dust
chan-hoo Aug 16, 2024
a0281b6
add hrrr_gf to fv3.input.yml
chan-hoo Aug 19, 2024
c6f7766
add fix dir to config
chan-hoo Aug 19, 2024
1a74100
fix smoke/dust script
chan-hoo Aug 19, 2024
9bbd61b
change branch to hash
chan-hoo Aug 19, 2024
9ac98e0
add prepstart
chan-hoo Aug 20, 2024
467489d
add prepstart to xml yaml
chan-hoo Aug 20, 2024
50100c4
fix missing orog
chan-hoo Aug 20, 2024
459ae24
add ccpp suite for orog
chan-hoo Aug 20, 2024
bcff5cf
update smoke_dust scripts
chan-hoo Aug 20, 2024
6351291
add python shebang
chan-hoo Aug 20, 2024
653057d
fix error in smoke dust ex-script
chan-hoo Aug 20, 2024
5f18707
add set ff=unix
chan-hoo Aug 20, 2024
9f14138
fix python packages and script issues
chan-hoo Aug 21, 2024
711fc17
change path to results
chan-hoo Aug 21, 2024
9e2ab85
fix missing fix files
chan-hoo Aug 22, 2024
dcc62a5
update prepstart scripts
chan-hoo Aug 22, 2024
bf63694
add dependency for smoke dust in first cycle
chan-hoo Aug 23, 2024
581d7d5
fix ccpp namelist
chan-hoo Aug 23, 2024
69877d3
adjust forecast walltime
chan-hoo Aug 23, 2024
81a77db
add separate post script
chan-hoo Aug 24, 2024
50083a6
change output file name
chan-hoo Aug 24, 2024
2e5f440
fix post xml issue
chan-hoo Aug 25, 2024
40a10c9
change cp to ln
chan-hoo Aug 25, 2024
cb6e67c
parameterize ebb_dcycle
chan-hoo Aug 25, 2024
9f46fac
add link to restart dir
chan-hoo Aug 25, 2024
b98d4be
change restart link command loc
chan-hoo Aug 25, 2024
3676a4b
add separate forecast script to meet nco standard
chan-hoo Aug 26, 2024
a260463
fix new forecast script issues
chan-hoo Aug 27, 2024
746610c
run_fcst script back to origin
chan-hoo Aug 27, 2024
90e092c
add if statement
chan-hoo Aug 27, 2024
be3423b
fix dependency issue in xml
chan-hoo Aug 27, 2024
733c3cb
fix xarray file permission issue
chan-hoo Aug 27, 2024
cc93bd3
add print to python script
chan-hoo Aug 27, 2024
55d8d93
add smoke flag to devbuild
chan-hoo Aug 27, 2024
3b12dae
Merge branch 'develop' of https://github.com/chan-hoo/ufs-srweather-a…
chan-hoo Aug 27, 2024
6f135d7
update log script to reduce file size
chan-hoo Aug 27, 2024
5979d18
remove duplicates from aqm scripts
chan-hoo Aug 27, 2024
a2a7b94
introduct upp_post yaml
chan-hoo Aug 27, 2024
e7eda1a
fix crontab issue
chan-hoo Aug 28, 2024
2aa28a5
remove aqm_ics_ext
chan-hoo Aug 28, 2024
4bcd126
fix missing file issue on aqm_ics
chan-hoo Aug 28, 2024
8aec48b
fix issues on aqm_ics and upp_post
chan-hoo Aug 28, 2024
113500d
increase file age for aqm_ics dependency
chan-hoo Aug 28, 2024
4f42898
add smoke_dust to we2e
chan-hoo Aug 30, 2024
e73952e
update we2e test scripts fro aqm and smoke/dust
chan-hoo Sep 3, 2024
69cde17
update sample smoke config file
chan-hoo Sep 4, 2024
5e6db81
update machine files for other machines
chan-hoo Sep 4, 2024
3b88429
update module files for orion
chan-hoo Sep 4, 2024
45b57f5
add pre_task_cmds to smoke/dust
chan-hoo Sep 5, 2024
29125e6
fix modulefile issue on we2e run script
chan-hoo Sep 5, 2024
f0a323d
Merge branch 'develop' of https://github.com/chan-hoo/ufs-srweather-a…
chan-hoo Sep 6, 2024
ea6f79c
fix typo in coldstart.yaml
chan-hoo Sep 6, 2024
d47b1fe
activate smoke_dust for first cycle
chan-hoo Sep 9, 2024
12b879f
Merge branch 'develop' of https://github.com/chan-hoo/ufs-srweather-a…
chan-hoo Sep 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions Externals_smoke_dust.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[ufs_utils]
protocol = git
repo_url = https://github.com/ufs-community/UFS_UTILS
# Specify either a branch name or a hash but not both.
#branch = develop
hash = 33cc663
local_path = sorc/UFS_UTILS
required = True

[ufs-weather-model]
protocol = git
repo_url = https://github.com/ufs-community/ufs-weather-model
# Specify either a branch name or a hash but not both.
#branch = production/RRFS.v1
hash = ce43a6f
local_path = sorc/ufs-weather-model
required = True

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

[externals_description]
schema_version = 1.0.0
13 changes: 11 additions & 2 deletions devbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ OPTIONS
compiler to use; default depends on platform
(e.g. intel | gnu | cray | gccgfortran)
-a, --app=APPLICATION
weather model application to build; for example, ATMAQ for Online-CMAQ
weather model application to build; for example, ATMAQ for SRW-AQM
(e.g. ATM | ATMAQ | ATMW | S2S | S2SW)
--ccpp="CCPP_SUITE1,CCPP_SUITE2..."
CCPP suites (CCPP_SUITES) to include in build; delimited with ','
Expand Down Expand Up @@ -50,6 +50,8 @@ OPTIONS
number of build jobs; defaults to 4
--use-sub-modules
Use sub-component modules instead of top-level level SRW modules
--smoke
Build the app for Smoke and Dust (with production branch)
-v, --verbose
build with verbose output

Expand Down Expand Up @@ -82,6 +84,7 @@ Settings:
DISABLE_OPTIONS=${DISABLE_OPTIONS}
REMOVE=${REMOVE}
CONTINUE=${CONTINUE}
SMOKE=${SMOKE}
BUILD_TYPE=${BUILD_TYPE}
BUILD_JOBS=${BUILD_JOBS}
VERBOSE=${VERBOSE}
Expand Down Expand Up @@ -114,6 +117,7 @@ BUILD_TYPE="RELEASE"
BUILD_JOBS=4
REMOVE=false
CONTINUE=false
SMOKE=false
VERBOSE=false

# Turn off all apps to build and choose default later
Expand Down Expand Up @@ -160,6 +164,7 @@ while :; do
--clean) CLEAN=true ;;
--build) BUILD=true ;;
--move) MOVE=true ;;
--smoke) SMOKE=true ;;
--build-dir=?*) BUILD_DIR=${1#*=} ;;
--build-dir|--build-dir=) usage_error "$1 requires argument." ;;
--install-dir=?*) INSTALL_DIR=${1#*=} ;;
Expand Down Expand Up @@ -314,7 +319,11 @@ if [ -f ${RUN_VERSION_FILE} ]; then
fi

# set MODULE_FILE for this platform/compiler combination
MODULE_FILE="build_${PLATFORM}_${COMPILER}"
if [ "${SMOKE}" = true ]; then
MODULE_FILE="build_${PLATFORM}_${COMPILER}_prod"
else
MODULE_FILE="build_${PLATFORM}_${COMPILER}"
fi
if [ ! -f "${SRW_DIR}/modulefiles/${MODULE_FILE}.lua" ]; then
printf "ERROR: module file does not exist for platform/compiler\n" >&2
printf " MODULE_FILE=${MODULE_FILE}\n" >&2
Expand Down
7 changes: 7 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@ dependencies:
- pylint=2.17*
- pytest=7.2*
- uwtools=2.3*
- esmpy=8.6.*
- netcdf4=1.6.*
- numpy=1.23.*
- pandas=1.5.*
- scipy=1.10.*
- xarray=2022.11.*

5 changes: 4 additions & 1 deletion jobs/JREGIONAL_MAKE_ICS
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#-----------------------------------------------------------------------
#
. $USHdir/source_util_funcs.sh
for sect in user nco workflow ; do
for sect in user nco workflow cpl_aqm_parm smoke_dust_parm ; do
source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect}
done
. $USHdir/job_preamble.sh
Expand Down Expand Up @@ -103,6 +103,9 @@ if [ $RUN_ENVIR = "community" ]; then
mkdir -p $DATA
cd $DATA
fi
if [ $(boolify "${CPL_AQM}") = "TRUE" ] || [ $(boolify "${DO_SMOKE_DUST}") = "TRUE" ]; then
mkdir -p ${DATA_SHARE}
fi
#
#-----------------------------------------------------------------------
#
Expand Down
5 changes: 4 additions & 1 deletion jobs/JREGIONAL_MAKE_LBCS
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#-----------------------------------------------------------------------
#
. $USHdir/source_util_funcs.sh
for sect in user nco workflow ; do
for sect in user nco workflow cpl_aqm_parm smoke_dust_parm ; do
source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect}
done
. $USHdir/job_preamble.sh
Expand Down Expand Up @@ -100,6 +100,9 @@ if [ "${RUN_ENVIR}" = "community" ]; then
mkdir -p $DATA
cd $DATA
fi
if [ $(boolify "${CPL_AQM}") = "TRUE" ] || [ $(boolify "${DO_SMOKE_DUST}") = "TRUE" ]; then
mkdir -p ${DATA_SHARE}
fi
#
#-----------------------------------------------------------------------
#
Expand Down
18 changes: 2 additions & 16 deletions jobs/JSRW_AQM_ICS
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ export RUN="${RUN:-${RUN_default}}"

[[ "$WORKFLOW_MANAGER" = "rocoto" ]] && export COMROOT=$COMROOT
if [ "${MACHINE}" = "WCOSS2" ]; then
export COMIN="${COMIN:-$(compath.py -o ${NET}/${model_ver}/${RUN}.${PDY}/${cyc}${SLASH_ENSMEM_SUBDIR})}"
export COMIN="${COMIN:-$(compath.py -o ${NET}/${model_ver})}"
export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${model_ver}/${RUN}.${PDY}/${cyc}${SLASH_ENSMEM_SUBDIR})}"
else
export COMIN="${COMIN:-${COMROOT}/${NET}/${model_ver}/${RUN}.${PDY}/${cyc}${SLASH_ENSMEM_SUBDIR}}"
export COMIN="${COMIN:-${COMROOT}/${NET}/${model_ver}}"
export COMOUT="${COMOUT:-${COMROOT}/${NET}/${model_ver}/${RUN}.${PDY}/${cyc}${SLASH_ENSMEM_SUBDIR}}"
fi

Expand Down Expand Up @@ -140,20 +140,6 @@ fi
#
#-----------------------------------------------------------------------
#
# Set the name of and create the directory in which the output from this
# script will be placed (if it doesn't already exist).
#
#-----------------------------------------------------------------------
#
if [ $RUN_ENVIR = "nco" ]; then
export INPUT_DATA="${COMIN}"
else
export INPUT_DATA="${COMIN}${SLASH_ENSMEM_SUBDIR}/INPUT"
fi
mkdir -p "${INPUT_DATA}"
#
#-----------------------------------------------------------------------
#
# Call the ex-script for this J-job.
#
#-----------------------------------------------------------------------
Expand Down
14 changes: 0 additions & 14 deletions jobs/JSRW_AQM_LBCS
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,6 @@ fi
#
#-----------------------------------------------------------------------
#
# Set the name of and create the directory in which the output from this
# script will be placed (if it doesn't already exist).
#
#-----------------------------------------------------------------------
#
if [ $RUN_ENVIR = "nco" ]; then
export INPUT_DATA="${COMIN}"
else
export INPUT_DATA="${EXPTDIR}/${PDY}${cyc}${SLASH_ENSMEM_SUBDIR}/INPUT"
fi
mkdir -p "${INPUT_DATA}"
#
#-----------------------------------------------------------------------
#
# Call the ex-script for this J-job.
#
#-----------------------------------------------------------------------
Expand Down
184 changes: 184 additions & 0 deletions jobs/JSRW_FORECAST
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
#!/usr/bin/env bash

#
#-----------------------------------------------------------------------
#
# The J-Job that runs the forecast
#
#-----------------------------------------------------------------------
#
date
export PS4='+ $SECONDS + '
set -xue
#
#-----------------------------------------------------------------------
#
# Set the NCO standard environment variables (Table 1, pp.4)
#
#-----------------------------------------------------------------------
#
export USHsrw="${HOMEdir}/ush"
export EXECsrw="${HOMEdir}/exec"
export PARMsrw="${HOMEdir}/parm"
export SCRIPTSsrw="${HOMEdir}/scripts"
#
#-----------------------------------------------------------------------
#
# Source the variable definitions file and the bash utility functions.
#
#-----------------------------------------------------------------------
#
export USHdir="${USHsrw}" # should be removed later
. ${USHsrw}/source_util_funcs.sh
#
#-----------------------------------------------------------------------
#
# Run-time environment variables:
#
# CDATE
# COMIN
# DATA
# GLOBAL_VAR_DEFNS_FP
# SLASH_ENSMEM_SUBDIR
#
# Experiment variables
#
# user:
# SCRIPTSdir
# USHdir
#
#-----------------------------------------------------------------------
#
for sect in user nco platform workflow global ; do
source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect}
done
#
#-----------------------------------------------------------------------
#
# 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 forecast with FV3 for
the specified cycle.
========================================================================"
#
#-----------------------------------------------------------------------
#
# Define job and jobid by default for rocoto
#
#-----------------------------------------------------------------------
#
WORKFLOW_MANAGER="${WORKFLOW_MANAGER:-rocoto}"
if [ "${WORKFLOW_MANAGER}" = "rocoto" ]; then
if [ "${SCHED}" = "slurm" ]; then
job=${SLURM_JOB_NAME}
pid=${SLURM_JOB_ID}
elif [ "${SCHED}" = "pbspro" ]; then
job=${PBS_JOBNAME}
pid=${PBS_JOBID}
else
job="task"
pid=$$
fi
jobid="${job}.${PDY}${cyc}.${pid}"
fi
#
#-----------------------------------------------------------------------
#
# Create a temp working directory (DATA) and cd into it.
#
#-----------------------------------------------------------------------
#
export DATA="${DATA:-${DATAROOT}/${jobid}}"
mkdir -p $DATA
cd $DATA
#
#-----------------------------------------------------------------------
#
# Define NCO environment variables and set COM type definitions.
#
#-----------------------------------------------------------------------
#
export NET="${NET:-${NET_default}}"
export RUN="${RUN:-${RUN_default}}"

[[ "$WORKFLOW_MANAGER" = "rocoto" ]] && export COMROOT=$COMROOT
if [ "${MACHINE}" = "WCOSS2" ]; then
export COMIN="${COMIN:-$(compath.py -o ${NET}/${model_ver}/${RUN}.${PDY}/${cyc}${SLASH_ENSMEM_SUBDIR})}"
export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${model_ver}/${RUN}.${PDY}/${cyc}${SLASH_ENSMEM_SUBDIR})}"
else
export COMIN="${COMIN:-${COMROOT}/${NET}/${model_ver}/${RUN}.${PDY}/${cyc}${SLASH_ENSMEM_SUBDIR}}"
export COMOUT="${COMOUT:-${COMROOT}/${NET}/${model_ver}/${RUN}.${PDY}/${cyc}${SLASH_ENSMEM_SUBDIR}}"
fi

mkdir -p ${COMOUT}

# Create a teomporary share directory for RAVE interpolated data files
export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}${cyc}}"
mkdir -p ${DATA_SHARE}

# Run setpdy to initialize PDYm and PDYp variables
export cycle="${cycle:-t${cyc}z}"
setpdy.sh
. ./PDY
#
#-----------------------------------------------------------------------
#
# Set sub-cycle and ensemble member names in file/diectory names
#
#-----------------------------------------------------------------------
#
if [ ${subcyc} -ne 0 ]; then
export cycle="t${cyc}${subcyc}z"
fi
if [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then
export dot_ensmem=".mem${ENSMEM_INDX}"
else
export dot_ensmem=
fi
#
#-----------------------------------------------------------------------
#
# Call the ex-script for this J-job.
#
#-----------------------------------------------------------------------
#
export pgmout="${DATA}/OUTPUT.$$"
env

${SCRIPTSsrw}/exsrw_forecast.sh
export err=$?; err_chk

if [ -e "$pgmout" ]; then
cat $pgmout
fi
#
#-----------------------------------------------------------------------
#
# Whether or not working directory DATA should be kept.
#
#-----------------------------------------------------------------------
#
if [ "${KEEPDATA}" = "NO" ]; then
rm -rf ${DATA}
fi
date

Loading
Loading