xbout.load.collect

Contents

xbout.load.collect#

xbout.load.collect(varname, xind=None, yind=None, zind=None, tind=None, path='.', yguards=False, xguards=True, info=True, prefix='BOUT.dmp')[source]#

Extract the data pertaining to a specified variable in a BOUT++ data set

Parameters:
  • varname (str) – Name of the variable

  • xind (int, slice or list of int, optional) – Range of X, Y, Z or time indices to collect. Either a single index to collect, a list containing [start, end] (inclusive end), or a slice object (usual python indexing). Default is to fetch all indices

  • yind (int, slice or list of int, optional) – Range of X, Y, Z or time indices to collect. Either a single index to collect, a list containing [start, end] (inclusive end), or a slice object (usual python indexing). Default is to fetch all indices

  • zind (int, slice or list of int, optional) – Range of X, Y, Z or time indices to collect. Either a single index to collect, a list containing [start, end] (inclusive end), or a slice object (usual python indexing). Default is to fetch all indices

  • tind (int, slice or list of int, optional) – Range of X, Y, Z or time indices to collect. Either a single index to collect, a list containing [start, end] (inclusive end), or a slice object (usual python indexing). Default is to fetch all indices

  • path (str, optional) – Path to data files (default: “.”)

  • prefix (str, optional) – File prefix (default: “BOUT.dmp”)

  • yguards (bool, optional) – Collect Y boundary guard cells? (default: False)

  • xguards (bool, optional) – Collect X boundary guard cells? (default: True) (Set to True to be consistent with the definition of nx)

  • info (bool, optional) – Print information about collect? (default: True)

Notes

strictThis option found in boutdata.collect() is not present in this function

it is assumed that the varname given is correct, if variable does not exist the function will fail

tind_autoThis option is not required when using _auto_open_mfboutdataset as an

automatic failure if datasets are different lengths is included

Returns:

ds

Return type:

numpy.ndarray