blogs/lightning/ltgpred/goesutil/goesio.py
def read_ltg_data(blob_path):
  """Read lightning event data from GCS Blob.

  Args:
    blob_path (Blob URL): netcdf file

  Returns:
    tuple of latitude and longitude arrays
  """
  tmpdir = tempfile.mkdtemp()
  try:
    filename = copy_fromgcs(blob_path, tmpdir)
    with Dataset(filename, 'r') as nc:
      event_lat = nc.variables['event_lat'][:]
      event_lon = nc.variables['event_lon'][:]
      print('{} events'.format(len(event_lat)), end='; ')
      return event_lat, event_lon
  finally:
    try:
      shutil.rmtree(tmpdir)
    except IOError:
      pass
Read lightning event data from GCS Blob.

  Args:
    blob_path (Blob URL): netcdf file

  Returns:
    tuple of latitude and longitude arrays
  
Read lightning event data from GCS Blob.
Read lightning event data from GCS Blob .
def read_ltg_data(blob_path):
  tmpdir = tempfile.mkdtemp()
  try:
    filename = copy_fromgcs(blob_path, tmpdir)
    with Dataset(filename, 'r') as nc:
      event_lat = nc.variables['event_lat'][:]
      event_lon = nc.variables['event_lon'][:]
      print('{} events'.format(len(event_lat)), end='; ')
      return event_lat, event_lon
  finally:
    try:
      shutil.rmtree(tmpdir)
    except IOError:
      pass
def read_ltg_data ( blob_path ) : tmpdir = tempfile . mkdtemp ( ) try : filename = copy_fromgcs ( blob_path , tmpdir ) with Dataset ( filename , 'r' ) as nc : event_lat = nc . variables [ 'event_lat' ] [ : ] event_lon = nc . variables [ 'event_lon' ] [ : ] print ( '{} events' . format ( len ( event_lat ) ) , end = '; ' ) return event_lat , event_lon finally : try : shutil . rmtree ( tmpdir ) except IOError : pass
Read lightning event data from GCS Blob.
Read lightning event data from GCS Blob .
"""Read lightning event data from GCS Blob.

  Args:
    blob_path (Blob URL): netcdf file

  Returns:
    tuple of latitude and longitude arrays
  """
tuple of latitude and longitude arrays
tuple of latitude and longitude arrays
blob_path
None