viscid.readers package

Module contents

Package for the various data readers

viscid.readers.load_file(fname, force_reload=False, **kwargs)[source]

Load a file

Parameters:
  • fnames (list) – single file name, or list of files that are part of the same time series. Glob patterns and slices are accepted, see Tips & Tricks for more info.
  • fname (str) – a file name, relative to CWD
  • force_reload (bool) – Force reload if file is already in memory
  • **kwargs – passed to the VFile constructor

See also

Returns:A VFile instance
viscid.readers.load_files(fnames, force_reload=False, **kwargs)[source]

Load a list of files

Parameters:
  • fnames (list) – list of file names. Glob patterns and slices are accepted, see Tips & Tricks for more info.
  • force_reload (bool) – Force reload if file is already in memory
  • **kwargs – passed to the VFile constructor

See also

Returns:A list of VFile instances. The length may not be the same as the length of fnames, and the order may not be the same in order to accommodate globs and file grouping.
viscid.readers.unload_file(handle)[source]

call unload on the handle in the bucket

viscid.readers.unload_all_files()[source]

Hammer-of-Thor the cache

viscid.readers.reload_file(handle)[source]

call reload on the handle in the bucket

viscid.readers.get_file(handle)[source]

return a file that’s already been loaded by either number (as in nth file loaded), of file name

viscid.readers.save_grid(fname, grd, **kwargs)[source]

save a grid, filetype is inferred from fname

viscid.readers.save_field(fname, fld, **kwargs)[source]

save a field, filetype is inferred from fname

viscid.readers.save_fields(fname, flds, **kwargs)[source]

save a list of fields, filetype is inferred from fname