"reinit" Varn.1="Nino12"; Varn.2="Nino3"; Varn.3="Nino34"; Varn.4="Nino4"; Varn.5="ONI"; Varn.6="TNI" Varn.7="WHWP"; Varn.8="AMMsst"; Varn.9="PDO"; Varn.10="NTA_SST"; Varn.11="DMI" Varn.12="TNA"; Varn.13="AMONUS" Varn.14="PNA"; Varn.15="BEST"; Varn.16="SOI"; Varn.17="REQsoi"; Varn.18="NP"; Varn.19="REPAC_slp" Varn.20="RINDO_slp"; Varn.21="QBO"; Varn.22="WP"; Varn.23="AO"; Varn.24="NAO" 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="/home/tanpv/Progs/2021/MCA/" Dr_Var="sst" Dat_src="observation" File.1="/home/tanpv/Progs/2021/MCA/U_Dr_Cli_APH_spei_12.nc" File.2="/home/tanpv/Progs/2021/MCA/V_Dr_Cli_APH_spei_12.nc" File.3="/home/tanpv/Progs/2021/MCA/AB_Dr_Cli_APH_spei_12.nc" * Spatial PC patterns of Drought over SEA x00=0.5; x01=8.2; Nvar=3; Ncol=2; Nrow=3 dx=(x01-x00)/(Ncol+2) y00=10.7; y01=4 dy=dx; ddy=0.2 X_Labs=" 1961 2015 " * -------------------------------- "sdfopen " File.3 "set y 1"; "set x 1"; "define CO=cor"; "query define"; Cor.1=subwrd(result,2) "define CO=per"; "query define"; Per.1=subwrd(result,2) "set x 2"; "define CO=cor"; "query define"; Cor.2=subwrd(result,2) "define CO=per"; "query define"; Per.2=subwrd(result,2) "set x 3"; "define CO=cor"; "query define"; Cor.3=subwrd(result,2) "define CO=per"; "query define"; Per.3=subwrd(result,2) "close 1" * -------------------------------- "reset"; "set display white"; "c" icol=0; it=0; x1=x00; x2=x01 While (icol1); x1=x11+0.5; x2=x01; x11=x2; endif * if (icol>1); x1=x11+0.5; x2=x1+2.8*dx;x11=x2; endif "sdfopen "File.icol "q dims" str=sublin(result,2); xdim=subwrd(str,13) str=sublin(result,3); ydim=subwrd(str,13) *say xdim " "ydim if (icol=1); "set x 1 "xdim; "set y 8 "ydim; endif if (icol=2); "set y 1 "ydim; Nidx=ydim; endif irow=0 While (irow1); y2=y11-0.25; y1=y2-dy+ddy; y11=y1; endif "set lon 89.5 144" "set parea "x1" "x2" "y1" "y2 "set grads off"; "set frame on"; "set grid on"; "set mpdraw on"; "set mpdset mres"; if (icol=1); "set xlab on"; "set xlint 20"; "set ylab on"; "set ylint 10"; endif if (icol=1); it=irow; "set t "it; T_clor(); "d u(t=" it ")*10"; endif if (icol=2 & irow1); y2=y11-0.3; y1=y2-dy; y11=y1; endif "set parea "x1" "x2" "y1" "y2 "set x "ivar "set y 1 "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 a" "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 b" "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: CIs") draw_tit(x00+0.8, y1+0.1,"MCA"ivar" ("Per.ivar"%)") Endwhile draw_tit(x00+(x01-x00)/2, y00+0.15, "c) Time series of MCAs") "close 1" "gxprint " Out_Dir "7.Mca_Dr_clim.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 *******************************************************