Skip to content

Commit

Permalink
Feature/get arch adds an empty archive job to GEFS system (#2772)
Browse files Browse the repository at this point in the history
- This feature added an archive task for GEFS system. This task will run
in the service queue with a single processor.
The task executes with success.
- Only xml is generated.

Refs #832
Refs #2698
  • Loading branch information
AntonMFernando-NOAA authored Aug 7, 2024
1 parent 7a79146 commit 5c2e9b1
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 1 deletion.
3 changes: 3 additions & 0 deletions jobs/rocoto/arch_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#! /usr/bin/env bash
###############################################################
exit 0
15 changes: 15 additions & 0 deletions parm/config/gefs/config.arch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#! /usr/bin/env bash

########## config.arch ##########
# Archive specific

echo "BEGIN: config.arch"

# Get task specific resources
. "${EXPDIR}/config.resources" arch

export ARCH_GAUSSIAN="YES"
export ARCH_GAUSSIAN_FHMAX=${FHMAX_GFS}
export ARCH_GAUSSIAN_FHINC=${FHOUT_GFS}

echo "END: config.arch"
7 changes: 7 additions & 0 deletions parm/config/gefs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,13 @@ case ${step} in
export is_exclusive=False
;;

"arch")
export walltime="06:00: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
4 changes: 3 additions & 1 deletion workflow/applications/gefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def _get_app_configs(self):
"""
Returns the config_files that are involved in gefs
"""
configs = ['stage_ic', 'fcst', 'atmos_products']
configs = ['stage_ic', 'fcst', 'atmos_products', 'arch']

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

tasks += ['arch']

return {f"{self._base['RUN']}": tasks}
41 changes: 41 additions & 0 deletions workflow/rocoto/gefs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,3 +546,44 @@ def extractvars(self):
task = rocoto.create_task(member_metatask_dict)

return task

def arch(self):
deps = []
dep_dict = {'type': 'metatask', 'name': 'atmos_prod'}
deps.append(rocoto.add_dependency(dep_dict))
dep_dict = {'type': 'metatask', 'name': 'atmos_ensstat'}
deps.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_ice:
dep_dict = {'type': 'metatask', 'name': 'ice_prod'}
deps.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_ocean:
dep_dict = {'type': 'metatask', 'name': 'ocean_prod'}
deps.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_wave:
dep_dict = {'type': 'metatask', 'name': 'wave_post_grid'}
deps.append(rocoto.add_dependency(dep_dict))
dep_dict = {'type': 'metatask', 'name': 'wave_post_pnt'}
deps.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_wave_bnd:
dep_dict = {'type': 'metatask', 'name': 'wave_post_bndpnt'}
deps.append(rocoto.add_dependency(dep_dict))
dep_dict = {'type': 'metatask', 'name': 'wave_post_bndpnt_bull'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep=deps, dep_condition='and')

resources = self.get_resource('arch')
task_name = 'arch'
task_dict = {'task_name': task_name,
'resources': resources,
'envars': self.envars,
'cycledef': 'gefs',
'dependency': dependencies,
'command': f'{self.HOMEgfs}/jobs/rocoto/arch_test.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 5c2e9b1

Please sign in to comment.