A scheme for finding the front boundary of an interplanetary magnetic cloud

We develop a scheme for finding a “refined” front boundary-time ( tB*) of an interplanetary magnetic cloud (MC) based on criteria that depend on the possible existence of any one or more of four specific solar wind features. The features that the program looks for, within ±2 h (i.e., the initial uncertainty interval) of a preliminarily estimated front boundary time, are: (1) a sufficiently large directional discontinuity in the interplanetary magnetic field (IMF), (2) a significant proton plasma beta ( βP ) drop, (3) a significant proton temperature drop, and (4) a marked increase in the IMF’s intensity. Also we examine to see if the “MC-side” of the boundary has a MC-like value of βP . The scheme was tested using 5, 10, 15, and 20 min averages of the relevant physical quantities from WIND data, in order to find the optimum average to use. The 5 min average, initially based on analysis ofN=26 carefully chosen MCs, turned out to be marginally the best average to use for our purposes. Other criteria, besides the four described above, such as the existence of a magnetic hole, plasma speed change, and/or field fluctuation level change, were examined and dismissed as not reliable enough, or usually associated with physical quantities that change too slowly around the boundary to be useful. The preliminarily estimated front boundary time, tB and its initial ±2-h uncertainty interval are determined by either an automatic MC identification scheme or by visual inspection. The boundary-scheme was developed specifically for aiding in forecasting the strength and timing of a geomagnetic storm due to the passage of a MC in real-time, but can be used in post ground-data collection for imposing consistency when choosing front boundaries of MCs. This scheme has been extensively tested, first using 81 bona fide MCs, collected over about 8.6 years of WIND data (at 1 AU), and also by using 122 MC-like structures as defined by LepCorrespondence to: C.-C. Wu (wuc@cspar.uah.edu) ping et al. (2005) over about the same period. Final statistical testing of the 81 MCs to see how close the refined boundary-timetB* lies with respect to a preliminary time tB (VI) was carried out, i.e., to find 1t1=(tB*–tB (VI)), for the full set of MCs, wheretB (VI) is usually a very accurate time previously determined from visual inspection, This testing showed that 591t1s (i.e., 73%) lie within±30 min, 711t1s (i.e., 88%) lie within±45 min, and only 5 cases lie outside a |1t1| of 1.0 h, which is only 6% of the full 81, and these 6% would be considered unsatisfactory. Since MC parameter fitting is usually done on the basis of 30 or 60 min averages, these results seem quite satisfactory. The program for this front boundary estimation scheme is located at the Website: http://wind.nasa.gov/mc/boundary.php .


