Skip to content

Commit 3ad6005

Browse files
Update archive job dependencies for GSI monitor jobs
- 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
1 parent c7d24c9 commit 3ad6005

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

workflow/rocoto/gfs_tasks.py

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -941,15 +941,28 @@ def metp(self):
941941

942942
def arch(self):
943943
deps = []
944-
if self.cdump in ['gdas'] and self.app_config.do_verfozn:
945-
dep_dict = {'type': 'task', 'name': f'{self.cdump}verfozn'}
946-
deps.append(rocoto.add_dependency(dep_dict))
947-
if self.cdump in ['gdas'] and self.app_config.do_verfrad:
948-
dep_dict = {'type': 'task', 'name': f'{self.cdump}verfrad'}
949-
deps.append(rocoto.add_dependency(dep_dict))
950-
if self.app_config.mode in ['cycled'] and self.app_config.do_vminmon:
951-
dep_dict = {'type': 'task', 'name': f'{self.cdump}vminmon'}
952-
deps.append(rocoto.add_dependency(dep_dict))
944+
dependencies = []
945+
if self.app_config.do_verfozn or self.app_config.do_verfrad or self.app_config.do_vminmon:
946+
if self.app_config.mode in ['cycled']:
947+
if self.cdump in ['gfs']:
948+
if self.app_config.do_vminmon:
949+
dep_dict = {'type': 'task', 'name': f'{self.cdump}vminmon'}
950+
deps.append(rocoto.add_dependency(dep_dict))
951+
elif self.cdump in ['gdas']:
952+
deps2 = []
953+
if self.app_config.do_verfozn:
954+
dep_dict = {'type': 'task', 'name': f'{self.cdump}verfozn'}
955+
deps2.append(rocoto.add_dependency(dep_dict))
956+
if self.app_config.do_verfrad:
957+
dep_dict = {'type': 'task', 'name': f'{self.cdump}verfrad'}
958+
deps2.append(rocoto.add_dependency(dep_dict))
959+
if self.app_config.do_vminmon:
960+
dep_dict = {'type': 'task', 'name': f'{self.cdump}vminmon'}
961+
deps2.append(rocoto.add_dependency(dep_dict))
962+
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps2)
963+
dep_dict = {'type': 'cycleexist', 'condition': 'not', 'offset': '-06:00:00'}
964+
dependencies.append(rocoto.add_dependency(dep_dict))
965+
dependencies = rocoto.create_dependency(dep_condition='or', dep=dependencies)
953966
if self.app_config.do_vrfy:
954967
dep_dict = {'type': 'task', 'name': f'{self.cdump}vrfy'}
955968
deps.append(rocoto.add_dependency(dep_dict))
@@ -973,7 +986,7 @@ def arch(self):
973986
dep_dict = {'type': 'metatask', 'name': f'{self.cdump}post'}
974987
deps.append(rocoto.add_dependency(dep_dict))
975988

976-
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)
989+
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps+dependencies)
977990

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

0 commit comments

Comments
 (0)