<div dir="ltr"><div><div><div>I ttook a look at this.<br><br>[1]<br></div>Obviously, there are not many data points. Further, they are not well distributed. Unless there is a physical basis to guide extrapolating values beyond the data boundaries, you should go by the rule: All data extrapolation is dangerous and should be avoided. Use of extrapolated values on subsequent analysis tasks contaminates the results. In particular by people who do not know the original random data distribution.<br>


<br>[2]<br></div><div>Different interpolation algorithms, will yield different results depending of what method (eg, splines) are being used.<br><br>[3]<br></div><div>You mention &quot;<span>writing to binary and then contour in grads with which am more familiar.&quot;. I am sure GrADS has interpolation alogrithms for randomly based data. Not sure why these were not used.<br>

<br></span></div><div><span>Anyway, &#39;writing in binary&#39; ... GrADS can read flat binary (access=direct) or fortran sequential (fortran default).<br></span></div><div><span>Did you go to NCL&#39;s IO functions? [Under Functions: Click Category; then, File Input/Output] You would see NCL&#39;s suite of IO functions. The attached script uses fbinrecwrite (fortran sequential)<br>
<br></span></div><div><span>The attached script shows results from several NCL interpolating (regridding) functions. The ESMF is very strict in the sense it will not extrapolate beyond data boundaries. All othe points are set to _Fillvalue.<br>
<br></span></div><div><span>Respond only to ncl-talk.<br><br>===<br></span></div><div><span><a href="http://www.ncl.ucar.edu/Document/Manuals/">http://www.ncl.ucar.edu/Document/Manuals/</a><br></span></div><div><span>Download/Read: Mini-Language Manual<br>
<br></span></div><div><span>Good luck<br></span></div><div><span><br><br>
</span></div><div><br></div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jul 27, 2014 at 2:32 AM, zilore mumba <span dir="ltr">&lt;<a href="mailto:zmumba@yahoo.com" target="_blank">zmumba@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12pt">
<div><span>Dave,</span></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><span>Once more thanks very much for your effort and time. You have moved me closer to the solution. Please see, in the attachment, the output I get from the script you sent me.</span></div>
<div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><span>I will work with this and see if I can move. I have seen the ESMF gridding examples, they can take me ages to decipher what to do.</span></div>
<div><div class="h5"> <div><br><br></div><div style="display:block"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12pt"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12pt">
 <div dir="ltr"> <font face="Arial"> On Sunday, July 27, 2014 3:13 AM, Dave Allured - NOAA Affiliate &lt;<a href="mailto:dave.allured@noaa.gov" target="_blank">dave.allured@noaa.gov</a>&gt; wrote:<br> </font> </div>  <br>
<br> <div><div><div><div dir="ltr">Zilore,<br clear="none"><br clear="none">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 clear="none">
<br clear="none">If you still want to regrid, then I found that ESMF regridding example works easily with your sample data.<br clear="none">
<br clear="none"><a rel="nofollow" shape="rect" href="http://www.ncl.ucar.edu/Applications/ESMF.shtml#ex21" target="_blank">http://www.ncl.ucar.edu/Applications/ESMF.shtml#ex21</a><br clear="none"><br clear="none">--Dave<br clear="none">
<br clear="none"><div><br clear="none">On Sat, Jul 26, 2014 at 5:24 PM, Dave Allured - NOAA Affiliate &lt;<a rel="nofollow" shape="rect" href="mailto:dave.allured@noaa.gov" target="_blank">dave.allured@noaa.gov</a>&gt; wrote:<br clear="none">

&gt;<br clear="none">&gt; Zilore,<br clear="none">&gt;<br clear="none">&gt; Please look at the first example on the Station Data example page:<br clear="none">&gt; <a rel="nofollow" shape="rect" href="http://www.ncl.ucar.edu/Applications/station.shtml" target="_blank">http://www.ncl.ucar.edu/Applications/station.shtml</a><br clear="none">

&gt;<br clear="none">&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 clear="none">

&gt;<br clear="none">&gt; Will this example meet your needs?  My apologies if this was already discussed previously.<br clear="none">&gt;<br clear="none">&gt; --Dave<br clear="none">&gt;<br clear="none">&gt;<br clear="none">
&gt; On Sat, Jul 26, 2014 at 4:40 PM, zilore mumba &lt;<a rel="nofollow" shape="rect" href="mailto:zmumba@yahoo.com" target="_blank">zmumba@yahoo.com</a>&gt; wrote:<br clear="none">
&gt;&gt;<br clear="none">&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 clear="none">&gt;&gt; My data is below (id, long., lat., rainfall).<br clear="none">
&gt;&gt; 01  28.92  -2.47  286.5<br clear="none">
&gt;&gt; 02  29.02  -2.68  168.8<br clear="none">&gt;&gt; 03  29.25  -1.67  243.4<br clear="none">&gt;&gt; 04  29.42  -2.07  204.9<br clear="none">&gt;&gt; 05  29.55  -1.58  286.9<br clear="none">&gt;&gt; 06  29.57  -2.48  230.<br clear="none">
&gt;&gt; 07  29.6   -1.5   177.5<br clear="none">&gt;&gt; 08  29.72  -2.18  290.<br clear="none">
&gt;&gt; 09  30.05  -1.6   206.5<br clear="none">&gt;&gt; 10  30.13  -1.97  178.1<br clear="none">&gt;&gt; <a href="tel:11%20%C2%A030.5%20%C2%A0%20-2.15%20%C2%A0156.7" value="+13052151567" target="_blank">11  30.5   -2.15  156.7</a><br clear="none">
&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 clear="none">
&gt;&gt; The question is: Is it possible to do what I want to do in ncl?<br clear="none">&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 clear="none">

&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 clear="none">&gt;&gt; Advice will be appreciated.<br clear="none">
&gt;&gt;<br clear="none">
&gt;&gt; ncargf77 natgrid.f<br clear="none">&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 clear="none">

&gt;&gt; /usr/bin/ld: cannot find -lX11<br clear="none">&gt;&gt; /usr/bin/ld: cannot find -lXext<br clear="none">&gt;&gt; /usr/bin/ld: cannot find -lcairo<br clear="none">&gt;&gt; /usr/bin/ld: cannot find -lfontconfig<br clear="none">
&gt;&gt; /usr/bin/ld: cannot find -lpixman-1<br clear="none">
&gt;&gt; /usr/bin/ld: cannot find -lfreetype<br clear="none">&gt;&gt; /usr/bin/ld: cannot find -lexpat<br clear="none">&gt;&gt; /usr/bin/ld: cannot find -liconv<br clear="none">&gt;&gt; /usr/bin/ld: cannot find -lXrender<br clear="none">
&gt;&gt; /usr/bin/ld: cannot find -lbz2<br clear="none">
&gt;&gt; collect2: error: ld returned 1 exit status<br clear="none">&gt;&gt;<br clear="none">&gt;&gt;  <br clear="none">&gt;&gt;  <br clear="none">&gt;&gt;  <br clear="none">&gt;&gt;  <br clear="none">&gt;&gt;  <br clear="none">
&gt;&gt;  <br clear="none">&gt;&gt; Natgrid Examples<br clear="none">&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 clear="none">

&gt;&gt; View on <a rel="nofollow" shape="rect" href="http://w3.pppl.gov/" target="_blank">w3.pppl.gov</a><br clear="none">&gt;&gt; Preview by Yahoo<br clear="none"><br clear="none"></div></div></div></div><br><br></div>
  </div> </div>  </div> </div></div></div></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>