<div dir="ltr"><div><div>Hi,<br><br></div>You are saying the if the variable "ntimes" is, say, 10, then you end up with 10 distinct PDF files?  I'm not sure how that's possible given the way you are opening the workstation.  What are the names of these distinct files?<br><br></div>Rick<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 8, 2018 at 5:20 AM, Ty Buckingham via ncl-talk <span dir="ltr"><<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Hi there,
<div><br>
</div>
<div>I'm currently plotting absolute vorticity at every 10 minutes from one of my WRF outputs and wish to plot all the outputs in one plot PDF. I've attached an example that has been produced in the past (ignore the added graphics). My current loop plots each
 output as a separate PDF. I've added my .ncl script and added a version to the end of this email.</div>
<div><br>
</div>
<div>Any help?</div>
<div><br>
</div>
<div>Thanks in advance,</div>
<div>Ty</div>
<div><br>
</div>
<div>NCL version: 6.4.0</div>
<div><br>
</div>
<div>Script:</div>
<div>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
begin</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:13px">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
a = addfile("wrfout_d04_2007-09-<wbr>24_05:00:<a href="http://00.nc" target="_blank">00.nc</a>","r")</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:13px">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
; type = "x11"</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
  type = "pdf"</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
; type = "ps"</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
; type = "ncgm"</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:13px">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
wks = gsn_open_wks(type,"vort_loop_<wbr>0500-0600")</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
setvalues NhlGetWorkspaceObjectId()</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
    "wsMaximumSize" : 300000000</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
end setvalues</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:13px">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
  pltres                             = True</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
  mpres                              = True</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
  mpres@mpOutlineOn                  = True</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
  mpres@gsnMaximize                  = True</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
  mpres@mpFillOn                     = False</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
  mpres@<wbr>mpGeophysicalLineThicknessF  = 2.0</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
  mpres@mpGeophysicalLineColor       = "Black"</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:13px">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
;*****************************<wbr>******************</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
; plot controls</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
;*****************************<wbr>******************</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:13px">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
  res          = True</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
  res@gsnDraw  = False</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
  res@gsnFrame = False</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:13px">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
; res@cnFillPalette        = "BlueDarkRed18"    ; custom colours. Default is good enough for avo.</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
  res@cnFillOn             = True               ; turns on the color</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
  res@cnLinesOn            = False              ; turn off contour lines</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:13px">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
  res@cnLevelSelectionMode = "ManualLevels"     ; set manual contour levels</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
  res@cnMinLevelValF       = -0.018             ; set min contour level</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
  res@cnMaxLevelValF       = 0.018              ; set max contour level</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
  res@cnLevelSpacingF      = 0.002              ; set contour spacing</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:13px">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
  res@lbTitleOn            =  True                          ; turn on title</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
  res@lbTitleString        = "Absolute Vorticity (1/s)"     ; title string</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
  res@pmLabelBarOrthogonalPosF = -0.05                      ; distances label bar</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:13px">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
;*****************************<wbr>*****************</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
; Begin loop</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
;*****************************<wbr>*****************</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
times = wrf_user_list_times(a)     ; get times in the file</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
ntimes = dimsizes(times)           ; number of times in the file</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
do it = 0,ntimes-1                 ; loop</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:13px">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
print("Working on time: " + times(it) )</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
res@TimeLabel = times(it) ; Set Valid time to use on plots</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:13px">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
avo = wrf_user_getvar(a,"avo",time)</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
z = wrf_user_getvar(a,"z",time)</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:13px">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
height = 500.</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
avo_plane = wrf_user_intrp3d(avo,z,"h",<wbr>height,0.,False)    ; Interpolates avo to height</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
avo_plane1 = avo_plane/100000</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:13px">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
contour = wrf_contour(a,wks,avo_plane1,<wbr>res)</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
plot = wrf_map_overlays(a,wks,(/<wbr>contour/),pltres,mpres)</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:13px">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
end do</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:13px">
<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)">
end</p>
</div>
</div>
</div>

<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>