satpy.readers.mviri_l1b_fiduceo_nc module

FIDUCEO MVIRI FCDR Reader.

Introduction

The FIDUCEO MVIRI FCDR is a Fundamental Climate Data Record (FCDR) of re-calibrated Level 1.5 Infrared, Water Vapour, and Visible radiances from the Meteosat Visible Infra-Red Imager (MVIRI) instrument onboard the Meteosat First Generation satellites. There are two variants of the dataset: The full FCDR and a simplified version called easy FCDR. Some datasets are only available in one of the two variants, see the corresponding YAML definition in satpy/etc/readers/.

Dataset Names

The FIDUCEO MVIRI readers use names VIS, WV and IR for the visible, water vapor and infrared channels, respectively. These are different from the original netCDF variable names for the following reasons:

  • VIS channel is named differently in full FCDR (counts_vis) and easy FCDR (toa_bidirectional_reflectance_vis)

  • netCDF variable names contain the calibration level (e.g. counts_...), which might be confusing for satpy users if a different calibration level is chosen.

Remaining datasets (such as quality flags and uncertainties) have the same name in the reader as in the netCDF file.

Example

This is how to read FIDUCEO MVIRI FCDR data in satpy:

from satpy import Scene

scn = Scene(filenames=['FIDUCEO_FCDR_L15_MVIRI_MET7-57.0...'],
            reader='mviri_l1b_fiduceo_nc')
scn.load(['VIS', 'WV', 'IR'])

Global netCDF attributes are available in the raw_metadata attribute of each loaded dataset.

Image Orientation

The images are stored in MVIRI scanning direction, that means South is up and East is right. This can be changed as follows:

scn.load(['VIS'], upper_right_corner='NE')

Geolocation

In addition to the image data, FIDUCEO also provides so called static FCDRs containing latitude and longitude coordinates. In order to simplify their usage, the FIDUCEO MVIRI readers do not make use of these static files, but instead provide an area definition that can be used to compute longitude and latitude coordinates on demand.

area = scn['VIS'].attrs['area']
lons, lats = area.get_lonlats()

Those were compared to the static FCDR and they agree very well, however there are small differences. The mean difference is < 1E3 degrees for all channels and projection longitudes.

Huge VIS Reflectances

You might encounter huge VIS reflectances (10^8 percent and greater) in situations where both radiance and solar zenith angle are small. The reader certainly needs some improvement in this regard. Maybe the corresponding uncertainties can be used to filter these cases before calculating reflectances.

VIS Channel Quality Flags

Quality flags are available for the VIS channel only. A simple approach for masking bad quality pixels is to set the mask_bad_quality keyword argument to True:

scn = Scene(filenames=['FIDUCEO_FCDR_L15_MVIRI_MET7-57.0...'],
            reader='mviri_l1b_fiduceo_nc',
            reader_kwargs={'mask_bad_quality': True})

See FiduceoMviriBase for an argument description. In some situations however the entire image can be flagged (look out for warnings). In that case check out the quality_pixel_bitmask and data_quality_bitmask datasets to find out why.

Angles

The FIDUCEO MVIRI FCDR provides satellite and solar angles on a coarse tiepoint grid. By default these datasets will be interpolated to the higher VIS resolution. This can be changed as follows:

scn.load(['solar_zenith_angle'], resolution=4500)

If you need the angles in both resolutions, use data queries:

from satpy import DataQuery

query_vis = DataQuery(
    name='solar_zenith_angle',
    resolution=2250
)
query_ir = DataQuery(
    name='solar_zenith_angle',
    resolution=4500
)
scn.load([query_vis, query_ir])

# Use the query objects to access the datasets as follows
sza_vis = scn[query_vis]

References

satpy.readers.mviri_l1b_fiduceo_nc.ALTITUDE = 35785860.0

[Handbook] section 5.2.1.

class satpy.readers.mviri_l1b_fiduceo_nc.DatasetWrapper(nc)[source]

Bases: object

Helper class for accessing the dataset.

Wrap the given dataset.

property attrs

Exposes dataset attributes.

get_image_size(resolution)[source]

Get image size for the given resolution.

get_time()[source]

Get time coordinate.

Variable is sometimes named “time” and sometimes “time_ir_wv”.

get_xy_coords(resolution)[source]

Get x and y coordinates for the given resolution.

class satpy.readers.mviri_l1b_fiduceo_nc.FiduceoMviriBase(filename, filename_info, filetype_info, mask_bad_quality=False)[source]

Bases: BaseFileHandler

