Hi all! As seen on this blog post, we may use Python / Satpy to generate a very nice color composite using GOES-16 data. One of the nicest thing about Satpy is that it may be used to process data from GOES-16, METEOSAT, Himawari, Sentinel-2, Sentinel-3, AQUA/TERRA, NPP and others. Actually we found it to be very easy to plot data from other satellites. We used Satpy to plot the image above (Typhoon Trami) using data downloaded from CODA (Copernicus Online Data Access). Below, another example plot:
And below, a plot for the Brazilian northeast coast:
Let’s see how to do it!
ACCESSING SENTINEL-3 DATA USING CODA
Create an account on the EUMETSAT Earth Observation portal for free. Click on “New User – Create New Account”. Fill out the requested data. You will receive a confirmation e-mail to complete your registration.
After accessing your EUMETSAT EO portal account, access CODA, the Copernicus Online Data Access webpage at the following link:
Click on the following icon to navigate on the map (or press your mouse scroll button):
Let’s suppose we want an image form the Pacific coast of South America. Navigate to that region:
Now click on the following icon to select your region of interest:
And select the area:
Expand the “Insert Search Criteria” menu. In “Product Type”, select “OL_1_EFR___”, in instrument, choose “OLCI”, and in “Product Level”, choose “L1”. Click at the magnifier icon to search for data over the select region.
You should see the available passes for that region:
Let’s select this one:
Click at the following icon to download the L1B data:
After the download, extract the data in the directory of you preference. In this example, we extracted it at C:\OLCI
Three things you must consider from the folder name: date (on red below), start time (on blue below), and end time (on green below):
You will use these on the Python code.
PROCESSING THE SENTINEL-3 DATA WITH SATPY
You should be familiar with Anaconda if you followed the GOES-16 and Python tutorials from this blog. Let’s make a quick overview.
Download the Anaconda Distribution from the following link:
After installing it, execute the Anaconda Prompt as an Admin:
Install SatPy in a new env using Anaconda and execute the Spyder IDE. Here are the commands we used:
conda create --name satellite activate satellite conda install -c conda-forge satpy conda install -c conda-forge matplotlib conda install -c conda-forge Pillow conda install -c conda-forge pyorbital conda install -c sunpy glymur
Use the following script to generate the True Color composite from that pass:
from satpy.scene import Scene from satpy import find_files_and_readers from datetime import datetime files = find_files_and_readers(sensor='olci', start_time=datetime(2018, 9, 24, 14, 19), end_time=datetime(2018, 9, 24, 14, 22), base_dir="C:\\OLCI", reader='nc_olci_l1b') scn = Scene(filenames=files) scn.load(['true_color']) scn.save_dataset('true_color', filename='true_color_gnc_tutorial'+'.png')
And that’s it! This is what we got plotting this dataset!
You can do many things using the features provided by Python / Satpy, like reprojection, exporting to other formats, overlaying maps and many other things!
You. Can. Do. Anything. With. Python.