There is code in spd_cdf_info_to_tplot that sets the ysubtitle based on the value of the UNITS metadata. If UNITS is specified as an array (e.g. position variables in the THEMIS STATE CDF), ysubtitle becomes an array, and this causes problems in other code that expects a scalar.
thm_load_state actually overrides the CDF units, setting them to a string scalar, but this doesn't fix ysubtitle, which is set at CDF load time.
For now we can fix this by using units[0] if units is an array, but we should revisit the way we insert metadata (units, coordinate systems) into labels, subtitles, and other plot options.
There is code in spd_cdf_info_to_tplot that sets the ysubtitle based on the value of the UNITS metadata. If UNITS is specified as an array (e.g. position variables in the THEMIS STATE CDF), ysubtitle becomes an array, and this causes problems in other code that expects a scalar.
thm_load_state actually overrides the CDF units, setting them to a string scalar, but this doesn't fix ysubtitle, which is set at CDF load time.
For now we can fix this by using units[0] if units is an array, but we should revisit the way we insert metadata (units, coordinate systems) into labels, subtitles, and other plot options.