<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Thanks for your answer.<br>
I tried to regrid the data with ESMF. I'm happy with the results.
Find attached pic ("regrid.png").<br>
I think best result is the third plot (regrid with patch). Or what
do you think? <br>
Maybe also plot 2, because the patch-plot lost some data information
when it "smoothes" the contour (see in the middle "-11.2").<br>
All plots use "AreaFill"-mode. <br>
<br>
Lastly, I wanted to test "<b>natgrid</b>", which fails. My code is
as follows:<br>
<br>
<font size="-2" face="Courier New">numxout = 50 ; Define output
grid for call to "natgrids"<br>
numyout = 50<br>
xmin = min(lon)<br>
xmax = max(lon)<br>
ymin = min(lat)<br>
ymax = max(lat)<br>
xc = (xmax-xmin)/(numxout-1)<br>
yc = (ymax-ymin)/(numyout-1)<br>
xi = xmin + ispan(0,numxout-1,1)*xc<br>
yi = ymin + ispan(0,numyout-1,1)*yc<br>
<br>
zgrd = <b>natgrid</b>(lon, lat, data, xi, yi)<br>
znat = transpose(zgrd)<br>
<br>
znat@lat1d = yi<br>
znat@lon1d = xi<br>
<br>
plot = gsn_csm_contour_map(wks,znat,res)<br>
</font><br>
My problem is that natgrid creates a 2D-Array with the new data
values. No idea how how to pass "znat" to the contour function?<br>
Can you help.<br>
<br>
Regards,<br>
MeteoBB<br>
<br>
<div class="moz-cite-prefix">Am 05.02.2019 um 21:09 schrieb Dennis
Shea:<br>
</div>
<blockquote type="cite"
cite="mid:CAOF1d_6OsfCkU6k2b=oFruua7s2YwzaVnMj9ioGMCHG1UBJ+kg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>interpolation For plotting,
interpolation to a grid is <b>NOT</b>
necessary.</div>
<div><br>
</div>
<div dir="ltr"><a
href="http://www.ncl.ucar.edu/Applications/station.shtml"
target="_blank" moz-do-not-send="true"><b>http://www.ncl.ucar.edu/Applications/station.shtml</b></a></div>
<div>Example 1</div>
<div>============</div>
<div><a
href="http://www.ncl.ucar.edu/Applications/contour1d.shtml"
target="_blank" moz-do-not-send="true"><b>http://www.ncl.ucar.edu/Applications/contour1d.shtml</b></a></div>
<div>Examples 1 & 3</div>
<div>===============================================<br>
</div>
<div>Keep in mind, <b>if you do not have
physics to guide you</b><br>
</div>
<div><br>
</div>
<div>(1) there is *no substitute* for lots
of data points.</div>
<div>(2) extrapolation is *always*
dangerous<br>
</div>
<div>================================================</div>
<div><b>Unstructured to Grid:</b></div>
<div><br>
</div>
<div><a
href="https://www.ncl.ucar.edu/Applications/ESMF.shtml"
target="_blank" moz-do-not-send="true"><b>https://www.ncl.ucar.edu/Applications/ESMF.shtml<br>
</b></a></div>
<div>Example 21<br>
</div>
<div>=====</div>
<div>
<div><a
href="http://www.ncl.ucar.edu/Applications/contour1d.shtml"
target="_blank"
moz-do-not-send="true"><b>http://www.ncl.ucar.edu/Applications/contour1d.shtml</b></a></div>
</div>
<div><br>
</div>
<div>Some <b>interpolation</b> functions
that may be of use.<br>
</div>
<div><b><br>
</b></div>
<div><a
href="http://www.ncl.ucar.edu/Document/Functions/Contributed/cssgrid_Wrap.shtml"
target="_blank" moz-do-not-send="true"><b>http://www.ncl.ucar.edu/Document/Functions/Contributed/cssgrid_Wrap.shtml</b></a><br>
</div>
<div><a
href="http://www.ncl.ucar.edu/Document/Functions/Contributed/obj_anal_ic_Wrap.shtml"
target="_blank" moz-do-not-send="true"><b>http://www.ncl.ucar.edu/Document/Functions/Contributed/obj_anal_ic_Wrap.shtml</b></a></div>
<div><a
href="https://www.ncl.ucar.edu/Document/Functions/Contributed/triple2grid_Wrap.shtml"
target="_blank" moz-do-not-send="true"><b>https://www.ncl.ucar.edu/Document/Functions/Contributed/triple2grid_Wrap.shtml</b></a></div>
<div><br>
</div>
<div><b>See Examples 3 & 4</b></div>
<div><a
href="https://www.ncl.ucar.edu/Applications/rdm2grid.shtml#ex3"
target="_blank" moz-do-not-send="true"><b>https://www.ncl.ucar.edu/Applications/rdm2grid.shtml#ex3</b></a><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Feb 5, 2019 at 11:53
AM MeteoBB <<a href="mailto:info@meteo-bb.de"
target="_blank" moz-do-not-send="true">info@meteo-bb.de</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF"> Thx Rick for your quick response.<br>
<br>
Playing a little bit with the smooth-Parameter of the
cn-resources yields the plot attached.<br>
<font face="Courier New"><br>
<b>res@cnSmoothingOn = True</b><b><br>
</b><b>res@cnSmoothingDistanceF = 0.005 ;(usw 0.005 ...
0.03)</b></font><br>
<br>
An area left is getting colored. (there is no station!)<br>
This is risky i think, if I set the parameter (hardcoded). I
never know what the graphics will look like.<br>
<br>
Do you think i should try interpolate the station data from
my unstructured grid to a rectilinear grid using <b>natgrid</b>?
<br>
<br>
MeteoBB<br>
<br>
<div
class="gmail-m_-523433163998621343gmail-m_288553170242397455gmail-m_5378693543236316164moz-cite-prefix">Am
05.02.2019 um 19:04 schrieb Rick Brownrigg:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>You might take a look at the several resources
associated with "<strong>cnSmoothingOn" <br>
</strong></div>
<div><br>
</div>
<div>HTH...Rick<br>
</div>
<div><strong></strong></div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Feb 5, 2019 at
10:22 AM MeteoBB <<a href="mailto:info@meteo-bb.de"
target="_blank" moz-do-not-send="true">info@meteo-bb.de</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px
0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF"> Hello,<br>
<br>
I tried to plot station data of surface temperature
on a map as a contour plot. I'm not satisfied with
the result (see attached picture AreaFill.png).<br>
It all seems so angular. My grid is not regular
because of the station data. <br>
<br>
Switching from AreaFill to RasterFill results in a
litte better plot (smooth contours) as you can see
in the picture attached (RasterFill.png).<br>
<b><font face="Courier New">res@cnFillMode =
"AreaFill"<br>
res@cnFillMode = "RasterFill"</font></b><br>
<br>
I tried to regrid the triangular mesh (unstructured)
station data to a structured grid using <b>natgrid</b>?<br>
But it fails ...<br>
<br>
Do you have any ideas for a better plot? Or what is
the correct way to plot such station data as
contour?<br>
<br>
Regards<br>
MeteoBB<br>
</div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank"
moz-do-not-send="true">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a
href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk"
rel="noreferrer" target="_blank"
moz-do-not-send="true">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote>
</div>
</blockquote>
<br>
</div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank"
moz-do-not-send="true">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>