Skip to content

Commit

Permalink
Wait to run wave post until after forecast completes
Browse files Browse the repository at this point in the history
The new forecast segments capability introduced an issue where the
wave post job could time out waiting for the output of later segments
before those segments were complete. For now, the dependency is changed
to wait until the forecast is complete until wave post can be refactored.
  • Loading branch information
WalterKolczynski-NOAA committed Sep 4, 2024
1 parent 10961a8 commit cfee714
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
9 changes: 3 additions & 6 deletions workflow/rocoto/gefs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,9 @@ def atmos_ensstat(self):

def wavepostsbs(self):
deps = []
for wave_grid in self._configs['wavepostsbs']['waveGRD'].split():
wave_hist_path = self._template_to_rocoto_cycstring(self._base["COM_WAVE_HISTORY_TMPL"], {'MEMDIR': 'mem#member#'})
data = f'{wave_hist_path}/gefswave.out_grd.{wave_grid}.@Y@m@d.@H0000'
dep_dict = {'type': 'data', 'data': data}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)
dep_dict = {'type': 'metatask', 'name': f'fcst_mem#member#'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep=deps)

wave_post_envars = self.envars.copy()
postenvar_dict = {'ENSMEM': '#member#',
Expand Down
9 changes: 3 additions & 6 deletions workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1188,12 +1188,9 @@ def _atmosoceaniceprod(self, component: str):

def wavepostsbs(self):
deps = []
for wave_grid in self._configs['wavepostsbs']['waveGRD'].split():
wave_hist_path = self._template_to_rocoto_cycstring(self._base["COM_WAVE_HISTORY_TMPL"])
data = f'{wave_hist_path}/{self.run}wave.out_grd.{wave_grid}.@Y@m@d.@H0000'
dep_dict = {'type': 'data', 'data': data}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)
dep_dict = {'type': 'metatask', 'name': f'{self.run}fcst'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep=deps)

resources = self.get_resource('wavepostsbs')
task_name = f'{self.run}wavepostsbs'
Expand Down

0 comments on commit cfee714

Please sign in to comment.