[ncl-talk] Difference plot in NCL
Maria Gehne - NOAA Affiliate
maria.gehne at noaa.gov
Fri Aug 29 13:35:34 MDT 2014
Hi Partha,
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:
X at _FillValue = default_fillvalue(typeof(X)) ( or maybe it already has a
fill value attached, then there is no need for this)
Y at _FillValue = default_fillvalue(typeof(Y))
D = X ( just to copy the fill value and other meta data)
X = where(X.lt.0.2,X at _FillValue,X)
Y = where(Y.lt.0.2,Y at _FillValue,Y)
D = X-Y
This should now have missing values where either X or Y are <0.2 and those
will not be plotted.
Maria
On Fri, Aug 29, 2014 at 1:18 PM, Partha Bhattacharjee <pbhatta2 at jhu.edu>
wrote:
> Dear NCL,
>
>
> 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?
>
>
> Thanks,
>
> Partha
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140829/c0159b27/attachment.html
More information about the ncl-talk
mailing list