CAPE: CAPE

CAPER Documentation

CAPE

Description

Calculates CAPE, convective inhibition, and adiabatic profiles for a sounding.

Usage

CAPE(SND, nbins = 50, player = 50)

Arguments

SND

A data.frame with named variables 'Pressure', 'Temperature', and 'DewPoint' (note capitalized 'P' in the latter). Respective units should be hPa, deg.C, and deg.C. This data.frame will often be a data.frame or a subset of a dataframe created by Ranadu::getNetCDF(), possibly with times selected using the Start and End arguments to that function. Multiple segments can be bound together using the R function rbind. If the variables 'Pressure', 'Temperature', and 'DewPoint' are not provided, the routine will search for the respective substitutes 'PSXC', 'ATX', and 'DPXC' and will use those instead if they are found. If neither set of veriables is found, the function fails.

nbins

An integer representing the number of bins into which the sounding will be partitioned in pressure. The default is 50. A value of 250 provides better resolution and is preferable if values like LWC or updraft are to be used.

player

A numeric variable specifying the depth in hPa over which to average the lowest layer in the sounding for calculation of the LCL. The default is 50.

Details

For a sounding provided in a data.frame, this function adds new columns to the data.frame representing pseudo-adiabatic ascent and wet-adiabatic (i.e., reversible) ascent. This routine calls the function LCL and uses the pressure and temperature returned from that function as the starting point for the calculations of upward and downward trajectories.

Value

The supplied data.frame with the addition of eight columns, for which all pressure values in the original sounding will have corresponding values for each of these variables: (1) TP: the temperature for pseudo-adiabatic ascent above or dry-adiabatic descent below the LCL; (2) TPV: the virtual temperature corresponding to TP; (3) TQ the temperature for wet-adiabatic ascent above the LCL or dry-adiabatic descent below the LCL; (4) TQV the virtual temperature corresponding to TPV, for which the weight of condensed liquid water is accounted for in the calculation; (5) TVIR: the virtual temperature of the original sounding, used for the calculation of buoyancy; (6) LWC: the profile of condensed liquid water content [g/m^3] for reversible ascent; (7) W: the updraft profile; and 8 WQ, the updraft profile for reversible wet-adiabatic ascent. The function also adds some attributes to the data.frame: LCL (lifted condensation level) pressure and temperature (attribute names 'LCLp' and LCLt' in respective units of hPa and deg.C), the peak LWC that develops during the wet-adiabatic ascent, the CAPE (convective available potential energy, attribute name 'CAPE') and the corresponding value for reversible adiabatic ascent (attribute name 'CAPEW'), the convective inhibition (attribute name 'CIN'), the level of free convection (attribute name 'LFC'), and the LCL value of pseudo-adiabatic equivalent potential temperature ('THP') and of wet-equivalent potential temperature ('THQ'). Units for CAPE, CAPEwet, and CIN are J/kg, for LFC is hPa, and for THP and THQ are kelvin. These values can be retrieved from the returned data.frame via calls like 'attr(NSND, "LFC")' where NSND is returned from CAPE().

Author(s)

William Cooper

Examples

## Not run: 
Data <- getNetCDF ('/scr/raf_data/CONTRAST/CONTRASTrf01.nc', 
                   c('PSXC', 'ATX', 'DPXC'), Start=250400, End=260100)
NSND <- CAPE (Data)

## End(Not run)

NCAR/Ranadu documentation built on Jan. 27, 2023, 1:09 a.m.