comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: wrong results...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: wrong results... [message #43810 is a reply to message #43808] Mon, 02 May 2005 07:29 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
elias writes:

> The following problem probably has something to do with definitions of
> floating, integer etc, but I don't really know to solve it (although i
> am sure the solution will be simple in the end...).
>
> I have a data file that, amongst others, contains some longitude
> columns. The longitude data is defined from -180 to 180 deg in this
> data file. For some consistency with some other analysis I did before,
> I want to convert it to 0-->360 deg.
>
> So simply, I ask when it reads a longitude <0 to do: lon=360+lon
>
> However, I am getting in the new data file created, values of longitude
> more than 600 sometimes.... I am not sure why this happens

This probably occurred to you a fraction of a second after
you hit the SEND button, but if your data goes from -180 to 180,
and you want it to go from 0 to 360, you will add 180 to each
value, not 360. :-)

I don't know where 600 comes from, I would expect a maximum
value of 180 + 360 = 540. Something else must be wrong.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: idlgrcontour missing contours
Next Topic: Tricky data-summing question

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:34:30 PDT 2025

Total time taken to generate the page: 0.00435 seconds