emc2.simulator.subcolumn.set_q_n

emc2.simulator.subcolumn.set_q_n(model, hyd_type, is_conv=True, qc_flag=False, inv_rel_var=1, use_rad_logic=True, parallel=True, chunk=None)[source]

This function distributes the mixing ratio and number concentration into the subcolumns. For \(q_c\), the horizontal distribution follows Equation 8 of Morrison and Gettelman (2008).

Parameters:
model: :func:`emc2.core.Model`

The model to calculate the mixing ratio in each subcolumn for.

hyd_type: str

The hydrometeor type.

is_conv: bool

Set to True to calculate the mixing ratio assuming convective clouds.

qc_flag: bool

Set to True to horizontally distribute the mixing ratio (allowing sub-grid variability) according to Morrison and Gettleman (2008). qc_flag is set to False in case use_rad_logic and/or is_conv are True (both cases do not follow the Morrison scheme).

inv_rel_var: float

The inverse of the relative subgrid qc PDF variance in Morrison and Gettleman (2008)

use_rad_logic: bool

When True using the cloud fraction utilized in a model radiative scheme and also implementing uniformly distributed qc (setting qc_flag to False) to maintain radiation scheme logic. Otherwise, using the microphysics scheme (note that these schemes do not necessarily use exactly the same cloud fraction logic).

parallel: bool

If True, use parallelism in calculating lidar parameters.

chunk: int or None

The number of entries to process in one parallel loop. None will send all of the entries to the Dask worker queue at once. Sometimes, Dask will freeze if too many tasks are sent at once due to memory issues, so adjusting this number might be needed if that happens.

Returns:
model: emc2.core.Model()

The model with mixing ratio calculated in each subcolumn.

References

Morrison, H. and A. Gettelman, 2008: A New Two-Moment Bulk Stratiform Cloud Microphysics Scheme in the Community Atmosphere Model, Version 3 (CAM3). Part I: Description and Numerical Tests. J. Climate, 21, 3642–3659, https://doi.org/10.1175/2008JCLI2105.1