geopulse.earth.structured_2d
2-D structured Earth models.
Two flavours live here:
CoastalCorrection2D— a semi-analytic coast-effect wrapper that interpolates between a landLayered1Dand an oceanLayered1Dmodel based on distance from the coast, producing aTensorImpedance. Fast, closed-form, captures the classic ocean/continent contrast that dominates coastal GIC risk. This is what operational GIC codes typically use in place of a true 2-D finite-difference solve.Structured2D— placeholder for a proper finite-difference / finite-element 2-D MT solver (TE/TM modes on a discretised cross-section). Deferred; raisesNotImplementedYetError.
Coordinate convention (both classes)
The coast is aligned with the y axis (east). Distance from the coast
d_m is measured along x (north), positive inland, negative
seaward. Under this frame the impedance tensor is anti-diagonal:
where TE (E-parallel-to-coast) and TM (E-perpendicular-to-coast) modes decouple and can be computed independently.
For CoastalCorrection2D the smooth interpolation used is:
Z_TE(d, ω) = Z_land(ω) + [Z_ocean(ω) − Z_land(ω)] · f_TE(d, ω)
Z_TM(d, ω) = Z_land(ω) + [Z_ocean(ω) − Z_land(ω)] · f_TM(d, ω)
with f_TE(d, ω) = ½ [1 − tanh(d / δ(ω))], f_TM similar but with
a shorter decay length (TM is more strongly perturbed near a
conductivity contrast per Weaver 1994 and Boteler-Pirjola 1998), and
δ(ω) = √(2 / (ω μ₀ σ_eff)) the skin depth at the geometric-mean
surface conductivity σ_eff = √(σ_land · σ_ocean). Limits check:
d → +∞ ⇒ Z_TE, Z_TM → Z_land
d → −∞ ⇒ Z_TE, Z_TM → Z_ocean
d = 0 ⇒ Z_TE, Z_TM = (Z_land + Z_ocean) / 2
This is not a substitute for a full 2-D FD MT computation at
percent-level accuracy — the goal is a defensible, closed-form correction
that captures the right qualitative behaviour and asymptotic limits, and
that returns a proper TensorImpedance so downstream E-field
computations exercise the tensor code path.
References
Classes
|
Semi-analytic coast-effect 2-D Earth model. |
True 2-D finite-difference MT solver — STUB (deferred WP). |
- class geopulse.earth.structured_2d.CoastalCorrection2D(land_model, ocean_model, distance_from_coast_m, tm_decay_ratio=0.7)[source]
Bases:
EarthModelSemi-analytic coast-effect 2-D Earth model.
Interpolates between two 1-D reference models (land and ocean) via a tanh-shaped coupling function of distance from the coast, producing a
TensorImpedanceat each frequency.- Parameters:
land_model (
Layered1D) – Layered 1-D model for the land side (well inland). Provides the far-fieldd → +∞asymptote.ocean_model (
Layered1D) – Layered 1-D model for the ocean side (well offshore). Typically a thin high-conductivity seawater layer over the same deep conductivity structure. Provides thed → −∞asymptote.distance_from_coast_m (
float) – Distance of the observation site from the coastline, in metres. Positive inland, negative seaward.0sits exactly at the coast.tm_decay_ratio (
float) – Ratio of TM to TE decay lengthL_TM / L_TE. Smaller → TM transitions more sharply than TE. Default 0.7 matches the Boteler-Pirjola (1998) observation that TM is more perturbed than TE near the interface.
Notes
tier == 2. Coordinate frame: coast alongy(east);x(north) points inland. The tensor is anti-diagonal.Examples
>>> import numpy as np >>> from geopulse.earth.base import ConductivityLayer >>> from geopulse.earth.layered_1d import Layered1D >>> land = Layered1D([ConductivityLayer(np.inf, 0.001)]) >>> ocean = Layered1D([ ... ConductivityLayer(1_000.0, 3.3), ... ConductivityLayer(np.inf, 0.001), ... ]) >>> coast = CoastalCorrection2D(land, ocean, distance_from_coast_m=0.0) >>> imp = coast.compute_impedance(np.array([1e-3, 1e-2, 1e-1])) >>> imp.rank 2
- class geopulse.earth.structured_2d.Structured2D[source]
Bases:
EarthModelTrue 2-D finite-difference MT solver — STUB (deferred WP).
Discretises a 2-D cross-section, solves TE and TM Maxwell modes on the grid with proper boundary conditions, and extracts the impedance tensor at surface locations. See
CoastalCorrection2Dfor the pragmatic closed-form alternative that is available now.- compute_impedance(freqs_Hz)[source]
Not yet implemented — use
CoastalCorrection2Dinstead.