"reinit" Varn.1="R1"; Varn.2="R2"; Varn.3="R3"; Varn.4="R4"; Varn.5="SEA"; Va.1="a) SPEI"; Va.2="b) CIs" Mod.1="1) MCA1"; Mod.2="2) MCA2"; Mod.3="3) MCA3"; Mod.4="PC4"; Mod.5="PC5" * Out_Dir="/home/tanpv/Progs/Dr_SEA/Post_APH/PDF1/" * In_dir="/home/tanpv/Progs/Dr_SEA/Post_APH/NC1/" * idx=1 Out_Dir="/home/tanpv/Progs/2021/PDF/" * In_Dir="/work/projects/G09/SEACLID/GPCC_CRU_SEA/" In_Dir="/home/tanpv/Progs/2021/NC/" Dr_Var="sst" Dat_src="observation" * File.1="/home/tanpv/Progs/2021/NC/U_Dr_Cli.nc" * File.2="/home/tanpv/Progs/2021/NC/V_Dr_Cli.nc" * File.3="/home/tanpv/Progs/2021/NC/AB_Dr_Cli.nc" * File="SPEI_SPI_GPCC_CRU_Reg_59_19_New.nc" File="Dr_Prec_and_Corr_Revise.nc" * Spatial PC patterns of Drought over SEA x00=0.5; x01=8.2; Nvar=2; Nreg=5 Ncol=1; Nrow=Nreg dx=(x01-x00)/(Ncol) y00=10.5; y01=0.5 dy=(y00-y01)/Nrow-0.3; ddy=0.2 X_Labs=" 1960 2019 " * -------------------------------- "reset"; "set display white"; "set grads off"; "c" icol=0; it=0; x1=x00; x2=x01 mark.1=0; mark.2=0; mark.3=0; colo.1=2; colo.2=4; colo.3=1; thic.1=5; thic.2=5; thic.3=5; styl.1=1; styl.2=1; styl.3=1; * Time series: Arang.1="-3 3"; Brang.1="-150 150" Arang.2="-3 3"; Brang.2="-150 150" Arang.3="-3 3"; Brang.3="-150 150" Arang.4="-3 3"; Brang.4="-150 150" Arang.5="-3 3"; Brang.5="-150 150" Aylint.1=1; Bylint.1=50 Aylint.2=1; Bylint.2=50 Aylint.3=1; Bylint.3=50 Aylint.4=1; Bylint.4=50 Aylint.5=1; Bylint.5=50 x1=x00+0; x2=x01-0.3 "sdfopen " In_Dir File "query dims"; str=sublin(result,3); Nmons=subwrd(str,8) "set y 1"; "set x 1"; "define CO=cor1"; "query define"; Cor.1=subwrd(result,2) "define CO=pval1"; "query define"; Per.1=subwrd(result,2) "set x 2"; "define CO=cor1"; "query define"; Cor.2=subwrd(result,2) "define CO=pval1"; "query define"; Per.2=subwrd(result,2) "set x 3"; "define CO=cor1"; "query define"; Cor.3=subwrd(result,2) "define CO=pval1"; "query define"; Per.3=subwrd(result,2) "set x 4"; "define CO=cor1"; "query define"; Cor.4=subwrd(result,2) "define CO=pval1"; "query define"; Per.4=subwrd(result,2) "set x 5"; "define CO=cor1"; "query define"; Cor.5=subwrd(result,2) "define CO=pval1"; "query define"; Per.5=subwrd(result,2) "set grads off" ivar=0; While (ivar1); y2=y11-0.3; y1=y2-dy; y11=y1; endif "set parea "x1" "x2" "y1" "y2 "set x "ivar "set y 13 "Nmons * "set vrange -120 120"; "set ylint 40" "set vrange "Arang.ivar; "set ylint "Aylint.ivar Line_pl(mark.1,colo.1,thic.1,styl.1) "set ylpos 0 l" "d spe12" "set xlab on"; "set xlint 5"; "set xaxis "X_Labs; "set vrange "Brang.ivar; "set ylint "Bylint.ivar Line_pl(mark.2,colo.2,thic.2,styl.2) "set ylpos 0 r" "d r_ano" "set xlint 5"; "set xaxis "X_Labs; Cor.ivar=math_format("%6.3f",Cor.ivar) draw_tit(x00+0.5, y2-0.1,"r="Cor.ivar) * draw_tit((x1+x2)/2,y2-0.1,"Red: SPEI; Blue: Precipitation") draw_tit((x1+x2)/2, y2-0.1,Varn.ivar) Endwhile draw_tit(x00+(x01-x00)/2, y00+0.15, "Monthly Time series of SPEI (Red) and Precipitation (Blue)") "close 1" "gxprint " Out_Dir "Fig_R1_Timeseries_Dr_Pr.pdf pdf" ******************************************************* function draw_tit_ver(x, y, title) "set string 1 c 5.5 90"; "set strsiz 0.11 0.11" "draw string "x" "y" "title "set string 1 c 5.5 0" return ******************************************************* function draw_tit(x, y, title) "set string 1 c 5.5 0"; "set strsiz 0.11 0.11" "draw string "x" "y" "title return ******************************************************* function T_clor() *levels = " -0.6 -0.4 -0.2 -0.1 0 0.1 0.2 0.4 0.6 " *levels = " -1 -0.8 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.8 1" levels = " -0.8 -0.6 -0.4 -0.2 -0.1 -0.05 0 0.05 0.1 0.2 0.4 0.6 0.8 " *levels = " -10 -8 -6 -5 -4 -3 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 3 4 5 6 8 10" *levels = " -10 -8 -6 -5 -4 -3 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 3 4 5 6 8 10" *levels = " -30 -20 -10 -8 -6 -5 -4 -3 -2 -1.5 -1 0 1 1.5 2 3 4 5 6 8 10 20 30" "run color.gs -gxout grfill -kind darkred->red->white-(0)->white->cyan->blue -levs" levels "set grads off" return ******************************************************* function P_clor() levels = " -100 -70 -50 -30 -20 -10 -5 0 5 10 20 30 50 70 100 " "run color.gs -gxout grfill -kind red->yellow-(0)->aqua->blue -levs" levels "set grads off" return ******************************************************* function Line_pl(mark,colo,thick,styl) "set gxout line" "set cmark "mark "set ccolor "colo "set cthick "thick "set cstyle "styl return ******************************************** function Mark_leg(colo,type,x,y,size) "set line "colo "draw mark "type" "x" "y" "size return ******************************************** function Truc_0(a0) "set gxout line" "set ccolor 1" "set cstyle 1" "set cthick 2" "set cmark 0" "d "a0 return ******************************************** function Bar_pl(clor,gap) "set gxout bar" "set ccolor "clor "set bargap "gap "set barbase 0" "set baropts outline" "set cthick 2" "set baropts filled" *"set ccolor 1" return ******************************************** function ENSO() * "sdfopen /home/tanpv/Progs/Dr_SEA/EOF_New/ONI_ENSO.nc" "sdfopen /home/tanpv/Progs/Dr_SEA/EOF_New/ONI_ENSO_1961-2005_.nc" * "set x 1 348" "set x 13 540" "set gxout linefill"; "set vrange -2 2"; "set ylint 1"; "set y 1" "define a1=oni-oni-0.5"; "define a0=oni-oni" "set lfcols 15 15"; "d oni; a0" "set lfcols 0 4"; "d oni; a1"; "set y 3" "define a1=oni-oni+0.5"; "set lfcols 15 15"; "d oni; a0" "set lfcols 2 0"; "d oni; a1"; "set y 2"; "define a1=oni-oni-0.5"; "define a2=oni-oni+0.5"; "set lfcols 15 15"; "d oni; a0"; "set y 4" "set gxout line"; "set line 4 1 0.1"; "set ccolor 1"; "set cmark 0"; "d oni"; return *******************************************************