[ncl-talk] changing coordinates

Alan Brammer abrammer at albany.edu
Thu Jan 29 12:06:06 MST 2015


Sun,

Sorry I didn't reply to your other thread. Hoped someone else would step
in.

 Did you try setting off res at gsnAddCyclic = False  as I suggested in my
other reply?

Your data already has the cyclic therefore ncl should not be told to try
and add it again.



On Wed, Jan 28, 2015 at 11:37 PM, Sunmin Park <mireiyue at gmail.com> wrote:

> Thank you Kyle
>
> I already used the function and when I print out the variable
> (printVarSummary), it changed from (0,360) to (-180,180)
> But when I plot them the figures only shows half (0,180E part).
>
> Sun-
>
>
> On Jan 28, 2015, at 8:36 PM, Kyle Griffin <ksgriffin2 at wisc.edu> wrote:
>
> Try the lonFlip function. It is designed to do this. While changing the
> coordinates is logical, you also must change the actual *data* as well to
> be similarly reordered. A simple
>
> extGmean = lonFlip(extGmean)
>
> should work.
>
> https://www.ncl.ucar.edu/Document/Functions/Contributed/lonFlip.shtml
>
>
> Kyle
>
> ----------------------------------------
> Kyle S. Griffin
> Department of Atmospheric and Oceanic Sciences
> University of Wisconsin - Madison
> Room 1421
> 1225 W Dayton St, Madison, WI 53706
> Email: ksgriffin2 at wisc.edu
>
> On Wed, Jan 28, 2015 at 8:39 PM, Sunmin Park <mireiyue at gmail.com> wrote:
>
>> Dear NCL users
>>
>> Following question from the previous email that was about problem
>> creating figure. As I looked at the original data they had different
>> coordinate.
>>
>> Is there way that we can change longitude [-180,180] to [0,360]? I am
>> trying to compare 4 data sets and one data set has [-180,180] and the
>> others have [0,360]. I changed [-180,180] to [0,3600 using
>>
>>   extGmean!0 = "lat"
>>   extGmean!1 = "lon"
>>   lat = fspan(-85,85,85)
>>   lon = fspan(0,360,72)
>>   lat at longname = "latitude"
>>   lat at units = "degrees_north"
>>   lon at longname ="longitude"
>>   lon at units = "degrees_east"
>>   extGmean&lat = lat
>>   extGmean&lon = lon
>>
>> but It give wrong plot, looks like changing west and east.
>> How I can fix problem?
>> Thank you for any comments and helps.
>>
>> Sun-
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150129/91c59296/attachment.html 


More information about the ncl-talk mailing list