Skip to content

Commit

Permalink
Update ufs-weather-model and remove upp hack (#2071)
Browse files Browse the repository at this point in the history
Updates the model to the most recent commit of ufs-weather-model.  This
should allow for the removal of the UPP hack that was added in PR #2042  

This required changing nems.configure -> ufs.configure.

Resolves #1942
  • Loading branch information
JessicaMeixner-NOAA authored Nov 17, 2023
1 parent 5a2d97e commit cd4e6a1
Show file tree
Hide file tree
Showing 26 changed files with 77 additions and 86 deletions.
2 changes: 1 addition & 1 deletion Externals.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ protocol = git
required = True

[UFS]
tag = 63a43d9
tag = 3ba8dff
local_path = sorc/ufs_model.fd
repo_url = https://github.com/ufs-community/ufs-weather-model.git
protocol = git
Expand Down
12 changes: 6 additions & 6 deletions parm/config/gefs/config.base.emc.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,17 @@ export ICERES=${OCNRES}

case "${APP}" in
ATM)
export confignamevarfornems="atm"
export confignamevarforufs="atm"
;;
ATMA)
export DO_AERO="YES"
export confignamevarfornems="atm_aero"
export confignamevarforufs="atm_aero"
;;
ATMW)
export DO_COUPLED="YES"
export DO_WAVE="YES"
export WAVE_CDUMP="both"
export confignamevarfornems="leapfrog_atm_wav"
export confignamevarforufs="leapfrog_atm_wav"
;;
NG-GODAS)
export DO_ATM="NO"
Expand All @@ -205,18 +205,18 @@ case "${APP}" in
export DO_OCN="YES"
export DO_ICE="YES"
export CCPP_SUITE="FV3_GFS_v17_coupled_p8_ugwpv1" # TODO: Does this include FV3_GFS_v17_p8? Can this be used instead of FV3_GFS_v17_p8 on L141
export confignamevarfornems="cpld"
export confignamevarforufs="cpld"

if [[ "${APP}" =~ A$ ]]; then
export DO_AERO="YES"
export confignamevarfornems="${confignamevarfornems}_aero"
export confignamevarforufs="${confignamevarforufs}_aero"
fi

if [[ "${APP}" =~ ^S2SW ]]; then
export DO_WAVE="YES"
export WAVE_CDUMP="both"
export cplwav2atm=".true."
export confignamevarfornems="${confignamevarfornems}_outerwave"
export confignamevarforufs="${confignamevarforufs}_outerwave"
fi
;;
*)
Expand Down
4 changes: 2 additions & 2 deletions parm/config/gefs/config.fcst
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ export DO_LAND_PERT=${DO_LAND_PERT:-"NO"}
export DO_CA=${DO_CA:-"YES"}

#coupling settings
export cplmode="nems_frac"
export cplmode="ufs.frac"
if [[ "${FRAC_GRID:-".true."}" == ".false." ]]; then
export cplmode="nems_orig"
export cplmode="ufs.nfrac"
fi
export psm_bc="1"

Expand Down
12 changes: 6 additions & 6 deletions parm/config/gfs/config.base.emc.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -196,17 +196,17 @@ export ICERES=${OCNRES}

case "${APP}" in
ATM)
export confignamevarfornems="atm"
export confignamevarforufs="atm"
;;
ATMA)
export DO_AERO="YES"
export confignamevarfornems="atm_aero"
export confignamevarforufs="atm_aero"
;;
ATMW)
export DO_COUPLED="YES"
export DO_WAVE="YES"
export WAVE_CDUMP="both"
export confignamevarfornems="leapfrog_atm_wav"
export confignamevarforufs="leapfrog_atm_wav"
;;
NG-GODAS)
export DO_ATM="NO"
Expand All @@ -218,18 +218,18 @@ case "${APP}" in
export DO_OCN="YES"
export DO_ICE="YES"
export CCPP_SUITE="FV3_GFS_v17_coupled_p8_ugwpv1" # TODO: Does this include FV3_GFS_v17_p8? Can this be used instead of FV3_GFS_v17_p8 on L149
export confignamevarfornems="cpld"
export confignamevarforufs="cpld"

if [[ "${APP}" =~ A$ ]]; then
export DO_AERO="YES"
export confignamevarfornems="${confignamevarfornems}_aero"
export confignamevarforufs="${confignamevarforufs}_aero"
fi

