Re: problem with polar coordinate

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon, 31 Jul 2006 09:14:43 -0600 (MDT)

>> On Sun, 30 Jul 2006, p2trivej_at_atmos.ucla.edu wrote:
>>
>>> Hi,
>>>
>>> I am trying to plot a 360x360 array on a contour polar coordiate, using
>>> gsn_csm_contour_map_polar. It seems like the code leaves out the whole
>>> chunk of data on radial axis. Do you have any idea why it does that?
>>> Attach here are the gsn_csm_contour_map_polar plot (the wrong one) and the
>>> cartesian plot (the correct one). Notice how the polar plot only contains
>>> seven spots, all lie on the lower portion of the cartesian plot.
>>>
>>> thank you
>>>
>>> PS. and here is the code for polar plot.
>>>
>>> begin
>>>
>>> f = asciiread("snakefield.dat",(/360,360/),"float")
>>> wks = gsn_open_wks ("pdf", "tempo")
>>>
>>> cnres = True
>>> cnres_at_cnRasterModeOn = True
>>> cnres_at_cnLinesOn = False
>>> cnres_at_cnLineLabelsOn = False
>>> cnres_at_cnFillOn = True
>>> cnres_at_gsnSpreadColors = True
>>> cnres_at_mpOutlineOn = False
>>>
>>> gsn_define_colormap (wks, "rainbow+white")
>>> plot = gsn_csm_contour_map_polar(wks,11-f,cnres)
>>>
>>> end
>>>
>>>
>> All functions that contour over a map require
>> latitude and longitude information.
>>
>> Further,
>> f = asciiread("snakefield.dat",(/360,360/),"float")
>> ^
>>> plot = gsn_csm_contour_map_polar(wks,11-f,cnres)
>> ^^^^
>> This must be a valid
>> variable name. Valid
>> names can not start with a number.
>
>
> Why isn't "11-f" valid? "f" is a variable that is 360 x 360,
> and "11-f" is just an arithmetic operation.
>
In the above "f" is a variable: f(360,360).
It was pointed out to me that the 11-f
contained within the argument sequence is
a valid arithmetic operation.

It is equivalent to:

       x = 11-f

plot = gsn_csm_contour_map_polar(wks, x ,cnres)

Still, the plotfunction must be provided coordinate information.
How doe it know where to plot the data?

D
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jul 31 2006 - 09:14:43 MDT

This archive was generated by hypermail 2.2.0 : Mon Jul 31 2006 - 11:31:36 MDT