Finding reconnection lines and flux rope axes via local coordinates in global ion-kinetic magnetospheric simulations

. Magnetic reconnection is a crucially important process for energy conversion in plasma physics, the substorm cycle of Earth’s magnetosphere and solar flares being prime examples. While 2D models have been widely applied to study reconnection, investigating reconnection in 3D is still in many aspects an open problem. Finding sites of magnetic reconnection in a 3D setting is not a trivial task, with several approaches from topological skeletons to Lorentz transformations proposed to tackle the issue. This work presents a complementary method by noting that the magnetic field structures near reconnection 5 lines exhibit two-dimensional features that can be identified in a suitably chosen local coordinate system. We present applications of this method to a hybrid-Vlasov Vlasiator simulation of the Earth’s magnetosphere, showing the complex magnetic topologies created by reconnection. We also overview the dimensionalities of magnetic field structures in the simulation to support the use of such coordinate systems.


Introduction
A long-standing issue in analysing data from magnetospheric simulations has been the identification of topological features in the magnetic field, especially in relation to reconnection and flux transfer events.These features include magnetic neutral lines, separators and, loosely, X-and O-lines.In a two-dimensional configuration, the problem is tractable via the use of a flux function (see Sonnerup (1970) for an early example, with details given in, e.g., Servidio et al. (2009)).Recent examples of flux function use include Hoilijoki et al. (2017); Palmroth et al. (2017); Hoilijoki et al. (2019).A generalized flux function can be defined in certain three-dimensional configurations (Yeates and Hornig, 2011).Global ideal magnetohydrodynamic (MHD) simulations present a relatively simple reconnection topology that is tractable via the four-field junction (FFJ) method that identifies reconnection topologies from global magnetic field connectivity (whether or not field lines connect to the Earth or to the solar wind) (Laitinen et al., 2006).However, more detailed simulations, such as Vlasiator ion-kinetic simulations, produce complex reconnection topologies impossible for FFJ to parse completely (see Pfau-Kempf et al., 2020).As such, the space physics community is challenged to find and develop new tools for analyzing these topologies.
Reviewing the definitions of the topological structures of reconnecting 3D magnetic fields by Parnell et al. (2010), we can summarize three different, but related concepts: Magnetic null points (with several subtypes), where the magnetic field B completely vanishes; separatrices (also called separator surfaces or separatrix surfaces), planes that delimit different magnetic domains, and separators, lines connecting magnetic null points and defined as intersections of paired separatrix surfaces, laying at the boundary of four different magnetic domains.The behaviour of magnetic null points has been studied in much detail, in 3D as well (e.g.Greene, 1988), for their usefulness in reconnection analysis.Detection and classification of null points can be done readily with existing methods: Olshevsky et al. (2015Olshevsky et al. ( , 2016) ) use the Poincaré index method to detect and characterize null points (where B(r) = 0) in local MHD and particle-in-cell (PIC) simulations, which can be applied to spacecraft data as well.Haynes and Parnell (2007) detail methods of finding null points within a cubic cell, using a tri-linear method to find common zero-crossings for all magnetic field components.Fu et al. (2015) introduced the first-order Taylor expansion (FOTE) method for reconstructing the magnetic field topology around nulls and finding null points from multi-point spacecraft data.
As e.g.Lau and Finn (1990) note, the magnetic field lines connecting specific null point pairs-separators-are important for reconnection.For example, Dorelli and Bhattacharjee (2009) discuss topological changes in dayside separators during flux transfer event (FTE) formation in MHD simulations.Several methods for finding separator lines have been developed.For example, Komar et al. (2013) trace related separators by stepping from magnetic null points and inspecting magnetic connectivity of candidate points, akin to the FFJ method used by Laitinen et al. (2006).This is used by Eggington et al. (2022) to find the main magnetospheric separator through tracing magnetic connectivity, noting that they found it complicated to find the initial magnetic nulls for tracing.On the other hand, Olshevsky et al. (2016) show a plethora of null points found in a magnetospheric simulation, representing a challenge for mapping the pairwise connections of null points.Glocer et al. (2016) track magnetic separators in MHD simulations and compare different techniques for it, while Haynes and Parnell (2010) introduced generalized methods for constructing the topological skeletons of magnetic fields.This includes null points, separatrices and the separator lines, not tied to specific coordinate systems, with involved field-line tracing procedures.Recently, also Bujack et al. (2021) introduced similar tools.Such tools are likewise being explored in Vlasiator 3D magnetospheric simulations by Bouri et al. (2023), to apply machine learning methods to the topic.Machine learning methods have also seen use in analysis of plasma simulations by e.g.Bussov and Nättilä (2021).
Closely related to the concept of separators are the magnetic X and O lines.As the intersections of separatrix surfaces, the separators delimit different magnetic domains.In the classic picture of reconnection, inspecting the magnetic field lines on a plane normal to the tangent of the reconnection line displays an X-topology, with the in-plane components of B changing signs at the X-line (or an X-point, when constrained to such a plane).This holds regardless of an out-of-plane B component as noted by Parker (1957); Sonnerup (1974): the hyperbolic structure remains visible in the in-plane components.Likewise, the in-plane magnetic field components change signs at an O-line (or O-point).This can be used to extend the definition from a true null line, defined as a continuous line with exactly zero B, which is structurally unstable (Priest and Titov, 1996) and is expected to split into null points connected by a separator.As this definition of a null line is not consequently fulfilled in practice, and as we would like to identify null lines whether or not a magnetic guide field is present, we use the term "in-plane" null line (and more specifically, "in-plane" Xand O-lines) in this paper to mean such sets of points that satisfy the zero-crossing condition for the in-plane magnetic field components, allowing for a common category of null lines that covers both X and O lines, with and without guide field.It should be noted, however, that the notion of an in-plane null depends on the definition of the plane, and it is not clear what plane should be chosen for this decomposition.This work proposes one possible selection of a useful coordinate system via variance analysis for this purpose.Other selections of a coordinate system are possible, as shown by e.g., Genestreti et al. (2018).
For magnetic field structures such as e.g.current sheets (CSs), null lines, and flux ropes, it is useful to select a suitable coordinate system that can exploit the properties of the structure to simplify the problem at hand.Methods such as Minimum Variance Analysis (MVA, Sonnerup and Scheible (1998)) are widely used in spacecraft observational studies to investigate structures in amenable coordinate systems (Paschmann and Daly, 1998).Observational methods for construction of local coordinate systems may require some situational adjustments as in Gosling and Phan (2013) and Hietala et al. (2018) with a hybrid MVA coordinate system.Indeed, Genestreti et al. (2018) examine 14 different variations of generating local coordinate systems for a reconnection event observed by MMS.The magnetic field structures that are more frequently investigated (such as CSs and flux ropes) often display more variability in some dimensions than in others, allowing for some simplifications based on the dimensionality of the structures.Methods for inspecting the dimensionality and for forming local coordinate systems are reviewed by Shi et al. (2019).Particularly, the Minimum Directional Derivative (MDD) and Minimum Gradient Analysis (MGA) methods may be used to define local coordinate systems based on the Jacobian of magnetic field B, which we will build upon in this work.These are detailed in Sect.1.1.
Global magnetospheric simulations use global coordinate systems such as Geocentric solar ecliptic (GSE) or Geocentric solar magnetospheric (GSM), similarly to spacecraft observations.However, local magnetic structures are not necessarily aligned with the axis of the simulation coordinate system.In particular CSs, flux ropes and reconnection topologies can develop unconstrained by the domain boundaries and can be oriented in virtually any direction.In this situation, methods developed to analyse spacecraft data can inspire new ways to investigate data from global simulations.Palmroth et al. (2023) used justified assumptions about the geometry of the problem to obtain useful proxies from global coordinate systems, and the aim of this paper is to generalize the approach to a local coordinate system.
To review our region of interest, Figure 1 shows a sketch of the Earth's magnetosphere, based on the Vlasiator simulation described by Palmroth et al. (2023).Solar wind flows in from the right, carrying with itself the interplanetary magnetic field (IMF), which is aligned purely southward in this simulation.As the solar wind encounters the Earth's magnetic field, a bow shock (gray) and a heated magnetosheath (light brown) are formed (both are shown clipped along the meridional plane).
The magnetopause (purple, clipped along the equatorial plane) delimits the magnetosphere proper-the volume in which Earth's magnetic field dominates the plasma behaviour.The solar wind driving draws the magnetosphere into a long tail, with northern and southern tail lobes having opposite magnetic fields and the tail current sheet (CS, light blue) separating the lobes.
Southward IMF driving is especially interesting, as it allows for magnetic reconnection on the dayside magnetopause, where the opposing magnetic fields form X-topologies (dark red lines with crosses) and allow for the transfer of energy and mass across the magnetopause and a change in global magnetic topology.The global reconnection line described by Laitinen et al. (2006) is correspondingly shown as the closed, dark red line marked as FFJ.The reconnected magnetic field lines form into flux transfer events (FTEs, or plasmoids) characterized by O-topologies (blue lines with disks).Similarly, the opposing magnetic fields of the tail lobes may reconnect at the tail CS, forming plasmoids in the tail current sheet.Palmroth (2023) shows complex reconnection topologies forming in the tail, represented by the ellipsis-terminated red and blue lines in the tail of Figure 1, with similar sketches of multiple reconnection lines and flux transfer events given on the dayside magnetopause.
In this paper we introduce and discuss alternative, physically-motivated local methods for finding X-and O-lines in the magnetic field of global 3D magnetospheric simulations, by inspecting the magnetic field in a suitable local coordinate basis.
To extend the global proxies used in Palmroth et al. (2023) we introduce a local coordinate system based on the work reviewed by Shi et al. (2019), with an approach similar to the one presented by Denton et al. (2010), and describe both contouring and cell-wise FOTE methods for finding null lines, both X and O, within a global magnetospheric plasma simulation, from the magnetic field and its Jacobian matrix.

