From 4a47cf246eaa04314bb57bd8493dd7a34e84a4b1 Mon Sep 17 00:00:00 2001 From: Johan Strandgren Date: Mon, 8 Aug 2022 17:24:11 +0200 Subject: [PATCH 01/41] Add new EUMETSAT L2 BUFR product reader (based on seviri_l2_bufr.py reader) and modify seviri_l2_bufr.yaml accordingly. --- satpy/etc/readers/seviri_l2_bufr.yaml | 12 +- satpy/readers/eum_l2_bufr.py | 290 ++++++++++++++++++++++++++ 2 files changed, 296 insertions(+), 6 deletions(-) create mode 100644 satpy/readers/eum_l2_bufr.py diff --git a/satpy/etc/readers/seviri_l2_bufr.yaml b/satpy/etc/readers/seviri_l2_bufr.yaml index e0c51c4370..298e5a15be 100644 --- a/satpy/etc/readers/seviri_l2_bufr.yaml +++ b/satpy/etc/readers/seviri_l2_bufr.yaml @@ -11,41 +11,41 @@ reader: file_types: seviri_l2_bufr_asr: - file_reader: !!python/name:satpy.readers.seviri_l2_bufr.SeviriL2BufrFileHandler + file_reader: !!python/name:satpy.readers.eum_l2_bufr.EumetsatL2BufrFileHandler file_patterns: - 'ASRBUFRProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:s}_{satellite:s}_{mission:s}_{subsat:s}' - '{spacecraft:s}-SEVI-MSGASRE-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}.bfr' - '{spacecraft:s}-SEVI-MSGASRE-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}' seviri_l2_bufr_cla: - file_reader: !!python/name:satpy.readers.seviri_l2_bufr.SeviriL2BufrFileHandler + file_reader: !!python/name:satpy.readers.eum_l2_bufr.EumetsatL2BufrFileHandler file_patterns: - 'CLABUFRProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:s}_{satellite:s}_{mission:s}_{subsat:s}' - '{spacecraft:s}-SEVI-MSGCLAP-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}.bfr' - '{spacecraft:s}-SEVI-MSGCLAP-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}' seviri_l2_bufr_csr: - file_reader: !!python/name:satpy.readers.seviri_l2_bufr.SeviriL2BufrFileHandler + file_reader: !!python/name:satpy.readers.eum_l2_bufr.EumetsatL2BufrFileHandler file_patterns: - 'CSRBUFRProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:s}_{satellite:s}_{mission:s}_{subsat:s}' - '{spacecraft:s}-SEVI-MSGCSKR-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}.bfr' - '{spacecraft:s}-SEVI-MSGCSKR-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}' seviri_l2_bufr_gii: - file_reader: !!python/name:satpy.readers.seviri_l2_bufr.SeviriL2BufrFileHandler + file_reader: !!python/name:satpy.readers.eum_l2_bufr.EumetsatL2BufrFileHandler file_patterns: - 'GIIBUFRProduct_{start_time:%Y%m%d%H%M%S}Z_00_{server:s}_{satellite:s}_{mission:s}_{subsat:s}' - '{spacecraft:s}-SEVI-MSGGIIN-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}.bfr' - '{spacecraft:s}-SEVI-MSGGIIN-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}' seviri_l2_bufr_thu: - file_reader: !!python/name:satpy.readers.seviri_l2_bufr.SeviriL2BufrFileHandler + file_reader: !!python/name:satpy.readers.eum_l2_bufr.EumetsatL2BufrFileHandler file_patterns: - 'THBUFRProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:s}_{satellite:s}_{mission:s}_{subsat:s}' - '{spacecraft:s}-SEVI-MSGTPHU-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}.bfr' - '{spacecraft:s}-SEVI-MSGTPHU-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}' seviri_l2_bufr_toz: - file_reader: !!python/name:satpy.readers.seviri_l2_bufr.SeviriL2BufrFileHandler + file_reader: !!python/name:satpy.readers.eum_l2_bufr.EumetsatL2BufrFileHandler file_patterns: - 'TOZBUFRProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:s}_{satellite:s}_{mission:s}_{subsat:s}' - '{spacecraft:s}-SEVI-MSGTOZN-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}.bfr' diff --git a/satpy/readers/eum_l2_bufr.py b/satpy/readers/eum_l2_bufr.py new file mode 100644 index 0000000000..b0f04b1609 --- /dev/null +++ b/satpy/readers/eum_l2_bufr.py @@ -0,0 +1,290 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (c) 2019 Satpy developers +# +# This file is part of satpy. +# +# satpy is free software: you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. +# +# satpy is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# satpy. If not, see . + +"""SEVIRI L2 BUFR format reader. + +References: + EUMETSAT Product Navigator + https://navigator.eumetsat.int/ + +""" +import logging +from datetime import datetime + +import dask.array as da +import numpy as np +import xarray as xr + +from satpy import CHUNK_SIZE +from satpy.readers._geos_area import get_geos_area_naming +from satpy.readers.eum_base import get_service_mode, recarray2dict +from satpy.readers.file_handlers import BaseFileHandler +from satpy.readers.seviri_base import mpef_product_header +from satpy.resample import get_area_def + +try: + import eccodes as ec +except ImportError: + raise ImportError( + "Missing eccodes-python and/or eccodes C-library installation. Use conda to install eccodes") + +logger = logging.getLogger('EumetsatL2Bufr') + +data_center_dict = {55: {'ssp': 'E0415', 'name': 'MSG1'}, 56: {'ssp': 'E0455', 'name': 'MSG2'}, + 57: {'ssp': 'E0095', 'name': 'MSG3'}, 70: {'ssp': 'E0000', 'name': 'MSG4'}, + 71: {'ssp': 'E0000', 'name': 'MTGi1'}} + +seg_size_dict = {'seviri_l2_bufr_asr': 16, 'seviri_l2_bufr_cla': 16, + 'seviri_l2_bufr_csr': 16, 'seviri_l2_bufr_gii': 3, + 'seviri_l2_bufr_thu': 16, 'seviri_l2_bufr_toz': 3, + 'fci_l2_bufr_asr': 16} + + +class EumetsatL2BufrFileHandler(BaseFileHandler): + """File handler for EUMETSAT SEVIRI and FCI L2 BUFR products. + + **Loading data with AreaDefinition** + + By providing the `with_area_definition` as True in the `reader_kwargs`, the dataset is loaded with + an AreaDefinition using a standardized AreaDefinition in areas.yaml. By default, the dataset will + be loaded with a SwathDefinition, i.e. similar to how the data are stored in the BUFR file: + + scene = satpy.Scene(filenames, + reader='seviri_l2_bufr', + reader_kwargs={'with_area_definition': False}) + + **Defining dataset recticifation longitude** + + The BUFR data were originally extracted from a rectified two-dimensional grid with a given central longitude + (typically the sub-satellite point). This information is not available in the file itself nor the filename (for + files from the EUMETSAT archive). Also, it cannot be reliably derived from all datasets themselves. Hence, the + rectification longitude can be defined by the user by providing `rectification_longitude` in the `reader_kwargs`: + + scene = satpy.Scene(filenames, + reader='seviri_l2_bufr', + reader_kwargs={'rectification_longitude': 0.0}) + + If not done, default values applicable to the operational grids of the respective SEVIRI instruments will be used. + """ + + def __init__(self, filename, filename_info, filetype_info, with_area_definition=False, + rectification_longitude='default', **kwargs): + """Initialise the file handler for EUMETSAT SEVIRI and FCI L2 BUFR data.""" + super(EumetsatL2BufrFileHandler, self).__init__(filename, + filename_info, + filetype_info) + + if ('server' in filename_info): + # EUMETSAT Offline Bufr product + self.bufr_header = self._read_mpef_header() + else: + # Product was retrieved from the EUMETSAT Data Center + timeStr = self.get_attribute('typicalDate')+self.get_attribute('typicalTime') + buf_start_time = datetime.strptime(timeStr, "%Y%m%d%H%M%S") + sc_id = self.get_attribute('satelliteIdentifier') + self.bufr_header = {} + self.bufr_header['NominalTime'] = buf_start_time + self.bufr_header['SpacecraftName'] = data_center_dict[sc_id]['name'] + self.bufr_header['RectificationLongitude'] = data_center_dict[sc_id]['ssp'] + + if rectification_longitude != 'default': + self.bufr_header['RectificationLongitude'] = f'E{int(rectification_longitude * 10):04d}' + + self.with_adef = with_area_definition + self.filetype = filetype_info['file_type'] + self.seg_size = seg_size_dict[self.filetype] + + @property + def start_time(self): + """Return the repeat cycle start time.""" + return self.bufr_header['NominalTime'] + + # @property + # def end_time(self): + # """Return the repeat cycle end time.""" + # return self.start_time + timedelta(minutes=15) + + @property + def platform_name(self): + """Return spacecraft name.""" + if self.bufr_header['SpacecraftName'].isdigit(): + # self._read_mpef_header will return the SpacecraftName as a string with an integer, representing the + # Meteosat series number (1-11). This is cnverted to the corresponding MSG ID. + return f"MSG{int(self.bufr_header['SpacecraftName'])-7}" + else: + return self.bufr_header['SpacecraftName'] + + @property + def sensor_name(self): + """Return instrument name.""" + if self.platform_name.startswith('MSG'): + return 'seviri' + elif self.platform_name.startswith('MTG'): + return 'fci' + else: + raise NotImplementedError(f'Unknown satellite platform {self.platform_name}.') + + @property + def ssp_lon(self): + """Return subsatellite point longitude.""" + # e.g. E0415 + ssp_lon = self.bufr_header['RectificationLongitude'] + return float(ssp_lon[1:])/10. + + def get_area_def(self, key): + """Return the area definition.""" + try: + return self._area_def + except AttributeError: + raise NotImplementedError + + def _read_mpef_header(self): + """Read MPEF header.""" + hdr = np.fromfile(self.filename, mpef_product_header, 1) + return recarray2dict(hdr) + + def get_attribute(self, key): + """Get BUFR attributes.""" + # This function is inefficient as it is looping through the entire + # file to get 1 attribute. It causes a problem though if you break + # from the file early - dont know why but investigating - fix later + fh = open(self.filename, "rb") + while True: + # get handle for message + bufr = ec.codes_bufr_new_from_file(fh) + if bufr is None: + break + ec.codes_set(bufr, 'unpack', 1) + attr = ec.codes_get(bufr, key) + ec.codes_release(bufr) + + fh.close() + return attr + + def get_array(self, key): + """Get all data from file for the given BUFR key.""" + with open(self.filename, "rb") as fh: + msgCount = 0 + while True: + bufr = ec.codes_bufr_new_from_file(fh) + if bufr is None: + break + + ec.codes_set(bufr, 'unpack', 1) + + # if is the first message initialise our final array + if (msgCount == 0): + arr = da.from_array(ec.codes_get_array( + bufr, key, float), chunks=CHUNK_SIZE) + else: + tmpArr = da.from_array(ec.codes_get_array( + bufr, key, float), chunks=CHUNK_SIZE) + arr = da.concatenate((arr, tmpArr)) + + msgCount = msgCount+1 + ec.codes_release(bufr) + + if arr.size == 1: + arr = arr[0] + + return arr + + def get_dataset(self, dataset_id, dataset_info): + """Create dataset. + + Load data from BUFR file using the BUFR key in dataset_info + and create the dataset with or without an AreaDefinition. + + """ + arr = self.get_array(dataset_info['key']) + + if self.with_adef: + xarr = self.get_dataset_with_area_def(arr, dataset_id) + # coordinates are not relevant when returning data with an AreaDefinition + if 'coordinates' in dataset_info.keys(): + del dataset_info['coordinates'] + else: + xarr = xr.DataArray(arr, dims=["y"]) + + if 'fill_value' in dataset_info: + xarr = xarr.where(xarr != dataset_info['fill_value']) + + self._add_attributes(xarr, dataset_info) + + return xarr + + def get_dataset_with_area_def(self, arr, dataset_id): + """Get dataset with an AreaDefinition.""" + if dataset_id['name'] in ['latitude', 'longitude']: + self.__setattr__(dataset_id['name'], arr) + xarr = xr.DataArray(arr, dims=["y"]) + else: + lons_1d, lats_1d, data_1d = da.compute(self.longitude, self.latitude, arr) + + self._area_def = self._construct_area_def(dataset_id) + icol, irow = self._area_def.get_array_indices_from_lonlat(lons_1d, lats_1d) + + data_2d = np.empty(self._area_def.shape) + data_2d[:] = np.nan + data_2d[irow.compressed(), icol.compressed()] = data_1d[~irow.mask] + + xarr = xr.DataArray(da.from_array(data_2d, CHUNK_SIZE), dims=('y', 'x')) + + ntotal = len(icol) + nvalid = len(icol.compressed()) + if nvalid < ntotal: + logging.warning(f'{ntotal-nvalid} out of {ntotal} data points could not be put on ' + f'the grid {self._area_def.area_id}.') + + return xarr + + def _construct_area_def(self, dataset_id): + """Construct a standardized AreaDefinition based on satellite, instrument, resolution and sub-satellite point. + + Returns: + AreaDefinition: A pyresample AreaDefinition object containing the area definition. + + """ + res = dataset_id['resolution'] + + area_naming_input_dict = {'platform_name': self.platform_name[:3].lower(), + 'instrument_name': self.sensor_name, + 'resolution': res, + } + + area_naming = get_geos_area_naming({**area_naming_input_dict, + **get_service_mode(self.sensor_name, self.ssp_lon)}) + + # Datasets with a segment size of 3 pixels extend outside the original SEVIRI 3km grid (with 1238 x 1238 + # segments a 3 pixels). Hence, we need to use corresponding area defintions in areas.yaml + if self.seg_size == 3: + area_naming['area_id'] += '_ext' + area_naming['description'] += ' (extended outside original 3km grid)' + + # Construct AreaDefinition from standardized area definition in areas.yaml. + stand_area_def = get_area_def(area_naming['area_id']) + + return stand_area_def + + def _add_attributes(self, xarr, dataset_info): + """Add dataset attributes to xarray.""" + xarr.attrs['sensor'] = self.sensor_name.upper() + xarr.attrs['platform_name'] = self.platform_name + xarr.attrs['ssp_lon'] = self.ssp_lon + xarr.attrs['seg_size'] = self.seg_size + xarr.attrs.update(dataset_info) From bc5f76dcb9c13a2fcd6a90e73c739389349c250f Mon Sep 17 00:00:00 2001 From: Johan Strandgren Date: Mon, 8 Aug 2022 17:30:19 +0200 Subject: [PATCH 02/41] Remove seviri_l2_bufr reader (replaced by eum_l2_bufr) and adapt test script accordingly. --- satpy/readers/seviri_l2_bufr.py | 278 ------------------ .../tests/reader_tests/test_seviri_l2_bufr.py | 21 +- 2 files changed, 11 insertions(+), 288 deletions(-) delete mode 100644 satpy/readers/seviri_l2_bufr.py diff --git a/satpy/readers/seviri_l2_bufr.py b/satpy/readers/seviri_l2_bufr.py deleted file mode 100644 index cb38f44acf..0000000000 --- a/satpy/readers/seviri_l2_bufr.py +++ /dev/null @@ -1,278 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# Copyright (c) 2019 Satpy developers -# -# This file is part of satpy. -# -# satpy is free software: you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation, either version 3 of the License, or (at your option) any later -# version. -# -# satpy is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# satpy. If not, see . - -"""SEVIRI L2 BUFR format reader. - -References: - EUMETSAT Product Navigator - https://navigator.eumetsat.int/ - -""" -import logging -from datetime import datetime, timedelta - -import dask.array as da -import numpy as np -import xarray as xr - -from satpy.readers._geos_area import get_geos_area_naming -from satpy.readers.eum_base import get_service_mode, recarray2dict -from satpy.readers.file_handlers import BaseFileHandler -from satpy.readers.seviri_base import mpef_product_header -from satpy.resample import get_area_def -from satpy.utils import get_legacy_chunk_size - -try: - import eccodes as ec -except ImportError: - raise ImportError( - "Missing eccodes-python and/or eccodes C-library installation. Use conda to install eccodes") - -CHUNK_SIZE = get_legacy_chunk_size() -logger = logging.getLogger('SeviriL2Bufr') - -data_center_dict = {55: {'ssp': 'E0415', 'name': '08'}, 56: {'ssp': 'E0455', 'name': '09'}, - 57: {'ssp': 'E0095', 'name': '10'}, 70: {'ssp': 'E0000', 'name': '11'}} - -seg_size_dict = {'seviri_l2_bufr_asr': 16, 'seviri_l2_bufr_cla': 16, - 'seviri_l2_bufr_csr': 16, 'seviri_l2_bufr_gii': 3, - 'seviri_l2_bufr_thu': 16, 'seviri_l2_bufr_toz': 3, - 'seviri_l2_bufr_amv': 24} - - -class SeviriL2BufrFileHandler(BaseFileHandler): - """File handler for SEVIRI L2 BUFR products. - - **Loading data with AreaDefinition** - - By providing the `with_area_definition` as True in the `reader_kwargs`, the dataset is loaded with - an AreaDefinition using a standardized AreaDefinition in areas.yaml. By default, the dataset will - be loaded with a SwathDefinition, i.e. similar to how the data are stored in the BUFR file: - - scene = satpy.Scene(filenames, - reader='seviri_l2_bufr', - reader_kwargs={'with_area_definition': False}) - - **Defining dataset recticifation longitude** - - The BUFR data were originally extracted from a rectified two-dimensional grid with a given central longitude - (typically the sub-satellite point). This information is not available in the file itself nor the filename (for - files from the EUMETSAT archive). Also, it cannot be reliably derived from all datasets themselves. Hence, the - rectification longitude can be defined by the user by providing `rectification_longitude` in the `reader_kwargs`: - - scene = satpy.Scene(filenames, - reader='seviri_l2_bufr', - reader_kwargs={'rectification_longitude': 0.0}) - - If not done, default values applicable to the operational grids of the respective SEVIRI instruments will be used. - """ - - def __init__(self, filename, filename_info, filetype_info, with_area_definition=False, - rectification_longitude='default', **kwargs): - """Initialise the file handler for SEVIRI L2 BUFR data.""" - super(SeviriL2BufrFileHandler, self).__init__(filename, - filename_info, - filetype_info) - - if ('server' in filename_info): - # EUMETSAT Offline Bufr product - self.mpef_header = self._read_mpef_header() - else: - # Product was retrieved from the EUMETSAT Data Center - timeStr = self.get_attribute('typicalDate')+self.get_attribute('typicalTime') - buf_start_time = datetime.strptime(timeStr, "%Y%m%d%H%M%S") - sc_id = self.get_attribute('satelliteIdentifier') - self.mpef_header = {} - self.mpef_header['NominalTime'] = buf_start_time - self.mpef_header['SpacecraftName'] = data_center_dict[sc_id]['name'] - self.mpef_header['RectificationLongitude'] = data_center_dict[sc_id]['ssp'] - - if rectification_longitude != 'default': - self.mpef_header['RectificationLongitude'] = f'E{int(rectification_longitude * 10):04d}' - - self.with_adef = with_area_definition - if self.with_adef and filetype_info['file_type'] == 'seviri_l2_bufr_amv': - logging.warning("AMV BUFR data cannot be loaded with an area definition. Setting self.with_def = False.") - self.with_adef = False - - self.seg_size = seg_size_dict[filetype_info['file_type']] - - @property - def start_time(self): - """Return the repeat cycle start time.""" - return self.mpef_header['NominalTime'] - - @property - def end_time(self): - """Return the repeat cycle end time.""" - return self.start_time + timedelta(minutes=15) - - @property - def platform_name(self): - """Return spacecraft name.""" - return 'MET{}'.format(self.mpef_header['SpacecraftName']) - - @property - def ssp_lon(self): - """Return subsatellite point longitude.""" - # e.g. E0415 - ssp_lon = self.mpef_header['RectificationLongitude'] - return float(ssp_lon[1:])/10. - - def get_area_def(self, key): - """Return the area definition.""" - try: - return self._area_def - except AttributeError: - raise NotImplementedError - - def _read_mpef_header(self): - """Read MPEF header.""" - hdr = np.fromfile(self.filename, mpef_product_header, 1) - return recarray2dict(hdr) - - def get_attribute(self, key): - """Get BUFR attributes.""" - # This function is inefficient as it is looping through the entire - # file to get 1 attribute. It causes a problem though if you break - # from the file early - dont know why but investigating - fix later - fh = open(self.filename, "rb") - while True: - # get handle for message - bufr = ec.codes_bufr_new_from_file(fh) - if bufr is None: - break - ec.codes_set(bufr, 'unpack', 1) - attr = ec.codes_get(bufr, key) - ec.codes_release(bufr) - - fh.close() - return attr - - def get_array(self, key): - """Get all data from file for the given BUFR key.""" - with open(self.filename, "rb") as fh: - msgCount = 0 - while True: - bufr = ec.codes_bufr_new_from_file(fh) - if bufr is None: - break - - ec.codes_set(bufr, 'unpack', 1) - - # if is the first message initialise our final array - if (msgCount == 0): - arr = da.from_array(ec.codes_get_array( - bufr, key, float), chunks=CHUNK_SIZE) - else: - tmpArr = da.from_array(ec.codes_get_array( - bufr, key, float), chunks=CHUNK_SIZE) - arr = da.concatenate((arr, tmpArr)) - - msgCount = msgCount+1 - ec.codes_release(bufr) - - if arr.size == 1: - arr = arr[0] - - return arr - - def get_dataset(self, dataset_id, dataset_info): - """Create dataset. - - Load data from BUFR file using the BUFR key in dataset_info - and create the dataset with or without an AreaDefinition. - - """ - arr = self.get_array(dataset_info['key']) - - if self.with_adef: - xarr = self.get_dataset_with_area_def(arr, dataset_id) - # coordinates are not relevant when returning data with an AreaDefinition - if 'coordinates' in dataset_info.keys(): - del dataset_info['coordinates'] - else: - xarr = xr.DataArray(arr, dims=["y"]) - - if 'fill_value' in dataset_info: - xarr = xarr.where(xarr != dataset_info['fill_value']) - - self._add_attributes(xarr, dataset_info) - - return xarr - - def get_dataset_with_area_def(self, arr, dataset_id): - """Get dataset with an AreaDefinition.""" - if dataset_id['name'] in ['latitude', 'longitude']: - self.__setattr__(dataset_id['name'], arr) - xarr = xr.DataArray(arr, dims=["y"]) - else: - lons_1d, lats_1d, data_1d = da.compute(self.longitude, self.latitude, arr) - - self._area_def = self._construct_area_def(dataset_id) - icol, irow = self._area_def.get_array_indices_from_lonlat(lons_1d, lats_1d) - - data_2d = np.empty(self._area_def.shape) - data_2d[:] = np.nan - data_2d[irow.compressed(), icol.compressed()] = data_1d[~irow.mask] - - xarr = xr.DataArray(da.from_array(data_2d, CHUNK_SIZE), dims=('y', 'x')) - - ntotal = len(icol) - nvalid = len(icol.compressed()) - if nvalid < ntotal: - logging.warning(f'{ntotal-nvalid} out of {ntotal} data points could not be put on ' - f'the grid {self._area_def.area_id}.') - - return xarr - - def _construct_area_def(self, dataset_id): - """Construct a standardized AreaDefinition based on satellite, instrument, resolution and sub-satellite point. - - Returns: - AreaDefinition: A pyresample AreaDefinition object containing the area definition. - - """ - res = dataset_id['resolution'] - - area_naming_input_dict = {'platform_name': 'msg', - 'instrument_name': 'seviri', - 'resolution': res, - } - - area_naming = get_geos_area_naming({**area_naming_input_dict, - **get_service_mode('seviri', self.ssp_lon)}) - - # Datasets with a segment size of 3 pixels extend outside the original SEVIRI 3km grid (with 1238 x 1238 - # segments a 3 pixels). Hence, we need to use corresponding area defintions in areas.yaml - if self.seg_size == 3: - area_naming['area_id'] += '_ext' - area_naming['description'] += ' (extended outside original 3km grid)' - - # Construct AreaDefinition from standardized area definition in areas.yaml. - stand_area_def = get_area_def(area_naming['area_id']) - - return stand_area_def - - def _add_attributes(self, xarr, dataset_info): - """Add dataset attributes to xarray.""" - xarr.attrs['sensor'] = 'SEVIRI' - xarr.attrs['platform_name'] = self.platform_name - xarr.attrs['ssp_lon'] = self.ssp_lon - xarr.attrs['seg_size'] = self.seg_size - xarr.attrs.update(dataset_info) diff --git a/satpy/tests/reader_tests/test_seviri_l2_bufr.py b/satpy/tests/reader_tests/test_seviri_l2_bufr.py index 3578645e5b..dd73c73a99 100644 --- a/satpy/tests/reader_tests/test_seviri_l2_bufr.py +++ b/satpy/tests/reader_tests/test_seviri_l2_bufr.py @@ -122,7 +122,7 @@ def __init__(self, filename, with_adef=False, rect_lon='default'): """Initialize by mocking test data for testing the SEVIRI L2 BUFR reader.""" import eccodes as ec - from satpy.readers.seviri_l2_bufr import SeviriL2BufrFileHandler + from satpy.readers.eum_l2_bufr import EumetsatL2BufrFileHandler self.buf1 = ec.codes_bufr_new_from_samples('BUFR4_local_satellite') ec.codes_set(self.buf1, 'unpack', 1) # write the bufr test data twice as we want to read in and then concatenate the data in the reader @@ -138,17 +138,18 @@ def __init__(self, filename, with_adef=False, rect_lon='default'): self.m = mock.mock_open() # only our offline product contain MPEF product headers so we get the metadata from there if ('BUFRProd' in filename): - with mock.patch('satpy.readers.seviri_l2_bufr.np.fromfile') as fromfile: + with mock.patch('satpy.readers.eum_l2_bufr.np.fromfile') as fromfile: fromfile.return_value = MPEF_PRODUCT_HEADER - with mock.patch('satpy.readers.seviri_l2_bufr.recarray2dict') as recarray2dict: + with mock.patch('satpy.readers.eum_l2_bufr.recarray2dict') as recarray2dict: recarray2dict.side_effect = (lambda x: x) - self.fh = SeviriL2BufrFileHandler(filename, FILENAME_INFO2, FILETYPE_INFO, - with_area_definition=with_adef, rectification_longitude=rect_lon) + self.fh = EumetsatL2BufrFileHandler(filename, FILENAME_INFO2, FILETYPE_INFO, + with_area_definition=with_adef, + rectification_longitude=rect_lon) self.fh.mpef_header = MPEF_PRODUCT_HEADER else: # No Mpef Header so we get the metadata from the BUFR messages - with mock.patch('satpy.readers.seviri_l2_bufr.open', self.m, create=True): + with mock.patch('satpy.readers.eum_l2_bufr.open', self.m, create=True): with mock.patch('eccodes.codes_bufr_new_from_file', side_effect=[self.buf1, None, self.buf1, None, self.buf1, None]) as ec1: ec1.return_value = ec1.side_effect @@ -156,13 +157,13 @@ def __init__(self, filename, with_adef=False, rect_lon='default'): ec2.return_value = 1 with mock.patch('eccodes.codes_release') as ec5: ec5.return_value = 1 - self.fh = SeviriL2BufrFileHandler(filename, FILENAME_INFO, FILETYPE_INFO, - with_area_definition=with_adef, - rectification_longitude=rect_lon) + self.fh = EumetsatL2BufrFileHandler(filename, FILENAME_INFO, FILETYPE_INFO, + with_area_definition=with_adef, + rectification_longitude=rect_lon) def get_data(self, dataset_info): """Read data from mock file.""" - with mock.patch('satpy.readers.seviri_l2_bufr.open', self.m, create=True): + with mock.patch('satpy.readers.eum_l2_bufr.open', self.m, create=True): with mock.patch('eccodes.codes_bufr_new_from_file', side_effect=[self.buf1, self.buf1, None]) as ec1: ec1.return_value = ec1.side_effect From b5f09609d461941af5a11b4504dc4291b2b0cf8a Mon Sep 17 00:00:00 2001 From: Johan Strandgren Date: Mon, 8 Aug 2022 17:39:07 +0200 Subject: [PATCH 03/41] Modify test to adhere to new MSG platform naming convention (MSG1-4 instead of MET08-11). --- satpy/tests/reader_tests/test_seviri_l2_bufr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/satpy/tests/reader_tests/test_seviri_l2_bufr.py b/satpy/tests/reader_tests/test_seviri_l2_bufr.py index dd73c73a99..c45271bbdc 100644 --- a/satpy/tests/reader_tests/test_seviri_l2_bufr.py +++ b/satpy/tests/reader_tests/test_seviri_l2_bufr.py @@ -63,8 +63,8 @@ DATASET_ATTRS = { - 'platform_name': 'MET09', - 'ssp_lon': 45.5, + 'platform_name': 'MSG1', + 'ssp_lon': 41.5, 'seg_size': 16 } From ffb95392af575386130e6a51169ff8de004d021d Mon Sep 17 00:00:00 2001 From: Johan Strandgren Date: Tue, 9 Aug 2022 16:18:00 +0200 Subject: [PATCH 04/41] Initiate yaml file for fci_l2_bufr reader. --- satpy/etc/readers/fci_l2_bufr.yaml | 50 ++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 satpy/etc/readers/fci_l2_bufr.yaml diff --git a/satpy/etc/readers/fci_l2_bufr.yaml b/satpy/etc/readers/fci_l2_bufr.yaml new file mode 100644 index 0000000000..48ca0d49e8 --- /dev/null +++ b/satpy/etc/readers/fci_l2_bufr.yaml @@ -0,0 +1,50 @@ +reader: + name: fci_l2_bufr + short_name: FCI l2 BUFR + long_name: MTGi Level 2 products in BUFR format + description: FCI L2 BUFR Product Reader + status: Alpha, AMV BUFR products not supported yet + supports_fsspec: false + sensors: [fci] + default_channels: [] + reader: !!python/name:satpy.readers.yaml_reader.GEOFlippableFileYAMLReader + +file_types: + fci_l2_bufr_asr: + file_reader: !!python/name:satpy.readers.eum_l2_bufr.EumetsatL2BufrFileHandler + file_patterns: + - '{pflag}_{location_indicator},{data_designator},{spacecraft_name}+ASR_{oflag}_{originator}_{processing_time:%Y%m%d%H%M%S}_{facility_or_tool}_{environment}_{start_time:%Y%m%d%H%M%S}_{end_time:%Y%m%d%H%M%S}_{processing_mode}_{special_compression}_{disposition_mode}_{repeat_cycle_in_day:>04d}_{count_in_repeat_cycle:>04d}.bin' + +datasets: + + latitude: + name: latitude + key: 'latitude' + resolution: [32000] + file_type: [fci_l2_bufr_asr] + standard_name: latitude + units: degree_north + fill_value: -1.e+100 + + longitude: + name: longitude + key: 'longitude' + resolution: [32000] + file_type: [fci_l2_bufr_asr] + standard_name: longitude + units: degree_east + fill_value: -1.e+100 + + # ---- ASR products ------------ + ir105all: + name: ir105all + key: '#49#brightnessTemperature' + resolution: 32000 + wavelength: [9.800, 10.500, 11.200] + standard_name: toa_brightness_temperature + units: K + file_type: fci_l2_bufr_asr + coordinates: + - longitude + - latitude + fill_value: -1.e+100 From 6882564af383006a65e0e04396613ecebfaf48f7 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Mon, 31 Jul 2023 16:40:16 +0200 Subject: [PATCH 05/41] Add config for FCI BUFR products --- satpy/etc/readers/fci_l2_bufr.yaml | 1280 +++++++++++++++++++++++++++- satpy/readers/eum_l2_bufr.py | 2 +- 2 files changed, 1268 insertions(+), 14 deletions(-) diff --git a/satpy/etc/readers/fci_l2_bufr.yaml b/satpy/etc/readers/fci_l2_bufr.yaml index 48ca0d49e8..5958fd8d8e 100644 --- a/satpy/etc/readers/fci_l2_bufr.yaml +++ b/satpy/etc/readers/fci_l2_bufr.yaml @@ -13,15 +13,20 @@ file_types: fci_l2_bufr_asr: file_reader: !!python/name:satpy.readers.eum_l2_bufr.EumetsatL2BufrFileHandler file_patterns: - - '{pflag}_{location_indicator},{data_designator},{spacecraft_name}+ASR_{oflag}_{originator}_{processing_time:%Y%m%d%H%M%S}_{facility_or_tool}_{environment}_{start_time:%Y%m%d%H%M%S}_{end_time:%Y%m%d%H%M%S}_{processing_mode}_{special_compression}_{disposition_mode}_{repeat_cycle_in_day:>04d}_{count_in_repeat_cycle:>04d}.bin' + - '{pflag}_{location_indicator},{data_designator},MTI{spacecraft_id:1d}+FCI-2-ASR-{subtype}-{coverage}-{subsetting}-{component1}-{component2}-{component3}-{purpose}-BUFR_{oflag}_{originator}_{processing_time:%Y%m%d%H%M%S}_{facility_or_tool}_{environment}_{start_time:%Y%m%d%H%M%S}_{end_time:%Y%m%d%H%M%S}_{processing_mode}_{special_compression}_{disposition_mode}_{repeat_cycle_in_day:>04d}_{count_in_repeat_cycle:>04d}.bin' + fci_l2_bufr_amv: + file_reader: !!python/name:satpy.readers.eum_l2_bufr.EumetsatL2BufrFileHandler + file_patterns: + - '{pflag}_{location_indicator},{data_designator},MTI{spacecraft_id:1d}+FCI-2-AMV-{subtype}-{coverage}-{subsetting}-{component1}-{component2}-{component3}-{purpose}-BUFR_{oflag}_{originator}_{processing_time:%Y%m%d%H%M%S}_{facility_or_tool}_{environment}_{start_time:%Y%m%d%H%M%S}_{end_time:%Y%m%d%H%M%S}_{processing_mode}_{special_compression}_{disposition_mode}_{repeat_cycle_in_day:>04d}_{count_in_repeat_cycle:>04d}.bin' -datasets: +datasets: + #----- COMMON ------------------ latitude: name: latitude key: 'latitude' resolution: [32000] - file_type: [fci_l2_bufr_asr] + file_type: [fci_l2_bufr_asr, fci_l2_bufr_amv] standard_name: latitude units: degree_north fill_value: -1.e+100 @@ -30,21 +35,1270 @@ datasets: name: longitude key: 'longitude' resolution: [32000] - file_type: [fci_l2_bufr_asr] + file_type: [fci_l2_bufr_asr, fci_l2_bufr_amv] standard_name: longitude units: degree_east fill_value: -1.e+100 - + + # ---- AMV products ------------ + pressure: + name: pressure + resolution: 32000 + file_type: fci_l2_bufr_amv + key: 'pressure' + long_name: Pressure of AMV feature + standard_name: pressure_at_wind_level + units: hPa + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + temperature: + name: temperature + resolution: 32000 + file_type: fci_l2_bufr_amv + key: 'temperature' + long_name: Temperature of AMV feature + standard_name: temperature_at_wind_level + units: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + height: + name: height + resolution: 32000 + file_type: fci_l2_bufr_amv + key: 'heightOfTopOfCloud' + long_name: Height of AMV feature + standard_name: height_at_wind_level + units: m + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + direction: + name: direction + resolution: 32000 + file_type: fci_l2_bufr_amv + key: 'windDirection' + long_name: Direction of AMV + standard_name: wind_to_direction + units: degree_north + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + speed: + name: speed + resolution: 32000 + file_type: fci_l2_bufr_amv + key: 'windSpeed' + long_name: Speed of AMV + standard_name: wind_speed + units: m/s + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + u: + name: u + resolution: 32000 + file_type: fci_l2_bufr_amv + key: 'u' + long_name: Speed U component of AMV + standard_name: wind_speed_horizontal_component + units: m/s + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + v: + name: v + resolution: 32000 + file_type: fci_l2_bufr_amv + key: 'v' + long_name: Speed V component of AMV + standard_name: wind_speed_vertival_component + units: m/s + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + # ---- ASR products ------------ - ir105all: - name: ir105all + pixel_percentage_clear: + name: pixel_percentage_clear + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#1#amountSegmentCloudFree' + long_name: pixel_percentage_clear + standard_name: cloud_free_area_fraction + unit: % + category_id: 1 + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_all_ir38: + name: bt_mean_all_ir38 + resolution: 32000 + wavelength: [3.4, 3.8, 4.2] + file_type: fci_l2_bufr_asr + key: '#19#brightnessTemperature' + long_name: bt_mean_all + standard_name: toa_brightess_temperature + ir_channel_id: 0 + category_id: 0 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_clear_ir38: + name: bt_mean_clear_ir38 + resolution: 32000 + wavelength: [3.4, 3.8, 4.2] + file_type: fci_l2_bufr_asr + key: '#20#brightnessTemperature' + long_name: bt_mean_clear + standard_name: toa_brightess_temperature + ir_channel_id: 0 + category_id: 1 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_cloudy_ir38: + name: bt_mean_cloudy_ir38 + resolution: 32000 + wavelength: [3.4, 3.8, 4.2] + file_type: fci_l2_bufr_asr + key: '#21#brightnessTemperature' + long_name: bt_mean_cloudy + standard_name: toa_brightess_temperature + ir_channel_id: 0 + category_id: 2 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_all_wv63: + name: bt_mean_all_wv63 + resolution: 32000 + wavelength: [5.3, 6.3, 7.3] + file_type: fci_l2_bufr_asr + key: '#25#brightnessTemperature' + long_name: bt_mean_all + standard_name: toa_brightess_temperature + ir_channel_id: 1 + category_id: 0 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_clear_wv63: + name: bt_mean_clear_wv63 + resolution: 32000 + wavelength: [5.3, 6.3, 7.3] + file_type: fci_l2_bufr_asr + key: '#26#brightnessTemperature' + long_name: bt_mean_clear + standard_name: toa_brightess_temperature + ir_channel_id: 1 + category_id: 1 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_cloudy_wv63: + name: bt_mean_cloudy_wv63 + resolution: 32000 + wavelength: [5.3, 6.3, 7.3] + file_type: fci_l2_bufr_asr + key: '#27#brightnessTemperature' + long_name: bt_mean_cloudy + standard_name: toa_brightess_temperature + ir_channel_id: 1 + category_id: 2 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_all_wv73: + name: bt_mean_all_wv73 + resolution: 32000 + wavelength: [6.85, 7.35, 7.85] + file_type: fci_l2_bufr_asr + key: '#31#brightnessTemperature' + long_name: bt_mean_all + standard_name: toa_brightess_temperature + ir_channel_id: 2 + category_id: 0 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_clear_wv73: + name: bt_mean_clear_wv73 + resolution: 32000 + wavelength: [6.85, 7.35, 7.85] + file_type: fci_l2_bufr_asr + key: '#32#brightnessTemperature' + long_name: bt_mean_clear + standard_name: toa_brightess_temperature + ir_channel_id: 2 + category_id: 1 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_cloudy_wv73: + name: bt_mean_cloudy_wv73 + resolution: 32000 + wavelength: [6.85, 7.35, 7.85] + file_type: fci_l2_bufr_asr + key: '#33#brightnessTemperature' + long_name: bt_mean_cloudy + standard_name: toa_brightess_temperature + ir_channel_id: 2 + category_id: 2 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_all_ir87: + name: bt_mean_all_ir87 + resolution: 32000 + wavelength: [8.3, 8.7, 9.1] + file_type: fci_l2_bufr_asr + key: '#37#brightnessTemperature' + long_name: bt_mean_all + standard_name: toa_brightess_temperature + ir_channel_id: 3 + category_id: 0 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_clear_ir87: + name: bt_mean_clear_ir87 + resolution: 32000 + wavelength: [8.3, 8.7, 9.1] + file_type: fci_l2_bufr_asr + key: '#38#brightnessTemperature' + long_name: bt_mean_clear + standard_name: toa_brightess_temperature + ir_channel_id: 3 + category_id: 1 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_cloudy_ir87: + name: bt_mean_cloudy_ir87 + resolution: 32000 + wavelength: [8.3, 8.7, 9.1] + file_type: fci_l2_bufr_asr + key: '#39#brightnessTemperature' + long_name: bt_mean_cloudy + standard_name: toa_brightess_temperature + ir_channel_id: 3 + category_id: 2 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_all_ir97: + name: bt_mean_all_ir97 + resolution: 32000 + wavelength: [9.36, 9.66, 9.96] + file_type: fci_l2_bufr_asr + key: '#43#brightnessTemperature' + long_name: bt_mean_all + standard_name: toa_brightess_temperature + ir_channel_id: 4 + category_id: 0 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_clear_ir97: + name: bt_mean_clear_ir97 + resolution: 32000 + wavelength: [9.36, 9.66, 9.96] + file_type: fci_l2_bufr_asr + key: '#44#brightnessTemperature' + long_name: bt_mean_clear + standard_name: toa_brightess_temperature + ir_channel_id: 4 + category_id: 1 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_cloudy_ir97: + name: bt_mean_cloudy_ir97 + resolution: 32000 + wavelength: [9.36, 9.66, 9.96] + file_type: fci_l2_bufr_asr + key: '#45#brightnessTemperature' + long_name: bt_mean_cloudy + standard_name: toa_brightess_temperature + ir_channel_id: 4 + category_id: 2 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_all_ir105: + name: bt_mean_all_ir105 + resolution: 32000 + wavelength: [9.8, 10.5, 11.2] + file_type: fci_l2_bufr_asr key: '#49#brightnessTemperature' + long_name: bt_mean_all + standard_name: toa_brightess_temperature + ir_channel_id: 5 + category_id: 0 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_clear_ir105: + name: bt_mean_clear_ir105 resolution: 32000 - wavelength: [9.800, 10.500, 11.200] - standard_name: toa_brightness_temperature - units: K + wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr + key: '#50#brightnessTemperature' + long_name: bt_mean_clear + standard_name: toa_brightess_temperature + ir_channel_id: 5 + category_id: 1 + unit: K + fill_value: -1.0e+100 coordinates: - - longitude - - latitude - fill_value: -1.e+100 + - longitude + - latitude + + bt_mean_cloudy_ir105: + name: bt_mean_cloudy_ir105 + resolution: 32000 + wavelength: [9.8, 10.5, 11.2] + file_type: fci_l2_bufr_asr + key: '#51#brightnessTemperature' + long_name: bt_mean_cloudy + standard_name: toa_brightess_temperature + ir_channel_id: 5 + category_id: 2 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_all_ir123: + name: bt_mean_all_ir123 + resolution: 32000 + wavelength: [11.8, 12.3, 12.8] + file_type: fci_l2_bufr_asr + key: '#55#brightnessTemperature' + long_name: bt_mean_all + standard_name: toa_brightess_temperature + ir_channel_id: 6 + category_id: 0 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_clear_ir123: + name: bt_mean_clear_ir123 + resolution: 32000 + wavelength: [11.8, 12.3, 12.8] + file_type: fci_l2_bufr_asr + key: '#56#brightnessTemperature' + long_name: bt_mean_clear + standard_name: toa_brightess_temperature + ir_channel_id: 6 + category_id: 1 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_cloudy_ir123: + name: bt_mean_cloudy_ir123 + resolution: 32000 + wavelength: [11.8, 12.3, 12.8] + file_type: fci_l2_bufr_asr + key: '#57#brightnessTemperature' + long_name: bt_mean_cloudy + standard_name: toa_brightess_temperature + ir_channel_id: 6 + category_id: 2 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_all_ir133: + name: bt_mean_all_ir133 + resolution: 32000 + wavelength: [12.7, 13.3, 13.9] + file_type: fci_l2_bufr_asr + key: '#61#brightnessTemperature' + long_name: bt_mean_all + standard_name: toa_brightess_temperature + ir_channel_id: 7 + category_id: 0 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_clear_ir133: + name: bt_mean_clear_ir133 + resolution: 32000 + wavelength: [12.7, 13.3, 13.9] + file_type: fci_l2_bufr_asr + key: '#62#brightnessTemperature' + long_name: bt_mean_clear + standard_name: toa_brightess_temperature + ir_channel_id: 7 + category_id: 1 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_cloudy_ir133: + name: bt_mean_cloudy_ir133 + resolution: 32000 + wavelength: [12.7, 13.3, 13.9] + file_type: fci_l2_bufr_asr + key: '#63#brightnessTemperature' + long_name: bt_mean_cloudy + standard_name: toa_brightess_temperature + ir_channel_id: 7 + category_id: 2 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_all_ir38: + name: quality_bt_all_ir38 + resolution: 32000 + wavelength: [3.4, 3.8, 4.2] + file_type: fci_l2_bufr_asr + key: '#19#brightnessTemperature->percentConfidence' + long_name: quality_bt_all + standard_name: quality_flag + ir_channel_id: 0 + category_id: 0 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_clear_ir38: + name: quality_bt_clear_ir38 + resolution: 32000 + wavelength: [3.4, 3.8, 4.2] + file_type: fci_l2_bufr_asr + key: '#20#brightnessTemperature->percentConfidence' + long_name: quality_bt_clear + standard_name: quality_flag + ir_channel_id: 0 + category_id: 1 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_cloudy_ir38: + name: quality_bt_cloudy_ir38 + resolution: 32000 + wavelength: [3.4, 3.8, 4.2] + file_type: fci_l2_bufr_asr + key: '#21#brightnessTemperature->percentConfidence' + long_name: quality_bt_cloudy + standard_name: quality_flag + ir_channel_id: 0 + category_id: 2 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_all_wv63: + name: quality_bt_all_wv63 + resolution: 32000 + wavelength: [5.3, 6.3, 7.3] + file_type: fci_l2_bufr_asr + key: '#25#brightnessTemperature->percentConfidence' + long_name: quality_bt_all + standard_name: quality_flag + ir_channel_id: 1 + category_id: 0 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_clear_wv63: + name: quality_bt_clear_wv63 + resolution: 32000 + wavelength: [5.3, 6.3, 7.3] + file_type: fci_l2_bufr_asr + key: '#26#brightnessTemperature->percentConfidence' + long_name: quality_bt_clear + standard_name: quality_flag + ir_channel_id: 1 + category_id: 1 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_cloudy_wv63: + name: quality_bt_cloudy_wv63 + resolution: 32000 + wavelength: [5.3, 6.3, 7.3] + file_type: fci_l2_bufr_asr + key: '#27#brightnessTemperature->percentConfidence' + long_name: quality_bt_cloudy + standard_name: quality_flag + ir_channel_id: 1 + category_id: 2 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_all_wv73: + name: quality_bt_all_wv73 + resolution: 32000 + wavelength: [6.85, 7.35, 7.85] + file_type: fci_l2_bufr_asr + key: '#31#brightnessTemperature->percentConfidence' + long_name: quality_bt_all + standard_name: quality_flag + ir_channel_id: 2 + category_id: 0 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_clear_wv73: + name: quality_bt_clear_wv73 + resolution: 32000 + wavelength: [6.85, 7.35, 7.85] + file_type: fci_l2_bufr_asr + key: '#32#brightnessTemperature->percentConfidence' + long_name: quality_bt_clear + standard_name: quality_flag + ir_channel_id: 2 + category_id: 1 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_cloudy_wv73: + name: quality_bt_cloudy_wv73 + resolution: 32000 + wavelength: [6.85, 7.35, 7.85] + file_type: fci_l2_bufr_asr + key: '#33#brightnessTemperature->percentConfidence' + long_name: quality_bt_cloudy + standard_name: quality_flag + ir_channel_id: 2 + category_id: 2 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_all_ir87: + name: quality_bt_all_ir87 + resolution: 32000 + wavelength: [8.3, 8.7, 9.1] + file_type: fci_l2_bufr_asr + key: '#37#brightnessTemperature->percentConfidence' + long_name: quality_bt_all + standard_name: quality_flag + ir_channel_id: 3 + category_id: 0 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_clear_ir87: + name: quality_bt_clear_ir87 + resolution: 32000 + wavelength: [8.3, 8.7, 9.1] + file_type: fci_l2_bufr_asr + key: '#38#brightnessTemperature->percentConfidence' + long_name: quality_bt_clear + standard_name: quality_flag + ir_channel_id: 3 + category_id: 1 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_cloudy_ir87: + name: quality_bt_cloudy_ir87 + resolution: 32000 + wavelength: [8.3, 8.7, 9.1] + file_type: fci_l2_bufr_asr + key: '#39#brightnessTemperature->percentConfidence' + long_name: quality_bt_cloudy + standard_name: quality_flag + ir_channel_id: 3 + category_id: 2 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_all_ir97: + name: quality_bt_all_ir97 + resolution: 32000 + wavelength: [9.36, 9.66, 9.96] + file_type: fci_l2_bufr_asr + key: '#43#brightnessTemperature->percentConfidence' + long_name: quality_bt_all + standard_name: quality_flag + ir_channel_id: 4 + category_id: 0 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_clear_ir97: + name: quality_bt_clear_ir97 + resolution: 32000 + wavelength: [9.36, 9.66, 9.96] + file_type: fci_l2_bufr_asr + key: '#44#brightnessTemperature->percentConfidence' + long_name: quality_bt_clear + standard_name: quality_flag + ir_channel_id: 4 + category_id: 1 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_cloudy_ir97: + name: quality_bt_cloudy_ir97 + resolution: 32000 + wavelength: [9.36, 9.66, 9.96] + file_type: fci_l2_bufr_asr + key: '#45#brightnessTemperature->percentConfidence' + long_name: quality_bt_cloudy + standard_name: quality_flag + ir_channel_id: 4 + category_id: 2 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_all_ir105: + name: quality_bt_all_ir105 + resolution: 32000 + wavelength: [9.8, 10.5, 11.2] + file_type: fci_l2_bufr_asr + key: '#49#brightnessTemperature->percentConfidence' + long_name: quality_bt_all + standard_name: quality_flag + ir_channel_id: 5 + category_id: 0 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_clear_ir105: + name: quality_bt_clear_ir105 + resolution: 32000 + wavelength: [9.8, 10.5, 11.2] + file_type: fci_l2_bufr_asr + key: '#50#brightnessTemperature->percentConfidence' + long_name: quality_bt_clear + standard_name: quality_flag + ir_channel_id: 5 + category_id: 1 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_cloudy_ir105: + name: quality_bt_cloudy_ir105 + resolution: 32000 + wavelength: [9.8, 10.5, 11.2] + file_type: fci_l2_bufr_asr + key: '#51#brightnessTemperature->percentConfidence' + long_name: quality_bt_cloudy + standard_name: quality_flag + ir_channel_id: 5 + category_id: 2 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_all_ir123: + name: quality_bt_all_ir123 + resolution: 32000 + wavelength: [11.8, 12.3, 12.8] + file_type: fci_l2_bufr_asr + key: '#55#brightnessTemperature->percentConfidence' + long_name: quality_bt_all + standard_name: quality_flag + ir_channel_id: 6 + category_id: 0 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_clear_ir123: + name: quality_bt_clear_ir123 + resolution: 32000 + wavelength: [11.8, 12.3, 12.8] + file_type: fci_l2_bufr_asr + key: '#56#brightnessTemperature->percentConfidence' + long_name: quality_bt_clear + standard_name: quality_flag + ir_channel_id: 6 + category_id: 1 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_cloudy_ir123: + name: quality_bt_cloudy_ir123 + resolution: 32000 + wavelength: [11.8, 12.3, 12.8] + file_type: fci_l2_bufr_asr + key: '#57#brightnessTemperature->percentConfidence' + long_name: quality_bt_cloudy + standard_name: quality_flag + ir_channel_id: 6 + category_id: 2 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_all_ir133: + name: quality_bt_all_ir133 + resolution: 32000 + wavelength: [12.7, 13.3, 13.9] + file_type: fci_l2_bufr_asr + key: '#61#brightnessTemperature->percentConfidence' + long_name: quality_bt_all + standard_name: quality_flag + ir_channel_id: 7 + category_id: 0 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_clear_ir133: + name: quality_bt_clear_ir133 + resolution: 32000 + wavelength: [12.7, 13.3, 13.9] + file_type: fci_l2_bufr_asr + key: '#62#brightnessTemperature->percentConfidence' + long_name: quality_bt_clear + standard_name: quality_flag + ir_channel_id: 7 + category_id: 1 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_cloudy_ir133: + name: quality_bt_cloudy_ir133 + resolution: 32000 + wavelength: [12.7, 13.3, 13.9] + file_type: fci_l2_bufr_asr + key: '#63#brightnessTemperature->percentConfidence' + long_name: quality_bt_cloudy + standard_name: quality_flag + ir_channel_id: 7 + category_id: 2 + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_all_ir38: + name: std_bt_all_ir38 + resolution: 32000 + wavelength: [3.4, 3.8, 4.2] + file_type: fci_l2_bufr_asr + key: '#19#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_all + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 0 + category_id: 0 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_clear_ir38: + name: std_bt_clear_ir38 + resolution: 32000 + wavelength: [3.4, 3.8, 4.2] + file_type: fci_l2_bufr_asr + key: '#20#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_clear + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 0 + category_id: 1 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_cloudy_ir38: + name: std_bt_cloudy_ir38 + resolution: 32000 + wavelength: [3.4, 3.8, 4.2] + file_type: fci_l2_bufr_asr + key: '#21#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_cloudy + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 0 + category_id: 2 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_all_wv63: + name: std_bt_all_wv63 + resolution: 32000 + wavelength: [5.3, 6.3, 7.3] + file_type: fci_l2_bufr_asr + key: '#25#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_all + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 1 + category_id: 0 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_clear_wv63: + name: std_bt_clear_wv63 + resolution: 32000 + wavelength: [5.3, 6.3, 7.3] + file_type: fci_l2_bufr_asr + key: '#26#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_clear + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 1 + category_id: 1 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_cloudy_wv63: + name: std_bt_cloudy_wv63 + resolution: 32000 + wavelength: [5.3, 6.3, 7.3] + file_type: fci_l2_bufr_asr + key: '#27#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_cloudy + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 1 + category_id: 2 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_all_wv73: + name: std_bt_all_wv73 + resolution: 32000 + wavelength: [6.85, 7.35, 7.85] + file_type: fci_l2_bufr_asr + key: '#31#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_all + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 2 + category_id: 0 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_clear_wv73: + name: std_bt_clear_wv73 + resolution: 32000 + wavelength: [6.85, 7.35, 7.85] + file_type: fci_l2_bufr_asr + key: '#32#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_clear + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 2 + category_id: 1 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_cloudy_wv73: + name: std_bt_cloudy_wv73 + resolution: 32000 + wavelength: [6.85, 7.35, 7.85] + file_type: fci_l2_bufr_asr + key: '#33#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_cloudy + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 2 + category_id: 2 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_all_ir87: + name: std_bt_all_ir87 + resolution: 32000 + wavelength: [8.3, 8.7, 9.1] + file_type: fci_l2_bufr_asr + key: '#37#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_all + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 3 + category_id: 0 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_clear_ir87: + name: std_bt_clear_ir87 + resolution: 32000 + wavelength: [8.3, 8.7, 9.1] + file_type: fci_l2_bufr_asr + key: '#38#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_clear + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 3 + category_id: 1 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_cloudy_ir87: + name: std_bt_cloudy_ir87 + resolution: 32000 + wavelength: [8.3, 8.7, 9.1] + file_type: fci_l2_bufr_asr + key: '#39#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_cloudy + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 3 + category_id: 2 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_all_ir97: + name: std_bt_all_ir97 + resolution: 32000 + wavelength: [9.36, 9.66, 9.96] + file_type: fci_l2_bufr_asr + key: '#43#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_all + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 4 + category_id: 0 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_clear_ir97: + name: std_bt_clear_ir97 + resolution: 32000 + wavelength: [9.36, 9.66, 9.96] + file_type: fci_l2_bufr_asr + key: '#44#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_clear + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 4 + category_id: 1 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_cloudy_ir97: + name: std_bt_cloudy_ir97 + resolution: 32000 + wavelength: [9.36, 9.66, 9.96] + file_type: fci_l2_bufr_asr + key: '#45#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_cloudy + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 4 + category_id: 2 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_all_ir105: + name: std_bt_all_ir105 + resolution: 32000 + wavelength: [9.8, 10.5, 11.2] + file_type: fci_l2_bufr_asr + key: '#49#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_all + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 5 + category_id: 0 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_clear_ir105: + name: std_bt_clear_ir105 + resolution: 32000 + wavelength: [9.8, 10.5, 11.2] + file_type: fci_l2_bufr_asr + key: '#50#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_clear + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 5 + category_id: 1 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_cloudy_ir105: + name: std_bt_cloudy_ir105 + resolution: 32000 + wavelength: [9.8, 10.5, 11.2] + file_type: fci_l2_bufr_asr + key: '#51#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_cloudy + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 5 + category_id: 2 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_all_ir123: + name: std_bt_all_ir123 + resolution: 32000 + wavelength: [11.8, 12.3, 12.8] + file_type: fci_l2_bufr_asr + key: '#55#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_all + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 6 + category_id: 0 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_clear_ir123: + name: std_bt_clear_ir123 + resolution: 32000 + wavelength: [11.8, 12.3, 12.8] + file_type: fci_l2_bufr_asr + key: '#56#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_clear + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 6 + category_id: 1 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_cloudy_ir123: + name: std_bt_cloudy_ir123 + resolution: 32000 + wavelength: [11.8, 12.3, 12.8] + file_type: fci_l2_bufr_asr + key: '#57#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_cloudy + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 6 + category_id: 2 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_all_ir133: + name: std_bt_all_ir133 + resolution: 32000 + wavelength: [12.7, 13.3, 13.9] + file_type: fci_l2_bufr_asr + key: '#61#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_all + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 7 + category_id: 0 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_clear_ir133: + name: std_bt_clear_ir133 + resolution: 32000 + wavelength: [12.7, 13.3, 13.9] + file_type: fci_l2_bufr_asr + key: '#62#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_clear + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 7 + category_id: 1 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_cloudy_ir133: + name: std_bt_cloudy_ir133 + resolution: 32000 + wavelength: [12.7, 13.3, 13.9] + file_type: fci_l2_bufr_asr + key: '#63#brightnessTemperature->firstOrderStatisticalValue' + long_name: std_bt_cloudy + standard_name: toa_brightess_temperature standard_error + ir_channel_id: 7 + category_id: 2 + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + + + diff --git a/satpy/readers/eum_l2_bufr.py b/satpy/readers/eum_l2_bufr.py index b0f04b1609..8f6b08734b 100644 --- a/satpy/readers/eum_l2_bufr.py +++ b/satpy/readers/eum_l2_bufr.py @@ -52,7 +52,7 @@ seg_size_dict = {'seviri_l2_bufr_asr': 16, 'seviri_l2_bufr_cla': 16, 'seviri_l2_bufr_csr': 16, 'seviri_l2_bufr_gii': 3, 'seviri_l2_bufr_thu': 16, 'seviri_l2_bufr_toz': 3, - 'fci_l2_bufr_asr': 16} + 'fci_l2_bufr_asr': 16, 'fci_l2_bufr_amv':0} class EumetsatL2BufrFileHandler(BaseFileHandler): From 6382cda7f6d65b831f9b64e9cc0ff094991f774c Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Tue, 1 Aug 2023 12:13:53 +0200 Subject: [PATCH 06/41] fixed issue with unit format --- satpy/etc/readers/fci_l2_bufr.yaml | 149 +---------------------------- 1 file changed, 1 insertion(+), 148 deletions(-) diff --git a/satpy/etc/readers/fci_l2_bufr.yaml b/satpy/etc/readers/fci_l2_bufr.yaml index 5958fd8d8e..4c67e9d13d 100644 --- a/satpy/etc/readers/fci_l2_bufr.yaml +++ b/satpy/etc/readers/fci_l2_bufr.yaml @@ -139,9 +139,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#1#amountSegmentCloudFree' long_name: pixel_percentage_clear - standard_name: cloud_free_area_fraction - unit: % category_id: 1 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -154,10 +153,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#19#brightnessTemperature' long_name: bt_mean_all - standard_name: toa_brightess_temperature ir_channel_id: 0 category_id: 0 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -170,10 +167,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#20#brightnessTemperature' long_name: bt_mean_clear - standard_name: toa_brightess_temperature ir_channel_id: 0 category_id: 1 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -186,10 +181,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#21#brightnessTemperature' long_name: bt_mean_cloudy - standard_name: toa_brightess_temperature ir_channel_id: 0 category_id: 2 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -202,10 +195,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#25#brightnessTemperature' long_name: bt_mean_all - standard_name: toa_brightess_temperature ir_channel_id: 1 category_id: 0 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -218,10 +209,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#26#brightnessTemperature' long_name: bt_mean_clear - standard_name: toa_brightess_temperature ir_channel_id: 1 category_id: 1 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -234,10 +223,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#27#brightnessTemperature' long_name: bt_mean_cloudy - standard_name: toa_brightess_temperature ir_channel_id: 1 category_id: 2 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -250,10 +237,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#31#brightnessTemperature' long_name: bt_mean_all - standard_name: toa_brightess_temperature ir_channel_id: 2 category_id: 0 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -266,10 +251,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#32#brightnessTemperature' long_name: bt_mean_clear - standard_name: toa_brightess_temperature ir_channel_id: 2 category_id: 1 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -282,10 +265,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#33#brightnessTemperature' long_name: bt_mean_cloudy - standard_name: toa_brightess_temperature ir_channel_id: 2 category_id: 2 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -298,10 +279,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#37#brightnessTemperature' long_name: bt_mean_all - standard_name: toa_brightess_temperature ir_channel_id: 3 category_id: 0 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -314,10 +293,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#38#brightnessTemperature' long_name: bt_mean_clear - standard_name: toa_brightess_temperature ir_channel_id: 3 category_id: 1 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -330,10 +307,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#39#brightnessTemperature' long_name: bt_mean_cloudy - standard_name: toa_brightess_temperature ir_channel_id: 3 category_id: 2 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -346,10 +321,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#43#brightnessTemperature' long_name: bt_mean_all - standard_name: toa_brightess_temperature ir_channel_id: 4 category_id: 0 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -362,10 +335,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#44#brightnessTemperature' long_name: bt_mean_clear - standard_name: toa_brightess_temperature ir_channel_id: 4 category_id: 1 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -378,10 +349,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#45#brightnessTemperature' long_name: bt_mean_cloudy - standard_name: toa_brightess_temperature ir_channel_id: 4 category_id: 2 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -394,10 +363,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#49#brightnessTemperature' long_name: bt_mean_all - standard_name: toa_brightess_temperature ir_channel_id: 5 category_id: 0 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -410,10 +377,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#50#brightnessTemperature' long_name: bt_mean_clear - standard_name: toa_brightess_temperature ir_channel_id: 5 category_id: 1 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -426,10 +391,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#51#brightnessTemperature' long_name: bt_mean_cloudy - standard_name: toa_brightess_temperature ir_channel_id: 5 category_id: 2 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -442,10 +405,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#55#brightnessTemperature' long_name: bt_mean_all - standard_name: toa_brightess_temperature ir_channel_id: 6 category_id: 0 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -458,10 +419,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#56#brightnessTemperature' long_name: bt_mean_clear - standard_name: toa_brightess_temperature ir_channel_id: 6 category_id: 1 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -474,10 +433,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#57#brightnessTemperature' long_name: bt_mean_cloudy - standard_name: toa_brightess_temperature ir_channel_id: 6 category_id: 2 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -490,10 +447,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#61#brightnessTemperature' long_name: bt_mean_all - standard_name: toa_brightess_temperature ir_channel_id: 7 category_id: 0 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -506,10 +461,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#62#brightnessTemperature' long_name: bt_mean_clear - standard_name: toa_brightess_temperature ir_channel_id: 7 category_id: 1 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -522,10 +475,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#63#brightnessTemperature' long_name: bt_mean_cloudy - standard_name: toa_brightess_temperature ir_channel_id: 7 category_id: 2 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -538,10 +489,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#19#brightnessTemperature->percentConfidence' long_name: quality_bt_all - standard_name: quality_flag ir_channel_id: 0 category_id: 0 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -554,10 +503,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#20#brightnessTemperature->percentConfidence' long_name: quality_bt_clear - standard_name: quality_flag ir_channel_id: 0 category_id: 1 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -570,10 +517,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#21#brightnessTemperature->percentConfidence' long_name: quality_bt_cloudy - standard_name: quality_flag ir_channel_id: 0 category_id: 2 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -586,10 +531,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#25#brightnessTemperature->percentConfidence' long_name: quality_bt_all - standard_name: quality_flag ir_channel_id: 1 category_id: 0 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -602,10 +545,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#26#brightnessTemperature->percentConfidence' long_name: quality_bt_clear - standard_name: quality_flag ir_channel_id: 1 category_id: 1 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -618,10 +559,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#27#brightnessTemperature->percentConfidence' long_name: quality_bt_cloudy - standard_name: quality_flag ir_channel_id: 1 category_id: 2 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -634,10 +573,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#31#brightnessTemperature->percentConfidence' long_name: quality_bt_all - standard_name: quality_flag ir_channel_id: 2 category_id: 0 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -650,10 +587,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#32#brightnessTemperature->percentConfidence' long_name: quality_bt_clear - standard_name: quality_flag ir_channel_id: 2 category_id: 1 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -666,10 +601,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#33#brightnessTemperature->percentConfidence' long_name: quality_bt_cloudy - standard_name: quality_flag ir_channel_id: 2 category_id: 2 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -682,10 +615,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#37#brightnessTemperature->percentConfidence' long_name: quality_bt_all - standard_name: quality_flag ir_channel_id: 3 category_id: 0 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -698,10 +629,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#38#brightnessTemperature->percentConfidence' long_name: quality_bt_clear - standard_name: quality_flag ir_channel_id: 3 category_id: 1 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -714,10 +643,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#39#brightnessTemperature->percentConfidence' long_name: quality_bt_cloudy - standard_name: quality_flag ir_channel_id: 3 category_id: 2 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -730,10 +657,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#43#brightnessTemperature->percentConfidence' long_name: quality_bt_all - standard_name: quality_flag ir_channel_id: 4 category_id: 0 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -746,10 +671,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#44#brightnessTemperature->percentConfidence' long_name: quality_bt_clear - standard_name: quality_flag ir_channel_id: 4 category_id: 1 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -762,10 +685,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#45#brightnessTemperature->percentConfidence' long_name: quality_bt_cloudy - standard_name: quality_flag ir_channel_id: 4 category_id: 2 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -778,10 +699,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#49#brightnessTemperature->percentConfidence' long_name: quality_bt_all - standard_name: quality_flag ir_channel_id: 5 category_id: 0 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -794,10 +713,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#50#brightnessTemperature->percentConfidence' long_name: quality_bt_clear - standard_name: quality_flag ir_channel_id: 5 category_id: 1 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -810,10 +727,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#51#brightnessTemperature->percentConfidence' long_name: quality_bt_cloudy - standard_name: quality_flag ir_channel_id: 5 category_id: 2 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -826,10 +741,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#55#brightnessTemperature->percentConfidence' long_name: quality_bt_all - standard_name: quality_flag ir_channel_id: 6 category_id: 0 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -842,10 +755,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#56#brightnessTemperature->percentConfidence' long_name: quality_bt_clear - standard_name: quality_flag ir_channel_id: 6 category_id: 1 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -858,10 +769,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#57#brightnessTemperature->percentConfidence' long_name: quality_bt_cloudy - standard_name: quality_flag ir_channel_id: 6 category_id: 2 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -874,10 +783,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#61#brightnessTemperature->percentConfidence' long_name: quality_bt_all - standard_name: quality_flag ir_channel_id: 7 category_id: 0 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -890,10 +797,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#62#brightnessTemperature->percentConfidence' long_name: quality_bt_clear - standard_name: quality_flag ir_channel_id: 7 category_id: 1 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -906,10 +811,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#63#brightnessTemperature->percentConfidence' long_name: quality_bt_cloudy - standard_name: quality_flag ir_channel_id: 7 category_id: 2 - unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -922,10 +825,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#19#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_all - standard_name: toa_brightess_temperature standard_error ir_channel_id: 0 category_id: 0 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -938,10 +839,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#20#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_clear - standard_name: toa_brightess_temperature standard_error ir_channel_id: 0 category_id: 1 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -954,10 +853,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#21#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_cloudy - standard_name: toa_brightess_temperature standard_error ir_channel_id: 0 category_id: 2 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -970,10 +867,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#25#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_all - standard_name: toa_brightess_temperature standard_error ir_channel_id: 1 category_id: 0 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -986,10 +881,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#26#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_clear - standard_name: toa_brightess_temperature standard_error ir_channel_id: 1 category_id: 1 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1002,10 +895,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#27#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_cloudy - standard_name: toa_brightess_temperature standard_error ir_channel_id: 1 category_id: 2 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1018,10 +909,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#31#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_all - standard_name: toa_brightess_temperature standard_error ir_channel_id: 2 category_id: 0 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1034,10 +923,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#32#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_clear - standard_name: toa_brightess_temperature standard_error ir_channel_id: 2 category_id: 1 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1050,10 +937,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#33#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_cloudy - standard_name: toa_brightess_temperature standard_error ir_channel_id: 2 category_id: 2 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1066,10 +951,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#37#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_all - standard_name: toa_brightess_temperature standard_error ir_channel_id: 3 category_id: 0 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1082,10 +965,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#38#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_clear - standard_name: toa_brightess_temperature standard_error ir_channel_id: 3 category_id: 1 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1098,10 +979,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#39#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_cloudy - standard_name: toa_brightess_temperature standard_error ir_channel_id: 3 category_id: 2 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1114,10 +993,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#43#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_all - standard_name: toa_brightess_temperature standard_error ir_channel_id: 4 category_id: 0 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1130,10 +1007,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#44#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_clear - standard_name: toa_brightess_temperature standard_error ir_channel_id: 4 category_id: 1 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1146,10 +1021,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#45#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_cloudy - standard_name: toa_brightess_temperature standard_error ir_channel_id: 4 category_id: 2 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1162,10 +1035,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#49#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_all - standard_name: toa_brightess_temperature standard_error ir_channel_id: 5 category_id: 0 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1178,10 +1049,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#50#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_clear - standard_name: toa_brightess_temperature standard_error ir_channel_id: 5 category_id: 1 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1194,10 +1063,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#51#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_cloudy - standard_name: toa_brightess_temperature standard_error ir_channel_id: 5 category_id: 2 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1210,10 +1077,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#55#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_all - standard_name: toa_brightess_temperature standard_error ir_channel_id: 6 category_id: 0 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1226,10 +1091,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#56#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_clear - standard_name: toa_brightess_temperature standard_error ir_channel_id: 6 category_id: 1 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1242,10 +1105,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#57#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_cloudy - standard_name: toa_brightess_temperature standard_error ir_channel_id: 6 category_id: 2 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1258,10 +1119,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#61#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_all - standard_name: toa_brightess_temperature standard_error ir_channel_id: 7 category_id: 0 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1274,10 +1133,8 @@ datasets: file_type: fci_l2_bufr_asr key: '#62#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_clear - standard_name: toa_brightess_temperature standard_error ir_channel_id: 7 category_id: 1 - unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1290,15 +1147,11 @@ datasets: file_type: fci_l2_bufr_asr key: '#63#brightnessTemperature->firstOrderStatisticalValue' long_name: std_bt_cloudy - standard_name: toa_brightess_temperature standard_error ir_channel_id: 7 category_id: 2 - unit: K fill_value: -1.0e+100 coordinates: - longitude - latitude - - From b5e292ec63c41fc96974c98651423b3f314dd045 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Thu, 3 Aug 2023 15:28:00 +0200 Subject: [PATCH 07/41] Add positional information (#) to all keys. Change ASR long names --- satpy/etc/readers/fci_l2_bufr.yaml | 304 +++++++++++++++++++++-------- 1 file changed, 224 insertions(+), 80 deletions(-) diff --git a/satpy/etc/readers/fci_l2_bufr.yaml b/satpy/etc/readers/fci_l2_bufr.yaml index 4c67e9d13d..21657df80d 100644 --- a/satpy/etc/readers/fci_l2_bufr.yaml +++ b/satpy/etc/readers/fci_l2_bufr.yaml @@ -24,7 +24,7 @@ datasets: #----- COMMON ------------------ latitude: name: latitude - key: 'latitude' + key: '#1#latitude' resolution: [32000] file_type: [fci_l2_bufr_asr, fci_l2_bufr_amv] standard_name: latitude @@ -33,7 +33,7 @@ datasets: longitude: name: longitude - key: 'longitude' + key: '#1#longitude' resolution: [32000] file_type: [fci_l2_bufr_asr, fci_l2_bufr_amv] standard_name: longitude @@ -45,7 +45,7 @@ datasets: name: pressure resolution: 32000 file_type: fci_l2_bufr_amv - key: 'pressure' + key: '#1#pressure' long_name: Pressure of AMV feature standard_name: pressure_at_wind_level units: hPa @@ -58,7 +58,7 @@ datasets: name: temperature resolution: 32000 file_type: fci_l2_bufr_amv - key: 'temperature' + key: '#1#temperature' long_name: Temperature of AMV feature standard_name: temperature_at_wind_level units: K @@ -84,7 +84,7 @@ datasets: name: direction resolution: 32000 file_type: fci_l2_bufr_amv - key: 'windDirection' + key: '#1#windDirection' long_name: Direction of AMV standard_name: wind_to_direction units: degree_north @@ -97,7 +97,7 @@ datasets: name: speed resolution: 32000 file_type: fci_l2_bufr_amv - key: 'windSpeed' + key: '#1#windSpeed' long_name: Speed of AMV standard_name: wind_speed units: m/s @@ -110,7 +110,7 @@ datasets: name: u resolution: 32000 file_type: fci_l2_bufr_amv - key: 'u' + key: '#1#u' long_name: Speed U component of AMV standard_name: wind_speed_horizontal_component units: m/s @@ -123,7 +123,7 @@ datasets: name: v resolution: 32000 file_type: fci_l2_bufr_amv - key: 'v' + key: '#1#v' long_name: Speed V component of AMV standard_name: wind_speed_vertival_component units: m/s @@ -152,9 +152,11 @@ datasets: wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#19#brightnessTemperature' - long_name: bt_mean_all + long_name: TOA Brightness Temperature segment mean at 3.8um (all pixels) + standard_name: toa_brightess_temperature ir_channel_id: 0 category_id: 0 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -166,9 +168,11 @@ datasets: wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#20#brightnessTemperature' - long_name: bt_mean_clear + long_name: TOA Brightness Temperature segment mean at 3.8um (clear pixels) + standard_name: toa_brightess_temperature ir_channel_id: 0 category_id: 1 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -180,9 +184,11 @@ datasets: wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#21#brightnessTemperature' - long_name: bt_mean_cloudy + long_name: TOA Brightness Temperature segment mean at 3.8um (cloudy pixels) + standard_name: toa_brightess_temperature ir_channel_id: 0 category_id: 2 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -194,9 +200,11 @@ datasets: wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#25#brightnessTemperature' - long_name: bt_mean_all + long_name: TOA Brightness Temperature segment mean at 6.3um (all pixels) + standard_name: toa_brightess_temperature ir_channel_id: 1 category_id: 0 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -208,9 +216,11 @@ datasets: wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#26#brightnessTemperature' - long_name: bt_mean_clear + long_name: TOA Brightness Temperature segment mean at 6.3um (clear pixels) + standard_name: toa_brightess_temperature ir_channel_id: 1 category_id: 1 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -222,9 +232,11 @@ datasets: wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#27#brightnessTemperature' - long_name: bt_mean_cloudy + long_name: TOA Brightness Temperature segment mean at 6.3um (cloudy pixels) + standard_name: toa_brightess_temperature ir_channel_id: 1 category_id: 2 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -236,9 +248,11 @@ datasets: wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#31#brightnessTemperature' - long_name: bt_mean_all + long_name: TOA Brightness Temperature segment mean at 7.3um (all pixels) + standard_name: toa_brightess_temperature ir_channel_id: 2 category_id: 0 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -250,9 +264,11 @@ datasets: wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#32#brightnessTemperature' - long_name: bt_mean_clear + long_name: TOA Brightness Temperature segment mean at 7.3um (clear pixels) + standard_name: toa_brightess_temperature ir_channel_id: 2 category_id: 1 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -264,9 +280,11 @@ datasets: wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#33#brightnessTemperature' - long_name: bt_mean_cloudy + long_name: TOA Brightness Temperature segment mean at 7.3um (cloudy pixels) + standard_name: toa_brightess_temperature ir_channel_id: 2 category_id: 2 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -278,9 +296,11 @@ datasets: wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#37#brightnessTemperature' - long_name: bt_mean_all + long_name: TOA Brightness Temperature segment mean at 8.7um (all pixels) + standard_name: toa_brightess_temperature ir_channel_id: 3 category_id: 0 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -292,9 +312,11 @@ datasets: wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#38#brightnessTemperature' - long_name: bt_mean_clear + long_name: TOA Brightness Temperature segment mean at 8.7um (clear pixels) + standard_name: toa_brightess_temperature ir_channel_id: 3 category_id: 1 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -306,9 +328,11 @@ datasets: wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#39#brightnessTemperature' - long_name: bt_mean_cloudy + long_name: TOA Brightness Temperature segment mean at 8.7um (cloudy pixels) + standard_name: toa_brightess_temperature ir_channel_id: 3 category_id: 2 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -320,9 +344,11 @@ datasets: wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#43#brightnessTemperature' - long_name: bt_mean_all + long_name: TOA Brightness Temperature segment mean at 9.7um (all pixels) + standard_name: toa_brightess_temperature ir_channel_id: 4 category_id: 0 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -334,9 +360,11 @@ datasets: wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#44#brightnessTemperature' - long_name: bt_mean_clear + long_name: TOA Brightness Temperature segment mean at 9.7um (clear pixels) + standard_name: toa_brightess_temperature ir_channel_id: 4 category_id: 1 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -348,9 +376,11 @@ datasets: wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#45#brightnessTemperature' - long_name: bt_mean_cloudy + long_name: TOA Brightness Temperature segment mean at 9.7um (cloudy pixels) + standard_name: toa_brightess_temperature ir_channel_id: 4 category_id: 2 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -362,9 +392,11 @@ datasets: wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#49#brightnessTemperature' - long_name: bt_mean_all + long_name: TOA Brightness Temperature segment mean at 10.5um (all pixels) + standard_name: toa_brightess_temperature ir_channel_id: 5 category_id: 0 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -376,9 +408,11 @@ datasets: wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#50#brightnessTemperature' - long_name: bt_mean_clear + long_name: TOA Brightness Temperature segment mean at 10.5um (clear pixels) + standard_name: toa_brightess_temperature ir_channel_id: 5 category_id: 1 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -390,9 +424,11 @@ datasets: wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#51#brightnessTemperature' - long_name: bt_mean_cloudy + long_name: TOA Brightness Temperature segment mean at 10.5um (cloudy pixels) + standard_name: toa_brightess_temperature ir_channel_id: 5 category_id: 2 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -404,9 +440,11 @@ datasets: wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#55#brightnessTemperature' - long_name: bt_mean_all + long_name: TOA Brightness Temperature segment mean at 12.3um (all pixels) + standard_name: toa_brightess_temperature ir_channel_id: 6 category_id: 0 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -418,9 +456,11 @@ datasets: wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#56#brightnessTemperature' - long_name: bt_mean_clear + long_name: TOA Brightness Temperature segment mean at 12.3um (clear pixels) + standard_name: toa_brightess_temperature ir_channel_id: 6 category_id: 1 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -432,9 +472,11 @@ datasets: wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#57#brightnessTemperature' - long_name: bt_mean_cloudy + long_name: TOA Brightness Temperature segment mean at 12.3um (cloudy pixels) + standard_name: toa_brightess_temperature ir_channel_id: 6 category_id: 2 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -446,9 +488,11 @@ datasets: wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#61#brightnessTemperature' - long_name: bt_mean_all + long_name: TOA Brightness Temperature segment mean at 13.3um (all pixels) + standard_name: toa_brightess_temperature ir_channel_id: 7 category_id: 0 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -460,9 +504,11 @@ datasets: wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#62#brightnessTemperature' - long_name: bt_mean_clear + long_name: TOA Brightness Temperature segment mean at 13.3um (clear pixels) + standard_name: toa_brightess_temperature ir_channel_id: 7 category_id: 1 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -474,9 +520,11 @@ datasets: wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#63#brightnessTemperature' - long_name: bt_mean_cloudy + long_name: TOA Brightness Temperature segment mean at 13.3um (cloudy pixels) + standard_name: toa_brightess_temperature ir_channel_id: 7 category_id: 2 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -488,9 +536,11 @@ datasets: wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#19#brightnessTemperature->percentConfidence' - long_name: quality_bt_all + long_name: TOA Brightness Temperature % confidence at 3.8um (all pixels) + standard_name: quality_flag ir_channel_id: 0 category_id: 0 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -502,9 +552,11 @@ datasets: wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#20#brightnessTemperature->percentConfidence' - long_name: quality_bt_clear + long_name: TOA Brightness Temperature % confidence at 3.8um (clear pixels) + standard_name: quality_flag ir_channel_id: 0 category_id: 1 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -516,9 +568,11 @@ datasets: wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#21#brightnessTemperature->percentConfidence' - long_name: quality_bt_cloudy + long_name: TOA Brightness Temperature % confidence at 3.8um (cloudy pixels) + standard_name: quality_flag ir_channel_id: 0 category_id: 2 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -530,9 +584,11 @@ datasets: wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#25#brightnessTemperature->percentConfidence' - long_name: quality_bt_all + long_name: TOA Brightness Temperature % confidence at 6.3um (all pixels) + standard_name: quality_flag ir_channel_id: 1 category_id: 0 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -544,9 +600,11 @@ datasets: wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#26#brightnessTemperature->percentConfidence' - long_name: quality_bt_clear + long_name: TOA Brightness Temperature % confidence at 6.3um (clear pixels) + standard_name: quality_flag ir_channel_id: 1 category_id: 1 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -558,9 +616,11 @@ datasets: wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#27#brightnessTemperature->percentConfidence' - long_name: quality_bt_cloudy + long_name: TOA Brightness Temperature % confidence at 6.3um (cloudy pixels) + standard_name: quality_flag ir_channel_id: 1 category_id: 2 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -572,9 +632,11 @@ datasets: wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#31#brightnessTemperature->percentConfidence' - long_name: quality_bt_all + long_name: TOA Brightness Temperature % confidence at 7.3um (all pixels) + standard_name: quality_flag ir_channel_id: 2 category_id: 0 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -586,9 +648,11 @@ datasets: wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#32#brightnessTemperature->percentConfidence' - long_name: quality_bt_clear + long_name: TOA Brightness Temperature % confidence at 7.3um (clear pixels) + standard_name: quality_flag ir_channel_id: 2 category_id: 1 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -600,9 +664,11 @@ datasets: wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#33#brightnessTemperature->percentConfidence' - long_name: quality_bt_cloudy + long_name: TOA Brightness Temperature % confidence at 7.3um (cloudy pixels) + standard_name: quality_flag ir_channel_id: 2 category_id: 2 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -614,9 +680,11 @@ datasets: wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#37#brightnessTemperature->percentConfidence' - long_name: quality_bt_all + long_name: TOA Brightness Temperature % confidence at 8.7um (all pixels) + standard_name: quality_flag ir_channel_id: 3 category_id: 0 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -628,9 +696,11 @@ datasets: wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#38#brightnessTemperature->percentConfidence' - long_name: quality_bt_clear + long_name: TOA Brightness Temperature % confidence at 8.7um (clear pixels) + standard_name: quality_flag ir_channel_id: 3 category_id: 1 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -642,9 +712,11 @@ datasets: wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#39#brightnessTemperature->percentConfidence' - long_name: quality_bt_cloudy + long_name: TOA Brightness Temperature % confidence at 8.7um (cloudy pixels) + standard_name: quality_flag ir_channel_id: 3 category_id: 2 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -656,9 +728,11 @@ datasets: wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#43#brightnessTemperature->percentConfidence' - long_name: quality_bt_all + long_name: TOA Brightness Temperature % confidence at 9.7um (all pixels) + standard_name: quality_flag ir_channel_id: 4 category_id: 0 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -670,9 +744,11 @@ datasets: wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#44#brightnessTemperature->percentConfidence' - long_name: quality_bt_clear + long_name: TOA Brightness Temperature % confidence at 9.7um (clear pixels) + standard_name: quality_flag ir_channel_id: 4 category_id: 1 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -684,9 +760,11 @@ datasets: wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#45#brightnessTemperature->percentConfidence' - long_name: quality_bt_cloudy + long_name: TOA Brightness Temperature % confidence at 9.7um (cloudy pixels) + standard_name: quality_flag ir_channel_id: 4 category_id: 2 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -698,9 +776,11 @@ datasets: wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#49#brightnessTemperature->percentConfidence' - long_name: quality_bt_all + long_name: TOA Brightness Temperature % confidence at 10.5um (all pixels) + standard_name: quality_flag ir_channel_id: 5 category_id: 0 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -712,9 +792,11 @@ datasets: wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#50#brightnessTemperature->percentConfidence' - long_name: quality_bt_clear + long_name: TOA Brightness Temperature % confidence at 10.5um (clear pixels) + standard_name: quality_flag ir_channel_id: 5 category_id: 1 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -726,9 +808,11 @@ datasets: wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#51#brightnessTemperature->percentConfidence' - long_name: quality_bt_cloudy + long_name: TOA Brightness Temperature % confidence at 10.5um (cloudy pixels) + standard_name: quality_flag ir_channel_id: 5 category_id: 2 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -740,9 +824,11 @@ datasets: wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#55#brightnessTemperature->percentConfidence' - long_name: quality_bt_all + long_name: TOA Brightness Temperature % confidence at 12.3um (all pixels) + standard_name: quality_flag ir_channel_id: 6 category_id: 0 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -754,9 +840,11 @@ datasets: wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#56#brightnessTemperature->percentConfidence' - long_name: quality_bt_clear + long_name: TOA Brightness Temperature % confidence at 12.3um (clear pixels) + standard_name: quality_flag ir_channel_id: 6 category_id: 1 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -768,9 +856,11 @@ datasets: wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#57#brightnessTemperature->percentConfidence' - long_name: quality_bt_cloudy + long_name: TOA Brightness Temperature % confidence at 12.3um (cloudy pixels) + standard_name: quality_flag ir_channel_id: 6 category_id: 2 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -782,9 +872,11 @@ datasets: wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#61#brightnessTemperature->percentConfidence' - long_name: quality_bt_all + long_name: TOA Brightness Temperature % confidence at 13.3um (all pixels) + standard_name: quality_flag ir_channel_id: 7 category_id: 0 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -796,9 +888,11 @@ datasets: wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#62#brightnessTemperature->percentConfidence' - long_name: quality_bt_clear + long_name: TOA Brightness Temperature % confidence at 13.3um (clear pixels) + standard_name: quality_flag ir_channel_id: 7 category_id: 1 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -810,9 +904,11 @@ datasets: wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#63#brightnessTemperature->percentConfidence' - long_name: quality_bt_cloudy + long_name: TOA Brightness Temperature % confidence at 13.3um (cloudy pixels) + standard_name: quality_flag ir_channel_id: 7 category_id: 2 + unit: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -824,9 +920,11 @@ datasets: wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#19#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_all + long_name: TOA Brightness Temperature standard deviation at 3.8um (all pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 0 category_id: 0 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -838,9 +936,11 @@ datasets: wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#20#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_clear + long_name: TOA Brightness Temperature standard deviation at 3.8um (clear pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 0 category_id: 1 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -852,9 +952,11 @@ datasets: wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#21#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_cloudy + long_name: TOA Brightness Temperature standard deviation at 3.8um (cloudy pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 0 category_id: 2 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -866,9 +968,11 @@ datasets: wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#25#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_all + long_name: TOA Brightness Temperature standard deviation at 6.3um (all pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 1 category_id: 0 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -880,9 +984,11 @@ datasets: wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#26#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_clear + long_name: TOA Brightness Temperature standard deviation at 6.3um (clear pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 1 category_id: 1 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -894,9 +1000,11 @@ datasets: wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#27#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_cloudy + long_name: TOA Brightness Temperature standard deviation at 6.3um (cloudy pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 1 category_id: 2 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -908,9 +1016,11 @@ datasets: wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#31#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_all + long_name: TOA Brightness Temperature standard deviation at 7.3um (all pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 2 category_id: 0 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -922,9 +1032,11 @@ datasets: wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#32#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_clear + long_name: TOA Brightness Temperature standard deviation at 7.3um (clear pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 2 category_id: 1 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -936,9 +1048,11 @@ datasets: wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#33#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_cloudy + long_name: TOA Brightness Temperature standard deviation at 7.3um (cloudy pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 2 category_id: 2 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -950,9 +1064,11 @@ datasets: wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#37#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_all + long_name: TOA Brightness Temperature standard deviation at 8.7um (all pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 3 category_id: 0 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -964,9 +1080,11 @@ datasets: wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#38#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_clear + long_name: TOA Brightness Temperature standard deviation at 8.7um (clear pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 3 category_id: 1 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -978,9 +1096,11 @@ datasets: wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#39#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_cloudy + long_name: TOA Brightness Temperature standard deviation at 8.7um (cloudy pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 3 category_id: 2 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -992,9 +1112,11 @@ datasets: wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#43#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_all + long_name: TOA Brightness Temperature standard deviation at 9.7um (all pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 4 category_id: 0 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1006,9 +1128,11 @@ datasets: wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#44#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_clear + long_name: TOA Brightness Temperature standard deviation at 9.7um (clear pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 4 category_id: 1 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1020,9 +1144,11 @@ datasets: wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#45#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_cloudy + long_name: TOA Brightness Temperature standard deviation at 9.7um (cloudy pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 4 category_id: 2 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1034,9 +1160,11 @@ datasets: wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#49#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_all + long_name: TOA Brightness Temperature standard deviation at 10.5um (all pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 5 category_id: 0 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1048,9 +1176,11 @@ datasets: wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#50#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_clear + long_name: TOA Brightness Temperature standard deviation at 10.5um (clear pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 5 category_id: 1 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1062,9 +1192,11 @@ datasets: wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#51#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_cloudy + long_name: TOA Brightness Temperature standard deviation at 10.5um (cloudy pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 5 category_id: 2 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1076,9 +1208,11 @@ datasets: wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#55#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_all + long_name: TOA Brightness Temperature standard deviation at 12.3um (all pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 6 category_id: 0 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1090,9 +1224,11 @@ datasets: wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#56#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_clear + long_name: TOA Brightness Temperature standard deviation at 12.3um (clear pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 6 category_id: 1 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1104,9 +1240,11 @@ datasets: wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#57#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_cloudy + long_name: TOA Brightness Temperature standard deviation at 12.3um (cloudy pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 6 category_id: 2 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1118,9 +1256,11 @@ datasets: wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#61#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_all + long_name: TOA Brightness Temperature standard deviation at 13.3um (all pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 7 category_id: 0 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1132,9 +1272,11 @@ datasets: wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#62#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_clear + long_name: TOA Brightness Temperature standard deviation at 13.3um (clear pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 7 category_id: 1 + unit: K fill_value: -1.0e+100 coordinates: - longitude @@ -1146,9 +1288,11 @@ datasets: wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#63#brightnessTemperature->firstOrderStatisticalValue' - long_name: std_bt_cloudy + long_name: TOA Brightness Temperature standard deviation at 13.3um (cloudy pixels) + standard_name: toa_brightess_temperature standard_error ir_channel_id: 7 category_id: 2 + unit: K fill_value: -1.0e+100 coordinates: - longitude From 7a0fabcaf7c3ed2993bff263528c615b30326ca5 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Wed, 30 Aug 2023 12:50:00 +0200 Subject: [PATCH 08/41] fixes to FCI BUFR --- satpy/etc/readers/fci_l2_bufr.yaml | 148 +---------------------------- 1 file changed, 2 insertions(+), 146 deletions(-) diff --git a/satpy/etc/readers/fci_l2_bufr.yaml b/satpy/etc/readers/fci_l2_bufr.yaml index 21657df80d..5c35b3dd0c 100644 --- a/satpy/etc/readers/fci_l2_bufr.yaml +++ b/satpy/etc/readers/fci_l2_bufr.yaml @@ -58,7 +58,7 @@ datasets: name: temperature resolution: 32000 file_type: fci_l2_bufr_amv - key: '#1#temperature' + key: '#1#airTemperature' long_name: Temperature of AMV feature standard_name: temperature_at_wind_level units: K @@ -71,7 +71,7 @@ datasets: name: height resolution: 32000 file_type: fci_l2_bufr_amv - key: 'heightOfTopOfCloud' + key: '#1#heightOfTopOfCloud' long_name: Height of AMV feature standard_name: height_at_wind_level units: m @@ -154,8 +154,6 @@ datasets: key: '#19#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 3.8um (all pixels) standard_name: toa_brightess_temperature - ir_channel_id: 0 - category_id: 0 unit: K fill_value: -1.0e+100 coordinates: @@ -170,8 +168,6 @@ datasets: key: '#20#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 3.8um (clear pixels) standard_name: toa_brightess_temperature - ir_channel_id: 0 - category_id: 1 unit: K fill_value: -1.0e+100 coordinates: @@ -186,8 +182,6 @@ datasets: key: '#21#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 3.8um (cloudy pixels) standard_name: toa_brightess_temperature - ir_channel_id: 0 - category_id: 2 unit: K fill_value: -1.0e+100 coordinates: @@ -202,8 +196,6 @@ datasets: key: '#25#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 6.3um (all pixels) standard_name: toa_brightess_temperature - ir_channel_id: 1 - category_id: 0 unit: K fill_value: -1.0e+100 coordinates: @@ -218,8 +210,6 @@ datasets: key: '#26#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 6.3um (clear pixels) standard_name: toa_brightess_temperature - ir_channel_id: 1 - category_id: 1 unit: K fill_value: -1.0e+100 coordinates: @@ -234,8 +224,6 @@ datasets: key: '#27#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 6.3um (cloudy pixels) standard_name: toa_brightess_temperature - ir_channel_id: 1 - category_id: 2 unit: K fill_value: -1.0e+100 coordinates: @@ -250,8 +238,6 @@ datasets: key: '#31#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 7.3um (all pixels) standard_name: toa_brightess_temperature - ir_channel_id: 2 - category_id: 0 unit: K fill_value: -1.0e+100 coordinates: @@ -266,8 +252,6 @@ datasets: key: '#32#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 7.3um (clear pixels) standard_name: toa_brightess_temperature - ir_channel_id: 2 - category_id: 1 unit: K fill_value: -1.0e+100 coordinates: @@ -282,8 +266,6 @@ datasets: key: '#33#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 7.3um (cloudy pixels) standard_name: toa_brightess_temperature - ir_channel_id: 2 - category_id: 2 unit: K fill_value: -1.0e+100 coordinates: @@ -298,8 +280,6 @@ datasets: key: '#37#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 8.7um (all pixels) standard_name: toa_brightess_temperature - ir_channel_id: 3 - category_id: 0 unit: K fill_value: -1.0e+100 coordinates: @@ -314,8 +294,6 @@ datasets: key: '#38#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 8.7um (clear pixels) standard_name: toa_brightess_temperature - ir_channel_id: 3 - category_id: 1 unit: K fill_value: -1.0e+100 coordinates: @@ -330,8 +308,6 @@ datasets: key: '#39#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 8.7um (cloudy pixels) standard_name: toa_brightess_temperature - ir_channel_id: 3 - category_id: 2 unit: K fill_value: -1.0e+100 coordinates: @@ -346,8 +322,6 @@ datasets: key: '#43#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 9.7um (all pixels) standard_name: toa_brightess_temperature - ir_channel_id: 4 - category_id: 0 unit: K fill_value: -1.0e+100 coordinates: @@ -362,8 +336,6 @@ datasets: key: '#44#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 9.7um (clear pixels) standard_name: toa_brightess_temperature - ir_channel_id: 4 - category_id: 1 unit: K fill_value: -1.0e+100 coordinates: @@ -378,8 +350,6 @@ datasets: key: '#45#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 9.7um (cloudy pixels) standard_name: toa_brightess_temperature - ir_channel_id: 4 - category_id: 2 unit: K fill_value: -1.0e+100 coordinates: @@ -394,8 +364,6 @@ datasets: key: '#49#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 10.5um (all pixels) standard_name: toa_brightess_temperature - ir_channel_id: 5 - category_id: 0 unit: K fill_value: -1.0e+100 coordinates: @@ -410,8 +378,6 @@ datasets: key: '#50#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 10.5um (clear pixels) standard_name: toa_brightess_temperature - ir_channel_id: 5 - category_id: 1 unit: K fill_value: -1.0e+100 coordinates: @@ -426,8 +392,6 @@ datasets: key: '#51#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 10.5um (cloudy pixels) standard_name: toa_brightess_temperature - ir_channel_id: 5 - category_id: 2 unit: K fill_value: -1.0e+100 coordinates: @@ -442,8 +406,6 @@ datasets: key: '#55#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 12.3um (all pixels) standard_name: toa_brightess_temperature - ir_channel_id: 6 - category_id: 0 unit: K fill_value: -1.0e+100 coordinates: @@ -458,8 +420,6 @@ datasets: key: '#56#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 12.3um (clear pixels) standard_name: toa_brightess_temperature - ir_channel_id: 6 - category_id: 1 unit: K fill_value: -1.0e+100 coordinates: @@ -474,8 +434,6 @@ datasets: key: '#57#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 12.3um (cloudy pixels) standard_name: toa_brightess_temperature - ir_channel_id: 6 - category_id: 2 unit: K fill_value: -1.0e+100 coordinates: @@ -490,8 +448,6 @@ datasets: key: '#61#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 13.3um (all pixels) standard_name: toa_brightess_temperature - ir_channel_id: 7 - category_id: 0 unit: K fill_value: -1.0e+100 coordinates: @@ -506,8 +462,6 @@ datasets: key: '#62#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 13.3um (clear pixels) standard_name: toa_brightess_temperature - ir_channel_id: 7 - category_id: 1 unit: K fill_value: -1.0e+100 coordinates: @@ -522,8 +476,6 @@ datasets: key: '#63#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 13.3um (cloudy pixels) standard_name: toa_brightess_temperature - ir_channel_id: 7 - category_id: 2 unit: K fill_value: -1.0e+100 coordinates: @@ -538,8 +490,6 @@ datasets: key: '#19#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 3.8um (all pixels) standard_name: quality_flag - ir_channel_id: 0 - category_id: 0 unit: '%' fill_value: -1.0e+100 coordinates: @@ -554,8 +504,6 @@ datasets: key: '#20#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 3.8um (clear pixels) standard_name: quality_flag - ir_channel_id: 0 - category_id: 1 unit: '%' fill_value: -1.0e+100 coordinates: @@ -570,8 +518,6 @@ datasets: key: '#21#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 3.8um (cloudy pixels) standard_name: quality_flag - ir_channel_id: 0 - category_id: 2 unit: '%' fill_value: -1.0e+100 coordinates: @@ -586,8 +532,6 @@ datasets: key: '#25#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 6.3um (all pixels) standard_name: quality_flag - ir_channel_id: 1 - category_id: 0 unit: '%' fill_value: -1.0e+100 coordinates: @@ -602,8 +546,6 @@ datasets: key: '#26#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 6.3um (clear pixels) standard_name: quality_flag - ir_channel_id: 1 - category_id: 1 unit: '%' fill_value: -1.0e+100 coordinates: @@ -618,8 +560,6 @@ datasets: key: '#27#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 6.3um (cloudy pixels) standard_name: quality_flag - ir_channel_id: 1 - category_id: 2 unit: '%' fill_value: -1.0e+100 coordinates: @@ -634,8 +574,6 @@ datasets: key: '#31#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 7.3um (all pixels) standard_name: quality_flag - ir_channel_id: 2 - category_id: 0 unit: '%' fill_value: -1.0e+100 coordinates: @@ -650,8 +588,6 @@ datasets: key: '#32#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 7.3um (clear pixels) standard_name: quality_flag - ir_channel_id: 2 - category_id: 1 unit: '%' fill_value: -1.0e+100 coordinates: @@ -666,8 +602,6 @@ datasets: key: '#33#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 7.3um (cloudy pixels) standard_name: quality_flag - ir_channel_id: 2 - category_id: 2 unit: '%' fill_value: -1.0e+100 coordinates: @@ -682,8 +616,6 @@ datasets: key: '#37#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 8.7um (all pixels) standard_name: quality_flag - ir_channel_id: 3 - category_id: 0 unit: '%' fill_value: -1.0e+100 coordinates: @@ -698,8 +630,6 @@ datasets: key: '#38#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 8.7um (clear pixels) standard_name: quality_flag - ir_channel_id: 3 - category_id: 1 unit: '%' fill_value: -1.0e+100 coordinates: @@ -714,8 +644,6 @@ datasets: key: '#39#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 8.7um (cloudy pixels) standard_name: quality_flag - ir_channel_id: 3 - category_id: 2 unit: '%' fill_value: -1.0e+100 coordinates: @@ -730,8 +658,6 @@ datasets: key: '#43#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 9.7um (all pixels) standard_name: quality_flag - ir_channel_id: 4 - category_id: 0 unit: '%' fill_value: -1.0e+100 coordinates: @@ -746,8 +672,6 @@ datasets: key: '#44#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 9.7um (clear pixels) standard_name: quality_flag - ir_channel_id: 4 - category_id: 1 unit: '%' fill_value: -1.0e+100 coordinates: @@ -762,8 +686,6 @@ datasets: key: '#45#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 9.7um (cloudy pixels) standard_name: quality_flag - ir_channel_id: 4 - category_id: 2 unit: '%' fill_value: -1.0e+100 coordinates: @@ -778,8 +700,6 @@ datasets: key: '#49#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 10.5um (all pixels) standard_name: quality_flag - ir_channel_id: 5 - category_id: 0 unit: '%' fill_value: -1.0e+100 coordinates: @@ -794,8 +714,6 @@ datasets: key: '#50#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 10.5um (clear pixels) standard_name: quality_flag - ir_channel_id: 5 - category_id: 1 unit: '%' fill_value: -1.0e+100 coordinates: @@ -810,8 +728,6 @@ datasets: key: '#51#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 10.5um (cloudy pixels) standard_name: quality_flag - ir_channel_id: 5 - category_id: 2 unit: '%' fill_value: -1.0e+100 coordinates: @@ -826,8 +742,6 @@ datasets: key: '#55#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 12.3um (all pixels) standard_name: quality_flag - ir_channel_id: 6 - category_id: 0 unit: '%' fill_value: -1.0e+100 coordinates: @@ -842,8 +756,6 @@ datasets: key: '#56#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 12.3um (clear pixels) standard_name: quality_flag - ir_channel_id: 6 - category_id: 1 unit: '%' fill_value: -1.0e+100 coordinates: @@ -858,8 +770,6 @@ datasets: key: '#57#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 12.3um (cloudy pixels) standard_name: quality_flag - ir_channel_id: 6 - category_id: 2 unit: '%' fill_value: -1.0e+100 coordinates: @@ -874,8 +784,6 @@ datasets: key: '#61#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 13.3um (all pixels) standard_name: quality_flag - ir_channel_id: 7 - category_id: 0 unit: '%' fill_value: -1.0e+100 coordinates: @@ -890,8 +798,6 @@ datasets: key: '#62#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 13.3um (clear pixels) standard_name: quality_flag - ir_channel_id: 7 - category_id: 1 unit: '%' fill_value: -1.0e+100 coordinates: @@ -906,8 +812,6 @@ datasets: key: '#63#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 13.3um (cloudy pixels) standard_name: quality_flag - ir_channel_id: 7 - category_id: 2 unit: '%' fill_value: -1.0e+100 coordinates: @@ -922,8 +826,6 @@ datasets: key: '#19#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 3.8um (all pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 0 - category_id: 0 unit: K fill_value: -1.0e+100 coordinates: @@ -938,8 +840,6 @@ datasets: key: '#20#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 3.8um (clear pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 0 - category_id: 1 unit: K fill_value: -1.0e+100 coordinates: @@ -954,8 +854,6 @@ datasets: key: '#21#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 3.8um (cloudy pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 0 - category_id: 2 unit: K fill_value: -1.0e+100 coordinates: @@ -970,8 +868,6 @@ datasets: key: '#25#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 6.3um (all pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 1 - category_id: 0 unit: K fill_value: -1.0e+100 coordinates: @@ -986,8 +882,6 @@ datasets: key: '#26#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 6.3um (clear pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 1 - category_id: 1 unit: K fill_value: -1.0e+100 coordinates: @@ -1002,8 +896,6 @@ datasets: key: '#27#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 6.3um (cloudy pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 1 - category_id: 2 unit: K fill_value: -1.0e+100 coordinates: @@ -1018,8 +910,6 @@ datasets: key: '#31#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 7.3um (all pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 2 - category_id: 0 unit: K fill_value: -1.0e+100 coordinates: @@ -1034,8 +924,6 @@ datasets: key: '#32#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 7.3um (clear pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 2 - category_id: 1 unit: K fill_value: -1.0e+100 coordinates: @@ -1050,8 +938,6 @@ datasets: key: '#33#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 7.3um (cloudy pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 2 - category_id: 2 unit: K fill_value: -1.0e+100 coordinates: @@ -1066,8 +952,6 @@ datasets: key: '#37#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 8.7um (all pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 3 - category_id: 0 unit: K fill_value: -1.0e+100 coordinates: @@ -1082,8 +966,6 @@ datasets: key: '#38#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 8.7um (clear pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 3 - category_id: 1 unit: K fill_value: -1.0e+100 coordinates: @@ -1098,8 +980,6 @@ datasets: key: '#39#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 8.7um (cloudy pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 3 - category_id: 2 unit: K fill_value: -1.0e+100 coordinates: @@ -1114,8 +994,6 @@ datasets: key: '#43#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 9.7um (all pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 4 - category_id: 0 unit: K fill_value: -1.0e+100 coordinates: @@ -1130,8 +1008,6 @@ datasets: key: '#44#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 9.7um (clear pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 4 - category_id: 1 unit: K fill_value: -1.0e+100 coordinates: @@ -1146,8 +1022,6 @@ datasets: key: '#45#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 9.7um (cloudy pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 4 - category_id: 2 unit: K fill_value: -1.0e+100 coordinates: @@ -1162,8 +1036,6 @@ datasets: key: '#49#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 10.5um (all pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 5 - category_id: 0 unit: K fill_value: -1.0e+100 coordinates: @@ -1178,8 +1050,6 @@ datasets: key: '#50#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 10.5um (clear pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 5 - category_id: 1 unit: K fill_value: -1.0e+100 coordinates: @@ -1194,8 +1064,6 @@ datasets: key: '#51#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 10.5um (cloudy pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 5 - category_id: 2 unit: K fill_value: -1.0e+100 coordinates: @@ -1210,8 +1078,6 @@ datasets: key: '#55#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 12.3um (all pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 6 - category_id: 0 unit: K fill_value: -1.0e+100 coordinates: @@ -1226,8 +1092,6 @@ datasets: key: '#56#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 12.3um (clear pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 6 - category_id: 1 unit: K fill_value: -1.0e+100 coordinates: @@ -1242,8 +1106,6 @@ datasets: key: '#57#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 12.3um (cloudy pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 6 - category_id: 2 unit: K fill_value: -1.0e+100 coordinates: @@ -1258,8 +1120,6 @@ datasets: key: '#61#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 13.3um (all pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 7 - category_id: 0 unit: K fill_value: -1.0e+100 coordinates: @@ -1274,8 +1134,6 @@ datasets: key: '#62#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 13.3um (clear pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 7 - category_id: 1 unit: K fill_value: -1.0e+100 coordinates: @@ -1290,8 +1148,6 @@ datasets: key: '#63#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 13.3um (cloudy pixels) standard_name: toa_brightess_temperature standard_error - ir_channel_id: 7 - category_id: 2 unit: K fill_value: -1.0e+100 coordinates: From ff506fd7e15f0a8f61b326a23727580fb50c16e5 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Wed, 18 Oct 2023 16:45:18 +0200 Subject: [PATCH 09/41] Fixes to FCI BUFR reader and configuration --- satpy/etc/readers/fci_l2_bufr.yaml | 250 ++++++++++++----------------- satpy/readers/eum_l2_bufr.py | 86 +++++++--- 2 files changed, 175 insertions(+), 161 deletions(-) diff --git a/satpy/etc/readers/fci_l2_bufr.yaml b/satpy/etc/readers/fci_l2_bufr.yaml index 5c35b3dd0c..f2a4084e1d 100644 --- a/satpy/etc/readers/fci_l2_bufr.yaml +++ b/satpy/etc/readers/fci_l2_bufr.yaml @@ -16,10 +16,9 @@ file_types: - '{pflag}_{location_indicator},{data_designator},MTI{spacecraft_id:1d}+FCI-2-ASR-{subtype}-{coverage}-{subsetting}-{component1}-{component2}-{component3}-{purpose}-BUFR_{oflag}_{originator}_{processing_time:%Y%m%d%H%M%S}_{facility_or_tool}_{environment}_{start_time:%Y%m%d%H%M%S}_{end_time:%Y%m%d%H%M%S}_{processing_mode}_{special_compression}_{disposition_mode}_{repeat_cycle_in_day:>04d}_{count_in_repeat_cycle:>04d}.bin' fci_l2_bufr_amv: file_reader: !!python/name:satpy.readers.eum_l2_bufr.EumetsatL2BufrFileHandler - file_patterns: + file_patterns: - '{pflag}_{location_indicator},{data_designator},MTI{spacecraft_id:1d}+FCI-2-AMV-{subtype}-{coverage}-{subsetting}-{component1}-{component2}-{component3}-{purpose}-BUFR_{oflag}_{originator}_{processing_time:%Y%m%d%H%M%S}_{facility_or_tool}_{environment}_{start_time:%Y%m%d%H%M%S}_{end_time:%Y%m%d%H%M%S}_{processing_mode}_{special_compression}_{disposition_mode}_{repeat_cycle_in_day:>04d}_{count_in_repeat_cycle:>04d}.bin' - datasets: #----- COMMON ------------------ latitude: @@ -39,7 +38,7 @@ datasets: standard_name: longitude units: degree_east fill_value: -1.e+100 - + # ---- AMV products ------------ pressure: name: pressure @@ -53,10 +52,9 @@ datasets: coordinates: - longitude - latitude - + temperature: name: temperature - resolution: 32000 file_type: fci_l2_bufr_amv key: '#1#airTemperature' long_name: Temperature of AMV feature @@ -66,10 +64,9 @@ datasets: coordinates: - longitude - latitude - + height: name: height - resolution: 32000 file_type: fci_l2_bufr_amv key: '#1#heightOfTopOfCloud' long_name: Height of AMV feature @@ -79,10 +76,9 @@ datasets: coordinates: - longitude - latitude - + direction: name: direction - resolution: 32000 file_type: fci_l2_bufr_amv key: '#1#windDirection' long_name: Direction of AMV @@ -92,10 +88,9 @@ datasets: coordinates: - longitude - latitude - + speed: name: speed - resolution: 32000 file_type: fci_l2_bufr_amv key: '#1#windSpeed' long_name: Speed of AMV @@ -105,10 +100,9 @@ datasets: coordinates: - longitude - latitude - + u: name: u - resolution: 32000 file_type: fci_l2_bufr_amv key: '#1#u' long_name: Speed U component of AMV @@ -118,10 +112,9 @@ datasets: coordinates: - longitude - latitude - + v: name: v - resolution: 32000 file_type: fci_l2_bufr_amv key: '#1#v' long_name: Speed V component of AMV @@ -131,29 +124,26 @@ datasets: coordinates: - longitude - latitude - + # ---- ASR products ------------ pixel_percentage_clear: name: pixel_percentage_clear - resolution: 32000 file_type: fci_l2_bufr_asr key: '#1#amountSegmentCloudFree' - long_name: pixel_percentage_clear - category_id: 1 - unit: '%' + long_name: Clear Sky Fraction in Segment fill_value: -1.0e+100 coordinates: - longitude - latitude - + bt_mean_all_ir38: name: bt_mean_all_ir38 - resolution: 32000 wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#19#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 3.8um (all pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -162,12 +152,12 @@ datasets: bt_mean_clear_ir38: name: bt_mean_clear_ir38 - resolution: 32000 wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#20#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 3.8um (clear pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -176,12 +166,12 @@ datasets: bt_mean_cloudy_ir38: name: bt_mean_cloudy_ir38 - resolution: 32000 wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#21#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 3.8um (cloudy pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -190,12 +180,12 @@ datasets: bt_mean_all_wv63: name: bt_mean_all_wv63 - resolution: 32000 wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#25#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 6.3um (all pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -204,12 +194,12 @@ datasets: bt_mean_clear_wv63: name: bt_mean_clear_wv63 - resolution: 32000 wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#26#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 6.3um (clear pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -218,12 +208,12 @@ datasets: bt_mean_cloudy_wv63: name: bt_mean_cloudy_wv63 - resolution: 32000 wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#27#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 6.3um (cloudy pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -232,12 +222,12 @@ datasets: bt_mean_all_wv73: name: bt_mean_all_wv73 - resolution: 32000 wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#31#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 7.3um (all pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -246,12 +236,12 @@ datasets: bt_mean_clear_wv73: name: bt_mean_clear_wv73 - resolution: 32000 wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#32#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 7.3um (clear pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -260,12 +250,12 @@ datasets: bt_mean_cloudy_wv73: name: bt_mean_cloudy_wv73 - resolution: 32000 wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#33#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 7.3um (cloudy pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -274,12 +264,12 @@ datasets: bt_mean_all_ir87: name: bt_mean_all_ir87 - resolution: 32000 wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#37#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 8.7um (all pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -288,12 +278,12 @@ datasets: bt_mean_clear_ir87: name: bt_mean_clear_ir87 - resolution: 32000 wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#38#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 8.7um (clear pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -302,12 +292,12 @@ datasets: bt_mean_cloudy_ir87: name: bt_mean_cloudy_ir87 - resolution: 32000 wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#39#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 8.7um (cloudy pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -316,12 +306,12 @@ datasets: bt_mean_all_ir97: name: bt_mean_all_ir97 - resolution: 32000 wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#43#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 9.7um (all pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -330,12 +320,12 @@ datasets: bt_mean_clear_ir97: name: bt_mean_clear_ir97 - resolution: 32000 wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#44#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 9.7um (clear pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -344,12 +334,12 @@ datasets: bt_mean_cloudy_ir97: name: bt_mean_cloudy_ir97 - resolution: 32000 wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#45#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 9.7um (cloudy pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -358,12 +348,12 @@ datasets: bt_mean_all_ir105: name: bt_mean_all_ir105 - resolution: 32000 wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#49#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 10.5um (all pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -372,12 +362,12 @@ datasets: bt_mean_clear_ir105: name: bt_mean_clear_ir105 - resolution: 32000 wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#50#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 10.5um (clear pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -386,12 +376,12 @@ datasets: bt_mean_cloudy_ir105: name: bt_mean_cloudy_ir105 - resolution: 32000 wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#51#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 10.5um (cloudy pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -400,12 +390,12 @@ datasets: bt_mean_all_ir123: name: bt_mean_all_ir123 - resolution: 32000 wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#55#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 12.3um (all pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -414,12 +404,12 @@ datasets: bt_mean_clear_ir123: name: bt_mean_clear_ir123 - resolution: 32000 wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#56#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 12.3um (clear pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -428,12 +418,12 @@ datasets: bt_mean_cloudy_ir123: name: bt_mean_cloudy_ir123 - resolution: 32000 wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#57#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 12.3um (cloudy pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -442,12 +432,12 @@ datasets: bt_mean_all_ir133: name: bt_mean_all_ir133 - resolution: 32000 wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#61#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 13.3um (all pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -456,12 +446,12 @@ datasets: bt_mean_clear_ir133: name: bt_mean_clear_ir133 - resolution: 32000 wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#62#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 13.3um (clear pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -470,12 +460,12 @@ datasets: bt_mean_cloudy_ir133: name: bt_mean_cloudy_ir133 - resolution: 32000 wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#63#brightnessTemperature' long_name: TOA Brightness Temperature segment mean at 13.3um (cloudy pixels) standard_name: toa_brightess_temperature + cell_method: area:mean unit: K fill_value: -1.0e+100 coordinates: @@ -484,12 +474,11 @@ datasets: quality_bt_all_ir38: name: quality_bt_all_ir38 - resolution: 32000 wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#19#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 3.8um (all pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -498,12 +487,11 @@ datasets: quality_bt_clear_ir38: name: quality_bt_clear_ir38 - resolution: 32000 wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#20#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 3.8um (clear pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -512,12 +500,11 @@ datasets: quality_bt_cloudy_ir38: name: quality_bt_cloudy_ir38 - resolution: 32000 wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#21#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 3.8um (cloudy pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -526,12 +513,11 @@ datasets: quality_bt_all_wv63: name: quality_bt_all_wv63 - resolution: 32000 wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#25#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 6.3um (all pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -540,12 +526,11 @@ datasets: quality_bt_clear_wv63: name: quality_bt_clear_wv63 - resolution: 32000 wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#26#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 6.3um (clear pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -554,12 +539,11 @@ datasets: quality_bt_cloudy_wv63: name: quality_bt_cloudy_wv63 - resolution: 32000 wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#27#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 6.3um (cloudy pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -568,12 +552,11 @@ datasets: quality_bt_all_wv73: name: quality_bt_all_wv73 - resolution: 32000 wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#31#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 7.3um (all pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -582,12 +565,11 @@ datasets: quality_bt_clear_wv73: name: quality_bt_clear_wv73 - resolution: 32000 wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#32#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 7.3um (clear pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -596,12 +578,11 @@ datasets: quality_bt_cloudy_wv73: name: quality_bt_cloudy_wv73 - resolution: 32000 wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#33#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 7.3um (cloudy pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -610,12 +591,11 @@ datasets: quality_bt_all_ir87: name: quality_bt_all_ir87 - resolution: 32000 wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#37#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 8.7um (all pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -624,12 +604,11 @@ datasets: quality_bt_clear_ir87: name: quality_bt_clear_ir87 - resolution: 32000 wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#38#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 8.7um (clear pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -638,12 +617,11 @@ datasets: quality_bt_cloudy_ir87: name: quality_bt_cloudy_ir87 - resolution: 32000 wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#39#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 8.7um (cloudy pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -652,12 +630,11 @@ datasets: quality_bt_all_ir97: name: quality_bt_all_ir97 - resolution: 32000 wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#43#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 9.7um (all pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -666,12 +643,11 @@ datasets: quality_bt_clear_ir97: name: quality_bt_clear_ir97 - resolution: 32000 wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#44#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 9.7um (clear pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -680,12 +656,11 @@ datasets: quality_bt_cloudy_ir97: name: quality_bt_cloudy_ir97 - resolution: 32000 wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#45#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 9.7um (cloudy pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -694,12 +669,11 @@ datasets: quality_bt_all_ir105: name: quality_bt_all_ir105 - resolution: 32000 wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#49#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 10.5um (all pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -708,12 +682,11 @@ datasets: quality_bt_clear_ir105: name: quality_bt_clear_ir105 - resolution: 32000 wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#50#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 10.5um (clear pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -722,12 +695,11 @@ datasets: quality_bt_cloudy_ir105: name: quality_bt_cloudy_ir105 - resolution: 32000 wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#51#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 10.5um (cloudy pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -736,12 +708,11 @@ datasets: quality_bt_all_ir123: name: quality_bt_all_ir123 - resolution: 32000 wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#55#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 12.3um (all pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -750,12 +721,11 @@ datasets: quality_bt_clear_ir123: name: quality_bt_clear_ir123 - resolution: 32000 wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#56#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 12.3um (clear pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -764,12 +734,11 @@ datasets: quality_bt_cloudy_ir123: name: quality_bt_cloudy_ir123 - resolution: 32000 wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#57#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 12.3um (cloudy pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -778,12 +747,11 @@ datasets: quality_bt_all_ir133: name: quality_bt_all_ir133 - resolution: 32000 wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#61#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 13.3um (all pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -792,12 +760,11 @@ datasets: quality_bt_clear_ir133: name: quality_bt_clear_ir133 - resolution: 32000 wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#62#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 13.3um (clear pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -806,12 +773,11 @@ datasets: quality_bt_cloudy_ir133: name: quality_bt_cloudy_ir133 - resolution: 32000 wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#63#brightnessTemperature->percentConfidence' long_name: TOA Brightness Temperature % confidence at 13.3um (cloudy pixels) - standard_name: quality_flag + standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -820,12 +786,12 @@ datasets: std_bt_all_ir38: name: std_bt_all_ir38 - resolution: 32000 wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#19#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 3.8um (all pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -834,12 +800,12 @@ datasets: std_bt_clear_ir38: name: std_bt_clear_ir38 - resolution: 32000 wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#20#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 3.8um (clear pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -848,12 +814,12 @@ datasets: std_bt_cloudy_ir38: name: std_bt_cloudy_ir38 - resolution: 32000 wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#21#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 3.8um (cloudy pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -862,12 +828,12 @@ datasets: std_bt_all_wv63: name: std_bt_all_wv63 - resolution: 32000 wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#25#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 6.3um (all pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -876,12 +842,12 @@ datasets: std_bt_clear_wv63: name: std_bt_clear_wv63 - resolution: 32000 wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#26#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 6.3um (clear pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -890,12 +856,12 @@ datasets: std_bt_cloudy_wv63: name: std_bt_cloudy_wv63 - resolution: 32000 wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#27#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 6.3um (cloudy pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -904,12 +870,12 @@ datasets: std_bt_all_wv73: name: std_bt_all_wv73 - resolution: 32000 wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#31#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 7.3um (all pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -918,12 +884,12 @@ datasets: std_bt_clear_wv73: name: std_bt_clear_wv73 - resolution: 32000 wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#32#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 7.3um (clear pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -932,12 +898,12 @@ datasets: std_bt_cloudy_wv73: name: std_bt_cloudy_wv73 - resolution: 32000 wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#33#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 7.3um (cloudy pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -946,12 +912,12 @@ datasets: std_bt_all_ir87: name: std_bt_all_ir87 - resolution: 32000 wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#37#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 8.7um (all pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -960,12 +926,12 @@ datasets: std_bt_clear_ir87: name: std_bt_clear_ir87 - resolution: 32000 wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#38#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 8.7um (clear pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -974,12 +940,12 @@ datasets: std_bt_cloudy_ir87: name: std_bt_cloudy_ir87 - resolution: 32000 wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#39#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 8.7um (cloudy pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -988,12 +954,12 @@ datasets: std_bt_all_ir97: name: std_bt_all_ir97 - resolution: 32000 wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#43#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 9.7um (all pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -1002,12 +968,12 @@ datasets: std_bt_clear_ir97: name: std_bt_clear_ir97 - resolution: 32000 wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#44#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 9.7um (clear pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -1016,12 +982,12 @@ datasets: std_bt_cloudy_ir97: name: std_bt_cloudy_ir97 - resolution: 32000 wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#45#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 9.7um (cloudy pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -1030,12 +996,12 @@ datasets: std_bt_all_ir105: name: std_bt_all_ir105 - resolution: 32000 wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#49#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 10.5um (all pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -1044,12 +1010,12 @@ datasets: std_bt_clear_ir105: name: std_bt_clear_ir105 - resolution: 32000 wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#50#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 10.5um (clear pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -1058,12 +1024,12 @@ datasets: std_bt_cloudy_ir105: name: std_bt_cloudy_ir105 - resolution: 32000 wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#51#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 10.5um (cloudy pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -1072,12 +1038,12 @@ datasets: std_bt_all_ir123: name: std_bt_all_ir123 - resolution: 32000 wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#55#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 12.3um (all pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -1086,12 +1052,12 @@ datasets: std_bt_clear_ir123: name: std_bt_clear_ir123 - resolution: 32000 wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#56#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 12.3um (clear pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -1100,12 +1066,12 @@ datasets: std_bt_cloudy_ir123: name: std_bt_cloudy_ir123 - resolution: 32000 wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#57#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 12.3um (cloudy pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -1114,12 +1080,12 @@ datasets: std_bt_all_ir133: name: std_bt_all_ir133 - resolution: 32000 wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#61#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 13.3um (all pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -1128,12 +1094,12 @@ datasets: std_bt_clear_ir133: name: std_bt_clear_ir133 - resolution: 32000 wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#62#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 13.3um (clear pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: @@ -1142,16 +1108,14 @@ datasets: std_bt_cloudy_ir133: name: std_bt_cloudy_ir133 - resolution: 32000 wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#63#brightnessTemperature->firstOrderStatisticalValue' long_name: TOA Brightness Temperature standard deviation at 13.3um (cloudy pixels) - standard_name: toa_brightess_temperature standard_error + standard_name: toa_brightess_temperature + cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 coordinates: - longitude - latitude - - diff --git a/satpy/readers/eum_l2_bufr.py b/satpy/readers/eum_l2_bufr.py index 8f6b08734b..66eb8b4801 100644 --- a/satpy/readers/eum_l2_bufr.py +++ b/satpy/readers/eum_l2_bufr.py @@ -30,12 +30,12 @@ import numpy as np import xarray as xr -from satpy import CHUNK_SIZE from satpy.readers._geos_area import get_geos_area_naming from satpy.readers.eum_base import get_service_mode, recarray2dict from satpy.readers.file_handlers import BaseFileHandler from satpy.readers.seviri_base import mpef_product_header from satpy.resample import get_area_def +from satpy.utils import get_legacy_chunk_size try: import eccodes as ec @@ -45,6 +45,10 @@ logger = logging.getLogger('EumetsatL2Bufr') +CHUNK_SIZE = get_legacy_chunk_size() + +SSP_DEFAULT = 0.0 + data_center_dict = {55: {'ssp': 'E0415', 'name': 'MSG1'}, 56: {'ssp': 'E0455', 'name': 'MSG2'}, 57: {'ssp': 'E0095', 'name': 'MSG3'}, 70: {'ssp': 'E0000', 'name': 'MSG4'}, 71: {'ssp': 'E0000', 'name': 'MTGi1'}} @@ -52,7 +56,8 @@ seg_size_dict = {'seviri_l2_bufr_asr': 16, 'seviri_l2_bufr_cla': 16, 'seviri_l2_bufr_csr': 16, 'seviri_l2_bufr_gii': 3, 'seviri_l2_bufr_thu': 16, 'seviri_l2_bufr_toz': 3, - 'fci_l2_bufr_asr': 16, 'fci_l2_bufr_amv':0} + 'seviri_l2_bufr_amv': None, + 'fci_l2_bufr_asr': 32, 'fci_l2_bufr_amv': None} class EumetsatL2BufrFileHandler(BaseFileHandler): @@ -94,20 +99,33 @@ def __init__(self, filename, filename_info, filetype_info, with_area_definition= self.bufr_header = self._read_mpef_header() else: # Product was retrieved from the EUMETSAT Data Center - timeStr = self.get_attribute('typicalDate')+self.get_attribute('typicalTime') - buf_start_time = datetime.strptime(timeStr, "%Y%m%d%H%M%S") - sc_id = self.get_attribute('satelliteIdentifier') + # get all attributes in one call + attr = self.get_attributes(['typicalDate', 'typicalTime', 'satelliteIdentifier']) + + timeStr = attr['typicalDate']+attr['typicalTime'] + sc_id = attr['satelliteIdentifier'] self.bufr_header = {} - self.bufr_header['NominalTime'] = buf_start_time + self.bufr_header['NominalTime'] = datetime.strptime(timeStr, "%Y%m%d%H%M%S") self.bufr_header['SpacecraftName'] = data_center_dict[sc_id]['name'] self.bufr_header['RectificationLongitude'] = data_center_dict[sc_id]['ssp'] if rectification_longitude != 'default': self.bufr_header['RectificationLongitude'] = f'E{int(rectification_longitude * 10):04d}' - self.with_adef = with_area_definition self.filetype = filetype_info['file_type'] self.seg_size = seg_size_dict[self.filetype] + if self.seg_size: + # make this keyword not usable for non-grided products + self.with_adef = with_area_definition + attr = self.get_attributes(['segmentSizeAtNadirInXDirection']) + self.resolution = attr['segmentSizeAtNadirInXDirection'] + # Note: There a difference between resolution and seg_size as from the seg_size_dict + # in the bufr files segmentSizeAtNadirInXDirection is encoded in meters so it's indeed + # the physical size of the segment while seg_size is the number of pixel lines / cols + # but because FCI pixel size is 1km they look very similar, modulo 1000 + else: + self.with_adef = None + self.resolution = None @property def start_time(self): @@ -158,19 +176,31 @@ def _read_mpef_header(self): hdr = np.fromfile(self.filename, mpef_product_header, 1) return recarray2dict(hdr) - def get_attribute(self, key): + def get_attributes(self, keys): """Get BUFR attributes.""" # This function is inefficient as it is looping through the entire # file to get 1 attribute. It causes a problem though if you break # from the file early - dont know why but investigating - fix later fh = open(self.filename, "rb") + + # initialize output + attr = {} + for k in keys: + attr[k] = None + while True: # get handle for message bufr = ec.codes_bufr_new_from_file(fh) if bufr is None: break ec.codes_set(bufr, 'unpack', 1) - attr = ec.codes_get(bufr, key) + for k in keys: + try: + value = ec.codes_get(bufr, k) + attr[k] = value + except BaseException: + logging.warning(f'Failed to read key {k} from message') + ec.codes_release(bufr) fh.close() @@ -187,13 +217,37 @@ def get_array(self, key): ec.codes_set(bufr, 'unpack', 1) + # Introduced fix for cases where all values in the expected array are the same + # (in particular fill values) which causes the eccodes to encode them and return + # them as a single value + # if is the first message initialise our final array if (msgCount == 0): - arr = da.from_array(ec.codes_get_array( - bufr, key, float), chunks=CHUNK_SIZE) + arr = da.from_array(ec.codes_get_array(bufr, key, float), chunks=CHUNK_SIZE) + + if (arr.size == 1): + # get the correct size from latitude key + lat = da.from_array(ec.codes_get_array(bufr, '#1#latitude', float), chunks=CHUNK_SIZE) + value = arr.compute()[0] + # print('Warning: BUFR message size mismatch') + # print(f'Expected: {lat.size} Decoded: {arr.size} value {arr[0]}') + # duplicate the lat object and set all elements to the correct value + arr = lat + arr[:] = value + else: - tmpArr = da.from_array(ec.codes_get_array( - bufr, key, float), chunks=CHUNK_SIZE) + tmpArr = da.from_array(ec.codes_get_array(bufr, key, float), chunks=CHUNK_SIZE) + + if (tmpArr.size == 1): + # get the correct size from latitude key + lat = da.from_array(ec.codes_get_array(bufr, '#1#latitude', float), chunks=CHUNK_SIZE) + value = tmpArr.compute()[0] + # print('Warning: BUFR message size mismatch') + # print(f'Expected: {lat.size} Decoded: {tmpArr.size} value {arr[0]}') + # duplicate the lat object and set all elements to the correct value + tmpArr = lat + tmpArr[:] = value + arr = da.concatenate((arr, tmpArr)) msgCount = msgCount+1 @@ -225,7 +279,6 @@ def get_dataset(self, dataset_id, dataset_info): xarr = xarr.where(xarr != dataset_info['fill_value']) self._add_attributes(xarr, dataset_info) - return xarr def get_dataset_with_area_def(self, arr, dataset_id): @@ -235,7 +288,6 @@ def get_dataset_with_area_def(self, arr, dataset_id): xarr = xr.DataArray(arr, dims=["y"]) else: lons_1d, lats_1d, data_1d = da.compute(self.longitude, self.latitude, arr) - self._area_def = self._construct_area_def(dataset_id) icol, irow = self._area_def.get_array_indices_from_lonlat(lons_1d, lats_1d) @@ -260,11 +312,9 @@ def _construct_area_def(self, dataset_id): AreaDefinition: A pyresample AreaDefinition object containing the area definition. """ - res = dataset_id['resolution'] - area_naming_input_dict = {'platform_name': self.platform_name[:3].lower(), 'instrument_name': self.sensor_name, - 'resolution': res, + 'resolution': self.resolution, } area_naming = get_geos_area_naming({**area_naming_input_dict, From 2296fbad26dd548da6a2a957d5daf4f5139ca523 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Fri, 27 Oct 2023 17:09:13 +0200 Subject: [PATCH 10/41] Use ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS environment variable and adapt code to handle all variables being returned as arrays --- satpy/readers/eum_l2_bufr.py | 58 ++++++++++--------- ..._seviri_l2_bufr.py => test_eum_l2_bufr.py} | 0 2 files changed, 31 insertions(+), 27 deletions(-) rename satpy/tests/reader_tests/{test_seviri_l2_bufr.py => test_eum_l2_bufr.py} (100%) diff --git a/satpy/readers/eum_l2_bufr.py b/satpy/readers/eum_l2_bufr.py index 66eb8b4801..d57a046223 100644 --- a/satpy/readers/eum_l2_bufr.py +++ b/satpy/readers/eum_l2_bufr.py @@ -24,6 +24,7 @@ """ import logging +import os from datetime import datetime import dask.array as da @@ -48,6 +49,7 @@ CHUNK_SIZE = get_legacy_chunk_size() SSP_DEFAULT = 0.0 +BUFR_FILL_VALUE = -1.e+100 data_center_dict = {55: {'ssp': 'E0415', 'name': 'MSG1'}, 56: {'ssp': 'E0455', 'name': 'MSG2'}, 57: {'ssp': 'E0095', 'name': 'MSG3'}, 70: {'ssp': 'E0000', 'name': 'MSG4'}, @@ -59,6 +61,9 @@ 'seviri_l2_bufr_amv': None, 'fci_l2_bufr_asr': 32, 'fci_l2_bufr_amv': None} +# Need to set this in order to get consistent array sizes from eccodes +os.environ['ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS'] = "1" + class EumetsatL2BufrFileHandler(BaseFileHandler): """File handler for EUMETSAT SEVIRI and FCI L2 BUFR products. @@ -100,10 +105,16 @@ def __init__(self, filename, filename_info, filetype_info, with_area_definition= else: # Product was retrieved from the EUMETSAT Data Center # get all attributes in one call - attr = self.get_attributes(['typicalDate', 'typicalTime', 'satelliteIdentifier']) - + attr = self.get_attributes(['typicalDate', 'typicalTime']) timeStr = attr['typicalDate']+attr['typicalTime'] - sc_id = attr['satelliteIdentifier'] + + darr = self.get_array('satelliteIdentifier') + arr = da.where(darr != BUFR_FILL_VALUE, darr, darr).compute() + if (arr.ndim > 0): + sc_id = int(arr[0]) + else: + sc_id = int(arr) + self.bufr_header = {} self.bufr_header['NominalTime'] = datetime.strptime(timeStr, "%Y%m%d%H%M%S") self.bufr_header['SpacecraftName'] = data_center_dict[sc_id]['name'] @@ -117,14 +128,24 @@ def __init__(self, filename, filename_info, filetype_info, with_area_definition= if self.seg_size: # make this keyword not usable for non-grided products self.with_adef = with_area_definition - attr = self.get_attributes(['segmentSizeAtNadirInXDirection']) - self.resolution = attr['segmentSizeAtNadirInXDirection'] + + darr = self.get_array('segmentSizeAtNadirInXDirection') + # This key may not exists in some files + # This is specifically a "dirty" fox for the unit tests because the template used doesn't + # contain that key so initializing the object would fail without thic check + # but 'real' EUM BUFR files shall all have it + if darr is None: + self.resolution = None + else: + arr = da.where(darr != BUFR_FILL_VALUE, darr, darr).compute() + self.resolution = arr[0] + # Note: There a difference between resolution and seg_size as from the seg_size_dict # in the bufr files segmentSizeAtNadirInXDirection is encoded in meters so it's indeed # the physical size of the segment while seg_size is the number of pixel lines / cols # but because FCI pixel size is 1km they look very similar, modulo 1000 else: - self.with_adef = None + self.with_adef = False self.resolution = None @property @@ -217,6 +238,10 @@ def get_array(self, key): ec.codes_set(bufr, 'unpack', 1) + if not ec.codes_is_defined(bufr, key): + logging.warning(f'Key: {key} does not exist in BUFR file') + return None + # Introduced fix for cases where all values in the expected array are the same # (in particular fill values) which causes the eccodes to encode them and return # them as a single value @@ -225,29 +250,8 @@ def get_array(self, key): if (msgCount == 0): arr = da.from_array(ec.codes_get_array(bufr, key, float), chunks=CHUNK_SIZE) - if (arr.size == 1): - # get the correct size from latitude key - lat = da.from_array(ec.codes_get_array(bufr, '#1#latitude', float), chunks=CHUNK_SIZE) - value = arr.compute()[0] - # print('Warning: BUFR message size mismatch') - # print(f'Expected: {lat.size} Decoded: {arr.size} value {arr[0]}') - # duplicate the lat object and set all elements to the correct value - arr = lat - arr[:] = value - else: tmpArr = da.from_array(ec.codes_get_array(bufr, key, float), chunks=CHUNK_SIZE) - - if (tmpArr.size == 1): - # get the correct size from latitude key - lat = da.from_array(ec.codes_get_array(bufr, '#1#latitude', float), chunks=CHUNK_SIZE) - value = tmpArr.compute()[0] - # print('Warning: BUFR message size mismatch') - # print(f'Expected: {lat.size} Decoded: {tmpArr.size} value {arr[0]}') - # duplicate the lat object and set all elements to the correct value - tmpArr = lat - tmpArr[:] = value - arr = da.concatenate((arr, tmpArr)) msgCount = msgCount+1 diff --git a/satpy/tests/reader_tests/test_seviri_l2_bufr.py b/satpy/tests/reader_tests/test_eum_l2_bufr.py similarity index 100% rename from satpy/tests/reader_tests/test_seviri_l2_bufr.py rename to satpy/tests/reader_tests/test_eum_l2_bufr.py From 59604d53854cc2d34092e3be5cbc8ade8e2f8256 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Fri, 27 Oct 2023 17:48:56 +0200 Subject: [PATCH 11/41] Change to make the test generic for all EUM L2 BUFR products --- satpy/tests/reader_tests/test_eum_l2_bufr.py | 277 ++++++++++++------- 1 file changed, 173 insertions(+), 104 deletions(-) diff --git a/satpy/tests/reader_tests/test_eum_l2_bufr.py b/satpy/tests/reader_tests/test_eum_l2_bufr.py index c45271bbdc..77df4108b7 100644 --- a/satpy/tests/reader_tests/test_eum_l2_bufr.py +++ b/satpy/tests/reader_tests/test_eum_l2_bufr.py @@ -17,6 +17,7 @@ # satpy. If not, see . """Unittesting the SEVIRI L2 BUFR reader.""" +import os import sys import unittest from datetime import datetime @@ -29,58 +30,19 @@ from satpy.tests.utils import make_dataid -FILETYPE_INFO = {'file_type': 'seviri_l2_bufr_asr'} - -FILENAME_INFO = {'start_time': '20191112000000', - 'spacecraft': 'MSG2'} -FILENAME_INFO2 = {'start_time': '20191112000000', - 'spacecraft': 'MSG2', - 'server': 'TESTSERVER'} -MPEF_PRODUCT_HEADER = { - 'NominalTime': datetime(2019, 11, 6, 18, 0), - 'SpacecraftName': '09', - 'RectificationLongitude': 'E0455' -} - -DATASET_INFO = { - 'name': 'testdata', - 'key': '#1#brightnessTemperature', - 'coordinates': ('longitude', 'latitude'), - 'fill_value': 0 -} - -DATASET_INFO_LAT = { - 'name': 'latitude', - 'key': '#1#latitude', - 'fill_value': -1.e+100 -} - -DATASET_INFO_LON = { - 'name': 'longitude', - 'key': '#1#longitude', - 'fill_value': -1.e+100 -} - - -DATASET_ATTRS = { - 'platform_name': 'MSG1', - 'ssp_lon': 41.5, - 'seg_size': 16 -} - -AREA_DEF = geometry.AreaDefinition( +AREA_DEF_MSG_IODC = geometry.AreaDefinition( 'msg_seviri_iodc_48km', 'MSG SEVIRI Indian Ocean Data Coverage service area definition with 48 km resolution', "", - {'a': 6378169., 'b': 6356583.8, 'lon_0': DATASET_ATTRS['ssp_lon'], + {'a': 6378169., 'b': 6356583.8, 'lon_0': 45.5, 'h': 35785831., 'proj': 'geos', 'units': 'm'}, 232, 232, - (-5570248.6867, -5567248.2834, 5567248.2834, 5570248.6867) + (-5570248.686685662, -5567248.28340708, 5567248.28340708, 5570248.686685662) ) -AREA_DEF_FES = geometry.AreaDefinition( - 'msg_seviri_res_48km', +AREA_DEF_MSG_FES = geometry.AreaDefinition( + 'msg_seviri_fes_48km', 'MSG SEVIRI Full Earth Scanning service area definition with 48 km resolution', "", {'a': 6378169., 'b': 6356583.8, 'lon_0': 0.0, @@ -90,31 +52,107 @@ (-5570248.6867, -5567248.2834, 5567248.2834, 5570248.6867) ) -AREA_DEF_EXT = geometry.AreaDefinition( +AREA_DEF_MSG_IODC_EXT = geometry.AreaDefinition( 'msg_seviri_iodc_9km_ext', 'MSG SEVIRI Indian Ocean Data Coverage service area definition with 9 km resolution ' '(extended outside original 3km grid)', "", - {'a': 6378169., 'b': 6356583.8, 'lon_0': DATASET_ATTRS['ssp_lon'], + {'a': 6378169., 'b': 6356583.8, 'lon_0': 45.5, 'h': 35785831., 'proj': 'geos', 'units': 'm'}, 1238, 1238, (-5571748.8883, -5571748.8882, 5571748.8882, 5571748.8883) ) -TEST_FILES = [ - 'ASRBUFRProd_20191106130000Z_00_OMPEFS02_MET09_FES_E0000', - 'MSG2-SEVI-MSGASRE-0101-0101-20191106130000.000000000Z-20191106131702-1362128.bfr', - 'MSG2-SEVI-MSGASRE-0101-0101-20191106101500.000000000Z-20191106103218-1362148' -] +AREA_DEF_FCI_FES = geometry.AreaDefinition( + 'mtg_fci_fdss_32km', + 'MTG FCI Full Disk Scanning Service area definition with 32 km SSP resolution', + "", + {'x_0': 0, 'y_0': 0, 'ellps': 'WGS84', 'lon_0': 0.0, + 'h': 35786400., 'proj': 'geos', 'units': 'm'}, + 348, + 348, + (-5567999.998550739, -5567999.998550739, 5567999.994203017, 5567999.994203017) +) + + +AREA_DEF_MSG_FES_3km_ext = geometry.AreaDefinition( + 'msg_seviri_fes_9km_ext', + 'MSG SEVIRI Full Earth Scanning service area definition with 9 km resolution', + "", + {'a': 6378169., 'b': 6356583.8, 'lon_0': 0.0, + 'h': 35785831., 'proj': 'geos', 'units': 'm'}, + 1238, + 1238, + (-5571748.888268564, -5571748.888155806, 5571748.888155806, 5571748.888268564) +) -# Test data +# Test data for mock file DATA = np.random.uniform(low=250, high=350, size=(128,)) LAT = np.random.uniform(low=-80, high=80, size=(128,)) LON = np.random.uniform(low=-38.5, high=121.5, size=(128,)) - -class SeviriL2BufrData: +os.environ['ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS'] = "1" + +# Test cases dictionaries +TEST_DATA = {'GIIBUFRProduct_20231027140000Z_00_OMPEFS03_MET10_FES_E0000': { + 'platform_name': 'MSG3', + 'spacecraft_number': '10', + 'RectificationLongitude': 'E0000', + 'ssp_lon': 0.0, + 'area': AREA_DEF_MSG_FES_3km_ext, + 'seg_size': 3, + 'file_type': 'seviri_l2_bufr_gii', + 'key': '#1#brightnessTemperature', + 'resolution': 9000}, + 'ASRBUFRProd_20231022224500Z_00_OMPEFS03_MET10_FES_E0000': { + 'platform_name': 'MSG3', + 'spacecraft_number': '10', + 'RectificationLongitude': 'E0000', + 'ssp_lon': 0.0, + 'area': AREA_DEF_MSG_FES, + 'seg_size': 16, + 'file_type': 'seviri_l2_bufr_asr', + 'key': '#1#brightnessTemperature', + 'resolution': 48000}, + 'ASRBUFRProd_20231023044500Z_00_OMPEFS02_MET09_FES_E0455': { + 'platform_name': 'MSG2', + 'spacecraft_number': '9', + 'RectificationLongitude': 'E0455', + 'area': AREA_DEF_MSG_IODC, + 'ssp_lon': 45.5, + 'seg_size': 16, + 'file_type': 'seviri_l2_bufr_asr', + 'key': '#1#brightnessTemperature', + 'resolution': 48000}, + 'MSG2-SEVI-MSGASRE-0101-0101-20191106130000.000000000Z-20191106131702-1362128.bfr': { + 'platform_name': 'MSG2', + 'spacecraft_number': '9', + 'RectificationLongitude': 'E0455', + 'area': AREA_DEF_MSG_IODC, + 'ssp_lon': 45.5, + 'seg_size': 16, + 'file_type': 'seviri_l2_bufr_asr', + 'key': '#1#brightnessTemperature', + 'resolution': 48000}, + 'W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-2-ASR--FD------BUFR_C_EUMT_20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin': { + 'platform_name': 'MTGi1', + 'spacecraft_number': '24', + 'RectificationLongitude': 'E0000', + 'area': AREA_DEF_FCI_FES, + 'ssp_lon': 0.0, + 'seg_size': 32, + 'file_type': 'fci_l2_bufr_asr', + 'key': '#1#brightnessTemperature', + 'resolution': 32000} + } + +TEST_FILES = [] +for name, _dict_ in TEST_DATA.items(): + TEST_FILES.append(name) + + +class L2BufrData: """Mock SEVIRI L2 BUFR data.""" @unittest.skipIf(sys.platform.startswith('win'), "'eccodes' not supported on Windows") @@ -127,24 +165,35 @@ def __init__(self, filename, with_adef=False, rect_lon='default'): ec.codes_set(self.buf1, 'unpack', 1) # write the bufr test data twice as we want to read in and then concatenate the data in the reader # 55 id corresponds to METEOSAT 8` - ec.codes_set(self.buf1, 'satelliteIdentifier', 56) + ec.codes_set(self.buf1, 'satelliteIdentifier', 47 + int(TEST_DATA[filename]['spacecraft_number'])) ec.codes_set_array(self.buf1, '#1#latitude', LAT) ec.codes_set_array(self.buf1, '#1#latitude', LAT) ec.codes_set_array(self.buf1, '#1#longitude', LON) ec.codes_set_array(self.buf1, '#1#longitude', LON) ec.codes_set_array(self.buf1, '#1#brightnessTemperature', DATA) - ec.codes_set_array(self.buf1, '#1#brightnessTemperature', DATA) self.m = mock.mock_open() + + FILETYPE_INFO = {'file_type': TEST_DATA[filename]['file_type']} + # only our offline product contain MPEF product headers so we get the metadata from there if ('BUFRProd' in filename): with mock.patch('satpy.readers.eum_l2_bufr.np.fromfile') as fromfile: + + MPEF_PRODUCT_HEADER = { + 'NominalTime': datetime(2019, 11, 6, 18, 0), + 'SpacecraftName': TEST_DATA[filename]['spacecraft_number'], + 'RectificationLongitude': TEST_DATA[filename]['RectificationLongitude'] + } fromfile.return_value = MPEF_PRODUCT_HEADER with mock.patch('satpy.readers.eum_l2_bufr.recarray2dict') as recarray2dict: recarray2dict.side_effect = (lambda x: x) - self.fh = EumetsatL2BufrFileHandler(filename, FILENAME_INFO2, FILETYPE_INFO, - with_area_definition=with_adef, - rectification_longitude=rect_lon) + + FILENAME_INFO = {'start_time': '20231022224500', 'spacecraft': TEST_DATA[filename]['platform_name'], + 'server': 'TESTSERVER'} + self.fh = EumetsatL2BufrFileHandler(filename, FILENAME_INFO, FILETYPE_INFO, + with_area_definition=with_adef, + rectification_longitude=int(TEST_DATA[filename]['RectificationLongitude'][1:])/10) self.fh.mpef_header = MPEF_PRODUCT_HEADER else: @@ -157,12 +206,26 @@ def __init__(self, filename, with_adef=False, rect_lon='default'): ec2.return_value = 1 with mock.patch('eccodes.codes_release') as ec5: ec5.return_value = 1 + + FILENAME_INFO = {'start_time': '20191112000000', 'spacecraft': TEST_DATA[filename]['platform_name']} self.fh = EumetsatL2BufrFileHandler(filename, FILENAME_INFO, FILETYPE_INFO, - with_area_definition=with_adef, - rectification_longitude=rect_lon) + with_area_definition=with_adef, + rectification_longitude=int(TEST_DATA[filename]['RectificationLongitude'][1:])/10) - def get_data(self, dataset_info): + # Force resolution propertie in the file handler because the mock template doesn't have the + # segmentSizeAtNadirInXDirection key so it can't be initialized the normal way + self.fh.resolution = TEST_DATA[filename]['resolution'] + + def get_data(self, dataset_name, key, coordinates): """Read data from mock file.""" + DATASET_INFO = { + 'name': dataset_name, + 'key': key, + 'fill_value': -1.e+100 + } + if coordinates: + DATASET_INFO.update({'coordinates': ('longitude', 'latitude')}) + with mock.patch('satpy.readers.eum_l2_bufr.open', self.m, create=True): with mock.patch('eccodes.codes_bufr_new_from_file', side_effect=[self.buf1, self.buf1, None]) as ec1: @@ -171,65 +234,70 @@ def get_data(self, dataset_info): ec2.return_value = 1 with mock.patch('eccodes.codes_release') as ec5: ec5.return_value = 1 - z = self.fh.get_dataset(make_dataid(name=dataset_info['name'], resolution=48000), dataset_info) + z = self.fh.get_dataset(make_dataid(name = dataset_name, resolution = self.fh.resolution), DATASET_INFO) return z @pytest.mark.parametrize("input_file", TEST_FILES) -class TestSeviriL2BufrReader: +class TestL2BufrReader: """Test SEVIRI L2 BUFR Reader.""" @staticmethod def test_lonslats(input_file): + print(input_file) """Test reading of longitude and latitude data with SEVIRI L2 BUFR reader.""" - bufr_obj = SeviriL2BufrData(input_file) - zlat = bufr_obj.get_data(DATASET_INFO_LAT) - zlon = bufr_obj.get_data(DATASET_INFO_LON) + bufr_obj = L2BufrData(input_file) + print('get zlat') + zlat = bufr_obj.get_data('latitude', '#1#latitude', coordinates=False) + print(zlat) + zlon = bufr_obj.get_data('longitude', '#1#longitude', coordinates=False) np.testing.assert_array_equal(zlat.values, np.concatenate((LAT, LAT), axis=0)) np.testing.assert_array_equal(zlon.values, np.concatenate((LON, LON), axis=0)) @staticmethod def test_attributes_with_swath_definition(input_file): """Test correctness of dataset attributes with data loaded with a SwathDefinition (default behaviour).""" - bufr_obj = SeviriL2BufrData(input_file) - z = bufr_obj.get_data(DATASET_INFO) - assert z.attrs['platform_name'] == DATASET_ATTRS['platform_name'] - assert z.attrs['ssp_lon'] == DATASET_ATTRS['ssp_lon'] - assert z.attrs['seg_size'] == DATASET_ATTRS['seg_size'] + bufr_obj = L2BufrData(input_file) + z = bufr_obj.get_data(dataset_name='TestData', key=TEST_DATA[input_file]['key'], coordinates=True) + assert z.attrs['platform_name'] == TEST_DATA[input_file]['platform_name'] + assert z.attrs['ssp_lon'] == TEST_DATA[input_file]['ssp_lon'] + assert z.attrs['seg_size'] == TEST_DATA[input_file]['seg_size'] @staticmethod def test_attributes_with_area_definition(input_file): """Test correctness of dataset attributes with data loaded with a AreaDefinition.""" - bufr_obj = SeviriL2BufrData(input_file, with_adef=True) - _ = bufr_obj.get_data(DATASET_INFO_LAT) # We need to load the lat/lon data in order to - _ = bufr_obj.get_data(DATASET_INFO_LON) # populate the file handler with these data - z = bufr_obj.get_data(DATASET_INFO) - assert z.attrs['platform_name'] == DATASET_ATTRS['platform_name'] - assert z.attrs['ssp_lon'] == DATASET_ATTRS['ssp_lon'] - assert z.attrs['seg_size'] == DATASET_ATTRS['seg_size'] + bufr_obj = L2BufrData(input_file, with_adef=True) + _ = bufr_obj.get_data('latitude', '#1#latitude', coordinates=False) # We need to load the lat/lon data in order to + _ = bufr_obj.get_data('longitude', '#1#longitude', coordinates=False) # populate the file handler with these data + + z = bufr_obj.get_data(dataset_name='TestData', key=TEST_DATA[input_file]['key'], coordinates=True) + assert z.attrs['platform_name'] == TEST_DATA[input_file]['platform_name'] + assert z.attrs['ssp_lon'] == TEST_DATA[input_file]['ssp_lon'] + assert z.attrs['seg_size'] == TEST_DATA[input_file]['seg_size'] @staticmethod def test_data_with_swath_definition(input_file): """Test data loaded with SwathDefinition (default behaviour).""" - bufr_obj = SeviriL2BufrData(input_file) + bufr_obj = L2BufrData(input_file) with pytest.raises(NotImplementedError): bufr_obj.fh.get_area_def(None) # concatenate original test arrays as get_dataset will have read and concatented the data x1 = np.concatenate((DATA, DATA), axis=0) - z = bufr_obj.get_data(DATASET_INFO) + z = bufr_obj.get_data(dataset_name='TestData', key=TEST_DATA[input_file]['key'], coordinates=True) np.testing.assert_array_equal(z.values, x1) def test_data_with_area_definition(self, input_file): """Test data loaded with AreaDefinition.""" - bufr_obj = SeviriL2BufrData(input_file, with_adef=True) - _ = bufr_obj.get_data(DATASET_INFO_LAT) # We need to load the lat/lon data in order to - _ = bufr_obj.get_data(DATASET_INFO_LON) # populate the file handler with these data - z = bufr_obj.get_data(DATASET_INFO) + bufr_obj = L2BufrData(input_file, with_adef=True) + _ = bufr_obj.get_data('latitude', '#1#latitude', coordinates=False) # We need to load the lat/lon data in order to + _ = bufr_obj.get_data('longitude', '#1#longitude', coordinates=False) # populate the file handler with these data + + z = bufr_obj.get_data(dataset_name='TestData', key=TEST_DATA[input_file]['key'], coordinates=True) ad = bufr_obj.fh.get_area_def(None) - assert ad == AREA_DEF + assert ad == TEST_DATA[input_file]['area'] data_1d = np.concatenate((DATA, DATA), axis=0) # Put BUFR data on 2D grid that the 2D array returned by get_dataset should correspond to @@ -241,42 +309,43 @@ def test_data_with_area_definition(self, input_file): data_2d[irow.compressed(), icol.compressed()] = data_1d[~irow.mask] np.testing.assert_array_equal(z.values, data_2d) - # Test that the correct AreaDefinition is identified for products with 3 pixel segements - bufr_obj.fh.seg_size = 3 - ad_ext = bufr_obj.fh._construct_area_def(make_dataid(name='dummmy', resolution=9000)) - assert ad_ext == AREA_DEF_EXT + # Removed assert dedicated to products with seg_size=3 (covered by GII test case) def test_data_with_rect_lon(self, input_file): """Test data loaded with AreaDefinition and user defined rectification longitude.""" - bufr_obj = SeviriL2BufrData(input_file, with_adef=True, rect_lon=0.0) - np.testing.assert_equal(bufr_obj.fh.ssp_lon, 0.0) - _ = bufr_obj.get_data(DATASET_INFO_LAT) # We need to load the lat/lon data in order to - _ = bufr_obj.get_data(DATASET_INFO_LON) # populate the file handler with these data - _ = bufr_obj.get_data(DATASET_INFO) # We need to lead the data in order to create the AreaDefinition + bufr_obj = L2BufrData(input_file, with_adef=True) + np.testing.assert_equal(bufr_obj.fh.ssp_lon, int(TEST_DATA[input_file]['RectificationLongitude'][1:])/10) + _ = bufr_obj.get_data('latitude', '#1#latitude', coordinates=False) # We need to load the lat/lon data in order to + _ = bufr_obj.get_data('longitude', '#1#longitude', coordinates=False) # populate the file handler with these data + _ = bufr_obj.get_data(dataset_name='TestData', key=TEST_DATA[input_file]['key'], coordinates=True) + # We need to lead the data in order to create the AreaDefinition ad = bufr_obj.fh.get_area_def(None) - assert ad == AREA_DEF_FES + assert ad == TEST_DATA[input_file]['area'] -class SeviriL2AMVBufrData: +class AMVBufrData: """Mock SEVIRI L2 AMV BUFR data.""" @unittest.skipIf(sys.platform.startswith('win'), "'eccodes' not supported on Windows") def __init__(self, filename): """Initialize by mocking test data for testing the SEVIRI L2 BUFR reader.""" - from satpy.readers.seviri_l2_bufr import SeviriL2BufrFileHandler + from satpy.readers.eum_l2_bufr import EumetsatL2BufrFileHandler - with mock.patch('satpy.readers.seviri_l2_bufr.np.fromfile'): - self.fh = SeviriL2BufrFileHandler(filename, FILENAME_INFO2, - filetype_info={'file_type': 'seviri_l2_bufr_amv'}, - with_area_definition=True) + with mock.patch('satpy.readers.eum_l2_bufr.np.fromfile'): + FILENAME_INFO = {'start_time': '20191112000000', + 'spacecraft': 'MSG3', + 'server': 'TESTSERVER'} + self.fh = EumetsatL2BufrFileHandler(filename, FILENAME_INFO, + filetype_info={'file_type': 'seviri_l2_bufr_amv'}, + with_area_definition=True) -class TestSeviriL2AMVBufrReader: +class TestAMVBufrReader: """Test SEVIRI L2 BUFR Reader for AMV data.""" @staticmethod def test_amv_with_area_def(): """Test that AMV data can not be loaded with an area definition.""" - bufr_obj = SeviriL2AMVBufrData('AMVBUFRProd_20201110124500Z_00_OMPEFS04_MET11_FES_E0000') + bufr_obj = AMVBufrData('AMVBUFRProd_20231023044500Z_00_OMPEFS03_MET10_FES_E0000') assert bufr_obj.fh.with_adef is False From a5fadced8c6941a62eccae633b1b863e1b7d70bc Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Mon, 4 Dec 2023 16:07:45 +0100 Subject: [PATCH 12/41] Changes following first MR review --- satpy/readers/eum_l2_bufr.py | 57 +++++++++----------- satpy/tests/reader_tests/test_eum_l2_bufr.py | 51 ++++++++++++------ 2 files changed, 59 insertions(+), 49 deletions(-) diff --git a/satpy/readers/eum_l2_bufr.py b/satpy/readers/eum_l2_bufr.py index d57a046223..fd93f2b599 100644 --- a/satpy/readers/eum_l2_bufr.py +++ b/satpy/readers/eum_l2_bufr.py @@ -55,12 +55,24 @@ 57: {'ssp': 'E0095', 'name': 'MSG3'}, 70: {'ssp': 'E0000', 'name': 'MSG4'}, 71: {'ssp': 'E0000', 'name': 'MTGi1'}} +# This is the size number of pixels making a segment seg_size_dict = {'seviri_l2_bufr_asr': 16, 'seviri_l2_bufr_cla': 16, 'seviri_l2_bufr_csr': 16, 'seviri_l2_bufr_gii': 3, 'seviri_l2_bufr_thu': 16, 'seviri_l2_bufr_toz': 3, 'seviri_l2_bufr_amv': None, 'fci_l2_bufr_asr': 32, 'fci_l2_bufr_amv': None} +# This is the physical size of the segment, in meters +resolution_dict = {'seviri_l2_bufr_asr': 48000, 'seviri_l2_bufr_cla': 48000, + 'seviri_l2_bufr_csr': 48000, 'seviri_l2_bufr_gii': 9000, + 'seviri_l2_bufr_thu': 48000, 'seviri_l2_bufr_toz': 9000, + 'seviri_l2_bufr_amv': None, + 'fci_l2_bufr_asr': 32000, 'fci_l2_bufr_amv': None} + +# List of variables that are returned by eccodes as array, but we want as single value +deprecate_to_single_value = ['satelliteIdentifier'] + + # Need to set this in order to get consistent array sizes from eccodes os.environ['ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS'] = "1" @@ -105,15 +117,9 @@ def __init__(self, filename, filename_info, filetype_info, with_area_definition= else: # Product was retrieved from the EUMETSAT Data Center # get all attributes in one call - attr = self.get_attributes(['typicalDate', 'typicalTime']) + attr = self.get_attributes(['typicalDate', 'typicalTime','satelliteIdentifier']) timeStr = attr['typicalDate']+attr['typicalTime'] - - darr = self.get_array('satelliteIdentifier') - arr = da.where(darr != BUFR_FILL_VALUE, darr, darr).compute() - if (arr.ndim > 0): - sc_id = int(arr[0]) - else: - sc_id = int(arr) + sc_id = int( attr['satelliteIdentifier']) self.bufr_header = {} self.bufr_header['NominalTime'] = datetime.strptime(timeStr, "%Y%m%d%H%M%S") @@ -128,22 +134,7 @@ def __init__(self, filename, filename_info, filetype_info, with_area_definition= if self.seg_size: # make this keyword not usable for non-grided products self.with_adef = with_area_definition - - darr = self.get_array('segmentSizeAtNadirInXDirection') - # This key may not exists in some files - # This is specifically a "dirty" fox for the unit tests because the template used doesn't - # contain that key so initializing the object would fail without thic check - # but 'real' EUM BUFR files shall all have it - if darr is None: - self.resolution = None - else: - arr = da.where(darr != BUFR_FILL_VALUE, darr, darr).compute() - self.resolution = arr[0] - - # Note: There a difference between resolution and seg_size as from the seg_size_dict - # in the bufr files segmentSizeAtNadirInXDirection is encoded in meters so it's indeed - # the physical size of the segment while seg_size is the number of pixel lines / cols - # but because FCI pixel size is 1km they look very similar, modulo 1000 + self.resolution = resolution_dict[self.filetype] else: self.with_adef = False self.resolution = None @@ -153,11 +144,6 @@ def start_time(self): """Return the repeat cycle start time.""" return self.bufr_header['NominalTime'] - # @property - # def end_time(self): - # """Return the repeat cycle end time.""" - # return self.start_time + timedelta(minutes=15) - @property def platform_name(self): """Return spacecraft name.""" @@ -205,9 +191,7 @@ def get_attributes(self, keys): fh = open(self.filename, "rb") # initialize output - attr = {} - for k in keys: - attr[k] = None + attr = dict() while True: # get handle for message @@ -217,9 +201,16 @@ def get_attributes(self, keys): ec.codes_set(bufr, 'unpack', 1) for k in keys: try: - value = ec.codes_get(bufr, k) + if k in deprecate_to_single_value: + # Extract satelliteIdentifier single value. The satelliteIdentifier attribute is returned as an + # array becasue the environment variable ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS is set to 1. + value = ec.codes_get_array(bufr, k)[0] + else: + value = ec.codes_get(bufr, k) attr[k] = value + except BaseException: + attr[k] = None logging.warning(f'Failed to read key {k} from message') ec.codes_release(bufr) diff --git a/satpy/tests/reader_tests/test_eum_l2_bufr.py b/satpy/tests/reader_tests/test_eum_l2_bufr.py index 77df4108b7..1d255d519f 100644 --- a/satpy/tests/reader_tests/test_eum_l2_bufr.py +++ b/satpy/tests/reader_tests/test_eum_l2_bufr.py @@ -115,14 +115,14 @@ 'file_type': 'seviri_l2_bufr_asr', 'key': '#1#brightnessTemperature', 'resolution': 48000}, - 'ASRBUFRProd_20231023044500Z_00_OMPEFS02_MET09_FES_E0455': { + 'AMVBUFRProd_20231023044500Z_00_OMPEFS02_MET09_FES_E0455': { 'platform_name': 'MSG2', 'spacecraft_number': '9', 'RectificationLongitude': 'E0455', 'area': AREA_DEF_MSG_IODC, 'ssp_lon': 45.5, - 'seg_size': 16, - 'file_type': 'seviri_l2_bufr_asr', + 'seg_size': None, + 'file_type': 'seviri_l2_bufr_amv', 'key': '#1#brightnessTemperature', 'resolution': 48000}, 'MSG2-SEVI-MSGASRE-0101-0101-20191106130000.000000000Z-20191106131702-1362128.bfr': { @@ -144,20 +144,28 @@ 'seg_size': 32, 'file_type': 'fci_l2_bufr_asr', 'key': '#1#brightnessTemperature', + 'resolution': 32000}, + 'W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-2-AMV--FD------BUFR_C_EUMT_20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin': { + 'platform_name': 'MTGi1', + 'spacecraft_number': '24', + 'RectificationLongitude': 'E0000', + 'area': AREA_DEF_FCI_FES, + 'ssp_lon': 0.0, + 'seg_size': None, + 'file_type': 'fci_l2_bufr_amv', + 'key': '#1#brightnessTemperature', 'resolution': 32000} } -TEST_FILES = [] -for name, _dict_ in TEST_DATA.items(): - TEST_FILES.append(name) +TEST_FILES = list(TEST_DATA.keys()) class L2BufrData: - """Mock SEVIRI L2 BUFR data.""" + """Mock L2 BUFR data.""" @unittest.skipIf(sys.platform.startswith('win'), "'eccodes' not supported on Windows") def __init__(self, filename, with_adef=False, rect_lon='default'): - """Initialize by mocking test data for testing the SEVIRI L2 BUFR reader.""" + """Initialize by mocking test data for testing the L2 BUFR reader.""" import eccodes as ec from satpy.readers.eum_l2_bufr import EumetsatL2BufrFileHandler @@ -167,10 +175,10 @@ def __init__(self, filename, with_adef=False, rect_lon='default'): # 55 id corresponds to METEOSAT 8` ec.codes_set(self.buf1, 'satelliteIdentifier', 47 + int(TEST_DATA[filename]['spacecraft_number'])) ec.codes_set_array(self.buf1, '#1#latitude', LAT) - ec.codes_set_array(self.buf1, '#1#latitude', LAT) + #ec.codes_set_array(self.buf1, '#1#latitude', LAT) ec.codes_set_array(self.buf1, '#1#longitude', LON) - ec.codes_set_array(self.buf1, '#1#longitude', LON) - ec.codes_set_array(self.buf1, '#1#brightnessTemperature', DATA) + # ec.codes_set_array(self.buf1, '#1#longitude', LON) + ec.codes_set_array(self.buf1, TEST_DATA[filename]['key'], DATA) self.m = mock.mock_open() @@ -289,6 +297,10 @@ def test_data_with_swath_definition(input_file): np.testing.assert_array_equal(z.values, x1) def test_data_with_area_definition(self, input_file): + if TEST_DATA[input_file]['seg_size'] is None: + # Skip this test + return + """Test data loaded with AreaDefinition.""" bufr_obj = L2BufrData(input_file, with_adef=True) _ = bufr_obj.get_data('latitude', '#1#latitude', coordinates=False) # We need to load the lat/lon data in order to @@ -312,6 +324,10 @@ def test_data_with_area_definition(self, input_file): # Removed assert dedicated to products with seg_size=3 (covered by GII test case) def test_data_with_rect_lon(self, input_file): + if TEST_DATA[input_file]['seg_size'] is None: + # Skip this test + return + """Test data loaded with AreaDefinition and user defined rectification longitude.""" bufr_obj = L2BufrData(input_file, with_adef=True) np.testing.assert_equal(bufr_obj.fh.ssp_lon, int(TEST_DATA[input_file]['RectificationLongitude'][1:])/10) @@ -325,19 +341,19 @@ def test_data_with_rect_lon(self, input_file): class AMVBufrData: - """Mock SEVIRI L2 AMV BUFR data.""" + """Mock L2 AMV BUFR data.""" @unittest.skipIf(sys.platform.startswith('win'), "'eccodes' not supported on Windows") def __init__(self, filename): - """Initialize by mocking test data for testing the SEVIRI L2 BUFR reader.""" + """Initialize by mocking test data for testing the L2 BUFR reader.""" from satpy.readers.eum_l2_bufr import EumetsatL2BufrFileHandler with mock.patch('satpy.readers.eum_l2_bufr.np.fromfile'): FILENAME_INFO = {'start_time': '20191112000000', - 'spacecraft': 'MSG3', + 'spacecraft': TEST_DATA[filename]['platform_name'], 'server': 'TESTSERVER'} self.fh = EumetsatL2BufrFileHandler(filename, FILENAME_INFO, - filetype_info={'file_type': 'seviri_l2_bufr_amv'}, + filetype_info={'file_type': TEST_DATA[filename]['file_type']}, with_area_definition=True) @@ -347,5 +363,8 @@ class TestAMVBufrReader: @staticmethod def test_amv_with_area_def(): """Test that AMV data can not be loaded with an area definition.""" - bufr_obj = AMVBufrData('AMVBUFRProd_20231023044500Z_00_OMPEFS03_MET10_FES_E0000') + bufr_obj = AMVBufrData('AMVBUFRProd_20231023044500Z_00_OMPEFS02_MET09_FES_E0455') + assert bufr_obj.fh.with_adef is False + + bufr_obj = AMVBufrData('W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-2-AMV--FD------BUFR_C_EUMT_20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin') assert bufr_obj.fh.with_adef is False From 4e1257b6627125d51cea8eb52be0235053d72895 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Thu, 11 Jan 2024 14:48:33 +0100 Subject: [PATCH 13/41] restore resolution key in yaml files --- satpy/etc/readers/fci_l2_bufr.yaml | 240 +++++++++++++------ satpy/readers/eum_l2_bufr.py | 34 +-- satpy/tests/reader_tests/test_eum_l2_bufr.py | 92 ++++--- 3 files changed, 236 insertions(+), 130 deletions(-) diff --git a/satpy/etc/readers/fci_l2_bufr.yaml b/satpy/etc/readers/fci_l2_bufr.yaml index f2a4084e1d..30d724a438 100644 --- a/satpy/etc/readers/fci_l2_bufr.yaml +++ b/satpy/etc/readers/fci_l2_bufr.yaml @@ -24,7 +24,7 @@ datasets: latitude: name: latitude key: '#1#latitude' - resolution: [32000] + resolution: [32000,'none'] file_type: [fci_l2_bufr_asr, fci_l2_bufr_amv] standard_name: latitude units: degree_north @@ -33,7 +33,7 @@ datasets: longitude: name: longitude key: '#1#longitude' - resolution: [32000] + resolution: [32000,'none'] file_type: [fci_l2_bufr_asr, fci_l2_bufr_amv] standard_name: longitude units: degree_east @@ -42,9 +42,9 @@ datasets: # ---- AMV products ------------ pressure: name: pressure - resolution: 32000 file_type: fci_l2_bufr_amv key: '#1#pressure' + resolution: none long_name: Pressure of AMV feature standard_name: pressure_at_wind_level units: hPa @@ -57,6 +57,7 @@ datasets: name: temperature file_type: fci_l2_bufr_amv key: '#1#airTemperature' + resolution: none long_name: Temperature of AMV feature standard_name: temperature_at_wind_level units: K @@ -69,6 +70,7 @@ datasets: name: height file_type: fci_l2_bufr_amv key: '#1#heightOfTopOfCloud' + resolution: none long_name: Height of AMV feature standard_name: height_at_wind_level units: m @@ -81,6 +83,7 @@ datasets: name: direction file_type: fci_l2_bufr_amv key: '#1#windDirection' + resolution: none long_name: Direction of AMV standard_name: wind_to_direction units: degree_north @@ -93,6 +96,7 @@ datasets: name: speed file_type: fci_l2_bufr_amv key: '#1#windSpeed' + resolution: none long_name: Speed of AMV standard_name: wind_speed units: m/s @@ -105,6 +109,7 @@ datasets: name: u file_type: fci_l2_bufr_amv key: '#1#u' + resolution: none long_name: Speed U component of AMV standard_name: wind_speed_horizontal_component units: m/s @@ -117,6 +122,7 @@ datasets: name: v file_type: fci_l2_bufr_amv key: '#1#v' + resolution: none long_name: Speed V component of AMV standard_name: wind_speed_vertival_component units: m/s @@ -130,6 +136,7 @@ datasets: name: pixel_percentage_clear file_type: fci_l2_bufr_asr key: '#1#amountSegmentCloudFree' + resolution: 32000 long_name: Clear Sky Fraction in Segment fill_value: -1.0e+100 coordinates: @@ -138,9 +145,10 @@ datasets: bt_mean_all_ir38: name: bt_mean_all_ir38 - wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#19#brightnessTemperature' + resolution: 32000 + wavelength: [3.4, 3.8, 4.2] long_name: TOA Brightness Temperature segment mean at 3.8um (all pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -152,9 +160,10 @@ datasets: bt_mean_clear_ir38: name: bt_mean_clear_ir38 - wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#20#brightnessTemperature' + resolution: 32000 + wavelength: [3.4, 3.8, 4.2] long_name: TOA Brightness Temperature segment mean at 3.8um (clear pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -166,9 +175,10 @@ datasets: bt_mean_cloudy_ir38: name: bt_mean_cloudy_ir38 - wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#21#brightnessTemperature' + resolution: 32000 + wavelength: [3.4, 3.8, 4.2] long_name: TOA Brightness Temperature segment mean at 3.8um (cloudy pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -180,9 +190,10 @@ datasets: bt_mean_all_wv63: name: bt_mean_all_wv63 - wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#25#brightnessTemperature' + resolution: 32000 + wavelength: [5.3, 6.3, 7.3] long_name: TOA Brightness Temperature segment mean at 6.3um (all pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -194,9 +205,10 @@ datasets: bt_mean_clear_wv63: name: bt_mean_clear_wv63 - wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#26#brightnessTemperature' + resolution: 32000 + wavelength: [5.3, 6.3, 7.3] long_name: TOA Brightness Temperature segment mean at 6.3um (clear pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -208,9 +220,10 @@ datasets: bt_mean_cloudy_wv63: name: bt_mean_cloudy_wv63 - wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#27#brightnessTemperature' + resolution: 32000 + wavelength: [5.3, 6.3, 7.3] long_name: TOA Brightness Temperature segment mean at 6.3um (cloudy pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -222,9 +235,10 @@ datasets: bt_mean_all_wv73: name: bt_mean_all_wv73 - wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#31#brightnessTemperature' + resolution: 32000 + wavelength: [6.85, 7.35, 7.85] long_name: TOA Brightness Temperature segment mean at 7.3um (all pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -236,9 +250,10 @@ datasets: bt_mean_clear_wv73: name: bt_mean_clear_wv73 - wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#32#brightnessTemperature' + resolution: 32000 + wavelength: [6.85, 7.35, 7.85] long_name: TOA Brightness Temperature segment mean at 7.3um (clear pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -250,9 +265,10 @@ datasets: bt_mean_cloudy_wv73: name: bt_mean_cloudy_wv73 - wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#33#brightnessTemperature' + resolution: 32000 + wavelength: [6.85, 7.35, 7.85] long_name: TOA Brightness Temperature segment mean at 7.3um (cloudy pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -264,9 +280,10 @@ datasets: bt_mean_all_ir87: name: bt_mean_all_ir87 - wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#37#brightnessTemperature' + resolution: 32000 + wavelength: [8.3, 8.7, 9.1] long_name: TOA Brightness Temperature segment mean at 8.7um (all pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -278,9 +295,10 @@ datasets: bt_mean_clear_ir87: name: bt_mean_clear_ir87 - wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#38#brightnessTemperature' + resolution: 32000 + wavelength: [8.3, 8.7, 9.1] long_name: TOA Brightness Temperature segment mean at 8.7um (clear pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -292,9 +310,10 @@ datasets: bt_mean_cloudy_ir87: name: bt_mean_cloudy_ir87 - wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#39#brightnessTemperature' + resolution: 32000 + wavelength: [8.3, 8.7, 9.1] long_name: TOA Brightness Temperature segment mean at 8.7um (cloudy pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -306,9 +325,10 @@ datasets: bt_mean_all_ir97: name: bt_mean_all_ir97 - wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#43#brightnessTemperature' + resolution: 32000 + wavelength: [9.36, 9.66, 9.96] long_name: TOA Brightness Temperature segment mean at 9.7um (all pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -320,9 +340,10 @@ datasets: bt_mean_clear_ir97: name: bt_mean_clear_ir97 - wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#44#brightnessTemperature' + resolution: 32000 + wavelength: [9.36, 9.66, 9.96] long_name: TOA Brightness Temperature segment mean at 9.7um (clear pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -334,9 +355,10 @@ datasets: bt_mean_cloudy_ir97: name: bt_mean_cloudy_ir97 - wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#45#brightnessTemperature' + resolution: 32000 + wavelength: [9.36, 9.66, 9.96] long_name: TOA Brightness Temperature segment mean at 9.7um (cloudy pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -348,9 +370,10 @@ datasets: bt_mean_all_ir105: name: bt_mean_all_ir105 - wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#49#brightnessTemperature' + resolution: 32000 + wavelength: [9.8, 10.5, 11.2] long_name: TOA Brightness Temperature segment mean at 10.5um (all pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -362,9 +385,10 @@ datasets: bt_mean_clear_ir105: name: bt_mean_clear_ir105 - wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#50#brightnessTemperature' + resolution: 32000 + wavelength: [9.8, 10.5, 11.2] long_name: TOA Brightness Temperature segment mean at 10.5um (clear pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -376,9 +400,10 @@ datasets: bt_mean_cloudy_ir105: name: bt_mean_cloudy_ir105 - wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#51#brightnessTemperature' + resolution: 32000 + wavelength: [9.8, 10.5, 11.2] long_name: TOA Brightness Temperature segment mean at 10.5um (cloudy pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -390,9 +415,10 @@ datasets: bt_mean_all_ir123: name: bt_mean_all_ir123 - wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#55#brightnessTemperature' + resolution: 32000 + wavelength: [11.8, 12.3, 12.8] long_name: TOA Brightness Temperature segment mean at 12.3um (all pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -404,9 +430,10 @@ datasets: bt_mean_clear_ir123: name: bt_mean_clear_ir123 - wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#56#brightnessTemperature' + resolution: 32000 + wavelength: [11.8, 12.3, 12.8] long_name: TOA Brightness Temperature segment mean at 12.3um (clear pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -418,9 +445,10 @@ datasets: bt_mean_cloudy_ir123: name: bt_mean_cloudy_ir123 - wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#57#brightnessTemperature' + resolution: 32000 + wavelength: [11.8, 12.3, 12.8] long_name: TOA Brightness Temperature segment mean at 12.3um (cloudy pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -432,9 +460,10 @@ datasets: bt_mean_all_ir133: name: bt_mean_all_ir133 - wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#61#brightnessTemperature' + resolution: 32000 + wavelength: [12.7, 13.3, 13.9] long_name: TOA Brightness Temperature segment mean at 13.3um (all pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -446,9 +475,10 @@ datasets: bt_mean_clear_ir133: name: bt_mean_clear_ir133 - wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#62#brightnessTemperature' + resolution: 32000 + wavelength: [12.7, 13.3, 13.9] long_name: TOA Brightness Temperature segment mean at 13.3um (clear pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -460,9 +490,10 @@ datasets: bt_mean_cloudy_ir133: name: bt_mean_cloudy_ir133 - wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#63#brightnessTemperature' + resolution: 32000 + wavelength: [12.7, 13.3, 13.9] long_name: TOA Brightness Temperature segment mean at 13.3um (cloudy pixels) standard_name: toa_brightess_temperature cell_method: area:mean @@ -474,9 +505,10 @@ datasets: quality_bt_all_ir38: name: quality_bt_all_ir38 - wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#19#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [3.4, 3.8, 4.2] long_name: TOA Brightness Temperature % confidence at 3.8um (all pixels) standard_name: quality unit: '%' @@ -487,9 +519,10 @@ datasets: quality_bt_clear_ir38: name: quality_bt_clear_ir38 - wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#20#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [3.4, 3.8, 4.2] long_name: TOA Brightness Temperature % confidence at 3.8um (clear pixels) standard_name: quality unit: '%' @@ -500,9 +533,10 @@ datasets: quality_bt_cloudy_ir38: name: quality_bt_cloudy_ir38 - wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#21#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [3.4, 3.8, 4.2] long_name: TOA Brightness Temperature % confidence at 3.8um (cloudy pixels) standard_name: quality unit: '%' @@ -513,9 +547,10 @@ datasets: quality_bt_all_wv63: name: quality_bt_all_wv63 - wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#25#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [5.3, 6.3, 7.3] long_name: TOA Brightness Temperature % confidence at 6.3um (all pixels) standard_name: quality unit: '%' @@ -526,9 +561,10 @@ datasets: quality_bt_clear_wv63: name: quality_bt_clear_wv63 - wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#26#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [5.3, 6.3, 7.3] long_name: TOA Brightness Temperature % confidence at 6.3um (clear pixels) standard_name: quality unit: '%' @@ -539,9 +575,10 @@ datasets: quality_bt_cloudy_wv63: name: quality_bt_cloudy_wv63 - wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#27#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [5.3, 6.3, 7.3] long_name: TOA Brightness Temperature % confidence at 6.3um (cloudy pixels) standard_name: quality unit: '%' @@ -552,9 +589,10 @@ datasets: quality_bt_all_wv73: name: quality_bt_all_wv73 - wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#31#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [6.85, 7.35, 7.85] long_name: TOA Brightness Temperature % confidence at 7.3um (all pixels) standard_name: quality unit: '%' @@ -565,9 +603,10 @@ datasets: quality_bt_clear_wv73: name: quality_bt_clear_wv73 - wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#32#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [6.85, 7.35, 7.85] long_name: TOA Brightness Temperature % confidence at 7.3um (clear pixels) standard_name: quality unit: '%' @@ -578,9 +617,10 @@ datasets: quality_bt_cloudy_wv73: name: quality_bt_cloudy_wv73 - wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#33#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [6.85, 7.35, 7.85] long_name: TOA Brightness Temperature % confidence at 7.3um (cloudy pixels) standard_name: quality unit: '%' @@ -591,9 +631,10 @@ datasets: quality_bt_all_ir87: name: quality_bt_all_ir87 - wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#37#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [8.3, 8.7, 9.1] long_name: TOA Brightness Temperature % confidence at 8.7um (all pixels) standard_name: quality unit: '%' @@ -604,9 +645,10 @@ datasets: quality_bt_clear_ir87: name: quality_bt_clear_ir87 - wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#38#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [8.3, 8.7, 9.1] long_name: TOA Brightness Temperature % confidence at 8.7um (clear pixels) standard_name: quality unit: '%' @@ -617,9 +659,10 @@ datasets: quality_bt_cloudy_ir87: name: quality_bt_cloudy_ir87 - wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#39#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [8.3, 8.7, 9.1] long_name: TOA Brightness Temperature % confidence at 8.7um (cloudy pixels) standard_name: quality unit: '%' @@ -630,9 +673,10 @@ datasets: quality_bt_all_ir97: name: quality_bt_all_ir97 - wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#43#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [9.36, 9.66, 9.96] long_name: TOA Brightness Temperature % confidence at 9.7um (all pixels) standard_name: quality unit: '%' @@ -643,9 +687,10 @@ datasets: quality_bt_clear_ir97: name: quality_bt_clear_ir97 - wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#44#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [9.36, 9.66, 9.96] long_name: TOA Brightness Temperature % confidence at 9.7um (clear pixels) standard_name: quality unit: '%' @@ -656,9 +701,10 @@ datasets: quality_bt_cloudy_ir97: name: quality_bt_cloudy_ir97 - wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#45#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [9.36, 9.66, 9.96] long_name: TOA Brightness Temperature % confidence at 9.7um (cloudy pixels) standard_name: quality unit: '%' @@ -669,9 +715,10 @@ datasets: quality_bt_all_ir105: name: quality_bt_all_ir105 - wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#49#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [9.8, 10.5, 11.2] long_name: TOA Brightness Temperature % confidence at 10.5um (all pixels) standard_name: quality unit: '%' @@ -682,9 +729,10 @@ datasets: quality_bt_clear_ir105: name: quality_bt_clear_ir105 - wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#50#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [9.8, 10.5, 11.2] long_name: TOA Brightness Temperature % confidence at 10.5um (clear pixels) standard_name: quality unit: '%' @@ -695,9 +743,10 @@ datasets: quality_bt_cloudy_ir105: name: quality_bt_cloudy_ir105 - wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#51#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [9.8, 10.5, 11.2] long_name: TOA Brightness Temperature % confidence at 10.5um (cloudy pixels) standard_name: quality unit: '%' @@ -708,9 +757,10 @@ datasets: quality_bt_all_ir123: name: quality_bt_all_ir123 - wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#55#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [11.8, 12.3, 12.8] long_name: TOA Brightness Temperature % confidence at 12.3um (all pixels) standard_name: quality unit: '%' @@ -721,9 +771,10 @@ datasets: quality_bt_clear_ir123: name: quality_bt_clear_ir123 - wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#56#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [11.8, 12.3, 12.8] long_name: TOA Brightness Temperature % confidence at 12.3um (clear pixels) standard_name: quality unit: '%' @@ -734,9 +785,10 @@ datasets: quality_bt_cloudy_ir123: name: quality_bt_cloudy_ir123 - wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#57#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [11.8, 12.3, 12.8] long_name: TOA Brightness Temperature % confidence at 12.3um (cloudy pixels) standard_name: quality unit: '%' @@ -747,9 +799,10 @@ datasets: quality_bt_all_ir133: name: quality_bt_all_ir133 - wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#61#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [12.7, 13.3, 13.9] long_name: TOA Brightness Temperature % confidence at 13.3um (all pixels) standard_name: quality unit: '%' @@ -760,9 +813,10 @@ datasets: quality_bt_clear_ir133: name: quality_bt_clear_ir133 - wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#62#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [12.7, 13.3, 13.9] long_name: TOA Brightness Temperature % confidence at 13.3um (clear pixels) standard_name: quality unit: '%' @@ -773,9 +827,10 @@ datasets: quality_bt_cloudy_ir133: name: quality_bt_cloudy_ir133 - wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#63#brightnessTemperature->percentConfidence' + resolution: 32000 + wavelength: [12.7, 13.3, 13.9] long_name: TOA Brightness Temperature % confidence at 13.3um (cloudy pixels) standard_name: quality unit: '%' @@ -786,9 +841,10 @@ datasets: std_bt_all_ir38: name: std_bt_all_ir38 - wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#19#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [3.4, 3.8, 4.2] long_name: TOA Brightness Temperature standard deviation at 3.8um (all pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -800,9 +856,10 @@ datasets: std_bt_clear_ir38: name: std_bt_clear_ir38 - wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#20#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [3.4, 3.8, 4.2] long_name: TOA Brightness Temperature standard deviation at 3.8um (clear pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -814,9 +871,10 @@ datasets: std_bt_cloudy_ir38: name: std_bt_cloudy_ir38 - wavelength: [3.4, 3.8, 4.2] file_type: fci_l2_bufr_asr key: '#21#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [3.4, 3.8, 4.2] long_name: TOA Brightness Temperature standard deviation at 3.8um (cloudy pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -828,9 +886,10 @@ datasets: std_bt_all_wv63: name: std_bt_all_wv63 - wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#25#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [5.3, 6.3, 7.3] long_name: TOA Brightness Temperature standard deviation at 6.3um (all pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -842,9 +901,10 @@ datasets: std_bt_clear_wv63: name: std_bt_clear_wv63 - wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#26#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [5.3, 6.3, 7.3] long_name: TOA Brightness Temperature standard deviation at 6.3um (clear pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -856,9 +916,10 @@ datasets: std_bt_cloudy_wv63: name: std_bt_cloudy_wv63 - wavelength: [5.3, 6.3, 7.3] file_type: fci_l2_bufr_asr key: '#27#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [5.3, 6.3, 7.3] long_name: TOA Brightness Temperature standard deviation at 6.3um (cloudy pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -870,9 +931,10 @@ datasets: std_bt_all_wv73: name: std_bt_all_wv73 - wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#31#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [6.85, 7.35, 7.85] long_name: TOA Brightness Temperature standard deviation at 7.3um (all pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -884,9 +946,10 @@ datasets: std_bt_clear_wv73: name: std_bt_clear_wv73 - wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#32#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [6.85, 7.35, 7.85] long_name: TOA Brightness Temperature standard deviation at 7.3um (clear pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -898,9 +961,10 @@ datasets: std_bt_cloudy_wv73: name: std_bt_cloudy_wv73 - wavelength: [6.85, 7.35, 7.85] file_type: fci_l2_bufr_asr key: '#33#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [6.85, 7.35, 7.85] long_name: TOA Brightness Temperature standard deviation at 7.3um (cloudy pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -912,9 +976,10 @@ datasets: std_bt_all_ir87: name: std_bt_all_ir87 - wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#37#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [8.3, 8.7, 9.1] long_name: TOA Brightness Temperature standard deviation at 8.7um (all pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -926,9 +991,10 @@ datasets: std_bt_clear_ir87: name: std_bt_clear_ir87 - wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#38#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [8.3, 8.7, 9.1] long_name: TOA Brightness Temperature standard deviation at 8.7um (clear pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -940,9 +1006,10 @@ datasets: std_bt_cloudy_ir87: name: std_bt_cloudy_ir87 - wavelength: [8.3, 8.7, 9.1] file_type: fci_l2_bufr_asr key: '#39#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [8.3, 8.7, 9.1] long_name: TOA Brightness Temperature standard deviation at 8.7um (cloudy pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -954,9 +1021,10 @@ datasets: std_bt_all_ir97: name: std_bt_all_ir97 - wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#43#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [9.36, 9.66, 9.96] long_name: TOA Brightness Temperature standard deviation at 9.7um (all pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -968,9 +1036,10 @@ datasets: std_bt_clear_ir97: name: std_bt_clear_ir97 - wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#44#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [9.36, 9.66, 9.96] long_name: TOA Brightness Temperature standard deviation at 9.7um (clear pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -982,9 +1051,10 @@ datasets: std_bt_cloudy_ir97: name: std_bt_cloudy_ir97 - wavelength: [9.36, 9.66, 9.96] file_type: fci_l2_bufr_asr key: '#45#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [9.36, 9.66, 9.96] long_name: TOA Brightness Temperature standard deviation at 9.7um (cloudy pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -996,9 +1066,10 @@ datasets: std_bt_all_ir105: name: std_bt_all_ir105 - wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#49#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [9.8, 10.5, 11.2] long_name: TOA Brightness Temperature standard deviation at 10.5um (all pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -1010,9 +1081,10 @@ datasets: std_bt_clear_ir105: name: std_bt_clear_ir105 - wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#50#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [9.8, 10.5, 11.2] long_name: TOA Brightness Temperature standard deviation at 10.5um (clear pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -1024,9 +1096,10 @@ datasets: std_bt_cloudy_ir105: name: std_bt_cloudy_ir105 - wavelength: [9.8, 10.5, 11.2] file_type: fci_l2_bufr_asr key: '#51#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [9.8, 10.5, 11.2] long_name: TOA Brightness Temperature standard deviation at 10.5um (cloudy pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -1038,9 +1111,10 @@ datasets: std_bt_all_ir123: name: std_bt_all_ir123 - wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#55#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [11.8, 12.3, 12.8] long_name: TOA Brightness Temperature standard deviation at 12.3um (all pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -1052,9 +1126,10 @@ datasets: std_bt_clear_ir123: name: std_bt_clear_ir123 - wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#56#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [11.8, 12.3, 12.8] long_name: TOA Brightness Temperature standard deviation at 12.3um (clear pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -1066,9 +1141,10 @@ datasets: std_bt_cloudy_ir123: name: std_bt_cloudy_ir123 - wavelength: [11.8, 12.3, 12.8] file_type: fci_l2_bufr_asr key: '#57#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [11.8, 12.3, 12.8] long_name: TOA Brightness Temperature standard deviation at 12.3um (cloudy pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -1080,9 +1156,10 @@ datasets: std_bt_all_ir133: name: std_bt_all_ir133 - wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#61#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [12.7, 13.3, 13.9] long_name: TOA Brightness Temperature standard deviation at 13.3um (all pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -1094,9 +1171,10 @@ datasets: std_bt_clear_ir133: name: std_bt_clear_ir133 - wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#62#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [12.7, 13.3, 13.9] long_name: TOA Brightness Temperature standard deviation at 13.3um (clear pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -1108,9 +1186,10 @@ datasets: std_bt_cloudy_ir133: name: std_bt_cloudy_ir133 - wavelength: [12.7, 13.3, 13.9] file_type: fci_l2_bufr_asr key: '#63#brightnessTemperature->firstOrderStatisticalValue' + resolution: 32000 + wavelength: [12.7, 13.3, 13.9] long_name: TOA Brightness Temperature standard deviation at 13.3um (cloudy pixels) standard_name: toa_brightess_temperature cell_method: area:standard_deviation @@ -1119,3 +1198,14 @@ datasets: coordinates: - longitude - latitude + + pixel_percentage_clear: + name: pixel_percentage_clear + file_type: fci_l2_bufr_asr + key: '#1#amountSegmentCloudFree' + resolution: 32000 + long_name: Clear Sky Fraction in Segment + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude diff --git a/satpy/readers/eum_l2_bufr.py b/satpy/readers/eum_l2_bufr.py index fd93f2b599..7b6c387e0f 100644 --- a/satpy/readers/eum_l2_bufr.py +++ b/satpy/readers/eum_l2_bufr.py @@ -64,10 +64,10 @@ # This is the physical size of the segment, in meters resolution_dict = {'seviri_l2_bufr_asr': 48000, 'seviri_l2_bufr_cla': 48000, - 'seviri_l2_bufr_csr': 48000, 'seviri_l2_bufr_gii': 9000, - 'seviri_l2_bufr_thu': 48000, 'seviri_l2_bufr_toz': 9000, - 'seviri_l2_bufr_amv': None, - 'fci_l2_bufr_asr': 32000, 'fci_l2_bufr_amv': None} + 'seviri_l2_bufr_csr': 48000, 'seviri_l2_bufr_gii': 9000, + 'seviri_l2_bufr_thu': 48000, 'seviri_l2_bufr_toz': 9000, + 'seviri_l2_bufr_amv': None, + 'fci_l2_bufr_asr': 32000, 'fci_l2_bufr_amv': None} # List of variables that are returned by eccodes as array, but we want as single value deprecate_to_single_value = ['satelliteIdentifier'] @@ -117,9 +117,9 @@ def __init__(self, filename, filename_info, filetype_info, with_area_definition= else: # Product was retrieved from the EUMETSAT Data Center # get all attributes in one call - attr = self.get_attributes(['typicalDate', 'typicalTime','satelliteIdentifier']) + attr = self.get_attributes(['typicalDate', 'typicalTime', 'satelliteIdentifier']) timeStr = attr['typicalDate']+attr['typicalTime'] - sc_id = int( attr['satelliteIdentifier']) + sc_id = int(attr['satelliteIdentifier']) self.bufr_header = {} self.bufr_header['NominalTime'] = datetime.strptime(timeStr, "%Y%m%d%H%M%S") @@ -134,10 +134,8 @@ def __init__(self, filename, filename_info, filetype_info, with_area_definition= if self.seg_size: # make this keyword not usable for non-grided products self.with_adef = with_area_definition - self.resolution = resolution_dict[self.filetype] else: self.with_adef = False - self.resolution = None @property def start_time(self): @@ -202,11 +200,11 @@ def get_attributes(self, keys): for k in keys: try: if k in deprecate_to_single_value: - # Extract satelliteIdentifier single value. The satelliteIdentifier attribute is returned as an - # array becasue the environment variable ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS is set to 1. - value = ec.codes_get_array(bufr, k)[0] + # Extract satelliteIdentifier single value. The satelliteIdentifier attribute is returned as an + # array becasue the environment variable ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS is set to 1. + value = ec.codes_get_array(bufr, k)[0] else: - value = ec.codes_get(bufr, k) + value = ec.codes_get(bufr, k) attr[k] = value except BaseException: @@ -263,7 +261,7 @@ def get_dataset(self, dataset_id, dataset_info): arr = self.get_array(dataset_info['key']) if self.with_adef: - xarr = self.get_dataset_with_area_def(arr, dataset_id) + xarr = self.get_dataset_with_area_def(arr, dataset_id, dataset_info["resolution"]) # coordinates are not relevant when returning data with an AreaDefinition if 'coordinates' in dataset_info.keys(): del dataset_info['coordinates'] @@ -276,14 +274,14 @@ def get_dataset(self, dataset_id, dataset_info): self._add_attributes(xarr, dataset_info) return xarr - def get_dataset_with_area_def(self, arr, dataset_id): + def get_dataset_with_area_def(self, arr, dataset_id, resolution): """Get dataset with an AreaDefinition.""" if dataset_id['name'] in ['latitude', 'longitude']: self.__setattr__(dataset_id['name'], arr) xarr = xr.DataArray(arr, dims=["y"]) else: lons_1d, lats_1d, data_1d = da.compute(self.longitude, self.latitude, arr) - self._area_def = self._construct_area_def(dataset_id) + self._area_def = self._construct_area_def(dataset_id, resolution) icol, irow = self._area_def.get_array_indices_from_lonlat(lons_1d, lats_1d) data_2d = np.empty(self._area_def.shape) @@ -300,7 +298,7 @@ def get_dataset_with_area_def(self, arr, dataset_id): return xarr - def _construct_area_def(self, dataset_id): + def _construct_area_def(self, dataset_id, resolution): """Construct a standardized AreaDefinition based on satellite, instrument, resolution and sub-satellite point. Returns: @@ -309,7 +307,7 @@ def _construct_area_def(self, dataset_id): """ area_naming_input_dict = {'platform_name': self.platform_name[:3].lower(), 'instrument_name': self.sensor_name, - 'resolution': self.resolution, + 'resolution': resolution, } area_naming = get_geos_area_naming({**area_naming_input_dict, @@ -333,3 +331,5 @@ def _add_attributes(self, xarr, dataset_info): xarr.attrs['ssp_lon'] = self.ssp_lon xarr.attrs['seg_size'] = self.seg_size xarr.attrs.update(dataset_info) + if (xarr.attrs["resolution"] == "none"): + xarr.attrs.update({"resolution": None}) diff --git a/satpy/tests/reader_tests/test_eum_l2_bufr.py b/satpy/tests/reader_tests/test_eum_l2_bufr.py index 1d255d519f..2cdefb58d3 100644 --- a/satpy/tests/reader_tests/test_eum_l2_bufr.py +++ b/satpy/tests/reader_tests/test_eum_l2_bufr.py @@ -124,7 +124,7 @@ 'seg_size': None, 'file_type': 'seviri_l2_bufr_amv', 'key': '#1#brightnessTemperature', - 'resolution': 48000}, + 'resolution': 72009.675979608}, 'MSG2-SEVI-MSGASRE-0101-0101-20191106130000.000000000Z-20191106131702-1362128.bfr': { 'platform_name': 'MSG2', 'spacecraft_number': '9', @@ -135,7 +135,8 @@ 'file_type': 'seviri_l2_bufr_asr', 'key': '#1#brightnessTemperature', 'resolution': 48000}, - 'W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-2-ASR--FD------BUFR_C_EUMT_20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin': { + """W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-2-ASR--FD------BUFR_C_EUMT_ + 20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin""": { 'platform_name': 'MTGi1', 'spacecraft_number': '24', 'RectificationLongitude': 'E0000', @@ -145,7 +146,8 @@ 'file_type': 'fci_l2_bufr_asr', 'key': '#1#brightnessTemperature', 'resolution': 32000}, - 'W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-2-AMV--FD------BUFR_C_EUMT_20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin': { + """W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-2-AMV--FD------BUFR_C_EUMT_ + 20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin""": { 'platform_name': 'MTGi1', 'spacecraft_number': '24', 'RectificationLongitude': 'E0000', @@ -154,12 +156,12 @@ 'seg_size': None, 'file_type': 'fci_l2_bufr_amv', 'key': '#1#brightnessTemperature', - 'resolution': 32000} - } + 'resolution': 'none'}} TEST_FILES = list(TEST_DATA.keys()) + class L2BufrData: """Mock L2 BUFR data.""" @@ -172,12 +174,10 @@ def __init__(self, filename, with_adef=False, rect_lon='default'): self.buf1 = ec.codes_bufr_new_from_samples('BUFR4_local_satellite') ec.codes_set(self.buf1, 'unpack', 1) # write the bufr test data twice as we want to read in and then concatenate the data in the reader - # 55 id corresponds to METEOSAT 8` + # 55 id corresponds to METEOSAT 8 ec.codes_set(self.buf1, 'satelliteIdentifier', 47 + int(TEST_DATA[filename]['spacecraft_number'])) ec.codes_set_array(self.buf1, '#1#latitude', LAT) - #ec.codes_set_array(self.buf1, '#1#latitude', LAT) ec.codes_set_array(self.buf1, '#1#longitude', LON) - # ec.codes_set_array(self.buf1, '#1#longitude', LON) ec.codes_set_array(self.buf1, TEST_DATA[filename]['key'], DATA) self.m = mock.mock_open() @@ -199,9 +199,10 @@ def __init__(self, filename, with_adef=False, rect_lon='default'): FILENAME_INFO = {'start_time': '20231022224500', 'spacecraft': TEST_DATA[filename]['platform_name'], 'server': 'TESTSERVER'} - self.fh = EumetsatL2BufrFileHandler(filename, FILENAME_INFO, FILETYPE_INFO, - with_area_definition=with_adef, - rectification_longitude=int(TEST_DATA[filename]['RectificationLongitude'][1:])/10) + self.fh = EumetsatL2BufrFileHandler( + filename, FILENAME_INFO, FILETYPE_INFO, + with_area_definition=with_adef, + rectification_longitude=int(TEST_DATA[filename]['RectificationLongitude'][1:])/10) self.fh.mpef_header = MPEF_PRODUCT_HEADER else: @@ -215,21 +216,22 @@ def __init__(self, filename, with_adef=False, rect_lon='default'): with mock.patch('eccodes.codes_release') as ec5: ec5.return_value = 1 - FILENAME_INFO = {'start_time': '20191112000000', 'spacecraft': TEST_DATA[filename]['platform_name']} - self.fh = EumetsatL2BufrFileHandler(filename, FILENAME_INFO, FILETYPE_INFO, - with_area_definition=with_adef, - rectification_longitude=int(TEST_DATA[filename]['RectificationLongitude'][1:])/10) + FILENAME_INFO = {'start_time': '20191112000000', + 'spacecraft': TEST_DATA[filename]['platform_name']} + self.fh = EumetsatL2BufrFileHandler( + filename, FILENAME_INFO, FILETYPE_INFO, + with_area_definition=with_adef, + rectification_longitude=int(TEST_DATA[filename]['RectificationLongitude'][1:])/10) - # Force resolution propertie in the file handler because the mock template doesn't have the - # segmentSizeAtNadirInXDirection key so it can't be initialized the normal way - self.fh.resolution = TEST_DATA[filename]['resolution'] + self.resolution = TEST_DATA[filename]['resolution'] def get_data(self, dataset_name, key, coordinates): """Read data from mock file.""" DATASET_INFO = { 'name': dataset_name, 'key': key, - 'fill_value': -1.e+100 + 'fill_value': -1.e+100, + 'resolution': self.resolution } if coordinates: DATASET_INFO.update({'coordinates': ('longitude', 'latitude')}) @@ -242,7 +244,8 @@ def get_data(self, dataset_name, key, coordinates): ec2.return_value = 1 with mock.patch('eccodes.codes_release') as ec5: ec5.return_value = 1 - z = self.fh.get_dataset(make_dataid(name = dataset_name, resolution = self.fh.resolution), DATASET_INFO) + z = self.fh.get_dataset(make_dataid(name=dataset_name, resolution=self.resolution), + DATASET_INFO) return z @@ -253,12 +256,9 @@ class TestL2BufrReader: @staticmethod def test_lonslats(input_file): - print(input_file) """Test reading of longitude and latitude data with SEVIRI L2 BUFR reader.""" bufr_obj = L2BufrData(input_file) - print('get zlat') zlat = bufr_obj.get_data('latitude', '#1#latitude', coordinates=False) - print(zlat) zlon = bufr_obj.get_data('longitude', '#1#longitude', coordinates=False) np.testing.assert_array_equal(zlat.values, np.concatenate((LAT, LAT), axis=0)) np.testing.assert_array_equal(zlon.values, np.concatenate((LON, LON), axis=0)) @@ -276,8 +276,8 @@ def test_attributes_with_swath_definition(input_file): def test_attributes_with_area_definition(input_file): """Test correctness of dataset attributes with data loaded with a AreaDefinition.""" bufr_obj = L2BufrData(input_file, with_adef=True) - _ = bufr_obj.get_data('latitude', '#1#latitude', coordinates=False) # We need to load the lat/lon data in order to - _ = bufr_obj.get_data('longitude', '#1#longitude', coordinates=False) # populate the file handler with these data + _ = bufr_obj.get_data('latitude', '#1#latitude', coordinates=False) + _ = bufr_obj.get_data('longitude', '#1#longitude', coordinates=False) z = bufr_obj.get_data(dataset_name='TestData', key=TEST_DATA[input_file]['key'], coordinates=True) assert z.attrs['platform_name'] == TEST_DATA[input_file]['platform_name'] @@ -297,14 +297,14 @@ def test_data_with_swath_definition(input_file): np.testing.assert_array_equal(z.values, x1) def test_data_with_area_definition(self, input_file): + """Test data loaded with an area definition.""" if TEST_DATA[input_file]['seg_size'] is None: - # Skip this test - return + # Skip this test + return - """Test data loaded with AreaDefinition.""" bufr_obj = L2BufrData(input_file, with_adef=True) - _ = bufr_obj.get_data('latitude', '#1#latitude', coordinates=False) # We need to load the lat/lon data in order to - _ = bufr_obj.get_data('longitude', '#1#longitude', coordinates=False) # populate the file handler with these data + _ = bufr_obj.get_data('latitude', '#1#latitude', coordinates=False) + _ = bufr_obj.get_data('longitude', '#1#longitude', coordinates=False) z = bufr_obj.get_data(dataset_name='TestData', key=TEST_DATA[input_file]['key'], coordinates=True) @@ -324,21 +324,35 @@ def test_data_with_area_definition(self, input_file): # Removed assert dedicated to products with seg_size=3 (covered by GII test case) def test_data_with_rect_lon(self, input_file): + """Test data loaded with an area definition and a rectification longitude.""" if TEST_DATA[input_file]['seg_size'] is None: - # Skip this test - return + # Skip this test + return - """Test data loaded with AreaDefinition and user defined rectification longitude.""" bufr_obj = L2BufrData(input_file, with_adef=True) - np.testing.assert_equal(bufr_obj.fh.ssp_lon, int(TEST_DATA[input_file]['RectificationLongitude'][1:])/10) - _ = bufr_obj.get_data('latitude', '#1#latitude', coordinates=False) # We need to load the lat/lon data in order to - _ = bufr_obj.get_data('longitude', '#1#longitude', coordinates=False) # populate the file handler with these data + np.testing.assert_equal(bufr_obj.fh.ssp_lon, + int(TEST_DATA[input_file]['RectificationLongitude'][1:])/10) + _ = bufr_obj.get_data('latitude', '#1#latitude', coordinates=False) + _ = bufr_obj.get_data('longitude', '#1#longitude', coordinates=False) _ = bufr_obj.get_data(dataset_name='TestData', key=TEST_DATA[input_file]['key'], coordinates=True) # We need to lead the data in order to create the AreaDefinition ad = bufr_obj.fh.get_area_def(None) assert ad == TEST_DATA[input_file]['area'] + def test_resolution(self, input_file): + """Test data loaded with the correct resolution attribute .""" + bufr_obj = L2BufrData(input_file, with_adef=True) + _ = bufr_obj.get_data('latitude', '#1#latitude', coordinates=False) + _ = bufr_obj.get_data('longitude', '#1#longitude', coordinates=False) + + z = bufr_obj.get_data(dataset_name='TestData', key=TEST_DATA[input_file]['key'], coordinates=True) + + if bufr_obj.resolution == 'none': + assert z.attrs["resolution"] is None + else: + assert z.attrs["resolution"] == bufr_obj.resolution + class AMVBufrData: """Mock L2 AMV BUFR data.""" @@ -352,7 +366,8 @@ def __init__(self, filename): FILENAME_INFO = {'start_time': '20191112000000', 'spacecraft': TEST_DATA[filename]['platform_name'], 'server': 'TESTSERVER'} - self.fh = EumetsatL2BufrFileHandler(filename, FILENAME_INFO, + self.fh = EumetsatL2BufrFileHandler( + filename, FILENAME_INFO, filetype_info={'file_type': TEST_DATA[filename]['file_type']}, with_area_definition=True) @@ -366,5 +381,6 @@ def test_amv_with_area_def(): bufr_obj = AMVBufrData('AMVBUFRProd_20231023044500Z_00_OMPEFS02_MET09_FES_E0455') assert bufr_obj.fh.with_adef is False - bufr_obj = AMVBufrData('W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-2-AMV--FD------BUFR_C_EUMT_20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin') + bufr_obj = AMVBufrData("""W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-2-AMV--FD------BUFR_ + C_EUMT_20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin""") assert bufr_obj.fh.with_adef is False From bc854a3f1d4464abfea140084edffa5b530135e3 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Thu, 11 Jan 2024 16:26:25 +0100 Subject: [PATCH 14/41] Use Null for AMV resolution --- satpy/etc/readers/fci_l2_bufr.yaml | 6 +++--- satpy/readers/eum_l2_bufr.py | 2 -- satpy/tests/reader_tests/test_eum_l2_bufr.py | 14 ++++++-------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/satpy/etc/readers/fci_l2_bufr.yaml b/satpy/etc/readers/fci_l2_bufr.yaml index 30d724a438..1300d5e13c 100644 --- a/satpy/etc/readers/fci_l2_bufr.yaml +++ b/satpy/etc/readers/fci_l2_bufr.yaml @@ -24,7 +24,7 @@ datasets: latitude: name: latitude key: '#1#latitude' - resolution: [32000,'none'] + resolution: [32000] file_type: [fci_l2_bufr_asr, fci_l2_bufr_amv] standard_name: latitude units: degree_north @@ -33,7 +33,7 @@ datasets: longitude: name: longitude key: '#1#longitude' - resolution: [32000,'none'] + resolution: [32000] file_type: [fci_l2_bufr_asr, fci_l2_bufr_amv] standard_name: longitude units: degree_east @@ -70,7 +70,7 @@ datasets: name: height file_type: fci_l2_bufr_amv key: '#1#heightOfTopOfCloud' - resolution: none + resolution: null long_name: Height of AMV feature standard_name: height_at_wind_level units: m diff --git a/satpy/readers/eum_l2_bufr.py b/satpy/readers/eum_l2_bufr.py index 7b6c387e0f..4fbfa43732 100644 --- a/satpy/readers/eum_l2_bufr.py +++ b/satpy/readers/eum_l2_bufr.py @@ -331,5 +331,3 @@ def _add_attributes(self, xarr, dataset_info): xarr.attrs['ssp_lon'] = self.ssp_lon xarr.attrs['seg_size'] = self.seg_size xarr.attrs.update(dataset_info) - if (xarr.attrs["resolution"] == "none"): - xarr.attrs.update({"resolution": None}) diff --git a/satpy/tests/reader_tests/test_eum_l2_bufr.py b/satpy/tests/reader_tests/test_eum_l2_bufr.py index 2cdefb58d3..b73c3f4bbd 100644 --- a/satpy/tests/reader_tests/test_eum_l2_bufr.py +++ b/satpy/tests/reader_tests/test_eum_l2_bufr.py @@ -147,7 +147,7 @@ 'key': '#1#brightnessTemperature', 'resolution': 32000}, """W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-2-AMV--FD------BUFR_C_EUMT_ - 20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin""": { +20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin""": { 'platform_name': 'MTGi1', 'spacecraft_number': '24', 'RectificationLongitude': 'E0000', @@ -156,7 +156,7 @@ 'seg_size': None, 'file_type': 'fci_l2_bufr_amv', 'key': '#1#brightnessTemperature', - 'resolution': 'none'}} + 'resolution': 'null'}} TEST_FILES = list(TEST_DATA.keys()) @@ -348,10 +348,7 @@ def test_resolution(self, input_file): z = bufr_obj.get_data(dataset_name='TestData', key=TEST_DATA[input_file]['key'], coordinates=True) - if bufr_obj.resolution == 'none': - assert z.attrs["resolution"] is None - else: - assert z.attrs["resolution"] == bufr_obj.resolution + assert z.attrs["resolution"] == bufr_obj.resolution class AMVBufrData: @@ -381,6 +378,7 @@ def test_amv_with_area_def(): bufr_obj = AMVBufrData('AMVBUFRProd_20231023044500Z_00_OMPEFS02_MET09_FES_E0455') assert bufr_obj.fh.with_adef is False - bufr_obj = AMVBufrData("""W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-2-AMV--FD------BUFR_ - C_EUMT_20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin""") + input_file = """W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-2-AMV--FD------BUFR_C_EUMT_ +20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin""" + bufr_obj = AMVBufrData(input_file) assert bufr_obj.fh.with_adef is False From 9cd0a857bb9fef52a8628b809c822f2a145393e7 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Mon, 22 Jan 2024 15:41:45 +0100 Subject: [PATCH 15/41] change key order --- satpy/etc/readers/fci_l2_bufr.yaml | 448 ++++++++++++++--------------- 1 file changed, 219 insertions(+), 229 deletions(-) diff --git a/satpy/etc/readers/fci_l2_bufr.yaml b/satpy/etc/readers/fci_l2_bufr.yaml index 1300d5e13c..3e75cc75b6 100644 --- a/satpy/etc/readers/fci_l2_bufr.yaml +++ b/satpy/etc/readers/fci_l2_bufr.yaml @@ -132,25 +132,14 @@ datasets: - latitude # ---- ASR products ------------ - pixel_percentage_clear: - name: pixel_percentage_clear - file_type: fci_l2_bufr_asr - key: '#1#amountSegmentCloudFree' - resolution: 32000 - long_name: Clear Sky Fraction in Segment - fill_value: -1.0e+100 - coordinates: - - longitude - - latitude - bt_mean_all_ir38: name: bt_mean_all_ir38 + long_name: TOA Brightness Temperature segment mean at 3.8um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#19#brightnessTemperature' - resolution: 32000 wavelength: [3.4, 3.8, 4.2] - long_name: TOA Brightness Temperature segment mean at 3.8um (all pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -160,12 +149,12 @@ datasets: bt_mean_clear_ir38: name: bt_mean_clear_ir38 + long_name: TOA Brightness Temperature segment mean at 3.8um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#20#brightnessTemperature' - resolution: 32000 wavelength: [3.4, 3.8, 4.2] - long_name: TOA Brightness Temperature segment mean at 3.8um (clear pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -175,12 +164,12 @@ datasets: bt_mean_cloudy_ir38: name: bt_mean_cloudy_ir38 + long_name: TOA Brightness Temperature segment mean at 3.8um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#21#brightnessTemperature' - resolution: 32000 wavelength: [3.4, 3.8, 4.2] - long_name: TOA Brightness Temperature segment mean at 3.8um (cloudy pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -190,12 +179,12 @@ datasets: bt_mean_all_wv63: name: bt_mean_all_wv63 + long_name: TOA Brightness Temperature segment mean at 6.3um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#25#brightnessTemperature' - resolution: 32000 wavelength: [5.3, 6.3, 7.3] - long_name: TOA Brightness Temperature segment mean at 6.3um (all pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -205,12 +194,12 @@ datasets: bt_mean_clear_wv63: name: bt_mean_clear_wv63 + long_name: TOA Brightness Temperature segment mean at 6.3um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#26#brightnessTemperature' - resolution: 32000 wavelength: [5.3, 6.3, 7.3] - long_name: TOA Brightness Temperature segment mean at 6.3um (clear pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -220,12 +209,12 @@ datasets: bt_mean_cloudy_wv63: name: bt_mean_cloudy_wv63 + long_name: TOA Brightness Temperature segment mean at 6.3um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#27#brightnessTemperature' - resolution: 32000 wavelength: [5.3, 6.3, 7.3] - long_name: TOA Brightness Temperature segment mean at 6.3um (cloudy pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -235,12 +224,12 @@ datasets: bt_mean_all_wv73: name: bt_mean_all_wv73 + long_name: TOA Brightness Temperature segment mean at 7.3um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#31#brightnessTemperature' - resolution: 32000 wavelength: [6.85, 7.35, 7.85] - long_name: TOA Brightness Temperature segment mean at 7.3um (all pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -250,12 +239,12 @@ datasets: bt_mean_clear_wv73: name: bt_mean_clear_wv73 + long_name: TOA Brightness Temperature segment mean at 7.3um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#32#brightnessTemperature' - resolution: 32000 wavelength: [6.85, 7.35, 7.85] - long_name: TOA Brightness Temperature segment mean at 7.3um (clear pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -265,12 +254,12 @@ datasets: bt_mean_cloudy_wv73: name: bt_mean_cloudy_wv73 + long_name: TOA Brightness Temperature segment mean at 7.3um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#33#brightnessTemperature' - resolution: 32000 wavelength: [6.85, 7.35, 7.85] - long_name: TOA Brightness Temperature segment mean at 7.3um (cloudy pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -280,12 +269,12 @@ datasets: bt_mean_all_ir87: name: bt_mean_all_ir87 + long_name: TOA Brightness Temperature segment mean at 8.7um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#37#brightnessTemperature' - resolution: 32000 wavelength: [8.3, 8.7, 9.1] - long_name: TOA Brightness Temperature segment mean at 8.7um (all pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -295,12 +284,12 @@ datasets: bt_mean_clear_ir87: name: bt_mean_clear_ir87 + long_name: TOA Brightness Temperature segment mean at 8.7um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#38#brightnessTemperature' - resolution: 32000 wavelength: [8.3, 8.7, 9.1] - long_name: TOA Brightness Temperature segment mean at 8.7um (clear pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -310,12 +299,12 @@ datasets: bt_mean_cloudy_ir87: name: bt_mean_cloudy_ir87 + long_name: TOA Brightness Temperature segment mean at 8.7um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#39#brightnessTemperature' - resolution: 32000 wavelength: [8.3, 8.7, 9.1] - long_name: TOA Brightness Temperature segment mean at 8.7um (cloudy pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -325,12 +314,12 @@ datasets: bt_mean_all_ir97: name: bt_mean_all_ir97 + long_name: TOA Brightness Temperature segment mean at 9.7um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#43#brightnessTemperature' - resolution: 32000 wavelength: [9.36, 9.66, 9.96] - long_name: TOA Brightness Temperature segment mean at 9.7um (all pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -340,12 +329,12 @@ datasets: bt_mean_clear_ir97: name: bt_mean_clear_ir97 + long_name: TOA Brightness Temperature segment mean at 9.7um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#44#brightnessTemperature' - resolution: 32000 wavelength: [9.36, 9.66, 9.96] - long_name: TOA Brightness Temperature segment mean at 9.7um (clear pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -355,12 +344,12 @@ datasets: bt_mean_cloudy_ir97: name: bt_mean_cloudy_ir97 + long_name: TOA Brightness Temperature segment mean at 9.7um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#45#brightnessTemperature' - resolution: 32000 wavelength: [9.36, 9.66, 9.96] - long_name: TOA Brightness Temperature segment mean at 9.7um (cloudy pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -370,12 +359,12 @@ datasets: bt_mean_all_ir105: name: bt_mean_all_ir105 + long_name: TOA Brightness Temperature segment mean at 10.5um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#49#brightnessTemperature' - resolution: 32000 wavelength: [9.8, 10.5, 11.2] - long_name: TOA Brightness Temperature segment mean at 10.5um (all pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -385,12 +374,12 @@ datasets: bt_mean_clear_ir105: name: bt_mean_clear_ir105 + long_name: TOA Brightness Temperature segment mean at 10.5um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#50#brightnessTemperature' - resolution: 32000 wavelength: [9.8, 10.5, 11.2] - long_name: TOA Brightness Temperature segment mean at 10.5um (clear pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -400,12 +389,12 @@ datasets: bt_mean_cloudy_ir105: name: bt_mean_cloudy_ir105 + long_name: TOA Brightness Temperature segment mean at 10.5um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#51#brightnessTemperature' - resolution: 32000 wavelength: [9.8, 10.5, 11.2] - long_name: TOA Brightness Temperature segment mean at 10.5um (cloudy pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -415,12 +404,12 @@ datasets: bt_mean_all_ir123: name: bt_mean_all_ir123 + long_name: TOA Brightness Temperature segment mean at 12.3um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#55#brightnessTemperature' - resolution: 32000 wavelength: [11.8, 12.3, 12.8] - long_name: TOA Brightness Temperature segment mean at 12.3um (all pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -430,12 +419,12 @@ datasets: bt_mean_clear_ir123: name: bt_mean_clear_ir123 + long_name: TOA Brightness Temperature segment mean at 12.3um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#56#brightnessTemperature' - resolution: 32000 wavelength: [11.8, 12.3, 12.8] - long_name: TOA Brightness Temperature segment mean at 12.3um (clear pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -445,12 +434,12 @@ datasets: bt_mean_cloudy_ir123: name: bt_mean_cloudy_ir123 + long_name: TOA Brightness Temperature segment mean at 12.3um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#57#brightnessTemperature' - resolution: 32000 wavelength: [11.8, 12.3, 12.8] - long_name: TOA Brightness Temperature segment mean at 12.3um (cloudy pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -460,12 +449,12 @@ datasets: bt_mean_all_ir133: name: bt_mean_all_ir133 + long_name: TOA Brightness Temperature segment mean at 13.3um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#61#brightnessTemperature' - resolution: 32000 wavelength: [12.7, 13.3, 13.9] - long_name: TOA Brightness Temperature segment mean at 13.3um (all pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -475,12 +464,12 @@ datasets: bt_mean_clear_ir133: name: bt_mean_clear_ir133 + long_name: TOA Brightness Temperature segment mean at 13.3um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#62#brightnessTemperature' - resolution: 32000 wavelength: [12.7, 13.3, 13.9] - long_name: TOA Brightness Temperature segment mean at 13.3um (clear pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -490,12 +479,12 @@ datasets: bt_mean_cloudy_ir133: name: bt_mean_cloudy_ir133 + long_name: TOA Brightness Temperature segment mean at 13.3um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#63#brightnessTemperature' - resolution: 32000 wavelength: [12.7, 13.3, 13.9] - long_name: TOA Brightness Temperature segment mean at 13.3um (cloudy pixels) - standard_name: toa_brightess_temperature cell_method: area:mean unit: K fill_value: -1.0e+100 @@ -505,12 +494,12 @@ datasets: quality_bt_all_ir38: name: quality_bt_all_ir38 + long_name: TOA Brightness Temperature % confidence at 3.8um (all pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#19#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [3.4, 3.8, 4.2] - long_name: TOA Brightness Temperature % confidence at 3.8um (all pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -519,12 +508,12 @@ datasets: quality_bt_clear_ir38: name: quality_bt_clear_ir38 + long_name: TOA Brightness Temperature % confidence at 3.8um (clear pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#20#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [3.4, 3.8, 4.2] - long_name: TOA Brightness Temperature % confidence at 3.8um (clear pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -533,12 +522,12 @@ datasets: quality_bt_cloudy_ir38: name: quality_bt_cloudy_ir38 + long_name: TOA Brightness Temperature % confidence at 3.8um (cloudy pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#21#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [3.4, 3.8, 4.2] - long_name: TOA Brightness Temperature % confidence at 3.8um (cloudy pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -547,12 +536,12 @@ datasets: quality_bt_all_wv63: name: quality_bt_all_wv63 + long_name: TOA Brightness Temperature % confidence at 6.3um (all pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#25#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [5.3, 6.3, 7.3] - long_name: TOA Brightness Temperature % confidence at 6.3um (all pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -561,12 +550,12 @@ datasets: quality_bt_clear_wv63: name: quality_bt_clear_wv63 + long_name: TOA Brightness Temperature % confidence at 6.3um (clear pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#26#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [5.3, 6.3, 7.3] - long_name: TOA Brightness Temperature % confidence at 6.3um (clear pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -575,12 +564,12 @@ datasets: quality_bt_cloudy_wv63: name: quality_bt_cloudy_wv63 + long_name: TOA Brightness Temperature % confidence at 6.3um (cloudy pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#27#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [5.3, 6.3, 7.3] - long_name: TOA Brightness Temperature % confidence at 6.3um (cloudy pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -589,12 +578,12 @@ datasets: quality_bt_all_wv73: name: quality_bt_all_wv73 + long_name: TOA Brightness Temperature % confidence at 7.3um (all pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#31#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [6.85, 7.35, 7.85] - long_name: TOA Brightness Temperature % confidence at 7.3um (all pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -603,12 +592,12 @@ datasets: quality_bt_clear_wv73: name: quality_bt_clear_wv73 + long_name: TOA Brightness Temperature % confidence at 7.3um (clear pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#32#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [6.85, 7.35, 7.85] - long_name: TOA Brightness Temperature % confidence at 7.3um (clear pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -617,12 +606,12 @@ datasets: quality_bt_cloudy_wv73: name: quality_bt_cloudy_wv73 + long_name: TOA Brightness Temperature % confidence at 7.3um (cloudy pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#33#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [6.85, 7.35, 7.85] - long_name: TOA Brightness Temperature % confidence at 7.3um (cloudy pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -631,12 +620,12 @@ datasets: quality_bt_all_ir87: name: quality_bt_all_ir87 + long_name: TOA Brightness Temperature % confidence at 8.7um (all pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#37#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [8.3, 8.7, 9.1] - long_name: TOA Brightness Temperature % confidence at 8.7um (all pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -645,12 +634,12 @@ datasets: quality_bt_clear_ir87: name: quality_bt_clear_ir87 + long_name: TOA Brightness Temperature % confidence at 8.7um (clear pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#38#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [8.3, 8.7, 9.1] - long_name: TOA Brightness Temperature % confidence at 8.7um (clear pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -659,12 +648,12 @@ datasets: quality_bt_cloudy_ir87: name: quality_bt_cloudy_ir87 + long_name: TOA Brightness Temperature % confidence at 8.7um (cloudy pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#39#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [8.3, 8.7, 9.1] - long_name: TOA Brightness Temperature % confidence at 8.7um (cloudy pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -673,12 +662,12 @@ datasets: quality_bt_all_ir97: name: quality_bt_all_ir97 + long_name: TOA Brightness Temperature % confidence at 9.7um (all pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#43#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [9.36, 9.66, 9.96] - long_name: TOA Brightness Temperature % confidence at 9.7um (all pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -687,12 +676,12 @@ datasets: quality_bt_clear_ir97: name: quality_bt_clear_ir97 + long_name: TOA Brightness Temperature % confidence at 9.7um (clear pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#44#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [9.36, 9.66, 9.96] - long_name: TOA Brightness Temperature % confidence at 9.7um (clear pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -701,12 +690,12 @@ datasets: quality_bt_cloudy_ir97: name: quality_bt_cloudy_ir97 + long_name: TOA Brightness Temperature % confidence at 9.7um (cloudy pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#45#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [9.36, 9.66, 9.96] - long_name: TOA Brightness Temperature % confidence at 9.7um (cloudy pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -715,12 +704,12 @@ datasets: quality_bt_all_ir105: name: quality_bt_all_ir105 + long_name: TOA Brightness Temperature % confidence at 10.5um (all pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#49#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [9.8, 10.5, 11.2] - long_name: TOA Brightness Temperature % confidence at 10.5um (all pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -729,12 +718,12 @@ datasets: quality_bt_clear_ir105: name: quality_bt_clear_ir105 + long_name: TOA Brightness Temperature % confidence at 10.5um (clear pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#50#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [9.8, 10.5, 11.2] - long_name: TOA Brightness Temperature % confidence at 10.5um (clear pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -743,12 +732,12 @@ datasets: quality_bt_cloudy_ir105: name: quality_bt_cloudy_ir105 + long_name: TOA Brightness Temperature % confidence at 10.5um (cloudy pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#51#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [9.8, 10.5, 11.2] - long_name: TOA Brightness Temperature % confidence at 10.5um (cloudy pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -757,12 +746,12 @@ datasets: quality_bt_all_ir123: name: quality_bt_all_ir123 + long_name: TOA Brightness Temperature % confidence at 12.3um (all pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#55#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [11.8, 12.3, 12.8] - long_name: TOA Brightness Temperature % confidence at 12.3um (all pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -771,12 +760,12 @@ datasets: quality_bt_clear_ir123: name: quality_bt_clear_ir123 + long_name: TOA Brightness Temperature % confidence at 12.3um (clear pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#56#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [11.8, 12.3, 12.8] - long_name: TOA Brightness Temperature % confidence at 12.3um (clear pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -785,12 +774,12 @@ datasets: quality_bt_cloudy_ir123: name: quality_bt_cloudy_ir123 + long_name: TOA Brightness Temperature % confidence at 12.3um (cloudy pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#57#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [11.8, 12.3, 12.8] - long_name: TOA Brightness Temperature % confidence at 12.3um (cloudy pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -799,12 +788,12 @@ datasets: quality_bt_all_ir133: name: quality_bt_all_ir133 + long_name: TOA Brightness Temperature % confidence at 13.3um (all pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#61#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [12.7, 13.3, 13.9] - long_name: TOA Brightness Temperature % confidence at 13.3um (all pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -813,12 +802,12 @@ datasets: quality_bt_clear_ir133: name: quality_bt_clear_ir133 + long_name: TOA Brightness Temperature % confidence at 13.3um (clear pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#62#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [12.7, 13.3, 13.9] - long_name: TOA Brightness Temperature % confidence at 13.3um (clear pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -827,12 +816,12 @@ datasets: quality_bt_cloudy_ir133: name: quality_bt_cloudy_ir133 + long_name: TOA Brightness Temperature % confidence at 13.3um (cloudy pixels) + standard_name: quality + resolution: 32000 file_type: fci_l2_bufr_asr key: '#63#brightnessTemperature->percentConfidence' - resolution: 32000 wavelength: [12.7, 13.3, 13.9] - long_name: TOA Brightness Temperature % confidence at 13.3um (cloudy pixels) - standard_name: quality unit: '%' fill_value: -1.0e+100 coordinates: @@ -841,12 +830,12 @@ datasets: std_bt_all_ir38: name: std_bt_all_ir38 + long_name: TOA Brightness Temperature standard deviation at 3.8um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#19#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [3.4, 3.8, 4.2] - long_name: TOA Brightness Temperature standard deviation at 3.8um (all pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -856,12 +845,12 @@ datasets: std_bt_clear_ir38: name: std_bt_clear_ir38 + long_name: TOA Brightness Temperature standard deviation at 3.8um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#20#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [3.4, 3.8, 4.2] - long_name: TOA Brightness Temperature standard deviation at 3.8um (clear pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -871,12 +860,12 @@ datasets: std_bt_cloudy_ir38: name: std_bt_cloudy_ir38 + long_name: TOA Brightness Temperature standard deviation at 3.8um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#21#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [3.4, 3.8, 4.2] - long_name: TOA Brightness Temperature standard deviation at 3.8um (cloudy pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -886,12 +875,12 @@ datasets: std_bt_all_wv63: name: std_bt_all_wv63 + long_name: TOA Brightness Temperature standard deviation at 6.3um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#25#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [5.3, 6.3, 7.3] - long_name: TOA Brightness Temperature standard deviation at 6.3um (all pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -901,12 +890,12 @@ datasets: std_bt_clear_wv63: name: std_bt_clear_wv63 + long_name: TOA Brightness Temperature standard deviation at 6.3um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#26#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [5.3, 6.3, 7.3] - long_name: TOA Brightness Temperature standard deviation at 6.3um (clear pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -916,12 +905,12 @@ datasets: std_bt_cloudy_wv63: name: std_bt_cloudy_wv63 + long_name: TOA Brightness Temperature standard deviation at 6.3um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#27#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [5.3, 6.3, 7.3] - long_name: TOA Brightness Temperature standard deviation at 6.3um (cloudy pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -931,12 +920,12 @@ datasets: std_bt_all_wv73: name: std_bt_all_wv73 + long_name: TOA Brightness Temperature standard deviation at 7.3um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#31#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [6.85, 7.35, 7.85] - long_name: TOA Brightness Temperature standard deviation at 7.3um (all pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -946,12 +935,12 @@ datasets: std_bt_clear_wv73: name: std_bt_clear_wv73 + long_name: TOA Brightness Temperature standard deviation at 7.3um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#32#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [6.85, 7.35, 7.85] - long_name: TOA Brightness Temperature standard deviation at 7.3um (clear pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -961,12 +950,12 @@ datasets: std_bt_cloudy_wv73: name: std_bt_cloudy_wv73 + long_name: TOA Brightness Temperature standard deviation at 7.3um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#33#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [6.85, 7.35, 7.85] - long_name: TOA Brightness Temperature standard deviation at 7.3um (cloudy pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -976,12 +965,12 @@ datasets: std_bt_all_ir87: name: std_bt_all_ir87 + long_name: TOA Brightness Temperature standard deviation at 8.7um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#37#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [8.3, 8.7, 9.1] - long_name: TOA Brightness Temperature standard deviation at 8.7um (all pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -991,12 +980,12 @@ datasets: std_bt_clear_ir87: name: std_bt_clear_ir87 + long_name: TOA Brightness Temperature standard deviation at 8.7um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#38#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [8.3, 8.7, 9.1] - long_name: TOA Brightness Temperature standard deviation at 8.7um (clear pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -1006,12 +995,12 @@ datasets: std_bt_cloudy_ir87: name: std_bt_cloudy_ir87 + long_name: TOA Brightness Temperature standard deviation at 8.7um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#39#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [8.3, 8.7, 9.1] - long_name: TOA Brightness Temperature standard deviation at 8.7um (cloudy pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -1021,12 +1010,12 @@ datasets: std_bt_all_ir97: name: std_bt_all_ir97 + long_name: TOA Brightness Temperature standard deviation at 9.7um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#43#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [9.36, 9.66, 9.96] - long_name: TOA Brightness Temperature standard deviation at 9.7um (all pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -1036,12 +1025,12 @@ datasets: std_bt_clear_ir97: name: std_bt_clear_ir97 + long_name: TOA Brightness Temperature standard deviation at 9.7um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#44#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [9.36, 9.66, 9.96] - long_name: TOA Brightness Temperature standard deviation at 9.7um (clear pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -1051,12 +1040,12 @@ datasets: std_bt_cloudy_ir97: name: std_bt_cloudy_ir97 + long_name: TOA Brightness Temperature standard deviation at 9.7um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#45#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [9.36, 9.66, 9.96] - long_name: TOA Brightness Temperature standard deviation at 9.7um (cloudy pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -1066,12 +1055,12 @@ datasets: std_bt_all_ir105: name: std_bt_all_ir105 + long_name: TOA Brightness Temperature standard deviation at 10.5um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#49#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [9.8, 10.5, 11.2] - long_name: TOA Brightness Temperature standard deviation at 10.5um (all pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -1081,12 +1070,12 @@ datasets: std_bt_clear_ir105: name: std_bt_clear_ir105 + long_name: TOA Brightness Temperature standard deviation at 10.5um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#50#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [9.8, 10.5, 11.2] - long_name: TOA Brightness Temperature standard deviation at 10.5um (clear pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -1096,12 +1085,12 @@ datasets: std_bt_cloudy_ir105: name: std_bt_cloudy_ir105 + long_name: TOA Brightness Temperature standard deviation at 10.5um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#51#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [9.8, 10.5, 11.2] - long_name: TOA Brightness Temperature standard deviation at 10.5um (cloudy pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -1111,12 +1100,12 @@ datasets: std_bt_all_ir123: name: std_bt_all_ir123 + long_name: TOA Brightness Temperature standard deviation at 12.3um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#55#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [11.8, 12.3, 12.8] - long_name: TOA Brightness Temperature standard deviation at 12.3um (all pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -1126,12 +1115,12 @@ datasets: std_bt_clear_ir123: name: std_bt_clear_ir123 + long_name: TOA Brightness Temperature standard deviation at 12.3um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#56#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [11.8, 12.3, 12.8] - long_name: TOA Brightness Temperature standard deviation at 12.3um (clear pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -1141,12 +1130,12 @@ datasets: std_bt_cloudy_ir123: name: std_bt_cloudy_ir123 + long_name: TOA Brightness Temperature standard deviation at 12.3um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#57#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [11.8, 12.3, 12.8] - long_name: TOA Brightness Temperature standard deviation at 12.3um (cloudy pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -1156,12 +1145,12 @@ datasets: std_bt_all_ir133: name: std_bt_all_ir133 + long_name: TOA Brightness Temperature standard deviation at 13.3um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#61#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [12.7, 13.3, 13.9] - long_name: TOA Brightness Temperature standard deviation at 13.3um (all pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -1171,12 +1160,12 @@ datasets: std_bt_clear_ir133: name: std_bt_clear_ir133 + long_name: TOA Brightness Temperature standard deviation at 13.3um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#62#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [12.7, 13.3, 13.9] - long_name: TOA Brightness Temperature standard deviation at 13.3um (clear pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -1186,12 +1175,12 @@ datasets: std_bt_cloudy_ir133: name: std_bt_cloudy_ir133 + long_name: TOA Brightness Temperature standard deviation at 13.3um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 file_type: fci_l2_bufr_asr key: '#63#brightnessTemperature->firstOrderStatisticalValue' - resolution: 32000 wavelength: [12.7, 13.3, 13.9] - long_name: TOA Brightness Temperature standard deviation at 13.3um (cloudy pixels) - standard_name: toa_brightess_temperature cell_method: area:standard_deviation unit: K fill_value: -1.0e+100 @@ -1201,10 +1190,11 @@ datasets: pixel_percentage_clear: name: pixel_percentage_clear + long_name: Clear Sky Fraction in Segment + standard_name: pixels_used_fraction + resolution: 32000 file_type: fci_l2_bufr_asr key: '#1#amountSegmentCloudFree' - resolution: 32000 - long_name: Clear Sky Fraction in Segment fill_value: -1.0e+100 coordinates: - longitude From 05a7fb8e00d00c617a534efe769bc12bea1599b0 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Wed, 20 Mar 2024 12:14:01 +0100 Subject: [PATCH 16/41] rename files to make them generic readers / unit test --- satpy/readers/{seviri_l2_bufr.py => eum_l2_bufr.py} | 0 .../reader_tests/{test_seviri_l2_bufr.py => test_eum_l2_bufr.py} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename satpy/readers/{seviri_l2_bufr.py => eum_l2_bufr.py} (100%) rename satpy/tests/reader_tests/{test_seviri_l2_bufr.py => test_eum_l2_bufr.py} (100%) diff --git a/satpy/readers/seviri_l2_bufr.py b/satpy/readers/eum_l2_bufr.py similarity index 100% rename from satpy/readers/seviri_l2_bufr.py rename to satpy/readers/eum_l2_bufr.py diff --git a/satpy/tests/reader_tests/test_seviri_l2_bufr.py b/satpy/tests/reader_tests/test_eum_l2_bufr.py similarity index 100% rename from satpy/tests/reader_tests/test_seviri_l2_bufr.py rename to satpy/tests/reader_tests/test_eum_l2_bufr.py From 5566d2313189d47cc6e595e02014c682950b3544 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Wed, 20 Mar 2024 14:44:15 +0100 Subject: [PATCH 17/41] Updated EUM BUFR readers and yaml files --- satpy/etc/readers/fci_l2_bufr.yaml | 1201 ++++++++++++++++++ satpy/etc/readers/seviri_l2_bufr.yaml | 12 +- satpy/readers/eum_l2_bufr.py | 167 ++- satpy/tests/reader_tests/test_eum_l2_bufr.py | 343 +++-- 4 files changed, 1541 insertions(+), 182 deletions(-) create mode 100644 satpy/etc/readers/fci_l2_bufr.yaml diff --git a/satpy/etc/readers/fci_l2_bufr.yaml b/satpy/etc/readers/fci_l2_bufr.yaml new file mode 100644 index 0000000000..3e75cc75b6 --- /dev/null +++ b/satpy/etc/readers/fci_l2_bufr.yaml @@ -0,0 +1,1201 @@ +reader: + name: fci_l2_bufr + short_name: FCI l2 BUFR + long_name: MTGi Level 2 products in BUFR format + description: FCI L2 BUFR Product Reader + status: Alpha, AMV BUFR products not supported yet + supports_fsspec: false + sensors: [fci] + default_channels: [] + reader: !!python/name:satpy.readers.yaml_reader.GEOFlippableFileYAMLReader + +file_types: + fci_l2_bufr_asr: + file_reader: !!python/name:satpy.readers.eum_l2_bufr.EumetsatL2BufrFileHandler + file_patterns: + - '{pflag}_{location_indicator},{data_designator},MTI{spacecraft_id:1d}+FCI-2-ASR-{subtype}-{coverage}-{subsetting}-{component1}-{component2}-{component3}-{purpose}-BUFR_{oflag}_{originator}_{processing_time:%Y%m%d%H%M%S}_{facility_or_tool}_{environment}_{start_time:%Y%m%d%H%M%S}_{end_time:%Y%m%d%H%M%S}_{processing_mode}_{special_compression}_{disposition_mode}_{repeat_cycle_in_day:>04d}_{count_in_repeat_cycle:>04d}.bin' + fci_l2_bufr_amv: + file_reader: !!python/name:satpy.readers.eum_l2_bufr.EumetsatL2BufrFileHandler + file_patterns: + - '{pflag}_{location_indicator},{data_designator},MTI{spacecraft_id:1d}+FCI-2-AMV-{subtype}-{coverage}-{subsetting}-{component1}-{component2}-{component3}-{purpose}-BUFR_{oflag}_{originator}_{processing_time:%Y%m%d%H%M%S}_{facility_or_tool}_{environment}_{start_time:%Y%m%d%H%M%S}_{end_time:%Y%m%d%H%M%S}_{processing_mode}_{special_compression}_{disposition_mode}_{repeat_cycle_in_day:>04d}_{count_in_repeat_cycle:>04d}.bin' + +datasets: + #----- COMMON ------------------ + latitude: + name: latitude + key: '#1#latitude' + resolution: [32000] + file_type: [fci_l2_bufr_asr, fci_l2_bufr_amv] + standard_name: latitude + units: degree_north + fill_value: -1.e+100 + + longitude: + name: longitude + key: '#1#longitude' + resolution: [32000] + file_type: [fci_l2_bufr_asr, fci_l2_bufr_amv] + standard_name: longitude + units: degree_east + fill_value: -1.e+100 + + # ---- AMV products ------------ + pressure: + name: pressure + file_type: fci_l2_bufr_amv + key: '#1#pressure' + resolution: none + long_name: Pressure of AMV feature + standard_name: pressure_at_wind_level + units: hPa + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + temperature: + name: temperature + file_type: fci_l2_bufr_amv + key: '#1#airTemperature' + resolution: none + long_name: Temperature of AMV feature + standard_name: temperature_at_wind_level + units: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + height: + name: height + file_type: fci_l2_bufr_amv + key: '#1#heightOfTopOfCloud' + resolution: null + long_name: Height of AMV feature + standard_name: height_at_wind_level + units: m + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + direction: + name: direction + file_type: fci_l2_bufr_amv + key: '#1#windDirection' + resolution: none + long_name: Direction of AMV + standard_name: wind_to_direction + units: degree_north + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + speed: + name: speed + file_type: fci_l2_bufr_amv + key: '#1#windSpeed' + resolution: none + long_name: Speed of AMV + standard_name: wind_speed + units: m/s + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + u: + name: u + file_type: fci_l2_bufr_amv + key: '#1#u' + resolution: none + long_name: Speed U component of AMV + standard_name: wind_speed_horizontal_component + units: m/s + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + v: + name: v + file_type: fci_l2_bufr_amv + key: '#1#v' + resolution: none + long_name: Speed V component of AMV + standard_name: wind_speed_vertival_component + units: m/s + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + # ---- ASR products ------------ + bt_mean_all_ir38: + name: bt_mean_all_ir38 + long_name: TOA Brightness Temperature segment mean at 3.8um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#19#brightnessTemperature' + wavelength: [3.4, 3.8, 4.2] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_clear_ir38: + name: bt_mean_clear_ir38 + long_name: TOA Brightness Temperature segment mean at 3.8um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#20#brightnessTemperature' + wavelength: [3.4, 3.8, 4.2] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_cloudy_ir38: + name: bt_mean_cloudy_ir38 + long_name: TOA Brightness Temperature segment mean at 3.8um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#21#brightnessTemperature' + wavelength: [3.4, 3.8, 4.2] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_all_wv63: + name: bt_mean_all_wv63 + long_name: TOA Brightness Temperature segment mean at 6.3um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#25#brightnessTemperature' + wavelength: [5.3, 6.3, 7.3] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_clear_wv63: + name: bt_mean_clear_wv63 + long_name: TOA Brightness Temperature segment mean at 6.3um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#26#brightnessTemperature' + wavelength: [5.3, 6.3, 7.3] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_cloudy_wv63: + name: bt_mean_cloudy_wv63 + long_name: TOA Brightness Temperature segment mean at 6.3um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#27#brightnessTemperature' + wavelength: [5.3, 6.3, 7.3] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_all_wv73: + name: bt_mean_all_wv73 + long_name: TOA Brightness Temperature segment mean at 7.3um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#31#brightnessTemperature' + wavelength: [6.85, 7.35, 7.85] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_clear_wv73: + name: bt_mean_clear_wv73 + long_name: TOA Brightness Temperature segment mean at 7.3um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#32#brightnessTemperature' + wavelength: [6.85, 7.35, 7.85] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_cloudy_wv73: + name: bt_mean_cloudy_wv73 + long_name: TOA Brightness Temperature segment mean at 7.3um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#33#brightnessTemperature' + wavelength: [6.85, 7.35, 7.85] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_all_ir87: + name: bt_mean_all_ir87 + long_name: TOA Brightness Temperature segment mean at 8.7um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#37#brightnessTemperature' + wavelength: [8.3, 8.7, 9.1] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_clear_ir87: + name: bt_mean_clear_ir87 + long_name: TOA Brightness Temperature segment mean at 8.7um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#38#brightnessTemperature' + wavelength: [8.3, 8.7, 9.1] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_cloudy_ir87: + name: bt_mean_cloudy_ir87 + long_name: TOA Brightness Temperature segment mean at 8.7um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#39#brightnessTemperature' + wavelength: [8.3, 8.7, 9.1] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_all_ir97: + name: bt_mean_all_ir97 + long_name: TOA Brightness Temperature segment mean at 9.7um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#43#brightnessTemperature' + wavelength: [9.36, 9.66, 9.96] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_clear_ir97: + name: bt_mean_clear_ir97 + long_name: TOA Brightness Temperature segment mean at 9.7um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#44#brightnessTemperature' + wavelength: [9.36, 9.66, 9.96] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_cloudy_ir97: + name: bt_mean_cloudy_ir97 + long_name: TOA Brightness Temperature segment mean at 9.7um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#45#brightnessTemperature' + wavelength: [9.36, 9.66, 9.96] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_all_ir105: + name: bt_mean_all_ir105 + long_name: TOA Brightness Temperature segment mean at 10.5um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#49#brightnessTemperature' + wavelength: [9.8, 10.5, 11.2] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_clear_ir105: + name: bt_mean_clear_ir105 + long_name: TOA Brightness Temperature segment mean at 10.5um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#50#brightnessTemperature' + wavelength: [9.8, 10.5, 11.2] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_cloudy_ir105: + name: bt_mean_cloudy_ir105 + long_name: TOA Brightness Temperature segment mean at 10.5um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#51#brightnessTemperature' + wavelength: [9.8, 10.5, 11.2] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_all_ir123: + name: bt_mean_all_ir123 + long_name: TOA Brightness Temperature segment mean at 12.3um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#55#brightnessTemperature' + wavelength: [11.8, 12.3, 12.8] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_clear_ir123: + name: bt_mean_clear_ir123 + long_name: TOA Brightness Temperature segment mean at 12.3um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#56#brightnessTemperature' + wavelength: [11.8, 12.3, 12.8] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_cloudy_ir123: + name: bt_mean_cloudy_ir123 + long_name: TOA Brightness Temperature segment mean at 12.3um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#57#brightnessTemperature' + wavelength: [11.8, 12.3, 12.8] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_all_ir133: + name: bt_mean_all_ir133 + long_name: TOA Brightness Temperature segment mean at 13.3um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#61#brightnessTemperature' + wavelength: [12.7, 13.3, 13.9] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_clear_ir133: + name: bt_mean_clear_ir133 + long_name: TOA Brightness Temperature segment mean at 13.3um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#62#brightnessTemperature' + wavelength: [12.7, 13.3, 13.9] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + bt_mean_cloudy_ir133: + name: bt_mean_cloudy_ir133 + long_name: TOA Brightness Temperature segment mean at 13.3um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#63#brightnessTemperature' + wavelength: [12.7, 13.3, 13.9] + cell_method: area:mean + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_all_ir38: + name: quality_bt_all_ir38 + long_name: TOA Brightness Temperature % confidence at 3.8um (all pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#19#brightnessTemperature->percentConfidence' + wavelength: [3.4, 3.8, 4.2] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_clear_ir38: + name: quality_bt_clear_ir38 + long_name: TOA Brightness Temperature % confidence at 3.8um (clear pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#20#brightnessTemperature->percentConfidence' + wavelength: [3.4, 3.8, 4.2] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_cloudy_ir38: + name: quality_bt_cloudy_ir38 + long_name: TOA Brightness Temperature % confidence at 3.8um (cloudy pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#21#brightnessTemperature->percentConfidence' + wavelength: [3.4, 3.8, 4.2] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_all_wv63: + name: quality_bt_all_wv63 + long_name: TOA Brightness Temperature % confidence at 6.3um (all pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#25#brightnessTemperature->percentConfidence' + wavelength: [5.3, 6.3, 7.3] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_clear_wv63: + name: quality_bt_clear_wv63 + long_name: TOA Brightness Temperature % confidence at 6.3um (clear pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#26#brightnessTemperature->percentConfidence' + wavelength: [5.3, 6.3, 7.3] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_cloudy_wv63: + name: quality_bt_cloudy_wv63 + long_name: TOA Brightness Temperature % confidence at 6.3um (cloudy pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#27#brightnessTemperature->percentConfidence' + wavelength: [5.3, 6.3, 7.3] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_all_wv73: + name: quality_bt_all_wv73 + long_name: TOA Brightness Temperature % confidence at 7.3um (all pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#31#brightnessTemperature->percentConfidence' + wavelength: [6.85, 7.35, 7.85] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_clear_wv73: + name: quality_bt_clear_wv73 + long_name: TOA Brightness Temperature % confidence at 7.3um (clear pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#32#brightnessTemperature->percentConfidence' + wavelength: [6.85, 7.35, 7.85] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_cloudy_wv73: + name: quality_bt_cloudy_wv73 + long_name: TOA Brightness Temperature % confidence at 7.3um (cloudy pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#33#brightnessTemperature->percentConfidence' + wavelength: [6.85, 7.35, 7.85] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_all_ir87: + name: quality_bt_all_ir87 + long_name: TOA Brightness Temperature % confidence at 8.7um (all pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#37#brightnessTemperature->percentConfidence' + wavelength: [8.3, 8.7, 9.1] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_clear_ir87: + name: quality_bt_clear_ir87 + long_name: TOA Brightness Temperature % confidence at 8.7um (clear pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#38#brightnessTemperature->percentConfidence' + wavelength: [8.3, 8.7, 9.1] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_cloudy_ir87: + name: quality_bt_cloudy_ir87 + long_name: TOA Brightness Temperature % confidence at 8.7um (cloudy pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#39#brightnessTemperature->percentConfidence' + wavelength: [8.3, 8.7, 9.1] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_all_ir97: + name: quality_bt_all_ir97 + long_name: TOA Brightness Temperature % confidence at 9.7um (all pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#43#brightnessTemperature->percentConfidence' + wavelength: [9.36, 9.66, 9.96] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_clear_ir97: + name: quality_bt_clear_ir97 + long_name: TOA Brightness Temperature % confidence at 9.7um (clear pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#44#brightnessTemperature->percentConfidence' + wavelength: [9.36, 9.66, 9.96] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_cloudy_ir97: + name: quality_bt_cloudy_ir97 + long_name: TOA Brightness Temperature % confidence at 9.7um (cloudy pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#45#brightnessTemperature->percentConfidence' + wavelength: [9.36, 9.66, 9.96] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_all_ir105: + name: quality_bt_all_ir105 + long_name: TOA Brightness Temperature % confidence at 10.5um (all pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#49#brightnessTemperature->percentConfidence' + wavelength: [9.8, 10.5, 11.2] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_clear_ir105: + name: quality_bt_clear_ir105 + long_name: TOA Brightness Temperature % confidence at 10.5um (clear pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#50#brightnessTemperature->percentConfidence' + wavelength: [9.8, 10.5, 11.2] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_cloudy_ir105: + name: quality_bt_cloudy_ir105 + long_name: TOA Brightness Temperature % confidence at 10.5um (cloudy pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#51#brightnessTemperature->percentConfidence' + wavelength: [9.8, 10.5, 11.2] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_all_ir123: + name: quality_bt_all_ir123 + long_name: TOA Brightness Temperature % confidence at 12.3um (all pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#55#brightnessTemperature->percentConfidence' + wavelength: [11.8, 12.3, 12.8] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_clear_ir123: + name: quality_bt_clear_ir123 + long_name: TOA Brightness Temperature % confidence at 12.3um (clear pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#56#brightnessTemperature->percentConfidence' + wavelength: [11.8, 12.3, 12.8] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_cloudy_ir123: + name: quality_bt_cloudy_ir123 + long_name: TOA Brightness Temperature % confidence at 12.3um (cloudy pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#57#brightnessTemperature->percentConfidence' + wavelength: [11.8, 12.3, 12.8] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_all_ir133: + name: quality_bt_all_ir133 + long_name: TOA Brightness Temperature % confidence at 13.3um (all pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#61#brightnessTemperature->percentConfidence' + wavelength: [12.7, 13.3, 13.9] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_clear_ir133: + name: quality_bt_clear_ir133 + long_name: TOA Brightness Temperature % confidence at 13.3um (clear pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#62#brightnessTemperature->percentConfidence' + wavelength: [12.7, 13.3, 13.9] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + quality_bt_cloudy_ir133: + name: quality_bt_cloudy_ir133 + long_name: TOA Brightness Temperature % confidence at 13.3um (cloudy pixels) + standard_name: quality + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#63#brightnessTemperature->percentConfidence' + wavelength: [12.7, 13.3, 13.9] + unit: '%' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_all_ir38: + name: std_bt_all_ir38 + long_name: TOA Brightness Temperature standard deviation at 3.8um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#19#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [3.4, 3.8, 4.2] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_clear_ir38: + name: std_bt_clear_ir38 + long_name: TOA Brightness Temperature standard deviation at 3.8um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#20#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [3.4, 3.8, 4.2] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_cloudy_ir38: + name: std_bt_cloudy_ir38 + long_name: TOA Brightness Temperature standard deviation at 3.8um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#21#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [3.4, 3.8, 4.2] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_all_wv63: + name: std_bt_all_wv63 + long_name: TOA Brightness Temperature standard deviation at 6.3um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#25#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [5.3, 6.3, 7.3] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_clear_wv63: + name: std_bt_clear_wv63 + long_name: TOA Brightness Temperature standard deviation at 6.3um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#26#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [5.3, 6.3, 7.3] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_cloudy_wv63: + name: std_bt_cloudy_wv63 + long_name: TOA Brightness Temperature standard deviation at 6.3um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#27#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [5.3, 6.3, 7.3] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_all_wv73: + name: std_bt_all_wv73 + long_name: TOA Brightness Temperature standard deviation at 7.3um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#31#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [6.85, 7.35, 7.85] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_clear_wv73: + name: std_bt_clear_wv73 + long_name: TOA Brightness Temperature standard deviation at 7.3um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#32#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [6.85, 7.35, 7.85] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_cloudy_wv73: + name: std_bt_cloudy_wv73 + long_name: TOA Brightness Temperature standard deviation at 7.3um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#33#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [6.85, 7.35, 7.85] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_all_ir87: + name: std_bt_all_ir87 + long_name: TOA Brightness Temperature standard deviation at 8.7um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#37#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [8.3, 8.7, 9.1] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_clear_ir87: + name: std_bt_clear_ir87 + long_name: TOA Brightness Temperature standard deviation at 8.7um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#38#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [8.3, 8.7, 9.1] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_cloudy_ir87: + name: std_bt_cloudy_ir87 + long_name: TOA Brightness Temperature standard deviation at 8.7um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#39#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [8.3, 8.7, 9.1] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_all_ir97: + name: std_bt_all_ir97 + long_name: TOA Brightness Temperature standard deviation at 9.7um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#43#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [9.36, 9.66, 9.96] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_clear_ir97: + name: std_bt_clear_ir97 + long_name: TOA Brightness Temperature standard deviation at 9.7um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#44#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [9.36, 9.66, 9.96] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_cloudy_ir97: + name: std_bt_cloudy_ir97 + long_name: TOA Brightness Temperature standard deviation at 9.7um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#45#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [9.36, 9.66, 9.96] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_all_ir105: + name: std_bt_all_ir105 + long_name: TOA Brightness Temperature standard deviation at 10.5um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#49#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [9.8, 10.5, 11.2] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_clear_ir105: + name: std_bt_clear_ir105 + long_name: TOA Brightness Temperature standard deviation at 10.5um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#50#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [9.8, 10.5, 11.2] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_cloudy_ir105: + name: std_bt_cloudy_ir105 + long_name: TOA Brightness Temperature standard deviation at 10.5um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#51#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [9.8, 10.5, 11.2] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_all_ir123: + name: std_bt_all_ir123 + long_name: TOA Brightness Temperature standard deviation at 12.3um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#55#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [11.8, 12.3, 12.8] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_clear_ir123: + name: std_bt_clear_ir123 + long_name: TOA Brightness Temperature standard deviation at 12.3um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#56#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [11.8, 12.3, 12.8] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_cloudy_ir123: + name: std_bt_cloudy_ir123 + long_name: TOA Brightness Temperature standard deviation at 12.3um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#57#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [11.8, 12.3, 12.8] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_all_ir133: + name: std_bt_all_ir133 + long_name: TOA Brightness Temperature standard deviation at 13.3um (all pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#61#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [12.7, 13.3, 13.9] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_clear_ir133: + name: std_bt_clear_ir133 + long_name: TOA Brightness Temperature standard deviation at 13.3um (clear pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#62#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [12.7, 13.3, 13.9] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + std_bt_cloudy_ir133: + name: std_bt_cloudy_ir133 + long_name: TOA Brightness Temperature standard deviation at 13.3um (cloudy pixels) + standard_name: toa_brightess_temperature + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#63#brightnessTemperature->firstOrderStatisticalValue' + wavelength: [12.7, 13.3, 13.9] + cell_method: area:standard_deviation + unit: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + pixel_percentage_clear: + name: pixel_percentage_clear + long_name: Clear Sky Fraction in Segment + standard_name: pixels_used_fraction + resolution: 32000 + file_type: fci_l2_bufr_asr + key: '#1#amountSegmentCloudFree' + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude diff --git a/satpy/etc/readers/seviri_l2_bufr.yaml b/satpy/etc/readers/seviri_l2_bufr.yaml index e0c51c4370..298e5a15be 100644 --- a/satpy/etc/readers/seviri_l2_bufr.yaml +++ b/satpy/etc/readers/seviri_l2_bufr.yaml @@ -11,41 +11,41 @@ reader: file_types: seviri_l2_bufr_asr: - file_reader: !!python/name:satpy.readers.seviri_l2_bufr.SeviriL2BufrFileHandler + file_reader: !!python/name:satpy.readers.eum_l2_bufr.EumetsatL2BufrFileHandler file_patterns: - 'ASRBUFRProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:s}_{satellite:s}_{mission:s}_{subsat:s}' - '{spacecraft:s}-SEVI-MSGASRE-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}.bfr' - '{spacecraft:s}-SEVI-MSGASRE-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}' seviri_l2_bufr_cla: - file_reader: !!python/name:satpy.readers.seviri_l2_bufr.SeviriL2BufrFileHandler + file_reader: !!python/name:satpy.readers.eum_l2_bufr.EumetsatL2BufrFileHandler file_patterns: - 'CLABUFRProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:s}_{satellite:s}_{mission:s}_{subsat:s}' - '{spacecraft:s}-SEVI-MSGCLAP-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}.bfr' - '{spacecraft:s}-SEVI-MSGCLAP-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}' seviri_l2_bufr_csr: - file_reader: !!python/name:satpy.readers.seviri_l2_bufr.SeviriL2BufrFileHandler + file_reader: !!python/name:satpy.readers.eum_l2_bufr.EumetsatL2BufrFileHandler file_patterns: - 'CSRBUFRProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:s}_{satellite:s}_{mission:s}_{subsat:s}' - '{spacecraft:s}-SEVI-MSGCSKR-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}.bfr' - '{spacecraft:s}-SEVI-MSGCSKR-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}' seviri_l2_bufr_gii: - file_reader: !!python/name:satpy.readers.seviri_l2_bufr.SeviriL2BufrFileHandler + file_reader: !!python/name:satpy.readers.eum_l2_bufr.EumetsatL2BufrFileHandler file_patterns: - 'GIIBUFRProduct_{start_time:%Y%m%d%H%M%S}Z_00_{server:s}_{satellite:s}_{mission:s}_{subsat:s}' - '{spacecraft:s}-SEVI-MSGGIIN-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}.bfr' - '{spacecraft:s}-SEVI-MSGGIIN-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}' seviri_l2_bufr_thu: - file_reader: !!python/name:satpy.readers.seviri_l2_bufr.SeviriL2BufrFileHandler + file_reader: !!python/name:satpy.readers.eum_l2_bufr.EumetsatL2BufrFileHandler file_patterns: - 'THBUFRProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:s}_{satellite:s}_{mission:s}_{subsat:s}' - '{spacecraft:s}-SEVI-MSGTPHU-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}.bfr' - '{spacecraft:s}-SEVI-MSGTPHU-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}' seviri_l2_bufr_toz: - file_reader: !!python/name:satpy.readers.seviri_l2_bufr.SeviriL2BufrFileHandler + file_reader: !!python/name:satpy.readers.eum_l2_bufr.EumetsatL2BufrFileHandler file_patterns: - 'TOZBUFRProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:s}_{satellite:s}_{mission:s}_{subsat:s}' - '{spacecraft:s}-SEVI-MSGTOZN-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}.bfr' diff --git a/satpy/readers/eum_l2_bufr.py b/satpy/readers/eum_l2_bufr.py index 02aa0c2767..13df36f31b 100644 --- a/satpy/readers/eum_l2_bufr.py +++ b/satpy/readers/eum_l2_bufr.py @@ -24,7 +24,8 @@ """ import logging -from datetime import datetime, timedelta +import os +from datetime import datetime import dask.array as da import numpy as np @@ -43,20 +44,41 @@ raise ImportError( "Missing eccodes-python and/or eccodes C-library installation. Use conda to install eccodes") +logger = logging.getLogger("EumetsatL2Bufr") + CHUNK_SIZE = get_legacy_chunk_size() -logger = logging.getLogger("SeviriL2Bufr") -data_center_dict = {55: {"ssp": "E0415", "name": "08"}, 56: {"ssp": "E0455", "name": "09"}, - 57: {"ssp": "E0095", "name": "10"}, 70: {"ssp": "E0000", "name": "11"}} +SSP_DEFAULT = 0.0 +BUFR_FILL_VALUE = -1.e+100 + +data_center_dict = {55: {"ssp": "E0415", "name": "MSG1"}, 56: {"ssp": "E0455", "name": "MSG2"}, + 57: {"ssp": "E0095", "name": "MSG3"}, 70: {"ssp": "E0000", "name": "MSG4"}, + 71: {"ssp": "E0000", "name": "MTGi1"}} +# This is the size number of pixels making a segment seg_size_dict = {"seviri_l2_bufr_asr": 16, "seviri_l2_bufr_cla": 16, "seviri_l2_bufr_csr": 16, "seviri_l2_bufr_gii": 3, "seviri_l2_bufr_thu": 16, "seviri_l2_bufr_toz": 3, - "seviri_l2_bufr_amv": 24} + "seviri_l2_bufr_amv": None, + "fci_l2_bufr_asr": 32, "fci_l2_bufr_amv": None} + +# This is the physical size of the segment, in meters +resolution_dict = {"seviri_l2_bufr_asr": 48000, "seviri_l2_bufr_cla": 48000, + "seviri_l2_bufr_csr": 48000, "seviri_l2_bufr_gii": 9000, + "seviri_l2_bufr_thu": 48000, "seviri_l2_bufr_toz": 9000, + "seviri_l2_bufr_amv": None, + "fci_l2_bufr_asr": 32000, "fci_l2_bufr_amv": None} + +# List of variables that are returned by eccodes as array, but we want as single value +deprecate_to_single_value = ["satelliteIdentifier"] + + +# Need to set this in order to get consistent array sizes from eccodes +os.environ["ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS"] = "1" -class SeviriL2BufrFileHandler(BaseFileHandler): - """File handler for SEVIRI L2 BUFR products. +class EumetsatL2BufrFileHandler(BaseFileHandler): + """File handler for EUMETSAT SEVIRI and FCI L2 BUFR products. **Loading data with AreaDefinition** @@ -65,8 +87,8 @@ class SeviriL2BufrFileHandler(BaseFileHandler): be loaded with a SwathDefinition, i.e. similar to how the data are stored in the BUFR file: scene = satpy.Scene(filenames, - reader='seviri_l2_bufr', - reader_kwargs={'with_area_definition': False}) + reader="seviri_l2_bufr", + reader_kwargs={"with_area_definition": False}) **Defining dataset recticifation longitude** @@ -76,62 +98,75 @@ class SeviriL2BufrFileHandler(BaseFileHandler): rectification longitude can be defined by the user by providing `rectification_longitude` in the `reader_kwargs`: scene = satpy.Scene(filenames, - reader='seviri_l2_bufr', - reader_kwargs={'rectification_longitude': 0.0}) + reader="seviri_l2_bufr", + reader_kwargs={"rectification_longitude": 0.0}) If not done, default values applicable to the operational grids of the respective SEVIRI instruments will be used. """ def __init__(self, filename, filename_info, filetype_info, with_area_definition=False, rectification_longitude="default", **kwargs): - """Initialise the file handler for SEVIRI L2 BUFR data.""" - super(SeviriL2BufrFileHandler, self).__init__(filename, - filename_info, - filetype_info) + """Initialise the file handler for EUMETSAT SEVIRI and FCI L2 BUFR data.""" + super(EumetsatL2BufrFileHandler, self).__init__(filename, + filename_info, + filetype_info) if ("server" in filename_info): # EUMETSAT Offline Bufr product - self.mpef_header = self._read_mpef_header() + self.bufr_header = self._read_mpef_header() else: # Product was retrieved from the EUMETSAT Data Center - timeStr = self.get_attribute("typicalDate")+self.get_attribute("typicalTime") - buf_start_time = datetime.strptime(timeStr, "%Y%m%d%H%M%S") - sc_id = self.get_attribute("satelliteIdentifier") - self.mpef_header = {} - self.mpef_header["NominalTime"] = buf_start_time - self.mpef_header["SpacecraftName"] = data_center_dict[sc_id]["name"] - self.mpef_header["RectificationLongitude"] = data_center_dict[sc_id]["ssp"] + # get all attributes in one call + attr = self.get_attributes(["typicalDate", "typicalTime", "satelliteIdentifier"]) + timeStr = attr["typicalDate"]+attr["typicalTime"] + sc_id = int(attr["satelliteIdentifier"]) + + self.bufr_header = {} + self.bufr_header["NominalTime"] = datetime.strptime(timeStr, "%Y%m%d%H%M%S") + self.bufr_header["SpacecraftName"] = data_center_dict[sc_id]["name"] + self.bufr_header["RectificationLongitude"] = data_center_dict[sc_id]["ssp"] if rectification_longitude != "default": - self.mpef_header["RectificationLongitude"] = f"E{int(rectification_longitude * 10):04d}" + self.bufr_header["RectificationLongitude"] = f"E{int(rectification_longitude * 10):04d}" - self.with_adef = with_area_definition - if self.with_adef and filetype_info["file_type"] == "seviri_l2_bufr_amv": - logging.warning("AMV BUFR data cannot be loaded with an area definition. Setting self.with_def = False.") + self.filetype = filetype_info["file_type"] + self.seg_size = seg_size_dict[self.filetype] + if self.seg_size: + # make this keyword not usable for non-grided products + self.with_adef = with_area_definition + else: self.with_adef = False - self.seg_size = seg_size_dict[filetype_info["file_type"]] - @property def start_time(self): """Return the repeat cycle start time.""" - return self.mpef_header["NominalTime"] - - @property - def end_time(self): - """Return the repeat cycle end time.""" - return self.start_time + timedelta(minutes=15) + return self.bufr_header["NominalTime"] @property def platform_name(self): """Return spacecraft name.""" - return "MET{}".format(self.mpef_header["SpacecraftName"]) + if self.bufr_header["SpacecraftName"].isdigit(): + # self._read_mpef_header will return the SpacecraftName as a string with an integer, representing the + # Meteosat series number (1-11). This is cnverted to the corresponding MSG ID. + return f'MSG{int(self.bufr_header["SpacecraftName"])-7}' + else: + return self.bufr_header["SpacecraftName"] + + @property + def sensor_name(self): + """Return instrument name.""" + if self.platform_name.startswith("MSG"): + return "seviri" + elif self.platform_name.startswith("MTG"): + return "fci" + else: + raise NotImplementedError(f"Unknown satellite platform {self.platform_name}.") @property def ssp_lon(self): """Return subsatellite point longitude.""" # e.g. E0415 - ssp_lon = self.mpef_header["RectificationLongitude"] + ssp_lon = self.bufr_header["RectificationLongitude"] return float(ssp_lon[1:])/10. def get_area_def(self, key): @@ -146,19 +181,36 @@ def _read_mpef_header(self): hdr = np.fromfile(self.filename, mpef_product_header, 1) return recarray2dict(hdr) - def get_attribute(self, key): + def get_attributes(self, keys): """Get BUFR attributes.""" # This function is inefficient as it is looping through the entire # file to get 1 attribute. It causes a problem though if you break # from the file early - dont know why but investigating - fix later fh = open(self.filename, "rb") + + # initialize output + attr = dict() + while True: # get handle for message bufr = ec.codes_bufr_new_from_file(fh) if bufr is None: break ec.codes_set(bufr, "unpack", 1) - attr = ec.codes_get(bufr, key) + for k in keys: + try: + if k in deprecate_to_single_value: + # Extract satelliteIdentifier single value. The satelliteIdentifier attribute is returned as an + # array becasue the environment variable ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS is set to 1. + value = ec.codes_get_array(bufr, k)[0] + else: + value = ec.codes_get(bufr, k) + attr[k] = value + + except BaseException: + attr[k] = None + logging.warning(f"Failed to read key {k} from message") + ec.codes_release(bufr) fh.close() @@ -175,13 +227,20 @@ def get_array(self, key): ec.codes_set(bufr, "unpack", 1) + if not ec.codes_is_defined(bufr, key): + logging.warning(f"Key: {key} does not exist in BUFR file") + return None + + # Introduced fix for cases where all values in the expected array are the same + # (in particular fill values) which causes the eccodes to encode them and return + # them as a single value + # if is the first message initialise our final array if (msgCount == 0): - arr = da.from_array(ec.codes_get_array( - bufr, key, float), chunks=CHUNK_SIZE) + arr = da.from_array(ec.codes_get_array(bufr, key, float), chunks=CHUNK_SIZE) + else: - tmpArr = da.from_array(ec.codes_get_array( - bufr, key, float), chunks=CHUNK_SIZE) + tmpArr = da.from_array(ec.codes_get_array(bufr, key, float), chunks=CHUNK_SIZE) arr = da.concatenate((arr, tmpArr)) msgCount = msgCount+1 @@ -202,7 +261,7 @@ def get_dataset(self, dataset_id, dataset_info): arr = self.get_array(dataset_info["key"]) if self.with_adef: - xarr = self.get_dataset_with_area_def(arr, dataset_id) + xarr = self.get_dataset_with_area_def(arr, dataset_id, dataset_info["resolution"]) # coordinates are not relevant when returning data with an AreaDefinition if "coordinates" in dataset_info.keys(): del dataset_info["coordinates"] @@ -213,18 +272,16 @@ def get_dataset(self, dataset_id, dataset_info): xarr = xarr.where(xarr != dataset_info["fill_value"]) self._add_attributes(xarr, dataset_info) - return xarr - def get_dataset_with_area_def(self, arr, dataset_id): + def get_dataset_with_area_def(self, arr, dataset_id, resolution): """Get dataset with an AreaDefinition.""" if dataset_id["name"] in ["latitude", "longitude"]: self.__setattr__(dataset_id["name"], arr) xarr = xr.DataArray(arr, dims=["y"]) else: lons_1d, lats_1d, data_1d = da.compute(self.longitude, self.latitude, arr) - - self._area_def = self._construct_area_def(dataset_id) + self._area_def = self._construct_area_def(dataset_id, resolution) icol, irow = self._area_def.get_array_indices_from_lonlat(lons_1d, lats_1d) data_2d = np.empty(self._area_def.shape) @@ -241,22 +298,20 @@ def get_dataset_with_area_def(self, arr, dataset_id): return xarr - def _construct_area_def(self, dataset_id): + def _construct_area_def(self, dataset_id, resolution): """Construct a standardized AreaDefinition based on satellite, instrument, resolution and sub-satellite point. Returns: AreaDefinition: A pyresample AreaDefinition object containing the area definition. """ - res = dataset_id["resolution"] - - area_naming_input_dict = {"platform_name": "msg", - "instrument_name": "seviri", - "resolution": res, + area_naming_input_dict = {"platform_name": self.platform_name[:3].lower(), + "instrument_name": self.sensor_name, + "resolution": resolution, } area_naming = get_geos_area_naming({**area_naming_input_dict, - **get_service_mode("seviri", self.ssp_lon)}) + **get_service_mode(self.sensor_name, self.ssp_lon)}) # Datasets with a segment size of 3 pixels extend outside the original SEVIRI 3km grid (with 1238 x 1238 # segments a 3 pixels). Hence, we need to use corresponding area defintions in areas.yaml @@ -271,7 +326,7 @@ def _construct_area_def(self, dataset_id): def _add_attributes(self, xarr, dataset_info): """Add dataset attributes to xarray.""" - xarr.attrs["sensor"] = "SEVIRI" + xarr.attrs["sensor"] = self.sensor_name.upper() xarr.attrs["platform_name"] = self.platform_name xarr.attrs["ssp_lon"] = self.ssp_lon xarr.attrs["seg_size"] = self.seg_size diff --git a/satpy/tests/reader_tests/test_eum_l2_bufr.py b/satpy/tests/reader_tests/test_eum_l2_bufr.py index ec3fdf7b56..b80ac40855 100644 --- a/satpy/tests/reader_tests/test_eum_l2_bufr.py +++ b/satpy/tests/reader_tests/test_eum_l2_bufr.py @@ -17,6 +17,7 @@ # satpy. If not, see . """Unittesting the SEVIRI L2 BUFR reader.""" +import os import sys import unittest from datetime import datetime @@ -29,58 +30,19 @@ from satpy.tests.utils import make_dataid -FILETYPE_INFO = {"file_type": "seviri_l2_bufr_asr"} - -FILENAME_INFO = {"start_time": "20191112000000", - "spacecraft": "MSG2"} -FILENAME_INFO2 = {"start_time": "20191112000000", - "spacecraft": "MSG2", - "server": "TESTSERVER"} -MPEF_PRODUCT_HEADER = { - "NominalTime": datetime(2019, 11, 6, 18, 0), - "SpacecraftName": "09", - "RectificationLongitude": "E0455" -} - -DATASET_INFO = { - "name": "testdata", - "key": "#1#brightnessTemperature", - "coordinates": ("longitude", "latitude"), - "fill_value": 0 -} - -DATASET_INFO_LAT = { - "name": "latitude", - "key": "#1#latitude", - "fill_value": -1.e+100 -} - -DATASET_INFO_LON = { - "name": "longitude", - "key": "#1#longitude", - "fill_value": -1.e+100 -} - - -DATASET_ATTRS = { - "platform_name": "MET09", - "ssp_lon": 45.5, - "seg_size": 16 -} - -AREA_DEF = geometry.AreaDefinition( +AREA_DEF_MSG_IODC = geometry.AreaDefinition( "msg_seviri_iodc_48km", "MSG SEVIRI Indian Ocean Data Coverage service area definition with 48 km resolution", "", - {"a": 6378169., "b": 6356583.8, "lon_0": DATASET_ATTRS["ssp_lon"], + {"a": 6378169., "b": 6356583.8, "lon_0": 45.5, "h": 35785831., "proj": "geos", "units": "m"}, 232, 232, - (-5570248.6867, -5567248.2834, 5567248.2834, 5570248.6867) + (-5570248.686685662, -5567248.28340708, 5567248.28340708, 5570248.686685662) ) -AREA_DEF_FES = geometry.AreaDefinition( - "msg_seviri_res_48km", +AREA_DEF_MSG_FES = geometry.AreaDefinition( + "msg_seviri_fes_48km", "MSG SEVIRI Full Earth Scanning service area definition with 48 km resolution", "", {"a": 6378169., "b": 6356583.8, "lon_0": 0.0, @@ -90,65 +52,162 @@ (-5570248.6867, -5567248.2834, 5567248.2834, 5570248.6867) ) -AREA_DEF_EXT = geometry.AreaDefinition( +AREA_DEF_MSG_IODC_EXT = geometry.AreaDefinition( "msg_seviri_iodc_9km_ext", "MSG SEVIRI Indian Ocean Data Coverage service area definition with 9 km resolution " "(extended outside original 3km grid)", "", - {"a": 6378169., "b": 6356583.8, "lon_0": DATASET_ATTRS["ssp_lon"], + {"a": 6378169., "b": 6356583.8, "lon_0": 45.5, "h": 35785831., "proj": "geos", "units": "m"}, 1238, 1238, (-5571748.8883, -5571748.8882, 5571748.8882, 5571748.8883) ) -TEST_FILES = [ - "ASRBUFRProd_20191106130000Z_00_OMPEFS02_MET09_FES_E0000", - "MSG2-SEVI-MSGASRE-0101-0101-20191106130000.000000000Z-20191106131702-1362128.bfr", - "MSG2-SEVI-MSGASRE-0101-0101-20191106101500.000000000Z-20191106103218-1362148" -] +AREA_DEF_FCI_FES = geometry.AreaDefinition( + "mtg_fci_fdss_32km", + "MTG FCI Full Disk Scanning Service area definition with 32 km SSP resolution", + "", + {"x_0": 0, "y_0": 0, "ellps": "WGS84", "lon_0": 0.0, + "h": 35786400., "proj": "geos", "units": "m"}, + 348, + 348, + (-5567999.998550739, -5567999.998550739, 5567999.994203017, 5567999.994203017) +) + -# Test data +AREA_DEF_MSG_FES_3km_ext = geometry.AreaDefinition( + "msg_seviri_fes_9km_ext", + "MSG SEVIRI Full Earth Scanning service area definition with 9 km resolution", + "", + {"a": 6378169., "b": 6356583.8, "lon_0": 0.0, + "h": 35785831., "proj": "geos", "units": "m"}, + 1238, + 1238, + (-5571748.888268564, -5571748.888155806, 5571748.888155806, 5571748.888268564) +) + +# Test data for mock file DATA = np.random.uniform(low=250, high=350, size=(128,)) LAT = np.random.uniform(low=-80, high=80, size=(128,)) LON = np.random.uniform(low=-38.5, high=121.5, size=(128,)) - -class SeviriL2BufrData: - """Mock SEVIRI L2 BUFR data.""" +os.environ["ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS"] = "1" + +# Test cases dictionaries +TEST_DATA = {"GIIBUFRProduct_20231027140000Z_00_OMPEFS03_MET10_FES_E0000": { + "platform_name": "MSG3", + "spacecraft_number": "10", + "RectificationLongitude": "E0000", + "ssp_lon": 0.0, + "area": AREA_DEF_MSG_FES_3km_ext, + "seg_size": 3, + "file_type": "seviri_l2_bufr_gii", + "key": "#1#brightnessTemperature", + "resolution": 9000}, + "ASRBUFRProd_20231022224500Z_00_OMPEFS03_MET10_FES_E0000": { + "platform_name": "MSG3", + "spacecraft_number": "10", + "RectificationLongitude": "E0000", + "ssp_lon": 0.0, + "area": AREA_DEF_MSG_FES, + "seg_size": 16, + "file_type": "seviri_l2_bufr_asr", + "key": "#1#brightnessTemperature", + "resolution": 48000}, + "AMVBUFRProd_20231023044500Z_00_OMPEFS02_MET09_FES_E0455": { + "platform_name": "MSG2", + "spacecraft_number": "9", + "RectificationLongitude": "E0455", + "area": AREA_DEF_MSG_IODC, + "ssp_lon": 45.5, + "seg_size": None, + "file_type": "seviri_l2_bufr_amv", + "key": "#1#brightnessTemperature", + "resolution": 72009.675979608}, + "MSG2-SEVI-MSGASRE-0101-0101-20191106130000.000000000Z-20191106131702-1362128.bfr": { + "platform_name": "MSG2", + "spacecraft_number": "9", + "RectificationLongitude": "E0455", + "area": AREA_DEF_MSG_IODC, + "ssp_lon": 45.5, + "seg_size": 16, + "file_type": "seviri_l2_bufr_asr", + "key": "#1#brightnessTemperature", + "resolution": 48000}, + """W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-2-ASR--FD------BUFR_C_EUMT_ + 20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin""": { + "platform_name": "MTGi1", + "spacecraft_number": "24", + "RectificationLongitude": "E0000", + "area": AREA_DEF_FCI_FES, + "ssp_lon": 0.0, + "seg_size": 32, + "file_type": "fci_l2_bufr_asr", + "key": "#1#brightnessTemperature", + "resolution": 32000}, + """W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-2-AMV--FD------BUFR_C_EUMT_ +20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin""": { + "platform_name": "MTGi1", + "spacecraft_number": "24", + "RectificationLongitude": "E0000", + "area": AREA_DEF_FCI_FES, + "ssp_lon": 0.0, + "seg_size": None, + "file_type": "fci_l2_bufr_amv", + "key": "#1#brightnessTemperature", + "resolution": "null"}} + + +TEST_FILES = list(TEST_DATA.keys()) + + +class L2BufrData: + """Mock L2 BUFR data.""" @unittest.skipIf(sys.platform.startswith("win"), "'eccodes' not supported on Windows") def __init__(self, filename, with_adef=False, rect_lon="default"): - """Initialize by mocking test data for testing the SEVIRI L2 BUFR reader.""" + """Initialize by mocking test data for testing the L2 BUFR reader.""" import eccodes as ec - from satpy.readers.seviri_l2_bufr import SeviriL2BufrFileHandler + from satpy.readers.eum_l2_bufr import EumetsatL2BufrFileHandler self.buf1 = ec.codes_bufr_new_from_samples("BUFR4_local_satellite") ec.codes_set(self.buf1, "unpack", 1) # write the bufr test data twice as we want to read in and then concatenate the data in the reader - # 55 id corresponds to METEOSAT 8` - ec.codes_set(self.buf1, "satelliteIdentifier", 56) + # 55 id corresponds to METEOSAT 8 + ec.codes_set(self.buf1, "satelliteIdentifier", 47 + int(TEST_DATA[filename]["spacecraft_number"])) ec.codes_set_array(self.buf1, "#1#latitude", LAT) - ec.codes_set_array(self.buf1, "#1#latitude", LAT) - ec.codes_set_array(self.buf1, "#1#longitude", LON) ec.codes_set_array(self.buf1, "#1#longitude", LON) - ec.codes_set_array(self.buf1, "#1#brightnessTemperature", DATA) - ec.codes_set_array(self.buf1, "#1#brightnessTemperature", DATA) + ec.codes_set_array(self.buf1, TEST_DATA[filename]["key"], DATA) self.m = mock.mock_open() + + FILETYPE_INFO = {"file_type": TEST_DATA[filename]["file_type"]} + # only our offline product contain MPEF product headers so we get the metadata from there if ("BUFRProd" in filename): - with mock.patch("satpy.readers.seviri_l2_bufr.np.fromfile") as fromfile: + with mock.patch("satpy.readers.eum_l2_bufr.np.fromfile") as fromfile: + + MPEF_PRODUCT_HEADER = { + "NominalTime": datetime(2019, 11, 6, 18, 0), + "SpacecraftName": TEST_DATA[filename]["spacecraft_number"], + "RectificationLongitude": TEST_DATA[filename]["RectificationLongitude"] + } fromfile.return_value = MPEF_PRODUCT_HEADER - with mock.patch("satpy.readers.seviri_l2_bufr.recarray2dict") as recarray2dict: + with mock.patch("satpy.readers.eum_l2_bufr.recarray2dict") as recarray2dict: recarray2dict.side_effect = (lambda x: x) - self.fh = SeviriL2BufrFileHandler(filename, FILENAME_INFO2, FILETYPE_INFO, - with_area_definition=with_adef, rectification_longitude=rect_lon) + + FILENAME_INFO = {"start_time": "20231022224500", "spacecraft": TEST_DATA[filename]["platform_name"], + "server": "TESTSERVER"} + self.fh = EumetsatL2BufrFileHandler( + filename, FILENAME_INFO, FILETYPE_INFO, + with_area_definition=with_adef, + rectification_longitude=int(TEST_DATA[filename]["RectificationLongitude"][1:])/10) self.fh.mpef_header = MPEF_PRODUCT_HEADER else: # No Mpef Header so we get the metadata from the BUFR messages - with mock.patch("satpy.readers.seviri_l2_bufr.open", self.m, create=True): + with mock.patch("satpy.readers.eum_l2_bufr.open", self.m, create=True): with mock.patch("eccodes.codes_bufr_new_from_file", side_effect=[self.buf1, None, self.buf1, None, self.buf1, None]) as ec1: ec1.return_value = ec1.side_effect @@ -156,13 +215,28 @@ def __init__(self, filename, with_adef=False, rect_lon="default"): ec2.return_value = 1 with mock.patch("eccodes.codes_release") as ec5: ec5.return_value = 1 - self.fh = SeviriL2BufrFileHandler(filename, FILENAME_INFO, FILETYPE_INFO, - with_area_definition=with_adef, - rectification_longitude=rect_lon) - def get_data(self, dataset_info): + FILENAME_INFO = {"start_time": "20191112000000", + "spacecraft": TEST_DATA[filename]["platform_name"]} + self.fh = EumetsatL2BufrFileHandler( + filename, FILENAME_INFO, FILETYPE_INFO, + with_area_definition=with_adef, + rectification_longitude=int(TEST_DATA[filename]["RectificationLongitude"][1:])/10) + + self.resolution = TEST_DATA[filename]["resolution"] + + def get_data(self, dataset_name, key, coordinates): """Read data from mock file.""" - with mock.patch("satpy.readers.seviri_l2_bufr.open", self.m, create=True): + DATASET_INFO = { + "name": dataset_name, + "key": key, + "fill_value": -1.e+100, + "resolution": self.resolution + } + if coordinates: + DATASET_INFO.update({"coordinates": ("longitude", "latitude")}) + + with mock.patch("satpy.readers.eum_l2_bufr.open", self.m, create=True): with mock.patch("eccodes.codes_bufr_new_from_file", side_effect=[self.buf1, self.buf1, None]) as ec1: ec1.return_value = ec1.side_effect @@ -170,65 +244,72 @@ def get_data(self, dataset_info): ec2.return_value = 1 with mock.patch("eccodes.codes_release") as ec5: ec5.return_value = 1 - z = self.fh.get_dataset(make_dataid(name=dataset_info["name"], resolution=48000), dataset_info) + z = self.fh.get_dataset(make_dataid(name=dataset_name, resolution=self.resolution), + DATASET_INFO) return z @pytest.mark.parametrize("input_file", TEST_FILES) -class TestSeviriL2BufrReader: +class TestL2BufrReader: """Test SEVIRI L2 BUFR Reader.""" @staticmethod def test_lonslats(input_file): """Test reading of longitude and latitude data with SEVIRI L2 BUFR reader.""" - bufr_obj = SeviriL2BufrData(input_file) - zlat = bufr_obj.get_data(DATASET_INFO_LAT) - zlon = bufr_obj.get_data(DATASET_INFO_LON) + bufr_obj = L2BufrData(input_file) + zlat = bufr_obj.get_data("latitude", "#1#latitude", coordinates=False) + zlon = bufr_obj.get_data("longitude", "#1#longitude", coordinates=False) np.testing.assert_array_equal(zlat.values, np.concatenate((LAT, LAT), axis=0)) np.testing.assert_array_equal(zlon.values, np.concatenate((LON, LON), axis=0)) @staticmethod def test_attributes_with_swath_definition(input_file): """Test correctness of dataset attributes with data loaded with a SwathDefinition (default behaviour).""" - bufr_obj = SeviriL2BufrData(input_file) - z = bufr_obj.get_data(DATASET_INFO) - assert z.attrs["platform_name"] == DATASET_ATTRS["platform_name"] - assert z.attrs["ssp_lon"] == DATASET_ATTRS["ssp_lon"] - assert z.attrs["seg_size"] == DATASET_ATTRS["seg_size"] + bufr_obj = L2BufrData(input_file) + z = bufr_obj.get_data(dataset_name="TestData", key=TEST_DATA[input_file]["key"], coordinates=True) + assert z.attrs["platform_name"] == TEST_DATA[input_file]["platform_name"] + assert z.attrs["ssp_lon"] == TEST_DATA[input_file]["ssp_lon"] + assert z.attrs["seg_size"] == TEST_DATA[input_file]["seg_size"] @staticmethod def test_attributes_with_area_definition(input_file): """Test correctness of dataset attributes with data loaded with a AreaDefinition.""" - bufr_obj = SeviriL2BufrData(input_file, with_adef=True) - _ = bufr_obj.get_data(DATASET_INFO_LAT) # We need to load the lat/lon data in order to - _ = bufr_obj.get_data(DATASET_INFO_LON) # populate the file handler with these data - z = bufr_obj.get_data(DATASET_INFO) - assert z.attrs["platform_name"] == DATASET_ATTRS["platform_name"] - assert z.attrs["ssp_lon"] == DATASET_ATTRS["ssp_lon"] - assert z.attrs["seg_size"] == DATASET_ATTRS["seg_size"] + bufr_obj = L2BufrData(input_file, with_adef=True) + _ = bufr_obj.get_data("latitude", "#1#latitude", coordinates=False) + _ = bufr_obj.get_data("longitude", "#1#longitude", coordinates=False) + + z = bufr_obj.get_data(dataset_name="TestData", key=TEST_DATA[input_file]["key"], coordinates=True) + assert z.attrs["platform_name"] == TEST_DATA[input_file]["platform_name"] + assert z.attrs["ssp_lon"] == TEST_DATA[input_file]["ssp_lon"] + assert z.attrs["seg_size"] == TEST_DATA[input_file]["seg_size"] @staticmethod def test_data_with_swath_definition(input_file): """Test data loaded with SwathDefinition (default behaviour).""" - bufr_obj = SeviriL2BufrData(input_file) + bufr_obj = L2BufrData(input_file) with pytest.raises(NotImplementedError): bufr_obj.fh.get_area_def(None) # concatenate original test arrays as get_dataset will have read and concatented the data x1 = np.concatenate((DATA, DATA), axis=0) - z = bufr_obj.get_data(DATASET_INFO) + z = bufr_obj.get_data(dataset_name="TestData", key=TEST_DATA[input_file]["key"], coordinates=True) np.testing.assert_array_equal(z.values, x1) def test_data_with_area_definition(self, input_file): - """Test data loaded with AreaDefinition.""" - bufr_obj = SeviriL2BufrData(input_file, with_adef=True) - _ = bufr_obj.get_data(DATASET_INFO_LAT) # We need to load the lat/lon data in order to - _ = bufr_obj.get_data(DATASET_INFO_LON) # populate the file handler with these data - z = bufr_obj.get_data(DATASET_INFO) + """Test data loaded with an area definition.""" + if TEST_DATA[input_file]["seg_size"] is None: + # Skip this test + return + + bufr_obj = L2BufrData(input_file, with_adef=True) + _ = bufr_obj.get_data("latitude", "#1#latitude", coordinates=False) + _ = bufr_obj.get_data("longitude", "#1#longitude", coordinates=False) + + z = bufr_obj.get_data(dataset_name="TestData", key=TEST_DATA[input_file]["key"], coordinates=True) ad = bufr_obj.fh.get_area_def(None) - assert ad == AREA_DEF + assert ad == TEST_DATA[input_file]["area"] data_1d = np.concatenate((DATA, DATA), axis=0) # Put BUFR data on 2D grid that the 2D array returned by get_dataset should correspond to @@ -240,42 +321,64 @@ def test_data_with_area_definition(self, input_file): data_2d[irow.compressed(), icol.compressed()] = data_1d[~irow.mask] np.testing.assert_array_equal(z.values, data_2d) - # Test that the correct AreaDefinition is identified for products with 3 pixel segements - bufr_obj.fh.seg_size = 3 - ad_ext = bufr_obj.fh._construct_area_def(make_dataid(name="dummmy", resolution=9000)) - assert ad_ext == AREA_DEF_EXT + # Removed assert dedicated to products with seg_size=3 (covered by GII test case) def test_data_with_rect_lon(self, input_file): - """Test data loaded with AreaDefinition and user defined rectification longitude.""" - bufr_obj = SeviriL2BufrData(input_file, with_adef=True, rect_lon=0.0) - np.testing.assert_equal(bufr_obj.fh.ssp_lon, 0.0) - _ = bufr_obj.get_data(DATASET_INFO_LAT) # We need to load the lat/lon data in order to - _ = bufr_obj.get_data(DATASET_INFO_LON) # populate the file handler with these data - _ = bufr_obj.get_data(DATASET_INFO) # We need to lead the data in order to create the AreaDefinition + """Test data loaded with an area definition and a rectification longitude.""" + if TEST_DATA[input_file]["seg_size"] is None: + # Skip this test + return + + bufr_obj = L2BufrData(input_file, with_adef=True) + np.testing.assert_equal(bufr_obj.fh.ssp_lon, + int(TEST_DATA[input_file]["RectificationLongitude"][1:])/10) + _ = bufr_obj.get_data("latitude", "#1#latitude", coordinates=False) + _ = bufr_obj.get_data("longitude", "#1#longitude", coordinates=False) + _ = bufr_obj.get_data(dataset_name="TestData", key=TEST_DATA[input_file]["key"], coordinates=True) + # We need to lead the data in order to create the AreaDefinition ad = bufr_obj.fh.get_area_def(None) - assert ad == AREA_DEF_FES + assert ad == TEST_DATA[input_file]["area"] + def test_resolution(self, input_file): + """Test data loaded with the correct resolution attribute .""" + bufr_obj = L2BufrData(input_file, with_adef=True) + _ = bufr_obj.get_data("latitude", "#1#latitude", coordinates=False) + _ = bufr_obj.get_data("longitude", "#1#longitude", coordinates=False) -class SeviriL2AMVBufrData: - """Mock SEVIRI L2 AMV BUFR data.""" + z = bufr_obj.get_data(dataset_name="TestData", key=TEST_DATA[input_file]["key"], coordinates=True) - @unittest.skipIf(sys.platform.startswith("win"), "'eccodes' not supported on Windows") + assert z.attrs["resolution"] == bufr_obj.resolution + + +class AMVBufrData: + """Mock L2 AMV BUFR data.""" + + @unittest.skipIf(sys.platform.startswith("win"), "eccodes not supported on Windows") def __init__(self, filename): - """Initialize by mocking test data for testing the SEVIRI L2 BUFR reader.""" - from satpy.readers.seviri_l2_bufr import SeviriL2BufrFileHandler + """Initialize by mocking test data for testing the L2 BUFR reader.""" + from satpy.readers.eum_l2_bufr import EumetsatL2BufrFileHandler - with mock.patch("satpy.readers.seviri_l2_bufr.np.fromfile"): - self.fh = SeviriL2BufrFileHandler(filename, FILENAME_INFO2, - filetype_info={"file_type": "seviri_l2_bufr_amv"}, - with_area_definition=True) + with mock.patch("satpy.readers.eum_l2_bufr.np.fromfile"): + FILENAME_INFO = {"start_time": "20191112000000", + "spacecraft": TEST_DATA[filename]["platform_name"], + "server": "TESTSERVER"} + self.fh = EumetsatL2BufrFileHandler( + filename, FILENAME_INFO, + filetype_info={"file_type": TEST_DATA[filename]["file_type"]}, + with_area_definition=True) -class TestSeviriL2AMVBufrReader: +class TestAMVBufrReader: """Test SEVIRI L2 BUFR Reader for AMV data.""" @staticmethod def test_amv_with_area_def(): """Test that AMV data can not be loaded with an area definition.""" - bufr_obj = SeviriL2AMVBufrData("AMVBUFRProd_20201110124500Z_00_OMPEFS04_MET11_FES_E0000") + bufr_obj = AMVBufrData("AMVBUFRProd_20231023044500Z_00_OMPEFS02_MET09_FES_E0455") + assert bufr_obj.fh.with_adef is False + + input_file = """W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-2-AMV--FD------BUFR_C_EUMT_ +20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin""" + bufr_obj = AMVBufrData(input_file) assert bufr_obj.fh.with_adef is False From ef06cc4ac9c74cff1162f8e21206bc45e52051a7 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Fri, 22 Mar 2024 17:37:11 +0100 Subject: [PATCH 18/41] Add missing entries for AMV --- satpy/etc/readers/fci_l2_bufr.yaml | 54 ++++++++++++++++++++++++++- satpy/etc/readers/seviri_l2_bufr.yaml | 45 ++++++++++++++++++++-- 2 files changed, 95 insertions(+), 4 deletions(-) diff --git a/satpy/etc/readers/fci_l2_bufr.yaml b/satpy/etc/readers/fci_l2_bufr.yaml index 3e75cc75b6..4e8fcdf13f 100644 --- a/satpy/etc/readers/fci_l2_bufr.yaml +++ b/satpy/etc/readers/fci_l2_bufr.yaml @@ -70,7 +70,7 @@ datasets: name: height file_type: fci_l2_bufr_amv key: '#1#heightOfTopOfCloud' - resolution: null + resolution: none long_name: Height of AMV feature standard_name: height_at_wind_level units: m @@ -131,6 +131,58 @@ datasets: - longitude - latitude + target_type: + name: target_type + long_name: Target type (cloud or clearsky) + standard_name: wind_target_type + resolution: none + file_type: fci_l2_bufr_amv + key: '#1#extendedHeightAssignmentMethod' + units: m/s + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + wind_method: + name: wind_method + long_name: Wind derivation method + standard_name: wind_wind_method + resolution: none + file_type: fci_l2_bufr_amv + key: 'satelliteDerivedWindComputationMethod' + units: m/s + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + qi: + name: qi + long_name: Overall Reliability of AMV + standard_name: wind_overall_reliability + resolution: none + file_type: fci_l2_bufr_amv + key: '#1#percentConfidence' + units: m/s + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + qi_excl_fcst: + name: qi_excl_fcst + long_name: Overall Reliability (excluding forecast) of AMV + standard_name: wind_overall_reliability_exc_forecast + resolution: none + file_type: fci_l2_bufr_amv + key: '#2#percentConfidence' + units: m/s + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + # ---- ASR products ------------ bt_mean_all_ir38: name: bt_mean_all_ir38 diff --git a/satpy/etc/readers/seviri_l2_bufr.yaml b/satpy/etc/readers/seviri_l2_bufr.yaml index 298e5a15be..71960a9302 100644 --- a/satpy/etc/readers/seviri_l2_bufr.yaml +++ b/satpy/etc/readers/seviri_l2_bufr.yaml @@ -1251,7 +1251,7 @@ datasets: long_name: Wind Speed standard_name: wind_speed key: '#1#windSpeed' - resolution: 72009.675979608 + resolution: none file_type: seviri_l2_bufr_amv units: m s-1 fill_value: -1.e+100 @@ -1264,7 +1264,7 @@ datasets: long_name: Wind Direction standard_name: wind_to_direction key: '#1#windDirection' - resolution: 72009.675979608 + resolution: none file_type: seviri_l2_bufr_amv units: deg fill_value: -1.e+100 @@ -1277,10 +1277,49 @@ datasets: long_name: Air Pressure at Wind Level standard_name: air_pressure key: '#1#pressure' - resolution: 72009.675979608 + resolution: none file_type: seviri_l2_bufr_amv units: Pa fill_value: -1.e+100 coordinates: - longitude - latitude + + temperature: + name: temperature + long_name: Temperature of AMV feature + standard_name: temperature_at_wind_level + resolution: none + file_type: seviri_l2_bufr_amv + key: '#1#airTemperature' + units: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + u: + name: u + long_name: Speed U component of AMV + standard_name: wind_speed_horizontal_component + resolution: none + file_type: seviri_l2_bufr_amv + key: '#1#u' + units: m/s + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + v: + name: v + long_name: Speed V component of AMV + standard_name: wind_speed_vertival_component + resolution: none + file_type: seviri_l2_bufr_amv + key: '#1#v' + units: m/s + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude From 83363f1a44d98becb8730f3df1192291d1d6eb5c Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Mon, 25 Mar 2024 17:11:32 +0100 Subject: [PATCH 19/41] Add missing entries for AMV. Harmonized order of keys --- satpy/etc/readers/fci_l2_bufr.yaml | 43 ++++----- satpy/etc/readers/seviri_l2_bufr.yaml | 130 ++++++++++++++++++++------ 2 files changed, 126 insertions(+), 47 deletions(-) diff --git a/satpy/etc/readers/fci_l2_bufr.yaml b/satpy/etc/readers/fci_l2_bufr.yaml index 4e8fcdf13f..47de19fbba 100644 --- a/satpy/etc/readers/fci_l2_bufr.yaml +++ b/satpy/etc/readers/fci_l2_bufr.yaml @@ -42,11 +42,11 @@ datasets: # ---- AMV products ------------ pressure: name: pressure - file_type: fci_l2_bufr_amv - key: '#1#pressure' - resolution: none long_name: Pressure of AMV feature standard_name: pressure_at_wind_level + resolution: none + file_type: fci_l2_bufr_amv + key: '#1#pressure' units: hPa fill_value: -1.0e+100 coordinates: @@ -55,11 +55,11 @@ datasets: temperature: name: temperature - file_type: fci_l2_bufr_amv - key: '#1#airTemperature' - resolution: none long_name: Temperature of AMV feature standard_name: temperature_at_wind_level + resolution: none + file_type: fci_l2_bufr_amv + key: '#1#airTemperature' units: K fill_value: -1.0e+100 coordinates: @@ -68,11 +68,11 @@ datasets: height: name: height - file_type: fci_l2_bufr_amv - key: '#1#heightOfTopOfCloud' - resolution: none long_name: Height of AMV feature standard_name: height_at_wind_level + resolution: none + file_type: fci_l2_bufr_amv + key: '#1#heightOfTopOfCloud' units: m fill_value: -1.0e+100 coordinates: @@ -81,11 +81,12 @@ datasets: direction: name: direction - file_type: fci_l2_bufr_amv - key: '#1#windDirection' - resolution: none + long_name: Direction of AMV standard_name: wind_to_direction + resolution: none + file_type: fci_l2_bufr_amv + key: '#1#windDirection' units: degree_north fill_value: -1.0e+100 coordinates: @@ -94,11 +95,11 @@ datasets: speed: name: speed - file_type: fci_l2_bufr_amv - key: '#1#windSpeed' - resolution: none long_name: Speed of AMV standard_name: wind_speed + resolution: none + file_type: fci_l2_bufr_amv + key: '#1#windSpeed' units: m/s fill_value: -1.0e+100 coordinates: @@ -107,11 +108,11 @@ datasets: u: name: u - file_type: fci_l2_bufr_amv - key: '#1#u' - resolution: none long_name: Speed U component of AMV standard_name: wind_speed_horizontal_component + resolution: none + file_type: fci_l2_bufr_amv + key: '#1#u' units: m/s fill_value: -1.0e+100 coordinates: @@ -120,11 +121,11 @@ datasets: v: name: v - file_type: fci_l2_bufr_amv - key: '#1#v' - resolution: none long_name: Speed V component of AMV standard_name: wind_speed_vertival_component + resolution: none + file_type: fci_l2_bufr_amv + key: '#1#v' units: m/s fill_value: -1.0e+100 coordinates: diff --git a/satpy/etc/readers/seviri_l2_bufr.yaml b/satpy/etc/readers/seviri_l2_bufr.yaml index 71960a9302..c73da86e23 100644 --- a/satpy/etc/readers/seviri_l2_bufr.yaml +++ b/satpy/etc/readers/seviri_l2_bufr.yaml @@ -1246,58 +1246,71 @@ datasets: flag_meanings: ['not processed', 'first guess', 'high cloud (not processed)', 'successful retrieval', 'bad retrieval'] # ---- AMV products ------------ - speed: - name: speed - long_name: Wind Speed - standard_name: wind_speed - key: '#1#windSpeed' + pressure: + name: pressure + long_name: Air Pressure at Wind Level + standard_name: air_pressure resolution: none file_type: seviri_l2_bufr_amv - units: m s-1 + key: '#1#pressure' + units: Pa fill_value: -1.e+100 coordinates: - longitude - latitude + temperature: + name: temperature + long_name: Temperature of AMV feature + standard_name: temperature_at_wind_level + resolution: none + file_type: seviri_l2_bufr_amv + key: '#1#airTemperature' + units: K + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + height: + name: height + file_type: seviri_l2_bufr_amv + key: '#1#heightOfTopOfCloud' + resolution: none + long_name: Height of AMV feature + standard_name: height_at_wind_level + units: m + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + direction: name: direction long_name: Wind Direction standard_name: wind_to_direction - key: '#1#windDirection' resolution: none file_type: seviri_l2_bufr_amv + key: '#1#windDirection' units: deg fill_value: -1.e+100 coordinates: - longitude - latitude - pressure: - name: pressure - long_name: Air Pressure at Wind Level - standard_name: air_pressure - key: '#1#pressure' + speed: + name: speed + long_name: Wind Speed + standard_name: wind_speed resolution: none file_type: seviri_l2_bufr_amv - units: Pa + key: '#1#windSpeed' + units: m s-1 fill_value: -1.e+100 coordinates: - longitude - latitude - temperature: - name: temperature - long_name: Temperature of AMV feature - standard_name: temperature_at_wind_level - resolution: none - file_type: seviri_l2_bufr_amv - key: '#1#airTemperature' - units: K - fill_value: -1.0e+100 - coordinates: - - longitude - - latitude - u: name: u long_name: Speed U component of AMV @@ -1323,3 +1336,68 @@ datasets: coordinates: - longitude - latitude + + target_type: + name: target_type + long_name: Target type (cloud or clearsky) + standard_name: wind_target_type + resolution: none + file_type: seviri_l2_bufr_amv + key: '#1#extendedHeightAssignmentMethod' + units: m/s + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + wind_method: + name: wind_method + long_name: Wind derivation method + standard_name: wind_wind_method + resolution: none + file_type: seviri_l2_bufr_amv + key: 'satelliteDerivedWindComputationMethod' + units: m/s + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + qi: + name: qi + long_name: Overall Reliability of AMV + standard_name: wind_overall_reliability + resolution: none + file_type: seviri_l2_bufr_amv + key: '#1#percentConfidence' + units: m/s + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + qi_excl_fcst: + name: qi_excl_fcst + long_name: Overall Reliability (excluding forecast) of AMV + standard_name: wind_overall_reliability_exc_forecast + resolution: none + file_type: seviri_l2_bufr_amv + key: '#2#percentConfidence' + units: m/s + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + + qi_excl_fcst_oca: + name: qi_excl_fcst_oca + long_name: Overall Reliability (excluding forecast and OCA) of AMV + standard_name: wind_overall_reliability_exc_forecast_and_oca + resolution: none + file_type: seviri_l2_bufr_amv + key: '#4#percentConfidence' + units: m/s + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude From f62ae0085000cf48439ef4491b2fa98db2048e74 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Mon, 25 Mar 2024 17:18:10 +0100 Subject: [PATCH 20/41] delete blank line --- satpy/etc/readers/fci_l2_bufr.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/satpy/etc/readers/fci_l2_bufr.yaml b/satpy/etc/readers/fci_l2_bufr.yaml index 47de19fbba..736bb486cf 100644 --- a/satpy/etc/readers/fci_l2_bufr.yaml +++ b/satpy/etc/readers/fci_l2_bufr.yaml @@ -81,7 +81,6 @@ datasets: direction: name: direction - long_name: Direction of AMV standard_name: wind_to_direction resolution: none From f2edcb39fbf59f88811cdc66d2eb663cd128f0e9 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Thu, 4 Apr 2024 16:34:40 +0200 Subject: [PATCH 21/41] Remove some double spaces --- satpy/readers/eum_l2_bufr.py | 2 +- satpy/tests/reader_tests/test_eum_l2_bufr.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/satpy/readers/eum_l2_bufr.py b/satpy/readers/eum_l2_bufr.py index 13df36f31b..f505356907 100644 --- a/satpy/readers/eum_l2_bufr.py +++ b/satpy/readers/eum_l2_bufr.py @@ -51,7 +51,7 @@ SSP_DEFAULT = 0.0 BUFR_FILL_VALUE = -1.e+100 -data_center_dict = {55: {"ssp": "E0415", "name": "MSG1"}, 56: {"ssp": "E0455", "name": "MSG2"}, +data_center_dict = {55: {"ssp": "E0415", "name": "MSG1"}, 56: {"ssp": "E0455", "name": "MSG2"}, 57: {"ssp": "E0095", "name": "MSG3"}, 70: {"ssp": "E0000", "name": "MSG4"}, 71: {"ssp": "E0000", "name": "MTGi1"}} diff --git a/satpy/tests/reader_tests/test_eum_l2_bufr.py b/satpy/tests/reader_tests/test_eum_l2_bufr.py index a4d3a2647f..24a5e4aa7f 100644 --- a/satpy/tests/reader_tests/test_eum_l2_bufr.py +++ b/satpy/tests/reader_tests/test_eum_l2_bufr.py @@ -73,7 +73,7 @@ "h": 35786400., "proj": "geos", "units": "m"}, 348, 348, - (-5567999.998550739, -5567999.998550739, 5567999.994203017, 5567999.994203017) + (-5567999.998550739, -5567999.998550739, 5567999.994203017, 5567999.994203017) ) @@ -184,7 +184,7 @@ def __init__(self, filename, with_adef=False, rect_lon="default"): self.m = mock.mock_open() - FILETYPE_INFO = {"file_type": TEST_DATA[filename]["file_type"]} + FILETYPE_INFO = {"file_type": TEST_DATA[filename]["file_type"]} # only our offline product contain MPEF product headers so we get the metadata from there if ("BUFRProd" in filename): From 24457428ecc330e783075ae743ae742d74b88b1a Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Thu, 4 Apr 2024 17:20:41 +0200 Subject: [PATCH 22/41] replace SEVIRI by EUMETSAT in some places --- satpy/tests/reader_tests/test_eum_l2_bufr.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/satpy/tests/reader_tests/test_eum_l2_bufr.py b/satpy/tests/reader_tests/test_eum_l2_bufr.py index 24a5e4aa7f..b8226d7810 100644 --- a/satpy/tests/reader_tests/test_eum_l2_bufr.py +++ b/satpy/tests/reader_tests/test_eum_l2_bufr.py @@ -15,7 +15,7 @@ # # You should have received a copy of the GNU General Public License along with # satpy. If not, see . -"""Unittesting the SEVIRI L2 BUFR reader.""" +"""Unittesting the EUMETSAT L2 BUFR reader.""" import os import sys @@ -254,11 +254,11 @@ def get_data(self, dataset_name, key, coordinates): @pytest.mark.parametrize("input_file", TEST_FILES) class TestL2BufrReader: - """Test SEVIRI L2 BUFR Reader.""" + """Test EUMETSAT L2 BUFR Reader.""" @staticmethod def test_lonslats(input_file): - """Test reading of longitude and latitude data with SEVIRI L2 BUFR reader.""" + """Test reading of longitude and latitude data with EUMETSAT L2 BUFR reader.""" bufr_obj = L2BufrData(input_file) zlat = bufr_obj.get_data("latitude", "#1#latitude", coordinates=False) zlon = bufr_obj.get_data("longitude", "#1#longitude", coordinates=False) @@ -372,7 +372,7 @@ def __init__(self, filename): class TestAMVBufrReader: - """Test SEVIRI L2 BUFR Reader for AMV data.""" + """Test EUMETSAT L2 BUFR Reader for AMV data.""" @staticmethod def test_amv_with_area_def(): From ecfdfbfbdd8545929fbe41eb8d457c99a0fee935 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Thu, 4 Apr 2024 17:39:50 +0200 Subject: [PATCH 23/41] fixes for units / resolution --- satpy/etc/readers/fci_l2_bufr.yaml | 159 +++++++++++++++-------------- 1 file changed, 80 insertions(+), 79 deletions(-) diff --git a/satpy/etc/readers/fci_l2_bufr.yaml b/satpy/etc/readers/fci_l2_bufr.yaml index 736bb486cf..ff058d32a9 100644 --- a/satpy/etc/readers/fci_l2_bufr.yaml +++ b/satpy/etc/readers/fci_l2_bufr.yaml @@ -24,7 +24,7 @@ datasets: latitude: name: latitude key: '#1#latitude' - resolution: [32000] + resolution: [32000, none] file_type: [fci_l2_bufr_asr, fci_l2_bufr_amv] standard_name: latitude units: degree_north @@ -33,7 +33,7 @@ datasets: longitude: name: longitude key: '#1#longitude' - resolution: [32000] + resolution: [32000, none] file_type: [fci_l2_bufr_asr, fci_l2_bufr_amv] standard_name: longitude units: degree_east @@ -47,7 +47,7 @@ datasets: resolution: none file_type: fci_l2_bufr_amv key: '#1#pressure' - units: hPa + units: Pa fill_value: -1.0e+100 coordinates: - longitude @@ -138,7 +138,7 @@ datasets: resolution: none file_type: fci_l2_bufr_amv key: '#1#extendedHeightAssignmentMethod' - units: m/s + units: None fill_value: -1.0e+100 coordinates: - longitude @@ -151,7 +151,7 @@ datasets: resolution: none file_type: fci_l2_bufr_amv key: 'satelliteDerivedWindComputationMethod' - units: m/s + units: None fill_value: -1.0e+100 coordinates: - longitude @@ -164,7 +164,7 @@ datasets: resolution: none file_type: fci_l2_bufr_amv key: '#1#percentConfidence' - units: m/s + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -177,7 +177,7 @@ datasets: resolution: none file_type: fci_l2_bufr_amv key: '#2#percentConfidence' - units: m/s + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -193,7 +193,7 @@ datasets: key: '#19#brightnessTemperature' wavelength: [3.4, 3.8, 4.2] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -208,7 +208,7 @@ datasets: key: '#20#brightnessTemperature' wavelength: [3.4, 3.8, 4.2] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -223,7 +223,7 @@ datasets: key: '#21#brightnessTemperature' wavelength: [3.4, 3.8, 4.2] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -238,7 +238,7 @@ datasets: key: '#25#brightnessTemperature' wavelength: [5.3, 6.3, 7.3] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -253,7 +253,7 @@ datasets: key: '#26#brightnessTemperature' wavelength: [5.3, 6.3, 7.3] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -268,7 +268,7 @@ datasets: key: '#27#brightnessTemperature' wavelength: [5.3, 6.3, 7.3] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -283,7 +283,7 @@ datasets: key: '#31#brightnessTemperature' wavelength: [6.85, 7.35, 7.85] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -298,7 +298,7 @@ datasets: key: '#32#brightnessTemperature' wavelength: [6.85, 7.35, 7.85] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -313,7 +313,7 @@ datasets: key: '#33#brightnessTemperature' wavelength: [6.85, 7.35, 7.85] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -328,7 +328,7 @@ datasets: key: '#37#brightnessTemperature' wavelength: [8.3, 8.7, 9.1] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -343,7 +343,7 @@ datasets: key: '#38#brightnessTemperature' wavelength: [8.3, 8.7, 9.1] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -358,7 +358,7 @@ datasets: key: '#39#brightnessTemperature' wavelength: [8.3, 8.7, 9.1] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -373,7 +373,7 @@ datasets: key: '#43#brightnessTemperature' wavelength: [9.36, 9.66, 9.96] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -388,7 +388,7 @@ datasets: key: '#44#brightnessTemperature' wavelength: [9.36, 9.66, 9.96] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -403,7 +403,7 @@ datasets: key: '#45#brightnessTemperature' wavelength: [9.36, 9.66, 9.96] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -418,7 +418,7 @@ datasets: key: '#49#brightnessTemperature' wavelength: [9.8, 10.5, 11.2] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -433,7 +433,7 @@ datasets: key: '#50#brightnessTemperature' wavelength: [9.8, 10.5, 11.2] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -448,7 +448,7 @@ datasets: key: '#51#brightnessTemperature' wavelength: [9.8, 10.5, 11.2] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -463,7 +463,7 @@ datasets: key: '#55#brightnessTemperature' wavelength: [11.8, 12.3, 12.8] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -478,7 +478,7 @@ datasets: key: '#56#brightnessTemperature' wavelength: [11.8, 12.3, 12.8] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -493,7 +493,7 @@ datasets: key: '#57#brightnessTemperature' wavelength: [11.8, 12.3, 12.8] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -508,7 +508,7 @@ datasets: key: '#61#brightnessTemperature' wavelength: [12.7, 13.3, 13.9] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -523,7 +523,7 @@ datasets: key: '#62#brightnessTemperature' wavelength: [12.7, 13.3, 13.9] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -538,7 +538,7 @@ datasets: key: '#63#brightnessTemperature' wavelength: [12.7, 13.3, 13.9] cell_method: area:mean - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -552,7 +552,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#19#brightnessTemperature->percentConfidence' wavelength: [3.4, 3.8, 4.2] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -566,7 +566,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#20#brightnessTemperature->percentConfidence' wavelength: [3.4, 3.8, 4.2] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -580,7 +580,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#21#brightnessTemperature->percentConfidence' wavelength: [3.4, 3.8, 4.2] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -594,7 +594,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#25#brightnessTemperature->percentConfidence' wavelength: [5.3, 6.3, 7.3] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -608,7 +608,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#26#brightnessTemperature->percentConfidence' wavelength: [5.3, 6.3, 7.3] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -622,7 +622,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#27#brightnessTemperature->percentConfidence' wavelength: [5.3, 6.3, 7.3] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -636,7 +636,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#31#brightnessTemperature->percentConfidence' wavelength: [6.85, 7.35, 7.85] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -650,7 +650,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#32#brightnessTemperature->percentConfidence' wavelength: [6.85, 7.35, 7.85] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -664,7 +664,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#33#brightnessTemperature->percentConfidence' wavelength: [6.85, 7.35, 7.85] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -678,7 +678,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#37#brightnessTemperature->percentConfidence' wavelength: [8.3, 8.7, 9.1] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -692,7 +692,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#38#brightnessTemperature->percentConfidence' wavelength: [8.3, 8.7, 9.1] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -706,7 +706,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#39#brightnessTemperature->percentConfidence' wavelength: [8.3, 8.7, 9.1] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -720,7 +720,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#43#brightnessTemperature->percentConfidence' wavelength: [9.36, 9.66, 9.96] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -734,7 +734,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#44#brightnessTemperature->percentConfidence' wavelength: [9.36, 9.66, 9.96] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -748,7 +748,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#45#brightnessTemperature->percentConfidence' wavelength: [9.36, 9.66, 9.96] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -762,7 +762,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#49#brightnessTemperature->percentConfidence' wavelength: [9.8, 10.5, 11.2] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -776,7 +776,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#50#brightnessTemperature->percentConfidence' wavelength: [9.8, 10.5, 11.2] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -790,7 +790,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#51#brightnessTemperature->percentConfidence' wavelength: [9.8, 10.5, 11.2] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -804,7 +804,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#55#brightnessTemperature->percentConfidence' wavelength: [11.8, 12.3, 12.8] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -818,7 +818,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#56#brightnessTemperature->percentConfidence' wavelength: [11.8, 12.3, 12.8] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -832,7 +832,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#57#brightnessTemperature->percentConfidence' wavelength: [11.8, 12.3, 12.8] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -846,7 +846,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#61#brightnessTemperature->percentConfidence' wavelength: [12.7, 13.3, 13.9] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -860,7 +860,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#62#brightnessTemperature->percentConfidence' wavelength: [12.7, 13.3, 13.9] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -874,7 +874,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#63#brightnessTemperature->percentConfidence' wavelength: [12.7, 13.3, 13.9] - unit: '%' + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -889,7 +889,7 @@ datasets: key: '#19#brightnessTemperature->firstOrderStatisticalValue' wavelength: [3.4, 3.8, 4.2] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -904,7 +904,7 @@ datasets: key: '#20#brightnessTemperature->firstOrderStatisticalValue' wavelength: [3.4, 3.8, 4.2] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -919,7 +919,7 @@ datasets: key: '#21#brightnessTemperature->firstOrderStatisticalValue' wavelength: [3.4, 3.8, 4.2] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -934,7 +934,7 @@ datasets: key: '#25#brightnessTemperature->firstOrderStatisticalValue' wavelength: [5.3, 6.3, 7.3] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -949,7 +949,7 @@ datasets: key: '#26#brightnessTemperature->firstOrderStatisticalValue' wavelength: [5.3, 6.3, 7.3] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -964,7 +964,7 @@ datasets: key: '#27#brightnessTemperature->firstOrderStatisticalValue' wavelength: [5.3, 6.3, 7.3] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -979,7 +979,7 @@ datasets: key: '#31#brightnessTemperature->firstOrderStatisticalValue' wavelength: [6.85, 7.35, 7.85] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -994,7 +994,7 @@ datasets: key: '#32#brightnessTemperature->firstOrderStatisticalValue' wavelength: [6.85, 7.35, 7.85] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -1009,7 +1009,7 @@ datasets: key: '#33#brightnessTemperature->firstOrderStatisticalValue' wavelength: [6.85, 7.35, 7.85] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -1024,7 +1024,7 @@ datasets: key: '#37#brightnessTemperature->firstOrderStatisticalValue' wavelength: [8.3, 8.7, 9.1] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -1039,7 +1039,7 @@ datasets: key: '#38#brightnessTemperature->firstOrderStatisticalValue' wavelength: [8.3, 8.7, 9.1] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -1054,7 +1054,7 @@ datasets: key: '#39#brightnessTemperature->firstOrderStatisticalValue' wavelength: [8.3, 8.7, 9.1] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -1069,7 +1069,7 @@ datasets: key: '#43#brightnessTemperature->firstOrderStatisticalValue' wavelength: [9.36, 9.66, 9.96] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -1084,7 +1084,7 @@ datasets: key: '#44#brightnessTemperature->firstOrderStatisticalValue' wavelength: [9.36, 9.66, 9.96] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -1099,7 +1099,7 @@ datasets: key: '#45#brightnessTemperature->firstOrderStatisticalValue' wavelength: [9.36, 9.66, 9.96] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -1114,7 +1114,7 @@ datasets: key: '#49#brightnessTemperature->firstOrderStatisticalValue' wavelength: [9.8, 10.5, 11.2] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -1129,7 +1129,7 @@ datasets: key: '#50#brightnessTemperature->firstOrderStatisticalValue' wavelength: [9.8, 10.5, 11.2] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -1144,7 +1144,7 @@ datasets: key: '#51#brightnessTemperature->firstOrderStatisticalValue' wavelength: [9.8, 10.5, 11.2] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -1159,7 +1159,7 @@ datasets: key: '#55#brightnessTemperature->firstOrderStatisticalValue' wavelength: [11.8, 12.3, 12.8] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -1174,7 +1174,7 @@ datasets: key: '#56#brightnessTemperature->firstOrderStatisticalValue' wavelength: [11.8, 12.3, 12.8] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -1189,7 +1189,7 @@ datasets: key: '#57#brightnessTemperature->firstOrderStatisticalValue' wavelength: [11.8, 12.3, 12.8] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -1204,7 +1204,7 @@ datasets: key: '#61#brightnessTemperature->firstOrderStatisticalValue' wavelength: [12.7, 13.3, 13.9] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -1219,7 +1219,7 @@ datasets: key: '#62#brightnessTemperature->firstOrderStatisticalValue' wavelength: [12.7, 13.3, 13.9] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -1234,7 +1234,7 @@ datasets: key: '#63#brightnessTemperature->firstOrderStatisticalValue' wavelength: [12.7, 13.3, 13.9] cell_method: area:standard_deviation - unit: K + units: K fill_value: -1.0e+100 coordinates: - longitude @@ -1248,6 +1248,7 @@ datasets: file_type: fci_l2_bufr_asr key: '#1#amountSegmentCloudFree' fill_value: -1.0e+100 + units: '%' coordinates: - longitude - latitude From 63444d9e96d692d94446426c92727fbc97b48b41 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Thu, 4 Apr 2024 17:48:19 +0200 Subject: [PATCH 24/41] fixes for units --- satpy/etc/readers/fci_l2_bufr.yaml | 4 ++-- satpy/etc/readers/seviri_l2_bufr.yaml | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/satpy/etc/readers/fci_l2_bufr.yaml b/satpy/etc/readers/fci_l2_bufr.yaml index ff058d32a9..3a85248755 100644 --- a/satpy/etc/readers/fci_l2_bufr.yaml +++ b/satpy/etc/readers/fci_l2_bufr.yaml @@ -138,7 +138,7 @@ datasets: resolution: none file_type: fci_l2_bufr_amv key: '#1#extendedHeightAssignmentMethod' - units: None + units: "" fill_value: -1.0e+100 coordinates: - longitude @@ -151,7 +151,7 @@ datasets: resolution: none file_type: fci_l2_bufr_amv key: 'satelliteDerivedWindComputationMethod' - units: None + units: "" fill_value: -1.0e+100 coordinates: - longitude diff --git a/satpy/etc/readers/seviri_l2_bufr.yaml b/satpy/etc/readers/seviri_l2_bufr.yaml index c73da86e23..53574cd95c 100644 --- a/satpy/etc/readers/seviri_l2_bufr.yaml +++ b/satpy/etc/readers/seviri_l2_bufr.yaml @@ -1305,7 +1305,7 @@ datasets: resolution: none file_type: seviri_l2_bufr_amv key: '#1#windSpeed' - units: m s-1 + units: m/s fill_value: -1.e+100 coordinates: - longitude @@ -1344,7 +1344,7 @@ datasets: resolution: none file_type: seviri_l2_bufr_amv key: '#1#extendedHeightAssignmentMethod' - units: m/s + units: "" fill_value: -1.0e+100 coordinates: - longitude @@ -1357,7 +1357,7 @@ datasets: resolution: none file_type: seviri_l2_bufr_amv key: 'satelliteDerivedWindComputationMethod' - units: m/s + units: "" fill_value: -1.0e+100 coordinates: - longitude @@ -1370,7 +1370,7 @@ datasets: resolution: none file_type: seviri_l2_bufr_amv key: '#1#percentConfidence' - units: m/s + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -1383,7 +1383,7 @@ datasets: resolution: none file_type: seviri_l2_bufr_amv key: '#2#percentConfidence' - units: m/s + units: '%' fill_value: -1.0e+100 coordinates: - longitude @@ -1396,7 +1396,7 @@ datasets: resolution: none file_type: seviri_l2_bufr_amv key: '#4#percentConfidence' - units: m/s + units: '%' fill_value: -1.0e+100 coordinates: - longitude From e961fc9aa4d4e07def3d0701b917457476902c82 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Thu, 4 Apr 2024 17:49:52 +0200 Subject: [PATCH 25/41] remove deprecated dictionary --- satpy/readers/eum_l2_bufr.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/satpy/readers/eum_l2_bufr.py b/satpy/readers/eum_l2_bufr.py index f505356907..7e48a72eb2 100644 --- a/satpy/readers/eum_l2_bufr.py +++ b/satpy/readers/eum_l2_bufr.py @@ -62,12 +62,6 @@ "seviri_l2_bufr_amv": None, "fci_l2_bufr_asr": 32, "fci_l2_bufr_amv": None} -# This is the physical size of the segment, in meters -resolution_dict = {"seviri_l2_bufr_asr": 48000, "seviri_l2_bufr_cla": 48000, - "seviri_l2_bufr_csr": 48000, "seviri_l2_bufr_gii": 9000, - "seviri_l2_bufr_thu": 48000, "seviri_l2_bufr_toz": 9000, - "seviri_l2_bufr_amv": None, - "fci_l2_bufr_asr": 32000, "fci_l2_bufr_amv": None} # List of variables that are returned by eccodes as array, but we want as single value deprecate_to_single_value = ["satelliteIdentifier"] From a9dded70e884b63812926acb473cf98e9acd70cb Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Thu, 4 Apr 2024 18:12:29 +0200 Subject: [PATCH 26/41] remove resolution from get_dataset_with_area_def argument list and get it from dataset_id --- satpy/readers/eum_l2_bufr.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/satpy/readers/eum_l2_bufr.py b/satpy/readers/eum_l2_bufr.py index 7e48a72eb2..0020b3b9f2 100644 --- a/satpy/readers/eum_l2_bufr.py +++ b/satpy/readers/eum_l2_bufr.py @@ -255,7 +255,7 @@ def get_dataset(self, dataset_id, dataset_info): arr = self.get_array(dataset_info["key"]) if self.with_adef: - xarr = self.get_dataset_with_area_def(arr, dataset_id, dataset_info["resolution"]) + xarr = self.get_dataset_with_area_def(arr, dataset_id) # coordinates are not relevant when returning data with an AreaDefinition if "coordinates" in dataset_info.keys(): del dataset_info["coordinates"] @@ -268,14 +268,14 @@ def get_dataset(self, dataset_id, dataset_info): self._add_attributes(xarr, dataset_info) return xarr - def get_dataset_with_area_def(self, arr, dataset_id, resolution): + def get_dataset_with_area_def(self, arr, dataset_id): """Get dataset with an AreaDefinition.""" if dataset_id["name"] in ["latitude", "longitude"]: self.__setattr__(dataset_id["name"], arr) xarr = xr.DataArray(arr, dims=["y"]) else: lons_1d, lats_1d, data_1d = da.compute(self.longitude, self.latitude, arr) - self._area_def = self._construct_area_def(dataset_id, resolution) + self._area_def = self._construct_area_def(dataset_id) icol, irow = self._area_def.get_array_indices_from_lonlat(lons_1d, lats_1d) data_2d = np.empty(self._area_def.shape) @@ -292,7 +292,7 @@ def get_dataset_with_area_def(self, arr, dataset_id, resolution): return xarr - def _construct_area_def(self, dataset_id, resolution): + def _construct_area_def(self, dataset_id): """Construct a standardized AreaDefinition based on satellite, instrument, resolution and sub-satellite point. Returns: @@ -301,7 +301,7 @@ def _construct_area_def(self, dataset_id, resolution): """ area_naming_input_dict = {"platform_name": self.platform_name[:3].lower(), "instrument_name": self.sensor_name, - "resolution": resolution, + "resolution": dataset_id["resolution"], } area_naming = get_geos_area_naming({**area_naming_input_dict, From c094257d661cc0c479dd106f8a75c06e579fc914 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Fri, 12 Apr 2024 15:20:14 +0200 Subject: [PATCH 27/41] Add channel id and oca_presure (SEVIRI) to AMV --- satpy/etc/readers/fci_l2_bufr.yaml | 17 ++++++++++++-- satpy/etc/readers/seviri_l2_bufr.yaml | 32 ++++++++++++++++++++++++--- 2 files changed, 44 insertions(+), 5 deletions(-) diff --git a/satpy/etc/readers/fci_l2_bufr.yaml b/satpy/etc/readers/fci_l2_bufr.yaml index 3a85248755..e180d5dc0a 100644 --- a/satpy/etc/readers/fci_l2_bufr.yaml +++ b/satpy/etc/readers/fci_l2_bufr.yaml @@ -43,7 +43,7 @@ datasets: pressure: name: pressure long_name: Pressure of AMV feature - standard_name: pressure_at_wind_level + standard_name: air_pressure_at_wind_level resolution: none file_type: fci_l2_bufr_amv key: '#1#pressure' @@ -56,7 +56,7 @@ datasets: temperature: name: temperature long_name: Temperature of AMV feature - standard_name: temperature_at_wind_level + standard_name: air_temperature_at_wind_level resolution: none file_type: fci_l2_bufr_amv key: '#1#airTemperature' @@ -183,6 +183,19 @@ datasets: - longitude - latitude + channel_id: + name: channel_id + long_name: Channel Id + standard_name: channel_id + resolution: none + file_type: fci_l2_bufr_amv + key: '#1#channelNumber' + units: "" + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + # ---- ASR products ------------ bt_mean_all_ir38: name: bt_mean_all_ir38 diff --git a/satpy/etc/readers/seviri_l2_bufr.yaml b/satpy/etc/readers/seviri_l2_bufr.yaml index 53574cd95c..47071eb2c7 100644 --- a/satpy/etc/readers/seviri_l2_bufr.yaml +++ b/satpy/etc/readers/seviri_l2_bufr.yaml @@ -1172,7 +1172,7 @@ datasets: coordinates: - longitude - latitude - units: degrees + units: degrees_north file_type: seviri_l2_bufr_gii fill_value: 0 @@ -1259,10 +1259,23 @@ datasets: - longitude - latitude + oca_pressure: + name: oca_pressure + long_name: Air Pressure at Wind Level feature from OCA hight assignment + standard_name: air_pressure_at_wind_level + resolution: none + file_type: fci_l2_bufr_amv + key: '#3#pressure' + units: Pa + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude + temperature: name: temperature long_name: Temperature of AMV feature - standard_name: temperature_at_wind_level + standard_name: air_temperature_at_wind_level resolution: none file_type: seviri_l2_bufr_amv key: '#1#airTemperature' @@ -1292,7 +1305,7 @@ datasets: resolution: none file_type: seviri_l2_bufr_amv key: '#1#windDirection' - units: deg + units: degrees_north fill_value: -1.e+100 coordinates: - longitude @@ -1401,3 +1414,16 @@ datasets: coordinates: - longitude - latitude + + channel_id: + name: channel_id + long_name: Channel Id + standard_name: channel_id + resolution: none + file_type: seviri_l2_bufr_amv + key: '#1#channelNumber' + units: "" + fill_value: -1.0e+100 + coordinates: + - longitude + - latitude From cf96b75611a187fd59cf823911e04abd620b2c9e Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Fri, 12 Apr 2024 15:33:53 +0200 Subject: [PATCH 28/41] Hamonize keys/ standard_name across fci_l2_nc, seviri_l2_bufr and fci_l2_bufr --- satpy/etc/readers/fci_l2_bufr.yaml | 8 ++++---- satpy/etc/readers/fci_l2_nc.yaml | 8 ++++---- satpy/etc/readers/seviri_l2_bufr.yaml | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/satpy/etc/readers/fci_l2_bufr.yaml b/satpy/etc/readers/fci_l2_bufr.yaml index e180d5dc0a..49f4980f1e 100644 --- a/satpy/etc/readers/fci_l2_bufr.yaml +++ b/satpy/etc/readers/fci_l2_bufr.yaml @@ -105,8 +105,8 @@ datasets: - longitude - latitude - u: - name: u + speed_u_component: + name: speed_u_component long_name: Speed U component of AMV standard_name: wind_speed_horizontal_component resolution: none @@ -118,8 +118,8 @@ datasets: - longitude - latitude - v: - name: v + speed_v_component: + name: speed_v_component long_name: Speed V component of AMV standard_name: wind_speed_vertival_component resolution: none diff --git a/satpy/etc/readers/fci_l2_nc.yaml b/satpy/etc/readers/fci_l2_nc.yaml index ab91e592b5..6a465f3f7a 100644 --- a/satpy/etc/readers/fci_l2_nc.yaml +++ b/satpy/etc/readers/fci_l2_nc.yaml @@ -183,7 +183,7 @@ datasets: intm_pressure: name: intm_pressure - standard_name: wind_pressure + standard_name: air_pressure_at_wind_level file_type: nc_fci_amvi nc_key: intm_pressure coordinates: @@ -192,7 +192,7 @@ datasets: intm_temperature: name: intm_temperature - standard_name: wind_temperature + standard_name: air_temperature_at_wind_level file_type: nc_fci_amvi nc_key: intm_temperature coordinates: @@ -275,7 +275,7 @@ datasets: pressure: name: pressure - standard_name: wind_pressure + standard_name: air_pressure_at_wind_level file_type: nc_fci_amv nc_key: pressure coordinates: @@ -284,7 +284,7 @@ datasets: temperature: name: temperature - standard_name: wind_temperature + standard_name: air_temperature_at_wind_level file_type: nc_fci_amv nc_key: temperature coordinates: diff --git a/satpy/etc/readers/seviri_l2_bufr.yaml b/satpy/etc/readers/seviri_l2_bufr.yaml index 47071eb2c7..953b7c28e3 100644 --- a/satpy/etc/readers/seviri_l2_bufr.yaml +++ b/satpy/etc/readers/seviri_l2_bufr.yaml @@ -1324,8 +1324,8 @@ datasets: - longitude - latitude - u: - name: u + speed_u_component: + name: speed_u_component long_name: Speed U component of AMV standard_name: wind_speed_horizontal_component resolution: none @@ -1337,8 +1337,8 @@ datasets: - longitude - latitude - v: - name: v + speed_v_component: + name: speed_v_component long_name: Speed V component of AMV standard_name: wind_speed_vertival_component resolution: none From e8f652cf20a2115db146c31a5b43d59cc4a232ec Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Fri, 12 Apr 2024 15:50:53 +0200 Subject: [PATCH 29/41] fix reader type for AMV files --- satpy/etc/readers/seviri_l2_bufr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/satpy/etc/readers/seviri_l2_bufr.yaml b/satpy/etc/readers/seviri_l2_bufr.yaml index 953b7c28e3..dc297d8957 100644 --- a/satpy/etc/readers/seviri_l2_bufr.yaml +++ b/satpy/etc/readers/seviri_l2_bufr.yaml @@ -52,7 +52,7 @@ file_types: - '{spacecraft:s}-SEVI-MSGTOZN-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}' seviri_l2_bufr_amv: - file_reader: !!python/name:satpy.readers.seviri_l2_bufr.SeviriL2BufrFileHandler + file_reader: !!python/name:satpy.readers.eum_l2_bufr.SeviriL2BufrFileHandler file_patterns: - 'AMVBUFRProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:s}_{satellite:s}_{mission:s}_{subsat:s}' - '{spacecraft:s}-SEVI-MSGAMVE-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}.bfr' From ecbec246e20b9d9c7d96f95c791bd007c1baa8f9 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Fri, 12 Apr 2024 15:51:35 +0200 Subject: [PATCH 30/41] fix reader type for AMV files #2 --- satpy/etc/readers/seviri_l2_bufr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/satpy/etc/readers/seviri_l2_bufr.yaml b/satpy/etc/readers/seviri_l2_bufr.yaml index dc297d8957..7e4ea34062 100644 --- a/satpy/etc/readers/seviri_l2_bufr.yaml +++ b/satpy/etc/readers/seviri_l2_bufr.yaml @@ -52,7 +52,7 @@ file_types: - '{spacecraft:s}-SEVI-MSGTOZN-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}' seviri_l2_bufr_amv: - file_reader: !!python/name:satpy.readers.eum_l2_bufr.SeviriL2BufrFileHandler + file_reader: !!python/name:satpy.readers.eum_l2_bufr.EumetsatL2BufrFileHandler file_patterns: - 'AMVBUFRProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:s}_{satellite:s}_{mission:s}_{subsat:s}' - '{spacecraft:s}-SEVI-MSGAMVE-{loc1:s}-{loc2:s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{time1:%Y%m%d%H%M%S}-{ord1:s}.bfr' From d78f9c278b510f1fc774108f41741d585de523bb Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Tue, 28 May 2024 15:21:39 +0200 Subject: [PATCH 31/41] handling of resolution-less datasets (AMV) --- satpy/etc/readers/fci_l2_bufr.yaml | 77 ++++++++++++-------- satpy/etc/readers/seviri_l2_bufr.yaml | 22 +++++- satpy/readers/eum_l2_bufr.py | 25 +++---- satpy/tests/reader_tests/test_eum_l2_bufr.py | 31 ++++---- 4 files changed, 96 insertions(+), 59 deletions(-) diff --git a/satpy/etc/readers/fci_l2_bufr.yaml b/satpy/etc/readers/fci_l2_bufr.yaml index 49f4980f1e..bed46d3929 100644 --- a/satpy/etc/readers/fci_l2_bufr.yaml +++ b/satpy/etc/readers/fci_l2_bufr.yaml @@ -3,7 +3,7 @@ reader: short_name: FCI l2 BUFR long_name: MTGi Level 2 products in BUFR format description: FCI L2 BUFR Product Reader - status: Alpha, AMV BUFR products not supported yet + status: Alpha supports_fsspec: false sensors: [fci] default_channels: [] @@ -24,8 +24,8 @@ datasets: latitude: name: latitude key: '#1#latitude' - resolution: [32000, none] - file_type: [fci_l2_bufr_asr, fci_l2_bufr_amv] + resolution: [32000, 0] + file_type: [fci_l2_bufr_asr] standard_name: latitude units: degree_north fill_value: -1.e+100 @@ -33,13 +33,32 @@ datasets: longitude: name: longitude key: '#1#longitude' - resolution: [32000, none] - file_type: [fci_l2_bufr_asr, fci_l2_bufr_amv] + resolution: [32000, 0] + file_type: [fci_l2_bufr_asr] standard_name: longitude units: degree_east fill_value: -1.e+100 + # ---- AMV products ------------ + latitude_amv: + name: latitude_amv + key: '#1#latitude' + resolution: none + file_type: fci_l2_bufr_amv + standard_name: latitude + units: degree_north + fill_value: -1.e+100 + + longitude_amv: + name: longitude_amv + key: '#1#longitude' + resolution: none + file_type: fci_l2_bufr_amv + standard_name: longitude + units: degree_east + fill_value: -1.e+100 + pressure: name: pressure long_name: Pressure of AMV feature @@ -50,8 +69,8 @@ datasets: units: Pa fill_value: -1.0e+100 coordinates: - - longitude - - latitude + - longitude_amv + - latitude_amv temperature: name: temperature @@ -63,8 +82,8 @@ datasets: units: K fill_value: -1.0e+100 coordinates: - - longitude - - latitude + - longitude_amv + - latitude_amv height: name: height @@ -76,8 +95,8 @@ datasets: units: m fill_value: -1.0e+100 coordinates: - - longitude - - latitude + - longitude_amv + - latitude_amv direction: name: direction @@ -89,8 +108,8 @@ datasets: units: degree_north fill_value: -1.0e+100 coordinates: - - longitude - - latitude + - longitude_amv + - latitude_amv speed: name: speed @@ -102,8 +121,8 @@ datasets: units: m/s fill_value: -1.0e+100 coordinates: - - longitude - - latitude + - longitude_amv + - latitude_amv speed_u_component: name: speed_u_component @@ -115,8 +134,8 @@ datasets: units: m/s fill_value: -1.0e+100 coordinates: - - longitude - - latitude + - longitude_amv + - latitude_amv speed_v_component: name: speed_v_component @@ -128,8 +147,8 @@ datasets: units: m/s fill_value: -1.0e+100 coordinates: - - longitude - - latitude + - longitude_amv + - latitude_amv target_type: name: target_type @@ -141,8 +160,8 @@ datasets: units: "" fill_value: -1.0e+100 coordinates: - - longitude - - latitude + - longitude_amv + - latitude_amv wind_method: name: wind_method @@ -154,8 +173,8 @@ datasets: units: "" fill_value: -1.0e+100 coordinates: - - longitude - - latitude + - longitude_amv + - latitude_amv qi: name: qi @@ -167,8 +186,8 @@ datasets: units: '%' fill_value: -1.0e+100 coordinates: - - longitude - - latitude + - longitude_amv + - latitude_amv qi_excl_fcst: name: qi_excl_fcst @@ -180,8 +199,8 @@ datasets: units: '%' fill_value: -1.0e+100 coordinates: - - longitude - - latitude + - longitude_amv + - latitude_amv channel_id: name: channel_id @@ -193,8 +212,8 @@ datasets: units: "" fill_value: -1.0e+100 coordinates: - - longitude - - latitude + - longitude_amv + - latitude_amv # ---- ASR products ------------ bt_mean_all_ir38: diff --git a/satpy/etc/readers/seviri_l2_bufr.yaml b/satpy/etc/readers/seviri_l2_bufr.yaml index 7e4ea34062..b53f732052 100644 --- a/satpy/etc/readers/seviri_l2_bufr.yaml +++ b/satpy/etc/readers/seviri_l2_bufr.yaml @@ -66,7 +66,7 @@ datasets: long_name: Latitude standard_name: latitude resolution: [48006.450653072,9001.209497451,72009.675979608] - file_type: [seviri_l2_bufr_asr,seviri_l2_bufr_cla,seviri_l2_bufr_csr,seviri_l2_bufr_gii,seviri_l2_bufr_thu,seviri_l2_bufr_toz,seviri_l2_bufr_amv] + file_type: [seviri_l2_bufr_asr,seviri_l2_bufr_cla,seviri_l2_bufr_csr,seviri_l2_bufr_gii,seviri_l2_bufr_thu,seviri_l2_bufr_toz] units: degree_north fill_value: -1.e+100 @@ -74,7 +74,7 @@ datasets: name: longitude key: '#1#longitude' resolution: [48006.450653072,9001.209497451,72009.675979608] - file_type: [seviri_l2_bufr_asr,seviri_l2_bufr_cla,seviri_l2_bufr_csr,seviri_l2_bufr_gii,seviri_l2_bufr_thu,seviri_l2_bufr_toz,seviri_l2_bufr_amv] + file_type: [seviri_l2_bufr_asr,seviri_l2_bufr_cla,seviri_l2_bufr_csr,seviri_l2_bufr_gii,seviri_l2_bufr_thu,seviri_l2_bufr_toz] long_name: Longitude standard_name: longitude units: degree_east @@ -1246,6 +1246,24 @@ datasets: flag_meanings: ['not processed', 'first guess', 'high cloud (not processed)', 'successful retrieval', 'bad retrieval'] # ---- AMV products ------------ + latitude_amv: + name: latitude_amv + key: '#1#latitude' + resolution: none + file_type: seviri_l2_bufr_amv + standard_name: latitude + units: degree_north + fill_value: -1.e+100 + + longitude_amv: + name: longitude_amv + key: '#1#longitude' + resolution: none + file_type: seviri_l2_bufr_amv + standard_name: longitude + units: degree_east + fill_value: -1.e+100 + pressure: name: pressure long_name: Air Pressure at Wind Level diff --git a/satpy/readers/eum_l2_bufr.py b/satpy/readers/eum_l2_bufr.py index 0020b3b9f2..ccb84eab27 100644 --- a/satpy/readers/eum_l2_bufr.py +++ b/satpy/readers/eum_l2_bufr.py @@ -55,12 +55,8 @@ 57: {"ssp": "E0095", "name": "MSG3"}, 70: {"ssp": "E0000", "name": "MSG4"}, 71: {"ssp": "E0000", "name": "MTGi1"}} -# This is the size number of pixels making a segment -seg_size_dict = {"seviri_l2_bufr_asr": 16, "seviri_l2_bufr_cla": 16, - "seviri_l2_bufr_csr": 16, "seviri_l2_bufr_gii": 3, - "seviri_l2_bufr_thu": 16, "seviri_l2_bufr_toz": 3, - "seviri_l2_bufr_amv": None, - "fci_l2_bufr_asr": 32, "fci_l2_bufr_amv": None} +# sensor resolution (pixel size in m) +resolution_dict = {"fci": 1000, "seviri": 3000} # List of variables that are returned by eccodes as array, but we want as single value @@ -124,12 +120,7 @@ def __init__(self, filename, filename_info, filetype_info, with_area_definition= self.bufr_header["RectificationLongitude"] = f"E{int(rectification_longitude * 10):04d}" self.filetype = filetype_info["file_type"] - self.seg_size = seg_size_dict[self.filetype] - if self.seg_size: - # make this keyword not usable for non-grided products - self.with_adef = with_area_definition - else: - self.with_adef = False + self.with_adef = with_area_definition @property def start_time(self): @@ -254,7 +245,7 @@ def get_dataset(self, dataset_id, dataset_info): """ arr = self.get_array(dataset_info["key"]) - if self.with_adef: + if self.with_adef and not isinstance(dataset_id["resolution"],str): xarr = self.get_dataset_with_area_def(arr, dataset_id) # coordinates are not relevant when returning data with an AreaDefinition if "coordinates" in dataset_info.keys(): @@ -309,7 +300,7 @@ def _construct_area_def(self, dataset_id): # Datasets with a segment size of 3 pixels extend outside the original SEVIRI 3km grid (with 1238 x 1238 # segments a 3 pixels). Hence, we need to use corresponding area defintions in areas.yaml - if self.seg_size == 3: + if self.sensor_name=="seviri" and round(dataset_id["resolution"])==9001: area_naming["area_id"] += "_ext" area_naming["description"] += " (extended outside original 3km grid)" @@ -323,5 +314,9 @@ def _add_attributes(self, xarr, dataset_info): xarr.attrs["sensor"] = self.sensor_name.upper() xarr.attrs["platform_name"] = self.platform_name xarr.attrs["ssp_lon"] = self.ssp_lon - xarr.attrs["seg_size"] = self.seg_size + if isinstance(dataset_info["resolution"],str): + xarr.attrs["seg_size"] = "none" + else: + xarr.attrs["seg_size"] = round(dataset_info["resolution"]/resolution_dict[self.sensor_name]) + xarr.attrs.update(dataset_info) diff --git a/satpy/tests/reader_tests/test_eum_l2_bufr.py b/satpy/tests/reader_tests/test_eum_l2_bufr.py index b8226d7810..1e78a9bf09 100644 --- a/satpy/tests/reader_tests/test_eum_l2_bufr.py +++ b/satpy/tests/reader_tests/test_eum_l2_bufr.py @@ -106,7 +106,7 @@ "seg_size": 3, "file_type": "seviri_l2_bufr_gii", "key": "#1#brightnessTemperature", - "resolution": 9000}, + "resolution": 9001}, "ASRBUFRProd_20231022224500Z_00_OMPEFS03_MET10_FES_E0000": { "platform_name": "MSG3", "spacecraft_number": "10", @@ -116,17 +116,17 @@ "seg_size": 16, "file_type": "seviri_l2_bufr_asr", "key": "#1#brightnessTemperature", - "resolution": 48000}, + "resolution": 48006}, "AMVBUFRProd_20231023044500Z_00_OMPEFS02_MET09_FES_E0455": { "platform_name": "MSG2", "spacecraft_number": "9", "RectificationLongitude": "E0455", "area": AREA_DEF_MSG_IODC, "ssp_lon": 45.5, - "seg_size": None, + "seg_size": "none", "file_type": "seviri_l2_bufr_amv", "key": "#1#brightnessTemperature", - "resolution": 72009.675979608}, + "resolution": "none"}, "MSG2-SEVI-MSGASRE-0101-0101-20191106130000.000000000Z-20191106131702-1362128.bfr": { "platform_name": "MSG2", "spacecraft_number": "9", @@ -136,7 +136,7 @@ "seg_size": 16, "file_type": "seviri_l2_bufr_asr", "key": "#1#brightnessTemperature", - "resolution": 48000}, + "resolution": 48006}, """W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-2-ASR--FD------BUFR_C_EUMT_ 20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin""": { "platform_name": "MTGi1", @@ -155,10 +155,10 @@ "RectificationLongitude": "E0000", "area": AREA_DEF_FCI_FES, "ssp_lon": 0.0, - "seg_size": None, + "seg_size": "none", "file_type": "fci_l2_bufr_amv", "key": "#1#brightnessTemperature", - "resolution": "null"}} + "resolution": "none"}} TEST_FILES = list(TEST_DATA.keys()) @@ -300,7 +300,7 @@ def test_data_with_swath_definition(input_file): def test_data_with_area_definition(self, input_file): """Test data loaded with an area definition.""" - if TEST_DATA[input_file]["seg_size"] is None: + if TEST_DATA[input_file]["seg_size"] == "none": # Skip this test return @@ -311,6 +311,7 @@ def test_data_with_area_definition(self, input_file): z = bufr_obj.get_data(dataset_name="TestData", key=TEST_DATA[input_file]["key"], coordinates=True) ad = bufr_obj.fh.get_area_def(None) + assert ad == TEST_DATA[input_file]["area"] data_1d = np.concatenate((DATA, DATA), axis=0) @@ -327,7 +328,7 @@ def test_data_with_area_definition(self, input_file): def test_data_with_rect_lon(self, input_file): """Test data loaded with an area definition and a rectification longitude.""" - if TEST_DATA[input_file]["seg_size"] is None: + if TEST_DATA[input_file]["seg_size"] == "none": # Skip this test return @@ -377,10 +378,14 @@ class TestAMVBufrReader: @staticmethod def test_amv_with_area_def(): """Test that AMV data can not be loaded with an area definition.""" - bufr_obj = AMVBufrData("AMVBUFRProd_20231023044500Z_00_OMPEFS02_MET09_FES_E0455") - assert bufr_obj.fh.with_adef is False + # The way to test this is to try load a variable with with_adef=True + # The reader shall ignore this flag and return a 1D array, not a 2D input_file = """W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-2-AMV--FD------BUFR_C_EUMT_ 20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin""" - bufr_obj = AMVBufrData(input_file) - assert bufr_obj.fh.with_adef is False + bufr_obj = L2BufrData(input_file, with_adef=True) + _ = bufr_obj.get_data("latitude", "#1#latitude", coordinates=False) + _ = bufr_obj.get_data("longitude", "#1#longitude", coordinates=False) + z = bufr_obj.get_data(dataset_name="TestData", key=TEST_DATA[input_file]["key"], coordinates=True) + + assert len(z.dims) == 1 From 847fc064099de8486024a76c4bafcfeb9ed5473b Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Wed, 29 May 2024 11:50:20 +0200 Subject: [PATCH 32/41] Actually removes resolution from AMV entries and set resolution / seg_size attributes of returned dataset array to None --- satpy/etc/readers/fci_l2_bufr.yaml | 86 +++++++------------- satpy/etc/readers/seviri_l2_bufr.yaml | 36 +------- satpy/readers/eum_l2_bufr.py | 9 +- satpy/tests/reader_tests/test_eum_l2_bufr.py | 14 ++-- 4 files changed, 42 insertions(+), 103 deletions(-) diff --git a/satpy/etc/readers/fci_l2_bufr.yaml b/satpy/etc/readers/fci_l2_bufr.yaml index bed46d3929..f0f841f629 100644 --- a/satpy/etc/readers/fci_l2_bufr.yaml +++ b/satpy/etc/readers/fci_l2_bufr.yaml @@ -24,8 +24,8 @@ datasets: latitude: name: latitude key: '#1#latitude' - resolution: [32000, 0] - file_type: [fci_l2_bufr_asr] + resolution: [32000] + file_type: [fci_l2_bufr_asr,fci_l2_bufr_amv] standard_name: latitude units: degree_north fill_value: -1.e+100 @@ -33,187 +33,157 @@ datasets: longitude: name: longitude key: '#1#longitude' - resolution: [32000, 0] - file_type: [fci_l2_bufr_asr] + resolution: [32000] + file_type: [fci_l2_bufr_asr,fci_l2_bufr_amv] standard_name: longitude units: degree_east fill_value: -1.e+100 # ---- AMV products ------------ - latitude_amv: - name: latitude_amv - key: '#1#latitude' - resolution: none - file_type: fci_l2_bufr_amv - standard_name: latitude - units: degree_north - fill_value: -1.e+100 - - longitude_amv: - name: longitude_amv - key: '#1#longitude' - resolution: none - file_type: fci_l2_bufr_amv - standard_name: longitude - units: degree_east - fill_value: -1.e+100 - pressure: name: pressure long_name: Pressure of AMV feature standard_name: air_pressure_at_wind_level - resolution: none file_type: fci_l2_bufr_amv key: '#1#pressure' units: Pa fill_value: -1.0e+100 coordinates: - - longitude_amv - - latitude_amv + - longitude + - latitude temperature: name: temperature long_name: Temperature of AMV feature standard_name: air_temperature_at_wind_level - resolution: none file_type: fci_l2_bufr_amv key: '#1#airTemperature' units: K fill_value: -1.0e+100 coordinates: - - longitude_amv - - latitude_amv + - longitude + - latitude height: name: height long_name: Height of AMV feature standard_name: height_at_wind_level - resolution: none file_type: fci_l2_bufr_amv key: '#1#heightOfTopOfCloud' units: m fill_value: -1.0e+100 coordinates: - - longitude_amv - - latitude_amv + - longitude + - latitude direction: name: direction long_name: Direction of AMV standard_name: wind_to_direction - resolution: none file_type: fci_l2_bufr_amv key: '#1#windDirection' units: degree_north fill_value: -1.0e+100 coordinates: - - longitude_amv - - latitude_amv + - longitude + - latitude speed: name: speed long_name: Speed of AMV standard_name: wind_speed - resolution: none file_type: fci_l2_bufr_amv key: '#1#windSpeed' units: m/s fill_value: -1.0e+100 coordinates: - - longitude_amv - - latitude_amv + - longitude + - latitude speed_u_component: name: speed_u_component long_name: Speed U component of AMV standard_name: wind_speed_horizontal_component - resolution: none file_type: fci_l2_bufr_amv key: '#1#u' units: m/s fill_value: -1.0e+100 coordinates: - - longitude_amv - - latitude_amv + - longitude + - latitude speed_v_component: name: speed_v_component long_name: Speed V component of AMV standard_name: wind_speed_vertival_component - resolution: none file_type: fci_l2_bufr_amv key: '#1#v' units: m/s fill_value: -1.0e+100 coordinates: - - longitude_amv - - latitude_amv + - longitude + - latitude target_type: name: target_type long_name: Target type (cloud or clearsky) standard_name: wind_target_type - resolution: none file_type: fci_l2_bufr_amv key: '#1#extendedHeightAssignmentMethod' units: "" fill_value: -1.0e+100 coordinates: - - longitude_amv - - latitude_amv + - longitude + - latitude wind_method: name: wind_method long_name: Wind derivation method standard_name: wind_wind_method - resolution: none file_type: fci_l2_bufr_amv key: 'satelliteDerivedWindComputationMethod' units: "" fill_value: -1.0e+100 coordinates: - - longitude_amv - - latitude_amv + - longitude + - latitude qi: name: qi long_name: Overall Reliability of AMV standard_name: wind_overall_reliability - resolution: none file_type: fci_l2_bufr_amv key: '#1#percentConfidence' units: '%' fill_value: -1.0e+100 coordinates: - - longitude_amv - - latitude_amv + - longitude + - latitude qi_excl_fcst: name: qi_excl_fcst long_name: Overall Reliability (excluding forecast) of AMV standard_name: wind_overall_reliability_exc_forecast - resolution: none file_type: fci_l2_bufr_amv key: '#2#percentConfidence' units: '%' fill_value: -1.0e+100 coordinates: - - longitude_amv - - latitude_amv + - longitude + - latitude channel_id: name: channel_id long_name: Channel Id standard_name: channel_id - resolution: none file_type: fci_l2_bufr_amv key: '#1#channelNumber' units: "" fill_value: -1.0e+100 coordinates: - - longitude_amv - - latitude_amv + - longitude + - latitude # ---- ASR products ------------ bt_mean_all_ir38: diff --git a/satpy/etc/readers/seviri_l2_bufr.yaml b/satpy/etc/readers/seviri_l2_bufr.yaml index b53f732052..42c4b3d3b6 100644 --- a/satpy/etc/readers/seviri_l2_bufr.yaml +++ b/satpy/etc/readers/seviri_l2_bufr.yaml @@ -66,7 +66,7 @@ datasets: long_name: Latitude standard_name: latitude resolution: [48006.450653072,9001.209497451,72009.675979608] - file_type: [seviri_l2_bufr_asr,seviri_l2_bufr_cla,seviri_l2_bufr_csr,seviri_l2_bufr_gii,seviri_l2_bufr_thu,seviri_l2_bufr_toz] + file_type: [seviri_l2_bufr_asr,seviri_l2_bufr_cla,seviri_l2_bufr_csr,seviri_l2_bufr_gii,seviri_l2_bufr_thu,seviri_l2_bufr_toz,seviri_l2_bufr_amv] units: degree_north fill_value: -1.e+100 @@ -74,7 +74,7 @@ datasets: name: longitude key: '#1#longitude' resolution: [48006.450653072,9001.209497451,72009.675979608] - file_type: [seviri_l2_bufr_asr,seviri_l2_bufr_cla,seviri_l2_bufr_csr,seviri_l2_bufr_gii,seviri_l2_bufr_thu,seviri_l2_bufr_toz] + file_type: [seviri_l2_bufr_asr,seviri_l2_bufr_cla,seviri_l2_bufr_csr,seviri_l2_bufr_gii,seviri_l2_bufr_thu,seviri_l2_bufr_toz,seviri_l2_bufr_amv] long_name: Longitude standard_name: longitude units: degree_east @@ -1246,29 +1246,10 @@ datasets: flag_meanings: ['not processed', 'first guess', 'high cloud (not processed)', 'successful retrieval', 'bad retrieval'] # ---- AMV products ------------ - latitude_amv: - name: latitude_amv - key: '#1#latitude' - resolution: none - file_type: seviri_l2_bufr_amv - standard_name: latitude - units: degree_north - fill_value: -1.e+100 - - longitude_amv: - name: longitude_amv - key: '#1#longitude' - resolution: none - file_type: seviri_l2_bufr_amv - standard_name: longitude - units: degree_east - fill_value: -1.e+100 - pressure: name: pressure long_name: Air Pressure at Wind Level standard_name: air_pressure - resolution: none file_type: seviri_l2_bufr_amv key: '#1#pressure' units: Pa @@ -1281,7 +1262,6 @@ datasets: name: oca_pressure long_name: Air Pressure at Wind Level feature from OCA hight assignment standard_name: air_pressure_at_wind_level - resolution: none file_type: fci_l2_bufr_amv key: '#3#pressure' units: Pa @@ -1294,7 +1274,6 @@ datasets: name: temperature long_name: Temperature of AMV feature standard_name: air_temperature_at_wind_level - resolution: none file_type: seviri_l2_bufr_amv key: '#1#airTemperature' units: K @@ -1307,7 +1286,6 @@ datasets: name: height file_type: seviri_l2_bufr_amv key: '#1#heightOfTopOfCloud' - resolution: none long_name: Height of AMV feature standard_name: height_at_wind_level units: m @@ -1320,7 +1298,6 @@ datasets: name: direction long_name: Wind Direction standard_name: wind_to_direction - resolution: none file_type: seviri_l2_bufr_amv key: '#1#windDirection' units: degrees_north @@ -1333,7 +1310,6 @@ datasets: name: speed long_name: Wind Speed standard_name: wind_speed - resolution: none file_type: seviri_l2_bufr_amv key: '#1#windSpeed' units: m/s @@ -1346,7 +1322,6 @@ datasets: name: speed_u_component long_name: Speed U component of AMV standard_name: wind_speed_horizontal_component - resolution: none file_type: seviri_l2_bufr_amv key: '#1#u' units: m/s @@ -1359,7 +1334,6 @@ datasets: name: speed_v_component long_name: Speed V component of AMV standard_name: wind_speed_vertival_component - resolution: none file_type: seviri_l2_bufr_amv key: '#1#v' units: m/s @@ -1372,7 +1346,6 @@ datasets: name: target_type long_name: Target type (cloud or clearsky) standard_name: wind_target_type - resolution: none file_type: seviri_l2_bufr_amv key: '#1#extendedHeightAssignmentMethod' units: "" @@ -1385,7 +1358,6 @@ datasets: name: wind_method long_name: Wind derivation method standard_name: wind_wind_method - resolution: none file_type: seviri_l2_bufr_amv key: 'satelliteDerivedWindComputationMethod' units: "" @@ -1398,7 +1370,6 @@ datasets: name: qi long_name: Overall Reliability of AMV standard_name: wind_overall_reliability - resolution: none file_type: seviri_l2_bufr_amv key: '#1#percentConfidence' units: '%' @@ -1411,7 +1382,6 @@ datasets: name: qi_excl_fcst long_name: Overall Reliability (excluding forecast) of AMV standard_name: wind_overall_reliability_exc_forecast - resolution: none file_type: seviri_l2_bufr_amv key: '#2#percentConfidence' units: '%' @@ -1424,7 +1394,6 @@ datasets: name: qi_excl_fcst_oca long_name: Overall Reliability (excluding forecast and OCA) of AMV standard_name: wind_overall_reliability_exc_forecast_and_oca - resolution: none file_type: seviri_l2_bufr_amv key: '#4#percentConfidence' units: '%' @@ -1437,7 +1406,6 @@ datasets: name: channel_id long_name: Channel Id standard_name: channel_id - resolution: none file_type: seviri_l2_bufr_amv key: '#1#channelNumber' units: "" diff --git a/satpy/readers/eum_l2_bufr.py b/satpy/readers/eum_l2_bufr.py index ccb84eab27..fcb3530a64 100644 --- a/satpy/readers/eum_l2_bufr.py +++ b/satpy/readers/eum_l2_bufr.py @@ -56,7 +56,7 @@ 71: {"ssp": "E0000", "name": "MTGi1"}} # sensor resolution (pixel size in m) -resolution_dict = {"fci": 1000, "seviri": 3000} +resolution_dict = {"fci": 2000, "seviri": 3000} # List of variables that are returned by eccodes as array, but we want as single value @@ -245,7 +245,7 @@ def get_dataset(self, dataset_id, dataset_info): """ arr = self.get_array(dataset_info["key"]) - if self.with_adef and not isinstance(dataset_id["resolution"],str): + if self.with_adef and "resolution" in dataset_id: xarr = self.get_dataset_with_area_def(arr, dataset_id) # coordinates are not relevant when returning data with an AreaDefinition if "coordinates" in dataset_info.keys(): @@ -314,8 +314,9 @@ def _add_attributes(self, xarr, dataset_info): xarr.attrs["sensor"] = self.sensor_name.upper() xarr.attrs["platform_name"] = self.platform_name xarr.attrs["ssp_lon"] = self.ssp_lon - if isinstance(dataset_info["resolution"],str): - xarr.attrs["seg_size"] = "none" + if ("resolution" not in dataset_info) or (dataset_info["resolution"] is None): + xarr.attrs["seg_size"] = None + xarr.attrs["resolution"] = None else: xarr.attrs["seg_size"] = round(dataset_info["resolution"]/resolution_dict[self.sensor_name]) diff --git a/satpy/tests/reader_tests/test_eum_l2_bufr.py b/satpy/tests/reader_tests/test_eum_l2_bufr.py index 1e78a9bf09..0d977dc394 100644 --- a/satpy/tests/reader_tests/test_eum_l2_bufr.py +++ b/satpy/tests/reader_tests/test_eum_l2_bufr.py @@ -123,10 +123,10 @@ "RectificationLongitude": "E0455", "area": AREA_DEF_MSG_IODC, "ssp_lon": 45.5, - "seg_size": "none", + "seg_size": None, "file_type": "seviri_l2_bufr_amv", "key": "#1#brightnessTemperature", - "resolution": "none"}, + "resolution": None}, "MSG2-SEVI-MSGASRE-0101-0101-20191106130000.000000000Z-20191106131702-1362128.bfr": { "platform_name": "MSG2", "spacecraft_number": "9", @@ -144,7 +144,7 @@ "RectificationLongitude": "E0000", "area": AREA_DEF_FCI_FES, "ssp_lon": 0.0, - "seg_size": 32, + "seg_size": 16, "file_type": "fci_l2_bufr_asr", "key": "#1#brightnessTemperature", "resolution": 32000}, @@ -155,10 +155,10 @@ "RectificationLongitude": "E0000", "area": AREA_DEF_FCI_FES, "ssp_lon": 0.0, - "seg_size": "none", + "seg_size": None, "file_type": "fci_l2_bufr_amv", "key": "#1#brightnessTemperature", - "resolution": "none"}} + "resolution": None}} TEST_FILES = list(TEST_DATA.keys()) @@ -300,7 +300,7 @@ def test_data_with_swath_definition(input_file): def test_data_with_area_definition(self, input_file): """Test data loaded with an area definition.""" - if TEST_DATA[input_file]["seg_size"] == "none": + if TEST_DATA[input_file]["seg_size"] is None: # Skip this test return @@ -328,7 +328,7 @@ def test_data_with_area_definition(self, input_file): def test_data_with_rect_lon(self, input_file): """Test data loaded with an area definition and a rectification longitude.""" - if TEST_DATA[input_file]["seg_size"] == "none": + if TEST_DATA[input_file]["seg_size"] is None: # Skip this test return From 20825fabf5467c901077d22c41e9005e517cb2d3 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Wed, 12 Jun 2024 16:26:44 +0200 Subject: [PATCH 33/41] slight improvements to resolution handling --- satpy/etc/readers/fci_l2_bufr.yaml | 4 ++-- satpy/etc/readers/seviri_l2_bufr.yaml | 4 ++-- satpy/readers/eum_l2_bufr.py | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/satpy/etc/readers/fci_l2_bufr.yaml b/satpy/etc/readers/fci_l2_bufr.yaml index f0f841f629..ef515d0471 100644 --- a/satpy/etc/readers/fci_l2_bufr.yaml +++ b/satpy/etc/readers/fci_l2_bufr.yaml @@ -24,7 +24,7 @@ datasets: latitude: name: latitude key: '#1#latitude' - resolution: [32000] + resolution: [32000, -1] file_type: [fci_l2_bufr_asr,fci_l2_bufr_amv] standard_name: latitude units: degree_north @@ -33,7 +33,7 @@ datasets: longitude: name: longitude key: '#1#longitude' - resolution: [32000] + resolution: [32000, -1] file_type: [fci_l2_bufr_asr,fci_l2_bufr_amv] standard_name: longitude units: degree_east diff --git a/satpy/etc/readers/seviri_l2_bufr.yaml b/satpy/etc/readers/seviri_l2_bufr.yaml index 42c4b3d3b6..8d7a145c21 100644 --- a/satpy/etc/readers/seviri_l2_bufr.yaml +++ b/satpy/etc/readers/seviri_l2_bufr.yaml @@ -65,7 +65,7 @@ datasets: key: '#1#latitude' long_name: Latitude standard_name: latitude - resolution: [48006.450653072,9001.209497451,72009.675979608] + resolution: [48006.450653072,48006.450653072,48006.450653072,9001.209497451,48006.450653072,9001.209497451,-1] file_type: [seviri_l2_bufr_asr,seviri_l2_bufr_cla,seviri_l2_bufr_csr,seviri_l2_bufr_gii,seviri_l2_bufr_thu,seviri_l2_bufr_toz,seviri_l2_bufr_amv] units: degree_north fill_value: -1.e+100 @@ -73,7 +73,7 @@ datasets: longitude: name: longitude key: '#1#longitude' - resolution: [48006.450653072,9001.209497451,72009.675979608] + resolution: [48006.450653072,48006.450653072,48006.450653072,9001.209497451,48006.450653072,9001.209497451,-1] file_type: [seviri_l2_bufr_asr,seviri_l2_bufr_cla,seviri_l2_bufr_csr,seviri_l2_bufr_gii,seviri_l2_bufr_thu,seviri_l2_bufr_toz,seviri_l2_bufr_amv] long_name: Longitude standard_name: longitude diff --git a/satpy/readers/eum_l2_bufr.py b/satpy/readers/eum_l2_bufr.py index fcb3530a64..3fcdaf3c16 100644 --- a/satpy/readers/eum_l2_bufr.py +++ b/satpy/readers/eum_l2_bufr.py @@ -251,6 +251,9 @@ def get_dataset(self, dataset_id, dataset_info): if "coordinates" in dataset_info.keys(): del dataset_info["coordinates"] else: + if self.with_adef: + logging.warning("Trying to use area definition with a dataset without resolution. " + "The keyword will be ignored") xarr = xr.DataArray(arr, dims=["y"]) if "fill_value" in dataset_info: From a70db2a08255d8d5bf4857f08a3ef2a7085f745a Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Wed, 12 Jun 2024 17:16:46 +0200 Subject: [PATCH 34/41] change to random generator --- satpy/tests/reader_tests/test_eum_l2_bufr.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/satpy/tests/reader_tests/test_eum_l2_bufr.py b/satpy/tests/reader_tests/test_eum_l2_bufr.py index 0d977dc394..feb3f88d84 100644 --- a/satpy/tests/reader_tests/test_eum_l2_bufr.py +++ b/satpy/tests/reader_tests/test_eum_l2_bufr.py @@ -89,9 +89,9 @@ ) # Test data for mock file -DATA = np.random.uniform(low=250, high=350, size=(128,)) -LAT = np.random.uniform(low=-80, high=80, size=(128,)) -LON = np.random.uniform(low=-38.5, high=121.5, size=(128,)) +DATA = np.random.default_rng().uniform(low=250, high=350, size=(128,)) +LAT = np.random.default_rng().uniform(low=-80, high=80, size=(128,)) +LON = np.random.default_rng().uniform(low=-38.5, high=121.5, size=(128,)) os.environ["ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS"] = "1" From 5ac1df8f4cb10749d047f59b9e4d8a07dfe8f8c2 Mon Sep 17 00:00:00 2001 From: Johan Strandgren <42137969+strandgren@users.noreply.github.com> Date: Thu, 13 Jun 2024 13:48:07 +0200 Subject: [PATCH 35/41] Add and modify SEVIRI GII dataset units. --- satpy/etc/readers/seviri_l2_bufr.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/satpy/etc/readers/seviri_l2_bufr.yaml b/satpy/etc/readers/seviri_l2_bufr.yaml index 8d7a145c21..24abddf255 100644 --- a/satpy/etc/readers/seviri_l2_bufr.yaml +++ b/satpy/etc/readers/seviri_l2_bufr.yaml @@ -1081,7 +1081,7 @@ datasets: coordinates: - longitude - latitude - units: "" + units: "\u00B0C" file_type: seviri_l2_bufr_gii fill_value: -1.e+100 @@ -1094,7 +1094,7 @@ datasets: coordinates: - longitude - latitude - units: "" + units: "\u00B0C" file_type: seviri_l2_bufr_gii fill_value: -1.e+100 @@ -1107,7 +1107,7 @@ datasets: coordinates: - longitude - latitude - units: "" + units: "\u00B0C" file_type: seviri_l2_bufr_gii fill_value: -1.e+100 @@ -1120,7 +1120,7 @@ datasets: coordinates: - longitude - latitude - units: mm + units: kg/m2 file_type: seviri_l2_bufr_gii fill_value: -1.e+100 @@ -1133,7 +1133,7 @@ datasets: coordinates: - longitude - latitude - units: mm + units: kg/m2 file_type: seviri_l2_bufr_gii fill_value: -1.e+100 @@ -1146,7 +1146,7 @@ datasets: coordinates: - longitude - latitude - units: mm + units: kg/m2 file_type: seviri_l2_bufr_gii fill_value: -1.e+100 @@ -1159,7 +1159,7 @@ datasets: coordinates: - longitude - latitude - units: "" + units: "\u00B0C" file_type: seviri_l2_bufr_gii fill_value: -1.e+100 @@ -1185,7 +1185,7 @@ datasets: coordinates: - longitude - latitude - units: mm + units: kg/m2 file_type: seviri_l2_bufr_gii fill_value: -1.e+100 From 191daeccbac711ce9ed12d79b6deb0466027173b Mon Sep 17 00:00:00 2001 From: Johan Strandgren <42137969+strandgren@users.noreply.github.com> Date: Thu, 13 Jun 2024 14:07:51 +0200 Subject: [PATCH 36/41] File clean up. --- satpy/readers/eum_l2_bufr.py | 48 ++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/satpy/readers/eum_l2_bufr.py b/satpy/readers/eum_l2_bufr.py index 54419185ec..45259ac5a1 100644 --- a/satpy/readers/eum_l2_bufr.py +++ b/satpy/readers/eum_l2_bufr.py @@ -56,20 +56,20 @@ 57: {"ssp": "E0095", "name": "MSG3"}, 70: {"ssp": "E0000", "name": "MSG4"}, 71: {"ssp": "E0000", "name": "MTGi1"}} -# sensor resolution (pixel size in m) +# Sensor resolution (pixel size in m) used to deermine product segment sizes resolution_dict = {"fci": 2000, "seviri": 3000} +# Set this environment variable to get consistent array sizes from eccodes. This fixes the cases +# where all values in the expected array are the same (in particular fill values) which causes +# eccodes to encode them and return them as a single value +os.environ["ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS"] = "1" -# List of variables that are returned by eccodes as array, but we want as single value +# List of variables that are now returned by eccodes as array, but that we want as single value deprecate_to_single_value = ["satelliteIdentifier"] -# Need to set this in order to get consistent array sizes from eccodes -os.environ["ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS"] = "1" - - class EumetsatL2BufrFileHandler(BaseFileHandler): - """File handler for EUMETSAT SEVIRI and FCI L2 BUFR products. + """File handler for EUMETSAT Central Facility SEVIRI and FCI L2 BUFR products. **Loading data with AreaDefinition** @@ -107,7 +107,6 @@ def __init__(self, filename, filename_info, filetype_info, with_area_definition= self.bufr_header = self._read_mpef_header() else: # Product was retrieved from the EUMETSAT Data Center - # get all attributes in one call attr = self.get_attributes(["typicalDate", "typicalTime", "satelliteIdentifier"]) timeStr = attr["typicalDate"]+attr["typicalTime"] sc_id = int(attr["satelliteIdentifier"]) @@ -151,7 +150,6 @@ def sensor_name(self): @property def ssp_lon(self): """Return subsatellite point longitude.""" - # e.g. E0415 ssp_lon = self.bufr_header["RectificationLongitude"] return float(ssp_lon[1:])/10. @@ -170,15 +168,15 @@ def _read_mpef_header(self): def get_attributes(self, keys): """Get BUFR attributes.""" # This function is inefficient as it is looping through the entire - # file to get 1 attribute. It causes a problem though if you break - # from the file early - dont know why but investigating - fix later + # file to get a list of attributes. It causes a problem though if you break + # from the file early - dont know why but investigating - fix later. fh = open(self.filename, "rb") - # initialize output - attr = dict() - + # Initialize output + attrs = dict() + while True: - # get handle for message + # Get handle for message bufr = ec.codes_bufr_new_from_file(fh) if bufr is None: break @@ -186,21 +184,21 @@ def get_attributes(self, keys): for k in keys: try: if k in deprecate_to_single_value: - # Extract satelliteIdentifier single value. The satelliteIdentifier attribute is returned as an - # array becasue the environment variable ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS is set to 1. + # With ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS set to 1 all values, including scalars, are + # returned as arrays. Hence, we extract the single value here. value = ec.codes_get_array(bufr, k)[0] else: value = ec.codes_get(bufr, k) - attr[k] = value + attrs[k] = value except BaseException: - attr[k] = None + attrs[k] = None logging.warning(f"Failed to read key {k} from message") ec.codes_release(bufr) fh.close() - return attr + return attrs def get_array(self, key): """Get all data from file for the given BUFR key.""" @@ -217,10 +215,6 @@ def get_array(self, key): logging.warning(f"Key: {key} does not exist in BUFR file") return None - # Introduced fix for cases where all values in the expected array are the same - # (in particular fill values) which causes the eccodes to encode them and return - # them as a single value - # if is the first message initialise our final array if (msgCount == 0): arr = da.from_array(ec.codes_get_array(bufr, key, float), chunks=CHUNK_SIZE) @@ -248,13 +242,13 @@ def get_dataset(self, dataset_id, dataset_info): if self.with_adef and "resolution" in dataset_id: xarr = self.get_dataset_with_area_def(arr, dataset_id) - # coordinates are not relevant when returning data with an AreaDefinition + # Coordinates are not relevant when returning data with an AreaDefinition if "coordinates" in dataset_info.keys(): del dataset_info["coordinates"] else: if self.with_adef: - logging.warning("Trying to use area definition with a dataset without resolution. " - "The keyword will be ignored") + logging.warning("Trying to use `with_area_definition=True` for a dataset without resolution. " + "This is not supported and the keyword will be ignored.") xarr = xr.DataArray(arr, dims=["y"]) if "fill_value" in dataset_info: From 825c1462cd67e85ba498ac398eb935fd28000b1e Mon Sep 17 00:00:00 2001 From: Johan Strandgren <42137969+strandgren@users.noreply.github.com> Date: Thu, 13 Jun 2024 14:11:03 +0200 Subject: [PATCH 37/41] Remove blank whitespace --- satpy/readers/eum_l2_bufr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/satpy/readers/eum_l2_bufr.py b/satpy/readers/eum_l2_bufr.py index 45259ac5a1..503879b484 100644 --- a/satpy/readers/eum_l2_bufr.py +++ b/satpy/readers/eum_l2_bufr.py @@ -174,7 +174,7 @@ def get_attributes(self, keys): # Initialize output attrs = dict() - + while True: # Get handle for message bufr = ec.codes_bufr_new_from_file(fh) From 653e6a433a8d940954777ca95998f3cce7e8f7ac Mon Sep 17 00:00:00 2001 From: Johan Strandgren Date: Fri, 14 Jun 2024 08:01:15 +0000 Subject: [PATCH 38/41] Move setting of BUFR ENV variable to init and delete when finished. --- satpy/readers/eum_l2_bufr.py | 17 ++++++++++++----- satpy/tests/reader_tests/test_eum_l2_bufr.py | 4 ---- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/satpy/readers/eum_l2_bufr.py b/satpy/readers/eum_l2_bufr.py index 503879b484..e6ff5d61e8 100644 --- a/satpy/readers/eum_l2_bufr.py +++ b/satpy/readers/eum_l2_bufr.py @@ -59,11 +59,6 @@ # Sensor resolution (pixel size in m) used to deermine product segment sizes resolution_dict = {"fci": 2000, "seviri": 3000} -# Set this environment variable to get consistent array sizes from eccodes. This fixes the cases -# where all values in the expected array are the same (in particular fill values) which causes -# eccodes to encode them and return them as a single value -os.environ["ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS"] = "1" - # List of variables that are now returned by eccodes as array, but that we want as single value deprecate_to_single_value = ["satelliteIdentifier"] @@ -102,6 +97,11 @@ def __init__(self, filename, filename_info, filetype_info, with_area_definition= filename_info, filetype_info) + # Set this environment variable to get consistent array sizes from eccodes. This fixes the cases + # where all values in the expected array are the same (in particular fill values) which causes + # eccodes to encode them and return them as a single value + os.environ["ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS"] = "1" + if ("server" in filename_info): # EUMETSAT Offline Bufr product self.bufr_header = self._read_mpef_header() @@ -122,6 +122,13 @@ def __init__(self, filename, filename_info, filetype_info, with_area_definition= self.filetype = filetype_info["file_type"] self.with_adef = with_area_definition + def __del__(self): + """Delete the instance and environment variable.""" + try: + del os.environ["ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS"] + except KeyError: + pass + @property def start_time(self): """Return the repeat cycle start time.""" diff --git a/satpy/tests/reader_tests/test_eum_l2_bufr.py b/satpy/tests/reader_tests/test_eum_l2_bufr.py index feb3f88d84..fff1b08f15 100644 --- a/satpy/tests/reader_tests/test_eum_l2_bufr.py +++ b/satpy/tests/reader_tests/test_eum_l2_bufr.py @@ -17,7 +17,6 @@ # satpy. If not, see . """Unittesting the EUMETSAT L2 BUFR reader.""" -import os import sys import unittest from datetime import datetime @@ -93,9 +92,6 @@ LAT = np.random.default_rng().uniform(low=-80, high=80, size=(128,)) LON = np.random.default_rng().uniform(low=-38.5, high=121.5, size=(128,)) - -os.environ["ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS"] = "1" - # Test cases dictionaries TEST_DATA = {"GIIBUFRProduct_20231027140000Z_00_OMPEFS03_MET10_FES_E0000": { "platform_name": "MSG3", From 2f9dbe9c140c63232e9ade0ba1465849cb202ba7 Mon Sep 17 00:00:00 2001 From: Johan Strandgren Date: Fri, 14 Jun 2024 12:32:44 +0000 Subject: [PATCH 39/41] Refactor tests for easier maintainence. --- satpy/readers/eum_l2_bufr.py | 2 - satpy/tests/reader_tests/test_eum_l2_bufr.py | 142 +++++++++---------- 2 files changed, 67 insertions(+), 77 deletions(-) diff --git a/satpy/readers/eum_l2_bufr.py b/satpy/readers/eum_l2_bufr.py index e6ff5d61e8..15c594bf73 100644 --- a/satpy/readers/eum_l2_bufr.py +++ b/satpy/readers/eum_l2_bufr.py @@ -151,8 +151,6 @@ def sensor_name(self): return "seviri" elif self.platform_name.startswith("MTG"): return "fci" - else: - raise NotImplementedError(f"Unknown satellite platform {self.platform_name}.") @property def ssp_lon(self): diff --git a/satpy/tests/reader_tests/test_eum_l2_bufr.py b/satpy/tests/reader_tests/test_eum_l2_bufr.py index fff1b08f15..274dbdab8b 100644 --- a/satpy/tests/reader_tests/test_eum_l2_bufr.py +++ b/satpy/tests/reader_tests/test_eum_l2_bufr.py @@ -75,7 +75,6 @@ (-5567999.998550739, -5567999.998550739, 5567999.994203017, 5567999.994203017) ) - AREA_DEF_MSG_FES_3km_ext = geometry.AreaDefinition( "msg_seviri_fes_9km_ext", "MSG SEVIRI Full Earth Scanning service area definition with 9 km resolution", @@ -102,7 +101,8 @@ "seg_size": 3, "file_type": "seviri_l2_bufr_gii", "key": "#1#brightnessTemperature", - "resolution": 9001}, + "resolution": 9001, + "data": DATA}, "ASRBUFRProd_20231022224500Z_00_OMPEFS03_MET10_FES_E0000": { "platform_name": "MSG3", "spacecraft_number": "10", @@ -112,7 +112,8 @@ "seg_size": 16, "file_type": "seviri_l2_bufr_asr", "key": "#1#brightnessTemperature", - "resolution": 48006}, + "resolution": 48006, + "data": DATA}, "AMVBUFRProd_20231023044500Z_00_OMPEFS02_MET09_FES_E0455": { "platform_name": "MSG2", "spacecraft_number": "9", @@ -122,7 +123,8 @@ "seg_size": None, "file_type": "seviri_l2_bufr_amv", "key": "#1#brightnessTemperature", - "resolution": None}, + "resolution": None, + "data": DATA}, "MSG2-SEVI-MSGASRE-0101-0101-20191106130000.000000000Z-20191106131702-1362128.bfr": { "platform_name": "MSG2", "spacecraft_number": "9", @@ -132,7 +134,8 @@ "seg_size": 16, "file_type": "seviri_l2_bufr_asr", "key": "#1#brightnessTemperature", - "resolution": 48006}, + "resolution": 48006, + "data": DATA}, """W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-2-ASR--FD------BUFR_C_EUMT_ 20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin""": { "platform_name": "MTGi1", @@ -143,7 +146,8 @@ "seg_size": 16, "file_type": "fci_l2_bufr_asr", "key": "#1#brightnessTemperature", - "resolution": 32000}, + "resolution": 32000, + "data": DATA}, """W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-2-AMV--FD------BUFR_C_EUMT_ 20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin""": { "platform_name": "MTGi1", @@ -154,7 +158,8 @@ "seg_size": None, "file_type": "fci_l2_bufr_amv", "key": "#1#brightnessTemperature", - "resolution": None}} + "resolution": None, + "data": DATA}} TEST_FILES = list(TEST_DATA.keys()) @@ -163,7 +168,7 @@ class L2BufrData: """Mock L2 BUFR data.""" @unittest.skipIf(sys.platform.startswith("win"), "'eccodes' not supported on Windows") - def __init__(self, filename, with_adef=False, rect_lon="default"): + def __init__(self, filename, test_data, with_adef=False, rect_lon="default"): """Initialize by mocking test data for testing the L2 BUFR reader.""" import eccodes as ec @@ -173,14 +178,14 @@ def __init__(self, filename, with_adef=False, rect_lon="default"): ec.codes_set(self.buf1, "unpack", 1) # write the bufr test data twice as we want to read in and then concatenate the data in the reader # 55 id corresponds to METEOSAT 8 - ec.codes_set(self.buf1, "satelliteIdentifier", 47 + int(TEST_DATA[filename]["spacecraft_number"])) + ec.codes_set(self.buf1, "satelliteIdentifier", 47 + int(test_data["spacecraft_number"])) ec.codes_set_array(self.buf1, "#1#latitude", LAT) ec.codes_set_array(self.buf1, "#1#longitude", LON) - ec.codes_set_array(self.buf1, TEST_DATA[filename]["key"], DATA) + ec.codes_set_array(self.buf1, test_data["key"], test_data["data"]) self.m = mock.mock_open() - FILETYPE_INFO = {"file_type": TEST_DATA[filename]["file_type"]} + FILETYPE_INFO = {"file_type": test_data["file_type"]} # only our offline product contain MPEF product headers so we get the metadata from there if ("BUFRProd" in filename): @@ -188,19 +193,19 @@ def __init__(self, filename, with_adef=False, rect_lon="default"): MPEF_PRODUCT_HEADER = { "NominalTime": datetime(2019, 11, 6, 18, 0), - "SpacecraftName": TEST_DATA[filename]["spacecraft_number"], - "RectificationLongitude": TEST_DATA[filename]["RectificationLongitude"] - } + "SpacecraftName": test_data["spacecraft_number"], + "RectificationLongitude": test_data["RectificationLongitude"] + } fromfile.return_value = MPEF_PRODUCT_HEADER with mock.patch("satpy.readers.eum_l2_bufr.recarray2dict") as recarray2dict: recarray2dict.side_effect = (lambda x: x) - FILENAME_INFO = {"start_time": "20231022224500", "spacecraft": TEST_DATA[filename]["platform_name"], + FILENAME_INFO = {"start_time": "20231022224500", "spacecraft": test_data["platform_name"], "server": "TESTSERVER"} self.fh = EumetsatL2BufrFileHandler( filename, FILENAME_INFO, FILETYPE_INFO, with_area_definition=with_adef, - rectification_longitude=int(TEST_DATA[filename]["RectificationLongitude"][1:])/10) + rectification_longitude=int(test_data["RectificationLongitude"][1:]) / 10) self.fh.mpef_header = MPEF_PRODUCT_HEADER else: @@ -215,13 +220,13 @@ def __init__(self, filename, with_adef=False, rect_lon="default"): ec5.return_value = 1 FILENAME_INFO = {"start_time": "20191112000000", - "spacecraft": TEST_DATA[filename]["platform_name"]} + "spacecraft": test_data["platform_name"]} self.fh = EumetsatL2BufrFileHandler( - filename, FILENAME_INFO, FILETYPE_INFO, - with_area_definition=with_adef, - rectification_longitude=int(TEST_DATA[filename]["RectificationLongitude"][1:])/10) + filename, FILENAME_INFO, FILETYPE_INFO, + with_area_definition=with_adef, + rectification_longitude=int(test_data["RectificationLongitude"][1:]) / 10) - self.resolution = TEST_DATA[filename]["resolution"] + self.resolution = test_data["resolution"] def get_data(self, dataset_name, key, coordinates): """Read data from mock file.""" @@ -255,7 +260,8 @@ class TestL2BufrReader: @staticmethod def test_lonslats(input_file): """Test reading of longitude and latitude data with EUMETSAT L2 BUFR reader.""" - bufr_obj = L2BufrData(input_file) + test_data = TEST_DATA[input_file] + bufr_obj = L2BufrData(input_file, test_data) zlat = bufr_obj.get_data("latitude", "#1#latitude", coordinates=False) zlon = bufr_obj.get_data("longitude", "#1#longitude", coordinates=False) np.testing.assert_array_equal(zlat.values, np.concatenate((LAT, LAT), axis=0)) @@ -264,51 +270,55 @@ def test_lonslats(input_file): @staticmethod def test_attributes_with_swath_definition(input_file): """Test correctness of dataset attributes with data loaded with a SwathDefinition (default behaviour).""" - bufr_obj = L2BufrData(input_file) - z = bufr_obj.get_data(dataset_name="TestData", key=TEST_DATA[input_file]["key"], coordinates=True) - assert z.attrs["platform_name"] == TEST_DATA[input_file]["platform_name"] - assert z.attrs["ssp_lon"] == TEST_DATA[input_file]["ssp_lon"] - assert z.attrs["seg_size"] == TEST_DATA[input_file]["seg_size"] + test_data = TEST_DATA[input_file] + bufr_obj = L2BufrData(input_file, test_data) + z = bufr_obj.get_data(dataset_name="TestData", key=test_data["key"], coordinates=True) + assert z.attrs["platform_name"] == test_data["platform_name"] + assert z.attrs["ssp_lon"] == test_data["ssp_lon"] + assert z.attrs["seg_size"] == test_data["seg_size"] @staticmethod def test_attributes_with_area_definition(input_file): """Test correctness of dataset attributes with data loaded with a AreaDefinition.""" - bufr_obj = L2BufrData(input_file, with_adef=True) + test_data = TEST_DATA[input_file] + bufr_obj = L2BufrData(input_file, test_data, with_adef=True) _ = bufr_obj.get_data("latitude", "#1#latitude", coordinates=False) _ = bufr_obj.get_data("longitude", "#1#longitude", coordinates=False) - z = bufr_obj.get_data(dataset_name="TestData", key=TEST_DATA[input_file]["key"], coordinates=True) - assert z.attrs["platform_name"] == TEST_DATA[input_file]["platform_name"] - assert z.attrs["ssp_lon"] == TEST_DATA[input_file]["ssp_lon"] - assert z.attrs["seg_size"] == TEST_DATA[input_file]["seg_size"] + z = bufr_obj.get_data(dataset_name="TestData", key=test_data["key"], coordinates=True) + assert z.attrs["platform_name"] == test_data["platform_name"] + assert z.attrs["ssp_lon"] == test_data["ssp_lon"] + assert z.attrs["seg_size"] == test_data["seg_size"] @staticmethod def test_data_with_swath_definition(input_file): """Test data loaded with SwathDefinition (default behaviour).""" - bufr_obj = L2BufrData(input_file) + test_data = TEST_DATA[input_file] + bufr_obj = L2BufrData(input_file, test_data) with pytest.raises(NotImplementedError): bufr_obj.fh.get_area_def(None) # concatenate original test arrays as get_dataset will have read and concatented the data x1 = np.concatenate((DATA, DATA), axis=0) - z = bufr_obj.get_data(dataset_name="TestData", key=TEST_DATA[input_file]["key"], coordinates=True) + z = bufr_obj.get_data(dataset_name="TestData", key=test_data["key"], coordinates=True) np.testing.assert_array_equal(z.values, x1) def test_data_with_area_definition(self, input_file): """Test data loaded with an area definition.""" - if TEST_DATA[input_file]["seg_size"] is None: + test_data = TEST_DATA[input_file] + if test_data["seg_size"] is None: # Skip this test return - bufr_obj = L2BufrData(input_file, with_adef=True) + bufr_obj = L2BufrData(input_file, test_data, with_adef=True) _ = bufr_obj.get_data("latitude", "#1#latitude", coordinates=False) _ = bufr_obj.get_data("longitude", "#1#longitude", coordinates=False) - z = bufr_obj.get_data(dataset_name="TestData", key=TEST_DATA[input_file]["key"], coordinates=True) + z = bufr_obj.get_data(dataset_name="TestData", key=test_data["key"], coordinates=True) ad = bufr_obj.fh.get_area_def(None) - assert ad == TEST_DATA[input_file]["area"] + assert ad == test_data["area"] data_1d = np.concatenate((DATA, DATA), axis=0) # Put BUFR data on 2D grid that the 2D array returned by get_dataset should correspond to @@ -324,64 +334,46 @@ def test_data_with_area_definition(self, input_file): def test_data_with_rect_lon(self, input_file): """Test data loaded with an area definition and a rectification longitude.""" - if TEST_DATA[input_file]["seg_size"] is None: + test_data = TEST_DATA[input_file] + if test_data["seg_size"] is None: # Skip this test return - bufr_obj = L2BufrData(input_file, with_adef=True) + bufr_obj = L2BufrData(input_file, test_data, with_adef=True) np.testing.assert_equal(bufr_obj.fh.ssp_lon, - int(TEST_DATA[input_file]["RectificationLongitude"][1:])/10) + int(test_data["RectificationLongitude"][1:]) / 10) _ = bufr_obj.get_data("latitude", "#1#latitude", coordinates=False) _ = bufr_obj.get_data("longitude", "#1#longitude", coordinates=False) - _ = bufr_obj.get_data(dataset_name="TestData", key=TEST_DATA[input_file]["key"], coordinates=True) + _ = bufr_obj.get_data(dataset_name="TestData", key=test_data["key"], coordinates=True) # We need to lead the data in order to create the AreaDefinition ad = bufr_obj.fh.get_area_def(None) - assert ad == TEST_DATA[input_file]["area"] + assert ad == test_data["area"] def test_resolution(self, input_file): """Test data loaded with the correct resolution attribute .""" - bufr_obj = L2BufrData(input_file, with_adef=True) + test_data = TEST_DATA[input_file] + bufr_obj = L2BufrData(input_file, test_data, with_adef=True) _ = bufr_obj.get_data("latitude", "#1#latitude", coordinates=False) _ = bufr_obj.get_data("longitude", "#1#longitude", coordinates=False) - z = bufr_obj.get_data(dataset_name="TestData", key=TEST_DATA[input_file]["key"], coordinates=True) + z = bufr_obj.get_data(dataset_name="TestData", key=test_data["key"], coordinates=True) assert z.attrs["resolution"] == bufr_obj.resolution + def test_amv_with_area_def(self, input_file): + """Test that AMV data can not be loaded with an area definition. -class AMVBufrData: - """Mock L2 AMV BUFR data.""" - - @unittest.skipIf(sys.platform.startswith("win"), "eccodes not supported on Windows") - def __init__(self, filename): - """Initialize by mocking test data for testing the L2 BUFR reader.""" - from satpy.readers.eum_l2_bufr import EumetsatL2BufrFileHandler - - with mock.patch("satpy.readers.eum_l2_bufr.np.fromfile"): - FILENAME_INFO = {"start_time": "20191112000000", - "spacecraft": TEST_DATA[filename]["platform_name"], - "server": "TESTSERVER"} - self.fh = EumetsatL2BufrFileHandler( - filename, FILENAME_INFO, - filetype_info={"file_type": TEST_DATA[filename]["file_type"]}, - with_area_definition=True) - + The way to test this is to try load a variable with with_adef=True. The reader shall ignore this flag + and return a 1D array, not a 2D. + """ + test_data = TEST_DATA[input_file] + if test_data["file_type"] not in ["seviri_l2_bufr_amv", "fci_l2_bufr_amv"]: + return # Skip this test for non AMV datasets -class TestAMVBufrReader: - """Test EUMETSAT L2 BUFR Reader for AMV data.""" - - @staticmethod - def test_amv_with_area_def(): - """Test that AMV data can not be loaded with an area definition.""" - # The way to test this is to try load a variable with with_adef=True - # The reader shall ignore this flag and return a 1D array, not a 2D - - input_file = """W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-2-AMV--FD------BUFR_C_EUMT_ -20230623092246_L2PF_IV_20170410170000_20170410171000_V__C_0103_0000.bin""" - bufr_obj = L2BufrData(input_file, with_adef=True) + bufr_obj = L2BufrData(input_file, test_data, with_adef=True) _ = bufr_obj.get_data("latitude", "#1#latitude", coordinates=False) _ = bufr_obj.get_data("longitude", "#1#longitude", coordinates=False) - z = bufr_obj.get_data(dataset_name="TestData", key=TEST_DATA[input_file]["key"], coordinates=True) + z = bufr_obj.get_data(dataset_name="TestData", key=test_data["key"], coordinates=True) assert len(z.dims) == 1 From 01dd7a4a679f751f95f0a79bd578c22125cb70c9 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Tue, 23 Jul 2024 10:16:06 +0200 Subject: [PATCH 40/41] Fix unit for the ki/li/ko GII indices --- satpy/etc/readers/seviri_l2_bufr.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/satpy/etc/readers/seviri_l2_bufr.yaml b/satpy/etc/readers/seviri_l2_bufr.yaml index 24abddf255..f9127d401b 100644 --- a/satpy/etc/readers/seviri_l2_bufr.yaml +++ b/satpy/etc/readers/seviri_l2_bufr.yaml @@ -1081,7 +1081,7 @@ datasets: coordinates: - longitude - latitude - units: "\u00B0C" + units: "°C" file_type: seviri_l2_bufr_gii fill_value: -1.e+100 @@ -1094,7 +1094,7 @@ datasets: coordinates: - longitude - latitude - units: "\u00B0C" + units: "°C" file_type: seviri_l2_bufr_gii fill_value: -1.e+100 @@ -1107,7 +1107,7 @@ datasets: coordinates: - longitude - latitude - units: "\u00B0C" + units: "°C" file_type: seviri_l2_bufr_gii fill_value: -1.e+100 From 3b5c482530c2f88b89a12980b01c312236e847d0 Mon Sep 17 00:00:00 2001 From: Olivier Samain Date: Tue, 23 Jul 2024 10:20:30 +0200 Subject: [PATCH 41/41] Fix unit for the mb GII index --- satpy/etc/readers/seviri_l2_bufr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/satpy/etc/readers/seviri_l2_bufr.yaml b/satpy/etc/readers/seviri_l2_bufr.yaml index f9127d401b..d998afd8d9 100644 --- a/satpy/etc/readers/seviri_l2_bufr.yaml +++ b/satpy/etc/readers/seviri_l2_bufr.yaml @@ -1159,7 +1159,7 @@ datasets: coordinates: - longitude - latitude - units: "\u00B0C" + units: "°C" file_type: seviri_l2_bufr_gii fill_value: -1.e+100