| title | FAQ |
|---|
North-up raster conventions define the origin at the top-left so rows increase downward; a negative y-scale encodes that orientation. Some EE projections use positive y-scale (bottom-left origin). Matching source grid preserves orientation.
Use grid_shape when a fixed pixel width/height is required (e.g., ML model inputs). Use grid_scale when the physical resolution matters (e.g., aligning with 30 m Landsat data).
Reduce parallelism (fewer Dask workers), narrow the AOI or time range, combine server-side operations before opening, or switch to the standard endpoint for computed collections.
Yes. Build the collection with filtering / mapping functions, then pass the resulting collection object directly to xr.open_dataset(..., engine='ee') with grid parameters.
Store crs, crs_transform, and shape_2d in metadata or write a helper that re-derives them from the same AOI using fit_geometry. Manual override is fine for archival reproducibility.
Use Xarray's .to_zarr() on a materialized dataset or see the examples in examples/ (e.g., Earth Engine to Zarr pipeline). For very large pipelines consider Xarray-Beam.
To align with CF conventions ([time, y, x]) and reduce the need for transposes in plotting / interoperability.
Your AOI may fall outside the dataset extent or the CRS mismatch caused an unexpected reprojection. Try matching source grid first to confirm availability.
Helpers accept shapely for convenience. If you already have an EE geometry, you can convert it to shapely with shapely.geometry.shape(ee_geom.getInfo()). Shapely makes reprojection and area reasoning simpler client-side.
Xee time coordinates are stored as int64 (nanoseconds since epoch). The scipy netCDF writer only supports netCDF3, which is limited to int32, so the write fails when scipy is the only available backend.
Xarray selects backends in order: netcdf4 → h5netcdf → scipy. If neither netcdf4 nor h5netcdf is installed, scipy is used and the error occurs.
Fix: Install netcdf4 or h5netcdf. Xarray will then prefer them automatically:
pip install netCDF4
# or
pip install h5netcdfIf both are installed and you want to be explicit about which one is used:
ds.to_netcdf("out.nc", engine="netcdf4")
# or
ds.to_netcdf("out.nc", engine="h5netcdf")Alternatively, use .to_zarr() instead — Zarr supports int64 natively and requires no additional packages.