transform_gcms: Transform General Circulation Model (GCM) Stacks

View source: R/transform_gcms.R

transform_gcmsR Documentation

Transform General Circulation Model (GCM) Stacks

Description

This function transforms a list of GCM stacks by subsetting it to include only the variables specified in var_names, reprojecting it to match the CRS of study_area, cropping and masking it to study_area, and returning a list of data frames.

Usage

transform_gcms(s, var_names = c("bio_1", "bio_12"), study_area = NULL)

Arguments

s

A list of stacks of General Circulation Models (GCMs).

var_names

Character. A vector of names of the variables to include, or 'all' to include all variables.

study_area

An Extent object, or any object from which an Extent object can be extracted. Defines the study area for cropping and masking the rasters.

Value

A list of data frames, where each element corresponds to a GCM in the input list.

Author(s)

Luíz Fernando Esser (luizesser@gmail.com) https://luizfesser.wordpress.com

See Also

summary_gcms

Examples

var_names <- c("bio_1", "bio_12")
s <- import_gcms(system.file("extdata", package = "chooseGCM"), var_names = var_names)
study_area <- terra::ext(c(-80, -30, -50, 10)) |> terra::vect(crs="epsg:4326")
transform_gcms(s, var_names, study_area)


chooseGCM documentation built on April 3, 2025, 5:27 p.m.