Can parse_cf routine skip nondimensional variable instead of giving an error? #1092
Labels
Area: Units
Pertains to unit information
Area: Xarray
Pertains to xarray integration
Type: Enhancement
Enhancement to existing functionality
Milestone
metpy.parse_cf
gives error whennondimensional
variable is encountered. For example:This gives error
UndefinedUnitError: 'nondimensional' is not defined in the unit registry
.This happens when
mask
is encountered for this example. However on addingdata['mask'].attrs['units'] = 1
before parsing solves the problem. Also it runs fine ifmask
is not present as coordinate.Expected output:
If a user picks a variable with an unknown CF unit (like nondimensional), shouldn't the cf_parse routine just skip that variable instead of throwing an error?
Python 3.7.3
0.10.0
The text was updated successfully, but these errors were encountered: