Skip to content

Commit

Permalink
Add metp dependency for gfscleanup NOAA-EMC#2899
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHuber-NOAA committed Sep 13, 2024
1 parent c65d170 commit 5d2dc1c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,8 +855,8 @@ def fcst(self):
try:
task = fcst_map[self.app_config.mode]()
except KeyError:
raise NotImplementedError(f'{self.app_config.mode} is not a valid type.\n' +
'Currently supported forecast types are:\n' +
raise NotImplementedError(f'{self.app_config.mode} is not a valid type.\n'
f'Currently supported forecast types are:\n'
f'{" | ".join(fcst_map.keys())}')

return task
Expand Down Expand Up @@ -2330,6 +2330,11 @@ def cleanup(self):
dep_dict = {'type': 'task', 'name': f'{self.run}npoess_pgrb2_0p5deg'}
deps.append(rocoto.add_dependency(dep_dict))

if self.run in ['gfs']:
if self.app_config.do_metp:
dep_dict = {'type': 'metatask', 'name': f'{self.run}metp'}
deps.append(rocoto.add_dependency(dep_dict))

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

resources = self.get_resource('cleanup')
Expand Down

0 comments on commit 5d2dc1c

Please sign in to comment.