[ncl-talk] Contour map: cnFillMode = "CellFill"
G.Monte at isac.cnr.it
G.Monte at isac.cnr.it
Tue Apr 2 06:32:21 MDT 2019
Basically, I have got both all point data at lat/lon center and lat/lon
vertices for all of the nine sectors which my grid is divided into (they
are not equally spaced). Here is attached a template of the observational
point data for every lat/lon center.
30.01 1.01 0.01
38.51 1.02 0.02
46.01 1.03 0.03
30.02 13.51 0.04
38.52 13.52 13.01
46.02 13.53 1.01
30.03 27.51 1.02
38.53 27.52 14.01
46.03 27.53 103.01
The first coloumn is lat center, the second one is lon center and the
third one is the observational data value.
My issue is to find the best way to arrange lat/lon vertices into an array
in order to set sf[XY]CellBounds properly and to get a map with nine
cells.
Thanks again,
Giulio Monte
> Hi,
>
> Are you plotting observational point data? What are your lat/lons -- cell
> centers?
>
> If I understand the issue correctly, and reading the docs for
> sf[XY]CellBounds:
>
> http://ncl.ucar.edu/Document/Graphics/Resources/sf.shtml#sfXCellBounds
>
> You need to calculate the bounds of the cells yourself. For example, if
> you
> have .25degree cells,
> and know cell centers, that calculation is easy to come up with the 4
> corner points. Not so easy if you have lat/lons and need cells of a
> specific are in meters.
>
> Make sense?
> Rick
>
> On Mon, Apr 1, 2019 at 2:47 AM <G.Monte at isac.cnr.it> wrote:
>
>> Dears all,
>> I have an issue with a map contouring set on "cell fill" mode. When I
>> run
>> the script I get the following message errors:
>>
>> fatal:ContourPlotDraw: The CellFill method for non-rectangular Mesh data
>> requires vertices to be explicitly defined using the sf[XY]CellBounds
>> resources
>> fatal:ContourPlotDraw: draw error
>> fatal:ContourPlotDraw: draw error
>> fatal:PlotManagerDraw: error in plot draw
>> fatal:_NhlPlotManagerDraw: Draw error
>>
>> The source ascii file consists of an array with three coloumns:
>> 1) the first one is latitude
>> 2) the second one is longitude
>> 3) the third one represents the punctual value I want to plot
>>
>>
>> If I turn in "cnFillMode=AreaFill" it works, but the bounds of the cells
>> are not kept by the contouring. I'm pretty sure that the problem will be
>> over if I set sf[XY]CellBounds properly, but I really don't know how to
>> do.
>>
>> I only succeeded in plotting my data as a panel plot, which is here
>> attached for a rapid visualization. Moreover, I ask you if I could
>> overlay
>> these nine plots into a single map and solve my issue.
>>
>> Thanks in advance,
>> Giulio Monte
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
More information about the ncl-talk
mailing list