peterson-tim-j / HydroSight

Groundwater timeseries analysis of hydrographs
GNU General Public License v3.0
45 stars 20 forks source link

Reduce soil model ODE solver time #55

Closed peterson-tim-j closed 1 year ago

peterson-tim-j commented 2 years ago

Solving the soil model ODE often consumes the majority of the model calibration time. This is because it uses an implicit solver that requires many iterations per time step.

Significant runtime improvements could likely be made if the implicit solver was changed to an explicit scheme (eg Runge Kutta 4). Furthermore, this would allow efficient vectorisation when multiple parameter sets are solved; specifically SIMD for ~<=4 parameter sets and threading across cores for >4 parameter sets. This vectorisation would significantly improve the calibration time of CMAES and DREAM (not SP-UCI) because multiple parameter sets are solved in parallel.

Possible issue with converting from an implicit to explicit solver are:

  1. reduced ODE stability, though this is unlikely to be a major issue because the soil model ODE is unlikely to be stiff.
  2. calibration response surface may become rougher and or the optimal solution may shift.

Any thoughts on this are welcome.

peterson-tim-j commented 1 year ago

Moved to discussion forum.