From 3ad60053671e3b2bdde3adb3453a77a8fe3d17b2 Mon Sep 17 00:00:00 2001 From: "kate.friedman" Date: Thu, 2 Nov 2023 19:22:50 +0000 Subject: [PATCH] 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 --- workflow/rocoto/gfs_tasks.py | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/workflow/rocoto/gfs_tasks.py b/workflow/rocoto/gfs_tasks.py index 60eea6e9bd..2c78f5c7c8 100644 --- a/workflow/rocoto/gfs_tasks.py +++ b/workflow/rocoto/gfs_tasks.py @@ -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)) @@ -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