[ncl-talk] How to plot large size data to contour

Mary Haley haley at ucar.edu
Mon Feb 13 12:51:15 MST 2017


Tao,

I was out last week.

You can contour by region using the "overlay" procedure.

See the attached script, which contains the URL where you can get the data
file in the comments. I first draw the plot using the full data set.  I
then arbitrarily divide the lat/lon into subregions and draw the data again.

This is a rectilinear grid, so it's easy to divide the data into
subregions.  If you have curvilinear data, then you will need to subset the
2D lat/lon data as well as the data itself.

--Mary




On Thu, Feb 2, 2017 at 11:03 PM, Tao Lu <hakufu.asano at gmail.com> wrote:

> Mary,
>
> Thank you for your helpful information.
> I will try that.
>
> On my occasion, i am more interested in how to add some data to contour.
> You know when you make contour plot you have to assign the data to array.
> If the data is too big, the array will be over memory allowed.
> So i want to know if it is  possible to divide a single complete contour
> (e.g. pressure contour of specific time) into several part.
> Just like, "a" in *write_table*("list.txt", "a", flist, "%s"), which
> means add.
> You plot one part , then add other parts of the contour plot.
>
> Thank you,
> Tao
>
> On Fri, Feb 3, 2017 at 2:50 PM, Mary Haley <haley at ucar.edu> wrote:
>
>> Tao,
>>
>> One of the first things I try with contouring large data is to turn on
>> raster contours by setting:
>>
>> res at cnFillMode = "RasterFill"
>>
>> This can sometimes make a significant difference in speed.
>>
>> If this doesn't help, you can add a second resource:
>>
>> res at trGridType = "TriangularMesh"
>>
>> Finally, if you are getting a message:
>>
>>     fatal:ContourPlotDraw: Workspace reallocation would exceed maximum
>> size
>>     16777216
>>     fatal:ContourPlotDraw: draw error
>>     fatal:ContourPlotDraw: draw error
>>     fatal:PlotManagerDraw: error in plot draw
>>     fatal:_NhlPlotManagerDraw: Draw error
>>
>> Then see this URL, which provides some information about things to try.
>>
>> http://www.ncl.ucar.edu/FAQ/#err_msgs_012
>>
>> --Mary
>>
>>
>> On Thu, Feb 2, 2017 at 6:10 PM, Tao Lu <hakufu.asano at gmail.com> wrote:
>>
>>> Dear ncl-talk,
>>>
>>> I have a large ASCII data (200files, each of them is 2 mb binary).
>>> The contour plot I want to get need all the files' data.
>>>
>>> What I have done now is to convert binary to the ascii format which is
>>> easy to plot.
>>> Then each binary data will become 140 mb ascii.
>>> And it takes more time to plot.
>>>
>>> If I have to plot them, with limited memory and fast speed, anyone have
>>> any idea?
>>>
>>> Thank you,
>>> Tao
>>>
>>> --
>>> ******************************************************
>>> 盧 涛 (ル タオ) 修士課程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>
>>> *****************************************************
>>>
>>> _______________________________________________
>>> 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/20170213/33c1caff/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: contour_by_region.000002.png
Type: image/png
Size: 153105 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170213/33c1caff/attachment-0002.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: contour_by_region.000001.png
Type: image/png
Size: 149406 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170213/33c1caff/attachment-0003.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: contour_by_region.ncl
Type: application/octet-stream
Size: 3140 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170213/33c1caff/attachment-0001.obj 


More information about the ncl-talk mailing list