if [[ "${APP}" =~ ^S2SW ]]; then
export DO_WAVE="YES"
export WAVE_CDUMP="both"
export cplwav2atm=".true."
export confignamevarfornems="${confignamevarfornems}_outerwave"
export confignamevarforufs="${confignamevarforufs}_outerwave"
fi

;;
Expand Down
4 changes: 2 additions & 2 deletions parm/config/gfs/config.fcst
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ export DO_LAND_PERT=${DO_LAND_PERT:-"NO"}
export DO_CA=${DO_CA:-"YES"}

#coupling settings
export cplmode="nems_frac"
export cplmode="ufs.frac"
if [[ "${FRAC_GRID:-".true."}" == ".false." ]]; then
export cplmode="nems_orig"
export cplmode="ufs.nfrac"
fi
export psm_bc="1"

Expand Down
4 changes: 2 additions & 2 deletions parm/ufs/fix/gfs/atmos.fixed_files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@ copy:
- [$(FIX_lut)/optics_SS.v3_3.dat, $(DATA)/optics_SS.dat]
- [$(FIX_lut)/optics_SU.v1_3.dat, $(DATA)/optics_SU.dat]

# fd_nems.yaml file
- [$(HOMEgfs)/sorc/ufs_model.fd/tests/parm/fd_nems.yaml, $(DATA)/]
# fd_ufs.yaml file
- [$(HOMEgfs)/sorc/ufs_model.fd/tests/parm/fd_ufs.yaml, $(DATA)/]
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#############################################
#### NEMS Run-Time Configuration File #####
#### UFS Run-Time Configuration File #####
#############################################

# ESMF #
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#############################################
#### NEMS Run-Time Configuration File #####
#### UFS Run-Time Configuration File #####
#############################################

# ESMF #
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#############################################
#### NEMS Run-Time Configuration File #####
#### UFS Run-Time Configuration File #####
#############################################

# ESMF #
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#############################################
#### NEMS Run-Time Configuration File #####
#### UFS Run-Time Configuration File #####
#############################################

# ESMF #
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#############################################
#### NEMS Run-Time Configuration File #####
#### UFS Run-Time Configuration File #####
#############################################

# ESMF #
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#############################################
#### NEMS Run-Time Configuration File #####
#### UFS Run-Time Configuration File #####
#############################################

# ESMF #
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#############################################
#### NEMS Run-Time Configuration File #####
#### UFS Run-Time Configuration File #####
#############################################

# ESMF #
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#############################################
#### NEMS Run-Time Configuration File #####
#### UFS Run-Time Configuration File #####
#############################################

# ESMF #
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#############################################
#### NEMS Run-Time Configuration File #####
#### UFS Run-Time Configuration File #####
#############################################

# ESMF #
Expand Down
20 changes: 10 additions & 10 deletions scripts/exglobal_forecast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

################################################################################
## UNIX Script Documentation Block
## Script name: exglobal_fcst_nemsfv3gfs.sh
## Script name: exglobal_forecast.sh
## Script description: Runs a global FV3GFS model forecast
##
## Author: Fanglin Yang Organization: NCEP/EMC Date: 2016-11-15
Expand Down Expand Up @@ -70,7 +70,7 @@
##
## Namelist input, in RUNDIR,
## 1. diag_table
## 2. nems.configure
## 2. ufs.configure
## 3. model_configure
## 4. input.nml
#######################
Expand All @@ -84,11 +84,11 @@ source "${HOMEgfs}/ush/cplvalidate.sh" # validation of cpl*
source "${HOMEgfs}/ush/forecast_predet.sh" # include functions for variable definition
source "${HOMEgfs}/ush/forecast_det.sh" # include functions for run type determination
source "${HOMEgfs}/ush/forecast_postdet.sh" # include functions for variables after run type determination
source "${HOMEgfs}/ush/nems_configure.sh" # include functions for nems_configure processing
source "${HOMEgfs}/ush/ufs_configure.sh" # include functions for ufs.configure processing
source "${HOMEgfs}/ush/parsing_model_configure_FV3.sh"

# Compset string. For nems.configure.* template selection. Default ATM only
confignamevarfornems=${confignamevarfornems:-'atm'}
# Compset string. For ufs.configure.* template selection. Default ATM only
confignamevarforufs=${confignamevarforufs:-'atm'}

# Coupling control switches, for coupling purpose, off by default
cpl=${cpl:-.false.}
Expand All @@ -104,9 +104,9 @@ ICETIM=${DELTIM}
CPL_SLOW=${CPL_SLOW:-${OCNTIM}}
CPL_FAST=${CPL_FAST:-${ICETIM}}

