Skip to content

Commit 688c08c

Browse files
Fix broken example
1 parent 11b6c58 commit 688c08c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/source/how-to/enforce-search-query-criteria-via-require-all-on.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ kernelspec:
1212
```{code-cell} ipython3
1313
import intake
1414
15-
url = "https://raw.githubusercontent.com/intake/intake-esm/main/tutorial-catalogs/GOOGLE-CMIP6.json"
15+
url = "https://storage.googleapis.com/cmip6/pangeo-cmip6.json"
1616
cat = intake.open_esm_datastore(url)
1717
cat
1818
```
@@ -31,7 +31,7 @@ multiple experiment_ids from the Omon table_id, all from 3 different source_ids:
3131
```{code-cell} ipython3
3232
# Define our query
3333
query = dict(
34-
variable_id=["tos", "o2"],
34+
variable_id=["thetao", "o2", "tos"],
3535
experiment_id=["historical", "ssp585"],
3636
table_id=["Omon"],
3737
source_id=["ACCESS-ESM1-5", "AWI-CM-1-1-MR", "FGOALS-f3-L"],
@@ -54,10 +54,10 @@ cat_subset.df.groupby("source_id")[["experiment_id", "variable_id", "table_id"]]
5454
```
5555

5656
As you can see, the search results above include source_ids for which we only
57-
have one of the two variables, and one or two of the two
57+
have one or two of the three variables, and one of the two experiment ids.
5858

59-
We can tell intake-esm to discard any source_id that doesn’t have both variables
60-
`["tos", "o2"]` and both experiments
59+
We can tell intake-esm to discard any source_id that doesn’t have all three variables
60+
`["thetao", "o2", "tos"]` and both experiments
6161
`["historical", "ssp585"]` by passing `require_all_on=["source_id"]`
6262
to the search method:
6363

0 commit comments

Comments
 (0)