Satpy Basic (FY4A)

1. Support Files

FY4A AGRI data in NetCDF format. Both Full DISK and regional images are supported.

Example filenames:

Full DISK:




Full disk scans are identified by DISK , regional scans by REGC.

Data Links:

Real Time Data Service (30 days) and Introduction Files:
History data (2018-03-12 -- ):
FY4A official weather application platform:

2. Calibration

You have three options:

  1. The raw detector counts (All channels)

  2. Reflectance (C01 - C06)

  3. Radiance and Brightness Temperature (C07 - C14)

3. Examples


conda install -c conda-forge satpy

Loading data

import os, glob
from satpy.scene import Scene
from satpy.utils import debug_on
from trollimage.colormap import greys, spectral
# load FY4A filenames
filenames = glob.glob('/xin/data/FY4A/20190807/FY4A-_AGRI*4000M_V0001.HDF')

# create the scene object
scn = Scene(filenames, reader='agri_l1')

# check available channels



Loading ir_channel data:

# take the ir channel as example
ir_channel = 'C12'
scn.load([ir_channel], generate=False, calibration='brightness_temperature')

Full Disk Image

# display in notebook


# save to file
# scn.save_dataset(ir_channel, filename='{sensor}_{name}.png')

True color Image

# get a list of all available composites for the current scene



Loading true_color:

#Beware that this step might need much memory available on the processing machine (depending on the number of cpu cores)

composite = 'true_color'
# scn.save_dataset(composite, filename='{sensor}_{name}.png')
Required file type 'agri_l1_4000m_geo' not found or loaded for 'satellite_zenith_angle'
Required file type 'agri_l1_4000m_geo' not found or loaded for 'satellite_azimuth_angle'
Required file type 'agri_l1_4000m_geo' not found or loaded for 'solar_azimuth_angle'
Required file type 'agri_l1_4000m_geo' not found or loaded for 'solar_zenith_angle'


Region of Interest

I take the typhoon LEKIMA as an example.

We can define a map-projection and a sub area, and project the data on this area.

Pyresample can be used to define the area easily.

This definition can also be put in the area.yaml configuration file.

from pyresample import get_area_def

area_id = 'lekima'

x_size = 549
y_size = 499
area_extent = (-1098006.560556, -967317.140452, 1098006.560556, 1026777.426728)
projection = '+proj=laea +lat_0=19.0 +lon_0=128.0 +ellps=WGS84'
description = "Typhoon Lekima"
proj_id = 'laea_128.0_19.0'

areadef = get_area_def(area_id, description, proj_id, projection,x_size, y_size, area_extent)

You can generate the area easily by

Here’s the output of python lekima_4km laea 10 28 118 138 4:

  description: lekima_4km
    proj: laea
    ellps: WGS84
    lat_0: 19.0
    lon_0: 128.0
    height: 499
    width: 549
    lower_left_xy: [-1098006.560556, -967317.140452]
    upper_right_xy: [1098006.560556, 1026777.426728]

Now, you can add the configuration to $PPP_CONFIG_DIR/areas.yaml and use it directly

# If you have added it to areas.yaml, you can use the name directly:
os.environ['PPP_CONFIG_DIR'] = '/yin_raid/xin/satpy_config/'
lekima_scene = scn.resample('lekima_4km')

# Otherwise, you need to use the areadef defined above:
# lekima_scene = scn.resample(areadef)
# lekima_scene.save_dataset(composite, filename='{sensor}_{name}_resampled.png')


If you want to generate pictures with specific colormap like the figure below,

please check another notebook about enhancement.



  1. Notebooks:
  2. Satpy examples:
  3. Presample:
  4. Pytroll:

Version control


Say something

Thank you

Your comment has been submitted and will be published once it has been approved.


Your comment has not been submitted. Please go back and try again. Thank You!

If this error persists, please open an issue by clicking here.