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

Home » Public Forums » archive » Re: Running IDL routine.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Running IDL routine. [message #78926] Tue, 10 January 2012 01:32
shambhu is currently offline  shambhu
Messages: 41
Registered: December 2011
Member
"CellID" "Lat" "Long" "01" "02" "03" "04" "05" "06" "07" "08" "09"
"10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "20" "21" "22" "23"
"24" "25" "26" "27" "28" "29" "30" "31"
1 56.5398 201.6560 6.7 2.3 9.5 13.6 2.1
0.2 1.6 4.2 1.5 4.4 0.1 5.4 7.0 11.4
11.3 5.6 7.8 1.8 8.9 7.4 8.4 0.9
4.9 11.5 19.7 9.1 4.0 2.2 4.1 5.3 0.3
2 56.6259 201.2912 7.3 3.1 10.0 13.8 2.0
0.2 1.8 4.5 1.3 4.9 0.2 4.8 6.4 10.9
10.7 5.1 8.1 0.8 8.3 6.8 8.5 0.1
5.3 11.5 19.8 9.0 3.6 2.7 4.6 5.4 0.4
3 56.7107 200.9245 7.8 3.8 10.5 13.9 1.9
0.1 1.9 4.7 1.0 5.3 0.5 4.2 6.0 10.5
10.2 4.6 8.2 0.1 7.9 6.4 8.5 0.5
5.8 11.5 19.8 8.8 3.3 3.2 5.1 5.4 0.5
4 56.6703 202.1664 6.0 1.5 8.5 13.5 2.1
0.4 1.5 3.8 1.5 3.9 0.4 5.8 7.4 11.5
11.4 5.4 7.5 3.3 9.3 8.1 7.9 1.9
4.4 11.1 19.7 9.5 3.9 1.3 3.2 5.1 0.0

this is the data which is saved by the name winspd.txt. I used ASCII
macros to read and when tried to reverse structure data, it gave error
as i mentioned in my last post, i.e.,

> array = data
> array = Reverse(array, 1)
> lat = Reverse(data.lat)

> % ROTATE: Struct expression not allowed in this context: A.
> % Error occurred at: REVERSE
Re: Running IDL routine. [message #78928 is a reply to message #78926] Mon, 09 January 2012 04:59 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
shambhu writes:

> Am reading a text file which consists of wind speed data, using read
> ASCII macros. when i give a command:
>
> array = data
> array = Reverse(array, 1)
> lat = Reverse(data.lat)
>
> the following error is coming.
>
> % ROTATE: Struct expression not allowed in this context: A.
> % Error occurred at: REVERSE

It is hard to tell exactly what you are doing,
but it sounds like you probably got a structure
returned from a function, and that the structure
contains your wind speed and location data. If
that is the case, you need something like this.

struct = ASCII_MACRO()
windsp = struct.data
lat = struct.lat
lon = struct.lon

Then, you probably want to reverse your windsp and lat
variables in the Y direction if you are planning to put
these on a map.

windsp = Reverse(windsp, 2)
lat = Reverse(lat, 2)

Cheers,

David





--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Running IDL routine. [message #78930 is a reply to message #78928] Mon, 09 January 2012 02:21 Go to previous message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
On Jan 9, 8:06 am, shambhu <shambhu.mc...@gmail.com> wrote:
> Hi all
> Am reading a text file which consists of wind speed data, using read
> ASCII macros. when i give a command:
>
> array = data
> array = Reverse(array, 1)
> lat = Reverse(data.lat)
>
> the following error is coming.
>
> % ROTATE: Struct expression not allowed in this context: A.
> % Error occurred at: REVERSE
>
> thank you

maybe you data is not structure one! if it is, have you tried:
Data=Data.(0)
Cheers,
Dave
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Technology!
Next Topic: widget_slider cross platform (from windows to Mac)

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

Current Time: Thu Oct 09 22:56:23 PDT 2025

Total time taken to generate the page: 0.95998 seconds