theta_unit_factor: Detect theta unit scale factor

View source: R/utils.R

theta_unit_factorR Documentation

Detect theta unit scale factor

Description

Returns 100 if the maximum value suggests percentage units (> 1.5), otherwise returns 1 (m3/m3 assumed).

Usage

theta_unit_factor(theta_vec)

Arguments

theta_vec

Numeric vector of volumetric water content values.

Value

Numeric scalar: 100 (percentage) or 1 (m3/m3).

Examples

theta_unit_factor(c(0.1, 0.35, 0.5))  # returns 1
theta_unit_factor(c(10, 35, 50))       # returns 100


soilFlux documentation built on Dec. 4, 2026, 5:10 p.m.