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

Refine fit2obs job in rocoto mesh #2047

5 changes: 4 additions & 1 deletion workflow/applications/gfs_cycled.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _get_app_configs(self):
if self.do_ocean:
configs += ['ocnpost']

configs += ['sfcanl', 'analcalc', 'fcst', 'post', 'vrfy', 'fit2obs', 'arch', 'cleanup']
configs += ['sfcanl', 'analcalc', 'fcst', 'post', 'vrfy', 'arch', 'cleanup']

if self.do_hybvar:
if self.do_jediatmens:
Expand All @@ -56,6 +56,9 @@ def _get_app_configs(self):
configs += ['eobs', 'eomg', 'ediag', 'eupd']
configs += ['ecen', 'esfc', 'efcs', 'echgres', 'epos', 'earc']

if self.do_fit2obs:
configs += ['fit2obs']

if self.do_verfozn:
configs += ['verfozn']

Expand Down
52 changes: 24 additions & 28 deletions workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,11 +922,8 @@ def fit2obs(self):
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('fit2obs')
task = create_wf_task('fit2obs', resources, cdump=self.cdump, envar=self.envars, dependency=dependencies,
cycledef=cycledef)
task = create_wf_task('fit2obs', resources, cdump=self.cdump, envar=self.envars, dependency=dependencies)

return task

Expand Down Expand Up @@ -957,33 +954,32 @@ def metp(self):
def arch(self):
deps = []
dependencies = []
if self.app_config.do_verfozn or self.app_config.do_verfrad or self.app_config.do_vminmon:
if self.app_config.mode in ['cycled']:
if self.cdump in ['gfs']:
if self.app_config.do_vminmon:
dep_dict = {'type': 'task', 'name': f'{self.cdump}vminmon'}
deps.append(rocoto.add_dependency(dep_dict))
elif self.cdump in ['gdas']:
deps2 = []
if self.app_config.do_verfozn:
dep_dict = {'type': 'task', 'name': f'{self.cdump}verfozn'}
deps2.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_verfrad:
dep_dict = {'type': 'task', 'name': f'{self.cdump}verfrad'}
deps2.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_vminmon:
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'}
dependencies.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='or', dep=dependencies)
if self.app_config.mode in ['cycled']:
if self.cdump in ['gfs']:
if self.app_config.do_vminmon:
dep_dict = {'type': 'task', 'name': f'{self.cdump}vminmon'}
deps.append(rocoto.add_dependency(dep_dict))
elif self.cdump in ['gdas']: # Block for handling half cycle dependencies
deps2 = []
if self.app_config.do_fit2obs:
dep_dict = {'type': 'task', 'name': f'{self.cdump}fit2obs'}
deps2.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_verfozn:
dep_dict = {'type': 'task', 'name': f'{self.cdump}verfozn'}
deps2.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_verfrad:
dep_dict = {'type': 'task', 'name': f'{self.cdump}verfrad'}
deps2.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_vminmon:
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'}
dependencies.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='or', dep=dependencies)
if self.app_config.do_vrfy:
dep_dict = {'type': 'task', 'name': f'{self.cdump}vrfy'}
deps.append(rocoto.add_dependency(dep_dict))
if self.cdump in ['gdas'] and self.app_config.do_fit2obs:
dep_dict = {'type': 'task', 'name': f'{self.cdump}fit2obs'}
deps.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_wave:
dep_dict = {'type': 'task', 'name': f'{self.cdump}wavepostsbs'}
deps.append(rocoto.add_dependency(dep_dict))
Expand Down