class_docstr: Base reader for ABI L1B  L2+ NetCDF4 files.
class_docstr_tok: ["Base","reader","for","ABI","L1B","L2+","NetCDF4","files","."]
docstr: Convert the 'spatial_resolution' global attribute to meters.
docstr_tok: ["Convert","the","'spatial_resolution","'","global","attribute","to","meters","."]
code: def spatial_resolution_to_number(self):
      """Convert the 'spatial_resolution' global attribute to meters."""
      res = self.nc.attrs["spatial_resolution"].split(" ")[0]
      if res.endswith("km"):
          res = int(float(res[:-2]) * 1000)
      elif res.endswith("m"):
          res = int(res[:-1])
      else:
          raise ValueError(
              "Unexpected 'spatial_resolution' attribute '{}'".format(
                  res
              )
          )
      return res
  
imports: import logging
  import math
  from contextlib import suppress
  from datetime import datetime
  import dask
  import numpy
  import xarray
  from pyresample import geometry
  from satpy._compat import cached_property
  from satpy.readers import open_file_or_filename
  from satpy.readers.file_handlers import BaseFileHandler
  from satpy.utils import get_dask_chunk_size_in_bytes
label_desc: Use image node_id 15 for calling the NC_ABI_BASE obj's underlying member method code with example usage: obj.spatial_resolution_to_number() and returns: res