[ncl-talk] Regridding irregularly spaced data onto a regular grid

zilore mumba zmumba at yahoo.com
Sun Jul 27 01:07:47 MDT 2014


Thank you very much Dave. I actually saw this ncl resource but somehow I did not try it. I think it will serve my purpose. When I try the example it runs ok. Now I have to adapt it to my data and geographical area.
The thing is my mind was fixed on regridding in ncl, writing to binary and then contouring in grads, with which am more familiar. I was more familiar with ncarg in the 90's when it was more FORTRAN-based, but ncl is so rich in resources, I struggle to use it.



On Sunday, July 27, 2014 1:24 AM, Dave Allured - NOAA Affiliate <dave.allured at noaa.gov> wrote:
 


Zilore,

Please look at the first example on the Station Data example page:
http://www.ncl.ucar.edu/Applications/station.shtml


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.

Will this example meet your needs?  My apologies if this was already discussed previously.

--Dave



On Sat, Jul 26, 2014 at 4:40 PM, zilore mumba <zmumba at yahoo.com> wrote:

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.
>My data is below (id, long., lat., rainfall).
>01  28.92  -2.47  286.5
>02  29.02  -2.68  168.8
>03  29.25  -1.67  243.4
>04  29.42  -2.07  204.9
>05  29.55  -1.58  286.9
>06  29.57  -2.48  230.
>07  29.6   -1.5   177.5
>08  29.72  -2.18  290.
>09  30.05  -1.6   206.5
>10  30.13  -1.97  178.1
>11  30.5   -2.15  156.7
>My sincere apologies because this is a question I already asked more than 6 months ago and I still have not found a solution.
>The question is: Is it possible to do what I want to do in ncl?
>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).
>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:
>Advice will be appreciated.
>
>
>ncargf77 natgrid.f
>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
>/usr/bin/ld: cannot find -lX11
>/usr/bin/ld: cannot find -lXext
>/usr/bin/ld: cannot find -lcairo
>/usr/bin/ld: cannot find -lfontconfig
>/usr/bin/ld: cannot find -lpixman-1
>/usr/bin/ld: cannot find -lfreetype
>/usr/bin/ld: cannot find -lexpat
>/usr/bin/ld: cannot find -liconv
>/usr/bin/ld: cannot find -lXrender
>/usr/bin/ld: cannot find -lbz2
>collect2: error: ld returned 1 exit status
>
>
>  
>          
>Natgrid Examples
>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.   
>View on w3.pppl.gov Preview by Yahoo  
>  
>
>
>_______________________________________________
>ncl-talk mailing list
>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/20140727/4d84984b/attachment.html 


More information about the ncl-talk mailing list