emc2.plotting.SubcolumnDisplay

class emc2.plotting.SubcolumnDisplay(model, lat_sel=None, lon_sel=None, **kwargs)[source]

This class contains modules for displaying the generated subcolumn parameters as quicklook plots. It is inherited from ACT’s Display object. For more information on the Display object and its attributes and parameters, click here. In addition to the methods in Display, SubcolumnDisplay has the following attributes and methods: The plotting dataset is automatically cropped to include only single lat and lon coordinates in case of a regional output, but can always be replaced with different coordinates using the internal methods. Note that there is no dedicated option to plot subcolumns vs. lat or lon, since subcolumns at a given grid cell are independent of subcolumns attributed to other neighboring grid cells. Note: if older version of ACT are installed (e.g., 0.2.4), “_ds” should be replaced with “_arm”.

Examples

This example makes a four panel plot of 4 subcolumns of EMC^2 simulated reflectivity:

$ model_display = emc2.plotting.SubcolumnDisplay(my_model, subplot_shape=(2, 2), figsize=(30, 20))
$ model_display.plot_subcolumn_timeseries('sub_col_Ze_cl_strat', 1, subplot_index=(0, 0))
$ model_display.plot_subcolumn_timeseries('sub_col_Ze_cl_strat', 2, subplot_index=(1, 0))
$ model_display.plot_subcolumn_timeseries('sub_col_Ze_cl_strat', 3, subplot_index=(0, 1))
$ model_display.plot_subcolumn_timeseries('sub_col_Ze_cl_strat', 4, subplot_index=(1, 1))
Attributes:
model: emc2.core.Model

The model object containing the subcolumn data to plot.

Parameters:
model: emc2.core.Model

The model containing the subcolumn data to plot.

lat_sel: float, int, or None

Relevant only if a latitude dimension exists in dataset (model output file). if float, then specifying the latitude value for which to crop the model xr.Dataset for plotting (using the nearest value). if int, then specifying the index to crop. if None, then using index 0 to prevent issues.

lon_sel: float, int, or None

Relevant only if a lonitude dimension exists in dataset (model output file). if float, then specifying the lonitude value for which to crop the model xr.Dataset for plotting (using the nearest value). if int, then specifying the index to crop. if None, then using index 0 to prevent issues.

Additional keyword arguments are passed into act.plotting.plot.Display’s constructor.
__init__(model, lat_sel=None, lon_sel=None, **kwargs)[source]
Parameters:
model: emc2.core.Model

The model containing the subcolumn data to plot.

lat_sel: float, int, or None

Relevant only if a latitude dimension exists in dataset (model output file). if float, then specifying the latitude value for which to crop the model xr.Dataset for plotting (using the nearest value). if int, then specifying the index to crop. if None, then using index 0 to prevent issues.

lon_sel: float, int, or None

Relevant only if a lonitude dimension exists in dataset (model output file). if float, then specifying the lonitude value for which to crop the model xr.Dataset for plotting (using the nearest value). if int, then specifying the index to crop. if None, then using index 0 to prevent issues.

Additional keyword arguments are passed into act.plotting.plot.Display’s constructor.

Methods

__init__(model[, lat_sel, lon_sel])

add_colorbar(mappable[, title, ...])

Adds a colorbar to the plot.

add_subplots([subplot_shape, secondary_y, ...])

Adds subplots to the Display object.

assign_to_figure_axis(fig, ax)

This assigns the Display to a specific figure and axis.

calc_mean_and_sd(variable[, use_geom_mean, axis])

This function calculates geometric or arithmetic mean and SD of arrays.

change_plot_to_class_mask(cbar[, ...])

Updates the colorbar to show phase classification.

group_by(units)

Group the Display by specific units of time.

plot_column_input_q_timeseries(variable[, ...])

Plots timeseries of subcolumn parameters for a given variable and subcolumn.

plot_instrument_mean_profile(instrument, ...)

This function will plot a mean vertical profile of an instrument variable averaged over a given time period.

plot_instrument_timeseries(instrument, variable)

Plots timeseries of a given instrument variable.

plot_regridded_CF_timeseries(var_array_3D, ...)

Plots timeseries of cloud fraction

plot_regridded_SR_timeseries(var_array_4D, ...)

Plots timeseries of cloud fraction

plot_single_profile(variable, time[, ...])

Plots the single profile of subcolumns for a given time period.

plot_subcolumn_mean_profile(variable[, ...])

This function will plot a mean vertical profile of a subcolumn variable for a given time period.

plot_subcolumn_timeseries(variable[, ...])

Plots timeseries of subcolumn parameters for a given variable and subcolumn.

put_display_in_subplot(display, subplot_index)

This will place a Display object into a specific subplot.

set_axis_label(ds, variable[, ...])

Setting the axis label based on whether a field name is one of prespecified fields, its attributes exist, and whether these attributes are not "too long".

set_xrng(subplot_index, x_range)

Set the Y axes limits of the subplot

set_yrng(subplot_index, y_range)

Set the Y axes limits of the subplot