Skip to content

Commit

Permalink
simplify workflow setup for atmensanlinit (NOAA-EMC#1313)
Browse files Browse the repository at this point in the history
  • Loading branch information
RussTreadon-NOAA committed Mar 2, 2023
1 parent 1536262 commit 3a3d628
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions workflow/rocoto/workflow_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1086,25 +1086,15 @@ def eupd(self):
return task

def atmensanlinit(self):
gfs_cyc = self._base["gfs_cyc"]
do_gfs_enkf = True if self.app_config.do_hybvar and 'gfs' in self.app_config.eupd_cdumps else False
cycledef = 'gdas'
if self.cdump in ['gfs'] and do_gfs_enkf:
cycledef = 'gfs'
if gfs_cyc != 4:
cycledef = 'gdas'
task_cdump = cycledef

deps = []
dep_dict = {'type': 'task', 'name': f'{task_cdump}prep'}
dep_dict = {'type': 'task', 'name': f'{self.cdump.replace("enkf","")}prep'}
deps.append(rocoto.add_dependency(dep_dict))
dep_dict = {'type': 'metatask', 'name': 'enkfgdasepmn', 'offset': '-06:00:00'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)

resources = self.get_resource('atmensanlinit')
task = create_wf_task('atmensanlinit', resources, cdump=self.cdump, envar=self.envars, dependency=dependencies,
cycledef=cycledef)
task = create_wf_task('atmensanlinit', resources, cdump=self.cdump, envar=self.envars, dependency=dependencies)

return task

Expand Down

0 comments on commit 3a3d628

Please sign in to comment.