[ncl-talk] 'gsn_csm_pres_hgt_vector' hanging when trying to run an NCL script

Adam Phillips asphilli at ucar.edu
Wed Jan 27 15:44:38 MST 2021


Hi Chris,
I would guess that NCL is trying to draw many vectors in a tiny space, and
that that is why the plotting function call is just hanging. I would
suggest plotting every 2nd or 3rd vector and see if you can see any results:

*    plot(0) = gsn_csm_pres_hgt_vector(wks, Zonal_DJF_U_anomaly(::2,::2),
Zonal_DJF_vstar_anomaly(::2,::2), Zonal_DJF_wstar_anomaly(::2,::2), res)*

If that results in a plot, my guess was correct. You can also adjust the
vector lengths and thicknesses and such and/or set vcMinDistanceF to make
the vectors less dense. See the top of the vectors applications page here:
http://www.ncl.ucar.edu/Applications/vector.shtml
Hope that helps!
Adam

<http://www.ncl.ucar.edu/Applications/vector.shtml>


On Wed, Jan 27, 2021 at 12:38 PM Christopher Maloney via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> To whom it may concern,
>
>  I am trying to plot a pressure/height vs. latitude plot of zonal winds
> with WV wind vectors overlaid on top. I've been trying to follow the
> example shown in '
> https://www.ncl.ucar.edu/Applications/Scripts/vector_5.ncl' and use the
> 'gsn_csm_pres_hgt_vector' function, but every time the script gets to the
> point where it calls that function it just hangs and does nothing. I can
> successfully run 'gsn_csm_pres_hgt' and produce a plot with all of my
> variables so I know that they are formatted properly. I am using NCL
> version 6.6.2 so I don't think it is a version issue. I've pasted my
> plotting code below. Any advice would be greatly appreciated.
>
> Plotting Script (the script hangs on the first plot(0) call):
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *  wks = gsn_open_wks("png",
> "/Users/cmaloney/Other_NCL_scripts/images/zonal_avgs/diff_plots/" + runa +
> "_" + runDef + "seasonal_wind_anomalies")  plot = new(2,graphic)      res =
> True  res at gsnDraw = False  res at gsnFrame = False   res at cnFillOn         =
> True                  res at cnLinesOn        = False
> res at trYMinF          = 1.0    res at cnFillPalette     = "BlueDarkRed18"
>   res at lbTitleString    = "Delta (m/sec)"    res at lbTitlePosition  = "Bottom"
>      res at tiYAxisString     = "Pressure (hPa)"    res at tmYLMode = "Explicit"
>   res at tmYLValues = (/ 850, 500, 300, 200, 150, 100, 70, 50, 30, 10, 1 /)
> res at tmYLLabels = (/ "850", "500", "300", "200", "150", "100", "70", "50",
> "30", "10", "1" /)    res at cnLevelSelectionMode = "ManualLevels"
> res at cnMaxLevelValF       = 2    res at cnMinLevelValF       = -2
> res at cnLevelSpacingF      = 0.1    res at pmLabelBarOrthogonalPosF = 0.025
> res at vcMapDirection = False    res at vcGlyphStyle    = "CurlyVector"      ;
> turn on curly vectors       plot(0) = gsn_csm_pres_hgt_vector(wks,
> Zonal_DJF_U_anomaly, Zonal_DJF_vstar_anomaly, Zonal_DJF_wstar_anomaly,
> res)        plot(1) = gsn_csm_pres_hgt_vector(wks, Zonal_JJA_U_anomaly,
> Zonal_JJA_vstar_anomaly, Zonal_JJA_wstar_anomaly, res)  resP
>    = True  resP at gsnFrame         = False
> resP at gsnPanelLabelBar = True                    resP at lbLabelFontHeightF =
> 0.015   resP at gsnPanelBottom   = 0.2   resP at gsnPanelTop      = 0
> resP at gsnPanelYWhiteSpacePercent = 5.  resP at gsnPanelXWhiteSpacePercent = 5.
> resP at gsnPanelMainString = "Wind Anomalies"
> gsn_panel(wks,plot,(/1,2/),resP) *
>
> *    draw(plot)*
> *    frame(wks)*
>
>
>
> Thanks for your help,
> - Chris
>
> --
> Christopher Maloney
> Professional Research Associate
> CIRES at the University of Colorado/NOAA Chemical Sciences Lab
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk



-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210127/1188ab46/attachment.html>


More information about the ncl-talk mailing list