Skip to content

Commit

Permalink
collect bkg member directories in list for mkdir (NOAA-EMC#1313)
Browse files Browse the repository at this point in the history
  • Loading branch information
RussTreadon-NOAA committed Apr 19, 2023
1 parent c48dd66 commit f902370
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions ush/python/pygfs/task/atmens_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,13 @@ def get_bkg_dict(self, task_config: Dict[str, Any]) -> Dict[str, List[str]]:
FileHandler({'mkdir': bkgdir}).sync()

# loop over ensemble members
dirlist = []
bkglist = []
for imem in range(1, task_config.NMEM_ENKF + 1):
memchar = f"mem{imem:03d}"

# make run directory for member restart files
bkgdir = [
os.path.join(task_config.DATA, 'bkg', memchar)
]
FileHandler({'mkdir': bkgdir}).sync()
# accumulate directory list for member restart files
dirlist.append(os.path.join(task_config.DATA, 'bkg', memchar))

# get FV3 RESTART files, this will be a lot simpler when using history files
rst_dir = os.path.join(task_config.comin_ges_atmens, memchar, 'atmos/RESTART')
Expand All @@ -273,6 +271,7 @@ def get_bkg_dict(self, task_config: Dict[str, Any]) -> Dict[str, List[str]]:
bkglist.append([os.path.join(rst_dir, basename), os.path.join(run_dir, basename)])

bkg_dict = {
'mkdir': dirlist,
'copy': bkglist,
}

Expand Down

0 comments on commit f902370

Please sign in to comment.