<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">Hi,<br><br></div><div class="gmail_default" style="font-family:georgia,serif">I am having a problem with panel plotting wrfout results. Here is my NCL code:<br><br><br clear="all"></div><div style="font-family:georgia,serif" class="gmail_default">​load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br> load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"<br>;----------------------------------------------------------------------<br> ; Main code<br> ;----------------------------------------------------------------------<br> begin<br>  a = addfile("<a href="http://wrfout_d03_2017-07-17_06_00_00.nc">wrfout_d03_2017-07-17_06_00_00.nc</a>","r")<br><br>    type = "png"<br>    wks = gsn_open_wks(type,"Cloud")<br><br>    times  = wrf_user_list_times(a)<br>    time = 166<br><br>    p    = wrf_user_getvar(a, "pressure", time)    ; Total Pressure<br>    qc   = wrf_user_getvar(a,"QCLOUD", time)<br><br>    qc       = qc*1000.<br>    qc@units = "g/kg"<br><br>    res                     = True<br>    res@gsnMaximize         = True<br>    res@cnFillOn            = True<br>    res@cnFillPalette       = "WhBlGrYeRe"<br>    res@cnLinesOn           = False<br><br><br>    res                             = wrf_map_resources(a,res)<br>    res@gsnAddCyclic                = False<br>    res@tfDoNDCOverlay              = "NDCViewport"<br><br>;-- For Individual Plots:<br>    res@gsnDraw                     = False<br>    res@gsnFrame                    = False<br>    res@lbLabelBarOn                = False<br><br>    mnmxint                   = nice_mnmxintvl( min(qc), max(qc), 14, False)<br>    res@cnLevelSelectionMode  = "ManualLevels"<br>    res@cnMinLevelValF        = mnmxint(0)<br>    res@cnMaxLevelValF        = mnmxint(1)<br>    res@cnLevelSpacingF       = mnmxint(2)/2.    ; twice as many levels<br><br>    height_levels = (/500., 750., 1000., 1500./)   ; heigth levels to plot<br>    nlevels         = dimsizes(height_levels)     ; number of height levels<br><br>    nplots     = 4<br>    plots      = new(nplots,"graphic")<br>    plot_idxs  = (/0,1,2,3/)<br><br>    do level  = 0,nlevels-1<br><br>       height = height_levels(level)<br>       qc_plane = wrf_user_intrp3d(qc,p,"h",height,0.,False)<br>       res@gsnLeftString = height<br>       plots(level) = gsn_csm_contour_map(wks, (/qc_plane/), res)<br>   end do<br><br>​; Panel the WRF Plots:<br><br>   pnlres                                 = True<br>   pnlres@gsnPanelLabelBar   = True<br>   pnlres@gsnMaximize          = True<br>   pnlres@gsnPanelMainString       = "Cloud Water Mixing Ratio (g/kg): " + times(time)<br><br>   gsn_panel(wks, plots, (/2,2/), pnlres)<br><br>end<br></div><br><br><div style="font-family:georgia,serif" class="gmail_default">​Below is the error that I get:​</div><br><div style="font-family:georgia,serif" class="gmail_default">​fatal:Conditional statements (if and do while) require SCALAR logical values, see all and any functions<br>fatal:["Execute.c":8640]:Execute: Error occurred at or near line 1809 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl<br><br>fatal:["Execute.c":8640]:Execute: Error occurred at or near line 7994 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl<br><br>fatal:["Execute.c":8640]:Execute: Error occurred at or near line 11287 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl<br><br>fatal:["Execute.c":8640]:Execute: Error occurred at or near line 69 in file Cloud.ncl<br><br></div><div style="font-family:georgia,serif" class="gmail_default">​Line 69 being:  plots(level) = gsn_csm_contour_map(wks, (/qc_plane/), res)<br><br></div><div style="font-family:georgia,serif" class="gmail_default">I'd appreciate your help.<br><br></div><div style="font-family:georgia,serif" class="gmail_default">Bests,<br></div><div style="font-family:georgia,serif" class="gmail_default">Melissa<br></div><div style="font-family:georgia,serif" class="gmail_default"><br></div><br>-- <br><div class="gmail_signature"><div dir="ltr"><font face="georgia, serif"><i>Melissa Kazemi Rad</i></font><div><font face="georgia, serif"><i>Atmospheric Sciences Department</i></font></div><div><font face="georgia, serif"><i>Rutgers University</i></font></div></div></div>
</div>