From 668ad4598f459f0206e7f857ba01298467ada4cb Mon Sep 17 00:00:00 2001 From: "Nina.Hakansson" Date: Mon, 27 Nov 2023 11:01:34 +0100 Subject: [PATCH 1/4] Add metimage --- nwcsafpps_runner/l1c_processing.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nwcsafpps_runner/l1c_processing.py b/nwcsafpps_runner/l1c_processing.py index e444a15..08a8dc8 100644 --- a/nwcsafpps_runner/l1c_processing.py +++ b/nwcsafpps_runner/l1c_processing.py @@ -31,6 +31,7 @@ from level1c4pps.viirs2pps_lib import process_one_scene as process_viirs from level1c4pps.modis2pps_lib import process_one_scene as process_modis from level1c4pps.avhrr2pps_lib import process_one_scene as process_avhrr +from level1c4pps.metimage2pps_lib import process_one_scene as process_metimage from nwcsafpps_runner.config import get_config_from_yamlfile as get_config @@ -38,14 +39,15 @@ SUPPORTED_SERVICE_NAMES = ['seviri-l1c', 'viirs-l1c', 'avhrr-l1c', 'modis-l1c'] -SUPPORTED_SATELLITES = {'seviri-l1c': - ['meteosat-8', 'meteosat-9', 'meteosat-10', 'meteosat-11'], +SUPPORTED_SATELLITES = {'seviri-l1c': ['meteosat-8', 'meteosat-9', 'meteosat-10', 'meteosat-11'], + 'metimage-l1c': ['metop-sg-a1', 'metop-sg-a2', 'metop-sg-a3'], 'viirs-l1c': ['suomi-npp', 'noaa-20', 'noaa-21', 'noaa-22'], 'avhrr-l1c': ['noaa-19', 'noaa-18', 'metop-b', 'metop-a', 'metop-c'], 'modis-l1c': ['eos-terra', 'eos-aqua'] } LVL1C_PROCESSOR_MAPPING = {'seviri-l1c': process_seviri, + 'metimage-l1c': process_metimage, 'viirs-l1c': process_viirs, 'modis-l1c': process_modis, 'avhrr-l1c': process_avhrr} From 1ffe1e987eff5245c2800d14ad3d90044e9590e6 Mon Sep 17 00:00:00 2001 From: "Nina.Hakansson" Date: Mon, 27 Nov 2023 12:13:27 +0100 Subject: [PATCH 2/4] Add metimage II --- nwcsafpps_runner/l1c_processing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nwcsafpps_runner/l1c_processing.py b/nwcsafpps_runner/l1c_processing.py index 08a8dc8..05104fc 100644 --- a/nwcsafpps_runner/l1c_processing.py +++ b/nwcsafpps_runner/l1c_processing.py @@ -37,7 +37,7 @@ LOG = logging.getLogger(__name__) -SUPPORTED_SERVICE_NAMES = ['seviri-l1c', 'viirs-l1c', 'avhrr-l1c', 'modis-l1c'] +SUPPORTED_SERVICE_NAMES = ['seviri-l1c', 'viirs-l1c', 'avhrr-l1c', 'modis-l1c', 'metimage-l1c'] SUPPORTED_SATELLITES = {'seviri-l1c': ['meteosat-8', 'meteosat-9', 'meteosat-10', 'meteosat-11'], 'metimage-l1c': ['metop-sg-a1', 'metop-sg-a2', 'metop-sg-a3'], From 3f867f1e028ebb361b714ce4128a999b6dab2658 Mon Sep 17 00:00:00 2001 From: "Nina.Hakansson" Date: Tue, 28 Nov 2023 12:15:55 +0100 Subject: [PATCH 3/4] Add metimage III --- nwcsafpps_runner/utils.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/nwcsafpps_runner/utils.py b/nwcsafpps_runner/utils.py index c58f025..315e12d 100644 --- a/nwcsafpps_runner/utils.py +++ b/nwcsafpps_runner/utils.py @@ -63,18 +63,20 @@ class FindTimeControlFileError(Exception): 'Metop-B', 'Metop-A', 'Metop-C'] SUPPORTED_EARS_AVHRR_SATELLITES = ['Metop-B', 'Metop-C'] SUPPORTED_MODIS_SATELLITES = ['EOS-Terra', 'EOS-Aqua'] -SUPPORTED_VIIRS_SATELLITES = ['Suomi-NPP', 'NOAA-20', 'NOAA-21', 'NOAA-22'] +SUPPORTED_VIIRS_SATELLITES = ['Suomi-NPP', 'NOAA-20', 'NOAA-21', 'NOAA-22', 'NOAA-23'] SUPPORTED_SEVIRI_SATELLITES = ['Meteosat-09', 'Meteosat-10', 'Meteosat-11'] +SUPPORTED_METIMAGE_SATELLITES = ['Metop-SG-A1', 'Metop-SG-A2', 'Metop-SG-A3'] SUPPORTED_PPS_SATELLITES = (SUPPORTED_AVHRR_SATELLITES + SUPPORTED_MODIS_SATELLITES + SUPPORTED_SEVIRI_SATELLITES + + SUPPORTED_METIMAGE_SATELLITES + SUPPORTED_VIIRS_SATELLITES) GEOLOC_PREFIX = {'EOS-Aqua': 'MYD03', 'EOS-Terra': 'MOD03'} DATA1KM_PREFIX = {'EOS-Aqua': 'MYD021km', 'EOS-Terra': 'MOD021km'} -PPS_SENSORS = ['amsu-a', 'amsu-b', 'mhs', 'avhrr/3', 'viirs', 'modis', 'seviri'] +PPS_SENSORS = ['amsu-a', 'amsu-b', 'mhs', 'avhrr/3', 'viirs', 'modis', 'seviri', 'metimage'] REQUIRED_MW_SENSORS = {} REQUIRED_MW_SENSORS['NOAA-15'] = ['amsu-a', 'amsu-b'] REQUIRED_MW_SENSORS['NOAA-18'] = [] @@ -92,8 +94,11 @@ class FindTimeControlFileError(Exception): 'NOAA-15': 'noaa15', 'Metop-A': 'metop02', 'Metop-B': 'metop01', 'Metop-C': 'metop03', + 'Metop-SG-A1': 'metopsga1', + 'Metop-SG-A2': 'metopsga2', + 'Metop-SG-A3': 'metopsga3', 'Suomi-NPP': 'npp', - 'NOAA-20': 'noaa20', 'NOAA-21': 'noaa21', + 'NOAA-20': 'noaa20', 'NOAA-21': 'noaa21', 'NOAA-23': 'noaa23', 'EOS-Aqua': 'eos2', 'EOS-Terra': 'eos1', 'Meteosat-09': 'meteosat09', 'Meteosat-10': 'meteosat10', 'Meteosat-11': 'meteosat11'} @@ -107,6 +112,8 @@ class FindTimeControlFileError(Exception): SENSOR_LIST[sat] = 'viirs' elif 'Meteosat' in sat: SENSOR_LIST[sat] = 'seviri' + elif 'Metop-SG' in sat: + SENSOR_LIST[sat] = 'metimage' else: SENSOR_LIST[sat] = ['avhrr/3', 'mhs', 'amsu-a'] @@ -305,6 +312,12 @@ def ready2run(msg, files4pps, use_l1c, **kwargs): 'Sensor ' + str(msg.data['sensor']) + ' not required for S-NPP/VIIRS PPS processing...') return False + elif msg.data['platform_name'] in SUPPORTED_METIMAGE_SATELLITES: + if msg.data['sensor'] not in ['metimage', ]: + LOG.info( + 'Sensor ' + str(msg.data['sensor']) + + ' not required for METIMAGE PPS processing...') + return False else: if msg.data['sensor'] not in NOAA_METOP_PPS_SENSORNAMES: LOG.info( From 8eb6b4c0176d17d8fe01776e32cfc86fd3d535b2 Mon Sep 17 00:00:00 2001 From: "Nina.Hakansson" Date: Tue, 16 Jan 2024 10:06:43 +0100 Subject: [PATCH 4/4] Update tests --- nwcsafpps_runner/tests/test_level1c_runner.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nwcsafpps_runner/tests/test_level1c_runner.py b/nwcsafpps_runner/tests/test_level1c_runner.py index 9e57a0b..98ff763 100644 --- a/nwcsafpps_runner/tests/test_level1c_runner.py +++ b/nwcsafpps_runner/tests/test_level1c_runner.py @@ -209,6 +209,7 @@ def test_check_service_is_supported(self): check_service_is_supported('viirs-l1c') check_service_is_supported('avhrr-l1c') check_service_is_supported('modis-l1c') + check_service_is_supported('metimage-l1c') self.assertRaises(ServiceNameNotSupported, check_service_is_supported, 'seviri')