Created with:
Package | Version |
---|---|
SatPy | 0.9.0 |
PyResample | 1.10.1 |
Trollimage | 1.5.3 |
PyKdtree | 1.3.1 |
In order for the modis reader (hdf eos l1b), you need the pyhdf python package to be installed with:
pip install python-hdf4
or if running a conda environment:
conda install pyhdf
from satpy.scene import Scene
from satpy import find_files_and_readers
from datetime import datetime
DATA_DIR = "/home/a000680/data/polar_in/direct_readout/eos/lvl1"
myfiles = find_files_and_readers(base_dir=DATA_DIR,
sensor="modis",
start_time=datetime(2016, 3, 30, 11, 40),
end_time=datetime(2016, 3, 30, 12, 5),
reader='modis_l1b')
scn = Scene(filenames=myfiles)
composite_name = 'true_color'
scn.load([composite_name], resolution=1000)
areaid = 'eurol'
lcn = scn.resample(areaid, radius_of_influence=10000)
lcn.show(composite_name)
lcn.save_dataset(composite_name, './modis_%s_rgb_%s_%s.png' %
(composite_name, lcn.attrs['start_time'].strftime('%Y%m%d%H%M'), areaid))