salgerman, thnx for reply :)
I know that i declared 2-d arrays and after that I am using 1-d array. My only question is that what changes should I bring in this command "write(10,*) (vel(k),k=1,nx)". Because I am not getting into syntax of write command.
Once again thnx :)