"reinit" "set display color white"; "c" Mon.1="Jan"; Mon.2="Feb"; Mon.3="Mar"; Mon.4="Apr"; Mon.5="May"; Mon.6="Jun" Mon.7="Jul"; Mon.8="Aug"; Mon.9="Sep"; Mon.10="Oct"; Mon.11="Nov"; Mon.12="Dec" Lev.1="mild"; Lev.2="mord"; Lev.3="seve" Dr_lev.1="Mild drought"; Dr_lev.2="Moderate drought"; Dr_lev.3="Seve drought" Dir_Inp="/home/tanpv/Data/562_VNU/0.25_VN/Dr_Chars/" Dat_out="/home/tanpv/Progs/562_VNU/PDF_Ope/" Scale.1="1-month drought"; Scale.2="3-month drought"; Scale.3="6-month drought"; Tscal.1=1; Tscal.2=3; Tscal.3=6; Yr_Ope=2024 Mn_Ope=01 Nlead=6; Nlev=3; Nscal=3 Ncol=Nlev; Nrow=1 ;* 5 cases, 4 months (1,4,7,10) y00=8.0; y01=0.8 dy=(y00-y01)/Nrow x00=0.5; x01=11.0 dx=(x01-x00)/Ncol-0.15 "sdfopen "Dir_Inp Dr_Prob.nc ;* "Drought probability" ilead=0 While (ilead12); Mon=Mon-12; Year=Year+1; endif say Mn_Ope" "Yr_Ope" "Mon" "Year ;* "set t "ilead While (iscal1); y2=y11+0.15; y1=y2-dy; y11=y1; endif y2=y00; y1=y2-dy; ;* "set z "iscal While (ilev1); x1=x11+0.05; x2=x1+dx; x11=x2; endif "set parea "x1" "x2" "y1" "y2 "set mpdraw off"; "set frame on"; "set xlab on"; "set grid off"; "set ylab off";"set xlint 2"; "set ylint 2" if (ilev=1); "set ylab on"; "set grid off"; endif Prob_Clor() "set z "iscal; "set t "ilead "d "Lev.ilev"(t="ilead")" ;* "set gxout contour"; "set ccolor 1" Contour() "d "Lev.ilev"(t="ilead")" draw_tit((x1+x2)/2-0.1, y2, Dr_lev.icol); ;* if (irow=1); draw_tit((x1+x2)/2-0.1, y2, V.icol); endif ;* imon=1+(irow-1)*3 ;* if (icol=1); draw_ver_tit(x1, (y1+y2)/2, Mon.imon); endif "set line 4 1 10" Sub_Reg2 * HSTS * "Title_lonlat -lon " 112.8 " -lat " 14.500 " -siz " 0.07 " -ang "0 " -tit "HSa"" * "Title_lonlat -lon " 113.5 " -lat " 8.250 " -siz " 0.07 " -ang "0 " -tit "TSa"" * "hatch pv 0 0.05 -angle 135 -int 0.05 -color 1 -thickness 0.01 -type 1 -density 0.01" ;* if (irow=Nrow) ;* if (icol=3); "xcbar "x2-3*dx+0.2" "x2-0.2" "y01+0.2" "y01+0.4" -fs 1 -xo 0.1 -fw 0.08 -fh 0.1 -fx -0.0 -line on "; endif ;* if (icol=6); "xcbar "x2-3*dx+0.2" "x2-0.2" "y01+0.2" "y01+0.4" -fs 1 -xo 0.1 -fw 0.08 -fh 0.1 -fx -0.0 -line on "; endif ;* endif "xcbar "x00+1" "x01-1.5" "y01-0.45" "y01-0.2" -fs 1 -xo 0.1 -fw 0.08 -fh 0.1 -fx -0.0 -line on "; Endwhile Main_tit(x00+0.5, y00+0.25, "Initial: "Yr_Ope"-"Mn_Ope) Main_tit((x00+x01)/2, y00+0.25, "Probability of the "Scale.iscal " occurrence (%) for "Mon"-"Year) "gxprint " Dat_out "Dr_prob_Lead_"ilead"_Scale_"Tscal.iscal".png png" * pull dd "c" Endwhile * Main_tit((x00+x01)/2, y00+0.35, "Drought: Obs and Model") * Main_tit((x00+x01)/2, y00+0.15, "Year: "year" - Leadtime="L.iz" months") * "gxprint " Dat_out Varn.ivar "_Obs_and_Bias_Clim_" Model ".png png" Endwhile "close 1" ******************************************************* function Main_tit(x, y, title) "set string 1 c 5.5 0"; "set strsiz 0.11 0.13" "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.09 0.10" "draw string "x" "y" "title "set string 1 c 5.5 0" return ******************************************************* function draw_ver_tit(x, y, title) "set string 1 c 5.5 90"; "set strsiz 0.09 0.10" "draw string "x" "y" "title "set string 1 c 5.5 0" return ******************************************************* function Line_pl(mark,colo,thick,styl) "set gxout line" *"set gxout stnmark" "set cmark "mark "set ccolor "colo "set cthick "thick "set cstyle "styl 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 Contour() levels = " 10 20 30 50 70 90 " "set clevs " levels "set ccolor 4" "set gxout contour" "set grads off" return ******************************************** function Prob_Clor() * levels = " 5 10 20 30 40 50 60 70 80 90 " levels = " 10 20 30 50 70 90 " * "run color.gs -gxout grfill -kind green->lightgreen->yellow->orange->red -levs " levels "run color.gs -gxout grfill -kind white->lightyellow->yellow->orange->red->darkred -levs " levels "set grads off" return