pymetkit.experimental.mars2grib.mars2grib ========================================= .. py:module:: pymetkit.experimental.mars2grib.mars2grib Attributes ---------- .. autoapisummary:: pymetkit.experimental.mars2grib.mars2grib.logger Classes ------- .. autoapisummary:: pymetkit.experimental.mars2grib.mars2grib.Mars2Grib Module Contents --------------- .. py:data:: logger .. py:class:: Mars2Grib(options: dict | None = None) Mars2Grib encoder object .. py:attribute:: _mars2grib .. py:method:: encode(values: list[float], mars: pymetkit.pymetkit_type.MarsRequest, misc: pymetkit.pymetkit_type.MarsRequest | None = None) -> bytes encode(values: list[float], mars: dict[Any, Any], misc: dict[Any, Any] | None = None) -> bytes Encode values, described by mars and (optionally) misc dictionaries, as a GRIB2 message Note: ----- If you plan to encode the output of Mars2Mars, call its convert method with a typed python dictionary, as the types are internally needed. Hand the result of that operation to this encode method (it currently doesn't support MarsRequests). :param values: Values to encode :type values: list[float] :param mars: Mars keys describing the values :type mars: dict :param misc: Miscellaneous (non-mars) keys describing the values, may be empty :type misc: dict :return: Encoded GRIB2 message as bytes object :rtype: bytes