home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 1622197017

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
1622197017 I_kwDOAMm_X85gsMMZ 7621 Y-axis flipped when reading data with Xarray 52061672 closed 0     9 2023-03-13T20:16:33Z 2023-09-12T15:11:10Z 2023-09-12T15:11:09Z NONE      

Update

Update on March 15, 2023 First posted on March 13, 2023

Description

When reading data with Xarray using a rasterio engine, the Y axis is flipped. This happens with a specific dataset, and the summary is as follows.

| Data\Engine | NetCDF4 | Rasterio | | ------------- | ------------- | ------------- | | 1. NSIDC output | ✅ | ❌ (Y axis is flipped) | | 2. NASA download | ✅ | ✅ |

i.e., The issue happens with SMAP L4 data, pre-processed on the NSIDC server, read with rasterio engine. The issue does not happen with NetCDF4 engine. It did not happen with the one directly downloaded from NASA Earth Data.

<del>When reading data with Xarray using both the netcdf4 engine and the rasterio engine, the Y axis is flipped. However, when reading the same data with the netcdf4 package, the issue doesn't seem to be occurring. </del>

It's unclear whether the issue is with Xarray or the data itself.

Details

I have created a Jupyter notebook with the details of the issue, including the code used to analyze the data, which is available here

Data

  • The data is SMAP L4 Geophysical data, precipitation (https://nsidc.org/data/spl4smgp/versions/7). The issue happens <del> for different versions of the dataset and</del> files for any dates or times. I tested it with two different versions of datasets.
  • Dataset 1 is pre-processed & subset on NSIDC server
  • Dataset 2 is directly downloaded from NASA Earth Data portal

The data can be downloaded from the links provided by NASA and NSIDC (the links are specified in the notebook), or from my Google Drive.

Environment Information

  • xarray version 2023.2.0 (the issue happened with 2023.1.0 too)
  • rioxarray version 0.13.3
  • rasterio version 1.3.6 (the issue happened with 1.3.4 too)
  • GDAL version 3.6.2
  • Python version 3.11
  • Windows 11 (But I remember I've encountered this issues since a few years ago for SMAP data with ver 3.9 on Win 10)

Installation method

  • conda forge

Please let me know if you need any further information or have any suggestions on resolving this issue. I am cross-posting this to the rioxarray repo.

Thank you!

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/7621/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 8 rows from issue in issue_comments
Powered by Datasette · Queries took 0.652ms · About: xarray-datasette