echo "MAIN: Validating '${confignamevarfornems}' with cpl switches"
echo "MAIN: Validating '${confignamevarforufs}' with cpl switches"
cplvalidate
echo "MAIN: '${confignamevarfornems}' validated, continue"
echo "MAIN: '${confignamevarforufs}' validated, continue"

echo "MAIN: Loading common variables before determination of run type"
common_predet
Expand Down Expand Up @@ -142,9 +142,9 @@ FV3_nml
FV3_model_configure
echo "MAIN: Name lists and model configuration written"

echo "MAIN: Writing NEMS Configure file"
writing_nems_configure
echo "MAIN: NEMS configured"
echo "MAIN: Writing UFS Configure file"
writing_ufs_configure
echo "MAIN: UFS configured"

#------------------------------------------------------------------
# run the executable
Expand Down
9 changes: 1 addition & 8 deletions sorc/checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ source "${topdir}/../workflow/gw_setup.sh"
# The checkout version should always be a speciifc commit (hash or tag), not a branch
errs=0
# Checkout UFS submodules in parallel
checkout "ufs_model.fd" "https://github.com/ufs-community/ufs-weather-model" "${ufs_model_hash:-63a43d9}" "8" &
checkout "ufs_model.fd" "https://github.com/ufs-community/ufs-weather-model" "${ufs_model_hash:-3ba8dff}" "8" &

# Run all other checkouts simultaneously with just 1 core each to handle submodules.
checkout "wxflow" "https://github.com/NOAA-EMC/wxflow" "528f5ab" &
Expand All @@ -177,13 +177,6 @@ for checkout_pid in $(jobs -p); do
wait "${checkout_pid}" || errs=$((errs + $?))
done

# Temporary hack to check out a UPP verison that works on Orion
# This can be removed once the UFS UPP version advances to or beyond 78f369b
cd "${topdir}/ufs_model.fd/FV3/upp" || exit 1
git checkout 78f369b
cd "${topdir}" || exit 1
# End hack

if (( errs > 0 )); then
echo "WARNING: One or more errors encountered during checkout process, please check logs before building"
fi
Expand Down
28 changes: 14 additions & 14 deletions sorc/link_workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,21 +156,21 @@ for file in finddate.sh make_ntc_bull.pl make_NTC_file.pl make_tif.sh month_name
${LINK_OR_COPY} "${HOMEgfs}/sorc/gfs_utils.fd/ush/${file}" .
done

# TODO: Link these nems.configure templates from ufs-weather-model
# TODO: Link these ufs.configure templates from ufs-weather-model
#cd "${HOMEgfs}/parm/ufs" || exit 1
#declare -a nems_configure_files=("nems.configure.atm.IN" \
# "nems.configure.atm_aero.IN" \
# "nems.configure.atmw.IN" \
# "nems.configure.blocked_atm_wav_2way.IN" \
# "nems.configure.blocked_atm_wav.IN" \
# "nems.configure.cpld_agrid.IN" \
# "nems.configure.cpld_esmfthreads.IN" \
# "nems.configure.cpld.IN" \
# "nems.configure.cpld_noaero.IN" \
# "nems.configure.cpld_noaero_nowave.IN" \
# "nems.configure.cpld_noaero_outwav.IN" \
# "nems.configure.leapfrog_atm_wav.IN")
#for file in "${nems_configure_files[@]}"; do
#declare -a ufs_configure_files=("ufs.configure.atm.IN" \
# "ufs.configure.atm_aero.IN" \
# "ufs.configure.atmw.IN" \
# "ufs.configure.blocked_atm_wav_2way.IN" \
# "ufs.configure.blocked_atm_wav.IN" \
# "ufs.configure.cpld_agrid.IN" \
# "ufs.configure.cpld_esmfthreads.IN" \
# "ufs.configure.cpld.IN" \
# "ufs.configure.cpld_noaero.IN" \
# "ufs.configure.cpld_noaero_nowave.IN" \
# "ufs.configure.cpld_noaero_outwav.IN" \
# "ufs.configure.leapfrog_atm_wav.IN")
#for file in "${ufs_configure_files[@]}"; do
# [[ -s "${file}" ]] && rm -f "${file}"
# ${LINK_OR_COPY} "${HOMEgfs}/sorc/ufs_model.fd/tests/parm/${file}" .
#done
Expand Down
4 changes: 2 additions & 2 deletions test/diff_UFS_rundir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ temp_file=".diff.nc"
coord_file="${coord_file:-./coordinates.lst}"

