Commit 29df429d authored by Georg Siemund's avatar Georg Siemund
Browse files

Upload New File

parent 87119ee1
%% Cell type:markdown id: tags:
This notebook tests the read and write performance of NetCDF files inside file storage.
%% Cell type:code id: tags:
``` python
import xarray as xr
xr.set_options(display_style='html')
import intake
%matplotlib inline
```
%% Cell type:markdown id: tags:
## 1. Load CMIP6 Data with Intake ESM
%% Cell type:markdown id: tags:
According to: http://gallery.pangeo.io/repos/pangeo-gallery/cmip6/intake_ESM_example.html
%% Cell type:code id: tags:
``` python
cat_url = "/mnt/lustre02/work/ik1017/Catalogs/mistral-cmip6.json"
col = intake.open_esm_datastore(cat_url)
cat = col.search(experiment_id=['historical', 'ssp585'], table_id='Amon', variable_id='tas',
grid_label='gn', source_id="MPI-ESM1-2-HR")
cat.df
```
%% Cell type:code id: tags:
``` python
dset_dict = cat.to_dataset_dict(zarr_kwargs={'consolidated': True})
list(dset_dict.keys())
```
%% Cell type:code id: tags:
``` python
type(ds)
```
%% Cell type:code id: tags:
``` python
ds = dset_dict['ScenarioMIP.DWD.MPI-ESM1-2-HR.ssp585.Amon.gn']
ds
```
%% Cell type:code id: tags:
``` python
data = ds.tas.data
data
```
%% Cell type:code id: tags:
``` python
ds.tas[0, 0].plot(figsize=(16, 8), center=False, robust=True)
```
%% Cell type:code id: tags:
``` python
class DevNullStore:
def __init__(self):
pass
def __setitem__(*args, **kwargs):
pass
```
%% Cell type:code id: tags:
``` python
null_store = DevNullStore()
# this line produces no error but actually does nothing
null_store['foo'] = 'bar'
```
%% Cell type:code id: tags:
``` python
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment