{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## MPEF MSG Animation" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Summary\n", "In this tutorila we will load 6 hours worth of MSG Level1.5 data and create an animation, saved in mp4 format" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import os\n", "import sys\n", "import satpy\n", "from satpy import Scene\n", "from satpy.multiscene import MultiScene\n", "import imageio\n", "\n", "import glob" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": true }, "outputs": [], "source": [ "# locate and store then Image files in a list\n", "base_dir='/tcenas/scratch/pytroll/ex7/'\n", "files = glob.glob('{}*'.format(base_dir))\n", "files=sorted(files)\n", "\n", "# Create a scene for each file and store in scenes list\n", "scenes = [Scene(sensor=\"seviri\",reader='seviri_l1b_native', filenames=[filenames]) for filenames in files]\n", "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "mscn = MultiScene(scenes)\n", "# load a channel\n", "mscn.load(['VIS006'])\n", "mscn.save_animation('full_msg4_test.mp4', fps=2)\n", "# View the animation in your browser\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exercise 1 Create an animated composite resampled over Europe" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.7" } }, "nbformat": 4, "nbformat_minor": 2 }