getTimeResolution: Get time resolution

View source: R/helpers.R

getTimeResolutionR Documentation

Get time resolution

Description

Get the time resolution of the input grid as a character

Usage

getTimeResolution(grid)

Arguments

grid

a grid or station data

Value

A character representation of the time resolution. Current possible values are: "1h", "3h", "6h", "12h", "DD", "MM", "YY". If none of these matches, "unknown" is returned

Author(s)

J Bedia

Examples

 
require(climate4R.datasets)
data("EOBS_Iberia_tas")
getTimeResolution(EOBS_Iberia_tas)
monthly.grid <- aggregateGrid(EOBS_Iberia_tas, aggr.m = list(FUN = "mean", na.rm = TRUE))
stopifnot(identical(getTimeResolution(monthly.grid), "MM"))
annual.grid <- aggregateGrid(monthly.grid, aggr.y = list(FUN = "mean", na.rm = TRUE))
stopifnot(identical(getTimeResolution(annual.grid), "YY"))


SantanderMetGroup/transformeR documentation built on Oct. 28, 2023, 5:26 a.m.