GempakSounding#

class metpy.io.GempakSounding(file, *args, **kwargs)[source]#

Subclass of GempakFile specific to GEMPAK sounding data.

Instantiate GempakFile object from file.

Attributes Summary

data_management_fmt

grid_anl_fmt1

grid_anl_fmt2

grid_nav_fmt

prod_desc_fmt

Methods Summary

__init__(file, *args, **kwargs)

Instantiate GempakFile object from file.

sninfo()

Return sounding information.

snxarray([station_id, station_number, ...])

Select soundings and output as list of xarray Datasets.

Attributes Documentation

data_management_fmt = [('next_free_word', 'i'), ('max_free_pairs', 'i'), ('actual_free_pairs', 'i'), ('last_word', 'i'), ('free_word1', 'i'), ('free_word2', 'i'), ('free_word3', 'i'), ('free_word4', 'i'), ('free_word5', 'i'), ('free_word6', 'i'), ('free_word7', 'i'), ('free_word8', 'i'), ('free_word9', 'i'), ('free_word10', 'i'), ('free_word11', 'i'), ('free_word12', 'i'), ('free_word13', 'i'), ('free_word14', 'i'), ('free_word15', 'i'), ('free_word16', 'i'), ('free_word17', 'i'), ('free_word18', 'i'), ('free_word19', 'i'), ('free_word20', 'i'), ('free_word21', 'i'), ('free_word22', 'i'), ('free_word23', 'i'), ('free_word24', 'i'), ('free_word25', 'i'), ('free_word26', 'i'), ('free_word27', 'i'), ('free_word28', 'i')]#
grid_anl_fmt1 = [('analysis_type', 'f'), ('delta_n', 'f'), ('delta_x', 'f'), ('delta_y', 'f'), (None, '4x'), ('garea_llcr_lat', 'f'), ('garea_llcr_lon', 'f'), ('garea_urcr_lat', 'f'), ('garea_urcr_lon', 'f'), ('extarea_llcr_lat', 'f'), ('extarea_llcr_lon', 'f'), ('extarea_urcr_lat', 'f'), ('extarea_urcr_lon', 'f'), ('datarea_llcr_lat', 'f'), ('datarea_llcr_lon', 'f'), ('datarea_urcr_lat', 'f'), ('datarea_urcrn_lon', 'f'), (None, '444x')]#
grid_anl_fmt2 = [('analysis_type', 'f'), ('delta_n', 'f'), ('grid_ext_left', 'f'), ('grid_ext_down', 'f'), ('grid_ext_right', 'f'), ('grid_ext_up', 'f'), ('garea_llcr_lat', 'f'), ('garea_llcr_lon', 'f'), ('garea_urcr_lat', 'f'), ('garea_urcr_lon', 'f'), ('extarea_llcr_lat', 'f'), ('extarea_llcr_lon', 'f'), ('extarea_urcr_lat', 'f'), ('extarea_urcr_lon', 'f'), ('datarea_llcr_lat', 'f'), ('datarea_llcr_lon', 'f'), ('datarea_urcr_lat', 'f'), ('datarea_urcrn_lon', 'f'), (None, '440x')]#
grid_nav_fmt = [('grid_definition_type', 'f'), ('projection', '3sx', <method 'decode' of 'bytes' objects>), ('left_grid_number', 'f'), ('bottom_grid_number', 'f'), ('right_grid_number', 'f'), ('top_grid_number', 'f'), ('lower_left_lat', 'f'), ('lower_left_lon', 'f'), ('upper_right_lat', 'f'), ('upper_right_lon', 'f'), ('proj_angle1', 'f'), ('proj_angle2', 'f'), ('proj_angle3', 'f'), (None, '972x')]#
prod_desc_fmt = [('version', 'i'), ('file_headers', 'i'), ('file_keys_ptr', 'i'), ('rows', 'i'), ('row_keys', 'i'), ('row_keys_ptr', 'i'), ('row_headers_ptr', 'i'), ('columns', 'i'), ('column_keys', 'i'), ('column_keys_ptr', 'i'), ('column_headers_ptr', 'i'), ('parts', 'i'), ('parts_ptr', 'i'), ('data_mgmt_ptr', 'i'), ('data_mgmt_length', 'i'), ('data_block_ptr', 'i'), ('file_type', 'i', <enum 'FileTypes'>), ('data_source', 'i', <function _data_source>), ('machine_type', 'i'), ('missing_int', 'i'), (None, '12x'), ('missing_float', 'f')]#

Methods Documentation

__init__(file, *args, **kwargs)[source]#

Instantiate GempakFile object from file.

sninfo()[source]#

Return sounding information.

snxarray(station_id=None, station_number=None, date_time=None, state=None, country=None)[source]#

Select soundings and output as list of xarray Datasets.

Subset the data by parameter values. The default is to not subset and return the entire dataset.

Parameters:
  • station_id (str or Sequence[str]) – Station ID of sounding site.

  • station_number (int or Sequence[int]) – Station number of sounding site.

  • date_time (datetime or Sequence[datetime]) – Valid datetime of the grid. Alternatively can be a string with the format YYYYmmddHHMM.

  • state (str or Sequence[str]) – State where sounding site is located.

  • country (str or Sequence[str]) – Country where sounding site is located.

Returns:

list[xarray.Dataset] – List of xarray.Dataset objects for each sounding.