pencil.read.ogvar ================= .. py:module:: pencil.read.ogvar .. autoapi-nested-parse:: Contains the read class for the OGVAR file reading, some simulation attributes and the data cube. Classes ------- .. autoapisummary:: pencil.read.ogvar.ogDataCube Functions --------- .. autoapisummary:: pencil.read.ogvar.ogvar Module Contents --------------- .. py:function:: ogvar(*args, **kwargs) ogvar(var_file='', datadir='data', proc=-1, iogvar=-1, quiet=True, trimall=False, magic=None, sim=None, precision='f') Read OGVAR files from Pencil Code. If proc < 0, then load all data and assemble, otherwise load OGVAR file from specified processor. The file format written by output() (and used, e.g. in ogvar.dat) consists of the followinig Fortran records: 1. data(mx, my, mz, nvar) 2. t(1), x(mx), y(my), z(mz), dx(1), dy(1), dz(1), deltay(1) Here nvar denotes the number of slots, i.e. 1 for one scalar field, 3 for one vector field, 8 for ogvar.dat in the case of MHD with entropy. but, deltay(1) is only there if lshear is on! need to know parameters. :param var_file: Name of the OGVAR file. :type var_file: string :param datadir: Directory where the data is stored. :type datadir: string :param proc: Processor to be read. If -1 read all and assemble to one array. :type proc: int :param iogvar: Index of the OGVAR file, if var_file is not specified. :type iogvar: int :param quiet: Flag for switching off output. :type quiet: bool :param trimall: Trim the data cube to exclude ghost zones. :type trimall: bool :param magic: Values to be computed from the data, e.g. B = curl(A). :type magic: list of string :param sim: Simulation sim object. :type sim: obj :param precision: Precision of the data. Either float 'f' or double 'd'. :type precision: string .. py:class:: ogDataCube Bases: :py:obj:`pencil.read.varfile.DataCube` DataCube -- holds Pencil Code OGVAR file data. Initialize the og data cube as the var data cube. .. py:method:: keys() .. py:method:: transform(trim_all) Transform velocity coordinates from ur and uth to ux and uy.