Jasper,
Take a look at where you are creating your "modis" Scene object and when
you use it. You have two `for` loops, one where you create it and
overwrite it each time (by doing `modis = `), and then in the second
loop you actually use the `modis` variable. If you remove the second for
loop it should "just work".
MOD06 files are per-granule, right? Do you need a geotiff for each
granule or would one geotiff for a group of granules be OK? If so, you
can provide all of your files to the Scene object at once. The Scene
will concatenate the granules together and make them available as a
single long DataArray object.
The rest of your code looks reasonable and like it should perform we
best it can. Note that in your for loops you can replace the `np.size`
with `len` by doing `range(len(list_of_paths))`. However, there is an
even cleaner way of doing these for loops: `for one_file in list_of_paths:`.
Note that I am actively working on optimizing MODIS processing for my
own work. If you plan on resampling the MODIS data I would highly
recommend using the "ewa" resampler. I plan on releasing a new version
of pyresample today that has some major perform improvements for this
algorithm.
I also hope to release a new version of python-geotiepoints in the next
week which is what satpy uses to interpolate MODIS geolocation from the
lower 5km/1km resolution to the higher resolutions. This new version
will be much faster and memory efficient. So keep an eye for that.
Dave
> --
> You received this message because you are subscribed to the Google
> Groups "pytroll" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
pytroll+u...@googlegroups.com
> <mailto:
pytroll+u...@googlegroups.com>.
> To view this discussion on the web, visit
>
https://groups.google.com/d/msgid/pytroll/af861fc6-b07c-490c-8e41-30a2857f6119n%40googlegroups.com
> <
https://groups.google.com/d/msgid/pytroll/af861fc6-b07c-490c-8e41-30a2857f6119n%40googlegroups.com?utm_medium=email&utm_source=footer>.