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

Home » Public Forums » archive » Two named structures with the same name that won't concatenate. Any suggestions?
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
Two named structures with the same name that won't concatenate. Any suggestions? [message #62181] Thu, 28 August 2008 16:56
J. Solbrig is currently offline  J. Solbrig
Messages: 4
Registered: August 2008
Junior Member
So, I'm really confused. The current code I am building repeatedly
uses the line:

cld = [[cld], [startCld(flist[i], pInd, lat[pInd],
lon[pInd], date[pInd], time[pInd])]]

where "cld" is an array of named structures and "startCld" is a
function that creates a named structure. In both cases, the array is
named "cirrusStruct." The concatenation above works 70 times in a
row, however, on the 71st time it fails and gives the following error:

% Unable to concatenate variables because the dimensions do not agree:
<STRUCT Array[1]>.
% Execution halted at: FINDTHINCIRRUS 467 /home/jsolbrig/geoprof-
lidar/findThinCirrus.pro
% $MAIN$

Now, after the error has occurred, if I use the "startCld" routine
from command line to create a structure "a," then type "help, cld, a, /
structure" they appear to be exactly alike, however still will not
concatenate.

IDL> help, cld, a
CLD STRUCT = -> CIRRUSSTRUCT Array[70]
A STRUCT = -> CIRRUSSTRUCT Array[1]

IDL> help, cld, a, /str
;Help info for "help, cld, /str"
** Structure CIRRUSSTRUCT, 12 tags, length=112, data length=108:
STARTDATE LONG 20060701
STARTTIME DOUBLE 0.016666668
STARTFILE STRING '/sn1/jsolbrig/GEOPROF-Lidar/
jul06/2006182000103_00927_CS_2B-GEOPROF-
LIDAR_GRANULE_P1_R04_E00.hdf.zip'
ENDFILE STRING '/sn1/jsolbrig/GEOPROF-Lidar/
jul06/2006182000103_00927_CS_2B-GEOPROF-
LIDAR_GRANULE_P1_R04_E00.hdf.zip'
STARTPROF DOUBLE 151.00000
ENDPROF DOUBLE 151.00000
STARTLAT DOUBLE -1.4628147
ENDLAT DOUBLE -1.4628147
STARTLON DOUBLE 25.093336
ENDLON DOUBLE 25.093336
MAXTHK DOUBLE 0.0000000
MINTHK DOUBLE 0.0000000

;Help info for "help, a, /str"
** Structure CIRRUSSTRUCT, 12 tags, length=112, data length=108:
STARTDATE LONG 20060701
STARTTIME DOUBLE 9.8166666
STARTFILE STRING '/sn1/jsolbrig/GEOPROF-Lidar/
jul06/2006182081529_00932_CS_2B-GEOPROF-
LIDAR_GRANULE_P1_R04_E00.hdf.zip'
ENDFILE STRING ''
STARTPROF DOUBLE 35189.000
ENDPROF DOUBLE 0.0000000
STARTLAT DOUBLE 18.281832
ENDLAT DOUBLE 0.0000000
STARTLON DOUBLE -118.93538
ENDLON DOUBLE 0.0000000
MAXTHK DOUBLE 0.0000000
MINTHK DOUBLE 0.0000000

;Concatenating arrays of structures
DL> cld = [[cld], [a]]
% Unable to concatenate variables because the dimensions do not agree:
A.
% Execution halted at: FINDTHINCIRRUS 467 /home/jsolbrig/geoprof-
lidar/findThinCirrus.pro
% $MAIN$


After what I've said above, there are still a couple more points that
should be made.
1) The routine I am working on has previously concatenated up to
4,000 structures into the same array.
2) One of the 70 previous structures is coming directly from the
same portion of the code that is failing.

endif else if true1[pInd] eq 0 and true2[pInd] eq 1 then begin
;continuing previous cloud
prevBase = layBase[cirrusLays[1], pInd]
prevTop = layTop[cirrusLays[1], pInd]

;starting second cloud
cldMax = n_elements(cld)
cld = [[cld], [startCld(flist[i], pInd, lat[pInd],
lon[pInd], date[pInd], time[pInd])]] ;FAILS HERE
prevBase = [prevBase, layBase[cirrusLays[0], pInd]]
prevTop = [prevTop, layTop[cirrusLays[0], pInd]]
twoCldStep[pInd] = 3


If anyone has a suggestion as to how to fix this problem, I would
greatly appreciate your input.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Can't access to RSI web-site
Next Topic: Display related crash on Mac

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

Current Time: Wed Oct 08 17:06:26 PDT 2025

Total time taken to generate the page: 0.00631 seconds