[ncl-talk] using gsn_coordinates with panel plots

Adam Phillips asphilli at ucar.edu
Fri Aug 3 09:24:53 MDT 2018


Hi Laura,
You do not need to use gsn_coordinates to handle missing values in panel
(or single) plots. If your plot call is hanging, there's two possibilities
that stand out above others:
1) You have very tight gradients in your data, whether due to chosen
contour levels, a high data resolution, or spatially highly variable data.
If this is the case, try setting cnFillMode = "RasterFill"
(and  cnRasterSmoothingOn = True if you want smoothed fields). You can also
try smoothing your data (using smth9_Wrap for example), and changing your
contour levels. Perhaps most importantly, check that your _FIllValue
attribute is set correctly.
2) Your data has NaN's in it. Check for this by using isnan_ieee.

If you continue to have issues let ncl-talk know..
Adam

On Fri, Aug 3, 2018 at 9:00 AM Laura Fowler <laura at ucar.edu> wrote:

> Hello:
>
> I wrote a ncl script to make a panel plot (/3,2)/). Initially, none of the
> individual plots (plot(0), plot(1),...) contains missing data. Now, when I
> plot two of the individual plots (plot(0), plot(1),...) with data that
> contains missing values, then the same script hangs forever, or so it seems.
>
> After reading the documentation, it looks like I may need to use
> gsn_coordinates to handle missing values in a panel plot. So I added the
> following lines below each call so that I have:
>
>
> pres = True
>
> pres at gsnCoordsAttach = True
>
>
> res at gsnLeftString  = left_strs(0)
>
> res at gsnRightString = right_strs(0)
>
> res at gsnLeftStringParallelPosF = -0.09
>
> plot(0) = gsn_csm_contour_map(wks,lwd_a,res)
>
> gsn_coordinates(wks,plot(0),lwd_a,pres)
>
>
> res at gsnLeftString  = left_strs(1)
>
> res at gsnRightString = right_strs(1)
>
> res at gsnLeftStringParallelPosF = -0.09
>
> plot(1) = gsn_csm_contour_map(wks,lwj_a,res)
>
> gsn_coordinates(wks,plot(1),lwj_a,pres)
> .
> .
> .
>
> But the script still hangs? Is there anything else that I need to do?
>
> Thanks,
> Laura
>
>
> --
>
> !-------------------------------------------------------------------------------------------------------------
> Laura D. Fowler
>
> Mesoscale and Microscale Meteorology Division (MMM)
> National Center for Atmospheric Research
> P.O. Box 3000, Boulder CO 80307-3000
>
> e-mail: laura at ucar.edu
> phone: 303-497-1628
>
>
> !-------------------------------------------------------------------------------------------------------------
> _______________________________________________
> 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/20180803/e73500f2/attachment.html>


More information about the ncl-talk mailing list