[ncl-talk] About mesh range of lon lat plot.

Mary Haley haley at ucar.edu
Tue Nov 15 09:11:34 MST 2016


Tao,

To answer some of your raster questions, please see our raster page:

http://www.ncl.ucar.edu/Applications/raster.shtml

See raster_5.ncl if you want a different meaning for your raster cell
locations.

As for controlling the size fo the rasters, see the cnRasterCellSizeF
resource:

http://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnRasterCellSizeF

If you want to draw the outlines of the cells, then you should look into
doing a cell fill plot rather than a raster plot:

res at cnFillMode = "CellFill"

Using cell fill allows you to turn on outlines via cnCellFillEdgeColor.
See example dataonmap_11.ncl at:

http://www.ncl.ucar.edu/Applications/plot_data_on_map.shtml#ex11

--Mary


On Fri, Nov 11, 2016 at 10:46 PM, Tao Lu <hakufu.asano at gmail.com> wrote:

> Mary, David
>
> Thank you very much for your warm helping.
> It is clear now.
>
> I am still have other questions about raster plot.
> 1. Is it possible to adjust the box's position? For example, make the
> (x,y) at sw corner of the box.
>
> 2. Is it possible to define raster boxes' size? For example different size
> in different position.
>
> 3. Is it possible to plot the outline of the boxes? Some boxes have the
> same color which makes it hard to identify boxes.
>
> Thank you very much.
>
> Tao
>
>
> On Sat, Nov 12, 2016 at 6:04 AM, David Brown <dbrown at ucar.edu> wrote:
>
>> I would like to add a bit to Mary's description. A Raster-filled plot can
>> work 2 different ways depending on the setting of the resource
>> "cnRasterSmoothingOn". If cnRasterSmoothing is set False (the default),
>>  then the color assigned will depend on the value associated with the grid
>> box or boxes that occupy the most area around the data value. Note that
>> depending on the raster resolution there can be less than one or more than
>> one data value contained in a single raster cell.
>> If cnRasterSmoothing on is set True then the value associated with a
>> raster cell is calculated as a area-weighted average of all the data values
>> within the cell. Then the color is determined by where this value falls
>> within the array of contour levels setup by the user.
>>  -dave
>>
>>
>> On Fri, Nov 11, 2016 at 9:12 AM, Mary Haley <haley at ucar.edu> wrote:
>>
>>> Tao,
>>>
>>> Please see attached script and image.  This shows what a raster plot is
>>> doing.  NCL constructs a box around each data value, and whatever range of
>>> your contour levels this data value falls in, the box will be filled in
>>> that color.
>>>
>>> The dots in the image show the X,Y locations of the data, which you can
>>> see are centered in the box that NCL constructs.  The values show the
>>> actual value of that data point.
>>>
>>> --Mary
>>>
>>>
>>> On Fri, Nov 11, 2016 at 2:04 AM, Tao Lu <hakufu.asano at gmail.com> wrote:
>>>
>>>> Hello ncl-talk
>>>>
>>>> When I plot raster contour, I have the data(nlon,nlat).
>>>>
>>>> [image: Inline image 1]
>>>> When I have one point data (red point), which color will be used to
>>>> fill color?
>>>> Does raster fill work when if I have a varied delta lon or delta lat?
>>>>
>>>> Thank you
>>>> Tao
>>>>
>>>> --
>>>> ******************************************************
>>>> Tao Lu    (M. Eng)
>>>> Laboratory of River Engineering and Hydrology,
>>>> Dept. of Civil and Environmental Engineering,
>>>> Graduate School of Science and Engineering,
>>>> Chuo University
>>>>
>>>> 1-13-27,Kasuga,Bunkyo-ku,Tokyo
>>>> 112-8551, Japan
>>>> TEL: 03-3817-1805;   Phone: 070-2188-7509
>>>> Email1: hakufu.asano at gmail.com <mail%3Amet.yamos at gmail.com>
>>>> Email2: lutao at civil.chuo-u.ac.jp <mail%3Ayamoto at civil.chuo-u.ac.jp>
>>>> *****************************************************
>>>>
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> ncl-talk at ucar.edu
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>>>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>
>
> --
> ******************************************************
> 盧 涛 (ル タオ) 修士課程2年
>
> 〒112-8551 東京都文京区春日1-13-27
>
> 中央大学理工学研究科都市環境学専攻
>
> 河川・水文研究室(山田正教授)
>
>
> TEL: 03-3817-3406;   Phone: 070-2188-7509
> Email1: hakufu.asano at gmail.com <mail%3Amet.yamos at gmail.com>
> Email2: lutao at civil.chuo-u.ac.jp <mail%3Ayamoto at civil.chuo-u.ac.jp>
> *******************************************************
> ******************************************************
> Tao Lu    (M. Eng)
> Laboratory of River Engineering and Hydrology,
> Dept. of Civil and Environmental Engineering,
> Graduate School of Science and Engineering,
> Chuo University
>
> 1-13-27,Kasuga,Bunkyo-ku,Tokyo
> 112-8551, Japan
> TEL: 03-3817-1805;   Phone: 070-2188-7509
> Email1: hakufu.asano at gmail.com <mail%3Amet.yamos at gmail.com>
> Email2: lutao at civil.chuo-u.ac.jp <mail%3Ayamoto at civil.chuo-u.ac.jp>
> *****************************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161115/27894ec8/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 2212 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161115/27894ec8/attachment.png 


More information about the ncl-talk mailing list