Re: Changing latitude/longitude to simple x/y coordinates

From: Wee-Beng Tay <zonexo_at_nyahnyahspammersnyahnyah>
Date: Mon Apr 19 2010 - 02:02:20 MDT

Hi Dave,

Thanks. Ya, the attributes are degrees_north and degrees_east.

I tried what you suggested:

lat_uv = a->latitude
lon_uv = a->longtitude

delete (lon_uv@units)
delete (lat_uv@units)

but it can't work. There's still E and N shown. However, there's no error
msg.

I tried:

lat_uv@units = "kilometers"
lon_uv@units = "kilometers"

but it can't work as well.

I then had to edit the code to produce "kilometers" as the unit and the
problem is solved. But I hope that it can be done thru NCL as well, if
there's a way.

However, how do I shift the X/Y e.g. from 0 - 220 to -1100 to 0. I tried :

lon_uv = -1100+lon_uv*1100/222

but it can't work. I remember that something else had to be done but I tried
to search and can't find an answer.

Can you help?

Thanks alot!

On Sun, Apr 18, 2010 at 5:08 AM, Dave Allured <dave.allured@noaa.gov> wrote:

> I think that the units attributes on your x and y variables are
> causing the E and N suffixes. Are these attributes degrees_north
> and degrees_east?
>
> In NCL, try deleting the units attributes from in-memory copies of x
> and y, before plotting:
>
> delete (x@units)
> delete (y@units)
>
> --Dave A.
> NOAA/PSD/CIRES
>
> On 4/16/2010 11:54 PM, Wee-Beng TAY wrote:
> > Hi,
> >
> > I have a netcdf data file which has latitude and longitude components.
> > However these latitude and longitude are only Y/X values.
> >
> > When I plot using NCL, they appear as 60E, 120N. However I only want
> > them to appear as numbers, and if possible, do some scaling and shifting
> > e.g.:
> >
> > new x = 10.*(old x)+20.
> >
> > How can I do that?
> >
> > Thanks alot!
> > _______________________________________________
> > 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
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Apr 19 02:02:33 2010

This archive was generated by hypermail 2.1.8 : Fri Apr 23 2010 - 14:40:07 MDT