Fast area-subsetting when loading dfs
- 主要言語
- Python
- スター
- 5
- フォーク
- 1
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I have a request for fast loading of subset of dfs data.
Background: I have a dfs2 file for a global dataset, and I wish to read all timesteps of this data but only a sub-area. The way I do it now, is to pass a bounding box to the mikeio.read() method:
`ds = mikeio.read(fn,area = bbox_tuple)`
The problem is that this method is really slow, even thought the area is very small. It seems that MIKEIO needs to load the entire area under the hood before subsetting. For reference: it takes 16 minutes to load the data, even though the resulting dfs2 file is only 1900 kb (the original global file is around 110 GB).
Ideally, it would be possible to use the mikeio.generic.extract() method with an 'area' argument instead of only subsetting in time. I imagine something along the lines of:
`mikeio.generic.extract(fn, fn_out, area=bbox_tuple, start=0, end=-1, step=1, items=None)`
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず mikeio.read() のエリアサブセット処理のパスと mikeio.generic.extract() のエントリポイントを読み、次にそれぞれが DFS2 データと時間範囲をどのように処理するかを比較します。要求されている動作は、グローバルデータセット全体を読み込まずにエリアベースで抽出することです。小さなエリアについて全タイムステップを対象とした抽出が効率的に完了し、要求された出力が保持されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- data, performance
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100