CREATE_INITSUPERDROPS¶
Copyright (c) 2024 MPI-M, Clara Bayley
—– CLEO —– File: create_initsuperdrops.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 —– File Description:
- class cleopy.initsuperdropsbinary_src.create_initsuperdrops.ManyAttrs[source]¶
store for lists of each attribute for all superdroplets
- cleopy.initsuperdropsbinary_src.create_initsuperdrops.check_datashape(data, ndata, nspacedims)[source]¶
make sure each superdroplet attribute in data has length stated in ndata and that this length is compatible with the nummber of attributes and superdroplets expected given ndata
- cleopy.initsuperdropsbinary_src.create_initsuperdrops.create_allsuperdropattrs(nsupersdict, initattrsgen, gbxbounds, inputs, NUMCONC, numconc_tolerance=0.0, isprint=False)[source]¶
returns lists for attributes of all SDs in domain called attrs
- cleopy.initsuperdropsbinary_src.create_initsuperdrops.ctype_compatible_attrs(attrs)[source]¶
make list from arrays of SD attributes that are compatible with c type expected by SDM e.g. unsigned long ints for xi, doubles for radius and msol
- cleopy.initsuperdropsbinary_src.create_initsuperdrops.dimless_superdropsattrs(nsupers, initattrsgen, inputs, gbxindex, gridboxbounds, NUMCONC, numconc_tolerance=0.0, isprint=False)[source]¶
use superdroplet attribute generator “initattrsgen” and settings from config and consts files to make dimensionless superdroplet attributes
- cleopy.initsuperdropsbinary_src.create_initsuperdrops.initsupers_inputsdict(config_filename, constants_filename)[source]¶
create values from constants file & config file required as inputs to create initial superdroplet conditions
- cleopy.initsuperdropsbinary_src.create_initsuperdrops.is_sdgbxindex_correct(gridboxbounds, coord3, coord1, coord2, gbxindex, sdgbxindex)[source]¶
rasises error if superdroplet coords [m] lie outside gridbox bounds [m] or if gridbox index not equal to superdroplet’s.
- cleopy.initsuperdropsbinary_src.create_initsuperdrops.write_initsuperdrops_binary(initsupers_filename, initattrsgen, config_filename, constants_filename, grid_filename, nsupers, NUMCONC, numconc_tolerance=0.0, isprint=False)[source]¶
de-dimensionalise attributes in initattrsgen and then write to to a binary file, “initsupers_filename”, with some metadata