Learn R Programming

angstroms (version 0.0.1)

romscoords: Extract coordinate arrays from ROMS.

Description

Returns a RasterStack of the given variable names.

Usage

romscoords(x, spatial = c("lon_u", "lat_u"), ncdf = TRUE,
  transpose = FALSE, ...)

Arguments

x
ROMS file name
spatial
names of coordinate variables (e.g. lon_u, lat_u)
ncdf
default to NetCDF no matter what file name
transpose
the extents (ROMS is FALSE, Access is TRUE)
...
unused

Value

RasterStack with two layers of the 2D-variables

Details

The two layers from the model output are used to define the real-world space. This is used to create a boundary romsboundary, to map real-world objects into grid space romscoords and to generate graticules for mapping into the grid space with graphics::contour.

Examples

Run this code
## Not run: ------------------------------------
#   coord <- romscoord("roms.nc")
## ---------------------------------------------
## with in-built fake data
plot(ice_fake, asp = 0.5)
contour(ice_coords[[1]], add = TRUE, levels = seq(-165, 165, by = 15))
contour(ice_coords[[2]], add = TRUE)

Run the code above in your browser using DataLab