orography with gsn_add_polygon

From: ENOMOTO Takeshi (eno AT XXXXXX)
Date: Thu Oct 02 2003 - 20:52:58 MDT

  • Next message: Qiaozhen Mu: "plot a 2-dimentional contour figure using some data with irregular grids"

    Hi all,

    I use gsn_add_polygon() to draw orography in a cross-section
    with the following snippet.
    The y axis is assumed to be pressure coordinates.

       buf = fbindirread(fname, rec, (/ny, nx/), "float")
       buf!0 = "lat"
       buf&lat = lat
       buf!1 = "lon"
       buf&lon = lon
       n = dimsizes(lat({lat0:lat1}))
       yp = new(n+2, "float")
       yp(0:n-1) = lat({lat0:lat1})
       yp(n) = lat({lat1})
       yp(n+1) = lat({lat0})
       xp = yp
       xp(0:n-1) = dim_avg(buf({lat0:lat1},{lon0:lon1}))
       xp(n:n+1) = 1000.0

       pri = gsn_add_polygon(wks, plot, xp, yp, False)

    However, in some circumstances, it results in the following error.

    fatal:IrDataPolygon: internal error: memory overrun

    It appears that xp must be within the range of the y axis and
       xp = xp < 1000.
    fixes the problem.

    I am fine with this restriction but I report this
    because it might be related to a memory related bug.
    I tested above with IRIX (a030) and Mac OS X (a028).

    -----
    Dr. Takeshi Enomoto
    eno AT jamstec.go.jp
    Frontier Research System for Global Change

    _______________________________________________
    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 Oct 03 2003 - 08:37:54 MDT