script to generate vector as well as scalar fields