a DICTIONARY is like a HASH, but the keys have to be valid IDL variable names, and can be accessed like a HASH or with the "dot" notation.
If you don't want to hard code the key names, you can't use the "dot" notation and I don't see an advantage to using a DICTIONARY.
John is right about using double hashes to collect data from the monthly files. To stack the data into arrays you would then invert the hash and finally concatenate them to arrays. Here some simple functions that might help:
function file2hash, file
Osav=obj_new('IDL_savefile',file)
Names=Osav.Names()
Osav.restore,Names
out=hash('filename',file)
foreach n,names do out[n]=scope_varfetch(n)
return,out
end
pro readUpdate, mainHash, file_list, key_list
if n_elements(mainHash) eq 0 then mainHash=hash()
foreach file,file_list,i do mainHash[key_list[i]]=file2hash(file)
end
function getValIfEx, ha, key
if ha.hasKey(key) eq 0 then return, !null
return,ha[key]
end
function invertDoubleHash, ha
allKeys=(ha.reduce(lambda('y,x:y+x.keys()'),value=list())).toArray()
allKeys=allKeys[uniq(allKeys,sort(allKeys))]
out=hash()
foreach key,allKeys do begin
oneVal=ha.map('getValIfEx',key)
out[key]=oneVal.filter(lambda('x:x ne !null'))
endforeach
return, out
end
For the concatenation you then probably do another REDUCE.
I hope this helps, Markus