PRO rdmtg,name,ps=ps ; IDL Version 3.1.0 (RISC/os mipseb) ; Journal File for cnsr3@jasper ; Working directory: /jasper/cnsr3_data1 ; Date: Fri Jun 17 08:21:03 1994 path='/jasper/cnsr3_data1/pgm/'+name mtg=qgetfile(path) n=N_ELEMENTS(mtg) READS,mtg(n-1),lastn npix2=FIX(lastn+1) PRINT,npix2,' images analysed',FORMAT='(I0,A)' info0=n-npix2 times=fltarr(npix2) rsh=intarr(npix2) csh=rsh vdusk=times vasun=times p1='' FOR i=0,npix2-1 DO BEGIN j=i+info0 READS,mtg(j),p0,p1,p2,p3,p4,p5,p6,p7,p8 $ ,FORMAT='(I3,2X,A12,2X,F8.2,2X,I3,2X,F8.4,2(2X,I3),2(2X,F8.5))' times(i)=p2 rsh(i)=-p5 csh(i)=-p6 vasun(i)=p7 vdusk(i)=p8 ENDFOR STOP flag=BYTARR(npix2) gap=WHERE((vasun EQ 0.) and (vdusk EQ 0.),ngap) IF ngap GT 0 THEN BEGIN flag(gap)=1 good=REPLICATE(1B,N_ELEMENTS(flag))-flag FOR i=0,ngap-1 DO BEGIN tmp=extrac(vasun,gap(i)-3,7) vasun(gap(i))=TOTAL(tmp)/TOTAL(tmp GT 0) tmp=extrac(vdusk,gap(i)-3,7) vdusk(gap(i))=TOTAL(tmp)/TOTAL(tmp GT 0) ENDFOR ENDIF vasun=vasun*111. ; convert from deg/s to km/s; vdusk=vdusk*111. ; assume 111 km per deg of latitude ymd=LONG(STRMID(name,0,6)) dst=ymd2date(1900+ymd/10000,(ymd/100) MOD 100,ymd MOD 100 $ ,format='d$ n$ Y$') PRINT,dst resp='' PRINT,'The observations span ',MIN(times/3600.,MAX=maxt),' to ',maxt, $ ' hours UT',FORMAT='(2(A,F5.2),A)' READ,'Enter the boundary times for the time panels you wish to plot: ',resp nplots=nwrds(resp)-1 bt=FLTARR(nplots+1) FOR i=0,nplots DO bt(i)=FLOAT(getwrd(resp,i)) IF KEYWORD_SET(ps) $ THEN psopen,path+'.ps',/long $ ELSE WINDOW,2,XSIZE=800,YSIZE=1000 !P.MULTI=[0,1,nplots,0,0] maxv=MAX(vasun) FOR i=0,nplots-1 DO BEGIN mset_isoxy,bt(i),bt(i+1),maxv,0.,ylock='ymx',nxrange=[-0.021,1.021] PLOT,[0,1],/NODATA,CHARSIZE=1.6 $ ,TITLE='F-Layer Ionospheric Convection, Eureka, NWT, '+dst $ ,XTITLE='Universal Time (hours)' $ ,YTITLE='Anti-Sunward Convection Velocity (km/s)' $ ,XRANGE=[!X.CRANGE(0),!X.CRANGE(1)] $ ,YRANGE=[!Y.CRANGE(0),!Y.CRANGE(1)] thisplot=WHERE((bt(i) LE times/3600.) AND (times/3600. LT bt(i+1))) ARROW,times(thisplot)/3600. $ ,REPLICATE(0.,N_ELEMENTS(thisplot)) $ ,times(thisplot)/3600.-good(thisplot)*vdusk(thisplot) $ ,good(thisplot)*vasun(thisplot) $ ,/DATA,HSIZE=-0.025 mset_isoxy,0,0,0,0 ENDFOR IF NOT KEYWORD_SET(ps) THEN k=GET_KBRD(1) ERASE ; Now calculate the convection electric field from the convection ; velocity. btot=49798.E-9 ; T (IGRF 90 magnitude 300 km above Eureka) bvert=49775.E-9 ; T (vertical component) bcoeff=(btot^2)/bvert PRINT,'bcoeff=',bcoeff,FORMAT='(A,E10.2)' ef2dusk=1000.*bcoeff*vasun*1000. ; mV per meter ef2noon=1000.*bcoeff*vdusk*1000. efmag=SQRT(ef2dusk^2+ef2noon^2) ; field magnitude efaz=90.-ATAN(ef2noon,-ef2dusk)*!RADEG ; field azimuth wn=WHERE(efaz LE 0.) efaz(wn)=efaz(wn)+360. !P.MULTI=[0,1,nplots,0,0] ylims=[-30,70] fac=maxv/(ylims(1)-ylims(0)) isoylims=fac*ylims FOR i=0,nplots-1 DO BEGIN thisplot=WHERE((bt(i) LE times/3600.) AND (times/3600. LT bt(i+1))) mset_isoxy,bt(i),bt(i+1),isoylims(0),isoylims(1),nxrange=[-0.021,1.021] PLOT,[0,1],/NODATA,CHARSIZE=1.6 $ ,TITLE='Inferred Convection Electric Field, Eureka, NWT, '+dst $ ,XTITLE='Universal Time (hours)' $ ,YTITLE='Electric Field Magnitude (mV/m)' $ ,XRANGE=[!X.CRANGE(0),!X.CRANGE(1)] $ ,YRANGE=[!Y.CRANGE(0),!Y.CRANGE(1)]/fac OPLOT,times(thisplot)/3600.,efmag(thisplot),THICK=3 OPLOT,times(thisplot)/3600.,efaz(thisplot)-270.,PSYM=-1 PLOTS,[0.92,0.96]*(!X.CRANGE(1)-!X.CRANGE(0))+!X.CRANGE(0) $ ,[0.93,0.93]*(!Y.CRANGE(1)-!Y.CRANGE(0))+!Y.CRANGE(0) $ ,PSYM=-1,/DATA XYOUTS,0.90*(!X.CRANGE(1)-!X.CRANGE(0))+!X.CRANGE(0) $ ,0.91*(!Y.CRANGE(1)-!Y.CRANGE(0))+!Y.CRANGE(0) $ ,'Angle (deg) of !17E!X toward noon from dusk' $ ,ALIGNMENT=1,/DATA ENDFOR IF KEYWORD_SET(ps) THEN psclose ELSE BEGIN k=GET_KBRD(1) WDELETE,0 WDELETE,2 ENDELSE RETURN END