Using SuperDARN Electric Field Data
Overview
SuperDARN electric field data is derived from the SuperDARN global convection maps. The data consists of the electric field angular and radial components calculated over a regular grid of magnetic longitude and latitude.
Reading Electric Field Data Files
The example program presented below does the simple task of reading records from an electric field data file.
pro readefield
; Open the raw index file and load it into the inx structure
openr,inp,'test.inx',/GET_LUN,/SWAP_IF_BIG_ENDIAN
s=EFieldLoadInx(inp,inx)
free_lun,inp
; Open the Electric field file for read only
openr,inp,'test.efield',/GET_LUN,/SWAP_IF_BIG_ENDIAN
; Search for a specific time in the file
s=EfieldSeek(inp,2002,12,19,0,30,10,inx,atme=atme)
while EFieldRead(inp,prm,count,pos,pot,E,V) ne -1 do begin
print, prm.stme.hr,prm.stme.mt,prm.stme.sc
polar_contour,pot,pos[*,0,1]*!pi/180,90-pos[0,*,0]
stop
endwhile
free_lun,inp
end
|
Download this program here:readefield.pro
The electric field data may have an associated index file that should be past as the second argument to OldFitOpen. The index file greatly speeds up searching for specific records, if the index file is not supplied a much slower manual search is performed. The index file is loaded using the function EFieldLoadInx, which returns zero on success or -1 if an error occurred. The index is returned in the structure inx.
The function EfieldSeek is used to search for a specific time in the electric field data, the arguments consist of the year, month, day, hour, minute and second to search for. If an index file is available, this should be supplied as the next argument. The function returns zero if data from that time was found in the data file or -1 if an error occurred. The optional keyword atme is used to return the actual time of the record that most closely matches the specified time. The time is returned as the number of seconds past the UNIX epoch.
The electric field data is read from the file using the function EFieldRead. This function returns a parameter block containing the record time in the structure prm and five arrays containing the electric field data arranged on a regular grid. The nominal grid spacing is 2 degrees of longitude versus 1 degree of latitude.
The first array count[x,y], is a data quality indicator and contains the number of ionospheric velocity vectors measured in that particular cell of the grid.
The second array pos[x,y,2] gives the position of the center point of each cell, the magnetic latitude is given by pos[x,y,0] and the magnetic longitude by pos[x,y,1].
The third array P[x,y] gives the electrostatic potential at each point in the grid.
The fourth array E[x,y,2] gives the calculated components of the electric field, E[x,y,0] contains the northward component and E[x,y,1] contains the eastward component.
The final array V[x,y,2] gives the derived velocity components, V[x,y,0] contains the magnitude and V[x,y,1], contains the azimuth as measured clockwise from the magnetic pole.
|