RAnEnExtra::plotAnalogSample compares the current forecasts and AnEn with observations for one particular station and test time across all FLTs available in forecasts. It also plots the historical forecasts that are identified by AnEn, and compares them with current forecasts for each parameters used to generate analogs.

plotAnalogSample(
  forecasts,
  fcst.id,
  fcst.times,
  flts,
  observations,
  obs.id,
  obs.times,
  analogs,
  sims,
  sims.index,
  test.times,
  i.station,
  i.test.day,
  num.analogs,
  weights,
  parameter.names,
  share.parameter.names = F,
  flts.fraction = 3600,
  boxplot.outliers = F,
  border.anen.box = "grey",
  lty.current.fcsts = "longdash",
  col.current.fcsts = "red",
  cex.current.fcst = 1,
  pch.current.obs = 1,
  col.current.obs = "black",
  cex.current.obs = 1.5,
  cex.label = 1.5,
  legend.texts = c("Observations", "NAM"),
  legend.position = "topleft",
  single.figure = T,
  mar = c(1.5, 5, 1, 1) + 0.1,
  omi = c(0.3, 0, 0, 0)
)

Arguments

forecasts

The forecast data array

fcst.id

The index in forecast parameters that which parameter is predicted.

fcst.times

Forecast times

flts

Forecast lead times

observations

Observation data array

obs.id

Observation variable id

obs.times

Observation times

analogs

The generated analogs with 4 dimensions.

sims

Similarity values

sims.index

Similarity time index

test.times

Test times for analogs

i.station

The station index from analogs.

i.test.day

The test day index from analogs.

num.analogs

The number of analogs.

weights

The weights used in analog generation.

parameter.names

The forecast parameter names.

share.parameter.names

Whether forecasts and observations have the same parameters. If this is TRUE, the observations will be plot on the other parameters that are used to compute the simialrity.

flts.fraction

This is the fraction when dividing FLT values. 3600 means that the x labels are in hours when FLTs are in seconds.

boxplot.outliers

Whether to plot outliers.

border.anen.box

The color of the box plots.

lty.current.fcsts

The line type for current forecasts.

col.current.fcsts

The color for current forecasts.

cex.current.fcst

The size for current forecasts.

pch.current.obs

The point type for current observations.

col.current.obs

The color for current observations.

cex.current.obs

The size for current observations.

cex.label

The font size for x, y, and the legend labels.

legend.texts

A vector of characters of length 2. The first one is for observations, and the second one for forecasts.

legend.position

The legend position.

single.figure

Whether to generate a single plot with subplots.

mar

Margin for the plot. This is effective only when single.figure is TURE.

omi

Outer margin for the plot. This is effective only when single.figure is TURE.

member.name

Which member from AnEn should be plotted. This is useful when you have bias corrected analog members in AnEn that you would like to plot.

Details

This function only works for AnEnIS.