9.1.1. metcalcpy.diagnostics.land_surface.calc_ctp
- metcalcpy.diagnostics.land_surface.calc_ctp(pressure, temperature, station_index, start_pressure_hpa=-1, bot_pressure_hpa=100.0, top_pressure_hpa=300.0, interp=True, db=False, plotskewt=False, plotdir='', station_name='')
- Function for computing the Convective Triggering Potential (CTP), defined as
\(\mathrm{CTP} = R_d \int_{P_s - 100\,\text{hPa}}^{P_s - 300\,\text{hPa}} \left( T_{\text{env}} - T_{\text{MALR}} \right) \, d\ln p\)
- Parameters
pressure (pint.Quantity or xarray.DataArray) – the pressure variable with units of Hectopascals (hPa).
temperature (pint.Quantity or xarray.DataArray) – the temperature variable with units of Kelvin (K).
station_index (int) – the integer index of the station currently being processed. Use -1 if a single station is being passed.
start_pressure_hpa (float, optional) – the starting pressure to use. Default: -1 (bottom level in profile). This is \(\, P_s\) in the CTP equation.
bot_pressure_hpa (float, optional) – bottom pressure value of the layer, subtracted from start_pressure_hpa. Default: 100 hPa.
top_pressure_hpa (float, optional) – top pressure value of the layer, subtracted from start_pressure_hpa. Default: 300 hPa.
interp (bool) – Whether to interpolate data to exact pressures or use the closest. Default: True.
db (bool) – Print debugging statements. Default: False
plotskewt (bool) – Plot a Skew-T Log-P graphic of the CTP calculation. Default: False.
plotdir (string, optional) – Directory where Skew-T plots should be written. Default: “”.
station_name (string, optional) – Location ID string used for labeling the Skew-T plot and image file name. Default: “”.
- Returns
float32
- Reference:
Findell, K. L., and E. A. B. Eltahir, 2003: Atmospheric Controls on Soil Moisture–Boundary Layer Interactions. Part I: Framework Development. J. Hydrometeor., 4, 552–569, https://doi.org/10.1175/1525-7541(2003)004<0552:ACOSML>2.0.CO;2.
Also see: https://www.pauldirmeyer.com/coupling-metrics for a summary of this and other land-atmosphere coupling metrics.
Notes
Pressure and temperature can either be a 1D profile or a 3D array of data. If a 3D array, station_index needs to be a non-negative value indicating the single column to extract from the 3D data. If they are 1D profiles, use -1 for the station_index as that will be the only profile to use.