wrf_raster: Creates raster from a variable from a wrf file

View source: R/wrf_raster.R

wrf_rasterR Documentation

Creates raster from a variable from a wrf file

Description

Return a Raster

Usage

wrf_raster(
  file = file.choose(),
  name = NA,
  latlon = F,
  level = 1,
  as_polygons = FALSE,
  map,
  verbose = FALSE,
  ...
)

Arguments

file

wrf file

name

variable name

latlon

project the output in "+proj=longlat +datum=WGS84 +no_defs"

level

only for 4d data, default is 1 (surface)

as_polygons

logical, true to return a poligon instead of a raster

map

(optional) file with lat-lon variables and grid information

verbose

display additional information

...

extra arguments passed to ncdf4::ncvar_get

Examples

{

wrf <- paste(system.file("extdata", package = "eixport"),
                         "/wrfinput_d02", sep="")

r <- wrf_raster(file=wrf, name='XLAT')

library(raster)
plot(r, axes = TRUE)
}

eixport documentation built on Sept. 30, 2024, 9:42 a.m.