com1DFA.particleTools.placeParticles

placeParticles(hCell, aCell, indx, indy, csz, massPerPart, nPPK, rng, cfg)[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 depth 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

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