member_offset: EITrans::EITrans

Description Usage Arguments Details Value Author(s)

View source: R/member_offset.R

Description

EITrans::member_offset calculates an value offset for each member of the input ensembles so that the resulting rank histogram shall be flat.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
member_offset(
  ensembles,
  observations,
  left_delta,
  right_delta,
  left_infinity_estimator = 1,
  right_infinity_estimator = 1,
  verbose = T,
  pre_sorted = F
)

Arguments

ensembles

A 4-dimensional array with the dimensions [stations, times, forecast lead times, ensemble members]

observations

A 3-dimensional array with the dimensions [stations, times, forecast lead times]

left_delta

A scalar addition offset for the minimum during sampling

right_delta

A scalar addition offset for the maximum during sampling

left_infinity_estimator

A scalar to scaling the minimum of the ensemble

right_infinity_estimator

A scalar to scaling the maximum of the ensemble

verbose

Whether to be verbose

pre_sorted

Whether the input ensemble members are pre-sorted. Use pre-sorted ensembles will save you about 80% of the execution time. To pre-sort your ensembles, use aperm(apply(ensembles, 1:3, sort, na.last = T), c(2, 3, 4, 1)).

Details

Input ensembles and observations should match up for the first three dimensions which should be #stations, #times, and #lead times. The 4th dimension of ensembles should be ensemble members.

The length of the output of the function will be a vector of the length of the ensemble members. When you actually use these offset values to correct new ensembles, make sure that you SORT your ensemble members from smallest to largest.

Value

A vector for ensemble member offset. Make sure that you have sorted your ensemble values before you add the offset to each member.

Author(s)

Weiming Hu weiming@psu.edu


Weiming-Hu/EITrans documentation built on March 26, 2021, 8:43 p.m.