Re: wind vectors overlay problem

From: Dave Brown (dbrown AT XXXXXX)
Date: Fri Mar 28 2003 - 11:36:14 MST

  • Next message: Mary Haley: "new version of NCL available"

    Hi Greg,

    The assignment operation only creates a new reference to the original
    object. I have long thought a "dup" method would be useful for HLU
    objects, but it does not exist now, and, as far as I know, there have not
    been many requests for it (so far).
     -dave

    On Fri, 28 Mar 2003, Greg Thompson wrote:

    >
    > Could someone help me diagnose a problem I'm having when overlaying
    > wind vectors on a wind-speed contour plot? Here's what I'm trying
    > to do.
    >
    > 1. create a wind speed contour object called "cn_wspd"
    > 2. create a duplicate of cn_wspd as "cn_wspd2"
    > 3. create wind barb (vector) object called "wind_vectors"
    > 4. create a graphic with wind_vectors overlayed on cn_wspd2
    >
    > I can accomplish this just fine. Now for the problem.
    >
    > 5. advance frame
    > 6. create a streamline object called "streams"
    > 7. overlay streams on top of the original "cn_wspd" (the copy
    > of wind speed that SHOULD not contain wind barbs). Yet
    > my final graphic shows both the wind barbs and the streamlines
    > as if I'm overlaying streams onto cn_wspd2.
    >
    > Here's my code snipet:
    >
    > cn_wspd2 = cn_wspd
    > overlay(cn_wspd2, wind_vectors)
    > draw(cn_wspd2)
    >
    > frame(wks)
    >
    > overlay(cn_wspd, streams)
    > draw(cn_wspd)
    >
    > The second draw produces both overlays as if cn_wspd already had
    > the wind_vectors object overlayed. Why? Isn't "cn_wspd2" a
    > total copy of "cn_wspd" and independent?
    >
    > Thanks.
    >
    > -- Greg T. NCAR/RAP
    > _______________________________________________
    > ncl-talk mailing list
    > ncl-talk AT ucar.edu
    > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
    >

    _______________________________________________
    ncl-talk mailing list
    ncl-talk AT ucar.edu
    http://mailman.ucar.edu/mailman/listinfo/ncl-talk



    This archive was generated by hypermail 2b29 : Fri Mar 28 2003 - 13:15:04 MST