<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Mary,<div>&nbsp; &nbsp; &nbsp;Following my last email, I also noticed that I have some data over Hudson Bay (which were identified as sea ice), but with my current plotting method, it can not be shown. However there are some data over Caspian Sea (though not expected), and I would like to show them as well. But they are not shown in the figure that I sent to you.</div><div><br></div><div>&nbsp; &nbsp; &nbsp;I think that perhaps the best way to plot my data (only over land, sea ice and some inland water) is to define cx and cy of each grid, and make interpolation only within the grid (and not outside the grid), and plot those grids which have data (and mask those without data). &nbsp;I attach here two txt files &nbsp;that I use for plotting.</div><div>1) &nbsp;gridused_200307.txt: defines the grids that my data are in.&nbsp;256915 lines.</div><div>&nbsp; &nbsp; 1 col: &nbsp;grid index &nbsp; (In this file the grid index is not sorted)</div><div>&nbsp; &nbsp; 2 col: &nbsp;center latitude of this grid</div><div>&nbsp; &nbsp; 3 col: &nbsp;center longitude of this grid</div><div>&nbsp; &nbsp; 4 col: &nbsp;width of this grid in longitude (in degrees)</div><div><br></div><div>2) data_200307.txt:&nbsp;256915 lines.</div><div>&nbsp; &nbsp; the data corresponding to the gridused_200307.txt that I would like to plot.</div><div><br></div><div>&nbsp; &nbsp; I will be looking at your website about how to get a solution for this problem. If you could give me a hand, I would deeply appreciate !!</div><div><br></div><div>Best wishes</div><div><br></div><div>Xiaoni</div><div><br></div><div><br></div><div>&nbsp; &nbsp; &nbsp;</div><div>&nbsp;&nbsp;&nbsp;</div><div><div><div>Le 27 oct. 2016 à 10:41, Xiaoni Wang &lt;<a href="mailto:xiaoni.wang@obspm.fr">xiaoni.wang@obspm.fr</a>&gt; a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Mary,<div>&nbsp; &nbsp; Thanks for your response !</div><div>&nbsp; &nbsp; &nbsp;I used the configurations in the below, and then the ocean becomes white, and land and land water is shown. But in my data, I also have data over sea-ice, and I need to show them as well. With the current masking, the sea-ice part disappeared, especially near Antarctic (and also some near north pole). Here I attach a new figure isccp_19V.000001.png. It shows no data over sea ice (actually it should have, as in isccp_19V.000001.png.old that I sent to you on Tuesday). Do you have some way to keep the sea ice part ? Thank you in advance !!</div><div><br></div><div>Best wishes,</div><div><br></div><div>Xiaoni</div><div>---------------------------------------------------------------------</div><div><p><font color="#ff3333"><font face="Arial"><font style="font-size: 14pt"><font color="#111111">resources.mpFillOn
           = True</font></font></font></font></p><p><font color="#ff3333"><font color="#111111">   
<font face="Arial"><font style="font-size: 14pt">resources.mpOceanFillColor
   = "white"</font></font></font></font></p><p><font color="#ff3333"><font color="#111111">   
<font face="Arial"><font style="font-size: 14pt">resources.mpLandFillColor
    = "transparent"</font></font></font></font></p><p><font color="#ff3333"><font color="#111111">   