# Input files
files="data_table diag_table fd_nems.yaml field_table ice_in input.nml med_modelio.nml \
model_configure nems.configure pio_in ww3_multi.inp ww3_shel.inp"
files="data_table diag_table fd_ufs.yaml field_table ice_in input.nml med_modelio.nml \
model_configure ufs.configure pio_in ww3_multi.inp ww3_shel.inp"

for file in $files; do
echo "=== ${file} ==="
Expand Down
6 changes: 3 additions & 3 deletions ush/cplvalidate.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#! /usr/bin/env bash

#####
## This script validates $confignamevarfornems
## This script validates $confignamevarforufs
## against cpl** switches to check consistency
##
## This is a child script of modular
## forecast script. This script is a direct execution
#####

cplvalidate(){
echo "SUB cplvalidate: validating cpl** switches for ${confignamevarfornems}"
echo "SUB cplvalidate: validating cpl** switches for ${confignamevarforufs}"
return # TODO: Why are we returning right here?
case ${confignamevarfornems} in
case ${confignamevarforufs} in
'atm') combination=.false..false..false..false..false.;;
'datm') combination=.true..true..false..false..false.;;
'atm_aero') combination=.true..false..false..false..true.;;
Expand Down
4 changes: 2 additions & 2 deletions ush/forecast_postdet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ FV3_out() {
# No need to copy FV3 restart files when RUN=gfs or gefs
${NCP} "${DATA}/input.nml" "${COM_CONF}/ufs.input.nml"
${NCP} "${DATA}/model_configure" "${COM_CONF}/ufs.model_configure"
${NCP} "${DATA}/nems.configure" "${COM_CONF}/ufs.nems.configure"
${NCP} "${DATA}/ufs.configure" "${COM_CONF}/ufs.ufs.configure"
${NCP} "${DATA}/diag_table" "${COM_CONF}/ufs.diag_table"
fi
echo "SUB ${FUNCNAME[0]}: Output data for FV3 copied"
Expand Down Expand Up @@ -882,7 +882,7 @@ CICE_postdet() {

# TODO: These settings should be elevated to config.ice
histfreq_n=${histfreq_n:-6}
dumpfreq_n=${dumpfreq_n:-1000} # Set this to a really large value, as cice, mom6 and cmeps restart interval is controlled by nems.configure
dumpfreq_n=${dumpfreq_n:-1000} # Set this to a really large value, as cice, mom6 and cmeps restart interval is controlled by ufs.configure
dumpfreq=${dumpfreq:-"y"} # "h","d","m" or "y" for restarts at intervals of "hours", "days", "months" or "years"

if [[ "${RUN}" =~ "gdas" ]]; then
Expand Down
8 changes: 1 addition & 7 deletions ush/load_ufswm_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,19 @@ source "${HOMEgfs}/ush/module-setup.sh"
if [[ "${MACHINE_ID}" != "noaacloud" ]]; then
module use "${HOMEgfs}/sorc/ufs_model.fd/tests"
module load modules.ufs_model.lua
module load prod_util
if [[ "${MACHINE_ID}" = "wcoss2" ]]; then
module load prod_util
module load cray-pals
module load cfp
module load libjpeg
module load craype-network-ucx
module load cray-mpich-ucx
else
module load prod-util
export UTILROOT=${prod_util_ROOT}
fi
module load wgrib2
export WGRIB2=wgrib2
fi
if [[ "${MACHINE_ID}" = "hera" ]]; then
module use "/scratch2/NCEPDEV/ensemble/save/Walter.Kolczynski/modulefiles/core"
module load "miniconda3/4.6.14"
module load "gfs_workflow/1.0.0"
fi
if [[ "${MACHINE_ID}" == "noaacloud" ]]; then
if [[ "${PW_CSP:-}" = "aws" ]]; then

Expand Down
1 change: 1 addition & 0 deletions ush/parsing_model_configure_FV3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ num_files: ${NUM_FILES:-2}
filename_base: 'atm' 'sfc'
output_grid: ${OUTPUT_GRID}
output_file: '${OUTPUT_FILETYPE_ATM}' '${OUTPUT_FILETYPE_SFC}'
zstandard_level: 0
ichunk2d: ${ichunk2d:-0}
jchunk2d: ${jchunk2d:-0}
ichunk3d: ${ichunk3d:-0}
Expand Down
Loading

0 comments on commit cd4e6a1

Please sign in to comment.