Python and GOES-16 RGB’s (Tutorials Coming Soon)

True_Color_SatPy.png

True Color RGB created with Python (SatPy) – 09/14/2018 15:02 UTC

Hi all!

Just sharing a nice step on the quest to create GOES-16 RGB’s using Python. We have plans to publish tutorials on RGB’s in the near future (as a follow up to the Python + GOES-16 Tutorial Series) and use this in Capacity Building sessions.

We already have Python scripts to create the following RGB’s (click to access the RAMMB and NASA SPoRT Quick Guides that greatly helps to understand them):

But we created these without SatPy (former Pytroll). In order to create this nice True Color composite with SatPy, these are the steps we followed:

1 – Download some data from Amazon using scripts or this web interface. For the example below we use CONUS L1b. We are working for SatPy to work with GOES-16 Level 2 too.

2 – Install SatPy in a new env using anaconda. 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 conda-forge spyder
conda install -c anaconda spyder ipykernel=4.8.2

spyder

3 – Run the suuuuper complicated script below 🙂

from satpy import Scene
from glob import glob

scn = Scene(reader='abi_l1b', filenames=glob('*20182571502128*.nc'))
scn.load(['true_color'])

new_scn = scn.resample(scn.min_area(), resampler='native')
new_scn.save_dataset('true_color', filename='true_color'+'.png')

And… Ta-daaaa:

True_Color_SatPy_CONUS.png

Not bad for 6 lines of code…. 🙂

True_Color_SatPy_Caribbean.pngTrue_Color_SatPy_Mexico.png

One nice thing about SatPy is how easy you may create other compositions. Just by changing “true_color” to “airmass”:

scn.load(['airmass'])
new_scn = scn.resample(scn.min_area(), resampler='native')
new_scn.save_dataset('airmass', filename='airmass'+'.png')

… will give you the Airmass RGB:

Airmass_SatPy.png

Or changing to “day_microphysics”, would give you this:

DMP_SatPy.png

Or changing to “dust”:

Dust_SatPy.png

Or changing to “natural”:

Natural_SatPy.png

Great, isn’t it?

Please find other SatPy/Pytroll related posts from this Blog below: