Skip to content

Commit

Permalink
Add metimage III
Browse files Browse the repository at this point in the history
  • Loading branch information
Nina.Hakansson committed Nov 28, 2023
1 parent 1ffe1e9 commit 3f867f1
Showing 1 changed file with 16 additions and 3 deletions.
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 @@ 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'] = []
Expand All @@ -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'}
Expand All @@ -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']

Expand Down Expand Up @@ -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(

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

0 comments on commit 3f867f1

Please sign in to comment.