xarray.backends.NetCDF4DataStore¶
-
class
xarray.backends.NetCDF4DataStore(netcdf4_dataset, mode='r', writer=None, opener=None, autoclose=False, lock=<SerializableLock: d9d3b33d-5465-4f9f-8d27-82471afa633f>)¶ Store for reading and writing data via the Python-NetCDF4 library.
This store supports NetCDF3, NetCDF4 and OpenDAP datasets.
-
__init__(netcdf4_dataset, mode='r', writer=None, opener=None, autoclose=False, lock=<SerializableLock: d9d3b33d-5465-4f9f-8d27-82471afa633f>)¶
Methods
__init__(netcdf4_dataset[, mode, writer, …])assert_open()close()encode(variables, attributes)encode_attribute(a)encode one attribute encode_variable(variable)ensure_open([autoclose])Helper function to make sure datasets are closed and opened at appropriate times to avoid too many open file errors. get(k[,d])get_attrs()get_dimensions()get_encoding()get_variables()items()keys()load()This loads the variables and attributes simultaneously. open(filename[, mode, format, group, …])open_store_variable(name, var)prepare_variable(name, variable[, …])set_attribute(key, value)set_attributes(attributes)This provides a centralized method to set the dataset attributes on the data store. set_dimension(name, length[, is_unlimited])set_dimensions(variables[, unlimited_dims])This provides a centralized method to set the dimensions on the data store. set_variable(k, v)set_variables(*args, **kwargs)store(variables, attributes[, …])Top level method for putting data on this store, this method: store_dataset(dataset)in stores, variables are all variables AND coordinates sync()values()-