Skip to content

Commit

Permalink
Merge pull request #87 from adybbroe/add-noaa21
Browse files Browse the repository at this point in the history
Add noaa21
  • Loading branch information
mraspaud authored May 6, 2024
2 parents 0a9c19a + 0e1319e commit 009281c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
1 change: 1 addition & 0 deletions .stickler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ files:
ignore:
- 'docs/Makefile'
- 'docs/make.bat'

12 changes: 9 additions & 3 deletions trollsched/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (c) 2014 - 2019 PyTroll Community
# Copyright (c) 2014 - 2023 PyTroll Community

# Author(s):

Expand Down Expand Up @@ -31,8 +31,10 @@
# shortest allowed pass in minutes
MIN_PASS = 4

# DRL still use the name JPSS-1 in the TLEs:
NOAA20_NAME = {'NOAA-20': 'JPSS-1'}
# DRL still use the name JPSS-1 (etc) instead of NOAA-20 in the TLEs:
JPSS_TLE_NAMES = {'NOAA-20': 'JPSS-1',
'NOAA-21': 'JPSS-2',
'NOAA-22': 'JPSS-3'}

NUMBER_OF_FOVS = {
'avhrr': 2048,
Expand All @@ -56,12 +58,16 @@
'metopb': 'Metop-B',
'metopa': 'Metop-A',
'noaa20': 'NOAA-20',
'noaa21': 'NOAA-21',
'noaa22': 'NOAA-22',
'fengyun3d': 'FY-3D',
'fengyun3c': 'FY-3C'
}

INSTRUMENT = {'Suomi NPP': 'viirs',
'NOAA-20': 'viirs',
'NOAA-21': 'viirs',
'NOAA-22': 'viirs',
'Aqua': 'modis',
'Terra': 'modis',
'NOAA 19': 'avhrr',
Expand Down
8 changes: 4 additions & 4 deletions trollsched/satpass.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (c) 2014 - 2019 PyTroll Community
# Copyright (c) 2014 - 2019, 2023 PyTroll Community
# Author(s):

# Martin Raspaud <[email protected]>
Expand Down Expand Up @@ -38,7 +38,7 @@
from pyorbital import orbital, tlefile
from pyresample.boundary import AreaDefBoundary

from trollsched import MIN_PASS, NOAA20_NAME, NUMBER_OF_FOVS
from trollsched import MIN_PASS, JPSS_TLE_NAMES, NUMBER_OF_FOVS
from trollsched.boundary import SwathBoundary

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -184,11 +184,11 @@ def __init__(self, satellite, risetime, falltime, **kwargs):
except KeyError as err:
logger.debug("Failed in PyOrbital: %s", str(err))
self.orb = orbital.Orbital(
NOAA20_NAME.get(satellite, satellite),
JPSS_TLE_NAMES.get(satellite, satellite),
line1=tle1,
line2=tle2)
logger.info("Using satellite name %s instead",
str(NOAA20_NAME.get(satellite, satellite)))
str(JPSS_TLE_NAMES.get(satellite, satellite)))

self._boundary = None

Expand Down

0 comments on commit 009281c

Please sign in to comment.