Learn R Programming

windfarmGA (version 5.0.0)

wind_from_uv: Wind rose from u/v components

Description

Bin ERA5-style eastward (u) and northward (v) wind components into the ws / wd / probab table that windata_format() and genetic_algorithm() expect. Direction is meteorological (where the wind comes from; 0 = north). Each direction bin gets the mean speed and the hour share.

Usage

wind_from_uv(u, v, dir_width = 30)

Value

A data.frame with ws, wd, probab (probabilities sum to 100).

Arguments

u

Eastward wind component (m/s). Same length as v.

v

Northward wind component (m/s).

dir_width

Width of direction bins in degrees. Default is 30.

See Also

Other Helper Functions: get_grids(), grid_area(), hexa_area(), isSpatial(), permutations(), read_power_curve(), splitAt(), wind_from_series(), windata_format()

Examples

Run this code
set.seed(1)
u <- rnorm(200, 2)
v <- rnorm(200, -3)
wind_from_uv(u, v, dir_width = 30)

Run the code above in your browser using DataLab