pyrcel.driver.iterate_runs¶
- pyrcel.driver.iterate_runs(V, initial_aerosols, T, P, S0=-0.0, dt=0.01, dt_iters=2, t_end=500.0, max_steps=500, output_fmt='smax', fail_easy=True)¶
Iterate through several different strategies for integrating the parcel model.
As long as fail_easy is set to False, the strategies this method implements are:
CVODE with a 10 second time limit and 2000 step limit.
LSODA with up to dt_iters iterations, where the timestep dt is halved each time.
LSODE with coarse tolerance and the original timestep.
If these strategies all fail, the model will print a statement indicating such and return either -9999 if output_fmt was ‘smax’, or an empty array or DataFrame accordingly.
- Parameters:
- V, T, Pfloat
Updraft speed and parcel initial temperature and pressure.
- S0float, optional, default 0.0
Initial supersaturation, as a percent. Defaults to 100% relative humidity.
- initial_aerosolsarray_like of
AerosolSpecies
Set of aerosol populations contained in the parcel.
- dtfloat
Solver timestep, in seconds.
- dt_itersint, optional, default 2
Number of times to halve dt when attempting LSODA solver.
- max_stepsint, optional, default 1000
Maximum number of steps per solver iteration. Defaults to 1000; setting excessively high could produce extremely long computation times.
- t_endfloat, optional, default 500.0
Model time in seconds after which the integration will stop.
- outputstring, optional, default ‘smax’
Alias indicating which output format to use; see
ParcelModel
for all options.- fail_easyboolean, optional, default True
If True, then stop after the first strategy (CVODE)
- Returns:
- Smax(user-defined)
Output from parcel model simulation based on user-specified output argument. See
ParcelModel
for details.