satpy.readers.ahi_hsd module

Advanced Himawari Imager (AHI) standard format data reader.


Time Information

AHI observations use the idea of a “nominal” time and an “observation” time. The “nominal” time or repeat cycle is the overall window when the instrument can record data, usually at a specific and consistent interval. The “observation” time is when the data was actually observed inside the nominal window. These two times are stored in a sub-dictionary in the metadata calls time_parameters. Nominal time can be accessed from the nominal_start_time and nominal_end_time metadata keys and observation time from the observation_start_time and observation_end_time keys. Observation time can also be accessed from the parent (.attrs) dictionary as the start_time and end_time keys.

Satellite Position

As discussed in the Orbital Parameters documentation, a satellite position can be described by a specific “actual” position, a “nominal” position, a “projection” position, or sometimes a “nadir” position. Not all readers are able to produce all of these positions. In the case of AHI HSD data we have an “actual” and “projection” position. For a lot of sensors/readers though, the “actual” position values do not change between bands or segments of the same time step (repeat cycle). AHI HSD files contain varying values for the actual position.

Other components in Satpy use this actual satellite position to generate other values (ex. sensor zenith angles). If these values are not consistent between bands then Satpy (dask) will not be able to share these calculations (generate one sensor zenith angle for band 1, another for band 2, etc) even though there is rarely a noticeable difference. To deal with this this reader has an option round_actual_position that defaults to True and will round the “actual” position (longitude, latitude, altitude) in a way to produce as consistent a position between bands as possible.

class satpy.readers.ahi_hsd.AHIHSDFileHandler(filename, filename_info, filetype_info, mask_space=True, calib_mode='update', user_calibration=None, round_actual_position=True)[source]

Bases: BaseFileHandler

AHI standard format reader.

The AHI sensor produces data for some pixels outside the Earth disk (i,e: atmospheric limb or deep space pixels). By default, these pixels are masked out as they contain data of limited or no value, but some applications do require these pixels. It is therefore possible to override the default behaviour and perform no masking of non-Earth pixels.

In order to change the default behaviour, use the ‘mask_space’ variable as part of reader_kwargs upon Scene creation:

import satpy
import glob

filenames = glob.glob('*FLDK*.dat')
scene = satpy.Scene(filenames,
                    reader_kwargs={'mask_space': False})

The AHI HSD data files contain multiple VIS channel calibration coefficients. By default, the updated coefficients in header block 6 are used. If the user prefers the default calibration coefficients from block 5 then they can pass calib_mode=’nominal’ when creating a scene:

import satpy
import glob

filenames = glob.glob('*FLDK*.dat')
scene = satpy.Scene(filenames,
                    reader_kwargs={'calib_mode': 'update'})

Alternative AHI calibrations are also available, such as GSICS coefficients. As such, you can supply custom per-channel correction by setting calib_mode=’custom’ and passing correction factors via:

user_calibration={'chan': ['slope': slope, 'offset': offset]}

Where slo and off are per-channel slope and offset coefficients defined by:

rad_leo = (rad_geo - off) / slo

If you do not have coefficients for a particular band, then by default the slope will be set to 1 .and the offset to 0.:

import satpy
import glob

# Load bands 7, 14 and 15, but we only have coefs for 7+14
calib_dict = {'B07': {'slope': 0.99, 'offset': 0.002},
              'B14': {'slope': 1.02, 'offset': -0.18}}

filenames = glob.glob('*FLDK*.dat')
scene = satpy.Scene(filenames,
                    reader_kwargs={'user_calibration': calib_dict)
# B15 will not have custom radiance correction applied.
scene.load(['B07', 'B14', 'B15'])

By default, user-supplied calibrations / corrections are applied to the radiance data in accordance with the GSICS standard defined in the equation above. However, user-supplied gain and offset values for converting digital number into radiance via Rad = DN * gain + offset are also possible. To supply your own factors, supply a user calibration dict using type: ‘DN’ as follows:

calib_dict = {'B07': {'slope': 0.0037, 'offset': 18.5},
              'B14': {'slope': -0.002, 'offset': 22.8},
              'type': 'DN'}

You can also explicitly select radiance correction with ‘type’: ‘RAD’ but this is not necessary as it is the default option if you supply your own correction coefficients.

Initialize the reader.

property area

Get AreaDefinition representing this file’s data.

calibrate(data, calibration)[source]

Calibrate the data.


Calibrate to radiance.

property end_time

Get the nominal end time.


Get the area definition.

get_dataset(key, info)[source]

Get the dataset.

property nominal_end_time

Get the nominal end time.

property nominal_start_time

Time this band was nominally to be recorded.

property observation_end_time

Get the observation end time.

property observation_start_time

Get the observation start time.

read_band(key, ds_info)[source]

Read the data.

property start_time

Get the nominal start time.