Skip to content

How can I get variables from different tables with 'require_all_on' #265

@mickaellalande

Description

@mickaellalande

I would like to select only a few variables from 2 different tables (Amon and LImon), for example, tas, snc and pr and get all the models that have these 3 variables for these 2 tables. But when I do that I get 0 results, and I need to remove the table_id (see code bellow), but in that case, I get the variables for all different tables that I don't need.

query = dict(
    experiment_id=['historical'],
    variable_id=['tas', 'snc', 'pr'],
    table_id=['Amon', 'LImon'] # <-- problem
)

col_subset = col.search(require_all_on=["source_id"], **query)

col_subset.df.groupby("source_id")[
    ["experiment_id", "variable_id", "table_id", "member_id"]
].nunique()

Is there any way to do this?

Thanks in advance for your answers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    usage questionUser questions which do not appear to be bugs or enhancements.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions