epygram.fields.V2DField — Vertical 2-D Field class

Contains the class that handle a Vertical 2D field.

class epygram.fields.V2DField.V2DField(*args, **kw)[source]

Bases: epygram.fields.D3Field.D3Field

Vertical 2-Dimension (section) field class. A field is defined by its identifier ‘fid’, its data, its geometry, and its validity.

At least for now, it is designed somehow like a collection of V1DFields. And so is V2DGeometry.

Footprint:

dict(
    attr = dict(
        comment = dict(
            access = 'rwd', 
            alias = set([]), 
            default = None, 
            optional = True, 
            outcast = set([]), 
            remap = dict(), 
            type = str, 
            values = set([]),
        ), 
        data = dict(
            access = 'rxx', 
            alias = set([]), 
            default = None, 
            optional = True, 
            outcast = set([]), 
            remap = dict(), 
            values = set([]),
        ), 
        fid = dict(
            access = 'rwx', 
            alias = set([]), 
            default = None, 
            optional = False, 
            outcast = set([]), 
            remap = dict(), 
            type = footprints.stdtypes.FPDict, 
            values = set([]),
        ), 
        geometry = dict(
            access = 'rxx', 
            alias = set([]), 
            default = None, 
            info = 'Geometry defining the position of the field gridpoints.', 
            optional = False, 
            outcast = set([]), 
            remap = dict(), 
            type = epygram.geometries.V2DGeometry.V2DGeometry, 
            values = set([]),
        ), 
        processtype = dict(
            access = 'rxx', 
            alias = set([]), 
            default = None, 
            info = 'Generating process.', 
            optional = True, 
            outcast = set([]), 
            remap = dict(), 
            values = set([]),
        ), 
        spectral_geometry = dict(
            access = 'rxx', 
            alias = set([]), 
            default = None, 
            info = 'For a spectral field, its spectral geometry handles                       spectral transforms and dimensions.', 
            optional = True, 
            outcast = set([]), 
            remap = dict(), 
            type = epygram.geometries.SpectralGeometry.SpectralGeometry, 
            values = set([]),
        ), 
        structure = dict(
            access = 'rxx', 
            alias = set([]), 
            default = None, 
            info = 'Type of Field geometry.', 
            optional = False, 
            outcast = set([]), 
            remap = dict(), 
            values = set(['V2D']),
        ), 
        validity = dict(
            access = 'rwx', 
            alias = set([]), 
            default = epygram.base.FieldValidityList::<<
                    as_list:: [epygram.base.FieldValidity::<epygram.base.FieldValidity object at 0x7f7afd4dfd90>]
                >>, 
            info = 'Validity of the field.', 
            optional = True, 
            outcast = set([]), 
            remap = dict(), 
            type = epygram.base.FieldValidityList, 
            values = set([]),
        ),
    ), 
    bind = [], 
    info = 'Not documented', 
    only = dict(), 
    priority = dict(
        level = footprints.priorities.PriorityLevel::DEFAULT,
    ),
)
plotfield(colorbar='vertical', graphicmode='colorshades', minmax=None, levelsnumber=21, center_cmap_on_0=False, colormap='jet', zoom=None, title=None, fidkey=None, logscale=False, minmax_in_title=True, contourcolor='k', contourwidth=1, contourlabel=True, existingfigure=None, x_is='distance', mask_threshold=None)[source]

Makes a simple (profile) plot of the field.

Args:

  • title = title for the plot.

  • fidkey = type of fid for entitling the plot with fid[fidkey],

    if title is None; if None, labels with raw fid.

  • logscale = to set Y logarithmic scale

  • minmax: defines the min and max values for the plot colorbar.

    Syntax: [min, max]. [0.0, max] also works. Default is min/max of the field.

  • graphicmode: among (‘colorshades’, ‘contourlines’).

  • levelsnumber: number of levels for contours and colorbar.

  • colormap: name of the matplotlib colormap to use.

  • center_cmap_on_0: aligns the colormap center on the value 0.

  • colorbar: if False, hide colorbar the plot; else, befines the colorbar orientation, among (‘horizontal’, ‘vertical’). Defaults to ‘vertical’.

  • zoom: a dict containing optional limits to zoom on the plot.

    Syntax: e.g. {‘ymax’:500, ...}.

  • minmax_in_title: if True and minmax != None, adds min and max values in title

  • contourcolor: color or colormap to be used for ‘contourlines’ graphicmode. It can be either a legal html color name, or a colormap name.

  • contourwidth: width of contours for ‘contourlines’ graphicmode.

  • contourlabel: displays labels on contours.

  • existingfigure: to plot the field over an existing figure (e.g. contourlines over colorshades). Be aware that no check is done between the existingfigure geometry and either the field’s one: there might be inconsistency.

  • x_is: abscissa to be among: - ‘distance’: distance from first point of transect - ‘lon’: longitude of points - ‘lat’: latitude of points

  • mask_threshold: dict with min and/or max value(s) to mask outside.

Warning: requires matplotlib.

Previous topic

epygram.fields.H2DField — Horizontal 2-D Field class

Next topic

epygram.fields.V1DField — Vertical 1-D Field

This Page