Skip to content

Clarify ValueError for plot_profile() #78

Description

@ewquon

Calling plot_profile() with specified times=..., for which any of the specified times does not exist throws a cryptic message:

ValueError: x and y must have same first dimension, but have shapes (0, 200) and (200,)

where 200 is the number of height levels. This backtraces to https://github.com/a2e-mmc/mmctools/blob/master/plotting.py#L819.

This should instead say something along the lines of "The requested time does not exist in the dataset" and then skip that particular profile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions