Carpet does not call global-early routines in POSTREGRID

Create issue
Issue #965 closed
Roland Haas created an issue

Carpet only calls routines on refinement levels that changed (did_recompose == true). However global-early is hard-wired to rl==0, which means it is never executed since reflevel 0 is never recomposed.

Unfortunately this affects HydroBase_InitExcisionMask which ends up not being called (since #958). The error mode is not a fatal abort but was a more subtle change in data for Christian Reisswig.

The attached patch attempts to fix this for EVOL and INITIAL.

Ok to apply?

While looking at this Christian Reisswig and I noticed that Carpet seems to call the routines on the finest level whenever any recompose happened. This is ok to ensure that global (also global-late) routines are called but also means that local routines are called. In cases where the finest level did not actually change (happens in core collapses we believe), this causes unnecessary calls to eg. MoL_PostStep with its attending SYNC calls. This might be candidate for optimization.


Comments (4)

  1. Log in to comment