ux.open_dataset currently supports structured data

オープン 初心者向け
#1,854 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

@Sevans711 がすでに取り組んでいます。

2026年10月28日 から。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
api

調査の方向性

mcve で再現し、次に公開エントリポイント ux.open_dataset() をたどって、UxDataset を構築する前に入力が非構造化かどうかを判断する箇所を見つけてください。UxDataset.from_structured() または UxDataset.from_xarray() を指し示す明確なエラーまたは警告を発生させる、明示的な構造化データチェックを追加し、提供された lat/lon データセットを使ったテストを追加してください。完了とは、mcve がもはやもっともらしい UxDataset を黙って返さないことを意味します。

索引モデルが issue の本文から書いたものです。

説明

bug
Version

v2026.10.0

How did you install UXarray?

Source

What happened?

ux.open_dataset() currently supports structured data (e.g. a lat/lon grid), silently returning a reasonable-looking answer. However, that is actually not intentional. For more details see: https://github.com/UXARRAY/uxarray/pull/1827#issuecomment-6450148234.

What did you expect to happen?

Because opening structured data with ux.open_dataset() is not intended to be supported and is not currently being tested, uxarray should avoid silently returning a reasonable-looking answer which might actually be wrong. So, I would expect it to crash, or at least raise a warning, when pointed at structured data.

The crash or warning message should maybe point out that the UxDataset.from_structured() or UxDataset.from_xarray() could be considered instead, as the standard entry points for loading structured data into uxarray.

Can you provide a MCVE to repoduce the bug?
import numpy as np
import xarray as xr
import uxarray as ux

ds = xr.Dataset(
    {
        "t": (("time", "lat", "lon"), np.random.rand(2, 4, 8)),
        "s": (("lat", "lon"), np.random.rand(4, 8)),
        "z": (("time",), np.ones(2)),
    },
    coords={
        "lat": ("lat", np.linspace(-80, 80, 4), {"standard_name": "latitude"}),
        "lon": ("lon", np.linspace(0, 350, 8), {"standard_name": "longitude"}),
        "time": [0, 1],
    },
)

ux.open_dataset(ds, ds)  # grid, data
# silently returns a UxDataset with sizes {'time': 2, 'n_face': 32};
# I expected a crash or at least a warning, instead.
主要言語
Python
スター
231
フォーク
58
平均マージ
5日 7時間
マージ済み PR(30日)
18

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

UXARRAY/uxarray のほかの issue

UXARRAY/uxarray の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。