Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return asset's attributes as keys when aggregate=False #173

Merged
merged 2 commits into from
Nov 4, 2019
Merged

Return asset's attributes as keys when aggregate=False #173

merged 2 commits into from
Nov 4, 2019

Conversation

andersy005
Copy link
Member

Addresses #163 (comment)

import intake
col_file = "https://raw.githubusercontent.com/NCAR/intake-esm-datastore/master/catalogs/pangeo-cmip6.json"

col = intake.open_esm_datastore(col_file)
query = dict(experiment_id='historical', table_id='Oyr', 
                 variable_id='o2', grid_label='gn', member_id='r1i1p1f1')
cat = col.search(**query)
# Disable aggregations
In [21]: dsets_pp = cat.to_dataset_dict(zarr_kwargs={"consolidated": True}, aggregate=False)                                                                                         
--> The keys in the returned dictionary of datasets are constructed as follows:
        'activity_id.institution_id.source_id.experiment_id.member_id.table_id.variable_id.grid_label'

--> There will be 2 group(s)

In [22]: dsets_pp.keys()                                                                                                                                                              
Out[22]: dict_keys(['CMIP.CCCma.CanESM5.historical.r1i1p1f1.Oyr.o2.gn', 'CMIP.IPSL.IPSL-CM6A-LR.historical.r1i1p1f1.Oyr.o2.gn'])

@andersy005
Copy link
Member Author

Cc @matt-long

@andersy005 andersy005 merged commit c3effdd into intake:master Nov 4, 2019
@andersy005 andersy005 deleted the patch-aggregate-false branch November 4, 2019 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant