original_docstring: 
      Retrieve a pixel value from the ECWMF Geo-Potential collection
      across 37 height pressure levels, for a given longitude,
      latitude and time.
  
      Converts to geo-potential height in KM, and reverses the order of
      the elements (1000 -> 1 mb, rather than 1 -> 1000 mb) before
      returning.
      
docstring: Retrieve a pixel value from the ECWMF Geo-Potential collection
  across 37 height pressure levels, for a given longitude,
  latitude and time.
  
  Converts to geo-potential height in KM, and reverses the order of
  the elements (1000 -> 1 mb, rather than 1 -> 1000 mb) before
  returning.
docstring_tokens: Retrieve a pixel value from the ECWMF Geo - Potential collection across 37 height pressure levels for a given longitude latitude and time . Converts to geo - potential height in KM and reverses the order of the elements ( 1000 - > 1 mb rather than 1 - > 1000 mb ) before returning .
code: def ecwmf_geo_potential(input_path, lonlat, time):
      """
      Retrieve a pixel value from the ECWMF Geo-Potential collection
      across 37 height pressure levels, for a given longitude,
      latitude and time.
  
      Converts to geo-potential height in KM, and reverses the order of
      the elements (1000 -> 1 mb, rather than 1 -> 1000 mb) before
      returning.
      """
      product = DatasetName.GEOPOTENTIAL.value.lower()
      search = pjoin(input_path, DatasetName.ECMWF_PATH_FMT.value)
      files = glob.glob(search.format(product=product, year=time.year))
      data = None
      required_ymd = datetime.datetime(time.year, time.month, time.day)
      for f in files:
          url = urlparse(f, scheme='file').geturl()
          ymd = splitext(basename(f))[0].split('_')[1]
          ancillary_ymd = datetime.datetime.strptime(ymd, '%Y-%m-%d')
          if ancillary_ymd == required_ymd:
              bands = list(range(1, 38))
              data = get_pixel(f, lonlat, bands)[::-1]
              scaled_data = data / 9.80665 / 1000.0
  
              metadata = {'data_source': 'ECWMF Geo-Potential',
                          'url': url,
                          'query_date': time}
  
              # ancillary metadata tracking
              md = extract_ancillary_metadata(f)
              for key in md:
                  metadata[key] = md[key]
  
              # internal file metadata (and reverse the ordering)
              df = read_metadata_tags(f, bands).iloc[::-1]
              df.insert(0, 'GeoPotential', data)
              df.insert(1, 'GeoPotential_Height', scaled_data)
  
              return df, md
  
      if data is None:
          raise AncillaryError("No ECWMF Geo-Potential profile data")
code_tokens: def ecwmf_geo_potential ( input_path , lonlat , time ) : product = DatasetName . GEOPOTENTIAL . value . lower ( ) search = pjoin ( input_path , DatasetName . ECMWF_PATH_FMT . value ) files = glob . glob ( search . format ( product = product , year = time . year ) ) data = None required_ymd = datetime . datetime ( time . year , time . month , time . day ) for f in files : url = urlparse ( f , scheme = 'file' ) . geturl ( ) ymd = splitext ( basename ( f ) ) [ 0 ] . split ( '_' ) [ 1 ] ancillary_ymd = datetime . datetime . strptime ( ymd , '%Y-%m-%d' ) if ancillary_ymd == required_ymd : bands = list ( range ( 1 , 38 ) ) data = get_pixel ( f , lonlat , bands ) [ : : - 1 ] scaled_data = data / 9.80665 / 1000.0 metadata = { 'data_source' : 'ECWMF Geo-Potential' , 'url' : url , 'query_date' : time } md = extract_ancillary_metadata ( f ) for key in md : metadata [ key ] = md [ key ] df = read_metadata_tags ( f , bands ) . iloc [ : : - 1 ] df . insert ( 0 , 'GeoPotential' , data ) df . insert ( 1 , 'GeoPotential_Height' , scaled_data ) return df , md if data is None : raise AncillaryError ( "No ECWMF Geo-Potential profile data" )
short_docstring: Retrieve a pixel value from the ECWMF Geo-Potential collection
  across 37 height pressure levels, for a given longitude,
  latitude and time.
short_docstring_tokens: Retrieve a pixel value from the ECWMF Geo - Potential collection across 37 height pressure levels for a given longitude latitude and time .
comment: """
      Retrieve a pixel value from the ECWMF Geo-Potential collection
      across 37 height pressure levels, for a given longitude,
      latitude and time.
  
      Converts to geo-potential height in KM, and reverses the order of
      the elements (1000 -> 1 mb, rather than 1 -> 1000 mb) before
      returning.
      """$SEP$# ancillary metadata tracking$SEP$# internal file metadata (and reverse the ordering)