Local coordinate systems and dimensionality
Let us consider two methods reviewed by Shi et al. (2019): Minimum Directional Derivative (MDD) and Minimum Gradient Analysis (MGA; analogous to Minimum Variance Analysis), both defined using the Jacobian ↔ G= ∇B of the magnetic field.
Local, orthogonal coordinate directions can be obtained from the eigenbases of . However, as these methods obtain the initial directions as eigenvectors that are defined up to a real scalar, the directions (after normalization) are defined up to a factor of ±1.
MGA produces a set of basis vectors where the eigenvector corresponding to the largest eigenvalue (λ 1 ) is aligned with the vector that has maximal variation ( LMGA ), the second one (λ 2 ) corresponding to the intermediate ( MMGA ) and third (λ 3 ) the least variation ( NMGA ).On the other hand, the MDD method produces a set of basis vectors where the eigenvector corresponding to the largest eigenvalue shows the direction of the displacement which produces the largest variation in B ( LMDD ).Correspondingly, for the eigenvectors corresponding to the intermediate and least eigenvalues we use MMDD and NMDD .Denton et al. (2010) employ the MDD eigenbasis in their method, while we use both MDD and MGA eigenvectors as described later in Sect.2.1.
Both of these eigensystems have the same eigenvalues, but the eigenvectors differ and are not necessarily aligned with each other.We note here that for a one-dimensional structure, both of these eigensystems have only one well-defined eigenvector.
For example, in a 1D Harris (1962)-type CS defined by for some constant B 0 , the eigensystems are shown in Figure 2, with LMGA aligned with x and LMDD aligned with ẑ.
MDD also gives a way to define the local dimensionality of a structure (Rezeau et al., 2018)   (as the square roots of the eigenvalues then have the units of T m −1 ): These quantities are defined to lie in the range [0,1] and their sum is one.For D 1 ≈ 1, the magnetic field structure is primarily one-dimensional, such as a CS with B ≈ B(z) for a direction z normal to the CS.Correspondingly, for D 2 ≈ 1, the structure is primarily a function of two coordinates, etc.These measures allow us to quantify whether or not the locally 2D treatment for neutral lines is well-founded, and we return to the topic of dimensionality in Sect.4.3.

