getGridVerticalLevels | R Documentation |
A helper function that returns a vector of the variable(s) vertical levels
getGridVerticalLevels(grid, var.index = NULL)
grid |
Input grid |
var.index |
A vector of indices indicating the positions of the variables whose level will be returned.
This can be either an integer vector of positions, or a character vector with the short names of the variables contained
in the multigrid (see the |
A (short-)named vector with the vertical levels of the (multi)grid variable(s)
J Bedia
Other get.helpers:
get2DmatCoordinates()
,
getCoordinates()
,
getDim()
,
getGrid()
,
getGridProj()
,
getRefDates()
,
getSeason()
,
getShape()
,
getStationID()
,
getVarNames()
,
getWT()
,
getYearsAsINDEX()
,
setGridProj()
,
typeofGrid()
,
which.leap()
require(climate4R.datasets)
data("CFS_Iberia_hus850")
getGridVerticalLevels(CFS_Iberia_hus850)
# Surface variables usually have an undefined vertical level <NA>
data("EOBS_Iberia_tas")
getGridVerticalLevels(EOBS_Iberia_tas)
data("NCEP_Iberia_hus850")
data("NCEP_Iberia_psl")
data("NCEP_Iberia_ta850")
mg <- makeMultiGrid(NCEP_Iberia_hus850, NCEP_Iberia_psl, NCEP_Iberia_ta850)
getGridVerticalLevels(mg)
# Use of var.index to select some variables:
# either by their shortname...
getGridVerticalLevels(mg, var.index = c("hus@850","ta@850"))
# ... or by index position in the multigrid
getGridVerticalLevels(mg, var.index = c(1,3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.