Re: Smoother?

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu Sep 15 2011 - 14:45:27 MDT

Hi Michael,
There's two ways to smooth the plot:
1) Use smth9_Wrap to smooth your data before plotting. This allows you
to have complete control over the amount of smoothing (heavy, light,
pass the data through the function a few times).
http://www.ncl.ucar.edu/Document/Functions/Contributed/smth9_Wrap.shtml

2) Set cnSmoothingOn = True, along with the cnSmoothingDistanceF
resource. You can also try setting cnSmoothingTensionF. I don't have
that much experience with these resources, so I can't offer suggested
settings..

http://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnSmoothingOn

Example #1 here uses cnSmoothingDistanceF:
http://www.ncl.ucar.edu/Applications/wrfhelicity.shtml
Hope that helps... Adam

On 09/15/2011 02:16 PM, Michael Notaro wrote:
> Is there any way to make the contours over Canada (where data is limited)
> smoother? The plot is attached and plotting portion of the script is below.
> Michael
>
> wks = gsn_open_wks("ps","obs_climo_map_ann_snowfall_expanded")
> setvalues wks
> "wkColorMap" : "rainbow+white"
> end setvalues
> plot=new(1,graphic)
>
> res = True
>
> res@gsnFrame=False
>
> res@cnLinesOn = False
> res@cnFillOn = True
> res@cnLineLabelsOn = False
>
> res@mpInlandWaterFillColor = "gray"
> res@mpOceanFillColor="gray"
> res@mpLandFillColor = -1
>
> res@cnFillDrawOrder="PreDraw"
> res@mpFillDrawOrder="Draw"
> res@cnLineDrawOrder="PostDraw"
>
> res@sfXArray = lon
> res@sfYArray = lat
>
> res@mpMinLatF = 37.
> res@mpMaxLatF = 50.
> res@mpMinLonF = -97.
> res@mpMaxLonF = -70.
>
> res@mpGeophysicalLineColor = 2
> res@mpPerimOn = True
> res@mpGridLineDashPattern = 2
> res@mpOutlineBoundarySets = "AllBoundaries"
> res@mpUSStateLineColor = "black"
> res@pmTickMarkDisplayMode = "Always"
>
> res@cnLevelSelectionMode = "ExplicitLevels"
> res@cnLevels = (/10.,50.,90.,130.,170.,210.,250.,290./)
> res@cnFillColors=(/237,200,187,177,238,97,80,47,20/)
> res@tiMainString="Obs Snowfall 1980-1999"
> plot(0) = gsn_csm_contour_map(wks,snow,res)
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
______________________________________________________________
Adam Phillips                                asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division       (303) 497-1726
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Sep 15 14:45:34 2011

This archive was generated by hypermail 2.1.8 : Fri Sep 16 2011 - 11:24:25 MDT