Vlasiator
In this study, the methods discussed above will be applied to a global simulation of the Earth's magnetosphere performed with the hybrid-Vlasov code Vlasiator.Vlasiator is a supercomputer-scale 6D (3D+3V; three spatial dimensions and three velocityspace dimensions) ion-hybrid plasma simulation (von Alfthan et al., 2014;Palmroth et al., 2018), solving the Vlasov equation for ion components and treating electrons as a charge-neutralizing, massless fluid.Previously, Vlasiator has been used to study reconnection in 5D (2D+3V) simulations for the global magnetosphere (e.g.Hoilijoki et al., 2017;Palmroth et al., 2017), and locally on the magnetopause in full 6D (Pfau-Kempf et al., 2020).Recently, computational advances (Ganse et al., 2023) have expanded the capabilities of the model to include fully 6D global simulations (Palmroth et al., 2023;Horaites et al., 2023;Grandin et al., 2023).
We use the global Vlasiator simulation described by Palmroth et al. (2023) as a prototype case for the discussed methods.
The simulation is of the Earth's global magnetosphere, with an approximate conducting sphere inner boundary condition that does not include ionospheric coupling.The simulation uses the GSE coordinate system (centered at the Earth, with the X-axis pointing towards the Sun, the Z-axis is normal to the ecliptic in the northward direction) and no dipole tilt, so the dipole moment is aligned with the Z-axis.The simulation is set up with a predefined mesh refinement with 1000 km maximum spatial resolution in the tail CS and on the dayside magnetopause, with the simulation domain spanning [−111, 50] R E in the X direction and −58, 58] R E in Y and Z, with driving provided by the fast (U sw = 750 km s −1 ) solar wind at the temperature of T sw = 500 kK and density of n sw = 1 cm −3 at the inflow boundary, and a purely southward magnetic field B IMF = (0, 0, −5) nT.Other boundaries employ copy conditions.The initial condition for the simulation comprises of the velocity distribution functions initialized to Maxwellian distributions with moments at the inner boundary set at a density of 1 cm −3 and a temperature of 5 × 10 5 K and zero velocity, that are smoothly tapered to solar wind values until the geocentric distance of 15.7 R E (Horaites et al., 2023).
Despite the solar wind and IMF being constant, the kinetic physics involved in the simulation still produces a remarkably dynamic environment.Palmroth et al. (2023) described the dynamics of tail reconnection in the Vlasiator run, showing the interplay of plasma instabilities and reconnection on the tail CS.Notably, they presented a complex picture of small, independent plasmoids being generated in a bursty fashion, followed by a tail-wide reconfiguration through the merging of smaller plasmoids and their reconnection lines.Notably, the simulation setup is an idealized case, and with more realistic solar wind and IMF inputs including a flow-aligned IMF component, dipole tilt, and magnetosphere-ionosphere coupling, we expect to see even more complex behaviour, including e.g.tilted CSs (see, e.g., Shen et al., 2008).
2 Methods: applying the local coordinate systems to Vlasiator

