Xee icon indicating copy to clipboard operation
Xee copied to clipboard

Opening a MODIS dataset brings seemingly random values across, rest are 0

Open scheip opened this issue 1 year ago • 5 comments

Hi folks, cannot explain my appreciation and excitement for xee, what a great package. I have used this successfully with other datasets (e.g., ERA-5) but am now trying to work with MODIS data. I am experiencing a problem where every time I use xr.open_dataset... I get a unique result. Code example:

# specify study area
ur = [35.89, -81.87] # y, x
ll = [35.83, -81.945] # y, x   # full region
coords = [ll[1], ll[0], ll[1], ur[0], ur[1], ur[0], ur[1], ll[0]]
geom = ee.Geometry.Polygon(coords)

# Specify image collections
ic = ee.ImageCollection("MODIS/061/MCD15A3H").filterDate('2016-06-01', '2024-01-01').filterBounds(geom).select('Lai')

ds = xr.open_dataset(
    ic,
    engine='ee',
    crs='EPSG:32617',
    scale=500,
    geometry=geom
)

# plot lai, average across x and y
ds['Lai'].mean(dim=['X', 'Y']).plot()

If I run this code 5 times, I get 5 different time-series plots. In every case, a substantial portion of the data is 0. Here are 3 example outputs of running the above code. Why would it be different every time?

I am currently on 0.0.5 of xee: xee 0.0.5 pyhd8ed1ab_0 conda-forge Thank you for any pointers.

run1 run2 run3

scheip avatar Jan 05 '24 15:01 scheip