Commit 35cb9695 authored by Nils Brüggemann's avatar Nils Brüggemann
Browse files Avoid error when units are not set in netcdf variable.

parent bd94afa3
Pipeline #12167 passed with stages
in 8 seconds
......@@ -256,7 +256,11 @@ else:
# --- title, colorbar, and x/y label strings
if iopts.cbar_str=='auto':
iopts.cbar_str = f'{data.long_name} [{data.units}]'
units = data.units
units = 'NA'
iopts.cbar_str = f'{data.long_name} [{units}]'
if (iopts.title_right=='auto') and ('time' in ds[var].dims):
tstr = str(
#tstr = tstr.split('T')[0].replace('-', '')+'T'+tstr.split('T')[1].split('.')[0].replace(':','')+'Z'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment