From 1c940891a3c52fb1eddc2fc351ab8d0f72870597 Mon Sep 17 00:00:00 2001 From: Cedric Sam Date: Mon, 3 Feb 2025 12:13:00 -0500 Subject: [PATCH 1/2] allow GOES-19 * added tests in test_GOES.py * in practice only tried to generate RGB TrueColor and it worked --- goes2go/data.py | 5 +++-- tests/test_GOES.py | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/goes2go/data.py b/goes2go/data.py index 5660156..64c1688 100644 --- a/goes2go/data.py +++ b/goes2go/data.py @@ -42,6 +42,7 @@ "noaa-goes16": [16, "16", "G16", "EAST", "GOES16"], "noaa-goes17": [17, "17", "G17", "WEST", "GOES17"], "noaa-goes18": [18, "18", "G18", "WEST", "GOES18"], + "noaa-goes19": [19, "19", "G19", "WEST", "GOES19"], } _domain = { @@ -148,7 +149,7 @@ def _goes_file_df(satellite, product, start, end, bands=None, refresh=True, igno print(f"Ignored missing dir: {path}") else: files += fs.ls(path, refresh=refresh) - + # Build a table of the files # -------------------------- @@ -435,7 +436,7 @@ def goes_timerange( def _preprocess_single_point(ds, target_lat, target_lon, decimal_coordinates=True): """ Preprocessing function to select only the single relevant data subset. - + Parameters ---------- ds: xarray Dataset diff --git a/tests/test_GOES.py b/tests/test_GOES.py index 2b5d02a..e0778d9 100644 --- a/tests/test_GOES.py +++ b/tests/test_GOES.py @@ -45,3 +45,31 @@ def test_GOES18_latest(): def test_GOES18_nearesttime(): ds = GOES(satellite=18).nearesttime("2023-07-01") + + +######################################################################## + + +def test_GOES19(): + """Create a GOES object""" + G = GOES(satellite="noaa-goes19", domain="C") + assert G.satellite == "noaa-goes19" + assert G.domain == "C" + + +def test_GOES19_latest(): + ds = GOES(satellite=19).latest() + + +def test_GOES19_nearesttime(): + ds = GOES(satellite=19).nearesttime("2025-01-01") + + +def test_GOES19_single_point_timerange(): + ds = GOES(satellite=19).single_point_timerange(38.897957, -77.036560, "2025-01-01 00:00", "2025-01-01 01:00") + +def test_GOES19_timerange(): + ds = GOES(satellite=19).timerange("2025-01-01 00:00", "2025-01-01 01:00") + +def test_GOES19_df(): + df = GOES(satellite=19).df("2025-01-01 00:00", "2025-01-01 01:00") From d5b7a1861e08d36c39b584a07decf27ab72885ae Mon Sep 17 00:00:00 2001 From: Cedric Sam Date: Tue, 4 Feb 2025 09:01:52 -0500 Subject: [PATCH 2/2] GOES-19 is EAST not WEST --- goes2go/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/goes2go/data.py b/goes2go/data.py index 64c1688..9cf5ece 100644 --- a/goes2go/data.py +++ b/goes2go/data.py @@ -42,7 +42,7 @@ "noaa-goes16": [16, "16", "G16", "EAST", "GOES16"], "noaa-goes17": [17, "17", "G17", "WEST", "GOES17"], "noaa-goes18": [18, "18", "G18", "WEST", "GOES18"], - "noaa-goes19": [19, "19", "G19", "WEST", "GOES19"], + "noaa-goes19": [19, "19", "G19", "EAST", "GOES19"], } _domain = {