Local LMN coordinates
If the eigenvalues are not well-separated, the directions obtained from MGA and MDD may be ambiguous (see Shi et al., 2019).
For example, for the CS with dimensionality 1, MGA obtains the field-aligned direction (above and below the CS), while MDD obtains the normal direction to the CS, with two other directions potentially ambiguous.The directions obtained from MGA and MDD are, however, approximately orthogonal at the CS.Since we are especially interested in CS-like structures, we choose to use the unit vectors LMGA and LMDD (described in section 1.1) as the basis on which to build our coordinate system.
The electric current density J ∝ ∇ × B can be used to define a right-handed coordinate system, by selecting LMGA as a primary vector L, LMDD as secondary vector, and J as tertiary vector, so that L × J ∥ LMDD .For example, on an idealized CS (Equation 1), we see that L ∥ x, N ∥ ẑ, and J ∥ L × N .L and LMDD are exactly orthogonal in this case, as in Figure 2.
To summarize the definition of our local LMN coordinate system L, M, N , we orthogonalize the set of basis vectors with the following: resulting in a right-handed coordinate system with M oriented in the same direction as J (but not necessarily parallel).This still only requires data from ↔ G, and allows classifying a null line to X and O in this LN plane via inspection of ∂B N /∂L (see Figure 3).
The sign of L and N in the global coordinates remains unfixed: multiplying both L and N by −1 does not affect the generality of the system.For now, this is left to be defined depending on the specific application.when approaching the polar regions along the magnetic field.This shows that care must be taken when considering these LMN coordinates especially in the lobes and inner magnetosphere.The transition between the CS and the lobes especially displays complex structure.
While the above local coordinate system is defined where there is some variation in B, such that | LMGA • LMDD | < 1 and a non-zero electric current density J , our interest lies in reconnection-supporting CS structures, which naturally fulfill these conditions.The local coordinate system, as given above, allows us to define an LMN system at each spatial cell of the simulation, analogous to the definition at each time in a time series for spacecraft observations.Finding B L = 0 surfaces shows the centres 200 of symmetric CSs where the locally most-varying component of B changes its sign.While such a definition for a center for a general current sheet is not strictly correct, it is sufficient for our purposes.These we deem the most interesting on the basis of supporting reconnection.With contouring algorithms, regions of consistent orientation of the LMN system need to be the N vector tracks the CS normal and the M vector is in-plane and pointing in the general direction of the current.

Null lines
In Palmroth et al. (2023), the CS center proxy B r = 0 serves as a basis for finding null lines on the sheet via the additional constraint of B z = 0.An example of these proxies and the flapping of the CS is shown in Figure 6a.The sign of B z serves as a proxy for field topology (given as sheet color).We note that strong flapping of the CS causes the CS normal component to deviate strongly from the Z direction at points.Using the LMN basis allows us to take into consideration the local behaviour of the CS, improving upon the proxy model.
Finding the surfaces with B L = 0 and further intersecting those with the surfaces of B N = 0 yields a set of connected lines, as shown in Figure 6b.For example, the contouring operator used by VisIt (Childs et al., 2012) finds these lines with topological connectivity.The left-hand side panel of Figure 6 shows an example of the B r = B z = 0 contouring missing a plasmoid at a prominent CS flap, whereas the LMN method correctly finds the axis of the plasmoid.We note that the overall structure of the tail X and O lines is still well-described by the previous method outside of the region with large-amplitude flapping.
Above, and in general, we assume the existence of the normal component B N for the detection of in-plane nulls.The potential degenerate case with B N = 0 over the entire CS (a tangential discontinuity) is hardly encountered in practice.To use the LMN coordinate system and the components of magnetic field B L , B M , B N for contouring requires the LMN coordinate systems to be consistently oriented: if the ambiguity in the sign of L and N coordinates happens to flip between neighbouring cells, the B L , B N components will naturally change signs as well, as illustrated in Figure 7.This is a source of false detections, which can be fixed by re-orienting neighbouring coordinate systems.In the magnetotail, for example, the choice we make is to choose L to point sunward, so that if the constructed LMN system has initially L tailwards, we multiply the L and N vectors by -1 at these cells.Automatic determination of consistently-oriented neighborhood charts could be considered in a future update.However, it may not be possible to provide a consistent orientation for the LMN coordinates in an entire domain, such as a global magnetospheric simulation.As long as there is a consistent orientation, the simple contouring operation works for current-sheet like structures and produces topologically connected neutral lines.
When there is no consistent orientation available, naïve contouring does not work in an off-the-shelf manner.For example, in the case of the upstream solar wind, where Vlasiator shows very little variation in IMF, the LMN coordinate system is dominated by numerical precision artefacts, leading to inconsistent orientation showing up as noise in these contouring methods.

