pro rdvfile,filename @pltdat.h ; ; Open and read new vectors file: ; if luvec ge 0 then free_lun,luvec on_ioerror,bad openr,luvec,filename,/get_lun print,' ' print,'Opened file ',filename ; ;function gotoframe, lu,icur,iwant,flnm,frame ; istat = gotoframe(ludat,ifileframe,iwant,flnm,frame) ; istat = gotoframe(luvec,0,vec.uvframes(0),filename,uframe) if istat ne 0 then begin print,'>>> Error reading U-dat from file ',filename,' (frame number ',$ vec.uvframes(0),')' return endif istat = gotoframe(luvec,vec.uvframes(0),vec.uvframes(1),filename,vframe) if istat ne 0 then begin print,'>>> Error reading V-dat from file ',filename,' (frame number ',$ vec.uvframes(1),')' return endif if uframe.nx ne vframe.nx or uframe.ny ne vframe.ny then begin print,' ' print,'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>' print,'WARNING: NX or NY dimensions of vector data are not equal:' print,'nx(U)=',uframe.nx,' ny(U)=',uframe.ny,' nx(V)=',vframe.nx,$ ' ny(V)=',vframe.ny print,'This will cause problems very soon... print,'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>' print,' ' endif return bad: print,'Error opening file ',filename luvec = -1 return end