Skip to content

Commit

Permalink
Merge pull request #95 from adybbroe/delta-fixes-for-pr93
Browse files Browse the repository at this point in the history
Fix a few minor issues raised in PR93 which were accidentally left out
  • Loading branch information
adybbroe authored Jan 8, 2025
2 parents 83a32e2 + 890e760 commit e24583d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
1 change: 0 additions & 1 deletion docs/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ dependencies:
- sphinx_rtd_theme
- sphinxcontrib-apidoc
- trollsift
- xarray
- pip:
- graphviz
- .. # relative path to the pytroll-schedule project
5 changes: 3 additions & 2 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 - 2024 PyTroll Community
# Copyright (c) 2014 - 2025 PyTroll Community

# Author(s):

Expand Down Expand Up @@ -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"]
Expand Down
19 changes: 7 additions & 12 deletions trollsched/shapefiles_from_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e24583d

Please sign in to comment.