.. _thermo_bufr_icon: thermo_bufr =============================================== .. container:: .. container:: leftside .. image:: /_static/THERMODATA.png :width: 48px .. container:: rightside Generates a thermodynamic diagram data unit from :class:`Bufr` data. In a thermodynamic diagram temperature, humidity (represented by the dew point) and wind values are displayed with respect to pressure. Metview supports the following diagram types: Tephigram, Skew-T and Emagram (see :func:`thermoview`). The resulting data can be visualised with :func:`plot` or saved as a :class:`NetCDF` data file using :func:`write`. If access to the output data values is not required, or for more control of the plotting, use :func:`thermoview`. .. note:: This function performs the same task as the **Thermo Data** icon in Metview’s :ref:`user interface `. It accepts its parameters as keyword arguments, described below. .. py:function:: thermo_bufr(**kwargs) Generates thermodynamic profiles from BUFR data suitable for plotting in a thermodynamic view. :param data: Specifies the input BUFR data, which should contain upper air soundings identified by the relevant ecCodes BUFR keys as described below. Only messages where *dataCategory* is 2 are considered with the following subtypes: * for edition 3 BUFR messages *dataSubCategory* has to be 101 or 109 * for edition 4 BUFR messages *internationalDataSubCategory* has to be 4 :type data: str :param point_selection: Specifies the geographical location selection mode. The possible values are as follows: * coordinates: use lat/lon coordinates * wmo_name: use the WMO station name from *stationOrSiteName* ecCodes BUFR key * wmo_ident: use the WMO station identifier as *blockNumber*1000+stationNumber* * wigos: use the :xref:`wigos_wsi`. This is made up of four values (blocks) represented by ``wigos_series``, ``wigos_issuer``, ``wigos_issue_number`` and ``wigos_local_name``. * station: use a :func:`stations` object *New in Metview version 5.17.0* :type point_selection: {"coordinates", "wmo_name", "wmo_ident", "wigos", "station"}, default: "coordinates" :param coordinates: Specifies the geographical location (as [lat, lon]) for the profile extraction. All the stations within the ``threshold`` around this location will be selected. Available when ``point_selection`` is "coordinates". *New in Metview version 5.17.0* :type coordinates: list, default: [0, 0] :param threshold: Specifies the threshold in degrees (both in lat and lon) for selecting the matching station(s) for the specified coordinates. Available when ``point_selection`` is "coordinates". *New in Metview version 5.17.0* :type threshold: number, default: 0.1 :param wmo_name: Specifies the WMO name of the station to be selected by using the *stationOrSiteName* ecCodes BUFR key from the data section of the messages. Name matching is case insensitive with leading and trailing spaces omitted. Available when ``point_selection`` is "wmo_name". *New in Metview version 5.17.0* :type wmo_name: str :param wmo_ident: Specifies the numeric WMO identifier of the station to be selected. This is the combination of the WMO block and station number in the form of *blockNumber*1000+stationNumber*. These numbers are extracted from the data section of the BUFR message using the corresponding ecCodes keys. Available when ``point_selection`` is "wmo_ident". *New in Metview version 5.17.0* :type wmo_ident: number, default: -1 :param wigos_series: Specifies the WIGOS Identifier Series represented by the *wigosIdentifierSeries* ecCodes key in the BUFR message. The default value (-1) means that this parameter is not used in the :xref:`wigos_wsi` matching. Available when ``point_selection`` is "wigos". *New in Metview version 5.17.0* . :type wigos_series: number, default: -1 :param wigos_issuer: Specifies the WIGOS Issuer of Identifier represented by the *wigosIssuerOfIdentifier* ecCodes key in the BUFR message. The default value (-1) means that this parameter is not used in the :xref:`wigos_wsi` matching. Available when ``point_selection`` is "wigos". *New in Metview version 5.17.0* . :type wigos_issuer: number, default: -1 :param wigos_issue_number: Specifies the WIGOS Issue Number represented by the *wigosIssueNumber* ecCodes key in the BUFR message. The default value (-1) means that this parameter is not used in the :xref:`wigos_wsi` matching. Available when ``point_selection`` is "wigos". *New in Metview version 5.17.0* . :type wigos_issue_number: number, default: -1 :param wigos_local_name: Specifies the WIGOS Local Identifier name represented by the *wigosLocalIdentifierCharacter* ecCodes key in the BUFR message. The default value (empty string) means that this parameter is not used in the :xref:`wigos_wsi` matching. Available when ``point_selection`` is "wigos". *New in Metview version 5.17.0* . :type wigos_local_name: str :param station: Specifies the location as a :func:`stations` object for which the data is to be extracted. :type station: :func:`stations` :rtype: :class:`NetCDF` .. mv-minigallery:: thermo_bufr