Cell-wise FOTE method
An alternative that does not require choices on orientation is to use the local data of B and ↔ G to construct first the local coordinate system and secondly a linear expansion of the components B L , B N at the cell center.This sidesteps the ambiguity in the sign of the LN directions.Solving for the planes of B L = 0, B N = 0 and their intersection is then straightforward in this linear approximation: B L + ∇B L • r = 0 is solved via an exact, single-step gradient descent along the negative gradient: where ê∇B L is the unit vector in the direction of the gradient.This defines the plane B L = 0 with the normal direction ê∇B L and a point r relative to the cell center.Similarly, we find B N = 0, and the intersection line of these two planes.
The line where B L = 0 = B N would then again signify a null line, but the linear approximation can only be considered good within a small neighborhood, that is, in the cell.It is then also straightforward to check whether or not this line intersects with the cell being analysed in the simulation coordinate system-if yes, we can consider the cell to contain a neutral line.We minimize a signed distance function (SDF; see, e.g. , Keinert et al. (2013)) to the cell along the line, given by the definitions adapted from Korndörfer et al. (2015): where op e denotes a component-wise operator op returning a vector of the same dimensionality, r is the query point and b is the upper corner of a rectangular cuboid centered at the origin and aligned with the coordinate system basis, and f box is the SDF of the query point with respect to the cuboid.The SDF describes the distance of a point to the surface of an object, with positive values indicating the point lies outside the object, and negative values inside.Therefore, a SDF gives a continuous measure on the distance of the line with the cell, with negative values indicating the neutral line intersecting the cell, and positive values indicating no intersection.This allows some evaluation and acceptance of near misses.A discriminating value of SDF ≈ 0.25...0.36 is found to produce uninterrupted null lines in the tail, as expected based on field topology.Figure 8a shows examples of the FOTE method in use on Vlasiator data.
Further, we may evaluate the derivative ∂ L B N at the cell, and again classify the possible neutral line with it.Eigenvalues of ↔ G might as well be used for this purpose, as for degenerate nulls in Parnell et al. (1996), but we opt to use a straight derivative for a clear physical meaning.The main disadvantage for now is that this method does not provide a ready-made topology, only sets of cells that are considered to contain a segment of an X/O line.

Validation with an ideal case
We take the southward-IMF initial configurations of Hu et al. (2009); Komar et al. (2013) for a test case that has null lines, and who also provide analytical solutions for the magnetosphere using the methods by Yeh (1976).For the magnetic field configuration we use as the constant IMF background magnetic field B IMF = 0, 32.5e, −56.3 nT for a field strength of 65 nT at a 150 • clock angle and an unscaled terrestrial dipole aligned with the Z axis.The domain size is (±2 × 10 5 km) 3 and the maximum spatial resolution is 3125 km.The current-free initial condition is not suitable to apply our method to, since we use the current density vector to define the handedness of our coordinate basis.However, we choose to propagate the initial condition for a small time for the global plasma dynamics (7.048 ms).The background plasma is initialized at a density of  1 cm −3 as a radial taper of temperature and velocity from the inner boundary values of 5 MK and zero velocity to the solar wind values of 0.5 MK and 750 km s −1 to break the exact current-free condition.This enables the use of our methods to extract the X line in the case with IMF clock angle θ = 150 • (mostly southward IMF).To guard against current-free edge cases, we can use, as a fall-back case, the MGA maximum and medium variance coordinates for L and N directions instead.
Figure 8a) shows a comparison between the FOTE method and the analytical solution.The cells detected by the FOTE method enclose the analytical separator nearly everywhere, but they show, in addition, few extra null line segments further away.Figures 8b) and c) show details of the X-line detection by plotting L−N cross-sections of the in-plane nulls.The origins of these cross-sections are placed in the cells with FOTE-detected in-plane nulls, with the cross-sections taken at M = 0.The LMN basis is the local basis from the detection cell, extrapolated to the immediate neighborhood.The slices show projections of the magnetic field lines in the LN plane and zero-crossing lines for B N and B L .The cross-sections confirm these cells do contain in-plane null lines as per our definition, but which are not described by the analytical solution for the separator.Figure 8 shows that these are indeed valid detections with an X-topology.Notably, these detections are not present when inspecting the initial state with MGA-only coordinate system, and are likely a result of the initial velocity and temperature gradients causing minor perturbations.
Figure 9 shows a comparison between the contouring method and the analytical solution.Here, the LMN coordinate system has been regularized so that the L direction is chosen to fulfill L • ẑ > 0. For this particular case, the LMN-contouring of the superposition field produces prominent conical artefacts (not shown) where the coordinate system is not oriented consistently with this particular choice, and the data to be contoured is filtered to lie within 1 cell of a FOTE null line as a way to choose compact neighborhoods of regularized orientation.Less stringent filtering can be used for other, more local cases (see e.g. , Sect.4.1).Good agreement with the analytical solution is also seen in this case.examples (noting that these coincide with the flap seen in Figure 6a), and for these locations the local LN plane magnetic field is plotted below in the corresponding panels (c) and (d), showing that these null lines indeed are correctly found and classified.
To validate the observed null lines with both methods in the case of the tail CS, Figure 10b shows both contouring and FOTE detections at work; with the contoured in-plane null lines shown as black curves, and the FOTE-detected null-line containing cells as wireframes, colored with ∂ L B N .The methods agree well, even if the FOTE method may have some stray detections.
These strays are found to be a minor issue, showing up on the current sheet as isolated cells flagged as containing null lines, while the true detections form coherent structures.
We may note that the local coordinate systems spanned by our LMN basis describe well the in-plane X and O lines in the simulation.However, this leads to the observation that the X and O line axes might not be aligned with the M direction, as also observed by Pathak et al. (2022) with MMS data.Figure 10 demonstrates this in the Vlasiator tail CS, with X and O lines necessarily breaking their alignment from the M direction when forming into loops, for example at The effect of this mis-alignment on reconnection in Vlasiator simulations is an ongoing subject of study.

