class_docstr: Fake GRIB file returned by pygrib.open.
class_docstr_tok: ["Fake","GRIB","file","returned","by","pygrib.open","."]
docstr: Init the fake grib file.
docstr_tok: ["Init","the","fake","grib","file","."]
code: def __init__(self, messages=None, proj_params=None, latlons=None):
      """Init the fake grib file."""
      super(FakeGRIB, self).__init__()
      if messages is not None:
          self._messages = messages
      else:
          self._messages = [
              FakeMessage(
                  values=np.arange(25.0).reshape((5, 5)),
                  name="Instantaneous rain rate",
                  shortName="irrate",
                  cfName="unknown",
                  units="kg m**-2 s**-1",
                  dataDate=20190603,
                  dataTime=1645,
                  missingValue=9999,
                  modelName="unknown",
                  centreDescription="Rome",
                  minimum=0.0,
                  maximum=0.01475,
                  Nx=3712,
                  Ny=3712,
                  NrInRadiusOfEarth=6.6107,
                  dx=3622,
                  dy=3610,
                  XpInGridLengths=1856.0,
                  YpInGridLengths=1856.0,
                  jScansPositively=0,
                  proj_params=proj_params,
                  latlons=latlons,
              )
          ]
      self.messages = len(self._messages)
  
imports: import sys
  import unittest
  from datetime import datetime
  from unittest import mock
  import numpy
  from pytest import approx
  from satpy.tests.utils import make_dataid
label_desc: Use image node_id 1 to create a new FakeGRIB object from inherited base classes: object with example: obj = FakeGRIB(messages, proj_params, latlons)