class_docstr: Generic GRIB file handler.
class_docstr_tok: ["Generic","GRIB","file","handler","."]
docstr: Read a GRIB message into an xarray DataArray.
docstr_tok: ["Read","a","GRIB","message","into","an","xarray","DataArray","."]
code: def get_dataset(self, dataset_id, ds_info):
      """Read a GRIB message into an xarray DataArray."""
      msg = self._get_message(ds_info)
      ds_info = self.get_metadata(msg, ds_info)
      fill = msg["missingValue"]
      data = msg.values.astype(np.float32)
      if (
          msg.valid_key("jScansPositively")
          and msg["jScansPositively"] == 1
      ):
          data = data[::-1]
  
      if isinstance(data, np.ma.MaskedArray):
          data = data.filled(np.nan)
          data = da.from_array(data, chunks=CHUNK_SIZE)
      else:
          data[data == fill] = np.nan
          data = da.from_array(data, chunks=CHUNK_SIZE)
  
      return xr.DataArray(data, attrs=ds_info, dims=("y", "x"))
  
imports: import logging
  from datetime import datetime
  import dask.array
  import numpy
  import pygrib
  import xarray
  from pyproj import Proj
  from pyresample import geometry
  from satpy.dataset import DataQuery
  from satpy.readers.file_handlers import BaseFileHandler
  from satpy.utils import get_legacy_chunk_size
label_desc: Use image node_id 20 for calling the GRIBFileHandler obj's underlying member method code with example usage: obj.get_dataset(dataset_id, ds_info) and returns: xr