Skip to content

Commit

Permalink
Add cycled staging job to mesh
Browse files Browse the repository at this point in the history
- set job for gdas_half cycledef only
- update fcst jobs dependencies

Refs NOAA-EMC#2475
  • Loading branch information
KateFriedman-NOAA committed Jun 14, 2024
1 parent a675a3d commit b97a482
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions workflow/applications/gfs_cycled.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def _get_app_configs(self):
if self.do_ocean or self.do_ice:
configs += ['oceanice_products']

configs += ['sfcanl', 'analcalc', 'fcst', 'upp', 'atmos_products', 'arch', 'cleanup']
configs += ['stage_ic', 'sfcanl', 'analcalc', 'fcst', 'upp', 'atmos_products', 'arch', 'cleanup']

if self.do_hybvar:
if self.do_jediatmens:
Expand Down Expand Up @@ -163,7 +163,7 @@ def get_task_names(self):
if self.do_jediatmens:
hybrid_tasks += ['atmensanlinit', 'atmensanlletkf', 'atmensanlfv3inc', 'atmensanlfinal', 'echgres']
else:
hybrid_tasks += ['eobs', 'eupd', 'echgres']
hybrid_tasks += ['stage_ic', 'eobs', 'eupd', 'echgres']
hybrid_tasks += ['ediag'] if self.lobsdiag_forenkf else ['eomg']
hybrid_after_eupd_tasks += ['ecen', 'esfc', 'efcs', 'epos', 'earc', 'cleanup']

Expand All @@ -179,7 +179,7 @@ def get_task_names(self):
if self.do_aero and 'gdas' in self.aero_anl_cdumps:
gdas_tasks += ['aeroanlinit', 'aeroanlrun', 'aeroanlfinal']

gdas_tasks += ['atmanlupp', 'atmanlprod', 'fcst']
gdas_tasks += ['stage_ic', 'atmanlupp', 'atmanlprod', 'fcst']

if self.do_upp:
gdas_tasks += ['atmupp']
Expand Down
9 changes: 6 additions & 3 deletions workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ def _is_this_a_gdas_task(cdump, task_name):
# Specific Tasks begin here
def stage_ic(self):

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

cpl_ic = self._configs['stage_ic']

resources = self.get_resource('stage_ic')
task_name = f'{self.cdump}stage_ic'
task_dict = {'task_name': task_name,
'resources': resources,
'envars': self.envars,
'cycledef': self.cdump,
'cycledef': cycledef,
'command': f'{self.HOMEgfs}/jobs/rocoto/stage_ic.sh',
'job_name': f'{self.pslot}_{task_name}_@H',
'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log',
Expand Down Expand Up @@ -833,10 +835,11 @@ def _fcst_cycled(self):
dependencies = rocoto.create_dependency(dep_condition='and', dep=dependencies)

if self.cdump in ['gdas']:
dep_dict = {'type': 'cycleexist', 'condition': 'not', 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"}
dep_dict = {'type': 'task', 'name': f'{self.cdump}stage_ic'}
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))
Expand Down Expand Up @@ -2520,7 +2523,7 @@ def efcs(self):
dep_dict = {'type': 'task', 'name': f'{self.cdump}esfc'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)
dep_dict = {'type': 'cycleexist', 'condition': 'not', 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"}
dep_dict = {'type': 'task', 'name': f'{self.cdump}stage_ic'}
dependencies.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='or', dep=dependencies)

Expand Down

0 comments on commit b97a482

Please sign in to comment.