Modified script to add calculation for vertical velocity(W)