source("/esarchive/scratch/nperez/git/s2dv/R/PlotLayout.R")
source("/esarchive/scratch/nperez/git/s2dv/R/PlotEquiMap.R")
source("/esarchive/scratch/nperez/git/s2dv/R/ColorBar.R")
source("/esarchive/scratch/nperez/git/s2dv/R/clim.palette.R")
source("/esarchive/scratch/nperez/git/s2dv/R/Utils.R")
source("/esarchive/scratch/nperez/git/s2dv/R/Reorder.R")
load("/esarchive/scratch/nperez/git/AndreaSubSkill_Results.RDS")
library(ClimProjDiags)
lon <- seq(0, 358.5, 1.5)
lat <- seq(90, -90, -1.5)
vars <- ArrayToList(result$output1[1,,1,1,1,,], 1, names = '')
PlotLayout(fun = PlotEquiMap, 
           plot_dims = c('latitude', 'longitude'),filled.continents = FALSE,
           var = vars, lon = lon, lat = lat,titles = month.name, fileout = "test2.png")
PlotLayout(fun = PlotEquiMap, 
           plot_dims = c('latitude', 'longitude'),filled.continents = FALSE,
           var = vars, lon = lon, lat = lat,titles = month.name, layout_by_rows = FALSE, fileout = "test.png")

