Hi @aho
List of known issues:
-
1) latlims and dots s2dverification#258 (closed) -
2) latlims maximum not 90 and dots -
3) order lats #12 (closed) -
4) speed s2dverification#210 (moved) -
5) arrows https://earth.bsc.es/gitlab/es/s2dverification/-/tree/develop-PlotStereoMap-arrows
I think this branch solves point 1) and 3) while point 2) seems already solved. The speed seems difficult to be solved but the arrows may be a good feature.
Below is the code to check 1), 2) and 3)
I hope this helps,
Núria
# Point 1)
var <- array(rnorm(90 * 24), c(lon = 24, lat = 90))
lat <- seq(-89, 89, length.out = 90)
lon <- seq(1, 360, 15)
dots <- array(sample(c(TRUE, FALSE), size= 90*24, replace = TRUE), c(lon = 24, lat = 90))
s2dverification::PlotStereoMap(var, lon, lat, dots = dots, latlims = c(45, 90),
dot_size = 2, toptitle = '1 Fails')
dev.new()
s2dverification::PlotStereoMap(var[, which(lat > 45)], lon, lat[lat > 45], dot_size = 2,
latlims = c(45, 90), dots = dots[, which(lat > 45)],
toptitle = '1 Works')
dev.new()
source("/esarchive/scratch/nperez/git/s2dv/R/PlotStereoMap.R")
source("/esarchive/scratch/nperez/git/s2dv/R/Utils.R")
source("/esarchive/scratch/nperez/git/s2dv/R/ColorBar.R")
source("/esarchive/scratch/nperez/git/s2dv/R/clim.palette.R")
library(mapproj)
PlotStereoMap(var, lon, lat, dots = dots, latlims = c(45, 90), dot_size = 2, toptitle = '1 Works')
# Point 2)
s2dverification::PlotStereoMap(var, lon, lat, dots = dots, latlims = c(45, 70),
dot_size = 2, toptitle = '2 Fails')
dev.new()
s2dverification::PlotStereoMap(var[, which(lat > 45)], lon, lat[lat > 45], dot_size = 2,
latlims = c(45, 70), dots = dots[, which(lat > 45)],
toptitle = '2 Works')
dev.new()
PlotStereoMap(var[, which(lat > 45)], lon, lat[lat > 45], dot_size = 2,
latlims = c(45, 70), dots = dots[, which(lat > 45)],
toptitle = '3 Works')
# Point 3)
data <- matrix(rnorm(100 * 50), 100, 50)
x <- seq(from = 0, to = 360, length.out = 100)
y <- seq(from = -90, to = 90, length.out = 50)
dots <- data
dots[dots > 0] <- TRUE
dots[dots <= 0] <- FALSE
dims <- dim(dots)
dots <- as.logical(dots)
dim(dots) <- dims
s2dverification::PlotStereoMap(data, x, y, latlims = c(60, 90), brks = 50, dots = dots,
dot_size = 2, toptitle = '3 Fails')
dev.new()
PlotStereoMap(data, x, y, latlims = c(60, 90), brks = 50, dots = dots,
dot_size = 2, toptitle = '3 Works')