func inspect_flow_map(fname)
 fzinspect, fname, param, h
 if param(0) lt 0 then {
    xmmessage,'can''t open file'+#nl+fname, $f7,'red',$scr_cx,$scr_cy
    return, -1 }
 if param(3) ne 2 then {
    xmmessage,fname+#nl+'is not a flow map', $f7,'red',$scr_cx,$scr_cy
    xmsetlabel, $flowdtoollab1, 'not a flow map !'
    return, -1 }

 $ngx=param(4)	$ngy=param(5)
 if param(2) gt 3 then $nt=param(6) else $nt=1
    ncase param(1)
    s='I*1'
    s='I*2'
    s='I*4'
    s='F*4'
    s='F*8'
    else: s='illegal'
    endcase
   n=param(2)
   s=s+' ('
   if n ge 2 then for i=0,n-2 s=s+istring(param(3+i),1)+', '
   s=s+istring(param(2+n),1)+')'
 s=s+#nl+'file size = '+ist(param(0),1)
 s = 'flow map file name, flow array: '+s
 xmsetlabel, $flowdtoollab1, s
 stat = init_readflowmap(fname)
 if isarray(stat) eq 0 then {
  xmmessage,fname+#nl+'is not a flow map', $f7,'red',$scr_cx,$scr_cy
  xmsetlabel, $flowdtoollab1, 'not a flow map !'
  return, -1
 } else $file_info = stat
 $last_read_flowmap = fname	;need for replots and certain decisions
 return, 1
 endfunc
 ;===============================================================================