Turbulence in the Solar Wind BU Summer School on Plasma Processes in Space Physics In this lab, you will calculate the turbulence in the fast and slow solar wind. You will download the data from NASA’s OMNI website, which has made freely available the data from the ACE spacecraft. You will analyze the magnetic field, density, and velocity data collected from ACE in 2008. After eliminating transitory events (e.g., shocks) and separating the data between fast and slow solar wind, you will compare their magnetic field and velocity power spectra. First, we will obtain solar wind data from the OMNI website. OMNI, managed by NASA’s Goddard Space Flight Facility in Greenbelt, MD, is an online interface from which you can access data relevant to heliospheric and solar wind studies. We will use this data to quantify the turbulence in the solar wind, but it is a fantastic resource which serves a variety of purposes. For example, one common usage for someone looking at solar wind-magnetosphere coupling would be to use the data obtained here as input for their models. The results of those models can then be compared with magnetospheric observations. Go to http://omniweb.gsfc.nasa.gov/ow.html Once there, in the bottom right box, under Access data contributing to OMNI, click on the first link: Magnetic field: IMP-8, ISEE-3, Wind, ACE. We will use the ACE (Advanced Composition Explorer) spacecraft, which was launched in 1997 and generally sits at the L1 Lagrange point, between the Earth and sun approximately 0.01 AU away from us. Therefore, ACE is perfectly situated to give us the solar wind conditions which would affect Earth. A number of instruments constitute ACE, but for us, the two most relevant are MAG (the magnetometer, which provides the magnetic field data) and SWEPAM (Solar Wind Electron, Proton and Alpha Monitor, which provides the plasma data, such as the density and flow speed). The two instruments sample at different rates, but for the purposes of this lab, we will use the merged data to simplify matters. Beneath the Magnetic Field heading, look for the second bullet under ACE, where you should see 4-min. merged mag. and plasma data: via FTP; via OMNIWeb_Plus Browser (Hourly OMNI). Click on the second of those two links (via OMNIWeb_Plus Browser, not via FTP). This should bring you to a menu, from which you can specify the format in which you would like to receive the data. Under Select an activity, choose Create file. Under Enter start and stop dates, enter the date range January 1, 2008 to December 31, 2008. Under Select variables, you will only need Bmag (nT), Density (N/cm^3), and Speed (km/s). Click on the Submit button, and download the two files that it generates into your ~/Desktop/Turbulence/ directory. Now, in a new terminal cd into that directory. The two files there should be a .fmt file which describes the format of the data, and a .lst file which contains the actual data itself. Take a look at the .fmt file. It should indicate that the data file will have seven columns of data: the year, day, hour, and minute of each measurement; the magnitude of the magnetic field measured by the magnetometer; and the solar wind density and flow speed measured by SWEPAM. 1. How many measurements are there in your .lst file? Hint: Typing wc *.lst will give you the “word count” of the file. The first number is the number of lines in the file. Now, start IDL. To start off, enter the following to fix a display issue related to Linux: IDL> device, true=24, decompose=3, retain=2 The next step is to read in the data file. Let nt be your answer to Question 1 and filename be a string containing the name of the *.lst file in single quotes. Enter IDL> data = dblarr(7,nt) IDL> openr,1,filename IDL> readf,1,data IDL> close,1 Now, data[0,*] will equal the year in which all your measurements were taken (2008), data[1,*] the day of the year (1-366), and so on. For example, you may enter IDL> bmag = data[4,*] IDL> den = data[5,*] IDL> vel = data[6,*] 2. You may want your time to be represented not by years, days, hours, and minutes, but by a single variable in a single chosen unit of time (say, seconds or days). Write down a formula for that variable in terms of data[0,*], data[1,*], data[2,*], and data[3,*], and store it in the variable time. Also, define dt as the time interval between measurements in that chosen unit. You may have noticed that some of the data have very strange values. For example, the measured density might show 3.36 cm-3, and in the next measurement it jumps to 999.99 for a while before returning to more reasonable values. These represent gaps in the data where SWEPAM was unsuccessful in measuring the density properly. We want to keep track of those times when ACE made a good measurement of the magnetic field, density, and flow speed. To this end, enter IDL> indb = where(bmag lt 9999.) IDL> indn = where(den lt 999.) IDL> indv = where(vel lt 9999.) IDL> b = bmag[indb] IDL> n = den[indn] IDL> v = vel[indv] Now, indb is a list of indices where the magnetometer yielded good magnetic field data, and b is an array of magnetic field data with the 9999.999 data points excluded. Note that the size of b is now less than nt, and b is sampled at different times from n and v. To plot the magnetic field measurements as a function of time, enter IDL> plot, time[indb], b, psym=3 You may also plot all three variables in a single window using IDL>!p.multi = [0,1,3] IDL> plot, time[indb], b, psym=3 IDL> plot, time[indn], n, psym=3 IDL> plot, time[indv], v, psym=3 (Use !p.multi = [0,1,1] to revert to single plots in each window.) 3. What are the average measured magnetic field, density, and flow speed over 2008? What are their standard deviations? Hint: Use the IDL functions mean and stdev on the appropriate data arrays. We now want to separate the data between times when ACE experienced a slow solar wind and times when it sat in a fast solar wind. Here, we characterize fast solar wind as exceeding 600 km/s, and slow solar wind as anything less than that. We also want to exclude any transitory events, such as a shock which might exhibit a discontinuous jump in density. For the purposes of this exercise, we characterize transitory events as those having a density greater than three standard deviations from the mean density. We now define indbslow as those indices where ACE had a valid magnetic field measurement, was sitting in the slow solar wind (|𝑣| < 600 km/s), and was not experiencing a transitory event (𝑛 < 〈𝑛〉 + 3𝜎𝑛 ). The following commands will accomplish this: IDL> indbslow = where((bmag lt 9999.) and (den lt nmean+3*nsigma) and (vel lt 600.)) IDL> bslow = bmag[indbslow] 4. Write down similar statements to define bfast, vslow, and vfast. Hint: Don’t forget that, in each term within your where statement, your data should be less than 9999 (or 999 for the density). As a sanity check, you can verify that you obtained vslow and vfast properly with the commands IDL> plot, time[indvslow], vslow, psym=3, yrange=[0,max(vfast)] IDL> oplot, time[indvfast], vfast, psym=3, color=150 This should show the slow solar wind data in white, and the fast solar wind data overplotted in red. 5. In two separate plots, show the evolution of the magnetic field and the flow speed, with the slow wind data shown in white and the fast wind in red. Print both plots. (You may wish to set !p.multi = [0,1,2] first.) Is your velocity plot consistent with our definition of fast and slow solar wind conditions? Lastly, we shall perform Fourier transforms on the magnetic field and velocity data to obtain the power spectra for the fast and slow solar wind conditions. We will use IDL’s fast Fourier transform procedure FFT. Generally, the fast Fourier transform works best when the number of data points is a power of two: 2, 4, 8, 1024, etc. Most likely, your data arrays do not fit this criterion, so use the following steps to Fourier transform the slow solar wind magnetic field data: IDL> nbslow2 = 2L^floor(alog(n_elements(bslow))/alog(2.)) IDL> bslow2 = bslow[0:nbslow2-1] IDL> bslowft = fft(bslow2) Use a similar procedure to Fourier transform bfast, vslow, and vfast. We have a significant caveat here: a proper fast Fourier transform uses regularly spaced data. However, the time-intervals between consecutive measurements of bslow2 are not all the same. Most of those time-intervals are dt, but over the course of this lab, we have excluded certain intervals because of gaps in the data, transitory events, or transitions between fast and slow solar wind. Thus, this is not a proper Fourier transform. Nevertheless, generally speaking, the time-scales between excluded intervals are comparatively longer than dt. Therefore, when we plot the subsequent power spectra, the low frequency spectrum should be taken with a grain of salt, but the high frequency data should still be believable. The resulting array bslowft should have the same dimensions as bslow2, namely, an array of size nbslow2. If we define 𝑁 as the array size nbslow2 and Δ𝑡 as the sampling interval dt, the format of bslowft is such that its array elements correspond to the frequencies: 𝑁 0, 𝑁 ( −1) 1 ( −1) 1 2 1 , ,…, 2 , ,− 2 ,…,− 𝑁Δ𝑡 𝑁Δ𝑡 𝑁Δ𝑡 2Δ𝑡 𝑁Δ𝑡 𝑁Δ𝑡 Therefore, if we define an array of frequencies IDL> freqbslow = (findgen(nbslow2/2)+1) / (nbslow2*dt) then the complex value bslowft[i+1] corresponds to the Fourier transform evaluated at the frequency freqbslow[i], and bslowft[nbslow2-1-i] to the frequency -freqbslow[i]. For example, to see a log-log plot of the Fourier transformed magnetic field data in the slow solar wind, type IDL> plot_oo, freqbslow, abs(bslowft[1:nbslow2/2]) The more interesting quantity, however, is the magnetic power spectrum. Review your notes from Prof. Chandran’s lecture to find the formula for the power spectrum in terms of the Fourier transform of the magnetic field. 6. Write down that formula here. Then calculate the magnetic power spectra and velocity power spectra for both fast and slow solar wind. Plot these four power spectra in a log-log plot (but do not print them yet). What does the shape of the power spectrum in log-log space tell you about its frequency dependence? Hint 1: Of course, we do not have 𝑻 → ∞, but you may use 𝑻 = 𝑵∆𝒕. Hint 2: You may also choose to employ reverse(bslowft[nbslow2/2:*]) for the negative ̃ (−𝒇). Alternatively, you could take advantage frequency regime of the Fourier transform, 𝑩 of the fact that those values are simply the complex conjugates of the positive frequency ̃ (−𝒇) = 𝑩 ̃ (𝒇)∗ when 𝑩(𝒕) is real. (Why?) regime bslowft[1:nbslow2/2], i.e., 𝑩 Finally, we can attempt to quantify the turbulence in these four plots by fitting them to power laws. The exponent in the power-law is simply the slope of the lines when plotted in log-log space. We shall use the IDL procedure linfit to compute these slopes: IDL> linbslow = linfit(alog10(freqbslow), alog10(powerbslow), yfit=fitbslow) IDL> plot_oo, freqbslow, powerbslow IDL> oplot, freqbslow, 10.^fitbslow, color=150 You should see a red line over your power spectrum, indicating a fit to a power-law spectrum. Type IDL> print, linbslow[1] to see the slope of this line. 7. Plot and print (use !p.multi = [0,2,2] first) all four power spectra – including the magnetic and velocity power spectra for fast and slow solar wind conditions – with the fitted power-law plotted on top of them. Fill out the table below with the slopes of these power-law spectra. What differences do you notice between fast and slow solar wind? Which conditions lead to steeper power spectra? Can you speculate why? Slow solar wind Magnetic power spectrum Velocity power spectrum Fast solar wind