Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download MODIS (crs: SR-ORG:6974) data appears obscured #119

Open
cug-xyx opened this issue Dec 29, 2023 · 8 comments
Open

download MODIS (crs: SR-ORG:6974) data appears obscured #119

cug-xyx opened this issue Dec 29, 2023 · 8 comments
Assignees
Labels
bug Something isn't working MODIS Issues with MODIS data P1

Comments

@cug-xyx
Copy link

cug-xyx commented Dec 29, 2023

Dear Developers:

Thank you so much for being able to develop the awesome xee.

I was downloading the MODIS series product (MODIS/061/MOD16A2GF) and noticed that the downloaded data was shaded.

I think it's a problem with the crs.

Here are the images and code:

ic_name = 'MODIS/061/MOD16A2GF'

ic = ee.ImageCollection(ic_name) \
  .select("ET") \
  .filterDate('2013-06-02', '2013-06-03')

ds = xarray.open_dataset(
    ic, engine='ee',
    crs = 'EPSG:4326', 
    scale=0.25
)
ds

image

ds.to_netcdf('test.nc')

r = xr.open_dataarray('test.nc')
r

image

r \
    .assign_attrs(crs='EPSG:4326') \
    .transpose() \
    .plot(
    vmin=0, vmax=300,
    levels=[i for i in range(0, 270, 30)],
    colors=['#ffffff', '#fcd163', '#99b718', '#66a000',
            '#3e8601', '#207401', '#056201', '#004c00', '#011301']
)

image

@simonff
Copy link

simonff commented Jan 2, 2024

What specifically do you mean by "shaded"?

@cug-xyx
Copy link
Author

cug-xyx commented Jan 2, 2024

I'm sorry. Maybe I didn't describe it properly.

This image is ok on GEE.

var dataset = ee.ImageCollection('MODIS/NTSG/MOD16A2/105');
var ET = dataset.select('ET').filterDate('2013-06-02', '2013-06-03');
var ETVis = {
  min: 0,
  max: 300,
  palette:
      ['#ffffff', '#fcd163', '#99b718', '#66a000',
            '#3e8601', '#207401', '#056201', '#004c00', '#011301'],
};
Map.addLayer(ET, ETVis, 'Evapotranspiration');

image

But exporting locally using xee results in something like the following:

image

@simonff
Copy link

simonff commented Jan 2, 2024

Ah, you mean the weird yellow area over Americas and Antarctica. I agree this is wrong.

@cug-xyx
Copy link
Author

cug-xyx commented Jan 2, 2024

Indeed. But xee is so good that I just can't live without it, so I'm looking for a solution here

@simonff
Copy link

simonff commented Jan 2, 2024

Let's see what the actual developers say - I'm just another xee user

@scheip
Copy link

scheip commented Jan 5, 2024

Have you tried this with different times or different bands and does it yield the same result? I am also having a problem with bringing MODIS data across via xee, though a bit different to what you are showing.

@cug-xyx
Copy link
Author

cug-xyx commented Jan 6, 2024

Have you tried this with different times or different bands and does it yield the same result? I am also having a problem with bringing MODIS data across via xee, though a bit different to what you are showing.

@scheip, I've tried different periods and it's the same problem :(

@noahgolmant
Copy link

What I notice about this dataset is that each band has a different scale, which is the same case as #122. There is a chunk of code in get_info where xee infers a number of collection-wide attributes like the primary coordinate. Just spitballing, but maybe that has something to do with it? Like that data differs between bands with different scales?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working MODIS Issues with MODIS data P1
Projects
None yet
Development

No branches or pull requests

6 participants