geoips.plugins.modules.output_formatters package#

Submodules#

geoips.plugins.modules.output_formatters.full_disk_image module#

Full disk image matplotlib-based output format.

geoips.plugins.modules.output_formatters.full_disk_image.call(area_def, xarray_obj, product_name, output_fnames, clean_fname=None, product_name_title=None, mpl_colors_info=None, feature_annotator=None, gridline_annotator=None, product_datatype_title=None, bg_data=None, bg_mpl_colors_info=None, bg_xarray=None, bg_product_name_title=None, bg_datatype_title=None, remove_duplicate_minrange=None)[source]#

Plot full disk image.

geoips.plugins.modules.output_formatters.geotiff_standard module#

Geotiff image rasterio-based output format.

geoips.plugins.modules.output_formatters.geotiff_standard.call(area_def, xarray_obj, product_name, output_fnames, product_name_title=None, mpl_colors_info=None, existing_image=None)[source]#

Create standard geotiff output using rasterio.

geoips.plugins.modules.output_formatters.geotiff_standard.get_rasterio_cmap_dict(mpl_cmap, scale_data_min=1, scale_data_max=255)[source]#

Get rasterio cmap dict.

geoips.plugins.modules.output_formatters.geotiff_standard.scale_geotiff_data(plot_data, mpl_colors_info, scale_data_min=1, scale_data_max=255, missing_value=0)[source]#

Scale geotiff data.

geoips.plugins.modules.output_formatters.imagery_annotated module#

Matplot-lib based annotated image output.

geoips.plugins.modules.output_formatters.imagery_annotated.call(area_def, xarray_obj, product_name, output_fnames, clean_fname=None, product_name_title=None, mpl_colors_info=None, feature_annotator=None, gridline_annotator=None, product_datatype_title=None, bg_data=None, bg_mpl_colors_info=None, bg_xarray=None, bg_product_name_title=None, bg_datatype_title=None, remove_duplicate_minrange=None, title_copyright=None, title_formatter=None, output_dict=None)[source]#

Plot annotated imagery.

geoips.plugins.modules.output_formatters.imagery_clean module#

Matplotlib-based clean image output.

geoips.plugins.modules.output_formatters.imagery_clean.call(area_def, xarray_obj, product_name, output_fnames, product_name_title=None, mpl_colors_info=None, existing_image=None, remove_duplicate_minrange=None, fig=None, main_ax=None, mapobj=None)[source]#

Plot clean image on matplotlib figure.

geoips.plugins.modules.output_formatters.imagery_windbarbs module#

Matplotlib-based windbarb annotated image output.

geoips.plugins.modules.output_formatters.imagery_windbarbs.call(area_def, xarray_obj, product_name, output_fnames, clean_fname=None, product_name_title=None, mpl_colors_info=None, feature_annotator=None, gridline_annotator=None, product_datatype_title=None, bg_data=None, bg_mpl_colors_info=None, bg_xarray=None, bg_product_name_title=None, bg_datatype_title=None, remove_duplicate_minrange=None, title_copyright=None, title_formatter=None)[source]#

Plot annotated windbarbs on matplotlib figure.

geoips.plugins.modules.output_formatters.imagery_windbarbs.format_windbarb_data(xarray_obj, product_name)[source]#

Format windbarb data before plotting.

geoips.plugins.modules.output_formatters.imagery_windbarbs.output_clean_windbarbs(area_def, clean_fnames, mpl_colors_info, image_datetime, formatted_data_dict, fig=None, main_ax=None, mapobj=None)[source]#

Plot and save “clean” windbarb imagery.

No background imagery, coastlines, gridlines, titles, etc.

Returns:

Full paths to all resulting output files.

Return type:

list of str

geoips.plugins.modules.output_formatters.imagery_windbarbs.plot_barbs(main_ax, mapobj, mpl_colors_info, formatted_data_dict)[source]#

Plot windbarbs on matplotlib figure.

geoips.plugins.modules.output_formatters.imagery_windbarbs_clean module#

Matplotlib-based windbarb clean image output (no overlays or backgrounds).

geoips.plugins.modules.output_formatters.imagery_windbarbs_clean.call(area_def, xarray_obj, product_name, output_fnames, product_name_title=None, mpl_colors_info=None, existing_image=None, remove_duplicate_minrange=None, fig=None, main_ax=None, mapobj=None)[source]#

Plot clean windbarb imagery on matplotlib figure.

geoips.plugins.modules.output_formatters.metadata_default module#

Default YAML metadata output format.

geoips.plugins.modules.output_formatters.metadata_default.call(area_def, xarray_obj, metadata_yaml_filename, product_filename, metadata_dir='metadata', basedir='/users/surratt/geoips/outdirs/preprocessed/tcwww', output_dict=None, include_metadata_filename=False)[source]#

Produce metadata yaml file of sector info associated with final_product.

Parameters:
  • area_def (AreaDefinition) – Pyresample AreaDefintion object

  • final_product (str) – Product that is associated with the passed area_def

  • metadata_dir (str, default='metadata') – Subdirectory name for metadata (using non-default allows for non-operational outputs)

Returns:

Metadata yaml filename, if one was produced.

Return type:

str

