Re: clipped raster plot

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue, 27 Feb 2007 06:54:12 -0700 (MST)

Hi Andrea,

I believe you are doing the right thing by setting res_at_cnFillMode
to "CellFill". However, I believe you also need to have one more
element in your lat/lon array than you have in your data array,
since the cells are now defined by the boundaries of the grid and
not by the intersection points of the lat/lon array.

Dave Brown may have more information on this. It may also be
necessary for us to beef up the contour resource page to describe
this a little better.

--Mary

On Mon, 26 Feb 2007, Andrea Hahmann wrote:

> Hi!
>
> I am trying to draw a raster plot of cyclone counts defined on a uniform
> lat/lon grid on a map on a Lambert projection. The uniform cyclone
> count grid is plotted in the right place, but only half of the "squares"
> at the edge of the domain are drawn. Is there a resource parameter I
> can use to disable this behavior?
>
> The documentation states that "If the data grid is defined using cell
> edges, the cell boundaries are obtained explicitly from the coordinate
> arrays. " I think this is how I might solve my problem... But, how do I
> define the data array using the cell edge?
>
> I have attached my resulting image and a snip of the code is below.
> Any help will be greatly appreciated!
> Thanks,
>
> Andrea
>
> lat1dg = fspan(25.,55.,13)
> lat1dg_at_long_name = "latitude"
> lat1dg_at_units = "degrees north"
>
> lon1dg = fspan(20.,50.,13)
> lon1dg_at_long_name = "longitude"
> lon1dg_at_units = "degrees east"
>
> ncycl = new((/13,13/),"float")
> ncycl = 0.
> ncycl!0 = "lat"
> ncycl&lat = lat1dg
> ncycl!1 = "lon"
> ncycl&lon = lon1dg
>
> ...
>
> res_at_cnFillOn = True ; turn on color fill
> res_at_cnFillMode = "CellFill"
> res_at_cnCellFillEdgeColor = 1
> res_at_gsnAddCyclic = False
> res_at_gsnSpreadColors = True ; use full range of
> colors
> res_at_cnLinesOn = False
> res_at_cnLineLabelsOn = False
> res_at_gsnMaximize = True
>
> res_at_tiMainString = "Cyclone count - January "+YearRes
> plot = gsn_csm_contour_map(wks,ncycl,res)
>
> --
> ----------------------------------------------------------------
> Andrea N. Hahmann, Ph.D.
> Research Applications Laboratory
> Natl. Center for Atmospheric Research Phone: 1-303-497-8383
> PO BOX 3000 Fax: 1-303-497-8401
> Boulder, CO 80301 hahmann_at_ucar.edu
> ----------------------------------------------------------------
>
>
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Feb 27 2007 - 06:54:12 MST

This archive was generated by hypermail 2.2.0 : Tue Feb 27 2007 - 13:43:39 MST