# Re: Question on the longitude coordinates transform?

From: xiang lin <leo.aries.g_at_nyahnyahspammersnyahnyah>
Date: Thu Nov 24 2011 - 18:53:59 MST

However, I guess you didn't understand my problem. I want to draw the plot
in the region of (30E, 150W),
the west boundary locate at the 30E and the east boundary is at 150W. If I
just set the resource as below:
res@mpMinLonF = -150
res@mpMaxLonF = 30
then what I got is opposite to what I want.

The lonFlip or lonPivot function can transform the coordinates of (0E,360E)
to (-180E,180E), and what I want
to do is just the reverse.

Thanks!

Lin

2011/11/25 Dennis Shea <shea@ucar.edu>

> PLEASE ... do *not* repeat post to ncl-talk.
> This is a 4-day national holiday.
>
> You have your settings incorrect. They are reversed
>
> res@mpMinLonF = -150
> res@mpMaxLonF = 30
>
>
> On 11/24/11 9:54 AM, xiang lin wrote:
>
>> Hi,all
>>
>> I am fluent with the longitude coordinates of (0E, 360E), but now
>> was a little puzzled when dealing with the coordinates of (-180E,175E) .
>>
>> Here below is parts of my scripts :
>>
>> 185001-200412.dat",-1,"float")
>> x = onedtond(data,(/72,37,12,155/)**)
>> x!0 = "lon"
>> x!1 = "lat"
>> x!2 = "month"
>> x!3 = "year"
>> x&lon = fspan(-180.,175.,72) ; see more details in the
>> x&lon@units = "degrees_east"
>> x&lat = fspan(90.,-90.,37)
>> x&lat@units = "degree_north"
>> x&month = ispan(1,12,1)
>> x&year = ispan(1850,2004,1)
>> printVarSummary(x)
>> ......
>> res@mpMinLonF = 30
>> res@mpMaxLonF = -150
>>
>> I want to pick out the sub-region eastward extending from 30E to 150W,
>> but of course the above resource would cause errors for the reason that
>> mpMinLonF must be less than
>> mpMaxLonF.
>>
>> How could I set the region correctly for plot? Is there a way to
>> transform the coordinates such as (-180E, 175E) to the ones such as
>> (0E,360E)? I know the lonFlip and lonPivot,
>> However, I don't find a corresponding function to the opposite job.
>>
>> Thanks!
>>
>> best wish!
>>
>>
>> Lin
>>
>>
>>
>> ______________________________**_________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/**mailman/listinfo/ncl-talk<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
Received on Thu Nov 24 18:54:06 2011

This archive was generated by hypermail 2.1.8 : Wed Nov 30 2011 - 19:52:47 MST