checkSeason | R Documentation |
Check the consistency of seasons across the input grids
checkSeason(...)
... |
Input grids to be compared |
In case of seasonal inconsistency of any of the inputs grids, the function stops the execution of the current expression, with an error message.
J Bedia
getSeason
Other check.helpers:
checkDim()
,
checkGrid()
,
checkTemporalConsistency()
,
checkVarNames()
require(climate4R.datasets)
data("EOBS_Iberia_tas")
data("EOBS_Iberia_pr")
grid1 <- subsetGrid(EOBS_Iberia_tas, season = 1)
grid2 <- subsetGrid(EOBS_Iberia_pr, season = 1)
checkSeason(grid1, grid2) # ok, go on
try(checkSeason(grid1, grid2, EOBS_Iberia_tas)) # oops
# However note that it is insensitive to the level of temporal aggregation:
agg <- aggregateGrid(EOBS_Iberia_tas, aggr.m = list(FUN = "mean", na.rm = TRUE))
identical(getSeason(agg), getSeason(EOBS_Iberia_tas))
checkSeason(agg, EOBS_Iberia_tas)
#Station data
data("VALUE_Iberia_tas")
data("VALUE_Iberia_pr")
checkSeason(VALUE_Iberia_tas, VALUE_Iberia_pr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.