; IDL Version 4.0.1 (Win32 x86) ; Journal File for user@Microsoft Windows Host ; Working directory: C:\RSI\IDL40 ; Date: Thu Apr 25 14:18:29 1996 PRO ssieshdf,ps=ps,debug=debug f=rfindfile('\dmsp\ssies\l0893342.*',count=nf) CASE nf OF 0: MESSAGE,'No files found.' 1: file=f(0) ELSE: file=pickfile(/READ,PATH='\dmsp\ssies\') ENDCASE hdf_dfsd_getinfo,file,dims=d ; print,d hdf_dfsd_getdata,file,headerbuffer ; The following line puts the data into a format compatible with the FORTRAN ; code provided by Marc Hairston. headerbuffer=[0.,headerbuffer] ; The following lines are copied from code sent by Marc Hairston, 951113 isatid=headerbuffer(1) iyd=LONG(headerbuffer(2)) IF iyd GT 8E4 THEN BEGIN iyr=iyd/1000 iday=iyd-(iyr*1000) ENDIF ELSE BEGIN file_len=STRLEN(file) iyr=FIX(STRMID(file,file_len-9,2)) iday=FIX(STRMID(file,file_len-7,3)) ENDELSE ihm=FIX(headerbuffer(3)) ihr=ihm/60 imin=ihm-(ihr*60) bxprev=headerbuffer(4) byprev=headerbuffer(5) bzprev=headerbuffer(6) bxstrt=headerbuffer(7) bystrt=headerbuffer(8) bzstrt=headerbuffer(9) bxstop=headerbuffer(10) bystop=headerbuffer(11) bzstop=headerbuffer(12) kpstrt=headerbuffer(13) kpstop=headerbuffer(14) imax=headerbuffer(15) chf=headerbuffer(16) cvf=headerbuffer(17) ; c read in the data itself hdf_dfsd_getinfo,file,dims=d ; print,d hdf_dfsd_getdata,file,buffer ; ; ; c Here is a list of the data in the datafile ; ; c variable name data ; c ========================================================================= ; c xutime time of day in seconds (one line of data every 4 sec) ; c Vy 4 second averaged horizontal ion flow data (km/s) ; c Vz 4 second averaged vertical ion flow data (km/s) ; c stdevy standard deviation of the averaged horizontal ion flow ; c stdevz standard deviation of the averaged vertical ion flow ; c nmbpts number of points in the 4 second average (nominal 24) ; c potlng electrostatic potential calculated at this point ; c * NOTE: This is the corrected potential so both ends are zero. And the ; c data are all zero except in the polar region. ; c scmlat magnetic latitude at 110 km (degrees) ; c scmlats magnetic latitude at the satellite (degrees) ; c scmltm magnetic local time at 100 km (decimal hour) ; c scinvlat invariant latitude (degrees) ; c scglat geographic latitude of the spacecraft (degrees) ; c scglong geographic east longitude (degrees) ; ; ; end ; Pad the HDF data to allow the FORTRAN code to work (indices start at 1) buffer=[REPLICATE(0.,1,imax),buffer] xutime=REFORM(buffer(1,*)) vy=REFORM(buffer(2,*)) vz=REFORM(buffer(3,*)) stdevy=REFORM(buffer(4,*)) stdevz=REFORM(buffer(5,*)) nmbpts=REFORM(buffer(6,*)) potlng=REFORM(buffer(7,*)) scmlat=REFORM(buffer(8,*)) scmlats=REFORM(buffer(9,*)) scmltm=REFORM(buffer(10,*)) scinvlat=REFORM(buffer(11,*)) scglat=REFORM(buffer(12,*)) scglong=REFORM(buffer(13,*)) PRINT,total(round(xutime/30)*30 eq xutime) ; STOP ; Use mapping functions to plot data? IF KEYWORD_SET(ps) THEN BEGIN psfile='\dmsp\ssies\out.ps' psopen,psfile,/land ENDIF ELSE WINDOW,XSIZE=760,YSIZE=560 !P.MULTI=[0,2,2,0,0] ; => Create polar plot of satelite position (geog. coords) llx=0.25-(FLOAT(!D.Y_VSIZE)/!D.X_VSIZE)*0.25 urx=0.5-llx !P.POSITION=[llx,0.5,urx,1.0] MAP_SET,90,0,-90,/STEREO,/CONTINENTS,LIMIT=[50,-180,90,180] $ ,XMARGIN=[0,0],YMARGIN=[0,0],/GRID,/NOBORDER tsym=WHERE(ROUND(xutime/30)*30 EQ xutime,ntsym) ; locate points at hh:mm:30 UT ; tsym=tsym(WHERE(scglat(tsym) GE 50.)) ; only plot poleward of 50 glat usersymbol,'diamond',/fill ; Plot with filled diamonds second=2*INDGEN(ntsym/2) fourth=4*INDGEN(ntsym/4) OPLOT,scglong(tsym(second)),scglat(tsym(second)),PSYM=8 devc=CONVERT_COORD(scglong(tsym(fourth)),scglat(tsym(fourth)) $ ,/DATA,/TO_DEVICE) devx=REFORM(devc(0,*))-!D.X_CH_SIZE ; string ends 1 character left devy=REFORM(devc(1,*))-!D.Y_CH_SIZE/3 utstr=STRING(ROUND(xutime(tsym(fourth)))) XYOUTS,devx,devy,utstr,ALIGNMENT=1,/DEVICE,NOCLIP=0 ; => Create plot of horiz. velocity vs UT !P.POSITION=0 ; !P.REGION=[0.5,0.5,1.0,1.0] ; PLOT,[0,0],[0,0],/NODATA,/NOERASE,XSTYLE=4,YSTYLE=4 north40=WHERE(scglat GT 40.) ; select only data north of 40 glat satstr='F'+STRING(isatid,FORMAT='(I0)') datestr=ydn2date(iyr,iday,format='d$ n$ y$') PLOT,xutime(north40),vy(north40),MAX_VALUE=10 $ ,XTITLE='UT Seconds',XRANGE=[MIN(xutime(north40),MAX=xux),xux] $ ,YTITLE='Horizontal Velocity (km/s)' $ ,TITLE=satstr+' Plasma Drift, '+datestr ; => Create plot of vertical velocity vs UT PLOT,xutime(north40),vz(north40),MAX_VALUE=10 $ ,XTITLE='UT Seconds',XRANGE=[MIN(xutime(north40),MAX=xux),xux] $ ,YTITLE='Vertical Velocity (km/s)' $ ,TITLE=satstr+' Plasma Drift, '+datestr ; => Create plot of potential distribution vs UT IF MIN(potlng(north40),MAX=potx) NE potx THEN $ PLOT,xutime(north40),potlng(north40),MAX_VALUE=200 $ ,XTITLE='UT Seconds',XRANGE=[MIN(xutime(north40),MAX=xux),xux] $ ,YTITLE='Potential (kV)' $ ,TITLE=satstr+' Potential Distribution, '+datestr IF KEYWORD_SET(ps) THEN psclose IF KEYWORD_SET(debug) THEN STOP RETURN END