Skip to content

Commit

Permalink
added proj=plate_carree setting in subsetting pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
jpswinski committed Nov 15, 2023
1 parent 2d3f3eb commit b9fec20
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions clients/python/tests/test_subsetting.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,28 @@ def test_180_edge(self, init):
assert abs(gdf["h_mean"].describe()["mean"] - 1963.3553175453283) < 0.01
assert abs(gdf["y_atc"].describe()["mean"] - 1.438330888748169) < 0.01

def test_180_edge_plate_carree(self, init):
resource = "ATL03_20221012073759_03291712_005_01.h5"
poly = [ { "lat": -73.0, "lon": -180.00 },
{ "lat": -74.0, "lon": -180.00 },
{ "lat": -74.0, "lon": 180.00 },
{ "lat": -73.0, "lon": 180.00 },
{ "lat": -73.0, "lon": -180.00 } ]
parms = {
"poly": poly,
"proj": "plate_carree",
"srt": icesat2.SRT_LAND,
"cnf": icesat2.CNF_SURFACE_LOW,
"ats": 20.0,
"cnt": 10,
"len": 40.0,
"res": 20.0 }
gdf = icesat2.atl06p(parms, resources=[resource])
assert init
assert len(gdf) == 33973
assert abs(gdf["h_mean"].describe()["mean"] - 2105.1968807146873) < 0.01
assert abs(gdf["y_atc"].describe()["mean"] - -0.3240036070346832) < 0.01

def test_150_translation(self, init):
resource = "ATL03_20221009072040_02831712_005_01.h5"
poly = [ { "lat": -73.0, "lon": 160.00 },
Expand Down

0 comments on commit b9fec20

Please sign in to comment.