Skip to content

numpy dtype error when plotting time #387

@gg2

Description

@gg2

While testing ACT to fetch arbitrary plot data, I'm running it against some local VAP data. For most variables it plots successfully; but if I try to plot the variable 'time', I get the following error:
"
The DType <class 'numpy.dtype[datetime64]'> could not be promoted by <class 'numpy.dtype[float64]'>. This means that no common DType exists for the given inputs. For example they cannot be stored in a single array unless the dtype is object. The full list of DTypes is: (<class 'numpy.dtype[datetime64]'>, <class 'numpy.dtype[float64]'>)
"

'time' is specified as double in this data.
At the moment, I'm running this on Python 3.7.9 on Windows 10.

    nc_data = act.io.armfiles.read_netcdf(files_list)
    ts_display = act.plotting.TimeSeriesDisplay(nc_data, figsize=(19,11), subplot_shape=(2,))
    ts_display.plot(var_name, subplot_index=(0,))

files_list is a list of filenames gathered per specified date ranges.

If desired and unable to replicate the error, I can point you at the data on ARM development servers.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions