runtraj.models.hysplit.HysplitConfig.maxpar_for#

HysplitConfig.maxpar_for(locations)[source]#

Return the MAXPAR HYSPLIT gets for a release from locations horizontal locations.

HYSPLIT gives each location numpar // locations particles, which its rounding often raises by one, and stops releasing when it reaches MAXPAR. A set maxpar is used as given. Unset, one location gets numpar (HYSPLIT may ask for one more and keeps numpar), and several get locations * (numpar // locations + 1), so the last locations are not left short.

A concentration run releases over many time steps, each pollutant for its hours, and again every qcycle hours. HYSPLIT rounds the particles of an hour and of a time step up, for each pollutant at each location, so it asks for more than numpar in a cycle: such a run gets numpar and one particle a minute and one an hour for each pollutant at each location, times the number of cycles. With less, HYSPLIT stops releasing before the end of the emission and the grids hold less than was released.

Examples

>>> HysplitConfig(n_hours=-24, numpar=1000).maxpar_for(40)
1040
>>> HysplitConfig(n_hours=-24, numpar=1000).maxpar_for(1)
1000
>>> HysplitConfig(
...     n_hours=4,
...     numpar=1000,
...     mode="concentration",
...     pollutants=[{"name": "TRCA", "hours": 1}],
...     grids=[{"name": "g"}],
... ).maxpar_for(2)
1124
Return type:

int

Parameters:

locations (int)