/work/mh0727/m300524/miniconda3/envs/pymistral/lib/python3.7/site-packages/xarray/conventions.py:498: SerializationWarning: variable 'tas' has multiple fill values {1e+20, 1e+20}, decoding all values to NaN.
decode_timedelta=decode_timedelta,
CPU times: user 42.4 s, sys: 17.9 s, total: 1min
Wall time: 54.9 s
%% Cell type:code id: tags:
``` python
# return dict because models different spatial dimensions
/work/mh0727/m300524/miniconda3/envs/pymistral/lib/python3.7/site-packages/dask/array/numpy_compat.py:40: RuntimeWarning: invalid value encountered in true_divide
x = np.divide(x1, x2, out)
/work/mh0727/m300524/miniconda3/envs/pymistral/lib/python3.7/site-packages/dask/array/numpy_compat.py:40: RuntimeWarning: invalid value encountered in true_divide
x = np.divide(x1, x2, out)
%% Cell type:code id: tags:
``` python
```
%% Cell type:markdown id: tags:
# observations with `intake-xarray`
%% Cell type:markdown id: tags:
- avoid copy pasting for accessing data
- distinction between data curator and analyst roles
- access data without learning every backend API
- version control data sources
- cache remote data sources
- see https://intake.readthedocs.io/en/latest/use_cases.html
/work/mh0727/m300524/miniconda3/envs/pymistral/lib/python3.7/site-packages/dask/array/numpy_compat.py:40: RuntimeWarning: invalid value encountered in true_divide
plt.title('HadCRUT4 temperature anomalies by country')
plt.axhline(y=0,c='gray',ls=':')
plt.axvline(x=1960,c='gray',ls='--')
plt.axvline(x=1989,c='gray',ls='--')
plt.show()
```
%% Output
/work/mh0727/m300524/miniconda3/envs/pymistral/lib/python3.7/site-packages/dask/array/numpy_compat.py:40: RuntimeWarning: invalid value encountered in true_divide
cbar_kwargs={"label": "Surface Temperature Trend [$^\circ C / 30 yrs$]",},
)
# lets add a coastline to each axis
# great reason to use FacetGrid.map
fg.map(lambda: plt.gca().coastlines())
```
%% Output
<xarray.plot.facetgrid.FacetGrid at 0x2b866bae2410>
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:markdown id: tags:
## read netcdf without xarray
the old netcdf way 🙄
%% Cell type:code id: tags:
``` python
from netCDF4 import Dataset
import matplotlib.pyplot as plt
%matplotlib inline
```
%% Cell type:code id: tags:
``` python
ds = Dataset(urlpath)
```
%% Cell type:markdown id: tags:
[netcdf](https://www.unidata.ucar.edu/software/netcdf/) is a self-describing data format.
%% Cell type:code id: tags:
``` python
ds
```
%% Output
<class 'netCDF4._netCDF4.Dataset'>
root group (NETCDF4 data model, file format HDF5):
title: HadCRUT4 near-surface temperature ensemble data - ensemble median
institution: Met Office Hadley Centre / Climatic Research Unit, University of East Anglia
history: Updated at 09/07/2020 14:17:54
source: CRUTEM.4.6.0.0, HadSST.3.1.1.0
comment:
reference: Morice, C. P., J. J. Kennedy, N. A. Rayner, and P. D. Jones (2012), Quantifying uncertainties in global and regional temperature change using an ensemble of observational estimates: The HadCRUT4 dataset, J. Geophys. Res., doi:10.1029/2011JD017187
/work/mh0727/m300524/miniconda3/envs/pymistral/lib/python3.7/site-packages/xarray/conventions.py:498: SerializationWarning: variable 'tas' has multiple fill values {1e+20, 1e+20}, decoding all values to NaN.
decode_timedelta=decode_timedelta,
CPU times: user 42.4 s, sys: 17.9 s, total: 1min
Wall time: 54.9 s
%% Cell type:code id: tags:
``` python
# return dict because models different spatial dimensions
/work/mh0727/m300524/miniconda3/envs/pymistral/lib/python3.7/site-packages/dask/array/numpy_compat.py:40: RuntimeWarning: invalid value encountered in true_divide
x = np.divide(x1, x2, out)
/work/mh0727/m300524/miniconda3/envs/pymistral/lib/python3.7/site-packages/dask/array/numpy_compat.py:40: RuntimeWarning: invalid value encountered in true_divide
x = np.divide(x1, x2, out)
%% Cell type:code id: tags:
``` python
```
%% Cell type:markdown id: tags:
# observations with `intake-xarray`
%% Cell type:markdown id: tags:
- avoid copy pasting for accessing data
- distinction between data curator and analyst roles
- access data without learning every backend API
- version control data sources
- cache remote data sources
- see https://intake.readthedocs.io/en/latest/use_cases.html
/work/mh0727/m300524/miniconda3/envs/pymistral/lib/python3.7/site-packages/dask/array/numpy_compat.py:40: RuntimeWarning: invalid value encountered in true_divide
plt.title('HadCRUT4 temperature anomalies by country')
plt.axhline(y=0,c='gray',ls=':')
plt.axvline(x=1960,c='gray',ls='--')
plt.axvline(x=1989,c='gray',ls='--')
plt.show()
```
%% Output
/work/mh0727/m300524/miniconda3/envs/pymistral/lib/python3.7/site-packages/dask/array/numpy_compat.py:40: RuntimeWarning: invalid value encountered in true_divide
cbar_kwargs={"label": "Surface Temperature Trend [$^\circ C / 30 yrs$]",},
)
# lets add a coastline to each axis
# great reason to use FacetGrid.map
fg.map(lambda: plt.gca().coastlines())
```
%% Output
<xarray.plot.facetgrid.FacetGrid at 0x2b866bae2410>
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:markdown id: tags:
## read netcdf without xarray
the old netcdf way 🙄
%% Cell type:code id: tags:
``` python
from netCDF4 import Dataset
import matplotlib.pyplot as plt
%matplotlib inline
```
%% Cell type:code id: tags:
``` python
ds = Dataset(urlpath)
```
%% Cell type:markdown id: tags:
[netcdf](https://www.unidata.ucar.edu/software/netcdf/) is a self-describing data format.
%% Cell type:code id: tags:
``` python
ds
```
%% Output
<class 'netCDF4._netCDF4.Dataset'>
root group (NETCDF4 data model, file format HDF5):
title: HadCRUT4 near-surface temperature ensemble data - ensemble median
institution: Met Office Hadley Centre / Climatic Research Unit, University of East Anglia
history: Updated at 09/07/2020 14:17:54
source: CRUTEM.4.6.0.0, HadSST.3.1.1.0
comment:
reference: Morice, C. P., J. J. Kennedy, N. A. Rayner, and P. D. Jones (2012), Quantifying uncertainties in global and regional temperature change using an ensemble of observational estimates: The HadCRUT4 dataset, J. Geophys. Res., doi:10.1029/2011JD017187
/work/mh0727/m300524/miniconda3/envs/pymistral/lib/python3.7/site-packages/xarray/conventions.py:498: SerializationWarning: variable 'tas' has multiple fill values {1e+20, 1e+20}, decoding all values to NaN.
decode_timedelta=decode_timedelta,
CPU times: user 46 s, sys: 24 s, total: 1min 9s
Wall time: 1min 45s
%% Cell type:code id: tags:
``` python
# return dict because models different spatial dimensions
/work/mh0727/m300524/miniconda3/envs/pymistral/lib/python3.7/site-packages/dask/array/numpy_compat.py:40: RuntimeWarning: invalid value encountered in true_divide
x = np.divide(x1, x2, out)
/work/mh0727/m300524/miniconda3/envs/pymistral/lib/python3.7/site-packages/dask/array/numpy_compat.py:40: RuntimeWarning: invalid value encountered in true_divide
x = np.divide(x1, x2, out)
%% Cell type:code id: tags:
``` python
```
%% Cell type:markdown id: tags:
# observations with `intake-xarray`
%% Cell type:markdown id: tags:
- avoid copy pasting for accessing data
- distinction between data curator and analyst roles
- access data without learning every backend API
- version control data sources
- cache remote data sources
- see https://intake.readthedocs.io/en/latest/use_cases.html
/work/mh0727/m300524/miniconda3/envs/pymistral/lib/python3.7/site-packages/dask/array/numpy_compat.py:40: RuntimeWarning: invalid value encountered in true_divide
plt.title('HadCRUT4 temperature anomalies by country')
plt.axhline(y=0,c='gray',ls=':')
plt.axvline(x=1960,c='gray',ls='--')
plt.axvline(x=1989,c='gray',ls='--')
plt.show()
```
%% Output
/work/mh0727/m300524/miniconda3/envs/pymistral/lib/python3.7/site-packages/dask/array/numpy_compat.py:40: RuntimeWarning: invalid value encountered in true_divide
cbar_kwargs={"label": "Surface Temperature Trend [$^\circ C / 30 yrs$]",},
)
# lets add a coastline to each axis
# great reason to use FacetGrid.map
fg.map(lambda: plt.gca().coastlines())
```
%% Output
<xarray.plot.facetgrid.FacetGrid at 0x2b866bae2410>
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:markdown id: tags:
## read netcdf without xarray
the old netcdf way 🙄
%% Cell type:code id: tags:
``` python
from netCDF4 import Dataset
import matplotlib.pyplot as plt
%matplotlib inline
```
%% Cell type:code id: tags:
``` python
ds = Dataset(urlpath)
```
%% Cell type:markdown id: tags:
[netcdf](https://www.unidata.ucar.edu/software/netcdf/) is a self-describing data format.
%% Cell type:code id: tags:
``` python
ds
```
%% Output
<class 'netCDF4._netCDF4.Dataset'>
root group (NETCDF4 data model, file format HDF5):
title: HadCRUT4 near-surface temperature ensemble data - ensemble median
institution: Met Office Hadley Centre / Climatic Research Unit, University of East Anglia
history: Updated at 09/07/2020 14:17:54
source: CRUTEM.4.6.0.0, HadSST.3.1.1.0
comment:
reference: Morice, C. P., J. J. Kennedy, N. A. Rayner, and P. D. Jones (2012), Quantifying uncertainties in global and regional temperature change using an ensemble of observational estimates: The HadCRUT4 dataset, J. Geophys. Res., doi:10.1029/2011JD017187
/work/mh0727/m300524/miniconda3/envs/pymistral/lib/python3.7/site-packages/xarray/conventions.py:498: SerializationWarning: variable 'tas' has multiple fill values {1e+20, 1e+20}, decoding all values to NaN.
decode_timedelta=decode_timedelta,
CPU times: user 46 s, sys: 24 s, total: 1min 9s
Wall time: 1min 45s
%% Cell type:code id: tags:
``` python
# return dict because models different spatial dimensions
/work/mh0727/m300524/miniconda3/envs/pymistral/lib/python3.7/site-packages/dask/array/numpy_compat.py:40: RuntimeWarning: invalid value encountered in true_divide
x = np.divide(x1, x2, out)
/work/mh0727/m300524/miniconda3/envs/pymistral/lib/python3.7/site-packages/dask/array/numpy_compat.py:40: RuntimeWarning: invalid value encountered in true_divide
x = np.divide(x1, x2, out)
%% Cell type:code id: tags:
``` python
```
%% Cell type:markdown id: tags:
# observations with `intake-xarray`
%% Cell type:markdown id: tags:
- avoid copy pasting for accessing data
- distinction between data curator and analyst roles
- access data without learning every backend API
- version control data sources
- cache remote data sources
- see https://intake.readthedocs.io/en/latest/use_cases.html
/work/mh0727/m300524/miniconda3/envs/pymistral/lib/python3.7/site-packages/dask/array/numpy_compat.py:40: RuntimeWarning: invalid value encountered in true_divide
plt.title('HadCRUT4 temperature anomalies by country')
plt.axhline(y=0,c='gray',ls=':')
plt.axvline(x=1960,c='gray',ls='--')
plt.axvline(x=1989,c='gray',ls='--')
plt.show()
```
%% Output
/work/mh0727/m300524/miniconda3/envs/pymistral/lib/python3.7/site-packages/dask/array/numpy_compat.py:40: RuntimeWarning: invalid value encountered in true_divide
cbar_kwargs={"label": "Surface Temperature Trend [$^\circ C / 30 yrs$]",},
)
# lets add a coastline to each axis
# great reason to use FacetGrid.map
fg.map(lambda: plt.gca().coastlines())
```
%% Output
<xarray.plot.facetgrid.FacetGrid at 0x2b866bae2410>
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:markdown id: tags:
## read netcdf without xarray
the old netcdf way 🙄
%% Cell type:code id: tags:
``` python
from netCDF4 import Dataset
import matplotlib.pyplot as plt
%matplotlib inline
```
%% Cell type:code id: tags:
``` python
ds = Dataset(urlpath)
```
%% Cell type:markdown id: tags:
[netcdf](https://www.unidata.ucar.edu/software/netcdf/) is a self-describing data format.
%% Cell type:code id: tags:
``` python
ds
```
%% Output
<class 'netCDF4._netCDF4.Dataset'>
root group (NETCDF4 data model, file format HDF5):
title: HadCRUT4 near-surface temperature ensemble data - ensemble median
institution: Met Office Hadley Centre / Climatic Research Unit, University of East Anglia
history: Updated at 09/07/2020 14:17:54
source: CRUTEM.4.6.0.0, HadSST.3.1.1.0
comment:
reference: Morice, C. P., J. J. Kennedy, N. A. Rayner, and P. D. Jones (2012), Quantifying uncertainties in global and regional temperature change using an ensemble of observational estimates: The HadCRUT4 dataset, J. Geophys. Res., doi:10.1029/2011JD017187