[ncl-talk] Plotting several WRF plots without refreshing the plot

Rick Brownrigg brownrig at ucar.edu
Mon Jan 8 10:53:47 MST 2018


Hi,

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?

Rick

On Mon, Jan 8, 2018 at 5:20 AM, Ty Buckingham via ncl-talk <
ncl-talk at ucar.edu> wrote:

> Hi there,
>
> 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.
>
> Any help?
>
> Thanks in advance,
> Ty
>
> NCL version: 6.4.0
>
> Script:
>
>
>
> begin
>
>
> a = addfile("wrfout_d04_2007-09-24_05:00:00.nc","r")
>
>
> ; type = "x11"
>
>   type = "pdf"
>
> ; type = "ps"
>
> ; type = "ncgm"
>
>
> wks = gsn_open_wks(type,"vort_loop_0500-0600")
>
> setvalues NhlGetWorkspaceObjectId()
>
>     "wsMaximumSize" : 300000000
>
> end setvalues
>
>
>   pltres                             = True
>
>   mpres                              = True
>
>   mpres at mpOutlineOn                  = True
>
>   mpres at gsnMaximize                  = True
>
>   mpres at mpFillOn                     = False
>
>   mpres at mpGeophysicalLineThicknessF  = 2.0
>
>   mpres at mpGeophysicalLineColor       = "Black"
>
>
> ;***********************************************
>
> ; plot controls
>
> ;***********************************************
>
>
>   res          = True
>
>   res at gsnDraw  = False
>
>   res at gsnFrame = False
>
>
> ; res at cnFillPalette        = "BlueDarkRed18"    ; custom colours. Default
> is good enough for avo.
>
>   res at cnFillOn             = True               ; turns on the color
>
>   res at cnLinesOn            = False              ; turn off contour lines
>
>
>   res at cnLevelSelectionMode = "ManualLevels"     ; set manual contour
> levels
>
>   res at cnMinLevelValF       = -0.018             ; set min contour level
>
>   res at cnMaxLevelValF       = 0.018              ; set max contour level
>
>   res at cnLevelSpacingF      = 0.002              ; set contour spacing
>
>
>   res at lbTitleOn            =  True                          ; turn on
> title
>
>   res at lbTitleString        = "Absolute Vorticity (1/s)"     ; title string
>
>   res at pmLabelBarOrthogonalPosF = -0.05                      ; distances
> label bar
>
>
> ;**********************************************
>
> ; Begin loop
>
> ;**********************************************
>
>
> times = wrf_user_list_times(a)     ; get times in the file
>
> ntimes = dimsizes(times)           ; number of times in the file
>
> do it = 0,ntimes-1                 ; loop
>
>
> print("Working on time: " + times(it) )
>
> res at TimeLabel = times(it) ; Set Valid time to use on plots
>
>
> avo = wrf_user_getvar(a,"avo",time)
>
> z = wrf_user_getvar(a,"z",time)
>
>
> height = 500.
>
> avo_plane = wrf_user_intrp3d(avo,z,"h",height,0.,False)    ; Interpolates
> avo to height
>
> avo_plane1 = avo_plane/100000
>
>
> contour = wrf_contour(a,wks,avo_plane1,res)
>
> plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)
>
>
> end do
>
>
> end
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180108/0940b8d3/attachment.html>


More information about the ncl-talk mailing list