Skip to content

Commit

Permalink
Add emcsfc_sfc_prep (sfcprep) job to dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
KateFriedman-NOAA committed Sep 25, 2024
1 parent 54f3c46 commit 2186a8b
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 5 deletions.
9 changes: 8 additions & 1 deletion jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ date
#############################
# Source relevant config files
#############################
configs="base"
configs="base sfcprep"
export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config}
config_path=${EXPDIR:-$NWROOT/gfs.${gfs_ver}/parm/config}
for config in $configs; do
Expand All @@ -17,6 +17,13 @@ for config in $configs; do
[[ $status -ne 0 ]] && exit $status
done

##########################################
# Source machine runtime environment
##########################################
. $HOMEgfs/env/${machine}.env sfcprep
status=$?
[[ $status -ne 0 ]] && exit $status


##############################################
# Obtain unique process id (pid) and make temp directory
Expand Down
13 changes: 13 additions & 0 deletions jobs/rocoto/sfcprep.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/ksh -x

###############################################################
# Source FV3GFS workflow modules
. $HOMEgfs/ush/load_fv3gfs_modules.sh
status=$?
[[ $status -ne 0 ]] && exit $status

###############################################################
# Execute the JJOB
$HOMEgfs/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP
status=$?
exit $status
3 changes: 3 additions & 0 deletions parm/config/config.base.emc.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export NOSCRUB="@NOSCRUB@"
# Base directories for various builds
export BASE_GIT="@BASE_GIT@"

# Toggle to turn on/off EMCSFC_SFC_PREP job
export DO_SFCPREP="NO" # SNOGRB dump file production

# Toggle to turn on/off GFS downstream processing.
export DO_BUFRSND="YES" # BUFR sounding products
export DO_GEMPAK="NO" # GEMPAK products
Expand Down
11 changes: 10 additions & 1 deletion parm/config/config.resources.emc.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,16 @@ elif [[ "$machine" = "ORION" ]]; then
export npe_node_max=40
fi

if [ $step = "prep" -o $step = "prepbufr" ]; then
if [ $step = "sfcprep" ]; then

export wtime_sfcprep="00:08:00"
export npe_sfcprep=1
export nth_sfcprep=1
export npe_node_sfcprep=1
export NTASKS=$npe_sfcprep
export memory_sfcprep="2GB"

elif [ $step = "prep" -o $step = "prepbufr" ]; then

eval "export wtime_$step='00:45:00'"
eval "export npe_$step=4"
Expand Down
20 changes: 20 additions & 0 deletions parm/config/config.sfcprep
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/ksh -x

########## config.sfcprep ##########
# Prep step specific

echo "BEGIN: config.sfcprep"

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

if [[ $RUN_ENVIR == "emc" ]]; then

export SENDCOM="YES"
export COMOUT=${COMOUTatmos}
export COMINobsproc=${DMPDIR}/${CDUMP}.${PDY}/${cyc}/atmos
export COMIN_m6hrs=${DMPDIR}/${GDUMP}.${gPDY}/${gcyc}/atmos

fi

echo "END: config.sfcprep"
25 changes: 22 additions & 3 deletions ush/rocoto/setup_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def main():
steps = steps + wav_steps_gempak if _base.get('DO_GEMPAK', 'NO') == 'YES' else steps
steps = steps + wav_steps_awips if _base.get('DO_AWIPS', 'NO') == 'YES' else steps
steps = steps + ['wdqms'] if _base.get('DO_WDQMS', 'NO') == 'YES' else steps
steps = steps + ['sfcprep'] if _base.get('DO_SFCPREP', 'NO') == 'YES' else steps

dict_configs = wfu.source_configs(configs, steps)

Expand Down Expand Up @@ -244,10 +245,13 @@ def get_gdasgfs_resources(dict_configs, cdump='gdas'):
do_wdqms = base.get('DO_WDQMS', 'NO').upper()
do_wave = base.get('DO_WAVE', 'NO').upper()
do_wave_cdump = base.get('WAVE_CDUMP', 'BOTH').upper()
do_sfcprep = base.get('DO_SFCPREP', 'NO').upper()
reservation = base.get('RESERVATION', 'NONE').upper()

#tasks = ['prep', 'anal', 'fcst', 'post', 'vrfy', 'arch']
tasks = ['prep', 'anal', 'analcalc']
if do_sfcprep in ['Y', 'YES']:
tasks = ['sfcprep', 'prep', 'anal', 'analcalc']
else:
tasks = ['prep', 'anal', 'analcalc']

if cdump in ['gdas']:
tasks += ['analdiag']
Expand Down Expand Up @@ -412,14 +416,29 @@ def get_gdasgfs_tasks(dict_configs, cdump='gdas'):
do_wdqms = base.get('DO_WDQMS', 'NO').upper()
do_wave = base.get('DO_WAVE', 'NO').upper()
do_wave_cdump = base.get('WAVE_CDUMP', 'BOTH').upper()
do_sfcprep = base.get('DO_SFCPREP', 'NO').upper()
dumpsuffix = base.get('DUMP_SUFFIX', '')
gridsuffix = base.get('SUFFIX', '')

dict_tasks = OrderedDict()

# sfcprep (emcsfc_sfc_prep)
if do_sfcprep in ['Y', 'YES']:
deps = []
dep_dict = {'type': 'metatask', 'name': f'{"gdas"}post', 'offset': '-06:00:00'}
deps.append(rocoto.add_dependency(dep_dict))
data = f'&DMPDIR;/{cdump}{dumpsuffix}.@Y@m@d/@H/atmos/{cdump}.t@Hz.snow.usaf.grib2'
dep_dict = {'type': 'data', 'data': data}
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)
task = wfu.create_wf_task('sfcprep', cdump=cdump, envar=envars, dependency=dependencies)
dict_tasks[f'{cdump}sfcprep'] = task

# prep
deps = []
dep_dict = {'type': 'metatask', 'name': f'{"gdas"}post', 'offset': '-06:00:00'}
if do_sfcprep in ['Y', 'YES']:
dep_dict = {'type': 'task', 'name': f'{cdump}sfcprep'}
else:
dep_dict = {'type': 'metatask', 'name': f'{"gdas"}post', 'offset': '-06:00:00'}
deps.append(rocoto.add_dependency(dep_dict))
data = f'&ROTDIR;/gdas.@Y@m@d/@H/atmos/gdas.t@Hz.atmf009{gridsuffix}'
dep_dict = {'type': 'data', 'data': data, 'offset': '-06:00:00'}
Expand Down

0 comments on commit 2186a8b

Please sign in to comment.