Skip to content

Commit

Permalink
Merge pull request #111 from cedricsam/main
Browse files Browse the repository at this point in the history
Support GOES-19
  • Loading branch information
blaylockbk authored Feb 4, 2025
2 parents 613c15b + d5b7a18 commit 63a0bc1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
5 changes: 3 additions & 2 deletions goes2go/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", "EAST", "GOES19"],
}

_domain = {
Expand Down Expand Up @@ -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
# --------------------------
Expand Down Expand Up @@ -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
Expand Down
28 changes: 28 additions & 0 deletions tests/test_GOES.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit 63a0bc1

Please sign in to comment.