Excuse me, if I hadn't explained it properly. I need to run posdat.f only at the end of the last iteration, and not at the end of each iteration. With Level=1 or Level=2 posdat.f would repeat the procedure e.g. 700 times, if it is needed 700 iterations to converge. Is my question better explained now?