Description Usage Arguments Details Value Examples
Match CTD points with closest hydro soundings
1 2 3 4 5 6 7 8 9 | get_depths(
ctd_pts,
dep_pts,
expand = 200,
plot = FALSE,
show_bath = TRUE,
show_stat = TRUE,
zoom = 12
)
|
ctd_pts |
data.frame of CTD station locations, see details |
dep_pts |
data.frame of depth sounding points, see details |
expand |
numeric for expanding sample size of CTD points |
plot |
logical to return plot of matched points |
show_bath |
logical to show bathymetric depth points on the plot |
show_stat |
logical to show stations on the plot |
zoom |
numeric for map zoom, passed to |
CTD station locations are linearly expanded and then matched to the nearests points in the depth sounding layer. This is done to create a smoother depth gradient in the contour plot. The ctd_pts
data.frame must have three columns for longitude (Long
), latitude (Latitude
), and station name (Station
). The dep_pts
data.frame should have three columns for longitude (Long
), latitude (Latitude
), and depth (Depth
, non-negative). The plot
argument can be used to verify the match of the interpolated points with the depth soundings.
All coordinates are assumed to be geographic decimal degrees using the WGS 1984 projection, negative longitude is west of the Prime Meridian.
The expanded data.frame from ctd_pts
including depth (Depth
) and cumulative distance (Dist
, in km) columns. If plot = TRUE
, a ggmap plot is returned showing the matched points.
1 2 3 4 5 6 7 | ## Not run:
dt <- as.Date('2014-04-21')
toplo <- ctd[ctd$Date %in% dt, ]
get_depths(toplo, PB_dep_pts)
get_depths(toplo, PB_dep_pts, plot = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.