Null lines in global Vlasiator 6D magnetosphere
To extend our analysis to the global Vlasiator magnetosphere, we use the generic FOTE method that is not limited by construction of consistently oriented neighborhoods.The FOTE method reveals a sinuous and alternating neutral line structure on the magnetopause flanks, shown in Figure 11.The O-lines are marked with blue cells signifying dayside FTEs extending onto the Regions with small values of |∂ L B N | (grey) should be inspected for their validity, in general, as these signify low variability in the magnetic field.These regions may be susceptible to local, insignificant perturbations fulfilling the FOTE criterion.The 315 alternating pattern on the magnetopause at X < 20 still suggests that these are indeed real magnetic structures, with alternating positive and negative B N regions.We note, however, that the behaviour of the magnetopause on the flank in the present simulation is not yet studied in detail, and the shown time state (1267 s) may still contain initialization artefacts deep in the tail.

Dimensionality of magnetic structures in Vlasiator
The applicability of the LMN coordinate system should be inspected in terms of dimensionality of the magnetic structures, to ensure that the structures inspected are locally quasi-2D.Figure 12 shows an overview of the dimensionality measures D 1 , D 2 , and D 3 (Equations 2-4, described in Sect.1.1) applied to a Vlasiator 6D simulation.Red color corresponds to regions dominated by one-dimensional variation (sheet-like structures), green to two-dimensional structures (e.g.plasmoids and flux ropes), and blue to three-dimensional structures.The upstream appears noisy as the magnetic field is nearly constant.The regions of interest for reconnection are naturally found in CSs, that is, mostly one-dimensional structures with some embedded 325 2D features.These can be used to constrain the local basis analysis to compatible regions.An interesting finding in the dimensionality parameters in the 6D Vlasiator run can be observed in the lack of dominantly three-dimensional structures, as shown in Figure 13.Magnetic structures exhibiting D 3 dominance appear to be limited: the occurrence of cells is increasingly rare as D 3 → 1.The prominent collection of cells having D 3 = D 1 is found to be dominated by cells in the lobe regions of the magnetosphere.Whether or not these features are related to the divergence-free condition ∇ • B, intrinsic properties of magnetic field being convected by plasma, the boundary conditions, or other constraints remains to be studied.

