Skip to content

How to plot delta changes and it signification in the same map (spatialPlot) #8

@abelcentella

Description

@abelcentella

Hi

I calculated the delta change between the climatologies for history (climH) and future (climF) precip and put the result on a grid (change)
climH <-climatology(subH)
climF <- climatology(subF)
change<-gridArithmetics(climF,climH,climH,c,operator = c("-","/","*"))

As I don't found a way (in climate4R) to estimate the statistical signification of the changes I did this with my own script based on t.test using subH and subF grids. Then I produced a grid (named r) with 1 and 0 (1 significant). After that I applied sig<-easyVeri2grid(r,subH) and then sigpoint<-map.stippling(sig,threshold = 1, condition = "GE",pch=16,col="black",cex=0.5).

Finally, I got a proper plot with the precip changes and points where the changes are significant. I used the following

spatialPlot(change,main=list(c("Precip Changes 2021-2040 vs 1961-1990"),cex=2),
xlab=list("Longitude",cex=1.5),ylab=list("Latitude",cex=1.5),
colorkey = list(space = "right",title="(%)",cex=2),
backdrop.theme = "coastline",scales=list(draw=TRUE,cex=1),
col.regions = colorRampPalette(colraindelta),
set.min = -50,set.max=50,sp.layout=list(sig_points))

The above is just for one season or a month. Thus as I want to make a multipanel plot using spatialPlot with a multigrid I create a multigrid using multg<-makeMultiGrid(changes 1..12,skip.temporal.check = TRUE) and made a list of 12 with the respective sig_points. Then

mons<-c("JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC")

spatialPlot(change,main=list(c("Precip Changes 2021-2040 vs 1961-1990"),cex=2),
xlab=list("Longitude",cex=1.5),ylab=list("Latitude",cex=1.5),
colorkey = list(space = "right",title="(%)",cex=2),
names.attr=mons,as.table=TRUE,
backdrop.theme = "coastline",scales=list(draw=TRUE,cex=1),
col.regions = colorRampPalette(colraindelta),
set.min = -50,set.max=50,sp.layout=list(sig_points))

I got a multipanel plot with the changes for every month but the stippling is always the same for every panel. I believe that I'm doing something wrong.

Can somebody explain to me what is wrong or if there is another way to plot the change field with the significance?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions