From 635c4719e603538ce7cccf9ea6b31f3f84f20849 Mon Sep 17 00:00:00 2001 From: Walter Kolczynski - NOAA Date: Thu, 16 Nov 2023 20:35:30 +0000 Subject: [PATCH] Fix some rocoto dependencies (#2074) A few small errors/cleanup in the dependencies, mostly in fcst: A few small errors/cleanup have crept into the dependencies with recent changes, mostly in fcst: - Fixed the offset, as it would yield a string rocoto doesn't recognize when the interval was 24+ hrs - Removed the duplicate wave dependency. When `waveprep` is included, it depends on `waveinit` so there is no need to add a `waveinit` dependency. - Converted an interval in the archive job that was missed in #2039 Resolves #2075 --- workflow/rocoto/gfs_tasks.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/workflow/rocoto/gfs_tasks.py b/workflow/rocoto/gfs_tasks.py index 1da0f72694..cde0c96771 100644 --- a/workflow/rocoto/gfs_tasks.py +++ b/workflow/rocoto/gfs_tasks.py @@ -156,7 +156,7 @@ def aerosol_init(self): interval = self._base['INTERVAL_GFS'] elif self.cdump in ['gdas']: interval = self._base['INTERVAL'] - offset = f'-{timedelta_to_HMS(interval)}' + offset = timedelta_to_HMS(-interval) # Files from previous cycle files = [f'@Y@m@d.@H0000.fv_core.res.nc'] + \ @@ -491,8 +491,6 @@ def _fcst_forecast_only(self): wave_job = 'waveprep' if self.app_config.model_app in ['ATMW'] else 'waveinit' dep_dict = {'type': 'task', 'name': f'{self.cdump}{wave_job}'} dependencies.append(rocoto.add_dependency(dep_dict)) - dep_dict = {'type': 'task', 'name': f'{self.cdump}waveinit'} - dependencies.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_aero: # Calculate offset based on CDUMP = gfs | gdas @@ -501,7 +499,7 @@ def _fcst_forecast_only(self): interval = self._base['INTERVAL_GFS'] elif self.cdump in ['gdas']: interval = self._base['INTERVAL'] - offset = f'-{interval}' + offset = timedelta_to_HMS(-interval) deps = [] dep_dict = {'type': 'task', 'name': f'{self.cdump}aerosol_init'} deps.append(rocoto.add_dependency(dep_dict)) @@ -1012,7 +1010,7 @@ def arch(self): dep_dict = {'type': 'task', 'name': f'{self.cdump}vminmon'} deps2.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps2) - dep_dict = {'type': 'cycleexist', 'condition': 'not', 'offset': '-06:00:00'} + dep_dict = {'type': 'cycleexist', 'condition': 'not', 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"} dependencies.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='or', dep=dependencies) if self.cdump in ['gfs'] and self.app_config.do_tracker: