Skip to content

Commit

Permalink
modified workflow\rocoto\gfs_tasks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonMFernando-NOAA committed Jan 21, 2025
1 parent d87dceb commit db51aea
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3012,35 +3012,20 @@ def earc_vrfy(self):
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)

earcenvars = self.envars.copy()
earcenvars.append(rocoto.create_envar(name='ENSGRP', value='#grp#'))

# Integer division is floor division, but we need ceiling division
n_groups = -(self.nmem // -self._configs['earc_vrfy']['NMEM_EARCGRP'])
groups = ' '.join([f'{grp:02d}' for grp in range(0, n_groups + 1)])

resources = self.get_resource('earc_tars')

var_dict = {'grp': groups}
resources = self.get_resource('earc_vrfy')

task_name = f'{self.run}_earc_vrfy_#grp#'
task_name = f'{self.run}_earc_vrfy'
task_dict = {'task_name': task_name,
'resources': resources,
'dependency': dependencies,
'envars': earcenvars,
'cycledef': self.run.replace('enkf', ''),
'command': f'{self.HOMEgfs}/jobs/rocoto/earc_vrfy.sh',
'job_name': f'{self.pslot}_{task_name}_@H',
'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log',
'maxtries': '&MAXTRIES;'
}

metatask_dict = {'task_name': f'{self.run}_eamn',
'var_dict': var_dict,
'task_dict': task_dict
}

task = rocoto.create_task(metatask_dict)
task = rocoto.create_task(task_dict)

return task

Expand Down Expand Up @@ -3079,7 +3064,7 @@ def earc_tars(self):
'maxtries': '&MAXTRIES;'
}

metatask_dict = {'task_name': f'{self.run}_eamn',
metatask_dict = {'task_name': f'{self.run}_earc_tars',
'var_dict': var_dict,
'task_dict': task_dict
}
Expand Down

0 comments on commit db51aea

Please sign in to comment.