emc2.simulator.classification.calculate_phase_ratio

emc2.simulator.classification.calculate_phase_ratio(model, variable, mask_class, mask_allhyd=None, mass_pr=False, mpr_subcolmod=False, hyd_types=None)[source]

Calculate time-height phase ratio field of subcolumn hydrometeor mask for a given class(es).

Parameters:
model: Model

The model output to classify.

variable: str

The mask variable to process and plot.

mask_class: int or list

value(s) corresponding to hydrometeor class(es) to calculate the phase ratio for (numerator). Phase ratio is calculated relative to the sum of all hydrometeor classes in subcolumns (defined by mask_allhyd) per time-height grid cell.

mask_allhyd: int, list, or None

value(s) corresponding to all hydrometeor class(es) to calculate the phase ratio with (denominator). If None, using all non-zero values.

mass_pr: bool

If True, calcuating the mass phase ratio from the model output where hydrometeors exist in the classification mask. Otherwise, the frequency phase ratio (from all subcolumns).

mpr_subcolmod: bool

If True, doing subcolumn-based MPR calculation. Otherwise, simply using the model output mixing ratio data.

hyd_types: list or None

list of hydrometeor names to include in calcuation. using default Model subclass types if None.

Returns:
model: Model

The model with the added phase ratio field