"reinit" DirOut="/home/tanpv/Progs/Dr_4Books/PDF/" * DirIn="/home/tanpv/Progs/Dr_VN_2020/VN_PP/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="DF_spi_mod.ctl"; Var.1="spi" F.2="DF_spe_mod.ctl"; Var.2="spe" "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 "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 if (icol=1);S1_color();endif if (icol=2);S2_color();endif if (icol=3);S3_color();endif d_trend() "d "Var.irow"*10" * d_trend(); "d sensl.1*10"; if (irow=2); "run xcbar "x1+0.2" "x2-0.2" "y1-0.2" "y1" -fs 1 -xo 0.1 -fw 0.08 -fh 0.1 -fx -0.0 -line on -edge triangle "; endif * d_prob(); Sub_Reg2 * VN_HSTS TitleHS (x2+0.2, y2-2.5, "Hoang Sa") TitleTS (x2+0.2, y1+0.5, "Truong Sa") HSTS Sub_title ((x1+x2)/2, y2, Cha.icha) Endwhile * Ver_title (x00+0.7, (y1+y2)/2, Var.irow) "close 1" Endwhile Main_title ((x01+x00)/2, y00+0.35, "Mild Drought Frequency (spell/decade)") * Main_title (x00+(x01+x00)/2, y00+0.15, "(Dots with outer circle are satisfied 5% significant levels)") "gxprint " DirOut "DF.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.23" "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 = " 10 11 12 13 14 15 16 17 18 " ;* Mild dr *levels = " 24 26 28 30 32 34 36 " *"run My_Color.gs -gxout grfill -kind red->white-(0)->white->aqua->green -levs " levels "run color.gs -gxout shaded -kind green->yellow->red -levs " levels "set grads off" return ******************************************** function S2_color() levels = " 6 7 8 9 10 11 12 13 14 15 " ;* Mild dr *levels = " 16 18 20 22 24 26 " *"run My_Color.gs -gxout grfill -kind red->white-(0)->white->aqua->green -levs " levels "run color.gs -gxout shaded -kind green->lightgreen->yellow->orange->red->darkred -levs " levels "set grads off" return ******************************************** function S3_color() levels = " 3 4 5 6 7 8 9 10 " ;* Mild dr *levels = " 12 14 16 18 20 22 " *"run My_Color.gs -gxout grfill -kind red->white-(0)->white->aqua->green -levs " levels "run color.gs -gxout shaded -kind green->lightgreen->yellow->orange->red->darkred -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 *******************************************************