From 890e76055cc2164379fd694e54b604248187de22 Mon Sep 17 00:00:00 2001 From: "Adam.Dybbroe" Date: Wed, 8 Jan 2025 14:27:49 +0100 Subject: [PATCH] Fix a few minor issues raised in PR93 which were accidentally left out Signed-off-by: Adam.Dybbroe --- docs/environment.yaml | 1 - trollsched/__init__.py | 5 +++-- trollsched/shapefiles_from_schedule.py | 19 +++++++------------ 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/docs/environment.yaml b/docs/environment.yaml index 746b70d..7bac8fd 100644 --- a/docs/environment.yaml +++ b/docs/environment.yaml @@ -20,7 +20,6 @@ dependencies: - sphinx_rtd_theme - sphinxcontrib-apidoc - trollsift - - xarray - pip: - graphviz - .. # relative path to the pytroll-schedule project diff --git a/trollsched/__init__.py b/trollsched/__init__.py index 8ae659f..27c5857 100644 --- a/trollsched/__init__.py +++ b/trollsched/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (c) 2014 - 2024 PyTroll Community +# Copyright (c) 2014 - 2025 PyTroll Community # Author(s): @@ -75,7 +75,8 @@ "FY-3C": "avhrr"} VIIRS_PLATFORM_NAMES = ["SUOMI NPP", "SNPP", - "NOAA-20", "NOAA 20"] + "NOAA-20", "NOAA 20", "NOAA-21", "NOAA 21"] + MERSI_PLATFORM_NAMES = ["FENGYUN 3C", "FENGYUN-3C", "FY-3C"] MERSI2_PLATFORM_NAMES = ["FENGYUN 3D", "FENGYUN-3D", "FY-3D", "FENGYUN 3E", "FENGYUN-3E", "FY-3E"] diff --git a/trollsched/shapefiles_from_schedule.py b/trollsched/shapefiles_from_schedule.py index 13092d8..ba65a47 100644 --- a/trollsched/shapefiles_from_schedule.py +++ b/trollsched/shapefiles_from_schedule.py @@ -92,18 +92,13 @@ def shapefiles_from_schedule_xml_requests(filename, satellites, tle_file, output if platform_name not in satellites: logger.debug("Satellite platform name not requested: %s", platform_name) continue - try: - overpass = create_pass(platform_name, instrument, - datetime.strptime(child.attrib["start-time"], - "%Y-%m-%d-%H:%M:%S"), - datetime.strptime(child.attrib["end-time"], - "%Y-%m-%d-%H:%M:%S"), - tle_filename=tle_file) - except KeyError: - logger.warning(("Failed creating an pass instance for the overpass, for platform " - "%s, instrument %s, and start-end times (%s,%s)"), - platform_name, instrument, child.attrib["start-time"], child.attrib["end-time"]) - continue + + overpass = create_pass(platform_name, instrument, + datetime.strptime(child.attrib["start-time"], + "%Y-%m-%d-%H:%M:%S"), + datetime.strptime(child.attrib["end-time"], + "%Y-%m-%d-%H:%M:%S"), + tle_filename=tle_file) output_filepath = Path(output_dir) / create_shapefile_filename(overpass) create_shapefile_from_pass(overpass, output_filepath)