Skip to content

Convenience xarray accessor for writing objects to disk, re-reading from disk and assigning to the original object. Helps with reducing the total number of dask tasks and associated overhead.

Notifications You must be signed in to change notification settings

dougiesquire/xstore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

xstore

Convenience xarray accessor for writing xarray.DataArray and xarray.Dataset objects to disk, re-reading from disk and assigning to the original object. Helps with reducing the total number of dask tasks and associated overhead for long/intesive workflows.

Example usage:

import xarray as xr
import xstore as xst
import dask.array as da

xst.STORE_DIRECTORY = '/scratch/v14/ds0092/.xstore/'

da = xr.DataArray(da.random.random((10000, 10000), chunks=(1000, 1000)),
                  coords=[('a', range(10000)),
                          ('b', range(10000))]).rename('test')

# Do lots of operations to da building a very large dask graph

da = da.xst.store() # Write da to disc and re-read it

# Continue working with da

About

Convenience xarray accessor for writing objects to disk, re-reading from disk and assigning to the original object. Helps with reducing the total number of dask tasks and associated overhead.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages