From 3ca74771255727033b9dc043c652ac585178629c Mon Sep 17 00:00:00 2001 From: AndrewEichmann-NOAA <58948505+AndrewEichmann-NOAA@users.noreply.github.com> Date: Tue, 9 Jul 2024 08:28:54 -0400 Subject: [PATCH] Add fcst dependency to ocnanalprep (#2728) Add previous cycle's `fcst` as a dependency to `ocnanalprep` This ensures that the availability of restart files to the latter. This addresses a seldomly-encountered race condition where `ocnanalprep` fails due to the lack of the files. --- workflow/rocoto/gfs_tasks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/workflow/rocoto/gfs_tasks.py b/workflow/rocoto/gfs_tasks.py index 55fa5a2475..530ea465c4 100644 --- a/workflow/rocoto/gfs_tasks.py +++ b/workflow/rocoto/gfs_tasks.py @@ -659,7 +659,9 @@ def ocnanalprep(self): deps = [] dep_dict = {'type': 'task', 'name': f'{self.cdump}prepoceanobs'} deps.append(rocoto.add_dependency(dep_dict)) - dependencies = rocoto.create_dependency(dep=deps) + dep_dict = {'type': 'task', 'name': 'gdasfcst', 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"} + deps.append(rocoto.add_dependency(dep_dict)) + dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('ocnanalprep') task_name = f'{self.cdump}ocnanalprep'