Skip to content

Commit

Permalink
missing region file search in tercile in regrid for future implementa…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
chiaweh2 committed Apr 22, 2024
1 parent b87cd65 commit be09848
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mom6/mom6_module/mom6_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,13 @@ def get_tercile(
file_list = OpenDapStore(grid=self.grid,data_type='forecast').get_catalog()

file_read = [file for file in file_list if self.var in file]

# refine based on region
if average_type == 'grid':
file_read = [file for file in file_read if '.region.' not in file]
elif average_type == 'region':
file_read = [file for file in file_read if '.region.' in file]

ds = xr.open_mfdataset(
file_read,combine='nested',
concat_dim='init',
Expand Down

0 comments on commit be09848

Please sign in to comment.