<div dir="ltr">Zilore,<br><br>Sorry, that example #1 is not set up correctly for your kind of data.  Try the attached script.  This is another triangular mesh example that does use need extra coordinate arrays.<br><br>If you still want to regrid, then I found that ESMF regridding example works easily with your sample data.<br>
<br><a href="http://www.ncl.ucar.edu/Applications/ESMF.shtml#ex21">http://www.ncl.ucar.edu/Applications/ESMF.shtml#ex21</a><br><br>--Dave<br><br><br>On Sat, Jul 26, 2014 at 5:24 PM, Dave Allured - NOAA Affiliate &lt;<a href="mailto:dave.allured@noaa.gov">dave.allured@noaa.gov</a>&gt; wrote:<br>
&gt;<br>&gt; Zilore,<br>&gt;<br>&gt; Please look at the first example on the Station Data example page:<br>&gt; <a href="http://www.ncl.ucar.edu/Applications/station.shtml">http://www.ncl.ucar.edu/Applications/station.shtml</a><br>
&gt;<br>&gt; You said that you wanted to plot contours.  This simple example plots contours WITHOUT first putting data on a regular grid.  It uses a triangular mesh plotting technique.  For irregular coordinates, this technique will actually make a more accurate contour map than one made from a regular grid.<br>
&gt;<br>&gt; Will this example meet your needs?  My apologies if this was already discussed previously.<br>&gt;<br>&gt; --Dave<br>&gt;<br>&gt;<br>&gt; On Sat, Jul 26, 2014 at 4:40 PM, zilore mumba &lt;<a href="mailto:zmumba@yahoo.com">zmumba@yahoo.com</a>&gt; wrote:<br>
&gt;&gt;<br>&gt;&gt; I have x,y,z data on an irregularly spaced geographical grid, which I want to put on a regular grid to be able to plot contours.<br>&gt;&gt; My data is below (id, long., lat., rainfall).<br>&gt;&gt; 01  28.92  -2.47  286.5<br>
&gt;&gt; 02  29.02  -2.68  168.8<br>&gt;&gt; 03  29.25  -1.67  243.4<br>&gt;&gt; 04  29.42  -2.07  204.9<br>&gt;&gt; 05  29.55  -1.58  286.9<br>&gt;&gt; 06  29.57  -2.48  230.<br>&gt;&gt; 07  29.6   -1.5   177.5<br>&gt;&gt; 08  29.72  -2.18  290.<br>
&gt;&gt; 09  30.05  -1.6   206.5<br>&gt;&gt; 10  30.13  -1.97  178.1<br>&gt;&gt; 11  30.5   -2.15  156.7<br>&gt;&gt; My sincere apologies because this is a question I already asked more than 6 months ago and I still have not found a solution.<br>
&gt;&gt; The question is: Is it possible to do what I want to do in ncl?<br>&gt;&gt; 1. I have tried 2dgrid.ncl which seems to but am not able to figure out how to write output to file, and the z values all seem to be above 370 (well above what I have in my file).<br>
&gt;&gt; 2. I have try the Fortran single precision linear interpolation at Natgrid Examples and run the fortran program with ncargf77 filename I get the errors below:<br>&gt;&gt; Advice will be appreciated.<br>&gt;&gt;<br>
&gt;&gt; ncargf77 natgrid.f<br>&gt;&gt; gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O natgrid.f -L/usr/local/lib -L/usr/X11R6/lib64 -lncarg -lncarg_gks -lncarg_c -lX11 -lXext -lcairo -lfontconfig -lpixman-1 -lfreetype -lexpat -lpng -lz -liconv -lXrender -lbz2<br>
&gt;&gt; /usr/bin/ld: cannot find -lX11<br>&gt;&gt; /usr/bin/ld: cannot find -lXext<br>&gt;&gt; /usr/bin/ld: cannot find -lcairo<br>&gt;&gt; /usr/bin/ld: cannot find -lfontconfig<br>&gt;&gt; /usr/bin/ld: cannot find -lpixman-1<br>
&gt;&gt; /usr/bin/ld: cannot find -lfreetype<br>&gt;&gt; /usr/bin/ld: cannot find -lexpat<br>&gt;&gt; /usr/bin/ld: cannot find -liconv<br>&gt;&gt; /usr/bin/ld: cannot find -lXrender<br>&gt;&gt; /usr/bin/ld: cannot find -lbz2<br>
&gt;&gt; collect2: error: ld returned 1 exit status<br>&gt;&gt;<br>&gt;&gt;  <br>&gt;&gt;  <br>&gt;&gt;  <br>&gt;&gt;  <br>&gt;&gt;  <br>&gt;&gt;  <br>&gt;&gt; Natgrid Examples<br>&gt;&gt; Natgrid examples Overview This module contains source codes for all of the examples referenced by the other modules in the documentation. Links to all of the example plots are provided.<br>
&gt;&gt; View on <a href="http://w3.pppl.gov">w3.pppl.gov</a><br>&gt;&gt; Preview by Yahoo<br><br></div>