hi all The error was due to the bad values only When i set set variable/bad=999 wspd then the output was correct. thanks simi Center for Atmospheric and Oceanic Science, Indian Institute of Science, Bangalore - 560 012, INDIA http://caos.iisc.ernet.in/ -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.