Bulk Scheme for Condensation

Here you find the bulk microphysics scheme extracted from the Shipway and Hill (2012) example in the PyMPDATA-examples library. It’s a 1-moment scheme modelling condensation via a simple supersaturation adjustment.

libs.pympdata_bulk.bulk_scheme_condensation.bulk_scheme_condensation(temp, press, qvap, qcond)[source]

Enacts saturation adjustment on qvap and qcond for a very simple bulk scheme to ensure relative humidity <= 100%. Extracted from pyMPDATA Bulk (nr=1) Microphysics Scheme for condensation in Shipway and Hill 2012 example for a 1-D KiD rainshaft model.

See https://github.com/open-atmos/PyMPDATA/tree/main/examples/PyMPDATA_examples/Shipway_and_Hill_2012) for the original source code.

Parameters: temp (float): Temperature in Kelvin. press (float): Pressure in Pascals. qvap (float): Specific humidity of water vapor (kg/kg). qcond (float): Specific humidity of condensed water (kg/kg).

Returns: tuple: Adjusted specific humidities of water vapor and condensed water (qvap, qcond).

class libs.pympdata_bulk.bulk_scheme_condensation.MicrophysicsSchemeWrapper[source]

Bases: object

finalize() int[source]

Finalise the microphysics scheme.

This method calls the microphysics finalisation.

Returns:

int: 0 upon successful finalisation.

initialize() int[source]

Initialise the microphysics scheme.

This method calls the microphysics initialisation

Returns:

int: 0 upon successful initialisation

run(timestep: float, thermo: Thermodynamics) Thermodynamics[source]

Run the microphysics computations.

This method is a wrapper of the MicrophysicsScheme object’s run function to call the microphysics computations in a way that’s compatible with the test and scripts in this project.

Args:

timestep (float): Time-step for integration of microphysics (s). thermo (Thermodynamics): Thermodynamic properties.

Returns:

Thermodynamics: Updated thermodynamic properties after microphysics computations.