Skip to contents

[Deprecated]

scale_param is now the preferred function since it works for both point and gridded data.

If you wish to scale the forecast values, for example when temperature data are in Kelvin and you want them in degrees C, this function can be used to scale the data.

Usage

scale_point_forecast(
  .fcst,
  scale_factor,
  new_units = NULL,
  multiplicative = FALSE
)

Arguments

.fcst

A harp_fcst object as read in by read_point_forecast from harpIO.

scale_factor

The scaling factor.

new_units

The name of the new units - if set to NULL, the name is not changed.

multiplicative

If the scaling is to be done multiplicatively, i.e. the new forecast value is to be the old value * scale_factor, set multiplicative to TRUE. The default (multiplicative = FALSE) is to do the scaling additively, i.e. the new forecast value is the old value + scale_factor.

Value

A harp_fcst object with forecast values scaled by scale_factor.