Stream: dask

Topic: can tar files be opened with xarray open_mfdataset?


view this post on Zulip Stephen Yeager (Mar 31 2021 at 23:56):

I'd like to read in a tar file of ocean TEMP netcdfs corresponding to 10 CESM-DPLE members using xarray & dask. This code block returns a dask array dimensioned M=1, but I want to get M=10 (10 ensemble members). Is there a way to do it without first untarring?

datafile = '/glade/campaign/cesm/collections/CESM1-DPLE/ocn/proc/tseries/monthly/TEMP/b.e11.BDP.f09_g16.1995-11.031-040.pop.h.TEMP.199511-200512.tar'
ds = xr.open_mfdataset(datafile,combine='nested',parallel=True,concat_dim='M')

Last updated: Jan 30 2022 at 12:01 UTC