Skip to contents

This function calculates the effective fetch (cosine-weighted fetch) from input fetch lines at a site, by weighting each fetch distance by the cosine of its angular difference from a target direction. Due to irregular shoreline in coastal waters the simple fetch length in a given compass direction is not very effective since the width of fetch places a substantial restriction on the fetch length (USCOE 1977). Therefore, the fetch is modified by taking the cosine weighted average of all the rays within a certain sector on either side of the fetch ray defined by angle θ. The cosine weighted fetch is named as effective fetch.

Usage

effective_fetch(fetch, wind_energy_transfer_degrees = 45)

Arguments

fetch

An sf object containing fetch data with geometry LINESTRING, direction, fetch columns, and site identifiers. Must include columns for direction (in compass degrees), fetch distance, and site ID.

wind_energy_transfer_degrees

Numeric. The half-angle (in degrees) of the wind energy transfer cone. Wind directions within ±this angle from the target direction contribute to the effective fetch calculation. Default is 45.

Value

An sf object (LINESTRING) containing effective fetch rays for each site and direction, with the following columns:

  • direction - Wind direction in compass degrees (0-360)

  • efetch - Calculated effective fetch distance

  • Additional columns from original fetch data

  • geometry - LINESTRING geometry from center to effective fetch endpoint

Details

Effective fetch in WEMo is calculated by summing the product of fetch length and cosine of the angle of departure from the ith heading over each of n number of fetch rays and dividing by the sum of the cosine of all angles. Effective fetch rays look trimmed down in the figure compared to fetch rays. This method is based on assumption that wind moving over water surface transfers energy to the water in the direction of the wind and in all directions within 4/pi radians (45) on either side of the wind direction. (USCOE 1977)

The function processes each site independently and calculates effective fetch using a cosine-weighted average of all fetch rays within the specified angular cone around each target direction. The calculation follows:

$$Eff F_{i} = \frac{\sum_{j=-n}^{n} F_j \cos(\theta_j)}{\sum_{j= -n}^{n} \cos(\theta_j)}$$

Where:

  • $$Eff F_i$$ Effective fetch for the ith direction fetch ray

  • $$F_j$$ length for j radiating fetch ray after clipping to shoreline

  • $$\theta_j$$ angle between the ith fetch ray and the jth ray

  • $$n$$ number of rays selected by user

The function handles directional wrap-around by expanding the direction space by ±360 to ensure proper calculation near 0/360 boundary.

Site Identification

The function automatically detects site identifier columns by looking for:

  • A column named exactly "site"

  • The first column with a name starting with "site"

Required Columns

The input sf object must contain:

  • direction - Wind direction in compass degrees

  • fetch Fetch distance values

  • Site identifier column (see Site Identification section)

  • Valid sf geometry (typically LINESTRING or POINT)

Examples

if (FALSE) { # \dontrun{
# Basic usage with default 45-degree cone
effective_fetch <- effective_fetch_sf(fetch_data)

# Use narrower energy transfer cone
effective_fetch <- effective_fetch_sf(fetch_data, wind_energy_transfer_degrees = 30)

# Plot results
library(ggplot2)
ggplot(effective_fetch) +
  geom_sf(aes(color = efetch)) +
  facet_wrap(~site)
} # }