getvar returns ['GSW' is not a valid variable name]; extract_vars returns [got multiple values for argument 'timeidx']
まだ誰も着手していません。
評価
調査の方向性
レポートでは、352行目付近の wrf.getvar、wrf.extract_vars、routines.py が挙げられています。これらのエントリーポイントを読み、GSW を含む wrfout ファイルに対して両方の呼び出しを再現してください。対応している抽出動作が明確になり、invalid-name または duplicate-timeidx の失敗が解決または文書化されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Dear all,
I'm now working on an issue that needs the net heat flux at surface.
To calculate it, I need the variables including GSW, GLW, TSK, EMISS, GRDFLX, HFX, and LH.
The others are easily obtainded by wrf.getvar function, but I failed in getting the variable GSW, and the error message is here:
gsw = wrf.getvar(wrflist, "GSW", timeidx=t, @method="cat")
File "/Users/abc/anaconda3/envs/pygmt/lib/python3.10/site-packages/wrf/ro
utines.py", line 352, in getvar
raise ValueError("'{}' is not a valid variable name".format(varname))
ValueError: 'GSW' is not a valid variable name
I checked the wrfout file and confirmed there is a variable named 'GSW' (I could also plot it):
float GSW(Time, south_north, west_east) ;
GSW:FieldType = 104 ;
GSW:MemoryOrder = "XY " ;
GSW:description = "NET SHORT WAVE FLUX AT GROUND SURFACE" ;
GSW:units = "W m-2" ;
GSW:stagger = "" ;
GSW:coordinates = "XLONG XLAT XTIME" ;
After that, I tried to use wrf.extract_vars to get the variables that originally embedded in the wrfout file, but I also got error
gsw = wrf.extract_vars(wrflist, "GSW", timeidx=t, method="cat")
TypeError: extract_vars() got multiple values for argument 'timeidx'
The argument 'timeidx=t' works fine in other variables such as GLW, etc.
Is this a bug or I need special way to extract GSW? For now, I could only get 'SWDOWN' and 'ALBEDO' seperately and calculate GSW by myself.
- 主要言語
- Python
- スター
- 498
- フォーク
- 178
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NCAR/wrf-python のほかの issue
-
NCAR/wrf-python#309 · 担当者 1 名 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
NCAR/wrf-python#307 · コメント 5 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
NCAR/wrf-python#286 · コメント 3 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
NCAR/wrf-python#282 · コメント 1 件 ·
-
PyPI releases オープン
NCAR/wrf-python#274 · コメント 5 件 · リアクション 1 件 · 担当者 1 名 ·
NCAR/wrf-python の issue をすべて見る
似ている issue
-
agent-ready documentation needs-triage
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" オープン
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
instance instance add
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
searxng/searx-instances#939 · コメント 1 件 ·
-
area-deployment area-integrations triage:bot-seen
難易度 2/5 半日 初心者へのやさしさ 86/100