stuve_diagram {aiRthermo}R Documentation

Thermodynamic (STUVE) Diagram

Description

This function generates an Stüve diagram.

Usage

stuve_diagram(Pres, Temp, TempD = NA, XLIM = c(-80, 45), YLIM = c(1050, 100), 
col.lines = NULL, lty.lines = NULL, lwd.lines = NULL)

Arguments

Pres

A vector with pressure values in hPa.

Temp

A vector with temperature values in Celsius .

TempD

An optional vector with dew point temperatures in Celsius. The default value is NA.

XLIM

X axis limit in Celsius. Default value is c(-80, 45).

YLIM

Y axis limit in hPa. Default value is c(1050, 100).

col.lines

A vector of colours for the stuve_diagram lines. They must be provided in this order: isotherms, isobars, dry adiabats, moist adiabats, constant mixing ratio lines and sounding. Default colours are c("grey", "grey", "olivedrab", "olivedrab", "brown", "red").

lty.lines

A vector of line-types for the stuve_diagram. They must be provided following the same order as for the col.lines argument. Default values are c("dotted", "dotted", "dotted", "solid", "dotted", "solid").

lwd.lines

A vector of line-widths for the stuve_diagram. They must be provided following the same order as for the col.lines and lty.lines arguments. Default values are c(2,2,2,1,2,1).

Details

It is possible to add extra lines and to save as a pdf, jpeg or png (see examples).

Value

The result is a plot object.

Examples

data(RadiosondeA)
aPs<-RadiosondeA[,1]*100
aTs<-C2K(RadiosondeA[,3])
aws<-RadiosondeA[,6]/1000
capeCin<-CAPE_CIN(PlowTop=98000,precoolType="adiabatic",
                  Ps=aPs,Ts=aTs,ws=aws,doLog=0,deltaP=5,
                  getLiftedBack=TRUE,upToTop=TRUE)

#How to add a line to the plot
stuveA<-stuve_diagram(Pres = aPs/100,Temp=aTs-273.15)
lines(capeCin$Tl-273.15,capeCin$Pl/100,col="blue",lwd=2)

[Package aiRthermo version 1.2.1 Index]