Argo floats 3D

## =======================================================================================
## plotting argo float data
## implemented by Karline Soetaert
## =======================================================================================
# assumes data have been downloaded from e.g. "ftp://ftp.ifremer.fr/ifremer/argo/geo/atlantic_ocean/2012/01/"
## and put in a list and save in file argo.rda.

## ARGO
library(OceanView)

load(file = "argo.rda")

xlim <- c(-90, 50)
ylim <- c(-70, 70)
ii <- which (Hypsometry$x >= xlim[1] & Hypsometry$x <= xlim[2])
jj <- which (Hypsometry$y >= ylim[1] & Hypsometry$y <= ylim[2])

mx <- Hypsometry$x[ii]
my <- Hypsometry$y[jj]
mz <- Hypsometry$z[ii,jj]
mz [ mz > 0] <- 0

persp3D(x = mx, y = my, z = mz, col = "grey", plot = FALSE,
 main = "argo floats, januari 2012", cex.main = 2)

clim <- range(argo$temp, na.rm = TRUE)
with (argo, 
 for (i in 1:length(Time)) {
 pmin <- min(-press[[i]] , na.rm = TRUE) 
 scatter3D(longitude[[i]], latitude[[i]], -press[[i]] , colvar = temp[[i]] , 
 plot = FALSE, add = TRUE, pch = 16, cex = 0.6, clim = clim, 
 colkey = FALSE, NAcol = "transparent")
 }
)
# very slow:
plotdev(shade = 0.2)
colkey(clim = clim, clab = "dgC", add = TRUE, dist = -0.05, length = 0.5, width = 0.5)
#plotrgl(smooth = TRUE, lighting = TRUE)

Go back