Skip to content

Commit

Permalink
Fix satellite name check
Browse files Browse the repository at this point in the history
  • Loading branch information
zmoon committed Mar 14, 2024
1 parent de7f76c commit 57e7449
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_viirs_aod.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
@pytest.mark.parametrize("sat", ["SNPP", "NOAA20"])
@pytest.mark.parametrize("res", [0.05, 0.1, 0.25])
def test_open_dataset(sat, res):
date = "2020-01-01" # a date when we have both
date = "2020-01-01" # a date when we have both SNPP and NOAA-20 data available
s_res = f"{res:.3f}"

ds = open_dataset(date, sat, s_res)
assert set(ds.dims) == {"time", "lat", "lon"}
assert ds.sizes["time"] == 1
assert ds.sizes["lat"] == int(180 / res)
assert ds.sizes["lon"] == int(360 / res)
assert ds.attrs["satellite_name"] == "NPP" if sat == "NPP" else "NOAA 20"
assert ds.attrs["satellite_name"] == ("NPP" if sat == "SNPP" else "NOAA 20")
assert ds.attrs["spatial_resolution"].strip().startswith(str(res))

0 comments on commit 57e7449

Please sign in to comment.