era5_to_monthly_cpp: Unified ERA5-Land hourly-to-monthly aggregation

View source: R/RcppExports.R

era5_to_monthly_cppR Documentation

Unified ERA5-Land hourly-to-monthly aggregation

Description

Converts hourly 2-m temperature and total precipitation to the four CHELSA-compatible monthly climate variables in a single parallel pass.

Usage

era5_to_monthly_cpp(
  hourly_t2m,
  hourly_tp,
  n_days,
  to_celsius = FALSE,
  ncores = 1L
)

Arguments

hourly_t2m

Numeric matrix (n_pixels x n_hours_t2m): hourly 2-m temperature in Kelvin. n_hours_t2m must equal 24 * n_days.

hourly_tp

Numeric matrix (n_pixels x n_hours_tp): hourly total precipitation in metres. n_pixels must match hourly_t2m.

n_days

Integer: number of days in the month.

to_celsius

Logical: convert temperatures from Kelvin to Celsius? Default FALSE.

ncores

Integer: number of OpenMP threads (default 1).

Value

A named list with four numeric vectors of length n_pixels: tas, tasmax, tasmin, pr.


xbioclim documentation built on Oct. 5, 2026, 5:08 p.m.