[ncl-talk] "Noise" when plotting station data
Mary Haley
haley at ucar.edu
Wed Jul 12 10:52:30 MDT 2017
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_c
> e to plot station data (with latitude and longitude). I followed this
> example <https://www.ncl.ucar.edu/Applications/Scripts/station_1.ncl>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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170712/201a0d5d/attachment.html
More information about the ncl-talk
mailing list