[ncl-talk] Regridding irregularly spaced data onto a regular grid
zilore mumba
zmumba at yahoo.com
Sun Jul 27 02:32:14 MDT 2014
Dave,
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.
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.
On Sunday, July 27, 2014 3:13 AM, Dave Allured - NOAA Affiliate <dave.allured at noaa.gov> wrote:
Zilore,
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.
If you still want to regrid, then I found that ESMF regridding example works easily with your sample data.
http://www.ncl.ucar.edu/Applications/ESMF.shtml#ex21
--Dave
On Sat, Jul 26, 2014 at 5:24 PM, 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140727/e0c0de88/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: station_data.pdf
Type: application/pdf
Size: 44451 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140727/e0c0de88/attachment.pdf
More information about the ncl-talk
mailing list