Re: How to reverse direction clarification

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Fri Jan 27 2012 - 09:19:32 MST

Hi Helen,
I am guessing that the below doesn't work because you are actually not
modifying the attached longitude coordinate variable, you are simply
rearranging the data. Even if you did rearrange the longitudes/data, I'm
not sure that NCL will plot longitudes in the reverse order, as by
default I believe it will still plot them from west to east.

However, you should be able to reverse the X-axis without modifying your
array by setting trXReverse = True
http://www.ncl.ucar.edu/Document/Graphics/Resources/tr.shtml#trXReverse

If that doesn't solve your problem and/or I misunderstood your query
please let ncl-talk know...
Good luck,
Adam

If that doesn't do
On 01/27/2012 06:52 AM, Helen Parish wrote:
> To clarify my previous post, when I perform the following command
>
> kl = 49
>
> ureorder = U(lev | kl, lat | :, lon | :, time | :)
>
> utime = dim_avg_Wrap(ureorder)
>
> do i = 0,287
> utimelon(:,i) = utime(:,287-i)
> end do
>
> and print out the values in the arrays utimelon and utime I find that
> the value of utimelon at index 0 becomes the value of utime at index
> 287 etc., which is what I require and would expect. However, if I then
> perform the following plot commands I get identical results, and the
> longitudinal values are not reversed in the plot itself. I have not
> modified utime or utimelon again before performing the plot commands.
>
> plot = gsn_csm_contour(wks, utimelon(:,:), res )
>
> plot = gsn_csm_contour(wks, utime(:,:), res )
>
> Does anyone have any idea what I need to do to get the longitudinal
> values to reverse in a plot ?.
>
> Thanks,
> Helen.
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
______________________________________________________________
Adam Phillips                                asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division       (303) 497-1726
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jan 27 21:19:42 2012

This archive was generated by hypermail 2.1.8 : Thu Feb 02 2012 - 03:10:31 MST