2.5. vacumm.data – Data management

Data tools

DATASET_SPECS = {}

Specifications of available dataset types

DS(ncfile, clsname='generic', *args, **kwargs)[source]

Load a specialized vacumm.data.misc.dataset.Dataset instance

Available methods for retreiving data (or derived data) are the same for all dataset types. And whatever the dataset type, the outputs will all have the same format (names, attributes…). Formating is defined and performed by the vacumm.data.cf module.

Params:
  • ncfile: Netcdf file name(s) or pattern compatibile with list_forecast_files(), so please read the documentation of this function carefully.
  • clsname: Generic class name. Please choose one of:
  • All other keyword are passed to the class initialization. See Dataset a list of these options.
Return:

A child of vacumm.data.misc.dataset.Dataset.

Example:
>>> from vacumm.data import DS
>>> mars = DS('results.nc', 'mars')
>>> dx,dy = mars.get_resol()
>>> sst = mars.get_sst()
See also:

Using the generic data classes.

print_registered_datasets()[source]

Print all registered datasets

register_dataset(cls, clsname=None, warn=True, force=True)[source]

Register a new Dataset class that can be loaded with DS()

setup_dataset(clsname, ncfile=None, *args, **kwargs)[source]

Alias for DS(ncfile,  clsname, *args, **kwargs)

See DS() for arguments.

This function is here mainly for backward compatibility.