Skip to contents

wind_series, wind_field, and wind_rose objects are SpatRasters whose layers have a fixed structure (u and v layers, or conductance toward eight neighbors). Selecting layers with [[ or terra::subset(), or combining objects with c(), generally breaks that structure, so these operations return a plain SpatRaster. To select time steps while keeping a series intact, use subset_series(); to take one time step as a field, use wind_field(); and to combine series, use wind_series() with a list of series or files.

Usage

# S4 method for class 'wind_series,ANY,ANY'
x[[i, j, ...]]

# S4 method for class 'wind_field,ANY,ANY'
x[[i, j, ...]]

# S4 method for class 'wind_rose,ANY,ANY'
x[[i, j, ...]]

# S4 method for class 'wind_series'
subset(x, subset, ...)

# S4 method for class 'wind_field'
subset(x, subset, ...)

# S4 method for class 'wind_rose'
subset(x, subset, ...)

# S4 method for class 'wind_series'
c(x, ...)

# S4 method for class 'wind_field'
c(x, ...)

# S4 method for class 'wind_rose'
c(x, ...)

Arguments

x

A wind_series, wind_field, or wind_rose.

i, subset

Layers to select, as for a SpatRaster.

j

Not used.

...

Other arguments passed to the SpatRaster method, or for c(), other objects to combine.

Value

A SpatRaster.

Examples

series <- windscape_example("wind_series")
class(series[[1:2]]) # a plain SpatRaster
#> [1] "SpatRaster"
#> attr(,"package")
#> [1] "terra"
class(subset_series(series, steps = 1:2)) # a wind_series
#> [1] "wind_series"
#> attr(,"package")
#> [1] "windscape"