Skip to content

Commit b857e4c

Browse files
authored
Merge pull request #221 from arbennett/bugfix/utc_configuration
Bugfix/utc configuration
2 parents 6fa46b4 + 6652725 commit b857e4c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

metsim/cli/ms.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,13 @@ def to_list(s):
8383
else:
8484
forcing_files = conf['forcing']
8585

86-
if ('utc_offset' in conf.keys()
87-
and conf['utc_offset'].strip().lower() == 'true'):
88-
conf['utc_offset'] = True
89-
else:
90-
conf['utc_offset'] = False
86+
# Ensure that parameters with boolean values are correctly recorded
87+
for bool_param in ['utc_offset', 'period_ending']:
88+
if (bool_param in conf.keys()
89+
and conf[bool_param].strip().lower() == 'true'):
90+
conf[bool_param] = True
91+
else:
92+
conf[bool_param] = False
9193

9294
# Update the full configuration
9395
conf.update({"calendar": conf.get('calendar', 'standard'),

0 commit comments

Comments
 (0)