getDEM | R Documentation |
Get land surface elevation data from RSM netCDF.
getDEM(ncdf_address, mesh)
ncdf_address |
address of the netCDF file |
mesh |
the spatial object to join output to. There must be a column named 'CellId' (case sensitive) in the mesh. |
output is a terra SpatVector polygon object with the DEM values in native units and datum.
## Not run: ### example comparing two RSM DEMs cop_address <- "D:/data/models/COP/ALTQ/globalmonitors.nc" losom_address <- "D:/data/models/LOSOM/Iteration_3/preferred_alt_RSMGL/Model_Output/ECB19/globalmonitors.nc" # 6719 features copMesh <- vect(system.file("extdata/gis/COP_mesh", "mesh.shp", package="RSM"),"mesh") copDEM <- getDEM(cop_address, copMesh) losom_topo <- getDEM(losom_address, copMesh) losom_topo$DEM_diff <- losom_topo$dem - copDEM$dem par(fig = c(0, 0.5, 0, 1)) plot(losom_topo, "DEM_diff", type = 'continuous', main = 'LOSOM DEM - COP DEM (ft.)', axes = FALSE) plot(eden_domain + wca3 + wca3b + wca1 + wca2b, add = TRUE, lwd = 2) par(new = T, fig = c(0.5, 1, 0, 1), mar = c(3, 5, 0.5, 0.5)) boxplot(losom_topo$DEM_diff, ylab = 'LOSOM DEM - COP DEM (ft.)') ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.