GEONETClass: Manipulating GOES-16 Data With Python – Part I

Python-NetCDF.png

In this previous Blog post, you have seen an example on how to manipulate GOES-16 Data using GDAL, GMT and ImageMagick together in order to create a final product. All of them are freely available tools.

Now, let’s see how to start manipulating GOES-16 data with Python.

After all, GOES-16 data will be available through GNC-A in NetCDF4, and there are multiple tools to work with this format, as seen at this link. Python is another option.

Here are some simple steps to plot a GOES-16 image with Python:

1-) Download a GOES-R simulated image sample at this link. For this example we have put the file at C:\VLAB\

2-) Download and install the Anaconda software at this link.

Anaconda is an open data science platform powered by Python. For this test we have chosen the Python 3.7 version in a 64 bit machine. The installation in both Windows or Linux is pretty straighforward.

3-) After installing Anaconda, open the Windows command prompt or the Linux terminal and insert and execute the following comand:

conda install -c conda-forge netcdf4=1.2.7

Python-NetCDF_2

Note: You need to choose Yes (‘y’) + Enter when asked if you want to proceed with the installation.

This will install the NetCDF 4 library for Python and its dependencies, which is required to manipulate the GOES-16 NetCDF’s.

Note: If you can’t use the “conda” command in the command prompt, you do not have Anaconda added to the “Path” variable in your “Environments Variables” (Control Panel -> System -> Advanced System Settings -> Environment Variables). It should be added automatically during the Anaconda install, but if it is not, add these manually to the “Path” variable:

C:\Users\User_Name\Anaconda3\Library\bin and C:\Users\User_Name\Anaconda3\Scripts. Just be sure to change “User_Name” to your Windows user name.

4-) Start the Spyder development environment. It is installed with the Anaconda package.

Clipboard01

5-) Paste the following code in the Spyder Editor:

# Required libraries
import matplotlib.pyplot as plt
from netCDF4 import Dataset

# Path to the GOES-R simulated image file
path = 'C:\VLAB\OR_ABI-L2-CMIPF-M4C13_G16_s20161811455312_e20161811500135_c20161811500199.nc'

# Open the file using the NetCDF4 library
nc = Dataset(path)

# Extract the Brightness Temperature values from the NetCDF
data = nc.variables['CMI'][:]

# Show data
plt.imshow(data, cmap='Greys')

6-) Execute the program by clicking at the “Play” icon in the upper menu or hitting “F5”:

Spyder Execute

7-) That’s it! You will see the plot of the GOES-R simulated Channel 13. This same script will work with the real data you’re going to receive in your GNC-A station.

Spyder Figure.png

Note: If the new window with the image is not showing automatically (showing a small pic at the console, instead), you may go to Tools > preferences > IPython console > Graphics > Graphics backend > Backend: Automatic and restart Spyder. When executing a script, a new window will be opened with your plot visualization.

Isn’t this great? Now the possibilities are endless… For example, we can use the “Numpy” Python library (installed by default with Anaconda), in order to perform calculations with the Brightness Temperature values from this band and many many other things.

In the next post of this series we will show you how to put a basemap and how to use custom color tables! Stay tuned!

GOES-16 File Naming Convention

GNC-A GOES-16 CONVENTION

This is the file naming convention of the GOES-16 data that GNC-A users are going to receive beginning in early June:

16 Channels (Cloud and Moisture Imagery Product):

OR_ABI-L2CMIPFM3C09_G16_sYYYYJJJHHMMSSs_eYYYYJJJHHMMSSs_cYYYYJJJHHMMSSs.nc

Where:

OR: Operational System Real-Time Data
ABI-L2: Advanced Baseline Imager Level 2+
CMIPF: Cloud and Moisture Image Product – Full Disk
M3 / M4: ABI Mode 3 or ABI Mode 4
C09: Channel Number (Band 9 in this example)
G16: GOES-16
sYYYYJJJHHMMSSs: Observation Start
eYYYYJJJHHMMSSs: Observation End
cYYYYJJJHHMMSSs: File Creation

Level II Products:

OR_ABI-L2PRODUCTM3_G16_sYYYYJJJHHMMSSs_eYYYYJJJHHMMSSs_cYYYYJJJHHMMSSs.nc

“PRODUCT” can be:

ACMF: Clear Sky Masks
ACHAF: Cloud Top Height
ACHTF: Cloud Top Temperature
ACTPF: Cloud Top Phase
ADPF: Aerosol Detection (including Smoke and Dust)
AODF: Aerosol Optical Depth
CODF: Cloud Optical Depth
CPSF: Cloud Particle Size Distribution
DSIF: Derived Stability Indices
DMWF: Derived Motion Winds
FDCF: Fire / Hot Spot Characterization
FSCF: Snow Cover
LSTF: Land Surface Temperature (Skin)
RRQPEF: Rainfall Rate /QPE
SSTF: Sea Surface Temperature (Skin)
TPWF: Total Precipitable Water
VAAF: Volcanic Ash

GNC-A Bandwidth Increased from 11.6 Mbps to 12.0 Mbps

Since April 21th 2017,  the GNC-A transmission bandwidth has increased from 11.6 Mbps to 12.0 Mbps in preparation for GOES-16 imagery and products along with other product offerings.

IS-21 12 Mbps

Intelsat 21, the satellite used to rebroadcast GNC-A data

When GOES-R data become available for public release (which is expected to happen in early June), this will mean roughly a 6 fold increase in data coming down from the satellite to GNC-A receive stations.

It is essential that GNC-A users prepare for the increased data volume by determining whether their system can handle that amount of data or be prepared to selectively disable the new GOES-R channels: GOES-R-CMI-Imagery, GOES-R-GLM, and GOES-R-Level-2-Products sub-channels.

You could also use a script in your GNC-A system to regularly delete files depending on the capacity of your computer.

More info on the amount of data received may be found here.