openairclim.core.plot

Plot routines for the OpenAirClim framework.

openairclim.core.plot.plot_concentrations(config: dict, spec: str, conc_dict: dict, metadata: dict | None = None) → None[source]

Plot species concentration change colormaps, one colormap for each year.

Parameters:
  • config (dict) – Configuration dictionary from config file

  • spec (str) – Species name

  • conc_dict (dict) – Dictionary of time series numpy arrays (time, lat, plev), keys are species

  • metadata (dict, optional) – Metadata to add to the saved figures

openairclim.core.plot.plot_inventory_vertical_profiles(inv_dict: dict, output_dir: str | Path, metadata: dict | None = None) → None[source]

Plots vertical emission profiles of dictionary of inventories.

Parameters:
  • inv_dict (dict) – Dictionary of xarray Datasets, keys are years of emission inventories

  • output_dir (str or Path) – Directory to save the plot to

  • metadata (dict, optional) – Metadata to add to the saved figures

openairclim.core.plot.plot_results(config: dict, result_dic: dict, ac: str = 'TOTAL', metadata: dict | None = None, **kwargs: Any) → None[source]

Plots results from dictionary of xarray.Dataset.

Parameters:
  • config (dict) – Configuration dictionary from config file

  • result_dic (dict) – Dictionary of xarrays

  • ac (str, optional) – Aircraft identifier, defaults to TOTAL

  • metadata (dict, optional) – Metadata to add to the saved figures

  • **kwargs (Line2D properties, optional) – kwargs are parsed to matplotlib plot command to specify properties like a line label, linewidth, antialiasing, marker face color

Raises:

ValueError – If more than 9 subplots per species are parsed, or if the requested aircraft identifier is not found