
Hi GEONETCasters! In the ninth entry in the series, very nice plots from SEVIRI using HRIT data received in your GEONETCast-Americas station. The plots (PNG above and GeoTIFF below) were created with Python / SatPy. It will be a great addition to the SIGMACast visualized products!

Natural Colors RGB from SEVIRI – February 1st, 2018 – 15:00 UTC
The MSG HRIT files may be found on the “MSG-0degree” folder in your GEONETCast-Americas station.

Here are the steps followed to produce the PNG’s / GeoTIFF’s with SatPy:
Download and compile the Public WaveLet Transform Decompression Library from EUMETSAT. Its directory should be referenced on the script.
Also, download and install Miniconda:
https://conda.io/en/latest/miniconda.html
Create a “satpy” environment and download the required libraries (in the instruction below other useful libraries are installed apart from satpy):
conda create -c conda-forge -n satpy python=3.6 satpy gdal matplotlib netcdf4 pyhdf pyproj pyorbital pyresample Pillow glymur basemap basemap-data-hires conda
Then, activate the “satpy” environment:
# Windows
activate satpy
# Linux
source activate satpy
Use the following script to plot the image (Natural Colors RGB, in this example):
# Required Libraries
from satpy.utils import debug_on
debug_on()
from satpy.scene import Scene
from satpy import find_files_and_readers
from datetime import datetime
from glob import glob
import os
from satpy.writers import geotiff
# Creating an Area Definition on the fly
from pyresample import geometry
area_id = 'seviri_0deg'
description = 'Seviri 0 Degree'
proj_id = 'seviri_0deg'
x_size = 3712
y_size = 3712
area_extent = (-8326322.82790897,-8326322.82790897,8326322.82790897,8326322.82790897)
proj_dict = {'a': 6378169.0, 'b': 6378169.0,'units': 'm', 'lon_0': 0.0,'proj': 'eqc', 'lat_0': 0.0}
area_def = geometry.AreaDefinition(area_id, description, proj_id, proj_dict, x_size, y_size, area_extent)
# Path to XRIT_DECOMPRESS library
os.environ['XRIT_DECOMPRESS_PATH'] = 'C:\\xRITDecompress\\xRITDecompress_x64\\xRITDecompress.exe'
# Create the scene
global_scene = Scene(reader='seviri_l1b_hrit',filenames=glob('C:\\MSG\\*201902011500*'))
# Create the Natural Colors RGB composite
composite = 'natural_color_sun'
global_scene.load([composite])
global_scene.save_dataset(composite,'D:\\VLAB\\MSG4_test_nat.png')
local_scn = global_scene.resample(area_def)
local_scn.save_dataset(composite,'D:\\VLAB\\MSG4_test_nat.tif')
Great, isn’t it?
Please find below other examples (just change “composite” to ‘airmass’, ‘snow’ and ‘day_microphysics’. Other compositions are available!



Please find below the other posts from this Blog series: