ATTRSGEN¶
—– CLEO —– File: attrsgen.py Project: initsuperdropsbinary_src Created Date: Friday 13th October 2023 Author: Clara Bayley (CB) Additional Contributors: —– License: BSD 3-Clause “New” or “Revised” License https://opensource.org/licenses/BSD-3-Clause —– Copyright (c) 2023 MPI-M, Clara Bayley —– File Description: attrsgen generates multiple superdroplet attributes given individual generators
- class cleopy.initsuperdropsbinary_src.attrsgen.AttrsGenerator(radiigen, dryradiigen, xiprobdist, coord3gen, coord1gen, coord2gen)[source]¶
class for functions to generate attributes of superdroplets given the generators for independent attributes e.g. for radius and coord3 in substantation of class
- check_totalnumconc(multiplicities, NUMCONC, samplevol, numconc_tolerance)[source]¶
check number concentration of real droplets calculated from multiplicities is same as input value for number conc. within fractional difference (error) given by the numconc_tolerance. Also check the total number of real droplets lies within 0.1% or more of the expected value given the input number conc and sample volume
- generate_attributes(nsupers, RHO_SOL, NUMCONC, gridboxbounds, numconc_tolerance=0.0, isprint=False)[source]¶
generate superdroplets (SDs) attributes that have dimensions by calling the appropraite generating functions
- generate_coords(nsupers, nspacedims, gridboxbounds)[source]¶
generate superdroplets (SDs) attributes that have dimensions by calling the appropraite generating functions
- mass_solutes(radii, RHO_SOL)[source]¶
return the mass [Kg] of the solute in superdroplets given their dry radii [m] and solute density [Kg m^3]
- multiplicities(radii, NUMCONC, samplevol)[source]¶
Calculate the multiplicity of the dry radius of each superdroplet given it’s probability such that the total number concentration [m^-3] of real droplets in the volume, vol, [m^3] is about ‘numconc’. Raise an error if any of the calculated mulitiplicities are zero