Introduction
One of our main interests is to successfully forecast the magnetospheric response to the passage of an interplanetary magnetic cloud (MC) using solar wind magnetic field and plasma data in real-time from a spacecraft upstream of Earth.And for those MCs that have a relatively longlasting and significant negative B Z,GSE -component the magnetospheric response is a geomagnetic storm.MCs are generally large magnetic flux ropes (e.g., Priest, 1990;Gosling, 1990;Lepping et al., 1990;Burlaga, 1988Burlaga, , 1995;;Kumar and Rust, 1996) in the solar wind, i.e., plasma embedded strong magnetic fields of approximately helical structure.A MC was originally defined empirically in terms of in-situ spacecraft measurements of magnetic fields and particles in the interplanetary medium, viz., it is a region in the solar wind having: (1) enhanced magnetic field strength, (2) a smooth R. P. Lepping et al.: Scheme for finding the front boundary of an interplanetary MC change in field direction as observed by a spacecraft passing through the MC, and (3) low proton temperature (and low proton plasma beta) compared to the ambient proton temperature (Burlaga et al., 1981;Klein and Burlaga, 1982;Burlaga, 1988Burlaga, , 1995)).Magnetic clouds are also understood tacitly to be large structures, so that their durations are long, usually between about 7 and 48 h at 1 AU, averaging about 20 h in duration (e.g., see Lepping and Berdichevsky, 2000).
Any realistic attempt to do such geomagnetic storm forecasting requires the development of a muli-phased program/scheme to find specific MC properties, starting with a program to automatically identify the MC in the first place.(Earlier we developed such a program to identify a MC or a MC-like (MCL) structure (Lepping et al., 2005), but this program must be modified for real-time application.Another method of detecting interplanetary MCs as flux ropes was developed by Shimazu and Marubashi (2000), but that method was based on the examination of interplanetary magnetic field (IMF) data only.Also see a related recent study, Feng et al. (2007), that provides statistical properties of MCs.We clearly need both plasma and IMF data for accurate MC-and its front boundary-identification, as we argue below.)Other forecasting-program phases include analyses: to determine what kind of MC is being observed (e.g., IMF: North→South, South→North, etc.), to find some key times within the MC (e.g., its "center time"), and finally to use properties of the early portion of the MC, through MCmodeling, to predict properties of the latter portion of the MC, especially to estimate B Z,GSE at minimum and its occurrence time.To do this it is important to have a reliable scheme for finding, in real time, an accurate estimate of the front boundary of the MC.Also objective non-real time analyses of MC's front boundaries are equally important.For example, such a non-real time study may be one that attempts to make accurate correlations of a MC structure or its sub-regions with other parameter values, such as intervals over which the MC's internal fields are open or closed using suprathermal electrons (e.g., Crooker et al., 2008); in such a study accurate correlations depend on accurate identification of the MC's true extent, and therefore on good estimates of its boundaries.The development of such a general, automatic, front-boundary identification scheme is the main topic of this paper.
The Lepping et al. (2005) method for automatic MC identification was not developed for fine-scale identification of boundaries, and therefore usually does not provide sufficiently accurate boundary occurrence-times, especially for various prediction purposes; it has been estimated that the method's auto-identification of the front boundary would be accurate to only about ±2 h.Therefore, in this supplementary work we develop a means of more accurately estimating front-boundary times (within that four hour period) suitable for such predictions, based on quite different criteria than those used in the MC identification program.Specifically, we have determined that a scheme based on four criteria, in-volving relatively rapid changes in magnetic field and plasma quantities, and therefore requiring relatively small-scale time averages, appears to be most effective in such front-boundary determination.These depend on the possibility that this boundary has one or more of the following features of sufficient size as we enter the MC: (1) a sufficiently large directional discontinuity (DD) in the interplanetary magnetic field (IMF), (2) a proton plasma beta (β P ) drop, (3) a proton temperature drop, and (4) an increase in the IMF's intensity; see the color arrows in Fig. 1.These criteria were the result of experience gained from many years of visual examination of the profiles of plasma and field quantities around the vicinity of front-side boundaries of numerous MCs (e.g., see Lepping et al., 1990Lepping et al., , 2003Lepping et al., , 2006;;Burlaga et al., 1981;Burlaga, 1995).The first to recognize that a magnetic hole may occur at the front boundary of a MC were Burlaga et al. (1980); and see Burlaga (1995, Fig. 6.10 and related comments).See the panel on |B| (3rd down) in Fig. 1 giving an example of a magnetic hole.Hence, we attempted to add to this scheme the search for the existence, and timing, of a possible magnetic hole but found that such structures were not yet sufficiently well characterized quantitatively (nor unique enough) to be reliable in determining a MC's front boundary.(However, using the existence of a possible magnetic hole as another means of identifying a front boundary is an area that surely could stand further study.)Besides the four criteria above, and the existence of magnetic holes, other tests were considered and dismissed as unreliable, insufficiently sensitive, or involving quantities that were too slowly changing for practical use.The early slowing down of the MC's internal plasma (due to MC expansion, e.g., see Marubashi, 1997) is one such example of an unreliable test, because the early change in speed near the boundary is usually much too small to be easily detected, even over an hour or so.Changes of the fluctuation level of the IMF (via examination of the root-mean-square deviation (RMS) shown by the top panel of Fig. 1) was also considered with quite unreliable results.In short, incorporating any other than the four criteria listed above did more harm than good in our attempt to estimate the timing of the MC's front boundary.
It should be stressed that the criteria used in the automatic detection of a MC itself by Lepping et al. (2005) are markedly different from those considered here, in that the former required performing various tests that look for smoothly varying properties on much longer scales (i.e., many hours) and satisfying some absolute conditions imposed on the average |B|, average temperature, etc., whereas our boundary estimation scheme requires testing on the scale of minutes, or at least small fractions of an hour, for relatively abruptly changing quantities, as might be expected for a boundary.Hence, the two schemes are complementary and almost independent, and the MC auto-identification scheme must be applied first, when visual inspection is not, or cannot be used.We briefly describe here one of the needs for such a boundary estimation program which was suggested above, and that is one to help in forecasting a geomagnetic storm's minimum D st and its timing based on magnetic field and plasma measurements acquired during the passage of the causal MC.To do this, a MC parameter fitting program and an accurate estimate of the MC starting time (front boundary time) are needed in real time.The program starts with a module that encompasses two phases: one for automatically identifying a candidate MC (see, e.g., Lepping et al., 2005;Feng et al., 2007) which is also expected to be able to estimate the MC's front boundary time (where the preliminary estimate is called t B ) to within at least ± 2 h of the actual boundary-time, and a second part that produces a refined boundary-time (t B *) using the four criteria, as listed above.Such a forecasting scheme (or any similar one) should be applicable to a large range of MC types but is best applied to North→South types, and starting in the year 2005 such types started to become prevalent, as was suggested by Bothmer and Rust (1997); also see Lepping et al. (2005), Huttunen et al. (2005), Lynch et al. (2005).In particular, we will obtain, through the use of a refined version of a well known MC parameter-fitting model program (Lepping et al., 1990), a series of running estimates of the minimum in B Z , and its occurrence time, all based on the same t B *. Hence, it is important to obtain t B * as accurately as possible.Notice that the MC fitting program is expected to be applied to progressively longer and longer analysis-intervals, until a final analysis-length of (t S -t B *) is obtained, where the so-called "stability time," t S , is that time usually occurring just past the passage of the mid-point of the MC where little change in fit-parameter values are expected to occur with added analysis interval lengths.It is important that T /2<t S <T , where T is MC's duration, in order that a long enough analysis interval is employed for success in the MC parameter fitting but short enough that the observing spacecraft is still several hours away from the rear boundary for usefulness in prediction.Choosing the proper min-B Z of the series of fittings and its associated time, both used in forecasting minimum D st , are the final products of the process, the details of which are the subjects of another study.
in the magnetic field, where <B 1 > (<B 2 >) is the upstream (downstream) average of the field over <t>, allowing a <t>-length transition between], then λ must be greater than a limit, denoted by λ L to raise a flag.

T P drop: Defining
RT≡Rel T P ≡ T P /<T P >=2(T P 1 −T P 2 )/(T P 1 +T P 2 ), where <T P 1 > (<T P 2 >) is the upstream (downstream) average of proton temperature over <t>, allowing a <t>-length transition between, then RT must be greater than the limit RT L to raise a flag.

Marked |B| increase: Defining
where <|B 1 |> (<|B 2 |>) is the upstream (downstream) average of field magnitude over <t>, allowing for a <t>-length transition between, then Rel, B must be greater than the limit R|B| L to raise a flag.
The four limits λ L , β P ,L , RT L , and R|B| L will be determined through optimization below.Different <t>-lengths will lead to different limit-values.Finally, we examine to see if the "MC-side" of the estimated boundary has a MClike value of β P .Specifically we demand that β P <0.2 or the preliminary estimate is ignored; the value of 0.2 was found through trial-and-error, not through optimization.
For example purposes, Fig. 1 shows the profile of the MC of 18 October 1995 in terms of B-RMS, the latitude of the magnetic field (θ B ) in GSE coordinates, magnetic field magnitude (|B|), proton plasma beta (β P ), and thermal speed (V T h ), in the panels from top to bottom.Indicated in the figure by four color-coded heavy arrows are the features relevant to the specific criteria (above) that are to be tested.(As mentioned in the Introduction, RMS and magnetic holes, also show in Fig. 1, were examined but not used in the scheme.)We now carefully examine the results of applying these four criteria quantitatively to the WIND magnetic field and plasma data (see Lepping et al., 1995;Ogilvie et al., 1995, respectively), by setting up an optimization-function (M) that we call, in order to "optimize" the criteria associated limit-values.Getting the optimum limit-values will require using the optimization-function for each test separately in a statistical manner.Once optimum limit-values are found as applied to a previously known and carefully chosen subset of MCs, i.e., those discovered through inspection of WIND data, we apply these four criteria with the optimum limitvalues to a much larger set of MCs, to further test them for finding front boundaries.

