clip function

The clip function of the form:

clip(out_a, out_b, in_a, in_b)

returns out_a if in_a > in_b, out_b otherwise. It’s usually implemented to produce a change at a certain date. For example, for equation:

val_1 = 1
val_2 = 2
pyear = 2002
val.k = clip(val_1, val_2, pyear, time.k)

the variable val will change from val_1 to val_2 at time pyear.

_images/clip.png