SUPERDROPS
Copyright (c) 2025 MPI-M, Clara Bayley
—– CLEO —–
File: superdrops.py
Project: sdmout_src
Created Date: Thursday 29th May 2025
Author: Clara Bayley (CB)
Additional Contributors:
—–
License: BSD 3-Clause “New” or “Revised” License
https://opensource.org/licenses/BSD-3-Clause
—–
File Description:
python class(es) to handle superdroplet attributes data from SDM zarr store in ragged array format.
Non-compatible update on supersdata and sdtracing modules
-
class cleopy.sdmout_src.superdrops.SuperdropProperties(consts: dict, is_print=False)[source]
Contains attributes common to all superdroplets and functions
for calculating derived ones
-
m_water(r, msol)[source]
mass of only water in droplet [g]
-
mass(r, msol)[source]
total mass of droplet (water + (dry) areosol) [g],
m = 4/3*pi*rho_l**3 + msol(1-rho_l/rho_sol)
ie. m = 4/3*pi*rhoeff*R**3
-
rhoeff(r, msol)[source]
calculates effective density [g m^-3] of
droplet such that mass_droplet, m = 4/3*pi*r^3 * rhoeff
taking into account mass of liquid and mass of
solute assuming solute occupies volume it
would given its (dry) density, RHO_SOL.
-
vol(r)[source]
volume of droplet [m^3]
-
class cleopy.sdmout_src.superdrops.Superdrops(dataset, consts=None, is_print=False)[source]
-
tryunits(ds: Dataset, var: str)[source]
attempts to return the units of a variable
in xarray dataset ‘ds’. If attempt fails, returns null
-
tryvar(ds: Dataset, raggedcount: DataArray, var: str)[source]
attempts to return variable in form of ragged array
(ak.Array) with dims [time, raggedcount]
for a variable “var” in xarray dataset ‘ds’.
If attempt fails, returns empty array instead