Development and evaluation of an algorithm for objective bias correction of dynamical forecasts at different scales