temperature_profile

petrophys.interpretation.temperature.temperature_profile

temperature_profile(
well,
bht=None,
surface_temp=DefaultParameters.SURFACE_TEMPERATURE_F,
gradient=None,
bht_unit='F',
surface_temp_unit='F',
td=None,
td_unit=None,
depth_unit=None,
fallback_gradient_c_per_km=DefaultParameters.GEOTHERMAL_GRADIENT_C_PER_KM,
)[source]

Calculate temperature profile for a well.

Parameters:
  • well (Well) – Well object with depth data

  • bht (float, optional) – Bottom hole temperature (uses header if not provided, with an unlabelled header unit read as degF)

  • surface_temp (float, optional) – Surface temperature

  • gradient (float, optional) – Temperature gradient (calculated from BHT if not provided)

  • bht_unit (str, optional) – Unit of bht: “F”, “C”, “K” or a label such as “degC”; unknown labels raise ValueError

  • surface_temp_unit (str, optional) – Unit of surface_temp, as bht_unit; default “F”

  • td (float, optional) – Total depth at which bht applies. Default: the header’s TD, else the bottom of the logged interval.

  • td_unit (str, optional) – Depth unit of td; default depth_unit

  • depth_unit (str, optional) – Depth unit of the well’s depths; default the well’s depth unit

  • fallback_gradient_c_per_km (float, optional) – Gradient used when neither gradient nor a BHT with a total depth below the surface is available, degC/km (default: 30)

Returns:

Temperature profile results. source says what the profile rests on: "linear_gradient_from_BHT", "specified_gradient" or "fallback_geothermal_gradient".

Return type:

TemperatureResult

Notes

Without gradient and without a BHT (argument or header) the profile is an assumption: surface_temp (default 68 degF, 20 degC) at depth 0 plus fallback_gradient_c_per_km (default 30 degC/km). No warning is issued for it; check result.source for "fallback_geothermal_gradient", as petrophys.interpret() does to report it.

Examples

>>> from petrophys.interpretation.temperature import temperature_profile
>>> result = temperature_profile(well, bht=200)
>>> well["TEMP"] = result.temperature