; NAME : plotl ; PURPOSE : ; plot magnetic field lines on a line-drawing, b&w device ; CATEGORY : ; solar magnetic field computation package (MAGPACK2) ; CALLING SEQUENCE : ; plotl, mparam ; INPUTS : ; mparam = magnetogram parameters ; OPTIONAL INPUT PARAMETERS : ; none ; KEYWORD PARAMETERS : ; filename = name of field line file ; list : if set, parameter values in the input file are printed ; color : if set, plot output is made in color ; OUTPUTS : ; creates field line plot ; COMMON BLOCKS : none ; SIDE EFFECTS : ; if filename is not supplied, it has to be typed in from keyboard ; RESTRICTIONS : none ; PROCEDURE : ; ; MODIFICATION HISTORY : ; T.Sakurai, 1993 ; ;------------------------------------------------------------------------ ; pro plotl, mparam, filename=filename, list=list, color=color ; if keyword_set(filename) then begin loffile = filename endif else begin loffile = ' ' read,'(proc.displ1) enter input file name > ',loffile endelse if keyword_set(color) then begin setcolor, bandwidth, w_start, rb_start, g_start, color8 thecolor = color8.green endif else $ thecolor = !p.color openr, u_lof, loffile, /get_lun point_lun,u_lof,0 rsp = mparam.rsp ncomp=8 nbytel=4 lofno = 0 height0 = 50.0 bright0 = 0.3 lhdr1 = deflh1() lhdr2 = deflh2() str4 = ' ' while ( not eof(u_lof) ) do begin readu, u_lof, lhdr1 np = fix(lhdr1.np) if (np le 0) then goto, endlofread $ else if (np eq 1) then begin if(lhdr1.nex eq str4) then $ nex = 0 $ else $ nex = fix(lhdr1.nex) readu, u_lof, lhdr2 kindl =long(lhdr2.kindl) nbytel =fix(lhdr2.nbytel) ncomp =fix(lhdr2.ncomp) xfactor =float(lhdr2.xfactor) bfactor =float(lhdr2.bfactor) if keyword_set(list) then begin print,'parameters in ',loffile print,'kind,nbyte,ncomp=',kindl,nbytel,ncomp print,'xfactor,bfactor=',xfactor,bfactor print,'lfile=',lhdr2.lfile print,'mtag=',lhdr2.mtag print,'ltag=',lhdr2.ltag if nex ne 0 then print,'nex=',nex print,'nfinit=',lhdr1.nfinit print,'ns1,2,3=',lhdr1.ns1,lhdr1.ns2,lhdr1.ns3 print,'bmin1,bmin2=',lhdr1.bmin1,lhdr1.bmin2 print,'flxpwr=',lhdr1.flxpwr endif endif else begin if ( abs(nbytel) eq 2) then begin if (ncomp eq 3 ) then $ xyzb = intarr(3,np) $ else $ xyzb = intarr(8,np) endif else begin if (ncomp eq 3 ) then $ xyzb = lonarr(3,np) $ else $ xyzb = lonarr(8,np) endelse readu, u_lof, xyzb nlast = ( abs(nbytel)*ncomp*np) mod 80 if ( nlast ne 0 and not eof(u_lof) ) then begin skipstr = replicate(' ', 80 - nlast ) readu, u_lof, skipstr endif lofno = lofno +1 if ( nbytel lt 0 ) then byteorder,xyzb xx = xfactor*xyzb(0,*) yy = xfactor*xyzb(1,*) zz = xfactor*xyzb(2,*) for i=1, np-1 do begin oplot, xx(i-1:i), yy(i-1:i), $ color = thecolor, $ thick=1 endfor endelse endwhile endlofread: return end