nctoolkit.options

nctoolkit.options(\*\*kwargs)

Define session options. Set the options in the session. Available options are thread_safe and lazy. Set thread_safe = True if hdf5 was built to be thread safe. Set lazy = True if you want methods to evaluate lazy by default. Set cores = n, if you want nctoolkit to process the individual files in multi-file datasets in parallel. Note this only applies to multi-file datasets and will not improve performance with single files. Set temp_dir = “/foo” if you want to change the temporary directory used by nctoolkit to save temporary files.

Parameters

**kwargs – Define options using key, value pairs.

Examples

If you wanted to process the files in multi-file datasets in parallel with 6 cores, do the following:

>>> import nctoolkit as nc
>>> nc.options(cores = 6)

If you want to set evaluation to always be lazy do the following:

>>> nc.options(lazy = True)

If you want nctoolkit to store temporary files in a specific directory, do this:

>>> nc.options(temp_dir = "/foo")