Satpy uses pygac to read and calibrate AVHRR GAC (Global Area Coverage) data. A reader for LAC (Local Area Coverage) data is under development. Check out https://github.com/pytroll/pygac/pull/5 if you are interested in contributing to the project.
Further Reading: https://www.avl.class.noaa.gov/release/data_available/avhrr/index.htm
AVHRR data in NOAA GAC format. Example filename: NSS.GHRR.NP.D15361.S0121.E0315.B3547172.SV
from datetime import datetime
from satpy.scene import Scene
scn = Scene(sensor="avhrr-2",
start_time=datetime(1995, 2, 24, 9, 40),
end_time=datetime(1995, 2, 24, 9, 42),
base_dir='/home/a001673/usr/src/cci_geolocation/data',
reader="avhrr_l1b_gaclac",
reader_kwargs={'tle_dir': '/path/to/tle/',
'tle_name': 'TLE_%(satname)s.txt'})
composite = 'overview'
scn.load([composite])
scn.show(composite)
Note that you have to specify location and format of the so called Two-Line-Elements (TLE) via reader_kwargs
. Some NOAA-16 TLEs are available in pygac's github repository. Historical TLEs can be obtained from https://www.celestrak.com/ and have the following format:
1 23455U 94089A 01122.93455091 .00000622 00000-0 36103-3 0 7210
2 23455 99.1771 113.3063 0008405 277.6106 82.4106 14.12671703326608
1 23455U 94089A 01326.97611660 .00000739 00000-0 42245-3 0 9806
2 23455 99.1886 322.4670 0009980 66.2863 293.9354 14.12871991355419
etc
For more keyword arguments checkout out the reader documentation.
Of course you can also readout the individual channels and ancillary datasets directly. Here is an example with NOAA-19 data:
%matplotlib inline
import satpy
# Channel set for KLM satellites. For POD satellites the channels are
# ['1', '2', '3', '4', '5'].
channels = ['1', '2', '3a', '3b', '4', '5']
# Select some ancillary datasets (there are more datasets available,
# see satpy/etc/readers/avhrr_l1b_gaclac.yaml)
ancillary = ['solar_zenith_angle',
'sensor_zenith_angle',
'latitude',
'longitude']
scene = satpy.Scene(filenames=['NSS.GHRR.NP.D15361.S0121.E0315.B3547172.SV'],
reader='avhrr_l1b_gaclac',
reader_kwargs={'tle_dir': 'tle/',
'tle_name': 'TLE_%(satname)s.txt'})
scene.load(channels + ancillary)
scene['4']
import matplotlib.pyplot as plt
fig, (ax1, ax2) = plt.subplots(ncols=2, figsize=(3, 20))
ax1.imshow(scene['4'])
ax2.imshow(scene['solar_zenith_angle'])
plt.show()