GempakGrid¶
- class metpy.io.GempakGrid(file, *args, **kwargs)¶
Subclass of GempakFile specific to GEMPAK gridded data.
Instantiate GempakFile object from file.
Attributes Summary
Methods Summary
__init__
(file, *args, **kwargs)Instantiate GempakFile object from file.
gdinfo
()Return grid information.
gdxarray
([parameter, date_time, coordinate, ...])Select grids and output as list of xarray DataArrays.
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')]¶
- 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
- gdxarray(parameter=None, date_time=None, coordinate=None, level=None, date_time2=None, level2=None)[source]¶
Select grids and output as list of xarray DataArrays.
Subset the data by parameter values. The default is to not subset and return the entire dataset.
- Parameters
parameter (str or array-like of str) – Name of GEMPAK parameter.
date_time (datetime or array-like of datetime) – Valid datetime of the grid. Alternatively can be a string with the format YYYYmmddHHMM.
coordinate (str or array-like of str) – Vertical coordinate.
level (float or array-like of float) – Vertical level.
date_time2 (datetime or array-like of datetime) – Secondary valid datetime of the grid. Alternatively can be a string with the format YYYYmmddHHMM.
level2 (float or array_like of float) – Secondary vertical level. Typically used for layers.
- Returns
list – List of xarray.DataArray objects for each grid.