Skip to content

Commit 948e76f

Browse files
committed
Merge pull request SciTools#1483 from ocefpaf/empty_string
Load empty string as dimensionless.
2 parents 2122d96 + 40a5d47 commit 948e76f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/iris/fileformats/_pyke_rules/fc_rules_cf.krb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,8 @@ fc_extras
947947
################################################################################
948948
def get_attr_units(cf_var, attributes):
949949
attr_units = getattr(cf_var, CF_ATTR_UNITS, iris.unit._UNIT_DIMENSIONLESS)
950+
if not attr_units:
951+
attr_units = '1'
950952

951953
# Sanitise lat/lon units.
952954
if attr_units in UD_UNITS_LAT or attr_units in UD_UNITS_LON:

0 commit comments

Comments
 (0)