Responses to recent great earthquakes and ensuing tsunamis in Sumatra, Chile, and Japan, with the resulting loss of life and damage to infrastructure demonstrate that our ability to ascertain the full extent of slip of catastrophic earthquakes and their tsunamigenic potential in the first minutes after the initiation of rupture is problematic. Regional GPS networks such as those in western North America and Japan are complementary to seismic networks by being able to directly measure displacements close to the source during large earthquakes in real time. We report on rapid modeling of two large earthquakes, the 2003 Mw 8.3 Tokachi-oki earthquake 100 km offshore Hokkaido Island using 356 GEONET stations and the 2010 Mw 7.2 El Mayor-Cucapah earthquake in northern Baja California using 95 CRTN stations in southern California about 75 km northwest of the epicenter. Working in a simulated real-time mode, we invert for finite fault slip in a homogeneous elastic half-space using Green's functions obtained from Okada's formulation. We compare two approaches: the first starts with a catalog of pre-defined faults, while the second uses a rapid centroid moment tensor solution to provide an initial estimate of the ruptured fault plane. In either case, we are able to characterize both earthquakes in less than two minutes, reducing the time necessary to obtain finite fault slip and moment magnitude for medium and greater earthquakes compared to traditional methods by an order of magnitude.
 Modeling of the spatial extent and variability of fault slip following large earthquakes is a very common practice in geodesy and seismology as part of studies of earthquake physics and crustal rheology. Methods tend to focus on post processing after assembling all relevant observations followed by forward and/or inverse modeling to best fit the data and underlying physical assumptions. With regards to the current state of rapid magnitude determination and earthquake early warning [e.g., Gasparini et al., 2007; Astiz, 2009], only seismic data are utilized. However, experience with the great earthquakes and ensuing tsunamis of the last decade has shown that traditional seismic monitoring is lacking in its ability to rapidly estimate accurate earthquake magnitude and fault slip parameters in the near field because broadband seismometers clip and accelerometer data cannot be objectively integrated [Boore and Bommer, 2005].
 GPS networks have the advantage of capturing motions throughout the entire earthquake cycle whether or not these are accompanied by seismic shaking. Blewitt et al. postulated that if near-real-time connections to GPS data had existed during the 2004 Mw 9.2 Sumatra-Andaman earthquake, even with the low density network at the time, a proper seismic moment and tsunami warning could have been made within 15 minutes, potentially saving thousands of lives.Crowell et al. demonstrated that real-time GPS (RTGPS) could be used to detect the onset of large earthquakes, locate their hypocenters, and roughly model the event within a few minutes after the initial earthquake rupture. Contrast this with W phase inversion from the recent 2011 Mw 9.0 Tohoku-oki earthquake that took 20 minutes to obtain a reasonable magnitude estimate because of the reliance on teleseismic data [Duputel et al., 2011]. Melgar et al. showed that centroid moment tensors (CMT) can be computed using the static offsets in RTGPS time series, with similar accuracy to traditional CMT methodologies in a fraction of the time. CMT solutions computed using static offsets in the RTGPS time series are used later in this paper as one way to define the fault plane for finite-fault slip inversion. Furthermore,Bock et al. showed that RTGPS and accelerometer data can be combined in real time to estimate very high-rate broadband strong motion displacements with sufficient accuracy (mm-level) in all three components to be able to detect near-source P waves for Mw 6.0+ earthquakes. Advances such as these and others have motivated the expansion of RTGPS networks in seismically active zones; projects are underway in Cascadia and California within the Plate Boundary Observatory (PBO), the California Real-Time Network (CRTN), the Bay Area Regional Deformation Network (BARD), and the Pacific Northwest Geodetic Array (PANGA) [Hammond et al., 2010].
 Simulating a real-time environment with 1 Hz GPS data collected in real time, we invert for slip on a finite fault in a homogeneous elastic half-space [Okada, 1985] for two large events, the 2003 Mw 8.3 Tokachi-oki and the 2010 Mw 7.2 El Mayor-Cucapah earthquakes. We compare two approaches using the same physics and model setup in each. The first requires pre-defined fault planes obtainable from a fault catalog, which is useful in regions with well-defined faulting. The second approach requires no prior assumptions, but instead starts with fault planes inferred from a rapid CMT solution, as described byMelgar et al. . It has the advantage that no prior assumptions are required for the rupture geometry, making it useful in regions with complex faulting. Both approaches can be implemented in real time, and the infrastructure exists to fully employ them within western North America and Japan. We demonstrate that a complete finite fault slip model can be obtained in less than two minutes for both earthquakes.
 We focus our efforts on 1 Hz GPS data collected in real time during the 2003 Mw 8.3 Tokachi-oki and the 2010 Mw 7.2 El Mayor-Cucapah earthquakes. Both datasets were processed using the method of instantaneous positioning within subnetworks of stations that utilizes dual-frequency, double-differencing of the GPS phase information as well as estimating dual-frequency integer-cycle phase ambiguities on an epoch-by-epoch basis [Bock et al., 2000]. The subnetworks were then combined and referenced to a far-away, stable station through a network adjustment [Crowell et al., 2009]. For the 2003 Tokachi-oki earthquake, we used data from 356 stations within the GEONET network [Miyazaki et al., 1998], most located on Hokkaido Island. The reference station chosen is 0247 (36.8654°N, 138.1987°E), located 760 km southwest of the hypocenter, just north of Nagano on central Honshu Island. For the 2010 El Mayor-Cucapah earthquake, we utilized 95 stations within CRTN [Genrich and Bock, 2006], and station GNPS (34.3086°N, 114.1895°W) near Lake Havasu 250 km northeast of the hypocenter was chosen as the reference station mainly due to directivity, data completeness and stability considerations. Both reference stations have predicted coseismic displacements of a mm or less. It is of note that for both of these earthquakes, the GPS networks are not ideally located around the event. The Tokachi-oki earthquake occurred 100 km offshore and the El Mayor-Cucapah earthquake occurred in northern Baja California, Mexico, where no RTGPS stations exist currently, and about 75 km southeast of the closest RTGPS station in southern California.
 We investigate two different methods of rapidly inverting for earthquake slip using real-time GPS data collected in the near field of large earthquakes. One method utilizes pre-defined fault planes from a fault catalog while the second starts with the fault planes from a separate point source moment tensor inversion as an initial approximation. Otherwise, both methods are identical and obtain their Green's functions fromOkada to solve for slip on a finite fault in a homogeneous elastic half-space.
 The first approach is a simple finite-fault slip inversion using a pre-defined fault plane and a generalized regularization equation, which we refer to as the Inverse Method (IM). For the Tokachi-oki earthquake, we use the Slab1.0 [Hayes and Wald, 2009; Hayes et al., 2009] plate interface of the Kuril-Japan Trench around Hokkaido Island down to a depth of 200 km and subdivided into 30 along-strike and 20 along-dip segments. We constrain movement on the sides and bottom of the fault to zero to ensure a realistic slip distribution. For the El Mayor-Cucapah earthquake, we define a 200 km long vertical fault centered along the Laguna Salada fault that is 30 km deep.
 The inversion utilizes a first-order Tikhonov regularization which aims to reduce the first derivative in slip between adjoining segments such that
