RGENS

Copyright (c) 2024 MPI-M, Clara Bayley

—– CLEO —– File: rgens.py Project: initsuperdropsbinary_src Created Date: Friday 13th October 2023 Author: Clara Bayley (CB) Additional Contributors: —– Last Modified: Tuesday 7th May 2024 Modified By: CB —– License: BSD 3-Clause “New” or “Revised” License https://opensource.org/licenses/BSD-3-Clause —– File Description: various ways of generatring radii of superdroplets for their initial conditions

class pySD.initsuperdropsbinary_src.rgens.MonoAttrGen(attr0)[source]

method to generate superdroplets with an attribute all equal to attr0

class pySD.initsuperdropsbinary_src.rgens.SampleLog10RadiiGen(rspan)[source]

method to generate superdroplet radii by randomly sampling from bins that are linearly spaced in log10(r) between rspan[0] and rspan[1]

generate_radiisample(nbins)[source]

Divide rspan [m] into evenly spaced bins in log10(r). If edges=True, return values of radii at edges of bins. Else sample each bin randomly to obtain the radius of ‘nsupers’ no. of superdroplets

randomlysample_log10rbins(nbins, log10redgs)[source]

given the bin edges, randomly sample each bin of log10(radius /m) and return the resultant radii [m]