Skip to content

Commit

Permalink
Add wave post jobs to GEFS
Browse files Browse the repository at this point in the history
Adds the wave post jobs for gridded and points to GEFS. Boundary
point jobs are added even though the current GEFS buoy file does
not contain any.

To facilitate the dependencies and make things consistent, the
forecast job is altered to all be a metatask of fcst instead of
mimicking EnKF using efcs. This cleans up the dependency.

Resolves NOAA-EMC#827
  • Loading branch information
WalterKolczynski-NOAA committed Jan 19, 2024
1 parent 4919287 commit 61450f1
Show file tree
Hide file tree
Showing 10 changed files with 291 additions and 136 deletions.
2 changes: 1 addition & 1 deletion parm/config/gefs/config.base.emc.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export DO_OCN="NO"
export DO_ICE="NO"
export DO_AERO="NO"
export WAVE_CDUMP="" # When to include wave suite: gdas, gfs, or both
export DOBNDPNT_WAVE="NO"
export DOBNDPNT_WAVE="NO" # The GEFS buoys file does not currently have any boundary points
export FRAC_GRID=".true."

# Set operational resolution
Expand Down
59 changes: 0 additions & 59 deletions parm/config/gefs/config.efcs

This file was deleted.

68 changes: 45 additions & 23 deletions parm/config/gefs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,16 @@ case ${machine} in
esac
export npe_node_max

case ${step} in
case ${step} in

"stage_ic")
export wtime_stage_ic="00:15:00"
export npe_stage_ic=1
export npe_node_stage_ic=1
export nth_stage_ic=1
export is_exclusive=True
;;

"waveinit")
export wtime_waveinit="00:10:00"
export npe_waveinit=12
Expand All @@ -77,25 +86,10 @@ case ${step} in
export memory_waveinit="2GB"
;;

"wavepostsbs")
export wtime_wavepostsbs="00:20:00"
export wtime_wavepostsbs_gfs="03:00:00"
export npe_wavepostsbs=8
export nth_wavepostsbs=1
export npe_node_wavepostsbs=$(( npe_node_max / nth_wavepostsbs ))
export NTASKS=${npe_wavepostsbs}
export memory_wavepostsbs="10GB"
export memory_wavepostsbs_gfs="10GB"
;;

"fcst" | "efcs")
"fcst")
export is_exclusive=True

if [[ "${step}" == "fcst" ]]; then
_CDUMP_LIST=${CDUMP:-"gdas gfs"}
elif [[ "${step}" == "efcs" ]]; then
_CDUMP_LIST=${CDUMP:-"enkfgdas enkfgfs"}
fi
_CDUMP_LIST=${CDUMP:-"gdas gfs"}

# During workflow creation, we need resources for all CDUMPs and CDUMP is undefined
for _CDUMP in ${_CDUMP_LIST}; do
Expand Down Expand Up @@ -224,11 +218,39 @@ case ${step} in
export is_exclusive=True
;;

"stage_ic")
export wtime_stage_ic="00:15:00"
export npe_stage_ic=1
export npe_node_stage_ic=1
export nth_stage_ic=1
"wavepostsbs")
export wtime_wavepostsbs="03:00:00"
export npe_wavepostsbs=8
export nth_wavepostsbs=1
export npe_node_wavepostsbs=$(( npe_node_max / nth_wavepostsbs ))
export NTASKS=${npe_wavepostsbs}
export memory_wavepostsbs="10GB"
;;

"wavepostbndpnt")
export wtime_wavepostbndpnt="01:00:00"
export npe_wavepostbndpnt=240
export nth_wavepostbndpnt=1
export npe_node_wavepostbndpnt=$(( npe_node_max / nth_wavepostbndpnt ))
export NTASKS=${npe_wavepostbndpnt}
export is_exclusive=True
;;

"wavepostbndpntbll")
export wtime_wavepostbndpntbll="01:00:00"
export npe_wavepostbndpntbll=448
export nth_wavepostbndpntbll=1
export npe_node_wavepostbndpntbll=$(( npe_node_max / nth_wavepostbndpntbll ))
export NTASKS=${npe_wavepostbndpntbll}
export is_exclusive=True
;;

