Description Usage Arguments Details Value See Also Examples
View source: R/visualize_spatial.R
VisualizeSpatial
creates basic plots of spatial data covering WRF-Hydro domain.
1 2 | VisualizeSpatial(input, varName = "Variable", plot = TRUE,
plotDf = NULL)
|
input |
A 2D array of data matching domain file. |
varName |
Character string specifying name of variable being plotted. Optional. |
plot |
Logical: plot or not? |
plotDf |
An optional data frame with the data from file already reprojected. |
Crude plots of the WRF Hydro spatial data. The routine accepts a grid of spatial data for either the geo (coarse resolution) or hydro (fine resolution) files. The return is a function (a closure which encapuslates the domain data) which creates a plot when called. The arguments to the function can be changed to tailor the plot (arguments are passed to ggmap and ggplot inside the function). This function (the closure) returns a ggplot object whose data can be accessed.
A function which can be called to plot the data and allow adjustment of its arguments, the plotting parameters.
Other domain: GetDomainCoordsProj
,
VisualizeChanNtwk
,
VisualizeDomain
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
geoFile <- '/home/karsten/geo_em.d02.nc'
coordsProj <- GetDomainCoordsProj(geoFile)
ClosureGeo <- VisualizeSpatial(data[,,],varName='Temperature',plot=FALSE,plotDf=coordsProj)
closureMap <-
ClosureGeo(zoom=11,pointsize=9,
gradNColors=rainbow(25),alpha=.6,maptype='terrain',
subsetRange=range(plotDf$value),
xlim=range(plotDf$long)+mapMargin*1.5,
ylim=range(plotDf$lat)+mapMargin)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.