class_docstr: File handler for the IASI L2 SO2 BUFR product.
class_docstr_tok: ["File","handler","for","the","IASI","L2","SO2","BUFR","product","."]
docstr: Get all data from file for the given BUFR key.
docstr_tok: ["Get","all","data","from","file","for","the","given","BUFR","key","."]
code: def get_array(self, key):
      """Get all data from file for the given BUFR key."""
      with open(self.filename, "rb") as fh:
          msgCount = 0
          while True:
              bufr = ec.codes_bufr_new_from_file(fh)
              if bufr is None:
                  break
  
              ec.codes_set(bufr, "unpack", 1)
  
              values = ec.codes_get_array(bufr, key, float)
  
              if len(values) == 1:
                  values = np.repeat(values, 120)
  
              # if is the first message initialise our final array
              if msgCount == 0:
                  arr = da.from_array([values], chunks=CHUNK_SIZE)
              else:
                  tmpArr = da.from_array([values], chunks=CHUNK_SIZE)
  
                  arr = da.concatenate((arr, tmpArr), axis=0)
  
              msgCount = msgCount + 1
              ec.codes_release(bufr)
  
      if arr.size == 1:
          arr = arr[0]
  
      return arr
  
file_path: satpy/satpy/readers/iasi_l2_so2_bufr.py
imports: import logging
  from datetime import datetime
  import dask.array
  import numpy
  import xarray
  from satpy.readers.file_handlers import BaseFileHandler
  from satpy.utils import get_legacy_chunk_size
label_desc: Use image node_id 7 for calling the IASIL2SO2BUFR obj's underlying member method code with example usage: obj.get_array(key) and returns: arr