<div dir="ltr">Hi Partha,<div><br></div><div>you can try setting all values <0.2 to _FillValue in both arrays and then taking the difference. This will only take the difference at points where both arrays have values >0.2. So if for example your two arrays are Y and X and both are 2D you could try:</div>
<div><br></div><div>X@_FillValue = default_fillvalue(typeof(X)) ( or maybe it already has a fill value attached, then there is no need for this)</div><div>Y@_FillValue = default_fillvalue(typeof(Y))</div><div><br></div><div>
D = X ( just to copy the fill value and other meta data)</div><div><br></div><div><br></div><div>X = where(X.lt.0.2,X@_FillValue,X)</div><div>Y = where(Y.lt.0.2,Y@_FillValue,Y)<br></div><div>D = X-Y</div><div><br></div><div>
This should now have missing values where either X or Y are <0.2 and those will not be plotted.</div><div><br></div><div>Maria</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 29, 2014 at 1:18 PM, Partha Bhattacharjee <span dir="ltr"><<a href="mailto:pbhatta2@jhu.edu" target="_blank">pbhatta2@jhu.edu</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="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Dear NCL,<br>
</p>
<p><br>
</p>
<p> I want to plot a difference between two model outputs (see the attached figure). In both plots, >0.2 (in the colorbar) are subject of interest. Simple difference plot shows difference in <0.2 background also. How do I specifically plot difference keeping
background <0.2 at constant in NCL? <br>
</p>
<p><br>
</p>
<p> Thanks,<br>
</p>
<p> Partha<br>
</p>
</div>
</div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>