Creating 3D Array


Hello …
I am trying to create 3D array…
I created 12 2D arrays and want to insert them to one 3D array … To do this :

I have this schema for WClim 3D array:

'WClim<band1:int16,band1_2:int16,band1_3:int16,band1_4:int16> [YCord=0:899,2048,0,XCor=0:2159,2048,0,Month=1:12,12,0]'

and this schema for “Jan” 2D array (one of the 12th arrays):

'Jan<band1:int16,band1_2:int16,band1_3:int16,band1_4:int16> [y=0:899,2048,0,x=0:2159,2048,0]'

i tried to insert the Jan to WClim by the command :

insert (redimension (apply(Jan,Month,1),WClim),WClim);

but i have this error :
UserException in file: src/query/ops/redimension/LogicalRedimension.cpp function: inferSchema line: 275
Error description: Error during schema inferring. No data provided for destination dimension ‘XCor’.

any suggestions ?? 
thank u :slight_smile:


SciDB’s query languages all rely on the names of things like arrays, attributes, dimensions (users, functions, types, etc). The target shape of your redimension, in this case, has dimensions YCord, XCor and Month (and an attribute? I can’t see them). But the shape of the array being used as the input has dimensions y, x.

You need to disambiguate what you want from the source array to go where in the target shape. To do this, use something like:

insert (redimension (apply ( Jan, YCord, y, XCor, x ,Month,1), WClim), WClim );


For future reading

@plumber’s suggestion should work OK, but here are some tips for future optimizations.

You said:

'WClim <band1:int16,band1_2:int16,band1_3:int16,band1_4:int16>

Your chunk sizing choice has following implications:

  • YCord can have 900 elements but the chunk has 2048 elements (you do not need the extra padding)
  • XCor chunking is uneven: 2048 elements in first chunk, and (2059-2048) elements in the other chunk
  • Since all 12 Month-s reside in one chunk, almost all the data across all dimension will reside in one chunk

Would suggest reading the doc linked at SciDB's MAC(tm) Storage Explained for more details on selecting chunk sizes.


Thank u … Perfectly work :+1: