Skip to content

Bug: Plotting function fails if not all nodes have the required variable. #263

@kobebryant432

Description

@kobebryant432

Describe the bug

axes = SpatialBias.plot_dt(
            dt_spatial_bias_indicator.filter(lambda node: var in node.ds.data_vars), #Bug fix to ensure only datasets with the variable are plotted (to be fixed in valenspy)
            var=var,
            axes=axes.flatten(),
            shared_cbar="abs",
            # label="intake_esm_dataset_key",
            cmap=info["cmap_diverging"],
            cbar_kwargs={"shrink": 0.72},
            transform=ccrs.PlateCarree(),
        )

Fails if the dt contains non-empty nodes with datasets that do not contain the required variable

Expected behavior
Plot without that node being considered. (And provide a warning? That not all nodes have this variable?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions