SkewTSounding: SkewTSounding

Description Usage Arguments Details Value Author(s) Examples

Description

Plots a specified segment of data from a netCDF file on a skew-T background

Usage

1
2
3
SkewTSounding(Pressure = NA, Temperature = NA, DewPoint = NA,
  BackgroundSpecs = "skewTDiagram.Rdata", AverageInterval = 0,
  ADD = FALSE)

Arguments

Pressure

A vector of numeric values representing the pressures [hPa] where temperature and dewpoint values will be provided in the next two parameters. All three vectors must be of the same length. The default is NA, in which case no data will be plotted but a skew-T background will still be provided. Optionally, this parameter can be a data.frame containing all three variables (Pressure, Temperature, DewPoint), in which case the second and third parameters can be omitted. The data.frame must have variables with the exact names "Pressure", "Temperature", and "DewPoint", or the alternatives "PSXC", "ATX", "DPXC"; absence of any causes the function to return NA.

Temperature

A vector of values to plot for the temperature variable [deg.C]. The default is NA, in which case no temperature sounding will be plotted.

DewPoint

A vector of values to plot for the dew-point variable [deg.C]. The default is NA, in which case no dew-point sounding will be plotted.

BackgroundSpecs

The Rdata-format file containing the ggplot definition for the Skew-T background. Default: "skewTDiagram.Rdata". This file must reside where Ranadu is installed so that it can be found at an address like paste(path.package("Ranadu", "skewTDiagram.Rdata", sep='/')). Two data files are part of the Ranadu package, one suited to typical GV flights and the for the C-130. The latter is "skewTDiagramC130.Rdata".

AverageInterval

The interval in pressure (in hPa) over which to average available measurements before plotting. The default value is 0, and for that value or NA all values are plotted in a continuous "path".

ADD

A logical variable indicating if the data for the sounding should be returned in a data.frame suitable for addition to a previously generated plot specification (if TRUE) or if an entire new plot should be generated (if FALSE, the default).

Details

Superimposes a sounding plot on a skew-T diagram. The sounding data can either be plotted as a continuous path or averaged in intervals before plotting. The diagram is generated separately via a "Skew-TDiagram" program, with the plot saved in "SkewT.RData" as plot definition "g". This is used by default, but another plot definition can be specified as the third parameter.

Value

ggSpecs A ggplot-format definition of the full plot, with background and sounding values included in the plot. Additions can be made to this specification to add components to the plot (e.g, wind barbs or a hodograph).

Author(s)

William Cooper

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
print (SkewTSounding (data.frame (Pressure=RAFdata$PSXC, Temperature=RAFdata$ATX, 
DewPoint=RAFdata$DPXC)))
Directory <- DataDirectory ()
Flight <- "rf16"       	
Project = "DEEPWAVE"
fname = sprintf("%s%s/%s%s.nc", Directory,Project,Project,Flight)
Data <- getNetCDF (fname, standardVariables())
r <- setRange (Data$Time, 123100, 125500)
DS <- Data[r, c("PSXC", "ATX", "DPXC")]
colnames(DS) <- c("Pressure", "Temperature", "DewPoint")
print (SkewTSounding(DS))

## End(Not run)

WilliamCooper/Ranadu documentation built on July 10, 2019, 12:40 a.m.