#!/usr/bin/python3 # -*- coding: utf-8 -*- # satpy script to reproduce issues discussed here: # https://groups.google.com/g/pytroll/c/qjg5zddABA0 from satpy import Scene from glob import glob # Why to hell is it not working? # from satpy.utils import debug_on # debug_on() # Time slot used Dat='202206060000' area = 'seviri_0deg' # 'night_ir_alpha' is foreground with clouds # composite = 'night_ir_alpha' composite = 'night_ir_with_background_hires' # All files needed are decompressed in ./ir-data files = glob('./ir-data/H-000-MSG4*' + Dat + '*') global_scene = Scene(filenames = files, reader = 'seviri_l1b_hrit') global_scene.load([composite]) # Full earth seviri image has South on top, image size is 3712x3712 pixels, resample 'seviri_0deg' rotates it new_scene = global_scene.resample(area, radius_of_influence = 20000, fill_value=255) # , reduce_data = False new_scene.save_dataset(composite, './MSG4-BlackMarble.png')