Skip to content

Commit a325681

Browse files
committed
Another bug fix for run_ccam.py
1 parent 7c9e9eb commit a325681

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

run_ccam.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2300,18 +2300,22 @@ def check_timestep_in_file(fname):
23002300
def check_calendar_in_file(cname, calendar_found):
23012301
"Checks what calendar is used for input file"
23022302

2303-
calendar_found="missing"
2303+
new_calendar = False
23042304
if check_attribute_in_file(cname, "time", "calendar", "noleap") is True:
23052305
calendar_found = "noleap"
2306+
new_calendar = True
23062307
if check_attribute_in_file(cname, "time", "calendar", "360_day") is True:
23072308
calendar_found = "360"
2309+
new_calendar = True
23082310
if check_attribute_in_file(cname, "time", "calendar", "gregorian") is True:
23092311
calendar_found = "leap"
2312+
new_calendar = True
23102313

23112314
# CCAM special case
23122315
ccam_host = check_var_in_file(cname, ":version")
2313-
if (ccam_host is True) and (calendar_found == "missing"):
2316+
if (ccam_host is True) and (new_calendar is False):
23142317
calendar_found = "leap"
2318+
new_calendar = True
23152319

23162320
return calendar_found
23172321

0 commit comments

Comments
 (0)