<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style><style type="text/css"></style><style type="text/css"></style>
</head>
<body fpstyle="1" ocsi="0">
<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-24_05:00:00.nc","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_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@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);">
;***********************************************</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);">
;***********************************************</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);">
;**********************************************</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);">
;**********************************************</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",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,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,(/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>
</body>
</html>