era5_t2m_to_monthly_cpp: Aggregate ERA5-Land hourly 2-m temperature to monthly...

View source: R/RcppExports.R

era5_t2m_to_monthly_cppR Documentation

Aggregate ERA5-Land hourly 2-m temperature to monthly statistics

Description

Converts an hourly temperature matrix to monthly mean temperature (tas), monthly mean of daily maxima (tasmax), and monthly mean of daily minima (tasmin), following the CHELSA variable convention.

Usage

era5_t2m_to_monthly_cpp(hourly, n_days, to_celsius = FALSE, ncores = 1L)

Arguments

hourly

Numeric matrix (n_pixels x n_hours): hourly 2-m temperature. Column-major layout. n_hours must equal 24 * n_days.

n_days

Integer: number of days in the month.

to_celsius

Logical: if TRUE, convert Kelvin to Celsius (default FALSE, output in Kelvin matching CHELSA convention).

ncores

Integer: number of OpenMP threads (default 1).

Value

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


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