I am using python with numpy to read in data from a numerical model in a text file with a fairly complicated format.
Numpy's genfromtxt and fromfile functions work well, but only if the data is structured. My data files looks something like this:
------snip
[sitename] [dimemsion 1 size] [dimension 2 size]
[data for dim 1]
[data for dim 2]
[date/time]
[header data]
[data (dim1 * dim2)]
[header]
[data]
...
.
.
[data/time]
[header]
[data]
.
.
etc...
---- snip
So, I have a mixture of text and numbers and a complicated (but repeating) layout. How is the best way to read this in using numpy?
Cheers,
Chris
numpymethods only? Maybe the reading part could be done in plain python.