From 8d23e7bb76c4d8afac4e1488cf42ccd9cdfc1624 Mon Sep 17 00:00:00 2001 From: Yu Peng <57005758+Eco-YuPeng@users.noreply.github.com> Date: Mon, 24 Aug 2026 13:43:51 -0600 Subject: [PATCH 1/3] Create ecostress.md --- docs/remote_sensing/ecostress.md | 100 +++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/remote_sensing/ecostress.md diff --git a/docs/remote_sensing/ecostress.md b/docs/remote_sensing/ecostress.md new file mode 100644 index 00000000..b0343975 --- /dev/null +++ b/docs/remote_sensing/ecostress.md @@ -0,0 +1,100 @@ + +This unified dataset was combines Ecostress Water Use Efficiency (WUE), SRTM, NLCD (2019), slope, aspect, and GEDI level 2B cover, pavd, and fhd data at a 5m resolution. +Another repo explaines in detials about building a dataset, training and evlauating machine learning models on the data, and running diagnostics. +Please refer to https://github.com/j-gams/neon_data_project. + +Dataset info: + - File type Cloud-Optimized GeoTIFF (.tif) + - Temporal coverage 2018 to 2022 + - Dataset structure: + Western-conus: aspect / slope / elevation / WUE (2018-2022) + Colorado Sate: WUE (2018-2022) / Evaporative Stress Index (ESI, 2018-2022) + - Access: free. Whole dataset has no key required via cyverse esiil-data-oasis + + +Access pattern: +The files live in the CyVerse Data Store, in the ESIIL community folder (the ESIIL Data Oasis), and are shared read-only with the anonymous user. +That makes them readable over plain HTTPS through CyVerse's anonymous WebDAV endpoint: +https://data.cyverse.org/dav-anon/iplant/projects/esiil/Ecostress/colorado/colorado_esi_2018_output_cog.tif +text +iRODS path: /iplant/home/shared/esiil/Ecostress/ +HTTPS base: https://data.cyverse.org/dav-anon/iplant/projects/esiil/Ecostress + +Because the rasters are Cloud-Optimized GeoTIFFs served over HTTPS, GDAL's /vsicurl/ driver can read a bounding-box subset without downloading the whole file. Browse the folder in the CyVerse Data Commons. + +Access constraints +No key, no account, no authentication required. The folder is shared read-only with the CyVerse anonymous user, so any HTTPS client can read it. There is no rate-limit guarantee — if a request returns a redirect to unblockme.cyverse.org, your IP has been throttled or blocked; wait and retry or use the unblock page. + +R example +r +# install.packages(c("terra", "httr")) +library(terra) + +ECOSTRESS_URL <- paste0( + "https://data.cyverse.org/dav-anon/iplant/home/shared/esiil/", + "Ecostress/colorado/colorado_wue_2018_output_cog.tif" +) + +get_ecostress_wue <- function(url = ECOSTRESS_URL, + aoi = c(-105.5, -105.2, 40.0, 40.3)) { + # aoi = c(xmin, xmax, ymin, ymax) in the raster's CRS. + # Stream the raster header only; /vsicurl/ reads bytes on demand. + r <- terra::rast(paste0("/vsicurl/", url)) + + # Fail loudly if the URL is not readable rather than plotting an empty map. + if (terra::ncell(r) == 0) stop("Raster could not be read from: ", url) + + # Subset to the area of interest before pulling any pixels. + sub <- terra::crop(r, terra::ext(aoi)) + + # Minimum viable plot. + terra::plot(sub, main = "ECOSTRESS water use efficiency") + + sub +} + +# wue <- get_ecostress_wue() +# summary(terra::values(wue)) + + +Python example +python +# pip install rioxarray matplotlib +import matplotlib.pyplot as plt +import rioxarray + "Ecostress/colorado/colorado_wue_2018_output_cog.tif" +ECOSTRESS_URL = ( + "https://data.cyverse.org/dav-anon/iplant/home/shared/esiil/" + "Ecostress/colorado/colorado_wue_2018_output_cog.tif" +) + + +def get_ecostress_wue(url=ECOSTRESS_URL, aoi=(-105.5, 40.0, -105.2, 40.3)): + """Stream an ECOSTRESS WUE subset, make a minimum viable plot, return it. + + aoi is (xmin, ymin, xmax, ymax) in the raster's CRS. + """ + # Open lazily over HTTPS; only the requested window is transferred. + da = rioxarray.open_rasterio(url, masked=True, chunks=True).squeeze() + + xmin, ymin, xmax, ymax = aoi + sub = da.rio.clip_box(minx=xmin, miny=ymin, maxx=xmax, maxy=ymax) + + if sub.size == 0: + raise ValueError(f"Empty subset - check that {aoi} overlaps the raster extent.") + + # Minimum viable plot. + sub.plot(robust=True) + plt.title("ECOSTRESS water use efficiency") + plt.tight_layout() + plt.show() + + return sub + + +# wue = get_ecostress_wue() +# print(float(wue.mean())) + + +Derived layers: GEDI-ECOSTRESS data project, Earth Lab / ESIIL, University of Colorado Boulder. https://github.com/earthlab/GEDI-ECOSTRESS_data_project +Hosting: ESIIL community folder, CyVerse Data Store, /iplant/home/shared/esiil/ECOSTRESS/. From 3d0421667da4e0d6c93b8dd6796a7f74d64bef39 Mon Sep 17 00:00:00 2001 From: Yu Peng <57005758+Eco-YuPeng@users.noreply.github.com> Date: Tue, 25 Aug 2026 10:54:34 -0600 Subject: [PATCH 2/3] Update ECOSTRESS documentation with Python example Removed R example code and added Python example for accessing ECOSTRESS data. --- docs/remote_sensing/ecostress.md | 38 ++++---------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/docs/remote_sensing/ecostress.md b/docs/remote_sensing/ecostress.md index b0343975..498da85f 100644 --- a/docs/remote_sensing/ecostress.md +++ b/docs/remote_sensing/ecostress.md @@ -25,36 +25,7 @@ Because the rasters are Cloud-Optimized GeoTIFFs served over HTTPS, GDAL's /vsic Access constraints No key, no account, no authentication required. The folder is shared read-only with the CyVerse anonymous user, so any HTTPS client can read it. There is no rate-limit guarantee — if a request returns a redirect to unblockme.cyverse.org, your IP has been throttled or blocked; wait and retry or use the unblock page. -R example -r -# install.packages(c("terra", "httr")) -library(terra) - -ECOSTRESS_URL <- paste0( - "https://data.cyverse.org/dav-anon/iplant/home/shared/esiil/", - "Ecostress/colorado/colorado_wue_2018_output_cog.tif" -) - -get_ecostress_wue <- function(url = ECOSTRESS_URL, - aoi = c(-105.5, -105.2, 40.0, 40.3)) { - # aoi = c(xmin, xmax, ymin, ymax) in the raster's CRS. - # Stream the raster header only; /vsicurl/ reads bytes on demand. - r <- terra::rast(paste0("/vsicurl/", url)) - - # Fail loudly if the URL is not readable rather than plotting an empty map. - if (terra::ncell(r) == 0) stop("Raster could not be read from: ", url) - - # Subset to the area of interest before pulling any pixels. - sub <- terra::crop(r, terra::ext(aoi)) - - # Minimum viable plot. - terra::plot(sub, main = "ECOSTRESS water use efficiency") - sub -} - -# wue <- get_ecostress_wue() -# summary(terra::values(wue)) Python example @@ -62,7 +33,7 @@ python # pip install rioxarray matplotlib import matplotlib.pyplot as plt import rioxarray - "Ecostress/colorado/colorado_wue_2018_output_cog.tif" + ECOSTRESS_URL = ( "https://data.cyverse.org/dav-anon/iplant/home/shared/esiil/" "Ecostress/colorado/colorado_wue_2018_output_cog.tif" @@ -90,10 +61,9 @@ def get_ecostress_wue(url=ECOSTRESS_URL, aoi=(-105.5, 40.0, -105.2, 40.3)): plt.show() return sub - - -# wue = get_ecostress_wue() -# print(float(wue.mean())) +#test and print the results + wue = get_ecostress_wue() + print(float(wue.mean())) Derived layers: GEDI-ECOSTRESS data project, Earth Lab / ESIIL, University of Colorado Boulder. https://github.com/earthlab/GEDI-ECOSTRESS_data_project From 40c3ea46cb78d68278594db8e8ffb7837089088c Mon Sep 17 00:00:00 2001 From: Yu Peng <57005758+Eco-YuPeng@users.noreply.github.com> Date: Tue, 25 Aug 2026 11:53:03 -0600 Subject: [PATCH 3/3] Include R and Python examples in ecostress.md Added R and Python examples for accessing ECOSTRESS data. --- .../ECOSTRESS}/ecostress.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) rename docs/{remote_sensing => remote_sensinge/ECOSTRESS}/ecostress.md (76%) diff --git a/docs/remote_sensing/ecostress.md b/docs/remote_sensinge/ECOSTRESS/ecostress.md similarity index 76% rename from docs/remote_sensing/ecostress.md rename to docs/remote_sensinge/ECOSTRESS/ecostress.md index 498da85f..c36688b9 100644 --- a/docs/remote_sensing/ecostress.md +++ b/docs/remote_sensinge/ECOSTRESS/ecostress.md @@ -25,8 +25,37 @@ Because the rasters are Cloud-Optimized GeoTIFFs served over HTTPS, GDAL's /vsic Access constraints No key, no account, no authentication required. The folder is shared read-only with the CyVerse anonymous user, so any HTTPS client can read it. There is no rate-limit guarantee — if a request returns a redirect to unblockme.cyverse.org, your IP has been throttled or blocked; wait and retry or use the unblock page. +R example +R +#install.packages(c("terra", "httr")) +library(terra) + +ECOSTRESS_URL <- paste0( + "https://data.cyverse.org/dav-anon/iplant/home/shared/esiil/", + "Ecostress/colorado/colorado_wue_2018_output_cog.tif" +) + +get_ecostress_wue <- function(url = ECOSTRESS_URL, + aoi = c(-105.5, -105.2, 40.0, 40.3)) { + # aoi = c(xmin, xmax, ymin, ymax) in the raster's CRS. + # Stream the raster header only; /vsicurl/ reads bytes on demand. + r <- terra::rast(paste0("/vsicurl/", url)) + + # Fail loudly if the URL is not readable rather than plotting an empty map. + if (terra::ncell(r) == 0) stop("Raster could not be read from: ", url) + + # Subset to the area of interest before pulling any pixels. + sub <- terra::crop(r, terra::ext(aoi)) + + # Minimum viable plot. + terra::plot(sub, main = "ECOSTRESS water use efficiency") + sub +} +wue <- get_ecostress_wue() +summary(terra::values(wue)) +print(float(wue.mean())) Python example python