Skip to content

Commit

Permalink
Merge branch 'NOAA-EMC:develop' into feature/tracker_jobs_separate
Browse files Browse the repository at this point in the history
  • Loading branch information
KateFriedman-NOAA authored Nov 14, 2023
2 parents 5f4e66e + 5730a71 commit 1ef9611
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion parm/config/gfs/config.stage_ic
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ case "${CASE}" in
export CPL_ATMIC=GEFS-NoahMP-aerosols-p8c_refactored
export CPL_ICEIC=CPC_refactored
export CPL_OCNIC=CPC3Dvar_refactored
export CPL_WAVIC=GEFSwave20210528v2_refactored
export CPL_WAVIC=workflow_C384_refactored
;;
"C768")
export CPL_ATMIC=HR2_refactored
Expand Down
25 changes: 15 additions & 10 deletions workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,17 @@ def waveinit(self):

resources = self.get_resource('waveinit')
dependencies = None
cycledef = None
if self.app_config.mode in ['cycled']:
deps = []
dep_dict = {'type': 'task', 'name': f'{self.cdump}prep'}
deps.append(rocoto.add_dependency(dep_dict))
dep_dict = {'type': 'cycleexist', 'condition': 'not', 'offset': '-06:00:00'}
deps.append(rocoto.add_dependency(dep_dict))
if self.cdump in ['gdas']:
dep_dict = {'type': 'cycleexist', 'condition': 'not', 'offset': '-06:00:00'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='or', dep=deps)

task = create_wf_task('waveinit', resources, cdump=self.cdump, envar=self.envars, dependency=dependencies)
cycledef = 'gdas_half,gdas' if self.cdump in ['gdas'] else self.cdump
task = create_wf_task('waveinit', resources, cdump=self.cdump, envar=self.envars, dependency=dependencies, cycledef=cycledef)

return task

Expand All @@ -128,9 +130,9 @@ def waveprep(self):
dep_dict = {'type': 'task', 'name': f'{self.cdump}waveinit'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep=deps)

cycledef = 'gdas_half,gdas' if self.cdump in ['gdas'] else self.cdump
resources = self.get_resource('waveprep')
task = create_wf_task('waveprep', resources, cdump=self.cdump, envar=self.envars, dependency=dependencies)
task = create_wf_task('waveprep', resources, cdump=self.cdump, envar=self.envars, dependency=dependencies, cycledef=cycledef)

return task

Expand Down Expand Up @@ -488,6 +490,8 @@ 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 Down Expand Up @@ -521,10 +525,6 @@ def _fcst_cycled(self):
dep_dict = {'type': 'task', 'name': f'{self.cdump}ocnanalpost'}
dependencies.append(rocoto.add_dependency(dep_dict))

if self.app_config.do_wave and self.cdump in self.app_config.wave_cdumps:
dep_dict = {'type': 'task', 'name': f'{self.cdump}waveprep'}
dependencies.append(rocoto.add_dependency(dep_dict))

if self.app_config.do_aero:
dep_dict = {'type': 'task', 'name': f'{self.cdump}aeroanlfinal'}
dependencies.append(rocoto.add_dependency(dep_dict))
Expand All @@ -540,6 +540,11 @@ def _fcst_cycled(self):
dependencies.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='or', dep=dependencies)

if self.app_config.do_wave and self.cdump in self.app_config.wave_cdumps:
dep_dict = {'type': 'task', 'name': f'{self.cdump}waveprep'}
dependencies.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='and', dep=dependencies)

cycledef = 'gdas_half,gdas' if self.cdump in ['gdas'] else self.cdump

resources = self.get_resource('fcst')
Expand Down

0 comments on commit 1ef9611

Please sign in to comment.