"reinit" DirOut="/home/tanpv/Progs/Dr_Stn_2022/PDF/" DirIn="/home/tanpv/Progs/Dr_Stn_2022/Out_Cha/" * "open "DirIn"DF_spi_mod.ctl";"open "DirIn"DF_spe_mod.ctl"; * "vietnam.gs" Cha.1="SPI_03"; Cha.2="SPI_06"; Cha.3="SPI_12"; Cha.4="SPEI_03";Cha.5="SPEI_06"; Cha.6="SPEI_12"; Cha.7="HWA"; Cha.8="HWS"; Cha.9="HWSx" Chn.1="Num of HWs (ev/dec)"; Chn.2="HW Max Dur. (day/dec)" Chn.3="HW Mean Dur. (day/dec)"; Chn.4="Num of hot days (day/dec)" Chn.5="Num of HW days (day/dec)"; Chn.6="HW Mag. (C/dec)"; Chn.7="HW Amp. (C/dec)" Chn.8="Mean HW severity (C/dec)"; Chn.9="Max HW severity (C/dec)" F.1="Senslp_spi_mod.ctl"; Var.1="spi" P.1="Prob_spi_mod.ctl" F.2="Senslp_spe_mod.ctl"; Var.2="spe" P.2="Prob_spe_mod.ctl" "set display color white"; "c" "set mpdraw off"; "set frame off"; "set grid off";"set xlab off";"set ylab off"; Ncha=6; Nrow=2; Ncol=3 x00=0.2; x01=8.2; y00=10.4; y01=1; dx=(x01-x00)/Ncol; dy=(y00-y01)/Nrow ddy=0.; ddx=-0.3 irow=0; icha=0 While (irow < Nrow) irow=irow+1; icol=0 if (irow=1); y2=y00; y1=y2-dy; y11=y1; endif if (irow>1); y2=y11+ddy; y1=y2-dy; y11=y1; endif "open " F.irow "open " P.irow "set lon 100 110"; "set lat 8 24" While (icol1); x1=x11+ddx; x2=x1+dx; x11=x2; endif "set parea "x1" "x2" "y1" "y2 "set grads off" "set t "icol * if (icha=1); S1_color(); endif * if (icha=4); S4_color(); endif * if (icha=2|icha=3|icha=5|icha=6|icha=7|icha=8|icha=9); S2_color(); endif S1_color() d_trend() "d "Var.irow".1*120" * d_trend(); "d sensl.1*10"; "run xcbar "x00+0.5" "x01-0.5" "y01-0.2" "y01" -fs 1 -xo 0.1 -fw 0.08 -fh 0.1 -fx -0.0 -line on -edge triangle "; d_prob(); "d maskout("Var.irow".2, 0.05-"Var.irow".2)" * "d "Var.irow".2" * d_prob(); Sub_Reg2 * VN_HSTS TitleHS (x2+0.2, y2-2.5, "Hoang Sa") TitleTS (x2+0.2, y1+0.5, "Truong Sa") Sub_title ((x1+x2)/2, y2, Cha.icha) Endwhile * Ver_title (x00+0.7, (y1+y2)/2, Var.irow) "close 2" "close 1" Endwhile Main_title ((x01+x00)/2, y00+0.35, "Drought trend (1/decade)") * Main_title (x00+(x01+x00)/2, y00+0.15, "(Dots with outer circle are satisfied 5% significant levels)") "gxprint " DirOut "Trend.png png" ******************************************************* function Main_title (x, y, title) "set string 1 c 5.5 0" "set strsiz 0.11 0.13" "draw string "x" "y" "title return ******************************************************* function TitleHS (x, y, title) "set string 1 c 5.5 290" "set strsiz 0.10 0.10" "draw string "x" "y" "title return i******************************************************* function TitleTS (x, y, title) "set string 1 c 5.5 50" "set strsiz 0.10 0.10" "draw string "x" "y" "title return ******************************************************* function Sub_title (x, y, title) "set string 1 c 5.5 0" "set strsiz 0.11 0.11" "draw string "x" "y" "title return ******************************************************* function Ver_title (x, y, title) "set string 1 c 5.5 90" "set strsiz 0.12 0.12" "draw string "x" "y" "title return ******************************************** function d_trend() "set gxout stnmark" "set digsiz 0.17" "set cmark 3" "set cthick 1" * "d sensl.1*120" "set grads off" return ******************************************** function d_prob() * "set gxout stnmark" "set digsiz 0.25" "set cmark 2" "set cthick 1.25" "set ccolor 1" * "d maskout(prob.2, 0.05-prob.2)" "set grads off" return ******************************************** function S1_color() levels = " -0.5 -0.4 -0.3 -0.2 -0.1 -0.05 -0.01 0 0.01 0.05 0.1 0.2 0.3 0.4 0.5 " *"run My_Color.gs -gxout grfill -kind red->white-(0)->white->aqua->green -levs " levels "run color.gs -gxout shaded -kind darkred->red->orange->white-(0)->white->lightgreen->green->darkgreen -levs " levels "set grads off" return ******************************************** function S4_color() levels = " -3 -2.5 -2.0 -1.5 -1.0 -0.5 -0.2 0 .2 .5 1.0 1.5 2. 2.5 3 " *"run My_Color.gs -gxout grfill -kind red->white-(0)->white->aqua->green -levs " levels "run color.gs -gxout shaded -kind blue->aqua->white-(0)->white->orange->red -levs " levels "set grads off" return ******************************************** function S2_color() levels = " -1.5 -1.0 -0.8 -0.6 -0.4 -0.2 -0.1 0 0.1 0.2 0.4 0.6 0.8 1.0 1.5 " *"run My_Color.gs -gxout grfill -kind red->white-(0)->white->aqua->green -levs " levels "run color.gs -gxout shaded -kind blue->aqua->white-(0)->white->orange->red -levs " levels "set grads off" return ******************************************** function Prob_color() levels = " 0 0.005 0.01 0.05" *levels = " 0 -10 -20 -30 -40 -50 -60 -70 -80 -90 -100 -110 " *"run My_Color.gs -gxout grfill -kind cyan-(0)->white->red -levs" levels "run color.gs -gxout grfill -kind black->black -levs" levels "set grads off" return ******************************************** ******************************************************* function draw_lab1(x, y, title) "set string 1 c 5 0"; "set strsiz 0.12 0.12" "draw string "x" "y" "title return *******************************************************