This PR adds a new required time_steps parameter for instantiation of the base model class. Writing to a pre-initialized array rather than continuously concatenating arrays has speed advantages, particularly for large model grids and a large number of model timesteps -- as shown in #68, for models with > 100 iterations and >10 model cells, we see performance gains which become substantial as the number of iterations/grid sizes grows (>14x improvement at best). Additional memory management improvements will help address minor slowdowns for single-cell models.
@imscw95, @kewalak - FYI - merging this to main. Changes require models to have a time_steps input parameter during instantiation to initialize the xarray dataset we're running and improve performance.
Closes #68
This PR adds a new required
time_steps
parameter for instantiation of the base model class. Writing to a pre-initialized array rather than continuously concatenating arrays has speed advantages, particularly for large model grids and a large number of model timesteps -- as shown in #68, for models with > 100 iterations and >10 model cells, we see performance gains which become substantial as the number of iterations/grid sizes grows (>14x improvement at best). Additional memory management improvements will help address minor slowdowns for single-cell models.