class_docstr: MiRS handler for NetCDF4 files using xarray.
  
  The MiRS retrieval algorithm runs on multiple
  sensors.  For the ATMS sensors, a limb correction
  is applied by default.  In order to change that
  behavior, use the keyword argument ``limb_correction=False``::
  
  
      from satpy import Scene, find_files_and_readers
  
      filenames = find_files_and_readers(base_dir, reader="mirs")
      scene = Scene(filenames, reader_kwargs={'limb_correction': False})
class_docstr_tok: ["MiRS","handler","for","NetCDF4","files","using","xarray",".","The","MiRS","retrieval","algorithm","runs","on","multiple","sensors",".","For","the","ATMS","sensors",",","a","limb","correction","is","applied","by","default",".","In","order","to","change","that","behavior",",","use","the","keyword","argument","``","limb_correction=False","``",":",":","from","satpy","import","Scene",",","find_files_and_readers","filenames","=","find_files_and_readers","(","base_dir",",","reader=","''","mirs","''",")","scene","=","Scene","(","filenames",",","reader_kwargs=","{","'limb_correction","'",":","False","}",")"]
docstr: Combine attributes from file and yaml and apply.
  
  File attributes should take precedence over yaml if both are present
code: def apply_attributes(self, data, ds_info):
      """Combine attributes from file and yaml and apply.
  
      File attributes should take precedence over yaml if both are present
  
      """
      try:
          global_attr_fill = self.nc.attrs["missing_value"]
      except AttributeError:
          global_attr_fill = 1.0
  
      # let file metadata take precedence over ds_info from yaml,
      # but if yaml has more to offer, include it here, but fix
      # units.
      ds_info.update(data.attrs)
  
      # special cases
      if ds_info["name"] in ["latitude", "longitude"]:
          ds_info["standard_name"] = ds_info.get(
              "standard_name", ds_info["name"]
          )
  
      # try to assign appropriate units (if "Kelvin" covert to K)
      units_convert = {"Kelvin": "K"}
      data_unit = ds_info.get("units", None)
      ds_info["units"] = units_convert.get(data_unit, data_unit)
  
      scale = ds_info.pop("scale_factor", 1.0)
      offset = ds_info.pop("add_offset", 0.0)
      fill_value = ds_info.pop("_FillValue", global_attr_fill)
      valid_range = ds_info.pop("valid_range", None)
  
      data = self._scale_data(data, scale, offset)
      data = self._fill_data(data, fill_value, scale, offset)
      data = self._apply_valid_range(data, valid_range, scale, offset)
  
      data.attrs = ds_info
  
      return data, ds_info
  
imports: import datetime
  import importlib
  import logging
  import os
  from collections import Counter
  import dask.array
  import numpy
  import xarray
  from satpy.aux_download import retrieve
  from satpy.readers.file_handlers import BaseFileHandler
  from satpy.utils import get_legacy_chunk_size
label_desc: Use image node_id 16 for calling the MiRSL2ncHandler obj's underlying member method code with example usage: obj.apply_attributes(data, ds_info) and returns: data,  ds_info