[ncl-talk] changing coordinates

Sunmin Park mireiyue at gmail.com
Wed Jan 28 21:37:48 MST 2015


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
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150128/1b6b9f02/attachment.html 


More information about the ncl-talk mailing list