[ncl-talk] plot optimization?

Adam Phillips asphilli at ucar.edu
Thu Aug 20 15:11:58 MDT 2015


Hi Izidine,
Thank you for providing your data via dropbox as it helped me to quickly
diagnose the issue.

In this case, I think the slowdown is happening because you are telling NCL
to create ~20 contours in your plotB* plots. Even though you are telling
NCL to not draw the lines, their positioning is still computed when you
call ShadeLtContour, and the contouring gets quite dense. The contouring is
what is taking so long. The solution is to create fewer contours.

Change these lines:
res2 at cnLevelSelectionMode = "ManualLevels"
res2 at cnMinLevelValF       = 0.00
res2 at cnMaxLevelValF       = 1.05
res2 at cnLevelSpacingF      = 0.045

to these lines:
res2 at cnLevelSelectionMode = "ExplicitLevels"
res2 at cnLevels = 0.045

I did that and the plots came out quite quickly.

If you have any further questions please respond to the ncl-talk list.
Adam



On Wed, Aug 19, 2015 at 4:17 AM, Izidine Pinto <izidinep at gmail.com> wrote:

> Dear NCL users
>
> I'm plotting precipitation trends and overlying with the probability
> (p<0.05)
>  .....
>     plotA0 = gsn_csm_contour_map_ce(wks,trend_jjas,res)
>     plotB0 = gsn_csm_contour(wks,prob_jjas,res2)
>     plotB0 = ShadeLtContour(plotB0, 0.0499, 17)       ; shade all areas
> less than the 0.05
>  .....
>
> However, when it comes to create the panel plot it takes around 2 hours
> just to print the figure in .eps
>
> Is there any way to improve this time or I'm doing something wrong in the
> script?
>
> I've attached the working example and the data can be found here (
> https://www.dropbox.com/sh/1srk2adshj8f4n0/AAA8J9L-hEhZshCsXkCAFycua?dl=0)
>
> Thank you
>  Izidine
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://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: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150820/0df1ea9c/attachment.html 


More information about the ncl-talk mailing list