Skip to content

Instantly share code, notes, and snippets.

Created Sep 7, 2018
What would you like to do?
viirs sdr to geotiff with satpy
# -*- coding: utf-8 -*-
from satpy import find_files_and_readers, Scene
from datetime import datetime
my_files = find_files_and_readers(base_dir=BASEDIR,
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