Skip to content

Commit

Permalink
Merge branch 'NOAA-EMC:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
BoCui-NOAA authored Sep 15, 2024
2 parents 7378427 + b7f71e0 commit d4fa91e
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 3 deletions.
1 change: 1 addition & 0 deletions parm/config/gefs/config.cleanup
8 changes: 8 additions & 0 deletions parm/config/gefs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,14 @@ case ${step} in
export threads_per_task=1
export memory="4096M"
;;

"cleanup")
export walltime="00:15:00"
export ntasks=1
export tasks_per_node=1
export threads_per_task=1
export memory="4096M"
;;
*)
echo "FATAL ERROR: Invalid job ${step} passed to ${BASH_SOURCE[0]}"
exit 1
Expand Down
16 changes: 16 additions & 0 deletions parm/config/gfs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ case ${step} in
case ${OCNRES} in
"025") ntasks=480;;
"050") ntasks=16;;
"100") ntasks=16;;
"500") ntasks=16;;
*)
echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${OCNRES}"
Expand All @@ -550,6 +551,10 @@ case ${step} in
ntasks=16
memory="96GB"
;;
"100")
ntasks=16
memory="96GB"
;;
"500")
ntasks=16
memory="24GB"
Expand All @@ -576,6 +581,10 @@ case ${step} in
ntasks=16
memory="96GB"
;;
"100")
ntasks=16
memory="96GB"
;;
"500")
ntasks=16
memory="24GB"
Expand All @@ -602,6 +611,10 @@ case ${step} in
ntasks=16
memory="96GB"
;;
"100")
ntasks=16
memory="96GB"
;;
"500")
ntasks=16
memory="24GB"
Expand Down Expand Up @@ -630,6 +643,9 @@ case ${step} in
"050")
memory="32GB"
ntasks=16;;
"100")
memory="32GB"
ntasks=16;;
"500")
memory="32GB"
ntasks=8;;
Expand Down
1 change: 1 addition & 0 deletions parm/config/gfs/config.resources.GAEA
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ case ${step} in

esac

unset memory
# shellcheck disable=SC2312
for mem_var in $(env | grep '^memory_' | cut -d= -f1); do
unset "${mem_var}"
Expand Down
2 changes: 1 addition & 1 deletion sorc/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ build_opts["ww3prepost"]="${_wave_opt} ${_verbose_opt} ${_build_ufs_opt} ${_buil

# Optional DA builds
if [[ "${_build_ufsda}" == "YES" ]]; then
if [[ "${MACHINE_ID}" != "orion" && "${MACHINE_ID}" != "hera" && "${MACHINE_ID}" != "hercules" && "${MACHINE_ID}" != "wcoss2" && "${MACHINE_ID}" != "noaacloud" ]]; then
if [[ "${MACHINE_ID}" != "orion" && "${MACHINE_ID}" != "hera" && "${MACHINE_ID}" != "hercules" && "${MACHINE_ID}" != "wcoss2" && "${MACHINE_ID}" != "noaacloud" && "${MACHINE_ID}" != "gaea" ]]; then
echo "NOTE: The GDAS App is not supported on ${MACHINE_ID}. Disabling build."
else
build_jobs["gdas"]=8
Expand Down
4 changes: 2 additions & 2 deletions workflow/applications/gefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def _get_app_configs(self):
"""
Returns the config_files that are involved in gefs
"""
configs = ['stage_ic', 'fcst', 'atmos_products', 'arch']
configs = ['stage_ic', 'fcst', 'atmos_products', 'arch', 'cleanup']

if self.nens > 0:
configs += ['efcs', 'atmos_ensstat']
Expand Down Expand Up @@ -82,6 +82,6 @@ def get_task_names(self):
if self.do_extractvars:
tasks += ['extractvars']

tasks += ['arch']
tasks += ['arch', 'cleanup']

return {f"{self.run}": tasks}
27 changes: 27 additions & 0 deletions workflow/rocoto/gefs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,9 @@ def arch(self):
deps.append(rocoto.add_dependency(dep_dict))
dep_dict = {'type': 'metatask', 'name': 'wave_post_bndpnt_bull'}
deps.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_extractvars:
dep_dict = {'type': 'metatask', 'name': 'extractvars'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep=deps, dep_condition='and')

resources = self.get_resource('arch')
Expand All @@ -564,3 +567,27 @@ def arch(self):
task = rocoto.create_task(task_dict)

return task

def cleanup(self):
deps = []
dep_dict = {'type': 'task', 'name': 'arch'}
deps.append(rocoto.add_dependency(dep_dict))

dependencies = rocoto.create_dependency(dep=deps)

resources = self.get_resource('cleanup')
task_name = 'cleanup'
task_dict = {'task_name': task_name,
'resources': resources,
'envars': self.envars,
'cycledef': 'gefs',
'dependency': dependencies,
'command': f'{self.HOMEgfs}/jobs/rocoto/cleanup.sh',
'job_name': f'{self.pslot}_{task_name}_@H',
'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log',
'maxtries': '&MAXTRIES;'
}

task = rocoto.create_task(task_dict)

return task

0 comments on commit d4fa91e

Please sign in to comment.