Discussion and conclusions
Here, we have presented two local methods to acquire X and O topologies of magnetic field from plasma simulations of Earth's magnetosphere, enabling fast and efficient identification of possible reconnection sites and flux transfer events.The algorithms work on O(N ) complexity, i.e., operating once per grid cell (and possibly using a contouring algorithm of similar complexity), without requiring field line or separator tracing such as used by e.g.Haynes and Parnell (2010).These methods use solely the magnetic field and its Jacobian, and so the found X-lines may or may not be actively reconnecting-other methods need to be used to characterize the reconnection activity at the found sites, but the present methods have the advantage of being constrained to a local neighborhood and only requiring knowledge about the magnetic field and its derivatives.
Using the dimensionality measures introduced by Rezeau et al. (2018) shows well that the magnetopause, the bow shock and the tail CS are essentially one-dimensional structures, with intermittent, embedded two-dimensional features.As we have a purely southward IMF driving in the prototype case, this is consistent with Zeiler et al. (2002) observing that non-guide field reconnection is mostly two-dimensional.Future simulations including an IMF B y component will provide stronger guide field reconnection and possibly different dimensionality of detected structures.
The construction of the local coordinate system involves some choices.The first in-plane direction L is given by the local MVA analogue (MGA).The normal direction N is chosen to be the primary eigenvector of the MDD system, orthogonalized with respect to L, to ensure good behaviour in nearly one-dimensional CSs; the vector ∇B L could be a conceivable option to supplant the secondary MDD vector, but this vector is not readily available from the magnetic field and its Jacobian.
For the contouring method, the limitation of requiring consistently oriented local coordinates is a slight issue.It could be mitigated by automated construction of local neighborhood charts of consistent orientation, as well as automatically finding the extents where the local coordinate charts are sensible.As presented here, the contouring method relies on manual restriction of neighborhoods for analysis.The FOTE method is given as a generalized alternative, operating cell-wise in the full domain, with the caveat that in contrast to the contouring method, the FOTE method does not produce topological connectivity for the in-plane null lines, that is, it can be used to mark cells containing null lines, but not to which neighboring cells those lines connect to.In contrast, the contouring method outputs line topologies from the isocontours of B L = 0 = B N .
In comparison to topological methods, such as the magnetic skeleton method of Haynes and Parnell (2010), the present method does not require field-line tracing, nor knowledge on boundary flows like the method proposed by Titov et al. (2009).
On the other hand, Lapenta (2021) proposed a local Lorentz transformation method using both magnetic and electric fields, the latter of which the present method does not require.The present method can acquire useful null line objects via contouring, presenting something of a middle ground between local and topological analyses, adding another tool for studies of reconnection.
The presented FOTE and contouring methods are fundamental to investigate magnetic structures in a physically meaningful coordinate system, supporting reconnection studies is quasi-2D current sheets.The quantification of dimensionalities of magnetic structures may also provide new insights into plasma processes: for example, the magnetospheric tail lobes were found to be characterized by D 1 ≈ D 3 .

Figure 1 .
Figure 1.A schematic view of the Earth's magnetosphere under southern IMF driving, with zoomed-in detail panels of the dayside magnetopause and the magnetotail, sketched on the Vlasiator run described by Palmroth et al. (2023).The magnetosphere proper is delimited by the magnetopause (purple surface).Magnetic field lines on the meridional plane are shown in black, with X (red, crosses; global FFJ line annotated) and O (blue, disks; marked with FTE and plasmoid) topologies marked as lines close to the meridional plane (and one X-topology circling the near-Earth region with northward magnetic field).The white-light blue equatorial cross-section follow the magnetic equator and the tail current sheet, with North/South magnetic field marked respectively as out-of-/into the plane.
.g. a purely one-dimensional structure varying only as a function of single coordinate.The quantities D 1 , D 2 , D 3 describe the one-, two-or three-dimensionality of the magnetic field and are obtained from the ratios of square roots of the eigenvalues λ 1 ≥ λ 2 ≥ λ 3 of ↔

Figure 2 .
Figure 2. Schematic drawing of the a) MGA and b) MDD eigenvectors L, M, N , corresponding to largest, middle and minimum eigenvalues in a 1D CS, along Shi et al. (2019).For both eigensystems, the vector L is well-defined, while the M, N vectors lie on the plane perpendicular to the L vectors.

Figure 3 .
Figure 3. Neutral point classification in a well-defined local coordinate system.On the plane where BL = 0 and on the subset of that plane where BN = 0, the O-points have ∂BN /∂L < 0, and X-points ∂BN /∂L > 0. Note that this classification assumes a right-handed coordinate system.

Figure 4
Figure4shows the global magnetosphere as reproduced by the Vlasiator simulation, with Earth at the origin, Sun on the low right (pointed towards by the positive X axis), and the Earth's dipole field is aligned to have the North pole on the positive Z-axis.The figure displays the absolute value of the dot product LMGA • LMDD , a measure of non-orthogonality for the primary and secondary vectors of our LMN coordinate system on the Y = 0, Z = 0 planes.In regions such as the magnetopause (X ≈ 10 R E , at the subsolar point) and the bow shock (X ≈ 15 R E ), hosting boundaries and CSs that are expected to be 1D structures, we see that the non-orthogonality is low.The magnetotail lobes and parts of the magnetosheath display consistent alignment of the primary and secondary vectors, indicating that the most-varying component of B varies most in the same direction, e.g.

Figure 4 .
Figure 4. Absolute value of the dot products of the primary and secondary vectors | LMGA • LMDD| used in the construction of the LMN systems, shown on the planes Y = 0, Z = 0. We note that the vectors are nearly orthogonal especially in the vicinity of the magnetopause and the tail current sheet, where we wish to employ the orthogonalized coordinate system.

