class_docstr: Handle a single SCMI NetCDF4 file.
class_docstr_tok: ["Handle","a","single","SCMI","NetCDF4","file","."]
docstr: Load a dataset.
docstr_tok: ["Load","a","dataset","."]
code: def get_dataset(self, key, info):
      """Load a dataset."""
      logger.debug("Reading in get_dataset %s.", key["name"])
      var_name = info.get(
          "file_key", self.filetype_info.get("file_key")
      )
      if var_name:
          data = self[var_name]
      elif "Sectorized_CMI" in self.nc:
          data = self["Sectorized_CMI"]
      elif "data" in self.nc:
          data = self["data"]
      # NetCDF doesn't support multi-threaded reading, trick it by opening
      # as one whole chunk then split it up before we do any calculations
      data = data.chunk({"x": CHUNK_SIZE, "y": CHUNK_SIZE})
  
      # convert to satpy standard units
      factor = data.attrs.pop("scale_factor", 1)
      offset = data.attrs.pop("add_offset", 0)
      units = data.attrs.get("units", 1)
      # the '*1' unit is some weird convention added/needed by AWIPS
      if units in ["1", "*1"] and key["calibration"] == "reflectance":
          data *= 100
          factor *= 100  # used for valid_min/max
          data.attrs["units"] = "%"
  
      # set up all the attributes that might be useful to the user/satpy
      data.attrs.update(
          {
              "platform_name": self.platform_name,
              "sensor": data.attrs.get("sensor", self.sensor),
          }
      )
      if "satellite_longitude" in self.nc.attrs:
          data.attrs["orbital_parameters"] = {
              "projection_longitude": self.nc.attrs[
                  "satellite_longitude"
              ],
              "projection_latitude": self.nc.attrs[
                  "satellite_latitude"
              ],
              "projection_altitude": self.nc.attrs[
                  "satellite_altitude"
              ],
          }
  
      scene_id = self.nc.attrs.get("scene_id")
      if scene_id is not None:
          data.attrs["scene_id"] = scene_id
      data.attrs.update(key.to_dict())
      data.attrs.pop("_FillValue", None)
      if "valid_min" in data.attrs:
          vmin = data.attrs.pop("valid_min")
          vmax = data.attrs.pop("valid_max")
          vmin = vmin * factor + offset
          vmax = vmax * factor + offset
          data.attrs["valid_min"] = vmin
          data.attrs["valid_max"] = vmax
      return data
  
imports: import logging
  import os
  from datetime import datetime
  import numpy
  import xarray
  from pyresample import geometry
  from satpy.readers.file_handlers import BaseFileHandler
  from satpy.utils import get_legacy_chunk_size
label_desc: Use image node_id 6 for calling the SCMIFileHandler obj's underlying member method code with example usage: obj.get_dataset(key, info) and returns: data