Skip to content

Commit

Permalink
Clean up search for h0 strings
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-richling committed Jul 9, 2024
1 parent 7d80596 commit 242d4e9
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions scripts/plotting/tape_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,15 @@ def tape_recorder(adfobj):
cam_hist_strs = adfobj.hist_string["test_hist_str"]

# Filter the list to include only strings that are exactly in the possible h0 strings
# - Search for either h0 of h0a
substrings = ["cam.h0","cam.h0a"]
# - Search for either h0 or h0a
substrings = {"cam.h0","cam.h0a"}
case_hist_strs = []
for i,cam_case_str in enumerate(cam_hist_strs):
cam_hist_str = []
for cam_case_str in cam_hist_strs:
# Check each possible h0 string
for string in cam_case_str:
if string in substrings:
cam_hist_str.append(string)
case_hist_strs.append(cam_hist_str[0])
case_hist_strs.append(string)
break

#Grab test case climo years
start_years = adfobj.climo_yrs["syears"]
Expand Down

0 comments on commit 242d4e9

Please sign in to comment.