Figure 5 .
Figure 5.A Vlasiator tail CS (t = 1267 s).The CS center plane is located by a contouring algorithm for BL = 0, forming a wavy sheet, which is colored by the current density |J |.For reference, the current density is also shown on the X = −15 RE plane, indicating a match with the actual location of the CS.The local LMN basis vectors are shown on the CS (red: L, green: M , blue: N ) at arbitrary locations, and the B vectors are shown above and below the CS on a Y = −9 RE slice (magenta).

2. 2
Contouring method 2.2.1 Finding reconnection-supporting CSs 195 In Palmroth et al. (2023), the CS center was defined by the zero-crossing of the Earth-centered radial magnetic field component, B r = 0.This selects the crossover plane between the north and south lobes in the tail, with B r = 0 accounting for some radial component closer to the flanks.B x = 0 gives similar results in this case.

Figure 6 .
Figure 6.(a) Null lines obtained from Br = 0 and Bz = 0 on the Vlasiator tail CS, local zoom-in of the simulation within the domain presented in Figure 5.(b) LMN-contoured null lines.Both sheets are colored by positive/negative Bz or BN , respectively, with the null lines colored by −∂rBz and ∂LBN , respectively.The strong CS flapping leads the former to miss a plasmoid on the flap as shown by the field lines (magenta).

Figure 7 .
Figure 7. Schema of LN sign ambiguity and its effect.The sign of L and N vectors are not fixed by the construction and may vary arbitrarily.On the left, a correct evaluation of a BN = 0 (vertical dashed line) value between two points A and B, while on the right an incorrect evaluation of a BN = 0 value (vertical dashed line) between points B and C. The LN directions are locally correct, but not necessarily consistent between neighbouring cells.

Figure 8 .
Figure 8.(a) Komar et al. (2013) 150 • case reproduction: FOTE null lines (blue translucent cells) compared to analytical separator (magenta) and B field line stubs (light gray, from Y = 0 plane) after slight propagation; note that the analytical separator is almost everywhere contained by the cells marked by the FOTE method.Bottom panels (b and c): LN slices at M = 0 with magnetic field lines of in-plane components in blue, BL = 0 in black, BN = 0 in magenta.Background color shows in-plane magnetic field magnitude.(b) This figure shows a detection of an X line in the vacuum superposition case (origin at cell marked by arrow b).(c)This figure shows an unexpected, but correct detection of an X line in the vacuum superposition case (cell marked by arrow c).

4
Figures 10 a and b show a section of the Vlasiator tail CS (a subset of Figure5).Firstly, panel a shows the in-plane null lines as found by the contouring method, colored with ∂ L B N (red colors signifying X topologies, blue O topologies).Evidently, the method struggles at the site of strong current sheet flapping.The CS is colored by B N , positive values blue and negative values beige, extending the north-south classification in Figure6ato a flapping CS.The LMN coordinate bases are shown at some locations on the sheet as red-blue-green arrows.Further, two in-plane null line locations marked as (c) and (d) are chosen as

Figure 10 .
Figure 10.(a) The tail CS from Vlasiator simulation (EGI, t = 1267 s).Similar format to Figure 6 LMN plot, with contoured X and O lines.(b) FOTE detections of X and O topologies (outlined cubic cells), compared with the contoured detections of panel a (black curves) (c) and (d) Details from points marked by c and d, showing a slice of the local L-N plane with in-plane magnetic field lines, from streamline plotting of the in-plane magnetic field components, and zero contours of these components annotated.The slices show point c is correctly identified as an O topology, and point d is correctly identified as an X topology.The background color is the strength of the in-plane magnetic field.

Figure 11 .
Figure 11.Dawn flank of the magnetosphere, with FOTE detections as outlined cells, using the β * parameter on the vertical slice and on a magnetopause proxy at β * = 0.5.

Figure 12 .
Figure 12.Overview of local MDD dimensionality, shown on the planes Y = 0, Z = 0.The dimensionality values D = (D1, D2, D3) ∈ [0, 1] 3 are mapped to RGB color channels via rgb = D/2 + (0.5, 0.5, 0.5) to obtain a three-channel representation of the triplet.See the ternary diagram on top left for reference: the more red there is, the more one-dimensional the local magnetic field structure is, green dominance signifies two-dimensionality and blue dominance three-dimensionality.

Figure 13 .
Figure 13.Local dimensionality of a Vlasiator simulation obtained via the MDD analysis; ternary histogram over most of the magnetosphere.Each cell outside of the inner boundary with r > 5 RE and constrained to −40 RE < X < 20 RE and ±40 RE in Y, Z) is shown here.The lack of completely three-dimensional structures indicates that the in-plane approximation is usable.