Skip to contents

Plots a vertical profile of data read in by a harp_read_<> function. There are arguments for filtering the data to, for example station (SID), forecast start time (fcst_dttm), lead time (lead_time), or valid time (valid_dttm) to ensure that only the wanted data are plotted. There is also the option to plot temperature (and / or) dewpoint temperature profiles on a skew-T / log - P diagram.

Usage

plot_vertical_profile(
  .data,
  SID,
  y_axis = "p",
  reverse = TRUE,
  log_scale = FALSE,
  skew_t = FALSE,
  colour_by = "fcst_model",
  colours = NULL,
  facet_by = NULL,
  num_facet_cols = NULL,
  ...
)

# S3 method for harp_ens_point_df
plot_vertical_profile(
  .data,
  SID,
  y_axis = "p",
  reverse = TRUE,
  log_scale = FALSE,
  skew_t = FALSE,
  colour_by = "fcst_model",
  colours = NULL,
  facet_by = NULL,
  num_facet_cols = NULL,
  fcst_dttm,
  lead_time,
  ...
)

# S3 method for harp_list
plot_vertical_profile(
  .data,
  SID,
  y_axis = "p",
  reverse = TRUE,
  log_scale = FALSE,
  skew_t = FALSE,
  colour_by = "fcst_model",
  colours = NULL,
  facet_by = NULL,
  num_facet_cols = NULL,
  fcst_dttm,
  lead_time,
  ...
)

# S3 method for harp_det_point_df
plot_vertical_profile(
  .data,
  SID,
  y_axis = "p",
  reverse = TRUE,
  log_scale = FALSE,
  skew_t = FALSE,
  colour_by = "fcst_model",
  colours = NULL,
  facet_by = NULL,
  num_facet_cols = NULL,
  fcst_dttm,
  lead_time,
  ...
)

# S3 method for data.frame
plot_vertical_profile(
  .data,
  SID,
  y_axis = "p",
  reverse = TRUE,
  log_scale = FALSE,
  skew_t = FALSE,
  colour_by = NULL,
  colours = NULL,
  facet_by = NULL,
  num_facet_cols = NULL,
  data_col,
  valid_dttm,
  ...
)

Arguments

.data

A data frame, a harp_point_df data frame or a harp_list.

SID

The station ID (if available) in .data to plot

y_axis

The column in .data containing the data to be used as the y-axis - i.e. the vertical position.

reverse

Logical - whether the y-axis should be reversed.

log_scale

Logical - whether the y-axis should use a log10 scale.

skew_t

Logical. Whether to plot the profile on a skew-T /log-P diagram.

colour_by

The column in .data that will determine the line colour

colours

A character vector of colour codes. If this is a named vector, then the colour values will be matched to levels based on the names of the vectors. Can also be a data frame with column names equal to the value for colour_by and colour.

facet_by

The column in .data to facet by.

...

Other arguments passed on to layer(). These are often aesthetics, used to set an aesthetic to a fixed value, like linwidth = 4, or linetype = 3.

fcst_dttm

The forecast start time in .data to plot.

lead_time

The lead_time in data to plot.

data_col

The column in .data that contains the data to plot as a vertical profile.

valid_dttm

If a valid_dttm column exists in .data, the valid time of the data to plot.

Value

A ggplot plot that can be saved with ggsave.