"wavepostpnt")
export wtime_wavepostpnt="04:00:00"
export npe_wavepostpnt=200
export nth_wavepostpnt=1
export npe_node_wavepostpnt=$(( npe_node_max / nth_wavepostpnt ))
export NTASKS=${npe_wavepostpnt}
export is_exclusive=True
;;

Expand Down
11 changes: 11 additions & 0 deletions parm/config/gefs/config.wavepostbndpnt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /usr/bin/env bash

########## config.wavepostbndpnt ##########
# Wave steps specific

echo "BEGIN: config.wavepostbndpnt"

# Get task specific resources
. $EXPDIR/config.resources wavepostbndpnt

echo "END: config.wavepostbndpnt"
11 changes: 11 additions & 0 deletions parm/config/gefs/config.wavepostbndpntbll
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /usr/bin/env bash

########## config.wavepostbndpntbll ##########
# Wave steps specific

echo "BEGIN: config.wavepostbndpntbll"

# Get task specific resources
. $EXPDIR/config.resources wavepostbndpntbll

echo "END: config.wavepostbndpntbll"
11 changes: 11 additions & 0 deletions parm/config/gefs/config.wavepostpnt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /usr/bin/env bash

########## config.wavepostpnt ##########
# Wave steps specific

echo "BEGIN: config.wavepostpnt"

# Get task specific resources
. $EXPDIR/config.resources wavepostpnt

echo "END: config.wavepostpnt"
28 changes: 28 additions & 0 deletions parm/config/gefs/config.wavepostsbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#! /usr/bin/env bash

########## config.wavepostsbs ##########
# Wave steps specific

echo "BEGIN: config.wavepostsbs"

# Get task specific resources
. $EXPDIR/config.resources wavepostsbs

# Subgrid info for grib2 encoding
export WAV_SUBGRBSRC=""
export WAV_SUBGRB=""

# Options for point output (switch on/off boundary point output)
export DOIBP_WAV='NO' # Input boundary points
export DOFLD_WAV='YES' # Field data
export DOPNT_WAV='YES' # Station data
export DOGRB_WAV='YES' # Create grib2 files
if [[ -n "${waveinterpGRD}" ]]; then
export DOGRI_WAV='YES' # Create interpolated grids
else
export DOGRI_WAV='NO' # Do not create interpolated grids
fi
export DOSPC_WAV='YES' # Spectral post
export DOBLL_WAV='YES' # Bulletin post

echo "END: config.wavepostsbs"
6 changes: 5 additions & 1 deletion scripts/exgfs_wave_post_pnt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@ source "$HOMEgfs/ush/preamble.sh"
cp -f $PARMwave/wave_${NET}.buoys buoy.loc.temp
if [ "$DOBNDPNT_WAV" = YES ]; then
#only do boundary points
sed -n '/^\$.*/!p' buoy.loc.temp | grep IBP > buoy.loc
sed -n '/^\$.*/!p' buoy.loc.temp | grep IBP > buoy.loc || {
echo "WARNING: No boundary points found in buoy file ${PARMwave}/wave_${NET}.buoys"
echo " Ending job without doing anything."
exit 0
}
else
#exclude boundary points
sed -n '/^\$.*/!p' buoy.loc.temp | grep -v IBP > buoy.loc
Expand Down
18 changes: 9 additions & 9 deletions workflow/applications/gefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ def _get_app_configs(self):
"""
configs = ['stage_ic', 'fcst', 'atmos_products']

if self.nens > 0:
configs += ['efcs']

if self.do_wave:
configs += ['waveinit']
configs += ['waveinit', 'wavepostsbs', 'wavepostpnt']
if self.do_wave_bnd:
configs += ['wavepostbndpnt', 'wavepostbndpntbll']

return configs

Expand All @@ -40,11 +39,12 @@ def get_task_names(self):
if self.do_wave:
tasks += ['waveinit']

tasks += ['fcst']

if self.nens > 0:
tasks += ['efcs']
tasks += ['fcst', 'atmprod']

tasks += ['atmprod']
if self.do_wave:
tasks += ['wavepostsbs']
if self.do_wave_bnd:
tasks += ['wavepostbndpnt', 'wavepostbndpntbll']
tasks += ['wavepostpnt']

return {f"{self._base['CDUMP']}": tasks}
Loading

0 comments on commit 61450f1

Please sign in to comment.