function nbad,variable ;***NBAD is a function that returns the number of badvals in vector. ;*** ;***Written by BWBerger 8/5/98 badval=-999. m=where(variable eq badval,c) return,c end