CRA-622 Reorganize rmsinversion.cpp such that resampling of grid only is called for time lapses larger than one