Skip to content

Commit

Permalink
Update archive job dependencies for GSI monitor jobs
Browse files Browse the repository at this point in the history
- Since the GSI monitor jobs don't run in the first half cycle
have updated the dependencies for the gdasarch job to add
additional logic for the first half cycle.
- The gdasarch job will now check a new "or" logic if the
GSI monitor job(s) are done or there isn't a prior cycle.
- The first half cycle gdasarch job should fire off
based on the lack of prior cycle instead of waiting for the
GSI monitor jobs that won't exist. Later cycles should wait
for the GSI monitor job(s) are complete.
- Also updated the dependencies to appropriately add the
gfsvminmon job for the gfsarch job when in cycled mode.

Refs #1908
  • Loading branch information
KateFriedman-NOAA committed Nov 2, 2023
1 parent c7d24c9 commit 3ad6005
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,15 +941,28 @@ def metp(self):

def arch(self):
deps = []
if self.cdump in ['gdas'] and self.app_config.do_verfozn:
dep_dict = {'type': 'task', 'name': f'{self.cdump}verfozn'}
deps.append(rocoto.add_dependency(dep_dict))
if self.cdump in ['gdas'] and self.app_config.do_verfrad:
dep_dict = {'type': 'task', 'name': f'{self.cdump}verfrad'}
deps.append(rocoto.add_dependency(dep_dict))
if self.app_config.mode in ['cycled'] and self.app_config.do_vminmon:
dep_dict = {'type': 'task', 'name': f'{self.cdump}vminmon'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = []
if self.app_config.do_verfozn or self.app_config.do_verfrad or self.app_config.do_vminmon:
if self.app_config.mode in ['cycled']:
if self.cdump in ['gfs']:
if self.app_config.do_vminmon:
dep_dict = {'type': 'task', 'name': f'{self.cdump}vminmon'}
deps.append(rocoto.add_dependency(dep_dict))
elif self.cdump in ['gdas']:
deps2 = []
if self.app_config.do_verfozn:
dep_dict = {'type': 'task', 'name': f'{self.cdump}verfozn'}
deps2.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_verfrad:
dep_dict = {'type': 'task', 'name': f'{self.cdump}verfrad'}
deps2.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_vminmon:
dep_dict = {'type': 'task', 'name': f'{self.cdump}vminmon'}
deps2.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps2)
dep_dict = {'type': 'cycleexist', 'condition': 'not', 'offset': '-06:00:00'}
dependencies.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='or', dep=dependencies)
if self.app_config.do_vrfy:
dep_dict = {'type': 'task', 'name': f'{self.cdump}vrfy'}
deps.append(rocoto.add_dependency(dep_dict))
Expand All @@ -973,7 +986,7 @@ def arch(self):
dep_dict = {'type': 'metatask', 'name': f'{self.cdump}post'}
deps.append(rocoto.add_dependency(dep_dict))

dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps+dependencies)

cycledef = 'gdas_half,gdas' if self.cdump in ['gdas'] else self.cdump

Expand Down

0 comments on commit 3ad6005

Please sign in to comment.