<font face="Arial"><font style="font-size: 14pt">resources.mpInlandWaterFillColor
= "transparent"</font></font></font></font></p><p><font color="#ff3333"><font color="#111111">   
<font face="Arial"><font style="font-size: 14pt">resources.cnFillDrawOrder
    = "PreDraw"</font></font></font></font></p><div><span>&lt;isccp_19V.000001.png&gt;</span></div><div><div>Le 26 oct. 2016 à 19:17, 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">Hi Xiaoni,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The image looks to me like the land is getting filled in and covering up the filled contours underneath the map.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Please try setting:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">res.mpLandFillColor = "transparent"</div><div class="gmail_default" style="font-size:small">res.mpInlandWaterFillColor = "transparent"</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I've updated the geodesic example at so you can see the structure of the "cx" and "cy" grid:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/geodesic.shtml">http://www.ncl.ucar.edu/Applications/geodesic.shtml</a><br></div><div class="gmail_default"><br></div><div class="gmail_default">Click on the second image of the first example:</div><div class="gmail_default"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/geodesic.shtml">http://www.ncl.ucar.edu/Applications/geodesic.shtml</a></div><div class="gmail_default"><br></div><div class="gmail_default">Does your ISCCP NetCDF file have any variables on it that look like they might define grid corners or some kind of cell bounds?</div><div class="gmail_default"><br></div><div class="gmail_default">If you can provide us with a copy of your file, or else the output from the following command,</div><div class="gmail_default"><br></div><div class="gmail_default">ncl_filedump <i>yourfile</i>.nc</div><div class="gmail_default"><br></div><div class="gmail_default"><div class="gmail_default">then we can have a look to see if there's anything that might help.</div><div><br></div></div><div class="gmail_default">"<a href="http://yourfile.nc/">yourfile.nc</a>" needs to be replaced with the name of your NetCDF file.</div><div class="gmail_default"><br></div><div class="gmail_default">---Mary</div><div class="gmail_default">&nbsp;</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 25, 2016 at 9:41 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Mary,<div>&nbsp; &nbsp; &nbsp;Thank you very much for your prompt response and helpful information ! &nbsp;</div><div><br></div><div>1) &nbsp;in order to plot non-ocean part, I added the following lines in my code.</div><span class=""><div><span style="font-family:monospace,monospace;font-size:small">res.mpFillOn = True</span></div><div><div class="gmail_default" style="font-size:small;display:inline"><font face="monospace, monospace">res.mpOceanFillColor = "white"</font></div></div><div><div class="gmail_default" style="font-size:small;display:inline"><font face="monospace, monospace"><br></font></div></div></span><div>The resulting figure still contains ocean. Then I added&nbsp;</div><div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">res.mpFillDrawOrder = "PostDraw"</font></div><div class="gmail_default" style="font-size:small">​</div></div><div class="gmail_default">This time, the ocean part disappeared. But the color scale is greatly changed in the figure. I attach two figures in the below to show their effects.&nbsp;isccp_19V.000001.png with PostDraw added, and&nbsp;isccp_19V.000001.png.old without Postdraw.</div><div class="gmail_default"><br></div><div class="gmail_default">How can I have the same color as isccp_19V.000001.png.old, but without ocean ?</div><div><br></div><div><br></div><div><br></div><div>2) &nbsp;I also looked at how to fill the small islands in your examples. There are something that I would like to clarify.</div><div>&nbsp; &nbsp; &nbsp;It seems that , we need the latitude/longitude of grid center, and also information about grid corner, in order to constrain the interpolation.</div><div>&nbsp; &nbsp; &nbsp;In my case, between any two grids, the distance between their center is 0.25 degree in latitude, and varying in longitude. So I have the distance between two grid center in latitude and longitude (in degree).&nbsp; My question is : how to use them ? The geodesic example just read in &nbsp;the corner_lat/lon, but are they the latitude/longitude of the 4 corners of a grid ? if so, which corder is the first one, and in which order are they organized ? (In the mpas example, they seem to read in latVertex and lonVertex and they define latvoc/lonvoc. Yet I have the same question….)</div><div><br></div><div><br></div><div>Thank you again !!</div><div><br></div><div>Best wishes,</div><div><br></div><div>Xiaoni</div><div><br></div><div><br></div><div>&nbsp;&nbsp;</div></div><br><div style="word-wrap:break-word"><div></div></div><br><div style="word-wrap:break-word"><div></div><div><br><div><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>2) Over small islands, the interpolation method also produced some effects (see large yellow areas on the ocean in figure isccp_19V.00001.png). Again I do not need the ocean around the island, just the results over (small) islands.</div></div></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small;display:inline">​This is simply an artifact of having a few values surrounded by a lot of missing values.&nbsp; In order to plot data like this correctly, you need to have some kind of cell boundary or grid corner information, so the interpolation stays within these bounds.</div></div><div><div class="gmail_default" style="font-size:small;display:inline"><br></div></div><div><div class="gmail_default" style="font-size:small;display:inline">If you look at our NCL examples for geodesic and MPAS grids, they set these two special resources:</div></div><div><div class="gmail_default" style="font-size:small;display:inline"><font face="monospace, monospace">&nbsp; res@sfXCellBounds&nbsp; &nbsp; &nbsp; &nbsp; = cx<br>&nbsp; res@sfYCellBounds&nbsp; &nbsp; &nbsp; &nbsp; = cy</font></div></div><div class="gmail_default" style="font-size:small">​which were read off a file, and are usually dimensioned something like N x 4 or N x 3 where N is the number of cell centers, and the 3 or 4 represents the number of vertices of a polygon that surrounds each cell center.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You can see the NCL code for these examples at:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/geodesic.shtml" target="_blank">http://www.ncl.ucar.edu/<wbr>Applications/geodesic.shtml</a><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/mpas.shtml" target="_blank">http://www.ncl.ucar.edu/<wbr>Applications/mpas.shtml</a> &nbsp;(see example mpas_cell_3.ncl)</div></div></div></div></blockquote><br></div></div><div><br></div></div><br></blockquote></div><br></div>
</blockquote></div><br></div></div>_______________________________________________<br>pyngl-talk mailing list<br>List instructions, subscriber options, unsubscribe:<br><a href="http://mailman.ucar.edu/mailman/listinfo/pyngl-talk">http://mailman.ucar.edu/mailman/listinfo/pyngl-talk</a><br></blockquote></div><br></div></body></html>