#!/usr/bin/env python
# coding: utf-8

# In[1]:


import numpy as np
import xarray as xr   # html_repr branch


# In[2]:


lon = np.array([[-99.83, -99.32, -99.56],
                [-99.27, -99.39, -99.91],
                [-99.79, -99.23, -99.42]])
lat = np.array([[ 42.25,  42.21, 42.82],
                [ 42.91,  42.47, 42.71],
                [ 42.63,  42.59, 42.29]])

ds = xr.Dataset(data_vars={'foo': (('x', 'y'), np.random.rand(3, 3))},
                coords={
                    'x': [0, 1, 2], 'y': [0, 1, 2],
                    'lon': (('x', 'y'), lon, {'standard_name': 'longitude'}),
                    'lat': (('x', 'y'), lat, {'standard_name': 'latitude'})
                },
                attrs={'title': 'example dataset'})


# In[3]:


ds


# In[4]:


ds.foo


# In[5]:


ds.foo.variable


# In[6]:


ds.foo.x.variable


# In[7]:


ds.foo.lat


# In[8]:


xr.Dataset()


# In[9]:


xr.DataArray(1)


# In[ ]: