Erwin van der Poel mentioned that the code (unnecessarily) produces several temporary arrays for arguments when calling routines. These can be found with the compiler flag:
mpiifort -check arg_temp_created
This can be prevented by putting routines in modules, or adding an explicit interface in the calling routine.