where G are the Green's functions from Okada , T is the smoothness matrix, Sis the slip on the fault patch (we solve for both strike-slip and dip-slip),W is the weighting matrix, λ is the smoothness constant, and uis the time-averaged GPS data. We generalize the smoothness constant and define it as
where nt is the number of rows (or nearest neighbors on the grid) in the smoothness matrix and m is a constant determined from thousands of synthetic iterations to be between 4 and 20. We choose a value of m = 4, which errs on the side of a smoother model. We also determined that m scales proportionally to the uncertainties; if the uncertainties are 10 times larger, m is 10 times larger. Equation (2)is important because it allows for variable smoothness as the station configuration and fault geometry changes, which is essential for real-time implementation.
 The weight matrix W is designed to weight the displacements by their standard deviations and inversely with respect to epicentral distance. We assume that the north and east components have a standard deviation of 1 while the vertical component is equal to 5, essentially to give less credence to the vertical component. Langbein and Bock reported that for 1-Hz real-time GPS data, the rms scatter of the vertical component is about 5 times larger than the horizontal components, so this is a reasonable assumption. Using larger errors leads to a smoother slip distribution with less deep slip. The distance weighting algorithm is similar in nature to the one used in time domain waveform moment tensor inversions [Dreger, 2003] except we weight by 1/r2 to conform more to the natural decay of permanent deformation [Aki and Richards, 2002].
 For data input, we employ a moving average of 50 seconds over each component of motion for every station minus a nominal starting position and set the three components of motion to zero if the horizontal motion at a station is less than 15 mm, which is about 3 times the expected one-sigma precision for single-epoch instantaneous GPS positions in the horizontal components [Langbein and Bock, 2004; Genrich and Bock, 2006]. This is important because a small spurious motion at a station far from the fault will lead to a large estimate of slip during the inversion. There is also a tradeoff between the amount of averaging, the accuracy of the final solution, and the time taken to obtain the final magnitude. Figure 1shows the tradeoff between different moving averages, the time taken to reach the final solution, the magnitude overrun, and the final root-mean-square (rms) of the data fit for both earthquakes. FromFigure 1, we determine that the optimal moving average is between 30 and 60 seconds. For this exercise, we chose a moving average time of 50 seconds to coincide with the rms minimum for the Tokachi-oki earthquake.
 In our second approach, we solve for fault slip with no a priori information on the fault geometry, a method we call the CMT Method (CM). We start by computing a CMT to find a point source model that solves for the hypocenter, strike, dip, rake and magnitude of the event using a moving average of the GPS displacements, as outlined by Melgar et al. . The only difference is that we used a shorter moving average window than the more conservative 120 s used by Melgar et al. . While we use the CMT solution computed from our GPS displacements, this is not necessary. We could just as easily implement the CM using a rapid CMT solution from other sources, for example from accelerometers, if it was available. All that is necessary is a reasonable estimate of source parameters from which fault planes are created.
 We create two fault planes (main and auxiliary) utilizing the strike, dip and hypocenter information; the one that minimizes the L2-norm of the model fit for each epoch is chosen. To create the fault planes, we use the scaling relationships fromDreger and Kaverina to determine the fault plane size based on the CMT solution. While the point source approximation for the CMT begins to fail in the near-field for large earthquakes, we only require a rough estimate of the fault zone geometry; our method then computes a more complex heterogeneous finite slip distribution. We find that the scaling ofDreger and Kaverina is sufficient for the along-strike dimension, but the along-dip dimension for the Tokachi-oki earthquake is inadequate due to the edges of the fault affecting the slip distribution. Because of this, we use 75% of the along-strike dimension for the along-dip dimension; however, a larger along-dip dimension is acceptable. For the El Mayor-Cucapah earthquake, we use the scaling fromDreger and Kaverina directly. The corresponding fault is then subdivided along-strike and along-dip to roughly match the fault patch sizes from the IM. The rest of the CM process is exactly the same as the IM, and the same data are utilized in both methods.
 To determine when the final stable solution is obtained for the two methods, we looked for the trailing horizontal variance of the station with the largest motion using the previous 50 seconds, computed every second. The trailing variance is independent of the results of the inversion, and it is a measure of when strong shaking has stopped at the closest stations. During the period of large ground shaking, the trailing variance will grow until it reaches a maximum value. After the intense shaking, the trailing variance slowly drops. When it drops down to 10% of the maximum value, we call the solution final. A similar empirical approach is used by Melgar et al.  to ascertain the final CMT solution.
 The final results for the two schemes, and the evolution of the rms of the residual and moment magnitude are shown in Figure 2 (as well as in Animations S1 and S2 in the auxiliary material). The peak trailing variance for station 0521 (42.9389°N, 143.1706°E) is reached in 83 seconds and is reduced by 90% at 116 seconds, at which point we call our solution final.
 The final moment magnitudes for the two scenarios are 8.23 for the IM and 8.28 for the CM, and both methods exceed Mw 8.0 at ∼40 s from the earthquake onset. The maximum slip obtained is 4.0 m and 2.2 m for the IM, and CM scenarios respectively. The distribution of slip tends to be more diffuse and smaller in magnitude than in previous studies [Yamanaka and Kikuchi, 2003; Yagi, 2004; Crowell et al., 2009]. However, our results agree with the areas of maximum slip, have similar average rake vectors (103° for IM and 88° for CM), and the slip extent is on the same order of magnitude as previous studies (∼100 km by 100 km). The GPS-derived CMT (gpsCMT) and the Global CMT (GCMT) are located very near to each other, indicating that the centroid of slip is well located within both methods. There are some issues with the CM method, mainly due to using a fault plane with a single dip angle. This has a tendency to allow greater slip at shallow depths and also results in a much larger slip patch than the IM. Also of note is the fact that we use a generalized regularization equation instead of finding the ideal regularization for each inversion. Our regularization tends to err on the side of more smoothness to prevent an overestimate of magnitude. This will cause the slip distribution to become more diffuse and have a lower maximum slip.
