[ncl-talk] Problem with

Mary Haley haley at ucar.edu
Fri Jul 27 16:29:06 MDT 2018


Hi Melissa,

Sorry for the delay. The NCL team has been particularly busy getting ready
for a meeting next week.

Part of the problem maybe this line, which only works with NCL V6.5.0:

    res at tfDoNDCOverlay              = "NDCViewport"

If you have NCL Version 6.4.0 or earlier, then change that line to:

    res at tfDoNDCOverlay              = True

The second line will work with any version of NCL. It was in NCL V6.5.0
where we added recognition of the string version of that resource.

If you continue to have problems, please reply back to ncl-talk and let us
know what version of NCL you are using, and any new error message you might
be getting.

It helps to know what version of NCL so we can check the line number that
the error is giving you.

Thanks,

--Mary



On Wed, Jul 25, 2018 at 1:22 PM, MELISSA KAZEMI RAD <
mk1369 at scarletmail.rutgers.edu> wrote:

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


More information about the ncl-talk mailing list