Type error in xee #317
Replies: 1 comment
-
|
Your question was anwsered in #315. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
!pip install earthengine-api -q
!pip install xee -q
!pip install geemap -q
import ee
import geemap
import xarray as xr
import xee
import ee
import geemap
import xarray as xr
ee.Authenticate()
ee.Initialize(project='ee-sabbirhossainshah')
import geemap
map = geemap.Map(basemap = 'SATELLITE')
map
roi = map.draw_last_feature.geometry()
roi
lst = ee.ImageCollection("MODIS/061/MOD11A2").filterDate('2020','2021').select('LST_Day_1km').mean().multiply(0.02).subtract(273.15)
ndvi = ee.ImageCollection("MODIS/061/MOD13Q1").filterDate('2020','2021').select('NDVI').mean().multiply(0.0001)
stack = ee.Image.cat([lst, ndvi]).select([0,1],['lst','ndvi'])
stack
ds1km = xr.open_dataset(stack, engine = 'ee', crs = 'EPSG:4326', scale = 0.01, geometry = roi)
ds250m = xr.open_dataset(stack, engine ='ee', crs = 'EPSG:4326', scale = 0.0025, geometry = roi)
ds1km
after running the code in google collab
why shows error of scale ?
TypeError Traceback (most recent call last)
/tmp/ipykernel_2657/2152062775.py in <cell line: 0>()
----> 1 ds1km = xr.open_dataset(stack, engine = 'ee', crs = 'EPSG:4326', scale = 0.01, geometry = roi)
2 ds250m = xr.open_dataset(stack, engine ='ee', crs = 'EPSG:4326', scale = 0.0025, geometry = roi)
3
4 ds1km
/usr/local/lib/python3.12/dist-packages/xarray/backends/api.py in open_dataset(filename_or_obj, engine, chunks, cache, decode_cf, mask_and_scale, decode_times, decode_timedelta, use_cftime, concat_characters, decode_coords, drop_variables, create_default_indexes, inline_array, chunked_array_type, from_array_kwargs, backend_kwargs, **kwargs)
604
605 overwrite_encoded_chunks = kwargs.pop("overwrite_encoded_chunks", None)
--> 606 backend_ds = backend.open_dataset(
607 filename_or_obj,
608 drop_variables=drop_variables,
TypeError: EarthEngineBackendEntrypoint.open_dataset() got an unexpected keyword argument 'scale'
thanks in advance to answer
Beta Was this translation helpful? Give feedback.
All reactions