-
-
Save kokkytos/2bacd2b04181f5df3b170eb7fea6c023 to your computer and use it in GitHub Desktop.
viirs sdr to geotiff with satpy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from satpy import find_files_and_readers, Scene | |
from datetime import datetime | |
BASEDIR='/home/leonidas/viirs' | |
my_files = find_files_and_readers(base_dir=BASEDIR, | |
reader='viirs_sdr', | |
start_time=datetime(2018, 8, 26, 18, 1, 0), | |
end_time=datetime(2018, 9, 1, 18, 30, 0)) | |
scene = Scene(filenames=my_files, reader='viirs_sdr') | |
scene.load(["DNB"]) #alternative method: scene.load([0.7]) | |
scene.save_datasets(base_dir=BASEDIR,file_pattern='{name}_{start_time:%Y%m%d_%H%M%S}.tif', floating_point=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment