Skip to content

Commit

Permalink
Update post dependencies for archive job
Browse files Browse the repository at this point in the history
- Adjust post metatask dependency to always be added, instead of
only when there aren't other dependencies.
- Add postanl job to archive dependencies.

Refs NOAA-EMC#2048
  • Loading branch information
KateFriedman-NOAA committed Nov 14, 2023
1 parent 7d53fc7 commit 07f97a8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,11 +989,15 @@ def arch(self):
dependencies = []
if self.app_config.mode in ['cycled']:
if self.cdump in ['gfs']:
dep_dict = {'type': 'task', 'name': f'{self.cdump}postanl'}
deps.append(rocoto.add_dependency(dep_dict))
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']: # Block for handling half cycle dependencies
deps2 = []
dep_dict = {'type': 'task', 'name': f'{self.cdump}postanl'}
deps2.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_fit2obs:
dep_dict = {'type': 'task', 'name': f'{self.cdump}fit2obs'}
deps2.append(rocoto.add_dependency(dep_dict))
Expand Down Expand Up @@ -1022,6 +1026,9 @@ def arch(self):
if self.app_config.do_vrfy:
dep_dict = {'type': 'task', 'name': f'{self.cdump}vrfy'}
deps.append(rocoto.add_dependency(dep_dict))
# Post job dependencies
dep_dict = {'type': 'metatask', 'name': f'{self.cdump}post'}
deps.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_wave:
dep_dict = {'type': 'task', 'name': f'{self.cdump}wavepostsbs'}
deps.append(rocoto.add_dependency(dep_dict))
Expand All @@ -1034,10 +1041,6 @@ def arch(self):
if self.app_config.mode in ['forecast-only']: # TODO: fix ocnpost to run in cycled mode
dep_dict = {'type': 'metatask', 'name': f'{self.cdump}ocnpost'}
deps.append(rocoto.add_dependency(dep_dict))
# If all verification and ocean/wave coupling is off, add the gdas/gfs post metatask as a dependency
if len(deps) == 0:
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)

Expand Down

0 comments on commit 07f97a8

Please sign in to comment.