Skip to content

Commit 5763606

Browse files
committed
fixed esri_land bug (time mean instead of sel=0)
1 parent 8b69a76 commit 5763606

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

cryogrid_pytools/data/from_planetary_computer.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,16 @@ def get_esri_land_cover(bbox_WSEN: tuple, res: int = 30, epsg: int = 32643):
222222
datetime="2020-01-01/2020-12-31",
223223
)
224224

225-
da = _stackstac.stack(
226-
items,
227-
epsg=epsg,
228-
resolution=res,
229-
bounds_latlon=bbox_WSEN,
230-
).isel(time=0, band=0)
225+
da = (
226+
_stackstac.stack(
227+
items,
228+
epsg=epsg,
229+
resolution=res,
230+
bounds_latlon=bbox_WSEN,
231+
)
232+
.mean("time")
233+
.isel(band=0)
234+
)
231235

232236
da = da.rename("land_use_and_cover").assign_attrs(
233237
long_name="Land use and land cover (LULC) from ESA Sentinel-2",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "cryogrid_pytools"
7-
version = "0.3.13"
7+
version = "0.3.14"
88
description = "Tools to read in CryoGrid MATLAB data to Python and create forcing data"
99
readme = "README.md"
1010
license = "MIT"

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)