Re: intersection between two overlay contour.

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu Jun 07 2012 - 14:35:10 MDT

Hi Ahmed,
You can use the where function to do this. A simple example:
a = (/1,2,3,-999/)
a@_FillValue = -999
b = (/1,2,-999,4/)
b@_FillValue = -999
c = where(.not.ismissing(a).and..not.ismissing(b),100,-999) ; where both
arrays are not missing, set to 100
c@_FillValue = -999
print(c)

you can then use c to mask out a and b:

a = where(ismissing(c),a@_FillValue,a)
b = where(ismissing(c),b@_FillValue,b)

Finally, I would suggest setting cnFillMode = "RasterFill" for your RH
plot, so that you can see each individual grid cell that meets your >
90% criteria. The default, "AreaFill", will not necessarily show all
grid cells, especially if there are numerous neighboring grid boxes that
are missing.

Hope that helps,
Adam

On 06/07/2012 12:16 PM, ahmed lasheen wrote:
> Hello
> I am trying to plot images for the fog , I am plotting both 10 m wind
> and relative humidity that satisfy certain condition for fog
> creation(for example RH > 90% and wind < 5 m/s).
> I used mask function for drawing them with these criteria .and I used
> the overlay function to plot both contours.
> I wondering if there is a method to plot the intersection of two
> masked contours.(drawing overlapping contour when both criteria exist)
> so that the resulted intersection represent fog directly.
> I have attached plot for overlapping wind and RH that I need to find
> way for plotting only the intersection between both contours.
> thanks in advance
>
>
> --
> ===============
> Ahmed Lasheen
> Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
> Egyptian Meteorological Authority(EMA)
> Cairo,Egypt
> ===============
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
______________________________________________________________
Adam Phillips                                asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division       (303) 497-1726
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jun 7 14:35:19 2012

This archive was generated by hypermail 2.1.8 : Tue Jun 12 2012 - 13:58:38 MDT