From 6d15702dc7b39a25eb011a5cd4e960aac630dc3f Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 17 Oct 2019 08:58:25 +0000 Subject: [PATCH 1/2] Adding .stickler.yml --- .stickler.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .stickler.yml diff --git a/.stickler.yml b/.stickler.yml new file mode 100644 index 0000000..c266a86 --- /dev/null +++ b/.stickler.yml @@ -0,0 +1,5 @@ +linters: + flake8: + fixer: true +fixers: + enable: true From f7f55df8e8e0d769ca27635571c9dc38d15c2116 Mon Sep 17 00:00:00 2001 From: "Adam.Dybbroe" Date: Mon, 21 Aug 2023 18:26:11 +0200 Subject: [PATCH 2/2] Add support for NOAA-21 (and NOAA-22 yet not launched though) Signed-off-by: Adam.Dybbroe --- trollsched/__init__.py | 12 +++++++++--- trollsched/satpass.py | 8 ++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/trollsched/__init__.py b/trollsched/__init__.py index d17a60f..b329503 100644 --- a/trollsched/__init__.py +++ b/trollsched/__init__.py @@ -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): @@ -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, @@ -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', diff --git a/trollsched/satpass.py b/trollsched/satpass.py index 858162f..689b806 100644 --- a/trollsched/satpass.py +++ b/trollsched/satpass.py @@ -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 @@ -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__) @@ -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