[ncl-talk] exact location of a lat/lon coodrinates in the grid-box
Mary Haley
haley at ucar.edu
Fri Dec 22 11:42:31 MST 2017
Dear Athanasios,
It depends.
There are three contouring methods: AreaFill (the default), RasterFill, and
CellFill.
For these methods, lat=20, lon=20 will represent the center of the box,
except for one special case.
For RasterFill, if you set sfXArray and sfYArray to arrays that have one
more element than the dimensions of your data array, then the lat/lon
points will represent the corners of a box, rather than the center.
I've created a sample NCL script that shows the three methods, plus the
fourth RasterFill method with the corners method. This script uses dummy
data, so you should be able to run it as is.
--Mary
On Fri, Dec 22, 2017 at 10:20 AM, Athanasios Karagiannidis via ncl-talk <
ncl-talk at ucar.edu> wrote:
>
> Dear sirs/madams
>
>
>
> I have a question that I’m going to formulate it using an example:
>
> Let’s say I have a dataset (Lat, Lon, T). The grid is 1x1 degree. One of
> the many points may be Lat=20, Lon=20, T=10.
>
> The question is: When ncl draws a map of T, what does the Lat=20, Lon=20
> represents? The center of the 1x1 degree grid-box? Or maybe a corner? For
> example, if Lat=20, Lon=20 is the southwest corner of the 1x1 grid-box,
> then the center of the grid-box is at Lat=20.5, Lon=20.5.
>
>
>
> Kind regards
>
>
> Athanasios F. Karagiannidis
> Physicist, PhD Meteorology and Climatology
> E-mail: thankar at live.com
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> 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/20171222/43954ae7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compare_contouring_methods.000005.png
Type: image/png
Size: 216592 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171222/43954ae7/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compare_contouring_methods.ncl
Type: application/octet-stream
Size: 2758 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171222/43954ae7/attachment.obj>
More information about the ncl-talk
mailing list