epygram.fields.H2DVectorField — Horizontal 2-D Vector Field class

Contains the class for a Horizontal 2D Vector field.


class epygram.fields.H2DVectorField.H2DVectorField(*args, **kwargs)[source]

Bases: epygram.fields.D3VectorField.D3VectorField

Horizontal 2-Dimensions Vector field class.

This is a wrapper to a list of H2DField(s), representing the components of a vector projected on its geometry (the grid axes).

Note

This class is managed by footprint.

  • info: Not documented

  • priority: PriorityLevel::DEFAULT (rank=1)

Automatic parameters from the footprint:

  • comment (builtins.str) - rwd - Not documented, sorry.

    • Optional. Default is None.

  • components (footprints.stdtypes.FPList) - rxx - List of Fields that each compose a component of the vector.

    • Optional. Default is FPList::<<as_list:: []>>.

  • fid (footprints.stdtypes.FPDict) - rwx - Not documented, sorry.

  • misc_metadata (footprints.stdtypes.FPDict) - rwd - Not documented, sorry.

    • Optional. Default is FPDict::<<as_dict:: dict()>>.

  • processtype (builtins.str) - rxx - Generating process.

    • Optional. Default is None.

  • structure (builtins.str) - rxx - Type of Field geometry.

    • Values: set([‘H2D’])

  • units (builtins.str) - rwd - Not documented, sorry.

    • Optional. Default is ‘’.

  • validity (epygram.base.FieldValidityList) - rwx - Validity of the field.

    • Optional. Default is FieldValidityList::<<as_list:: [FieldValidity::<epygram.base.FieldValidity object at 0x74bef5577100>]>>.

  • vector (builtins.bool) - rxx - Intrinsic vectorial nature of the field.

    • Values: set([True])

Constructor. See its footprint for arguments.

cartoimage(takeover=False, **plot_kwargs)

Note

Requires plugin: with_cartopy (config.activate_plugins)

Project an image, with a number of options.

Parameters

takeover – give the user more access to the objects used in the plot, by returning a dict containing them instead of only fig/ax

Arguments to build the figure, geometry, cartography and to plot the image shall be passed as additional arguments, cf. H2DField.cartoplot() arguments.

cartoplot(map_factor_correction=True, subsampling=1, components_are_projected_on=None, vector_plot_method='quiver', vector_plot_kwargs=None, quiverkey=None, takeover=False, **module_plot_kwargs)

Note

Requires plugin: with_cartopy (config.activate_plugins)

Makes a simple plot of the vector field, with a number of options.

Arguments to build the figure, geometry, cartography and to plot the module of vector shall be passed as additional arguments, cf. H2DField.cartoplot() arguments.

To deactivate module plotting, add plot_method=None.

Parameters
  • map_factor_correction – if True, applies a correction of magnitude to vector due to map factor.

  • subsampling – to subsample the number of gridpoints to plot. Ex: subsampling = 10 will only plot one gridpoint upon 10.

  • components_are_projected_on – inform the plot on which axes the vector components are already projected on (‘grid’ or ‘lonlat’). If None, look for information in the field, and raise error if not found.

  • vector_plot_method – the matplotlib Axes method to be used to plot, among (‘quiver’, ‘barbs’, ‘streamplot’).

  • vector_plot_kwargs – arguments to be passed to the associated plot method.

  • quiverkey – to activate quiverkey, in case vector_plot_method=’quiver’: may be a dict containing arguments to be passed to pyplot.quiverkey().

Takeover:

Parameters

takeover – give the user more access to the objects used in the plot, by returning a dict containing them instead of only fig/ax

comment

(see the documentation above for more details).

components

List of Fields that each compose a component of the vector (see the documentation above for more details).

fid

(see the documentation above for more details).

misc_metadata

(see the documentation above for more details).

processtype

Generating process (see the documentation above for more details).

structure

Type of Field geometry (see the documentation above for more details).

units

(see the documentation above for more details).

validity

Validity of the field (see the documentation above for more details).

vector

Intrinsic vectorial nature of the field (see the documentation above for more details).