<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div></div><div><br></div><div><div><div>Le 24 oct. 2016 à 19:31, Mary Haley &lt;<a href="mailto:haley@ucar.edu">haley@ucar.edu</a>&gt; a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div class="gmail_default" style="font-size:small">Xiaoni,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default">I think the issue is that you are using "resources" to set wsMaximizeSize, and then you also pass this list into the contour_map call. You don't want to do this, so I suggest using a different resource list to set wsMaximizeSize:</div><div class="gmail_default"><br></div><div class="gmail_default"><div class="gmail_default">wresources = Ngl.Resources()&nbsp;</div><div class="gmail_default">wresources.wsMaximumSize = 33554432&nbsp;</div></div><div class="gmail_default" style="font-size:small">Ngl.set_values(ws_id,wresources)</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Since you have a large grid, I recommend setting res.cnFillMode = "RasterFill" if you haven't already. This may fix the warning as well.</div><div class="gmail_default" style="font-size:small"><div class="gmail_default"><br></div><div class="gmail_default">You can then use "resources" for setting your contour plot options.<br></div><div class="gmail_default"><br></div><div class="gmail_default">Also, I don't think you need to do all that stuff with calling get_float to retrieve a bunch of values and creating the contours twice.</div><div class="gmail_default"><br></div><div class="gmail_default">See the modified version of your script attached.&nbsp; It looks like you just sent me a partial script, so what I've modified is just an example of how you can change your original script.</div><div class="gmail_default"><br></div><div class="gmail_default">--Mary</div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 24, 2016 at 9:52 AM, Xiaoni Wang <span dir="ltr">&lt;<a href="mailto:xiaoni.wang@obspm.fr" target="_blank">xiaoni.wang@obspm.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word">Dear Sir or Madam,<div>&nbsp; &nbsp; &nbsp; Sorry to write to you several emails !&nbsp; I would like to update the news and questions since I have wrote to you.&nbsp; I solved the installation problem of Pyngl and Pynio. I can import them without problem.</div><div><br></div><div>&nbsp; &nbsp; &nbsp;Now I tried to run a python code to plot data on ISCCP grids. As I mentioned to you in my previous email, I have data such as:</div><div>&nbsp; &nbsp; &nbsp; ISCCP latitude : lat_isccp, 1D, (256915,)&nbsp;</div><div>&nbsp; &nbsp; &nbsp; ISCCP longitude: lon_isccp, (1D, (256915,))&nbsp;</div><div>&nbsp; &nbsp; &nbsp; data: emis, (1D , (256915,)) &nbsp;</div><div>&nbsp; &nbsp; &nbsp; I also have the horizontal width for each grid (in km).</div><div><br></div><div>&nbsp; &nbsp; &nbsp;I would like to make 2D plot on ISCCP grids. When I launched my program, it has fatal errors:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; <font color="#791a3e">fatal:ContourPlotDraw: Workspace reallocation would exceed maximum size 100000000</font></div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp;After reading the FAQ, I added the following lines in my codes:</div><div><span class="gmail-m_-1566661684369093241Apple-tab-span" style="white-space:pre-wrap">        </span>ws_id = Ngl.get_workspace_id()</div><div>&nbsp; &nbsp; &nbsp; &nbsp; resources = Ngl.Resources()&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; resources.wsMaximumSize = 33554432&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Ngl.set_values(ws_id,<wbr>resources)</div><div><br></div><div>&nbsp; &nbsp; But then I got another error:&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp;<font color="#561029">fatal:["Error.c":406]:<wbr>ErrorInitialize:Only one instance of ErrorClass is supported.</font></div><div><br></div><div><br></div><div>&nbsp; &nbsp; I do not understand….. I will look again at your tutorial to get more information. The attached is the code that I used. Thank you in advance if you could give some clue.</div><div><br></div><div>Best regards</div><span class="gmail-HOEnZb"><font color="#888888"><div><br></div><div>Xiaoni</div><div><br></div><div></div></font></span></div><br><div style="word-wrap:break-word"><div></div><div><br></div><div><br></div><div>&nbsp; &nbsp;&nbsp;</div><div><br></div></div><br></blockquote></div><br></div></div>
<span>&lt;test_mod.py&gt;</span></blockquote></div><br></div></body></html>