Skip to content

Commit

Permalink
bugfix for "none" units
Browse files Browse the repository at this point in the history
  • Loading branch information
Courtney Peverley committed Aug 5, 2024
1 parent 5f338dd commit ec04d3f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions scripts/var_props.py
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,13 @@ def __init__(self, var1_stdname, var1_type, var1_kind, var1_units,
# end if
# end if
if self.__compat:
# Only "none" units are case-insensitive
if var1_units.lower() == 'none':
var1_units = 'none'
# end if
if var2_units.lower() == 'none':
var2_units = 'none'
# end if
# Check units argument
if var1_units != var2_units:
self.__equiv = False
Expand Down
2 changes: 1 addition & 1 deletion test/var_compatibility_test/test_host.meta
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
[ errmsg ]
standard_name = ccpp_error_message
long_name = Error message for error handling in CCPP
units = none
units = None
dimensions = ()
type = character
kind = len=512
Expand Down

0 comments on commit ec04d3f

Please sign in to comment.