geoips.plugins.modules.output_formatters.metadata_default.output_metadata_yaml(metadata_fname, area_def, xarray_obj, product_filename=None, output_dict=None, include_metadata_filename=False)[source]#

Write out yaml file “metadata_fname” of sector info found in “area_def”.

Parameters:
  • metadata_fname (str) – Path to output metadata_fname

  • area_def (AreaDefinition) – Pyresample AreaDefinition of sector information

  • xarray_obj (xarray.Dataset) – xarray Dataset object that was used to produce product

  • productname (str) – Full path to full product filename that this YAML file refers to

Returns:

Path to metadata filename if successfully produced.

Return type:

str

geoips.plugins.modules.output_formatters.metadata_default.update_sector_info_with_default_metadata(area_def, xarray_obj, product_filename=None, metadata_filename=None)[source]#

Update sector info found in “area_def” with standard metadata output.

Parameters:
  • area_def (AreaDefinition) – Pyresample AreaDefinition of sector information

  • xarray_obj (xarray.Dataset) – xarray Dataset object that was used to produce product

  • product_filename (str) – Full path to full product filename that this YAML file refers to

Returns:

sector_info dict with standard metadata added
  • bounding box

  • product filename with wildcards

  • basename of original source filenames

Return type:

dict

geoips.plugins.modules.output_formatters.metadata_tc module#

TC product YAML metadata output format.

geoips.plugins.modules.output_formatters.metadata_tc.call(area_def, xarray_obj, metadata_yaml_filename, product_filename, metadata_dir='metadata', basedir='/users/surratt/geoips/outdirs/preprocessed/tcwww', output_dict=None, metadata_fname_dict=None, output_fname_dict=None)[source]#

Produce metadata yaml file of sector info associated with final_product.

Parameters:
  • area_def (AreaDefinition) – Pyresample AreaDefintion object

  • final_product (str) – Product that is associated with the passed area_def

  • metadata_dir (str, default="metadata") – Subdirectory name for metadata (using non-default allows for non-operational outputs)

Returns:

Metadata yaml filename, if one was produced.

Return type:

str

geoips.plugins.modules.output_formatters.metadata_tc.output_tc_metadata_yaml(metadata_fname, area_def, xarray_obj, product_filename=None, output_dict=None, metadata_fname_dict=None, output_fname_dict=None)[source]#

Write out yaml file “metadata_fname” of sector info found in “area_def”.

Parameters:
  • metadata_fname (str) – Path to output metadata_fname

  • area_def (AreaDefinition) – Pyresample AreaDefinition of sector information

  • xarray_obj (xarray.Dataset) – xarray Dataset object that was used to produce product

  • productname (str) – Full path to full product filename that this YAML file refers to

Returns:

Path to metadata filename if successfully produced.

Return type:

str

geoips.plugins.modules.output_formatters.metadata_tc.update_sector_info_with_coverage(sector_info, product_name, xarray_obj, area_def, output_dict)[source]#

Update sector info with coverage, for YAML metadata output.

geoips.plugins.modules.output_formatters.metadata_tc.update_sector_info_with_data_times(sector_info, xarray_obj)[source]#

Update sector info with data times, for YAML metadata output.

geoips.plugins.modules.output_formatters.netcdf_geoips module#

Geoips style NetCDF output format.

geoips.plugins.modules.output_formatters.netcdf_geoips.call(xarray_obj, product_names, output_fnames)[source]#

Write GeoIPS style NetCDF to disk.

geoips.plugins.modules.output_formatters.netcdf_xarray module#

Standard xarray-based NetCDF output format.

geoips.plugins.modules.output_formatters.netcdf_xarray.call(xarray_obj, product_names, output_fnames)[source]#

Write xarray-based NetCDF outputs to disk.

geoips.plugins.modules.output_formatters.netcdf_xarray.write_xarray_netcdf(xarray_obj, ncdf_fname, clobber=False)[source]#

Write out xarray_obj to netcdf file named ncdf_fname.

geoips.plugins.modules.output_formatters.text_winds module#

Routines for outputting formatted text wind speed and vector data files.

geoips.plugins.modules.output_formatters.text_winds.call(xarray_dict, varlist, output_fnames, append=False, overwrite=True, source_names=None)[source]#

Write text windspeed output file.

geoips.plugins.modules.output_formatters.text_winds.write_text_winds(xarray_obj, varlist, output_fnames, append=False, overwrite=True, source_names=None)[source]#

Write out TC formatted text file of wind speeds.

Parameters:
  • text_fname (str) – String full path to output filename

  • speed_array (ndarray) – array of windspeeds

  • time_array (ndarray) – array of POSIX time stamps same length as speed_array

  • lon_array (ndarray) – array of longitudes of same length as speed_array

  • lat_array (ndarray) – array of latitudes of same length as speed_array

  • platform_name (str) – String platform name

geoips.plugins.modules.output_formatters.unprojected_image module#

Matplotlib-based unprojected image output.

geoips.plugins.modules.output_formatters.unprojected_image.call(xarray_obj, product_name, output_fnames, product_name_title=None, mpl_colors_info=None, x_size=None, y_size=None, savefig_kwargs=None)[source]#

Plot unprojected image to matplotlib figure.

Module contents#

Geoips output formatter init file.