<div dir="auto"><div>Hey, <div dir="auto">In order to debug I would suggest you to move everything that does not have to change in every interaction (like the plot resources and the call to the workstation) out of the do loop. That can cause problems given that you're overwriting the same variable over and over. </div><div dir="auto">Second, use the := operator when reading files and defining variables so that you're sure that you're overwriting the old ones. </div><div dir="auto">I'm pretty sure it's the call to the workstation in every loop that is screwing up everything ☺️</div><br><div class="gmail_extra"><br><div class="gmail_quote">Il 8 mar 2017 5:42 AM, 조익현 <<a href="mailto:ehcho@kma.go.kr" target="_blank">ehcho@kma.go.kr</a>> ha scritto:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear NCL users,<br>
<br>
<br>
I have a question about multi panel plots.<br>
<br>
I'm trying to get multi panel plots(3x3) using loop of 9 GRIB files,<br>
<br>
but it displays only last one output(plot(8)) on 3x3 panel.<br>
<br>
<br>
The basic structure is the following<br>
;;;<br>
do i1 = 0, 8<br>
grib file read and define resource<br>
plot(i1) = gsn_csm_contour_map<br>
end do<br>
<br>
resP = True<br>
gsn_panel(wks,plot,(/3,3/),res<wbr>P)<br>
;;;;<br>
<br>
<br>
Any help will be appreciated.<br>
<br>
Cho<br>
<br>
<br>
<br>
==============================<wbr>============ here is the script<br>
<br>
load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_code.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_csm.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/contributed.ncl"<br>
<br>
begin<br>
<br>
<br>
<br>
ANLTIM = "2017030700"<br>
<br>
plot=new(9,graphic)<br>
<br>
do i1 = 0,8<br>
i=i1*12<br>
timestep = sprinti("%0.3i", i)<br>
<br>
dir = "/op/nwp/post/EXTJ/ECMW/OPER/D<wbr>AIN/201703/0700/"<br>
pr = "e025_v025_nhem_h"+timestep+".<wbr>"+ANLTIM+"00.gb1"<br>
a = addfile(dir+pr+".grb1", "r")<br>
<br>
lat = a->g0_lat_0({30:50})<br>
lon = a->g0_lon_1({110:140})<br>
<br>
slp = a->MSL_GDS0_SFC({30:50},{110:1<wbr>40})*0.01<br>
<br>
slp!0 = "lat"<br>
slp!1 = "lon"<br>
slp&lon = lon<br>
slp&lat = lat<br>
<br>
wks = gsn_open_wks("x11","output")<br>
gsn_define_colormap(wks, "WhiteYellowOrangeRed")<br>
<br>
;;============================<wbr>============================<br>
;; PLOT<br>
;;============================<wbr>============================<br>
res = True<br>
res@gsnDraw = False<br>
res@gsnFrame = False<br>
<br>
res@mpLimitMode = "Corners"<br>
res@mpLeftCornerLatF = 32.0<br>
res@mpRightCornerLatF = 43.0<br>
res@mpLeftCornerLonF = 119.5<br>
res@mpRightCornerLonF = 134.0<br>
<br>
res@mpProjection ="LambertConformal"<br>
res@mpLambertParallel1F = 30.0<br>
res@mpLambertParallel2F = 60.0<br>
res@mpLambertMeridianF = 126.0<br>
<br>
res@tfDoNDCOverlay = False<br>
res@gsnAddCyclic = False<br>
<br>
res@cnInfoLabelOn = False<br>
res@cnLineLabelInterval = 2<br>
; res@cnMonoLineThickness = False<br>
res@cnFillOn = False<br>
<br>
wrf_smooth_2d(slp,9)<br>
plot(i1) = gsn_csm_contour_map(wks,slp,re<wbr>s)<br>
<br>
end do<br>
<br>
;;;;;;;;;;;;;;;;;;;;;<br>
;;;; Panel Plot ;;;;;<br>
;;;;;;;;;;;;;;;;;;;;;<br>
resP = True<br>
gsn_panel(wks,plot,(/3,3/),res<wbr>P)<br>
end<br>
______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
</blockquote></div></div>
</div></div>