Data sets used in developing the scheme
The scheme will be applied to three sets of WIND data: (i) to a specially chosen subset (N=26, Set #1) of the combined N6S, S6N MCs (see Tables 1, 3, and 4 of Lepping et al., 2006) with poor quality cases (i.e., Q O =3 cases) deleted (see Appendix A of Lepping et al., 2006, which defines quality, Q O ), (ii) to the (N =122, Set #2) MCL events found by Lepping et al. (2005), and (iii) to the set (N =81, Set #3) of MCs in Lepping et al. (2006) which includes all MCs visually identified in the period from the beginning of the WIND mission in late 1994 to August of 2003.However, the application of the program to Set #3 will be considered to be a final test of the scheme, whereas the use of Set #1 is for determining the limits (fixed numbers) used in the scheme through the optimization, and use of Sets #1 and #2 together are for determining the best <t> to use and for describing its capabilities and breath of applicability generally.The start-times for the MCL events are listed on a page on the WIND/MFI Website given by http://lepmfi.gsfc.nasa.gov/mfi/MCL1.html.
The start-times, model fitting parameters, quality estimations, and various auxiliary quantities are given for 106 WIND MCs by http://lepmfi.gsfc.nasa.gov/mfi/magcloud S1.html the first 81 of which are utilized in this study.Notice that each event is coded (K) from 1 to 99, even though there are 106 initial events, because there are some "inserted" events that are essentially subscripted, e.g., MCs with numbers 2.2, 14.1, 14.2, 44.1, etc.

Statistical optimization of the limit-values: foundation
The optimization function, for a specific set of test MCs, will depend on two features: (1) it takes into consideration the number of events that passed and (2) it measures how well the events passed these tests, meaning an examination is made of a given criterion's ability to accurately reproduce a previously and carefully determined start-time through visual inspection (VI), i.e., in terms of as applied to only Set #1, and where the smaller the t the better, for each MC in that data set.The optimization function will combine these by giving greater weight to accuracy (i.e., feature 2) over number of criteria passed (i.e., feature 1).We stress that the estimated time t B *(test) is an average of the results of the individual time-estimates from the four criteria (if all four pass) for each MC.Hence, t B *(test) is a single number for each MC, and therefore t is a single number for each MC.
Once our scheme determines the optimum limit-values (using Set #1), and the proper averages to use, they are then fixed in the scheme for all future use.Now t 1 is defined as the difference in time between t B (VI) and the time estimated by the our scheme for each event, called t B * when applied to any future data set of actual MCs (not just a test-set) and in particular on Set #3; hence, As in the case of t, t 1 is based on an average value of t B * for each MC and therefore, t 1 is an average.Similarly, and only for completeness, we define another timedifference, i.e., where t B (M.Fit) is the time listed for the front boundary as was used in MC fitting.In  1; they are not used directly in this boundary analyses.)This is so, because in carrying out the MC fitting, using Lepping et al. (1990) we often had to make some front boundary adjustments (based on the fit of data all across the full MC), especially if the cloud was very asymmetric.Usually this was of little consequence in the outcome of the fitting, since relatively large averages were often used in the fitting, viz, 15, 30, or 60 min.However, if our MC fitting model had taken into account the MC's interaction with the upstream plasma, and MC expansion, there would likely be a significantly smaller average difference of t 2 .

Limit-value determinations from the Magnetic Cloud front boundary tests: concepts
From previous work and inspection of magnetic clouds the test-limits are known to exist somewhere in the range of: Test 1 : 1 • ≤ limit ≤ 99 • Test 2, 3, and 4 : 0.01 ≤ limit ≤ 0.99 The range in test #1 is searched in 1 degree intervals.The ranges in tests 2, 3, and 4 are searched in 0.01 intervals.For each limit-value the N=26 combined N→S and S→N events of Set #1 (as described above) are tested as a set (within the ±2 h interval around the visual inspection time, or ±2 h around an automatically determined time for Set #2, for example), and the values for the two following quantities are calculated: -The fraction of events passing the test ("feature 1") -The average error in the estimate of the boundary time ("feature 2") These quantities are then used to maximize the "optimization-function" (M) (specifically defined below), in order to determine the "best-choice" limit-value for a given type of average, <t>, for each test.In turn, M is applied to each of the four averages (5, 10, 15, 20 min) separately.Specifically the maximization is carried out on this optimization function: M(limit-value) = (0.5 × fraction of events passing) The form of M is chosen to place more weight on the average error at each trial, compared to percentage passing a given test.The idea is that there are four independent tests to find the front boundary time for each MC, so for any given test the average error is weighted more than the fraction of events passing that test.Note that average error is measured in minutes and 120 (minutes) is the total possible error, so the average error is divided by 120 to get a fraction of the total error.Hence, both terms are expressed as fractions.The maximum possible value of M is therefore 1.5, where then the fraction passing would be 1.0 and the average error would be 0.0.The optimum limit for each test is then found when M is maximum.Specifically this is done by starting with test #1, and for a given type of average (say 5 min), going through all of the MCs of a given set at a fixed trial limit, repeating this for another slightly larger limit, etc. until a set of Ms is derived from which we choose the maximum one and its associated limit.This then is the optimum limit for that test.This is repeated for test #2, test #3, and test #4.Then the whole procedure is repeated for a different type of average (say 10 min now), etc., until we derive the limit-values associated with the set of max Ms for all four types of averages, for a given data set.Finally, in order to rule out "false positives" (e.g., say only one event passed and with small error yielding a misleadingly large value of M), we added a new condition that the fraction of events passing a given criteria (feature 1) must be at least 0.25 or else the limit-value is discarded.

Application to data sets #1 and #2 to find test-limits and optimum average
The scheme was applied to data Set #1.Table 2 shows the resulting values of the optimum limit-values for 8 L , β P , L , RT L , and R|B| L obtained in relation to the type of average employed from the optimization of the M-function.Again, it is to be stressed that we use only Data Set #1 to obtain  2. However, below in applying the scheme to both Data Sets #1 and #2, we attempt to find which type of average is optimum for application of the boundary scheme at 1 AU.Figures 2 through 7 show various histograms of relevant quantities, presented to aid in finding that optimum limit-set and optimum average, and further to give some measure of the strengths and limitations of the overall scheme.Strictly speaking, when finding the limits Eq. ( 1) holds only when using actual MCs where visual inspection was possible, e.g., Set #1.(This is true also of Set #3, but limit testing is not done for that set.)When data Set #2 is used, we are applying an equation that is very similar to, but not exactly the same as, Eq. (2), i.e., now where t B (auto) is that estimated front boundary-time found from the MC auto-identification program (see Lepping et al., 2005), replacing the visually inspected time.(Again, a given t is a single number for a given MCL event based on an average of time-differences from the four possible criteria.)This is important, because then we wish to find the difference in boundary identification times ( t s) between two automatic identification/estimation programs, i.e, MCidentification program (Lepping et al., 2005) and boundaryidentification program, sequentially.After all, in a prediction/forecasting scheme there would be no visual inspection option available.The t's (from Set #1) and the t 1 's (from Set #3) are properly considered errors (if the VI's are well estimated, a fair assumption), but the t 's are not strictly errors, because we cannot be sure that the front boundary times of the automatically identified MCL events are more accurately chosen than the times from this scheme.Figure 2a, b shows histograms of the number of WIND MC events that passed a given number of tests, up to the maximum of four tests for the various averages 5, 10, 15 and 20 min separately.In Fig. 2a the results for the MC Set #1 are shown, where the N=26 specially chosen MCs are used.Notice that, for the 5 min tests, all events occur in the last three bars.So there was not a single MC that did not obtain at least two time-estimates from the tests.Also, the 5-min distribution is such that the frequence of occurrence grows with the greater number of test passed, in contrast to the other averages.From the point of view of Fig. 2a the 5 min average cases gave the best results among the four different types of averages.Figure 2b is for the MCL Set #2 with N=122 events.Similar to Fig. 2a, almost all cases fall into the last three bars.And the situation is generally the same as in Fig. 2a, where the frequence of occurrence grows with the greater number of test passed, etc. Again, from the point of view of 2B the 5 min average cases were the best results among the four different types of averages.
Figure 3a, b shows histograms giving the number of WIND MCs that fall into time-differential buckets, where the time difference ( t) for any one case is defined by Eq. ( 1).Notice that with this sign-choice of t, all resulting tvalues such as those given in Fig. 3a, b, will have the MC part on the right of the zero-point in time, and the upstream region (usually a sheath region) on the left of the zero-point.The histogram of Fig. 3a applies to data Set #1's N=26 MCs.Notice that the 5 min tests in Fig. 3a (fourth panel down) provide the best overall results, in the sense that their histogram best approximates a normal distribution, has fewest "outliers," and peaks around zero.Notice that for the 5 min averages all but one event of the 26 total events occur within ±50 min, and there are 20 MCs (i.e., 78%) that occur within ±30 min.The histogram of Fig. 3b is similar to Fig. 3a except it applies to the N=122 MCL events (Set #2), and again the 5 min tests provide the best overall results, although its case is somewhat weaker, since more events occur outside ±50 min.We can say, however, that of all of the histograms in Fig. 3b, the histogram for the 5 min averages is most symmetric about zero, there are few outliers in the negative range (probably strongest argument for this average), and it has fewest extreme cases (i.e., >50 min) in the positive range.Notice that within ±50 min there are 108 MCs, which is 89% of the full N=122 MCL events, and within ±30 min there are 97 MCLs (i.e., 80%).One final point to be made about Fig. 3b, for the 5 min panel, is that there is greater symmetry compared to that panel of Fig. 3a; this is probably due to the poorer statistics of Fig. 3a.
From overall considerations of Fig. 2a, b and Fig. 3a, b, we determine that the 5 min average tests are generally the most optimum with respect to both the shape of the related occurrence distributions and the distributions of the associated t values.Hence, we will assume that these are general findings (for at least 1 AU) and display future figures only for the 5 min average tests.
Figure 4 shows three histograms of specific t's for data Set #1, classified according to the number of MCs that: passed two tests passed (A) with five MCs; passed three tests (B) with seven MCs, and passed four tests (C) with 14 MCs, for the 5 min averages, without regard to the specific nature of the tests that were passed.And again notice that there were no events that fell into one test passed.For example, Fig. 2a reveals that 7 events passed three tests, and Fig. 4b shows the specific t's that were associated with those seven-passed-test cases.Likewise, panel (4C) shows the distribution of t's for the 14 events that passed all four tests that were indicated in Fig. 2a, etc.There is rather weak statistics in most of Fig. 4's panels, especially for panel (a).Most important is that for this select set of events, only one case exceeded a t of 50 min (and not surprising, it had only one-test-passed), and most ts were well under 30 min.
Figure 5 shows histograms of t s, similar to those shown in Fig. 4, but now for the 122 MCL events of data Set #2, that passed a given number of tests, up to the full num-ber of four, for the 5 min averages, again without regard to the specific nature of the tests that were passed.For example, Fig. 2b reveals that 73 events passed four tests, and Fig. 5d here shows the specific t 's that were associated with those four-passed-test cases.Likewise, panel (5C)  2a that no events occurred in either the "zero tests passed" or the "one-test passed" categories.But 5 events passed the two-test category and their t's are shown here in (A).(B) Shows the specific 7 t's that were associated with the three-tests-passed case.Likewise, (C) here gives the distribution of t's for the 15 events that passed all four tests.4, but now for the number of N (total)=122 MCLs of Data Set #2 that passed a given number of tests, up to the full number of four, for the 5 min averages.For example, Fig. 2b reveals that 15 events passed two tests, and (B) here shows the 15 specific t 's that were associated with those 15 cases.Likewise, Fig. 2b reveals that 17 events passed four tests, and (D) here gives the distribution of the specific t's for the 17 events that passed all four tests, etc.
shows the distribution of t 's for the 31 events that passed three tests that were indicated in Fig. 2b, etc.It is clear that the t -distributions of Fig. 5c, d are more symmetric about t =0.0 and better peaked than those in the other two panels.Also, Fig. 5 shows quite a few cases where | t | of 50 min is exceeded, unlike the situation of Fig. 4.However, Fig. 5c, d are quite acceptable which argues for the obvious importance of having a large number of tests passed.
Figure 6 shows histograms giving the number of Set #1's 26 MCs that contributed to the estimate of a given t i , (i=1, ..., 4) specifically for test #1 (Fig. 6a), test #2 (Fig. 6b), etc.As we see, there were 26, 19, 26, and 19 tests (from top to bottom) that initially passed, summing to 90 (or 86%) out of a possible max of 104 (=4 tests×26 MCs) for all tests and all MCs.Clearly tests #2 (Fig. 6b, test on β) and #4 (Fig. 6d, test on |B|) give the best results in that the distributions

Fig. 7.
Histograms giving the number of MCLs that contributed to the estimate of a given t i =[t B * i -t B (auto)], individually for the following: test #1 through test #4, according to the same scheme as in Fig. 6, but now for the N(total)=122 MCLs of Data Set #2, based on the 5 min averages.The subscripts in the t i -equation here mean that the t 's for every individual test's estimate are being shown, not just the average t .
were relatively symmetric, centered at or near the Difference of 0.0, and had fewer that occurred far from 0.0, although the Ns for both of these were slightly lower than for tests #1 (Fig. 6a) and #3 (Fig. 6c), which were spread over a much greater range, especially into the sheath region.Only test #1 (Fig. 6a) gave any distant positive estimates (actually only one), near 100 min.
Figure 7 shows histograms that give the number of MCLs that contributed to a specific estimate of t i , separately for test #1 (panel a) through test #4 (panel d) for the 5 min averages of data Set #2.As we see, the number of MCLs that pass each specific test is given in the panels (e.g., N=104 passed the β P test), summing to 418 passed tests (or again 86%) out of a possible max of 488 (=4 tests×122 MCLs) for all tests and all MCLs.The distributions (B) and (D) were only slightly asymmetric with respect 0.0, but distributions (A) and (C) were significantly asymmetric.Fortunately many cases passed, but the |B| test (panel d) was a rather weak contributor with only N =82.The best type of test for the MCLs was the β P test, with the best symmetry, few events in the sheath, and a strong peak, and the poorest type of test was a tossup between the DD test (A) and the Temp.test (D).Even with all of the asymmetries seen in the panels of Fig. 7 when put together the result is only slightly asymmetric, as seen in Fig. 3b for the 5 min panel.
Figure 8 shows four examples of profiles of the physical quantities used in identifying a MC's front boundary, where from top left to bottom right are for the MCs of (A) 18 October 1995 (an excellent case), (B)20 March 2002 (a good case), (C) 10 January 1997 (a fair case), and (D) 20 August 1998 (a poor case).The quantities plotted are field direction, θ B (for test #1); field magnitude, |B| (for test #4); proton plasma β P (for test #2); and thermal speed, V T h (for test #3).The center of the symbols (DD, dB, etc.) give independent estimates of the time of the boundary.From these individual tests we obtain a net "refined" estimate by averaging the individual times, indicated in Fig. 8 by *, consistent with calling the associated time, t B *.In Fig. 8 we can see the difference (now t 1 , see Eq. 2) in time between the vertical dashed line (representing an estimated boundary time from an earlier determination, such as t B (VI)) and the refined t B *-time, in each case.Where the n's represent the number of tests passed for each case, we see that the excellent case had n=4, the good case had n=2, the fair case had n=4, whereas the poor case had n=2.The determinations of excellent, .... to poor were done according to, first, the value of | t 1 | and, second, the value of n, but clearly they are subjective evaluations.(It should be pointed out that in determining t B * we had tried to eliminate extreme values ("outliers") by imposing an editing routine.For example, suppose that I MAX (the test index) was 4, we would then find the median and the standard deviation for those four separate and independent estimates.Then we took the average of only the values that fell within the median  ± one standard deviation of those four.Then that final average was determined to be t B *.However, for the overall set of 81 MCs (Set #3, as we will discuss below) the final results were not as good as simply taking a straight average.Hence, we eliminated this editing routine.)It has been shown that for bona fide MCs (with relatively strong |B|, long durations, and relatively good flux rope structure), as well as for the usually less impressive (i.e., according to strength of |B| and flux rope structure) MCLs by the same standards, 5 min averages are the best to use in the four tests defined in Sect. 2. We should stress, however, that it was apparent from these results not shown that the results of the scheme do not depend crucially on the 5 min average; e.g., the 10 min averages may have done almost as well, the 15 min averages also appeared acceptable if borderline, but the 20 min averages would clearly not be acceptable.

Tests of scheme using the full set #3 of WIND MCs
Figure 9 shows two histograms that give the results of the application of the boundary scheme for the "full" WIND MC set for the first 8.6 years of the mission for the test-limits associated with the 5-min averages.Hence, results from all three quality levels, Q=1,2,3 of the original N T =82 WIND MCs were initially incorporated in this part of the study.We point out, however, that one MC was dropped, because of the inaccessibility of needed plasma data for some tests at the time of this study.Hence, the resulting data set (Data Set #3) is based on N=81 MCs. Figure 9 (top) is a histogram showing the number of MCs that passed a given number of boundary tests, up to a maximum of four tests with no regard to the specific nature of the tests.We see that, as before when we considered the limited number of N =26 MCs, 63 cases had boundary-times (t B *) that were chosen on the basis of 3 or 4 tests.So about 78% of the 81 MCs had passed at least three tests, and we consider that a successful attempt to find the front boundary-time, because there is a good chance of obtaining an accurate time for such cases with so many tests passed.And in no case of the N=81 did the scheme fail to find some boundary-time.In only 6 cases did the scheme find a t B * based on only one test-passed.Between these few "disappointing cases" and the 78% that were successful, lie the intermediate cases of 12 that passed two tests each, and even some of these are expected to give quite satisfactorily results (small t 1 's) adding to the 78% success rate, as Fig. 8b shows via one example.Most important, if we consider that more than one test used in a estimation to be indication of success, then (again from Fig. 9 (top) we see that for all but 6 of these 81 MCs 2 or more tests were employed), we were "successful" 93% of the time.Also, this relatively large set of MCs covers various types, sizes, field intensities, and attitudes (meaning tilt angles), so they are a fairly good representation of MCs at 1 AU in general.Hence, this success rate of 93% suggests that for about 90% of the time we are expected to find front boundary times with this scheme for MCs at 1 AU generally.The actual accuracies of these estimates, i.e., the ± t 1 for each case, is another matter, and for that we examine Fig. 9 (bottom).Figure 9 (bottom) shows a histogram that gives the number of MCs that fall into time-differential buckets, where the time difference is now equal to t 1 .This t 1 -distribution gives a good measure statistically of the accuracies of the scheme's estimates of the front boundary-times, being limited only by the accuracy with which these times were estimated by visual inspection (VI) in the first place.But we should keep in mind that the time-estimation from visual inspection may itself be inaccurate in a few complex cases.Figure 9 (bottom) indicates that 59 t 1 s (i.e., 73% of the full 81) lie within ±30 min, 71 t 1 s (i.e., 88%) lie within ±45 min, and only 5 cases lie outside a | t 1 | of 1.0 h, which is only 6% of the full set, and these 6% would be considered unsatisfactory.Since MC parameter fitting is usually done on the basis of 30 or 60 min averages on MCs that are typically 20 or so hours in duration, these results seem quite satisfactory generally.
Figure 10 shows histograms giving the number of the 81 MCs that contributed to the estimate of a given t 1i , (i=1, ..., 4) specifically for test #1 (Fig. 10a), test #2 (Fig. 10b), etc., for data Set #3.As we see, there were 77, 60, 74, and 56 tests, respectively, that passed, summing to 267 (or 82%) of a possible max of 324 (=4 tests×81 MCs).Clearly tests # 2 (Fig. 10b, test on β P ) and #4 (Fig. 10d, test on |B|) give the best results in that the distributions were relatively symmetric, centered near a t of 0.0, and they had fewer cases that occurred beyond | t 1 | of 45 min.However, the Ns for both of these are slightly lower than for tests #1 (Fig. 10a est, and this was also true for Set #1.This fact about T P is interesting, since the β P test is so good for all data sets, and it is strongly dependent on proton temperature (as well as on density and IMF intensity).criteria, and it was extensively tested using WIND magnetic field and plasma data for specific MCs and MC-like events (MCLs).The program for implementing this scheme is at the Website: http://wind.nasa.gov/mc/boundary.php.The four criteria used in the scheme involved examining the magnetic field and plasma data for generally well known MC frontboundary indicators, such as field directional change, proton plasma beta drop, proton temperature drop, and moderately strong positive gradient in the field magnitude as the MC is entered.Other criteria were tested, such as an examination of a normalized (by |B|) drop in RMS of the field, beginning of a drop in the plasma speed (as would be expected for an expanding MC), as well as evidence of a magnetic hole, and they all were found to be unreliable and generally not useful.A specially chosen subset of N=26 MCs (Data Set #1) of the first 81 MCs discovered in the WIND data set over the mission's first 8.6 years were used to optimize the limitvalues in the four criteria used in finding the boundaries, as defined in Sect. 2. By this we mean that all empirically determined parameters were found through the use of this data via the maximization of a so-called "optimization function" (M); see Eq. ( 4).Table 2 provides the resulting limit-values for the four criteria.Data Set #1 plus the MCLs (Data Set #2) of N =122, found from an auto-identification program (Lepping et al., 2005) from this same overall WIND data were used to determine what kind of average of the data was optimum for use in the scheme; 5 min averages were found to be slightly optimum.That is, we determined that generally using 5 min averages of the field is best for application of this scheme at 1 AU, but the scheme's success was not crucially dependent on the type of average used; 10, 15, and 20 min averages were also considered with 10 min averages giving almost the same level of success.
Final testing of the first 81 WIND MCs (Data Set #3), which followed from application of the four tests described above using the derived limit-values of Table 2 and 5 min averages, showed that 73% of the t 1 s lie within ±30 min, 88% lie within ±45 min, and only 6% lie outside a | t 1 | of 1.0 h, and only these 6% would be considered unsatisfactory.Since MC parameter fitting is usually done on the basis of 30 or 60 min averages, these results generally seem satisfactory, at least by that standard.This relatively large set of 81 MCs covers various types, sizes, internal field intensities, and axial attitudes, so they are a broad representation of MCs at 1 AU.Hence, the success rate of 75 out of 81 MCs (i.e., 93%), which had 2 or more tests used in estimating the boundary, as seen in Fig. 9 (top), suggests that for about 90% of the time this scheme should be successful for MCs at 1 AU generally.Notice that this percentage agrees with the figure of 88% of the cases lying within ±45 min, although this does not suggest that they are the same MCs.
By combining the results of all | t 1 |=|t B *−t B (VI)| for the MCs and all for all | t |=|t B * −t B (auto)| for the MCLs (giving N T =203 events) and plotting the absolute value of either the | t 1 |s or the | t |s against the number of tests passed we obtain Fig. 11; black crosses are used for the MCs and red triangles for the MCLs.(For convenience we will call "Diff" either a | t 1 | or a | t | here.)In this figure we indicate by a small black box where the average value of the combined crosses and triangles (the Diff's) is for each column, i.e., for each fixed number of tests passed, and we connect the boxes by straight lines.It is apparent that there is a statistical dependence of accuracy of the estimate of boundary time on the number of tests passed, whereby the more tests passed the closer the black box is to Diff=0.0, as would be expected.But obviously the dependence is rather weak beyond one test passed.The statistics on column one of Fig. 11 is especially poor since there is such a big spread of values of Diff, and they appear to cluster roughly in two parts, somewhat above and below the black box.We also point out that the spread of Diff values decreases as the number of tests-passed grows, also as expected.Ivanov et al. (2003) examine various features of one of our MCs, that of 15 May 1997 (Code number 15 in our Table 1).They discuss many more MC features than we do; our interests are with estimating only the front boundary time.But it appears that we are in good agreement on the front boundary estimation time: they give a time of 09:51:15 UT (their Table 2), and we provide a visual inspection (VI) time of 09:50 UT±1 Min (i.e., DOY=135.410) and a scheme estimated time of t B *=0936±2.5 Min (i.e., DOY=135.400),giving a t 1 =−15 Min; see our Table 1 and footnotes f and g.We stress that we are not able to give more accurate estimates than ±2.5 Min for t B *, which is ±0.0017 of a day, but sufficient for our purpose, which is to be able to provide good starting times for the fitting of MCs that are typically 20 h in duration.And we point out that the uncertainty of ±2.5 Min is the minimum uncertainty due only to the limitation of the type of averages used.The actual uncertainty is always somewhat larger depending on how many specific tests were passed, for any given event, to find the t B *-estimate and its spread of individual test-estimates.In fact, for the 15 May 1997 case the size of | t 1 | itself is indicative of the size of the actual uncertainty on t B *, of course, if we trust that t B (VI) was well chosen.Finally, we notice that Ivanov et al. (2003) do not list the MC of 16 May 1997 in their table or in their Fig. 8, whereas we list this event as our Code number 16 in Table 1, and it has a VI front boundary time of DOY=136.277.
Since a magnetopause-like boundary layer, when one exists, should be adjacent to the MC boundary, identifying such a boundary layer should in principal be helpful in automatically finding the actual boundary.However, a boundary layer of a MC is an extended region (see Wei et al., 2003) and the actual MC boundary is usually rather abrupt as the spacecraft flies through it, so an identification of a boundary layer should have limited usefulness for our method.It is mainly for this reason that we did not add the possible existence of a boundary layer to our scheme.
Our scheme should be useful for determining in real-time an accurate front-boundary time, t B * (i.e., to about ±45 min for a large percentage of cases), after a MC has been detected by some automatic identification program, such as that developed by Lepping et al. (2005) (also see Feng et al., 2007), where the front boundary time was usually not known to better than ±2.1 h.This "refined" estimate t B * is based on analysis of a relatively large number of MCs and MCL events.Finally, we point out that this scheme should also be useful in checking for consistency of the MC front-boundary times chosen by visual inspection after MC data are collected on ground.In many cases accurate after-the-fact front boundaries are needed for reliable correlation analyses of various MC features, such as suprathermal electrons with relative internal MC regions (e.g., Crooker et al., 2008).

Fig. 1 .
Fig. 1.An example of the profile of a front boundary crossing of a MC, that of 18 October 1995, at approximately hour 19, as seen in WIND field and plasma data.The indicators of the boundary are shown by the color-coded arrows, along with their literal denotations.The quantities plotted are B-RMS (thin black arrow), theta B (heavy green arrow), magnetic field magnitude, |B| (heavy orange), proton plasma beta (heavy light blue), and V T h (heavy purple); a magnetic hole, sometimes occurring at a MC's front boundary, is indicated by a thin black vertical arrow.Only four of these six quantities (those with heavy colored arrows) will be incorporated into the boundary identification scheme as described in the text, but all six were investigated.

Fig. 2 .
Fig. 2. (A) Histograms showing the number of WIND MC events that passed a given number of tests, up to a maximum of four tests, for the N =26 specially chosen MCs -see text (Data Set #1) with no regard to the specific nature of the test (i.e., test no.).From top to bottom, the dashed-dot histogram is for the 20 min average study; the solid-line histogram is for the 15 min average study; the dashed-line histogram is for the 10 min study; and the dotted-line histogram is for the 5 min study.(B) Similar to (A) except the histograms apply to the N=122 MCL event set (Data Set #2).

Fig. 3 .
Fig. 3. (A) Histograms giving the number of WIND MCs (Data Set #1) that fall into time-differential buckets, where Difference refers to t=[t B *(test)-t B (VI)].The scheme for the display of type of averages is the same as used in Fig. 2a, b. (B) Similar to (A) except the histograms apply to the N =122 MCL (Data Set #2) events and Difference refers to t =[t B *(test)-t B (auto)].

Fig. 4 .
Fig. 4. Histograms of t=[t B *(test)-t B (VI)] for the N=26 MCs of Data Set #1 that passed a given number of tests, up to the full number of four tests for the 5 min averages.We know from Fig.2athat no events occurred in either the "zero tests passed" or the "one-test passed" categories.But 5 events passed the two-test category and their t's are shown here in (A).(B) Shows the specific 7 t's that were associated with the three-tests-passed case.Likewise, (C) here gives the distribution of t's for the 15 events that passed all four tests.

Fig. 5 .
Fig. 5. Histograms of t =[t B *(test)-t B (auto)], similar to those shown in Fig.4, but now for the number of N (total)=122 MCLs of Data Set #2 that passed a given number of tests, up to the full number of four, for the 5 min averages.For example, Fig.2breveals that 15 events passed two tests, and (B) here shows the 15 specific t 's that were associated with those 15 cases.Likewise, Fig.2breveals that 17 events passed four tests, and (D) here gives the distribution of the specific t's for the 17 events that passed all four tests, etc.

Fig. 6 .
Fig. 6.Histograms giving the number of MCs that contributed to the estimate of a given t i =[t B *(test) i -t B (VI)] (i=1,.., 4), individually for the following: test #1 (A, DD), test #2 (B, β P ), test #3 (C, Temp.), and test #4 (D, |B|), for the N(total) = 26 MCs of Data Set #1, based on the 5 min averages.The subscripts in the t i -equation here mean that the t's for every individual test's estimate are being shown, not just the average t, so this differs from Eq. (1).

Fig. 8 .
Fig. 8. Four examples of profiles of the quantities used in identifying a MC's front boundary, for ±3 h around an earlier-determined VI boundary time (shown by a vertical dashed line).The quantities plotted are the field direction, θ B (test #1), field magnitude, |B| (test #2), proton plasma β P (test #3), and thermal speed, V T h (test #4).These MCs are: (A) DOY 291 (18 October), 1995; (B) DOY 079 (20 March), 2001; (C) DOY 010 (10 January), 1997; and (D) DOY 232 (20 August), 1998.The estimated boundary times are given by the front edge of the symbols (in the panels from top to bottom): DD (time of directional discontinuity), dB (del-field magnitude), BT (proton plasma beta), PT (proton temperature, in terms of thermal speed).The n's represent the number of tests passed for each case.From the individual tests a net estimate is obtained, called here the t B *-time, which is also shown as the symbol*.We can see the difference in time between the vertical dashed line (the VI time) and the t B *-time, given as t 1 , in each case.See Sect.3.3 for a definitions of the VI time and t 1 (Eq.2).The "Codes" are explained in the text.

Fig. 9 .
Fig. 9. Histograms considering the N =81 WIND MC set (Data Set #3) for the period early 1995 to August 2003, for the 5-min tests only.(Top) Histogram showing the number of MC events that passed a given number of tests, up to a maximum of four tests with no regard to the specific nature of the test.(Bottom) Histograms giving the number of MCs that fall into time-differential buckets, where the time difference now is t 1 =[t B *-t B (VI)].

Fig. 10 .
Fig. 10.Histograms giving the number of MCs that contributed to the estimate of a given t 1i =[t B * i -t B (VI)] (i=1, ..., 4), individually for the following: test #1 (A, DD test), test #2 (B, β P ), test #3 (C, Temp.), and test #4 (D, |B|) for the N (total)=81 MCs of Data Set #3, based on the 5 min averages.The subscripts in the t 1i -equation here mean that the t 1 's for every individual test's estimate are being shown, not just the average t 1 .

Fig. 11 .
Figure10shows histograms giving the number of the 81 MCs that contributed to the estimate of a given t 1i , (i=1, ..., 4) specifically for test #1 (Fig.10a), test #2 (Fig.10b), etc., for data Set #3.As we see, there were 77, 60, 74, and 56 tests, respectively, that passed, summing to 267 (or 82%) of a possible max of 324 (=4 tests×81 MCs).Clearly tests # 2 (Fig.10b, test on β P ) and #4 (Fig.10d, test on |B|) give the best results in that the distributions were relatively symmetric, centered near a t of 0.0, and they had fewer cases that occurred beyond | t 1 | of 45 min.However, the Ns for both of these are slightly lower than for tests #1 (Fig.10a) and #3 (Fig.10c), which are spread over a much greater range, especially into the sheath region.Clearly there were few cases of | t 1i | beyond 45 min for three of the tests; the T P -test (B) was an exception.It is evident that the T P -test is the poor-

Table 1 .
MC Front Boundary Times (t B (VI)) Chosen by Visual Inspection, by the Model Fitting routine, and by the Boundary Estimation Scheme (t B *) for WIND N =81 WIND cases.
a MM/DD/HH/MM refers to month (MM), day-of-month (DD), hour (HH), and minute (MM) for the visual inspection time.b DOY.fract.means day of year and fraction of day-of-year.c t B (VI) is the front boundary-time derived from visual inspection of the data in DOY.fract.d t B (M.Fit) means the front boundary-time used in the Model Fitting in DOY.fract.e t B * is the "refined" time, in DOY.fract, estimated by the front-boundary estimation program developed here.f t 1 is defined as [t B *-t B (VI)]; these values have a minimum uncertainty of ±2.5 Min but it is always somewhat larger depending on how many specific tests were passed for any given event and their spread of t B *-estimates.g t 2 is defined as [t B (M.Fit)-t B (VI)]; these values have a minimum uncertainty of ±1 Min but it is always considerably larger depending on various factors, especially on the kind of average used in the MC fitting, usually being one of 15 Min, 30 Min, or 1 h averages.
Table 1 three estimated front boundary times are given [t B (VI), t B *, and t B (M.Fit)], and the two difference-times given by Eqs.(2) and (3), for the full N =81 WIND MC cases, where each MC carries the same code number K (first col.) as was used in the Website listed above, as of 1 April 2008.The times t B (VI) in the Table1will be used in any comparison to the automatically determined boundary-time by our scheme for an actual MC, whether it be from data Set #1 or Set #3.(Notice that the t B (VI) time is given in two formats in Table1for convenience; see footnotes a, b, and c for the table.)The time t B (VI) usually differs (i.e., by t 2 ) from any front boundary times that we have given earlier for these 81 MCs, when MC parameter-fitting was considered.(This is the reason for showing the t 2 's in Table

Table 2 .
Criteria limit-values found through M-function optimization.