Skip to contents

Like all harmonization tools in mrdrivers, toolHarmonizePast takes two magpie objects, 'past' and 'future', and returns a single magpie object, i.e. the harmonized time-series. In this case, the harmonized time-series is always equal to 'past', in the years of 'past'. After that the harmonized time-series depends on the 'method' argument chosen.

Usage

toolHarmonizePast(
  past,
  future,
  method = "level",
  yEnd = 2100,
  requireTimeOverlap = TRUE
)

Arguments

past

A magpie object with only one scenario/datatype, i.e. the length of the third dimension should be 1.

future

A magpie object.

method

A string defining the harmonization method:

  • "level": the harmonized time-series is exactly equal to 'future' in the years after the last year of 'past'.

  • "growth": the harmonized time-series follows the same growth rates as 'future', in the years after the last year of 'past'.

  • "transition": the harmonized time-series transitions to 'future' by the year 'yEnd'. After yEnd, the harmonized time-series is equal to 'future'. In the transition phase, a share of the absolute difference between past' and future' in the last year of past' is added to future. This share starts at 1 in the last year of 'past' and decreases linearly to 0 by yEnd.

yEnd

Additional input for "transition" method. Year by which the transition period is completed.

requireTimeOverlap

If TRUE (default), will throw an error if past and future do not have overlapping years. If FALSE, then the past object is extended (using the most recent value as a constant) until the first future year.

Value

A magpie object with the same dimensions as 'future'.

Dimensions of 'past' and 'future'

If the 'future' object has multiple scenarios/datatypes, i.e. the length of the third dimension is larger than 1, then the a harmonized time-series is created for every scenario/datatype in future. The same 'past' object is used in every case - hence the requirement that 'past' only have one scenario/datatype.

Examples

if (FALSE) { # \dontrun{
toolHarmonizePast(past, future)
} # }