class_docstr: File reader for individual GLM L2 NetCDF4 files.
class_docstr_tok: ["File","reader","for","individual","GLM","L2","NetCDF4","files","."]
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"])
      res = self[key["name"]]
      res.attrs.update(
          {"platform_name": self.platform_name, "sensor": self.sensor}
      )
      res.attrs.update(self.filename_info)
  
      # Add orbital parameters
      projection = self.nc["goes_imager_projection"]
      res.attrs["orbital_parameters"] = {
          "projection_longitude": float(
              projection.attrs["longitude_of_projection_origin"]
          ),
          "projection_latitude": float(
              projection.attrs["latitude_of_projection_origin"]
          ),
          "projection_altitude": float(
              projection.attrs["perspective_point_height"]
          ),
          "satellite_nominal_latitude": float(
              self["nominal_satellite_subpoint_lat"]
          ),
          "satellite_nominal_longitude": float(
              self["nominal_satellite_subpoint_lon"]
          ),
          # 'satellite_nominal_altitude': float(self['nominal_satellite_height']),
      }
  
      res.attrs.update(key.to_dict())
  
      # remove attributes that could be confusing later
      if not self._is_category_product(res):
          res.attrs.pop("_FillValue", None)
      res.attrs.pop("scale_factor", None)
      res.attrs.pop("add_offset", None)
      res.attrs.pop("_Unsigned", None)
      res.attrs.pop(
          "ancillary_variables", None
      )  # Can't currently load DQF
      # add in information from the filename that may be useful to the user
      # for key in ('observation_type', 'scene_abbr', 'scan_mode', 'platform_shortname'):
      for attr in ("scene_abbr", "scan_mode", "platform_shortname"):
          res.attrs[attr] = self.filename_info[attr]
      # copy global attributes to metadata
      for attr in (
          "scene_id",
          "orbital_slot",
          "instrument_ID",
          "production_site",
          "timeline_ID",
          "spatial_resolution",
      ):
          res.attrs[attr] = self.nc.attrs.get(attr)
      return res
  
file_path: satpy/satpy/readers/glm_l2.py
imports: import logging
  from datetime import datetime
  import numpy
  from satpy.readers.abi_base import NC_ABI_BASE
label_desc: Use image node_id 5 for calling the NCGriddedGLML2 obj's underlying member method code with example usage: obj.get_dataset(key, info) and returns: res