<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 <<a href="mailto:dave.allured@noaa.gov">dave.allured@noaa.gov</a>> wrote:<br>
><br>> Zilore,<br>><br>> Please look at the first example on the Station Data example page:<br>> <a href="http://www.ncl.ucar.edu/Applications/station.shtml">http://www.ncl.ucar.edu/Applications/station.shtml</a><br>
><br>> 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>
><br>> Will this example meet your needs? My apologies if this was already discussed previously.<br>><br>> --Dave<br>><br>><br>> On Sat, Jul 26, 2014 at 4:40 PM, zilore mumba <<a href="mailto:zmumba@yahoo.com">zmumba@yahoo.com</a>> wrote:<br>
>><br>>> 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>>> My data is below (id, long., lat., rainfall).<br>>> 01 28.92 -2.47 286.5<br>
>> 02 29.02 -2.68 168.8<br>>> 03 29.25 -1.67 243.4<br>>> 04 29.42 -2.07 204.9<br>>> 05 29.55 -1.58 286.9<br>>> 06 29.57 -2.48 230.<br>>> 07 29.6 -1.5 177.5<br>>> 08 29.72 -2.18 290.<br>
>> 09 30.05 -1.6 206.5<br>>> 10 30.13 -1.97 178.1<br>>> 11 30.5 -2.15 156.7<br>>> 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>
>> The question is: Is it possible to do what I want to do in ncl?<br>>> 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>
>> 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>>> Advice will be appreciated.<br>>><br>
>> ncargf77 natgrid.f<br>>> 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>
>> /usr/bin/ld: cannot find -lX11<br>>> /usr/bin/ld: cannot find -lXext<br>>> /usr/bin/ld: cannot find -lcairo<br>>> /usr/bin/ld: cannot find -lfontconfig<br>>> /usr/bin/ld: cannot find -lpixman-1<br>
>> /usr/bin/ld: cannot find -lfreetype<br>>> /usr/bin/ld: cannot find -lexpat<br>>> /usr/bin/ld: cannot find -liconv<br>>> /usr/bin/ld: cannot find -lXrender<br>>> /usr/bin/ld: cannot find -lbz2<br>
>> collect2: error: ld returned 1 exit status<br>>><br>>> <br>>> <br>>> <br>>> <br>>> <br>>> <br>>> Natgrid Examples<br>>> 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>
>> View on <a href="http://w3.pppl.gov">w3.pppl.gov</a><br>>> Preview by Yahoo<br><br></div>