<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">I come across the corner problem occasionally and it just popped up in a figure I'm currently making. For me in 6.2.0 I found cnFillMode = "RasterFill" will fix the problem and for contour lines didn't look any different. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Ran my same code in 6.3.0 and didn't have the issue. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">So two solutions. </div><div class="gmail_default" style="font-family:verdana,sans-serif">1. Upgrade (usually the solution to these things). </div><div class="gmail_default" style="font-family:verdana,sans-serif">2. Change cnFillMode = "RasterFill"</div><div class="gmail_default" style="font-family:verdana,sans-serif"> if needed set cnRasterSmoothingOn = True</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Alan.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 21, 2015 at 10:33 PM, Ning Li <span dir="ltr"><<a href="mailto:ning.li@auckland.ac.nz" target="_blank">ning.li@auckland.ac.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Dear NCL users,<br>
I have encountered a problem relating to the plotting of contour lines.<br>
The data to be plotted is an 8 by 8 matrix that looks like this.<br>
<br>
<table border="0" cellpadding="0" cellspacing="0" width="512">
<colgroup><col style="width:48pt" span="8" width="64"></colgroup>
<tbody>
<tr style="height:15.0pt" height="20">
<td style="height:15.0pt;width:48pt" align="right" width="64" height="20">-0.084</td>
<td style="width:48pt" align="right" width="64">-0.066</td>
<td style="width:48pt" align="right" width="64">-0.04</td>
<td style="width:48pt" align="right" width="64">0.021</td>
<td style="width:48pt" align="right" width="64">0.031</td>
<td style="width:48pt" align="right" width="64">-0.026</td>
<td style="width:48pt" align="right" width="64">-0.065</td>
<td style="width:48pt" align="right" width="64">-0.075</td>
</tr>
<tr style="height:15.0pt" height="20">
<td style="height:15.0pt" align="right" height="20">-0.028</td>
<td align="right">0.005</td>
<td align="right">0.053</td>
<td align="right">0.177</td>
<td align="right">0.224</td>
<td align="right">0.136</td>
<td align="right">0.028</td>
<td align="right">-0.003</td>
</tr>
<tr style="height:15.0pt" height="20">
<td style="height:15.0pt" align="right" height="20">-0.009</td>
<td align="right">0.038</td>
<td align="right">0.111</td>
<td align="right">0.266</td>
<td align="right">0.327</td>
<td align="right">0.333</td>
<td align="right">0.221</td>
<td align="right">0.101</td>
</tr>
<tr style="height:15.0pt" height="20">
<td style="height:15.0pt" align="right" height="20">-0.049</td>
<td align="right">-0.024</td>
<td align="right">0.08</td>
<td align="right">0.184</td>
<td align="right">0.275</td>
<td align="right">0.352</td>
<td align="right">0.29</td>
<td align="right">0.152</td>
</tr>
<tr style="height:15.0pt" height="20">
<td style="height:15.0pt" align="right" height="20">-0.046</td>
<td align="right">-0.029</td>
<td align="right">0.022</td>
<td align="right">0.082</td>
<td align="right">0.164</td>
<td align="right">0.195</td>
<td align="right">0.147</td>
<td align="right">0.127</td>
</tr>
<tr style="height:15.0pt" height="20">
<td style="height:15.0pt" align="right" height="20">0.002</td>
<td align="right">0.007</td>
<td align="right">-0.005</td>
<td align="right">-0.017</td>
<td align="right">-0.02</td>
<td align="right">0.006</td>
<td align="right">0.05</td>
<td align="right">0.059</td>
</tr>
<tr style="height:15.0pt" height="20">
<td style="height:15.0pt" align="right" height="20">0.03</td>
<td align="right">0.022</td>
<td align="right">-0.034</td>
<td align="right">-0.095</td>
<td align="right">-0.105</td>
<td align="right">-0.069</td>
<td align="right">-0.033</td>
<td align="right">-0.016</td>
</tr>
<tr style="height:15.0pt" height="20">
<td style="height:15.0pt" align="right" height="20">0.043</td>
<td align="right">0.035</td>
<td align="right">0.011</td>
<td align="right">-0.022</td>
<td align="right">-0.053</td>
<td align="right">-0.063</td>
<td align="right">-0.045</td>
<td align="right">-0.03</td>
</tr>
</tbody>
</table>
<br>
While the script is working fine with the 'cnFillOn' resource set to True, erroneous contour lines<br>
are present when 'cnFillOn' resource is set to False (please see the attached images).<br>
<b><br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" <br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" <br>
<br>
diri = "/home/nli045/Desktop/sharedJ/Documents/data/"<br>
fili = systemfunc("ls " + diri + "x*csv")<br>
<br>
in = asciiread(fili(0),(/8,8/),"float") ; read the matrix from the directory<br>
<br>
wks = gsn_open_wks("png","test")<br>
colors = read_colormap_file("BlWhRe")<br>
<br>
res = True<br>
res@cnFillOn = False ; CONTOURS WRONG!<br>
res@cnLinesOn = True <br>
res@gsnAddCyclic = False ; the plot is not global <br>
<br>
res@cnLevelSelectionMode = "ManualLevels" ; manual contour levels<br>
res@cnMinLevelValF = -0.1<br>
res@cnMaxLevelValF = 0.5<br>
res@cnLevelSpacingF = 0.1<br>
<br>
plot = gsn_csm_contour(wks,in,res) </b><br>
<br>
I used R to make the plot and there is no problem. <br>
I have also used a different dataset in NCL, the errorneous contours are also present (see the circled contours in 'datasetB.png').<br>
<br>
I am using version 6.2.0. The system is 86-64 GNU/Linux.<br>
<br>
I wonder if anyone experienced the same problem in the past and how should it be resolved?
<br>
<br>
Any help would be great! Thank you very much!
<div><br>
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">Ning LI<br>
<br>
PhD candidate<br>
School of Environment<br>
The University of Auckland<br>
</div>
</div>
</div>
</div>
</div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>