Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metimage #59

Merged
merged 4 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions nwcsafpps_runner/l1c_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,23 @@
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

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'],
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}
Expand Down
1 change: 1 addition & 0 deletions nwcsafpps_runner/tests/test_level1c_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
19 changes: 16 additions & 3 deletions nwcsafpps_runner/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,20 @@
'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'] = []
Expand All @@ -92,8 +94,11 @@
'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'}
Expand All @@ -107,6 +112,8 @@
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']

Expand Down Expand Up @@ -305,6 +312,12 @@
'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(

Check warning on line 317 in nwcsafpps_runner/utils.py

View check run for this annotation

Codecov / codecov/patch

nwcsafpps_runner/utils.py#L317

Added line #L317 was not covered by tests
'Sensor ' + str(msg.data['sensor']) +
' not required for METIMAGE PPS processing...')
return False

Check warning on line 320 in nwcsafpps_runner/utils.py

View check run for this annotation

Codecov / codecov/patch

nwcsafpps_runner/utils.py#L320

Added line #L320 was not covered by tests
else:
if msg.data['sensor'] not in NOAA_METOP_PPS_SENSORNAMES:
LOG.info(
Expand Down
Loading