Skip to content

Commit

Permalink
updated gefs_tasks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonMFernando-NOAA committed Sep 24, 2024
1 parent b083d4e commit 262bfb3
Showing 1 changed file with 30 additions and 8 deletions.
38 changes: 30 additions & 8 deletions workflow/rocoto/gefs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,11 +560,35 @@ def arch(self):

def cleanup(self):
deps = []
dep_dict = {'type': 'task', 'name': 'arch'}
deps.append(rocoto.add_dependency(dep_dict))

dependencies = rocoto.create_dependency(dep=deps)

if self.app_config.do_extractvars:
dep_dict = {'type': 'task', 'name': 'arch'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep=deps)
else:
dep_dict = {'type': 'metatask', 'name': 'atmos_prod'}
deps.append(rocoto.add_dependency(dep_dict))
dep_dict = {'type': 'metatask', 'name': 'atmos_ensstat'}
deps.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_ice:
dep_dict = {'type': 'metatask', 'name': 'ice_prod'}
deps.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_ocean:
dep_dict = {'type': 'metatask', 'name': 'ocean_prod'}
deps.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_wave:
dep_dict = {'type': 'metatask', 'name': 'wave_post_grid'}
deps.append(rocoto.add_dependency(dep_dict))
dep_dict = {'type': 'metatask', 'name': 'wave_post_pnt'}
deps.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_wave_bnd:
dep_dict = {'type': 'metatask', 'name': 'wave_post_bndpnt'}
deps.append(rocoto.add_dependency(dep_dict))
dep_dict = {'type': 'metatask', 'name': 'wave_post_bndpnt_bull'}
deps.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_extractvars:
dep_dict = {'type': 'metatask', 'name': 'extractvars'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep=deps, dep_condition='and')
resources = self.get_resource('cleanup')
task_name = 'cleanup'
task_dict = {'task_name': task_name,
Expand All @@ -576,8 +600,6 @@ def cleanup(self):
'job_name': f'{self.pslot}_{task_name}_@H',
'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log',
'maxtries': '&MAXTRIES;'
}

}
task = rocoto.create_task(task_dict)

return task

0 comments on commit 262bfb3

Please sign in to comment.