.. _mhovmoellerview_icon: mhovmoellerview =============================================== .. container:: .. container:: leftside .. image:: /_static/MHOVMOELLERVIEW.png :width: 48px .. container:: rightside Defines the **view** for Hovmoeller diagram plots from a suitable GRIB data source. It can also take the output from a Hovmoeller data object (:func:`mhovmoeller_area`, :func:`mhovmoeller_line` or :func:`mhovmoeller_vertical`) as an input. In this case, a consistency check is performed between the parameters that are common to both functions. In addition to the parameters required for the Hovmoeller diagram computation, :func:`mhovmoellerview` specifies the axis details as well as the plot positioning in the plot frame of the display window/paper sheet and the overlay of different data units in the same plot. To access the computed output values use a Hovmoeller data object. For further details on the role and usage of views in the visualisation process, please see :ref:`Anaylis Views `. .. note:: See also :func:`mhovmoeller_area`, :func:`mhovmoeller_line`, :func:`mhovmoeller_vertical` and :func:`mhovmoeller_expand`. .. note:: This function performs the same task as the **Hovmoeller View** icon in Metview’s :ref:`user interface `. It accepts its parameters as keyword arguments, described below. .. py:function:: mhovmoellerview(**kwargs) Defines the view for Hovmoeller diagram plots. :param type: Specifies the type of the Hovmoeller diagram to be produced. Options are: * "area_hovm": diagram derived from an input rectangular area * "line_hovm": diagram derived from an input transect line. * "vertical_hovm": diagram derived from an input rectangular area and a set of levels. :type type: {"line_hovm", "area_hovm", "vertical_hovm"}, default: "line_hovm" :param input_mode: Defines the horizontal data selection method for vertical Hovmoeller diagrams. Enabled when ``type`` is "vertical_hovm". The possible options are as follows: * "point": the data is interpolated to the location specified by ``point`` * "nearest_gridpoint": the nearest gridpoint to the location specified by ``point`` is extracted * "area": the values inside the ``area`` are averaged using :func:`integrate` *New in Metview version 5.16.0* :type input_mode: {"point", "nearest_gridpoint", "area"}, default: "area" :param point: Specifies the coordinates (as [lat, lon]) of the point for which the vertical Hovmoeller is computed. Enabled when ``type`` is "vertical_hovm" and ``input_mode`` is "point" or "nearest_gridpoint". *New in Metview version 5.16.0* :type point: list[number], default: [0, 0] :param line: Specifies the coordinates of a transect line along which the Hovmoeller diagram is calculated in [lat1, lon1, lat2, lon2] format. Enabled when ``type`` is "line_hovm". :type line: list[number], default: [0, -180, 0, 180] :param area: Specifies the coordinates of the area (as [north, west, south, east]) over which the Hovmoeller diagram is calculated. Enabled when ``type`` is "area_hovm" or "vertical_hovm" (and ``input_mode`` is "area"). :type area: list[number], default: [30, -30, -30, 30] :param area_statistics: Specifies the type of computation performed in the ``area``: * when ``type`` is "area_hovm" it is a computation along the ``average_direction``. For "mean", "stdev" or "variance" when ``average_direction`` is "north_south" the aggregation is weighted by the cosine of the latitudes. * when ``type`` is "vertical_hovm" and ``input_mode`` is "area" it is a computation performed on all the gridpoints in the ``area``. For "mean", "stdev" or "variance" the aggregation is weighted by the cosine of the latitudes. Enabled when ``type`` is "area_hovm" or "vertical_hovm" (and ``input_mode`` is "area"). *New in Metview version 5.18.0* :type area_statistics: {"mean", "minimum", "maximum", "stdev", "variance", "median"}, default: "mean" :param average_direction: Specifies the direction along which the computation defined in ``area_statistics`` is performed. When it is "north_south" and ``area_statistics`` is "average", "stdev" or "variance" the aggregation is weighted by the cosine of the latitudes. Enabled when ``type`` is "area_hovm". :type average_direction: {"east_west", "north_south"}, default: "east_west" :param time_axis_mode: Specifies the direction of the date/time axis. The options are as follows: * "user": left/bottom date is taken from ``date_min`` and the right/top date is taken from ``date_max``. * "automatic_forwards": date limits are taken from the data and plotted left to right or bottom to top. * "automatic_backwards": date limits are taken from the data and plotted right to left or top to bottom. This option has the same effect as "user" with default ``date_min`` and ``date_max``. :type time_axis_mode: {"automatic_forwards", "automatic_backwards", "user"}, default: "user" :param date_min: Specifies the horizontal date minimum value. Default value "automatic" indicates that the minimum value will be taken from the input data. :type date_min: str, default: "automatic" :param date_max: Specifies the horizontal date maximum value. Default value "automatic" indicates that the maximum value will be taken from the input data. :type date_max: str, default: "automatic" :param bottom_level: Specifies the lower (closest to the surface) limit of the Hovmoeller data in the units of the vertical coordinates. Only levels in the range defined by ``top_level`` and ``bottom_level`` are included in the output data. An extra level on either side of this range is also added. Only used for vertical Hovmoeller diagrams (``type`` is "vertical_hovm") when ``vertical_level_type`` is "pressure" or "param". :type bottom_level: number, default: 1015.0 :param top_level: Specifies the upper (furthest from the surface) limit of the Hovmoeller data in the units of the vertical coordinates. Only levels in the range defined by ``top_level`` and ``bottom_level`` are included in the output data. An extra level on either side of this range is also added. Only used for vertical Hovmoeller diagrams (``type`` is "vertical_hovm") when ``vertical_level_type`` is "pressure" or "param". :type top_level: number, default: 0.01 :param swap_axes: By default, the definition of the vertical and horizontal axes of the Hovmoeller diagrams follows pre-defined rules. However, if ``swap_axes`` is set to "yes" then the axes will be swapped around. :type swap_axes: {"no", "yes"}, default: "no" :param resolution: Used to interpolate the data onto a regular grid, and applies to both the horizontal and vertical axes where appropriate. This parameter is essential for creating a Hovmoeller diagram from satellite data. :type resolution: number, default: 1.0 :param time_axis: Specifies the characteristics of the time-series axis as an :func:`maxis` object to be used in the plotting of the data. The following :func:`maxis` parameters are defined by the application; therefore, users should not change their values directly: ``axis_type`` (set to "date"), ``axis_date_min_value`` and ``axis_date_max_value`` (set according to ``date_min`` and ``date_max``, respectively), and ``axis_orientation``. The ``axis_orientation`` parameter is defined according to the following rules: * if ``type`` is "line_hovm", the value is set to "horizontal". * if ``type`` is "area_hovm" and `average_direction`` is "east_west", the value is set to "horizontal". * if ``type`` is "area_hovm" and ``average_direction`` is "north_south", the value is set to "vertical". * if ``type`` is "vertical_hovm", the value is set to "horizontal". However, it is possible to change ``axis_orientation`` value from its calculated default by setting ``swap_axes`` to "yes". This option is not available for "vertical_hovm". :type time_axis: :func:`maxis` :param geo_axis: Specifies the characteristics of the geographical axis as an :func:`maxis` object to be used in the plotting of the data. The following :func:`maxis` parameters are defined by the application; therefore, users should not change their values directly: ``axis_min_value`` and ``axis_max_value`` (set according to ``line`` or ``area`` ), ``axis_type``, ``axis_tick_label_type`` and ``axis_orientation``. The ``axis_type`` and ``axis_tick_label_type`` parameters are defined according to the following rules: * if ``type`` is "line_hovm", ``axis_type`` is set to "geoline". * if ``type`` is "area_hovm" and ``average_direction`` is "east_west", ``axis_type`` is set to "regular" and "axis_tick_label_type`` to "latitude". * if ``type`` is "area_hovm" and ``average_direction`` is "north_south", ``axis_type`` is set to "regular" and ``axis_tick_label_type`` to "longitude". Moreover, ``axis_orientation`` parameter is defined according to the following rules: * if ``type`` is "line_hovm", the value is set to "vertical". * if ``type`` is "area_hovm" and ``average_direction`` is "east_west", the value is set to "vertical". * if ``type`` is "area_hovm" and ``average_direction`` is "north_south" the value is set to "horizontal" However, it is possible to change the ``axis_orientation`` from its calculated default by setting ``swap_axes`` to "yes". :type geo_axis: :func:`maxis` :param vertical_axis: Specifies the characteristics of the level-series axis to be used in the plotting of the data. The following :func:`maxis` parameters are defined by the application; therefore, users should not change their values directly: ``axis_min_value`` and ``axis_max_value`` (set according to the input data set), ``axis_type``, ``axis_tick_label_type`` and ``axis_orientation``. :type vertical_axis: :func:`maxis` :param vertical_level_type: Specifies the output vertical level type for vertical Hovmoeller diagrams. Enabled when ``type`` is "vertical_hovm". The possible options are as follows: * "as_in_data": the level type of ``data`` is used. In this case ``top_level`` and ``bottom_level`` must always be set carefully, since their default values are set for pressure in hPa. * "pressure": indicates that the ``data`` is defined on ECMWF model levels and the output vertical coordinate should be pressure in hPa. When this option is selected the input data must contain the corresponding Logarithm of Surface Pressure (LNSP) fields, unless a fixed surface pressure is used (see ``use_fixed_surface_pressure``). * "user": the vertical coordinates (both input and output) are defined by the fields of ``vertical_coordinate_param``. In this case ``top_level`` and ``bottom_level`` must always be set carefully, since their default values are set for pressure in hPa. *New in Metview version 5.16.0* :type vertical_level_type: {"as_in_data", "pressure", "user"}, default: "as_in_data" :param lnsp_param: Specifies the ecCodes paramId used to identify the Logarithm of Surface Pressure (LNSP) in the input data. Only used for vertical Hovmoeller diagrams (``type`` is "vertical_hovm") when ``vertical_level_type`` is "pressure". :type lnsp_param: number, default: 152 :param use_fixed_surface_pressure: When it is "on" a fixed surface pressure value will be used in the computations and no LNSP fields have to be specified. Only used for vertical Hovmoeller diagrams (``type`` is "vertical_hovm") when ``vertical_level_type`` is "pressure". *New in Metview version 5.17.0* :type use_fixed_surface_pressure: {"on", "off"}, default: "off" :param fixed_surface_pressure: Specify the fixed surface pressure value in hPa when ``use_fixed_surface_pressure`` is "on". Only used for vertical Hovmoeller diagrams (``type`` is "vertical_hovm") when ``vertical_level_type`` is "pressure". *New in Metview version 5.17.0* :type fixed_surface_pressure: number, default: 1013.25 :param vertical_coordinate_param: Specifies the ecCodes paramId used to identify the vertical coordinate fields in the input data. Only used for vertical Hovmoeller diagrams (``type`` is "vertical_hovm") when ``vertical_level_type`` is "user". *New in Metview version 5.16.0* :type vertical_coordinate_param: number :param vertical_coordinate_extrapolate: Performs and extrapolation for the ``top_level`` and ``bottom_level`` when the output vertical level range does not contain these levels. Only used for vertical Hovmoeller diagrams (``type`` is "vertical_hovm") when ``vertical_level_type`` is "pressure" or "user". The purpose is to avoid blank areas in the plot near the bottom ot top. *New in Metview version 5.16.0* :type vertical_coordinate_extrapolate: {"on", "off"}, default: "off" :param vertical_coordinate_extrapolate_mode: Specifies the extrapolation technique. In "constant" mode the values on the nearest input levels are copied onto the target extrapolated levels. In "linear" mode a linear extrapolation is performed using the nearest two input levels. Enabled when ``vertical_coordinate_extrapolate`` is "on". *New in Metview version 5.16.0* :type vertical_coordinate_extrapolate_mode: {"constant", "linear"}, default: "constant" :param vertical_coordinate_extrapolate_fixed_sign: When ``vertical_coordinate_extrapolate_mode`` is "on" it controls whether the extrapolated values can differ in sign from the values on the nearest input levels. When it is "on" it prevents e.g. wind components to change sign due to extrapolation. *New in Metview version 5.16.0* :type vertical_coordinate_extrapolate_fixed_sign: {"on", "off"}, default: "on" :param vertical_scaling: Specifies the type of the vertical axis . :type vertical_scaling: {"linear", "log"}, default: "linear" :param subpage_clipping: Clips plot to subpage borders. :type subpage_clipping: {"on", "off"}, default: "off" :param subpage_x_position: Specifies the X offset of the plot from the left side of the plot frame (any subdivision of the display area). This is expressed as a percentage of the X-dimension of the plot frame. :type subpage_x_position: number, default: 12 :param subpage_y_position: Specifies the Y offset of the plot from the bottom side of the plot frame (any subdivision of the display area). This is expressed as a percentage of the Y-dimension of the plot frame. :type subpage_y_position: number, default: 10 :param subpage_x_length: Specifies the X length of the plot. This is expressed as a percentage of the X-dimension of the plot frame. Hence the sum of this X length plus the X offset cannot exceed 100 (it is advised that it does not exceed 95 since you need some margin on the right for things like axis or map grid labels). :type subpage_x_length: number, default: 75 :param subpage_y_length: Same as ``subpage_x_length`` but for the Y length of the plot. :type subpage_y_length: number, default: 80 :param page_frame: Toggles the plotting of a border line around the plot frame. :type page_frame: {"on", "off"}, default: "off" :param page_frame_colour: Colour of the page frame. Available when ``page_frame`` is "on". :type page_frame_colour: str, default: "charcoal" :param page_frame_line_style: Line style of the page frame. Available when ``page_frame`` is "on". :type page_frame_line_style: {"solid", "dot", "dash", "chain_dot", "chain_dash"}, default: "solid" :param page_frame_thickness: Line thickness of the page frame. Available when ``page_frame`` is "on". :type page_frame_thickness: number, default: 2 :param page_id_line: Toggles the plotting of plot identification line. :type page_id_line: {"on", "off"}, default: "off" :param page_id_line_user_text: Specifies user text to be added to the plot identification line. Only available when ``page_id_line`` is "on". :type page_id_line_user_text: str :param subpage_frame: Toggles the plotting of a border line around the plot itself. In most cases you will want this to be left "on". When "off" the sides of the plot not equipped with axis will not be plotted. :type subpage_frame: {"on", "off"}, default: "off" :param subpage_frame_colour: Colour of the subpage frame. Available when ``subpage_frame`` is "on". :type subpage_frame_colour: str, default: "black" :param subpage_frame_line_style: Line style of the subpage frame. Available when ``subpage_frame`` is "on". :type subpage_frame_line_style: {"solid", "dot", "dash", "chain_dot", "chain_dash"}, default: "solid" :param subpage_frame_thickness: Line thickness of the subpage frame. Available when ``subpage_frame`` is "on". :type subpage_frame_thickness: int, default: 2 :param subpage_background_colour: Specifies the colour of the background of the plot (i.e. not affected by visual definitions like contour shadings or lines). :type subpage_background_colour: str, default: "white" :rtype: :class:`Request` .. mv-minigallery:: mhovmoellerview