The im, jm indices are for decomposed domains that include a communication zone (halo region) -"m" stands for memory size that's on each distributed memory processor. ip, jp are physical sizes of the decomposed domains, excluding the halo region. The "p" is only the computational domain size on each distrubuted memory processor.