We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f51dd2 commit b0119f5Copy full SHA for b0119f5
cf/read_write/um/umread.py
@@ -1043,6 +1043,11 @@ def __init__(
1043
# Convert the UM version to a string and provide it as a
1044
# CF property. E.g. 405 -> '4.5', 606.3 -> '6.6.3', 1002
1045
# -> '10.2'
1046
+ #
1047
+ # Note: We don't just do `divmod(self.um_version, 100)`
1048
+ # because if self.um_version has a fractional part
1049
+ # then it would likely get altered in the divmod
1050
+ # calculation.
1051
a, b = divmod(int(self.um_version), 100)
1052
fraction = str(self.um_version).split(".")[-1]
1053
um = f"{a}.{b}"
0 commit comments