CMIP6 data with dask clusterΒΆ

from dask.distributed import Client
import xarray as xr
client = Client(n_workers=2, threads_per_worker=2, memory_limit='1GB')
client

Client

Cluster

  • Workers: 2
  • Cores: 4
  • Memory: 2.00 GB
path1 = '~/shared-new-ns9252k-for-ns1000k/CMIP6/historical/CESM2-WACCM/r1i1p1f1/' +\
'so2_AERmon_CESM2-WACCM_historical_r1i1p1f1_gn_185001-201412.nc'
chunks={
    'time' : 10,  
}
dataset = xr.open_dataset(path1, chunks=chunks, use_cftime = True)
/opt/conda/envs/pangeo/lib/python3.8/site-packages/xarray/conventions.py:492: SerializationWarning: variable 'so2' has multiple fill values {1e+20, 1e+20}, decoding all values to NaN.
  new_vars[k] = decode_cf_variable(
da = dataset['so2'].isel(lev=69).mean(['lat','lon'])
da.to_netcdf('./test.nc')
%matplotlib inline
da.plot()
[<matplotlib.lines.Line2D at 0x7fdd8e941e80>]
../_images/cmip6_dask_8_1.png