This paper describes a preliminary cyberinfrastructure for contaminant characterization in water distribution systems and its deployment on the grid. The cyberinfrastructure consists of the application and middleware and hardware resources. The application core consists of various optimization modules and a simulation module. This paper focuses on the development of specific middleware components of the cyberinfrastructure that enables efficient seamless execution of the application core in a grid environment. The components developed in this research include: (i) a coarse-grained parallel wrapper for the simulation module that includes additional features for persistent execution and (ii) a seamless job submission interface and and (iii) a graphical real time application monitoring tool. The performance of the cyberinfrastructure is evaluated on a local cluster and the TeraGrid.