accumulate: Compute accumulation between forecast lead times

View source: R/accumulate.R

accumulateR Documentation

Compute accumulation between forecast lead times

Description

For data with equally spaced lead times, the difference between, or accumulation of gridded fields between lead times is computed. The time over which to compute the accumulation must be set and is calculated from the lead times. If lead times are not equally spaced an attempt will be made to compute all accumulations for the desired accumulation time from the available lead times.

Usage

accumulate(.fcst, accum_time, ...)

## S3 method for class 'harp_spatial_fcst'
accumulate(.fcst, accum_time, .fcst_name = "", ...)

Arguments

.fcst

A harp_fcst list or a harp_spatial_fcst data frame.

accum_time

The time over which to compute the accumulation. Must be in the same units as the lead_time column.

...

Further arguments passed to or from methods.

.fcst_name

Not to be set by the user, but used for consistency between classes.

Details

This function would typically be used compute accumulations between lead times for model outputs that are accumulated from the model start time, such as precipitation and fluxes. However, accumulate could also be used to compute the change in any value between lead times, such a change in temperature or change in wind speed for example.

Value

An object of the same class as .fcst with the accumulations computed. Rows for lead times for which it is not possible to compute the accumulation are dropped.


andrew-MET/harpIO documentation built on March 7, 2024, 7:48 p.m.