Skip to content

TgInterpolator API Reference

geoloop.geoloopcore.strat_interpolator.TgInterpolator

class to manage interpolation of temperature over depth.

__init__

__init__(
    z_Tg: ArrayLike | None, Tg: ArrayLike, Tgrad: float
) -> None

Parameters:

Name Type Description Default
z_Tg array_like or None

Depth values (m) at which temperature samples in Tg are defined. If None, Tg is treated as a scalar.

required
Tg float or array_like

Ground temperature value(s). - If float: temperature at surface. - If array_like: temperature profile at depths z_Tg.

required
Tgrad float

Geothermal gradient (C/m). Used only when Tg is scalar.

required

interp_Tg

interp_Tg(z: ArrayLike) -> np.ndarray

Interpolate temperature at depth.

Parameters:

Name Type Description Default
z array_like

Depth(s) in meters.

required

Returns:

Type Description
ndarray

Interpolated temperature values.

getTg

getTg(z: ArrayLike) -> ArrayLike

Get ground temperature at depth.

Parameters:

Name Type Description Default
z float or array_like

Depth(s) in meters.

required

Returns:

Type Description
float or ndarray

Temperature at depth.

Notes
  • If Tg is scalar: Tg + Tgrad * 0.01 * z
  • If Tg is array: interpolated from depth-temperature profile