5. The 2010 El Mayor-Cucapah Earthquake
 The Mw 7.2 El Mayor-Cucapah occurred on 4 April 2010 at 22:40:42 UTC, starting as a distinct normal faulting event and then bilaterally rupturing a series of northwest trending faults, most notably the Borrego and Pescadores faults [Hauksson et al., 2011; Wei et al., 2011]. Slip is thought to be shallow (less than 10 km), very localized with discrete slip patches, and reaching up to 6 m [Wei et al., 2011]. The tectonic setting consist of a series of right-lateral and normal faults that accommodate the transition from the spreading centers within the Gulf of California to the transform boundary of the San Andreas fault system. Because of the nature of faulting in the area, selection of the appropriate fault plane is difficult, but not impossible, and may not be critical to the final solution.
 As explained in the methodology section, for the IM, we used a generalized representation of the Laguna Salada fault, a fault which is parallel to the Borrego and Pescadores faults, but did not experience any slip during the earthquake [Wei et al., 2011]. The Borrego and Pescadores faults were thought not to be active, so assuming the slip occurred on the Laguna Salada fault is more indicative of the IM method in real time given our knowledge at the time of the earthquake. The slip results for both methods and the evolution of moment magnitude and rms are shown in Figure 3 (also Animations S3 and S4). The peak trailing variance for station P494 (32.7597°N, 115.7321°W) is reduced by 90% in 113 seconds at which point our result is final.
 The final moment magnitudes for the two scenarios are 7.16 for the IM and 7.22 for the CM. The maximum slip obtained is 1.4 m and 2.0 m for the IM and CM scenarios, respectively, which are considerably smaller than from Wei et al. . It should be noted that our solutions are very smoothed out over most of the fault, although our slip distributions are confined to the upper 10 km of fault and located near the GCMT epicenter location. Also, all of our stations are located north of the United States-Mexico border whereas theWei et al.  result uses SAR and SPOT imagery directly over the fault to constrain the fault slip at the surface. Some notable differences between the IM and CM come from the different fault planes. There is more deep slip in the CM, mainly due to the westward shifting of the fault compared to the fault used in the IM (note location of gpsCMT versus GCMT on Figure 3). Also, the magnitude of slip in the CM is greater than the IM because the along-strike dimension of the CM is 70 km shorter than the IM, which amplifies the magnitude of slip. The higher rms of the CM versus the IM indicates that the fault dimensions and strike for the CM is slightly less preferred than the IM, although both rms values are fairly low considering the magnitude of the GPS vectors (∼8 mm over 95 stations). However, asFigure 3indicates, the gpsCMT is better at locating the centroid of slip compared to the Global CMT, making the CM solution more centered along the fault. The rake angles for the two methods are 163° and 173° for the IM and CM respectively, consistent with a mostly right-lateral earthquake with some reverse faulting.
 Both methodologies are able to rapidly model both earthquakes in under two minutes while keeping the solution stable and accurate. There are some concerns that need to be accounted for before full implementation can be achieved. The most serious concern for the IM is the determination of a good approximation of the correct fault plane. This is not a trivial problem in that this requires a system with pre-defined scenarios based on the environment the GPS network encompasses. In areas of complex faulting, there must be an inherent error that the user is willing to accept if the earthquake is located between two major faults or includes motion that is not common to that region. In megathrust environments, this is much less of a concern, although large events in the overriding plate and the outer-rise can occur. This may be a more significant problem from a tsunami or landslide warning perspective than a rapid earthquake response perspective. Moreover, determining the proper fault dimensions for the CM in the along-dip direction needs to be investigated further since for megathrust earthquakes the spatial extent of slip along-dip will be significant and the point source assumption may be significantly violated. We have in fact observed that the point source CMT solution fromMelgar et al. is problematic for the very large near-field displacements experienced during the 2011 Mw 9.0 Tohoku-oki earthquake. This is being addressed by further refinement of the CMT algorithm to account for finite extent sources.
 Computation time is not an issue for both approaches, running a single epoch in ∼1 s on a single core PC workstation in MATLAB. Data transmission and processing latencies are currently on the order of ∼1 s for CRTN, so a reasonable operational latency when these methods are integrated is ∼2–5 s. Furthermore, computation of the CMT as in Melgar et al. (2012) is as fast as the inversion for slip described in this paper so the fact that the CM method requires two steps adds very little delay, compared to the IM method.
 Using a moving average on the GPS time series is a good method for removing any dynamic signal, but does delay the final solution. As the catalog of large earthquakes observed with near-field GPS networks grows, we can refine scaling relationships between the peak ground displacements and final coseismic displacements to ascertain the final displacements very rapidly.Crowell et al. demonstrated that the peak ground displacement for the Tokachi-oki earthquake was attained 10 to 15 seconds after the first arrival at coastal stations. We can improve on this further by using the combined accelerometer/GPS data [Bock et al., 2011] to look at traditional earthquake early warning parameters, although this requires many more seismic/GPS collocations than currently exist. A higher level product would be to use the full waveform for a kinematic inversion and thus obtain the source-time function of the earthquake. Using these other methods, we would only be limited by the network geometry around an event and the rupture times. Furthermore, the sensitivity of RTGPS is such that the minimum earthquake size that can be reasonably estimated is Mw ∼6, although with gains in precision made through the combination of accelerometer and GPS data [Bock et al., 2011], this limit will surely be decreased.
 The ability to rapidly characterize an earthquake using near-source observations represents a powerful contribution to tsunami warning for those living in nearby coastal regions. Considering that for the Tokachi-oki earthquake we are able to compute a final stable solution within two minutes, a simple forward tsunami propagation model could have been computed to determine wave amplitudes in the near-field well before the first arrival, using available detailed bathymetry. From a hazards perspective, it is extremely important to differentiate between small and large tsunamis to aid in evacuation efforts and curb complacency within the general public.
 Near-source real-time GPS measurements fill an important gap for early earthquake detection, characterization, and rapid response for medium and greater earthquakes where significant fault rupture occurs and tsunamigenic potential exists. The Inverse Method performs better for the Tokachi-oki earthquake due to the varying dip angles with depth; however, the CMT Method performs well for both earthquakes and has the added benefit of requiring noa priori information on fault geometry, making it the preferred method in complex tectonic environments such as southern California. We obtained reasonable models for both earthquakes in terms of slip, magnitude, and rake estimates in about 2 minutes using both methods, an order of magnitude improvement compared to existing seismic methods for monitoring large earthquakes in the near field, thereby allowing for more effective earthquake response and tsunami warning
 We would like to thank John Langbein and an anonymous reviewer for detailed and constructive criticisms. Melinda Squibb and Anne Sullivan handled the CRTN data at SOPAC. We thank Japan's GSI for GEONET GPS data used in the study of the 2003 Tokachi-oki earthquake. Raw GPS data for the 2010 El-Mayor earthquake were provided by the Southern California Integrated GPS Network, operated by USGS and SOPAC, and its sponsors, the W. M. Keck Foundation, NASA, NSF, USGS, and SCEC, and the Plate Boundary Observatory operated by UNAVCO for EarthScope (http://www.earthscope.org) and supported by NSF grant EAR-0323309. This paper was funded by NASA AIST-08 grant NNX09AI67G.
 The Editor thanks John Langbein and an anonymous reviewer for assisting in the evaluation of this paper.