Skip to content

Commit e501e4b

Browse files
authored
Merge pull request #4 from billsacks/python_dev_meeting
Changes by Bill Sacks
2 parents dbc48b7 + d09113d commit e501e4b

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

python/ctsm/args_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ def plon_type(plon):
4444
Returns:
4545
plon_out (float): converted longitude between 0 and 360
4646
"""
47-
plon = float(plon)
48-
if plon < -180 or plon > 360:
47+
plon_float = float(plon)
48+
if plon_float < -180 or plon_float > 360:
4949
raise argparse.ArgumentTypeError(
5050
"ERROR: Longitude should be between 0 and 360 or -180 and 180."
5151
)
52-
plon_out = lon_range_0_to_360(plon)
52+
plon_out = lon_range_0_to_360(plon_float)
5353
return plon_out

python/ctsm/config_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ def _convert_to_bool(var):
156156
Returns:
157157
var_out (bool): Boolean value corresponding to the input.
158158
"""
159-
if var.lower() in ("yes", "true", "t", "y", "1"):
159+
if var.lower() in ("yes", "true", "t", "y", "1", "on"):
160160
var_out = True
161-
elif var.lower() in ("no", "false", "f", "n", "0"):
161+
elif var.lower() in ("no", "false", "f", "n", "0", "off"):
162162
var_out = False
163163
else:
164164
raise ValueError("Boolean value expected. [true or false] or [y or n]")

python/ctsm/git_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
def get_ctsm_git_short_hash():
1111
"""
12-
Returns Git short SHA for the currect directory.
12+
Returns Git short SHA for the CTSM repository.
1313
1414
Args:
1515
@@ -30,7 +30,7 @@ def get_ctsm_git_short_hash():
3030

3131
def get_ctsm_git_long_hash():
3232
"""
33-
Returns Git long SHA for the currect directory.
33+
Returns Git long SHA for the CTSM repository.
3434
3535
Args:
3636
@@ -49,14 +49,14 @@ def get_ctsm_git_long_hash():
4949

5050
def get_ctsm_git_describe():
5151
"""
52-
Function for giving the recent tag of the git repo
52+
Function for giving the recent tag of the CTSM repository
5353
5454
Args:
5555
5656
Raises:
5757
5858
Returns:
59-
label (str) : ouput of running 'git describe' in shell
59+
label (str) : ouput of running 'git describe' for the CTSM repository
6060
"""
6161
label = (
6262
subprocess.check_output(["git", "-C", path_to_ctsm_root(), "describe"])

0 commit comments

Comments
 (0)