Added the ability to specify replicate number for intermediate sampling (intermediate:<rep_num>)