polaris.viz.plot_global_lat_lon_field

polaris.viz.plot_global_lat_lon_field(lon, lat, data_array, out_filename, config, colormap_section, title=None, plot_land=True, colorbar_label=None, fig_width=None, fig_height=None)[source]

Plots a data set as a longitude-latitude map

Parameters:
  • lon (numpy.ndarray) – 1D longitude coordinate

  • lat (numpy.ndarray) – 1D latitude coordinate

  • data_array (numpy.ndarray) – 2D data array to plot

  • out_filename (str) – The image file name to be written

  • config (polaris.config.PolarisConfigParser) – The config options to use for colormap settings

  • colormap_section (str) –

    The name of a section in the config options. Options must include:

    colormap_name

    The name of the colormap

    norm_type

    The norm: {‘symlog’, ‘log’, ‘linear’}

    norm_args

    A dict of arguments to pass to the norm

    It may also include:

    colorbar_ticks

    An array of values where ticks should be placed

  • title (str, optional) – The subtitle of the plot

  • plot_land (bool) – Whether to plot continents over the data

  • colorbar_label (str, optional) – Label on the colorbar

  • fig_width (float, optional) – The width of the figure in inches. The height is whatever leaves no empty canvas above and below the map, which depends on the extent of the data and the title. Defaults to 8 if neither fig_width nor fig_height is given.

  • fig_height (float, optional) – The height of the figure in inches, as an alternative to fig_width. The width is then whatever leaves no empty canvas to either side of the map and its colorbar.