Let's see what is in the intake catalog. The underlying data base is given as a panda dataframe which we can access with 'col.df'. col.df.head() shows us the first rows of the table:
%% Cell type:code id: tags:
``` python
col.df.head()
```
%% Cell type:markdown id: tags:
## Browse Intake Catalogue and open Variable
%% Cell type:code id: tags:
``` python
query=dict(
source_id='MPI-ESM1-2-HR',
source_id="MPI-ESM1-2-LR",
variable_id="tasmax",
table_id="day",
experiment_id=["historical"])
experiment_id=["historical"],
)
cat=col.search(**query)
```
%% Cell type:markdown id: tags:
show query
%% Cell type:code id: tags:
``` python
cat.df
```
%% Cell type:code id: tags:
``` python
ds_tasmax=xr.open_dataset(cat.df['path'][0])# TBD: open data set of selected year
cat.df["path"][0]
```
%% Cell type:markdown id: tags:
ds_tasmax['tasmax']
open data set
%% Cell type:code id: tags:
``` python
ds_tasmax=xr.open_dataset(cat.df["path"][0])# TBD: open data set of selected year
ds_tasmax["tasmax"]
```
%% Cell type:markdown id: tags:
## Compare Model Grid Cell with chosen Location
%% Cell type:code id: tags:
``` python
# Find nearest model coordinate
# First, find the index of the grid point nearest a specific lat/lon.