sandbox/jlh/33_section_argo/01_section_argo.R

if (!interactive()) pdf("01_section_argo.pdf")
library(oce)
library(argoFloats)
par(mfrow=c(2,1))
data(section, package="oce")
#getIndex()
ai <- getIndex()
#subset by rectangtle
latlim <- c(36.2030, 38.2373)
lonlim <- c(-73.6727, -8.8263) # from range(section[["longitude"]])
index1 <- subset(ai, rectangle=list(longitude=lonlim, latitude=latlim))
#subset by time
from <- as.POSIXct("2020-09-07", tz="UTC")
to <- as.POSIXct("2020-12-07", tz="UTC")
index2 <- subset(index1, time=list(from=from, to=to))
plot(index2,bathymetry=FALSE, mar=par("mar"),  asp= 1 / cos(mean(range(unlist(index2[["latitude"]]), na.rm=TRUE))*pi/180),  mgp=getOption("oceMgp")
)
plot(section, which="map", mar=par("mar"), axes=FALSE)
if (!interactive()) dev.off()
dankelley/argoFloats documentation built on Feb. 10, 2024, 2:16 a.m.