Bernd Becker
unread,May 1, 2013, 5:18:15 AM5/1/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scitoo...@googlegroups.com
I have a list of global fields in a pp-file with duff headers.
This pp-file is a simple container for some HIT counts as you would find in a contingency table.
I can read the data OK with:
fname='some file name holding 400 global fields in pp format'
hit_cube=iris.load_raw(fname)
len(hit_cube) returns 400
I would like to re-shape the hit_cube(400) to new_hit_cube(2,10,4,5)
2 variables
10 "layers"
4 lead times
5 "classes"
I tried :
c = np.arange(2*10*4*5)
nc=c.reshape(2,10,4,5)
nhit_cube=hit_cube.reshape(2,10,4,5))
and
new_hit_cube=hit_cube[nc]
to no avail.
How would you do it?
many thanks,
Bernd.