# load sample Copernicus data
data(dcmems)
# available variables
names(dcmems)
# plot potential temperature
plot(dcmems$thetao)
# define point for extracting and plotting vertical profile
pt <- data.frame(lon = -108.5, lat = 23.33)
vp <- verticalProfiles(dcmems$thetao, point = pt)
# inspect extracted data
vp
Run the code above in your browser using DataLab