R/plotOV.R

Defines functions plotOV

Documented in plotOV

plotOV <- function(OV) {
  # plot overflow data from a physical space structure as provided in the above list
  # this simple function just plots polygon as straight lines, not great circle paths
  clkw <- c('NW','NE','SE','SW')  # clockwise vertices 
  for (i in 1:length(OV)) {
    polygon(OV[[i]]$int[clkw,1],OV[[i]]$int[clkw,2], border='cyan')
    for (j in 1:length(OV[[i]]$src)) {
      polygon(OV[[i]]$src[[j]][clkw,1],OV[[i]]$src[[j]][clkw,2], border='navyblue')
    }
    polygon(OV[[i]]$ent[clkw,1],OV[[i]]$ent[clkw,2], border='darkgreen')
    lines(OV[[i]]$injection[,1],OV[[i]]$injection[,2], col='darkred')
  }
  invisible(0)
}
garciapintado/rdafCESM documentation built on July 18, 2019, 4:41 p.m.