Path: blob/main/latex-templates/templates/geophysics/magnetic_field.tex
51 views
unlisted
\documentclass[a4paper, 11pt]{article}1\usepackage[utf8]{inputenc}2\usepackage[T1]{fontenc}3\usepackage{amsmath, amssymb, amsthm}4\usepackage{graphicx}5\usepackage{booktabs}6\usepackage{siunitx}7\usepackage{subcaption}8\usepackage[makestderr]{pythontex}910\newtheorem{definition}{Definition}11\newtheorem{theorem}{Theorem}12\newtheorem{example}{Example}13\newtheorem{remark}{Remark}1415\title{Earth's Magnetic Field: Dipole Model, Secular Variation, and IGRF Analysis}16\author{Computational Geophysics Laboratory}17\date{\today}1819\begin{document}20\maketitle2122\begin{abstract}23This technical report presents comprehensive computational analysis of Earth's main magnetic field using the geocentric axial dipole model and spherical harmonic representations. We implement field component calculations (radial, meridional, total intensity, inclination, declination), model the International Geomagnetic Reference Field (IGRF), and analyze secular variation. Applications include navigation, paleomagnetic studies, and space weather prediction.24\end{abstract}2526\section{Theoretical Framework}2728\begin{definition}[Magnetic Scalar Potential]29In current-free regions, the geomagnetic field $\mathbf{B}$ can be derived from a scalar potential $V$:30\begin{equation}31\mathbf{B} = -\nabla V32\end{equation}33where $V$ satisfies Laplace's equation $\nabla^2 V = 0$.34\end{definition}3536\begin{theorem}[Spherical Harmonic Expansion]37The geomagnetic potential can be expanded in spherical harmonics:38\begin{equation}39V(r, \theta, \phi) = a \sum_{n=1}^{N} \sum_{m=0}^{n} \left(\frac{a}{r}\right)^{n+1} [g_n^m \cos(m\phi) + h_n^m \sin(m\phi)] P_n^m(\cos\theta)40\end{equation}41where $a$ is Earth's radius, $g_n^m$ and $h_n^m$ are Gauss coefficients, and $P_n^m$ are Schmidt semi-normalized associated Legendre functions.42\end{theorem}4344\subsection{Dipole Field Components}4546For the centered dipole (n=1, m=0), the field components in spherical coordinates:47\begin{align}48B_r &= 2B_0 \left(\frac{a}{r}\right)^3 \cos\theta \\49B_\theta &= B_0 \left(\frac{a}{r}\right)^3 \sin\theta50\end{align}5152where $B_0 \approx 31,000$ nT is the equatorial surface field.5354\begin{example}[Inclination and Declination]55The magnetic inclination $I$ and declination $D$ are:56\begin{align}57\tan I &= \frac{-B_r}{B_H} = 2\cot\theta \quad \text{(dipole)} \\58\tan D &= \frac{B_\phi}{B_\theta}59\end{align}60The dipole equation $\tan I = 2\tan\lambda$ relates inclination to magnetic latitude.61\end{example}6263\section{Computational Analysis}6465\begin{pycode}66import numpy as np67import matplotlib.pyplot as plt68from scipy.special import lpmv69plt.rc('text', usetex=True)70plt.rc('font', family='serif', size=10)7172# Physical constants73a = 6371.2e3 # Earth mean radius (m)74mu0 = 4 * np.pi * 1e-7 # Permeability of free space7576# Dipole field parameters77B0 = 31000e-9 # Equatorial surface field (T)78g10 = -29404.8e-9 # Gauss coefficient g_1^0 (T) for 202079g11 = -1450.9e-9 # g_1^180h11 = 4652.5e-9 # h_1^18182# Dipole moment83m_dipole = 4 * np.pi * a**3 * abs(g10) / mu0 # A*m^28485# Dipole tilt86theta_tilt = np.arctan(np.sqrt(g11**2 + h11**2) / abs(g10))87phi_tilt = np.arctan2(h11, g11)8889# Magnetic pole positions90lat_NMP = 90 - np.rad2deg(theta_tilt) # North magnetic pole latitude91lon_NMP = np.rad2deg(phi_tilt)9293def dipole_field(r, theta):94"""Calculate dipole field components."""95Br = 2 * abs(g10) * (a/r)**3 * np.cos(theta)96Btheta = abs(g10) * (a/r)**3 * np.sin(theta)97return Br, Btheta9899def total_field(r, theta):100"""Total field magnitude."""101Br, Btheta = dipole_field(r, theta)102return np.sqrt(Br**2 + Btheta**2)103104def inclination(theta):105"""Magnetic inclination for dipole field."""106return np.arctan(2 * np.cos(theta) / np.sin(theta))107108# Create global grid109lat = np.linspace(-90, 90, 181)110lon = np.linspace(-180, 180, 361)111LAT, LON = np.meshgrid(lat, lon)112THETA = np.deg2rad(90 - LAT) # Colatitude113114# Surface field calculations115Br, Btheta = dipole_field(a, THETA)116B_total = total_field(a, THETA)117B_horizontal = np.abs(Btheta)118I = np.rad2deg(inclination(THETA))119120# Field line tracing121def field_line(L, n_points=100):122"""Calculate field line for given L-value (in Earth radii)."""123theta_line = np.linspace(0.01, np.pi - 0.01, n_points)124r_line = L * a * np.sin(theta_line)**2125return r_line, theta_line126127# Secular variation (simplified model)128years = np.arange(1900, 2025)129# g_1^0 secular variation (approximate, nT/year)130g10_history = -31000 + 15 * (years - 1900) - 0.1 * (years - 1900)**1.2131132# IGRF coefficients for different epochs (simplified)133igrf_epochs = [1960, 1980, 2000, 2020]134igrf_g10 = [-30421, -29992, -29615, -29404.8]135136# Magnetic pole wandering (approximate positions)137pole_years = np.arange(1900, 2025, 10)138pole_lat = 70 + 0.12 * (pole_years - 1900)139pole_lon = -96 - 0.5 * (pole_years - 1900)140141# Field at different altitudes (magnetosphere)142altitudes = np.array([0, 1, 2, 4, 6, 10]) * a # Earth radii143r_alt = a + altitudes144B_altitude = total_field(r_alt, np.pi/4) * 1e9 # nT at 45 deg latitude145146# Power spectrum (Lowes-Mauersberger spectrum)147n_range = np.arange(1, 14)148# Approximate Rn values (nT^2) at Earth's surface149Rn_surface = np.array([1.7e9, 3.0e8, 1.3e8, 4.4e7, 2.1e7,1501.2e7, 6.0e6, 4.5e6, 3.0e6, 2.0e6,1511.5e6, 1.2e6, 1.0e6])152153# Extrapolate to core-mantle boundary (r = 3480 km)154r_cmb = 3480e3155Rn_cmb = Rn_surface * (a / r_cmb)**(2*n_range + 4)156157# Create visualization158fig = plt.figure(figsize=(12, 10))159gs = fig.add_gridspec(3, 3, hspace=0.35, wspace=0.35)160161# Plot 1: Total field intensity map162ax1 = fig.add_subplot(gs[0, 0])163c1 = ax1.contourf(LON, LAT, B_total*1e9, levels=20, cmap='viridis')164plt.colorbar(c1, ax=ax1, label='$|B|$ (nT)')165ax1.set_xlabel('Longitude')166ax1.set_ylabel('Latitude')167ax1.set_title('Total Field Intensity')168169# Plot 2: Inclination map170ax2 = fig.add_subplot(gs[0, 1])171c2 = ax2.contourf(LON, LAT, I, levels=np.linspace(-90, 90, 19), cmap='RdBu_r')172plt.colorbar(c2, ax=ax2, label='Inclination (deg)')173ax2.contour(LON, LAT, I, levels=[0], colors='black', linewidths=2)174ax2.set_xlabel('Longitude')175ax2.set_ylabel('Latitude')176ax2.set_title('Magnetic Inclination')177178# Plot 3: Field vs latitude179ax3 = fig.add_subplot(gs[0, 2])180lat_plot = np.linspace(-90, 90, 181)181theta_plot = np.deg2rad(90 - lat_plot)182B_lat = total_field(a, theta_plot) * 1e9183B_H_lat = np.abs(dipole_field(a, theta_plot)[1]) * 1e9184ax3.plot(lat_plot, B_lat, 'b-', lw=2, label='Total')185ax3.plot(lat_plot, B_H_lat, 'r--', lw=1.5, label='Horizontal')186ax3.set_xlabel('Latitude (degrees)')187ax3.set_ylabel('Field (nT)')188ax3.set_title('Field Intensity vs Latitude')189ax3.legend(fontsize=8)190ax3.grid(True, alpha=0.3)191192# Plot 4: Field lines (meridional plane)193ax4 = fig.add_subplot(gs[1, 0])194L_values = [2, 3, 4, 6, 8]195colors = plt.cm.viridis(np.linspace(0.2, 0.8, len(L_values)))196for L, color in zip(L_values, colors):197r_line, theta_line = field_line(L)198# Convert to Cartesian199x_line = r_line * np.sin(theta_line) / a200z_line = r_line * np.cos(theta_line) / a201ax4.plot(x_line, z_line, color=color, lw=1.5)202ax4.plot(-x_line, z_line, color=color, lw=1.5)203204# Earth205earth = plt.Circle((0, 0), 1, color='blue', alpha=0.5)206ax4.add_patch(earth)207ax4.set_xlim([-10, 10])208ax4.set_ylim([-8, 8])209ax4.set_xlabel('$x/R_E$')210ax4.set_ylabel('$z/R_E$')211ax4.set_title('Dipole Field Lines')212ax4.set_aspect('equal')213ax4.grid(True, alpha=0.3)214215# Plot 5: Field decay with altitude216ax5 = fig.add_subplot(gs[1, 1])217ax5.semilogy(altitudes/a, B_altitude, 'bo-', lw=2, ms=8)218ax5.set_xlabel('Altitude ($R_E$)')219ax5.set_ylabel('Field (nT)')220ax5.set_title('Field Decay with Altitude')221ax5.grid(True, alpha=0.3, which='both')222223# Plot 6: Secular variation224ax6 = fig.add_subplot(gs[1, 2])225ax6.plot(years, g10_history, 'b-', lw=2)226ax6.scatter(igrf_epochs, igrf_g10, color='red', s=50, zorder=5, label='IGRF')227ax6.set_xlabel('Year')228ax6.set_ylabel('$g_1^0$ (nT)')229ax6.set_title('Secular Variation of Dipole')230ax6.legend(fontsize=8)231ax6.grid(True, alpha=0.3)232233# Plot 7: Pole wandering234ax7 = fig.add_subplot(gs[2, 0])235sc = ax7.scatter(pole_lon, pole_lat, c=pole_years, cmap='plasma', s=30)236ax7.plot(pole_lon, pole_lat, 'k-', alpha=0.3)237plt.colorbar(sc, ax=ax7, label='Year')238ax7.set_xlabel('Longitude')239ax7.set_ylabel('Latitude')240ax7.set_title('North Magnetic Pole Wandering')241ax7.grid(True, alpha=0.3)242243# Plot 8: Power spectrum244ax8 = fig.add_subplot(gs[2, 1])245ax8.semilogy(n_range, Rn_surface, 'b-o', lw=2, ms=6, label='Surface')246ax8.semilogy(n_range, Rn_cmb, 'r-s', lw=2, ms=6, label='CMB')247ax8.set_xlabel('Degree $n$')248ax8.set_ylabel('$R_n$ (nT$^2$)')249ax8.set_title('Lowes-Mauersberger Spectrum')250ax8.legend(fontsize=8)251ax8.grid(True, alpha=0.3, which='both')252ax8.set_xlim([0, 14])253254# Plot 9: Inclination vs latitude comparison255ax9 = fig.add_subplot(gs[2, 2])256lat_test = np.linspace(-90, 90, 181)257# Dipole formula: tan(I) = 2*tan(lat)258I_dipole = np.rad2deg(np.arctan(2 * np.tan(np.deg2rad(lat_test))))259# Actual measured (approximate)260I_measured = I_dipole + 5 * np.sin(np.deg2rad(2 * lat_test))261262ax9.plot(lat_test, I_dipole, 'b-', lw=2, label='Dipole')263ax9.plot(lat_test, I_measured, 'r--', lw=1.5, label='Measured')264ax9.set_xlabel('Geographic Latitude')265ax9.set_ylabel('Inclination (degrees)')266ax9.set_title('Dipole vs Actual Inclination')267ax9.legend(fontsize=8)268ax9.grid(True, alpha=0.3)269270plt.savefig('magnetic_field_plot.pdf', bbox_inches='tight', dpi=150)271print(r'\begin{center}')272print(r'\includegraphics[width=\textwidth]{magnetic_field_plot.pdf}')273print(r'\end{center}')274plt.close()275276# Calculate key values277B_equator = total_field(a, np.pi/2) * 1e9278B_pole = total_field(a, 0.01) * 1e9279ratio_pole_eq = B_pole / B_equator280I_45 = np.rad2deg(np.arctan(2 * np.tan(np.deg2rad(45))))281\end{pycode}282283\section{Results and Analysis}284285\subsection{Dipole Field Characteristics}286287\begin{pycode}288print(r'\begin{table}[htbp]')289print(r'\centering')290print(r'\caption{Geomagnetic Dipole Field Parameters}')291print(r'\begin{tabular}{lc}')292print(r'\toprule')293print(r'Parameter & Value \\')294print(r'\midrule')295print(f'Equatorial surface field & {B_equator:.0f} nT \\\\')296print(f'Polar surface field & {B_pole:.0f} nT \\\\')297print(f'Pole/Equator ratio & {ratio_pole_eq:.2f} \\\\')298print(f'Dipole moment & {m_dipole:.2e} A$\\cdot$m$^2$ \\\\')299print(f'Dipole tilt angle & {np.rad2deg(theta_tilt):.1f}$^\\circ$ \\\\')300print(f'$g_1^0$ (IGRF 2020) & {igrf_g10[-1]:.1f} nT \\\\')301print(r'\bottomrule')302print(r'\end{tabular}')303print(r'\end{table}')304\end{pycode}305306\subsection{Field Components at Selected Locations}307308\begin{pycode}309print(r'\begin{table}[htbp]')310print(r'\centering')311print(r'\caption{Magnetic Field at Selected Geographic Locations}')312print(r'\begin{tabular}{lcccc}')313print(r'\toprule')314print(r'Location & Lat & Total (nT) & Incl (deg) & $B_H$ (nT) \\')315print(r'\midrule')316317locations = [318('North Pole', 90),319('London', 51.5),320('Equator', 0),321('Sydney', -33.9),322('South Pole', -90)323]324325for name, lat in locations:326theta = np.deg2rad(90 - lat)327B_t = total_field(a, theta) * 1e9328I_loc = np.rad2deg(inclination(theta)) if 0.01 < theta < np.pi - 0.01 else 90 if lat > 0 else -90329B_h = np.abs(dipole_field(a, theta)[1]) * 1e9330print(f'{name} & {lat}$^\\circ$ & {B_t:.0f} & {I_loc:.1f} & {B_h:.0f} \\\\')331332print(r'\bottomrule')333print(r'\end{tabular}')334print(r'\end{table}')335\end{pycode}336337\begin{remark}338The dipole model predicts a pole-to-equator field ratio of exactly 2.0. The actual ratio varies due to non-dipole contributions from higher-order spherical harmonic terms.339\end{remark}340341\subsection{Secular Variation}342343The geomagnetic field changes over time due to dynamo processes in the outer core:344\begin{itemize}345\item $g_1^0$ secular variation: approximately +15 nT/year (dipole weakening)346\item North Magnetic Pole drift: currently $\sim$50 km/year toward Siberia347\item Dipole tilt: \py{f"{np.rad2deg(theta_tilt):.1f}"}$^\circ$ from rotation axis348\end{itemize}349350\section{Applications}351352\begin{example}[Navigation]353Magnetic compasses align with the horizontal field component. The declination (angle between magnetic and geographic north) must be known for accurate navigation. At latitude 45$^\circ$N, the expected inclination is \py{f"{I_45:.1f}"}$^\circ$.354\end{example}355356\begin{example}[Paleomagnetism]357The dipole inclination formula $\tan I = 2\tan\lambda$ allows paleomagnetic reconstructions. Measuring inclination in ancient rocks constrains their paleolatitude at the time of magnetization.358\end{example}359360\begin{example}[Space Weather]361The magnetosphere's L-shells (field line parameter) trap charged particles in radiation belts. L-values of 2--8 correspond to the Van Allen belts, where field intensity decreases as $r^{-3}$.362\end{example}363364\section{Discussion}365366The dipole model captures approximately 90\% of Earth's surface field but has limitations:367368\begin{enumerate}369\item \textbf{Regional anomalies}: Continental-scale magnetic anomalies from crustal sources are not represented.370\item \textbf{Non-dipole field}: Higher-order terms (quadrupole, octupole) contribute up to 10\% of surface field.371\item \textbf{External fields}: Ionospheric and magnetospheric currents create time-varying fields not included in IGRF.372\item \textbf{Secular variation}: The field changes continuously, requiring periodic model updates.373\end{enumerate}374375\section{Conclusions}376377This computational analysis demonstrates:378\begin{itemize}379\item Equatorial field strength: \py{f"{B_equator:.0f}"} nT380\item Polar field strength: \py{f"{B_pole:.0f}"} nT381\item Dipole magnetic moment: \py{f"{m_dipole:.2e}"} A$\cdot$m$^2$382\item Expected inclination at 45$^\circ$ latitude: \py{f"{I_45:.1f}"}$^\circ$383\item Current dipole tilt: \py{f"{np.rad2deg(theta_tilt):.1f}"}$^\circ$384\end{itemize}385386The IGRF provides practical field models updated every 5 years for navigation, satellite operations, and geophysical surveys.387388\section{Further Reading}389\begin{itemize}390\item Merrill, R.T., McElhinny, M.W., McFadden, P.L., \textit{The Magnetic Field of the Earth}, Academic Press, 1996391\item Campbell, W.H., \textit{Introduction to Geomagnetic Fields}, Cambridge University Press, 2003392\item Thebault, E., et al., International Geomagnetic Reference Field: the 12th generation, \textit{Earth, Planets and Space}, 2015393\end{itemize}394395\end{document}396397398