Skip to contents

Perform various types of wind vector rotations incl. single, double, planar fit.

Usage

wrap.rot(
  data,
  MethRot = c("single", "double", "plnrFit", "autoPlnrFit", "none")[1],
  plnrFitCoef = NULL,
  plnrFitType = c("simple", "time", "wind")[1]
)

Arguments

data

data.frame containing veloXaxs, veloYaxs and veloZaxs
vectors should be defined correspondingly as u/v/w == E/N/U == x/y/z (data.frame)

MethRot

method of rotation to be used, one of:

  • "single" - rotate into the mean wind

  • "double" - apply single rotation and additionally rotate to align w and z (minimise w)

  • "planarFit" - apply the coefficeints for planat fit, supplied to plnrFitCoef.
    Note that these coefficients should be determined in the coordinate system they are applied to.

  • "autoPlanrFit" - determine and apply the planar fit coefficeints from data.

  • "none" - perform no rotation

plnrFitCoef

coefficients for planar fit. (numeric vector or data.frame)
Depending on plnrFitType, plnrFitCoef should be supplied as the following structure:

  • simple - numeric vector constant of coefficeients, or coefficeients that are controlled from the workflow. c(al,be,b0)

  • time - data.frame with columns date, al, be, b0. values with date nearest to mean(data$date) will be used

  • wind - data.frame with columns PSI_uv, al, be, b0. values with PSI_uv nearest to average PSI_uv will be used

plnrFitType

type of planar fit, "simple", "date" or "wind". (character vector)

Value

Data object with rotated wind vectors names as u/v/veloZaxs

References

Code adapted from REYNFlux_P5 (35ceda9) and flow.turb.tow.neon.dp04.r (914a9e9)
Stefan Metzger / Dave Durden / Natchaya P-Durden / Cove Sturtevant / Ke Xu

Author

W. S. Drysdale