Description Usage Arguments Details Value Warning Note Author(s) See Also Examples
Pull information about the grid used from the Models3-formatted file. This includes information such as the origin of the grid (lower left corner coordinates in grid units), cell spacing, etc.
1 |
file |
File name of Models3-formatted file which contains information about the projection. Currently, this function can only handle files with Lambert conic conformal, polar stereographic, and longitude/latitude projections. |
This function assumes that the projection is either Lambert conic conformal or polar stereographic projection. Information about grid cell size, extent of grid, etc. is stored in the global attributes of the Models3-formatted file, which this function reads.
List with the following components:
x.orig |
X-coordinate of the origin point of the grid (lower left corner, coordinates in model projection units) |
y.orig |
Y-coordinate of the origin point of the grid (lower left corner, coordinates in model projection units) |
x.cell.width |
Width of grid cells in x-direction (in model projection units) |
y.cell.width |
Width of grid cells in y-direction (in model projection units) |
hz.units |
Units of the projection (“m”, “km”, or “deg”) |
ncols |
Number of columns of grid cells |
nrows |
Number of rows of grid cells |
nlays |
Number of vertical layers |
Currently, this function can only handle files with Lambert conic conformal, polar stereographic, and longitude/latitude projections.
This function relies on the R package ncdf4 to read
information from Models3-formatted files, since the Models3 format
is built on netCDF
(http://www.unidata.ucar.edu/software/netcdf).
Usually, the user will not call this function directly; instead, it
will be called by the function get.coord.for.dimension
.
Jenise Swall
get.proj.info.M3
, get.coord.for.dimension
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## As mentioned in notes above, user will not typically call
## this function directly.
## Find the path to a demo file with lambert conic conformal projection.
lcc.file <- system.file("extdata/ozone_lcc.ncf", package="M3")
## Get a list containing information about the grid in this file.
grid.info <- get.grid.info.M3(lcc.file)
## Find the path to a demo file with polar stereographic projection.
polar.file <- system.file("extdata/surfinfo_polar.ncf", package="M3")
## Get a list containing information about the grid in this file.
grid.info <- get.grid.info.M3(polar.file)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.