Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some rocoto dependencies #2074

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so if L1013 works, why does this not?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This worked, but I changed this to be consistent with L502 (it is the cleaner way to do it).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. thanks. I was trying to understand what was the "bug" part of this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug was the one on L502 that wasn't using timedelta_to_HMS().


# Files from previous cycle
files = [f'@Y@m@[email protected]_core.res.nc'] + \
Expand Down Expand Up @@ -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
Expand All @@ -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))
Expand Down Expand Up @@ -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:
Expand Down