[ncl-talk] "Noise" when plotting station data
Meina Wang
mnawang at ucdavis.edu
Wed Jul 12 15:23:08 MDT 2017
Dear David,
Thank you for your explanation! I'll mask out the California domain to get
rid of the strips.
Best,
Meina
On Wed, Jul 12, 2017 at 12:14 PM, David Brown <dbrown at ucar.edu> wrote:
> It is a "feature" of the triangular mesh contouring method (in effect
> whenever you use non-gridded data) that it fills the convex hull
> (https://en.wikipedia.org/wiki/Convex_hull) of your data. The boundary
> of California is concave in the region depicted, but the contouring
> algorithm has no way to know where this boundary is, and thus the
> appearance of drawing outside the lines.
> The only way to avoid this is to mask around the borders of
> California. There are examples of how to do this on the web site. See
> http://www.ncl.ucar.edu/Applications/mask.shtml, particularly
> mask_8.ncl or mask_11.ncl.
> -dave
>
>
> On Wed, Jul 12, 2017 at 12:26 PM, Meina Wang <mnawang at ucdavis.edu> wrote:
> > Dear Mary,
> >
> > Thank you for your reply!
> >
> > I've actually used the setting res at cnFillMode = "RasterFill" in the
> plotted
> > attached but still got the "streaking" over Nevada. I just tried with
> > smooth contour setting (please see attached below) and still got the
> noise
> > there. I could map out the rest of the region except California, but
> still
> > curious if this could be fixed. Please let me know if you have any
> > suggestions. Thank you.
> >
> >
> > Best,
> > Meina
> >
> > On Wed, Jul 12, 2017 at 9:52 AM, Mary Haley <haley at ucar.edu> wrote:
> >>
> >> Hi Meina,
> >>
> >> The "streaking" that's occurring I think is because when you plot random
> >> data using NCL, it is trying to smooth the data by default, using a
> >> non-convex polygon that encloses all your data points.
> >>
> >> Try drawing raster contours instead, by setting:
> >>
> >> res at cnFillMode = "RasterFill" ; draw raster contours instead of
> >> smoothed contours
> >>
> >> If you want to mask all areas except California, see example mask_8.ncl
> >> which is similar:
> >>
> >> http://www.ncl.ucar.edu/Applications/mask.shtml#ex8
> >>
> >> I think in your case you could set:
> >>
> >> res at mpDataBaseVersion = "MediumRes"
> >> res at mpFillAreaSpecifiers = (/"Land", "California","Water"/)
> >> res at mpSpecifiedFillColors = (/"white","transparent","white"/)
> >> res at cnFillDrawOrder = "PreDraw" ; Make sure map fill
> >> happens
> >> ; last.
> >>
> >> I will update the station_1 example to reflect the difference b/w smooth
> >> and raster fill.
> >>
> >>
> >> --Mary
> >>
> >>
> >>
> >>
> >> On Tue, Jul 11, 2017 at 9:00 PM, Meina Wang <mnawang at ucdavis.edu>
> wrote:
> >>>
> >>> Dear NCL users:
> >>>
> >>> I ran into a problem when trying to use the function
> >>> gsn_csm_contour_map_ce to plot station data (with latitude and
> longitude).
> >>> I followed this example form NCL website and got the figure with
> "noise"
> >>> over region where there is no input data point (over Nevada). The
> plot is
> >>> attached below, with black dots showing the data points, and color
> contour
> >>> underneath is plotted from gsn_csm_contour_map_ce function, so there
> is no
> >>> data over Nevada, while the function still extrapolate values over
> there.
> >>>
> >>> Below are the main res setting for plotting station data:
> >>>
> >>> res at sfXArray = lons
> >>>
> >>> res at sfYArray = lats
> >>>
> >>>
> >>> plot=gsn_csm_contour_map_ce(wks,w,res1)
> >>>
> >>>
> >>> Has any one had this problem before? Any thoughts or suggestion is
> much
> >>> appreciated! Thank you.
> >>>
> >>> Best,
> >>> Meina
> >>>
> >>> --
> >>> Meina Wang
> >>> PhD candidate in Atmospheric Science
> >>> Department of Land, Air and Water Resources
> >>> University of California, Davis
> >>> Davis, CA 95616
> >>>
> >>> _______________________________________________
> >>> ncl-talk mailing list
> >>> ncl-talk at ucar.edu
> >>> List instructions, subscriber options, unsubscribe:
> >>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >>>
> >>
> >
> >
> >
> > --
> > Meina Wang
> > PhD candidate in Atmospheric Science
> > Department of Land, Air and Water Resources
> > University of California, Davis
> > Davis, CA 95616
> >
> > _______________________________________________
> > ncl-talk mailing list
> > ncl-talk at ucar.edu
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
>
--
Meina Wang
PhD candidate in Atmospheric Science
Department of Land, Air and Water Resources
University of California, Davis
Davis, CA 95616
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170712/7d216ca5/attachment.html
More information about the ncl-talk
mailing list