Run comparison

class magic.CompSims(file='liste', field='ts', ncol=4, cm='RdYlBu_r', dpi=96, normed=True, levels=16, type=None, fullPath=False, r=0.9, bw=False, ave=False, cut=1)[source]

This class allows to compare an analyse several DNS simultaneously. It is possible to compare time-series or graphic files. To set it up, you first need to create a file that contains the list of directories you want to analyse:

$ cat inputList
E3e4Eps5e3Q05
E3e4Eps2e3Q07
E3e4Eps2e3Q08
E3e4Eps2e3Q09

This list thus contains four directories (one run per directory) that can be further analysed:

>>> # Display the time-series of kinetic energy on 2 columns
>>> CompSims(file='inputList', field='ts', ncol=2)
>>> # Display the equatorial cuts of v_r
>>> CompSims(file='inputList', field='vr', type='equat', levels=65, cm='seismic')
>>> # Display the radial cuts of B_r at r=0.8 r_o
>>> CompSims(file='inputList', field='br', type='surf', r=0.8)
>>> # Display the average zonal flow
>>> CompSims(file='inputList', field='vp', type='avg')
__init__(file='liste', field='ts', ncol=4, cm='RdYlBu_r', dpi=96, normed=True, levels=16, type=None, fullPath=False, r=0.9, bw=False, ave=False, cut=1)[source]
Parameters
  • file (str) – the input file that contains the list of directories that one wants to analyse

  • field (str) – name of the input field. Possible options are: ‘ts’: displaye the time-series of kinetic energy; ‘e_mag’: display the time-series of magnetic energy; ‘flux’: display the time-series of the Nusselt numbers; ‘zonal’: display the surface zonal flow; ‘Anything else’: try to interpret the field

  • type (str) – nature of the plot. Possible values are: ‘avg’ or ‘slice’: phi-average or phi-slice; ‘equat’: equatorial cut; ‘surf’: radial cut; ‘ts*: time series

  • ncol (int) – number of columns of the figure

  • ave (bool) – when set to True, it tries to read a time-averaged graphic file

  • r (float) – the radius at which you want to display the input data (in normalised units with the radius of the outer boundary)

  • levels (int) – the number of levels in the contour

  • cm (str) – name of the colormap (‘jet’, ‘seismic’, ‘RdYlBu_r’, etc.)

  • normed (bool) – when set to True, the colormap is centered around zero. Default is True, except for entropy/temperature plots.

  • fullPath (bool) – set to True if the full path is specified in the input file

  • dpi (int) – dot per inch when saving PNGs

  • bw (bool) – when set to True, display grey-scaled contour levels

  • cut (float) – adjust the contour extrema to max(abs(data))*cut

__weakref__

list of weak references to the object (if defined)

plotAvg()[source]

Plot azimutal averages in (theta, r) planes.

plotEmag()[source]

Plot time-series of the magnetic energy

plotEquat()[source]

Plot equatorial cuts in (phi, r) planes.

plotFlux()[source]

Plot time-series of the top and bottom Nusselt numbers

plotSurf()[source]

Plot radial cuts in (phi, theta) planes using the Hammer projection.

plotTs()[source]

Plot time-series of the kinetic energy

plotZonal()[source]

Plot surface zonal flow profiles.