Skip to content

Commit

Permalink
more update for supporting monthly data
Browse files Browse the repository at this point in the history
  • Loading branch information
chengzhuzhang committed Feb 6, 2024
1 parent 102f88d commit 9772f90
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion e3sm_diags/driver/utils/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,25 @@ def _find_climo_file(self, path_name, data_name, season):
return os.path.join(path_name, filename)
# The below is only ran on model data, because a shorter name is passed into this software. Won't work when use month name such as '01' as season.
for filename in dir_files:
if season in ["ANN", "DJF", "MAM", "JJA", "SON"]:
if season in [
"ANN",
"DJF",
"MAM",
"JJA",
"SON",
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12",
]:
if filename.startswith(data_name) and season in filename:
return os.path.join(path_name, filename)
# No file found.
Expand Down

0 comments on commit 9772f90

Please sign in to comment.