Baseclass for FIDUCEO MVIRI file handlers.

Initialize the file handler.

Parameters

mask_bad_quality – Mask VIS pixels with bad quality, that means any quality flag except “ok”. If you need more control, use the quality_pixel_bitmask and data_quality_bitmask datasets.

get_area_def(dataset_id)[source]

Get area definition of the given dataset.

get_dataset(dataset_id, dataset_info)[source]

Get the dataset.

nc_keys = {'IR': 'count_ir', 'WV': 'count_wv'}
class satpy.readers.mviri_l1b_fiduceo_nc.FiduceoMviriEasyFcdrFileHandler(filename, filename_info, filetype_info, mask_bad_quality=False)[source]

Bases: FiduceoMviriBase

File handler for FIDUCEO MVIRI Easy FCDR.

Initialize the file handler.

Parameters

mask_bad_quality – Mask VIS pixels with bad quality, that means any quality flag except “ok”. If you need more control, use the quality_pixel_bitmask and data_quality_bitmask datasets.

nc_keys = {'IR': 'count_ir', 'VIS': 'toa_bidirectional_reflectance_vis', 'WV': 'count_wv'}
class satpy.readers.mviri_l1b_fiduceo_nc.FiduceoMviriFullFcdrFileHandler(filename, filename_info, filetype_info, mask_bad_quality=False)[source]

Bases: FiduceoMviriBase

File handler for FIDUCEO MVIRI Full FCDR.

Initialize the file handler.

Parameters

mask_bad_quality – Mask VIS pixels with bad quality, that means any quality flag except “ok”. If you need more control, use the quality_pixel_bitmask and data_quality_bitmask datasets.

nc_keys = {'IR': 'count_ir', 'VIS': 'count_vis', 'WV': 'count_wv'}
class satpy.readers.mviri_l1b_fiduceo_nc.IRWVCalibrator(coefs)[source]

Bases: object

Calibrate IR & WV channels.

Initialize the calibrator.

Parameters

coefs – Calibration coefficients.

calibrate(counts, calibration)[source]

Calibrate IR/WV counts to the given calibration.

class satpy.readers.mviri_l1b_fiduceo_nc.Interpolator[source]

Bases: object

Interpolate datasets to another resolution.

static interp_acq_time(time2d, target_y)[source]

Interpolate scanline acquisition time to the given coordinates.

The files provide timestamps per pixel for the low resolution channels (IR/WV) only.

  1. Average values in each line to obtain one timestamp per line.

  2. For the VIS channel duplicate values in y-direction (as advised by [PUG]).

Note that the timestamps do not increase monotonically with the line number in some cases.

Returns

Mean scanline acquisition timestamps

static interp_tiepoints(ds, target_x, target_y)[source]

Interpolate dataset between tiepoints.

Uses linear interpolation.

FUTURE: [PUG] recommends cubic spline interpolation.

Parameters
  • ds – Dataset to be interpolated

  • target_x – Target x coordinates

  • target_y – Target y coordinates

satpy.readers.mviri_l1b_fiduceo_nc.MVIRI_FIELD_OF_VIEW = 18.0

[Handbook] section 5.3.2.1.

class satpy.readers.mviri_l1b_fiduceo_nc.Navigator[source]

Bases: object

Navigate MVIRI images.

get_area_def(im_size, projection_longitude)[source]

Create MVIRI area definition.

class satpy.readers.mviri_l1b_fiduceo_nc.VISCalibrator(coefs, solar_zenith_angle=None)[source]

Bases: object

Calibrate VIS channel.

Initialize the calibrator.

Parameters
  • coefs – Calibration coefficients.

  • solar_zenith_angle (optional) – Solar zenith angle. Only required for calibration to reflectance.

calibrate(counts, calibration)[source]

Calibrate VIS counts.

static refl_factor_to_percent(refl)[source]

Convert reflectance factor to percent.

update_refl_attrs(refl)[source]

Update attributes of reflectance datasets.

class satpy.readers.mviri_l1b_fiduceo_nc.VisQualityControl(mask)[source]

Bases: object

Simple quality control for VIS channel.

Initialize the quality control.

check()[source]

Check VIS channel quality and issue a warning if it’s bad.

mask(ds)[source]

Mask VIS pixels with bad quality.

Pixels are considered bad quality if the “quality_pixel_bitmask” is everything else than 0 (no flag set).

satpy.readers.mviri_l1b_fiduceo_nc.is_high_resol(resolution)[source]

Identify high resolution channel.