# xarray.backends.ScipyDataStore

### *class* xarray.backends.ScipyDataStore(filename_or_obj, mode='r', format=None, group=None, mmap=None, lock=None)[[source]](https://github.com/pydata/xarray/blob/main/xarray/backends/scipy_.py#L227-L390)

Store for reading and writing data via scipy.io.netcdf_file.

This store has the advantage of being able to be initialized with a
StringIO object, allow for serialization without writing to disk.

It only supports the NetCDF3 file-format.

#### \_\_init_\_(filename_or_obj, mode='r', format=None, group=None, mmap=None, lock=None)[[source]](https://github.com/pydata/xarray/blob/main/xarray/backends/scipy_.py#L239-L295)

### Methods

| [`__init__`](#xarray.backends.ScipyDataStore.__init__)(filename_or_obj[, mode, format, ...])                                                 |                                                                                                                                                                                           |
|-------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`close`](xarray.backends.ScipyDataStore.close.html.md#xarray.backends.ScipyDataStore.close)()                                                   |                                                                                                                                                                                           |
| [`encode`](xarray.backends.ScipyDataStore.encode.html.md#xarray.backends.ScipyDataStore.encode)(variables, attributes)                            | Encode the variables and attributes in this store                                                                                                                                         |
| [`encode_attribute`](xarray.backends.ScipyDataStore.encode_attribute.html.md#xarray.backends.ScipyDataStore.encode_attribute)(a)                            | encode one attribute                                                                                                                                                                      |
| [`encode_variable`](xarray.backends.ScipyDataStore.encode_variable.html.md#xarray.backends.ScipyDataStore.encode_variable)(variable[, name])               | encode one variable                                                                                                                                                                       |
| [`get_attrs`](xarray.backends.ScipyDataStore.get_attrs.html.md#xarray.backends.ScipyDataStore.get_attrs)()                                           |                                                                                                                                                                                           |
| `get_child_store`(group)                                                                                                                        | Get a store corresponding to the indicated child group.                                                                                                                                   |
| [`get_dimensions`](xarray.backends.ScipyDataStore.get_dimensions.html.md#xarray.backends.ScipyDataStore.get_dimensions)()                                 |                                                                                                                                                                                           |
| [`get_encoding`](xarray.backends.ScipyDataStore.get_encoding.html.md#xarray.backends.ScipyDataStore.get_encoding)()                                     |                                                                                                                                                                                           |
| `get_parent_dimensions`()                                                                                                                       |                                                                                                                                                                                           |
| [`get_variables`](xarray.backends.ScipyDataStore.get_variables.html.md#xarray.backends.ScipyDataStore.get_variables)()                                   |                                                                                                                                                                                           |
| [`load`](xarray.backends.ScipyDataStore.load.html.md#xarray.backends.ScipyDataStore.load)()                                                     | This loads the variables and attributes simultaneously.                                                                                                                                   |
| [`open_store_variable`](xarray.backends.ScipyDataStore.open_store_variable.html.md#xarray.backends.ScipyDataStore.open_store_variable)(name, var)              |                                                                                                                                                                                           |
| [`prepare_variable`](xarray.backends.ScipyDataStore.prepare_variable.html.md#xarray.backends.ScipyDataStore.prepare_variable)(name, variable[, ...])        |                                                                                                                                                                                           |
| [`set_attribute`](xarray.backends.ScipyDataStore.set_attribute.html.md#xarray.backends.ScipyDataStore.set_attribute)(key, value)                         |                                                                                                                                                                                           |
| [`set_attributes`](xarray.backends.ScipyDataStore.set_attributes.html.md#xarray.backends.ScipyDataStore.set_attributes)(attributes)                       | This provides a centralized method to set the dataset attributes on the data store.                                                                                                       |
| [`set_dimension`](xarray.backends.ScipyDataStore.set_dimension.html.md#xarray.backends.ScipyDataStore.set_dimension)(name, length[, is_unlimited])       |                                                                                                                                                                                           |
| [`set_dimensions`](xarray.backends.ScipyDataStore.set_dimensions.html.md#xarray.backends.ScipyDataStore.set_dimensions)(variables[, unlimited_dims])      | This provides a centralized method to set the dimensions on the data store.                                                                                                               |
| [`set_variable`](xarray.backends.ScipyDataStore.set_variable.html.md#xarray.backends.ScipyDataStore.set_variable)(k, v)                                 |                                                                                                                                                                                           |
| [`set_variables`](xarray.backends.ScipyDataStore.set_variables.html.md#xarray.backends.ScipyDataStore.set_variables)(variables, check_encoding_set, ...) | This provides a centralized method to set the variables on the data store.                                                                                                                |
| [`store`](xarray.backends.ScipyDataStore.store.html.md#xarray.backends.ScipyDataStore.store)(variables, attributes[, ...])                       | Top level method for putting data on this store, this method:                                                                                                                             |
| [`store_dataset`](xarray.backends.ScipyDataStore.store_dataset.html.md#xarray.backends.ScipyDataStore.store_dataset)(dataset)                            | in stores, variables are all variables AND coordinates in xarray.Dataset variables are variables NOT coordinates, so here we pass the whole dataset in instead of doing dataset.variables |
| [`sync`](xarray.backends.ScipyDataStore.sync.html.md#xarray.backends.ScipyDataStore.sync)()                                                     | Write all buffered data to disk.                                                                                                                                                          |

### Attributes

| [`ds`](xarray.backends.ScipyDataStore.ds.html.md#xarray.backends.ScipyDataStore.ds)   |    |
|-----------------------------------------------------------------------------------------|----|
| `lock`                                                                                  |    |
