From: Jose Gómez-D. <jgo...@gm...> - 2009-04-09 12:13:01
|
On Wednesday 08 April 2009 21:57:21 antonv wrote: > The biggest bottleneck is happening because I'm unpacking grib files to csv > files using Degrib in command line. That operation is usually around half > an hour using no more than 50% of the processor but it maxes out the memory > usage and it definitely is hard drive intensive as it ends up writing over > 4 GB of data. I have noticed also that on a lower spec AMD desktop this > runs faster than on my P4 Intel Laptop, my guess being that the laptop hdd I do the same sort of processing, and use GDAL to read the GRIB (I think grib2, whatever ECMWF provides) files directly into numpy arrays. It's as easy as from osgeo import gdal g = gdal.Open("my_grib_file.grib") data = g.GetRasterBand( my_band ).ReadAsArray() pylab.imshow blah blah blah It doesn't take long at all, unless your files are huge and are stored over a slow and busy network. But then, there's little you can do about that! J -- RSU ■ Dept. of Geography ■ University College ■ Gower St, London WC1E 6BT UK EMM ■ Dept. of Geography ■ King's College ■ Strand, London WC2R 2LS UK |