KiD Dynamics¶
- class libs.test_case_1dkid.kid_dynamics.KiDDynamics(z_delta, z_max, timestep, t_end, advect_hydrometeors=True)[source]¶
Bases:
object
A class for driving the KiD rainshaft test case, based on Shipway and Hill 2012.
This class is a wrapper around the MPDATA driver of the Shipway and Hill 2012 example in the PyMPDATA-examples library.
See https://github.com/open-atmos/PyMPDATA/tree/main/examples/PyMPDATA_examples/Shipway_and_Hill_2012 for the original source code.
- run(time, timestep, thermo)[source]¶
Run the 1-D KiD motion computations.
This method integrates the equations from time to time+timestep for the dynamics of a 1-D KiD rainshaft.
- Args:
time (float): Current time [s]. timestep (float): Size of timestep for the simulation [s]. thermo (Thermodynamics): Object representing the thermodynamic state.
- Returns:
Thermodynamics: Updated thermodynamic state.
- set_advectees(thermo)[source]¶
Set the values of variables that are advected 1-D KiD motion computations.
This method sets the values of advected quantities in KiD dynamics (“advectees”) to match the values given by the thermo data structure.
It is neccessary to call this function after changes to thermo if the data in thermo was created from a copy not a reference to the advectees.
- Args:
thermo (Thermodynamics): Object representing the thermodynamic state.