com1DFA.particleTools.placeParticles
- placeParticles(hCell, aCell, indx, indy, csz, massPerPart, nPPK, rng, cfg, ratioArea)[source]
Create particles in given cell
Compute number of particles to create in a given cell. Place particles in cell according to the chosen pattern (random semirandom or ordered)
- Parameters
hCell (float) – snow thickness in cell
aCell (float) – cell area
indx (int) – column index of the cell
indy (int) – row index of the cell
csz (float) – cellsize
massPerPart (float) – maximum mass per particle
nPPK (int) – number of particles per kernel radius (used only if massPerParticleDeterminationMethod = MPPKR)
cfg (configParser) – com1DFA general configParser
ratioArea (float) – ratio between projected release area and real release area (used for the triangular initialization) limitations appear if there are multiple release areas feature (the ratio stands for the average of all release areas so it is not specific to each feature).
- Returns
xPart (1D numpy array) – x position of particles
yPart (1D numpy array) – y position of particles
mPart (1D numpy array) – mass of particles
n (int) – number of particles created
aPart (int) – particle area