Skip to content

Commit

Permalink
Move ntiles out of the Tasks object
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHuber-NOAA committed Feb 11, 2025
1 parent 3694e79 commit ab0c621
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ def aerosol_init(self):

deps = []
# Files from current cycle
files = ['gfs_ctrl.nc'] + [f'gfs_data.tile{tile}.nc' for tile in range(1, self.n_tiles + 1)]
ntiles = self._base['ntiles']
files = ['gfs_ctrl.nc'] + [f'gfs_data.tile{tile}.nc' for tile in range(1, ntiles + 1)]
for file in files:
data = f'{input_path}/{file}'
dep_dict = {'type': 'data', 'data': data}
Expand All @@ -185,8 +186,8 @@ def aerosol_init(self):

# Files from previous cycle
files = [f'@Y@m@[email protected]_core.res.nc'] + \
[f'@Y@m@[email protected]_core.res.tile{tile}.nc' for tile in range(1, self.n_tiles + 1)] + \
[f'@Y@m@[email protected]_tracer.res.tile{tile}.nc' for tile in range(1, self.n_tiles + 1)]
[f'@Y@m@[email protected]_core.res.tile{tile}.nc' for tile in range(1, ntiles + 1)] + \
[f'@Y@m@[email protected]_tracer.res.tile{tile}.nc' for tile in range(1, self.ntiles + 1)]

for file in files:
data = [f'{restart_path}/', file]
Expand Down

0 comments on commit ab0c621

Please sign in to comment.