getvar returns ['GSW' is not a valid variable name]; extract_vars returns [got multiple values for argument 'timeidx']
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
El informe menciona wrf.getvar, wrf.extract_vars y routines.py alrededor de la línea 352. Lee esos puntos de entrada y reproduce ambas llamadas con un archivo wrfout que contenga GSW; se considera terminado cuando el comportamiento de extracción compatible esté claro y el fallo de invalid-name o duplicate-timeidx se haya resuelto o documentado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 498
- Forks
- 178
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NCAR/wrf-python
-
NCAR/wrf-python#309 · 1 asignado ·
-
Windows builds on conda-forge Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
NCAR/wrf-python#307 · 5 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
NCAR/wrf-python#286 · 3 comentarios ·
-
Windows builds and testing Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
NCAR/wrf-python#282 · 1 comentario ·
-
PyPI releases Abierto
NCAR/wrf-python#274 · 5 comentarios · 1 reacción · 1 asignado ·
Todos los issues de NCAR/wrf-python
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
stephrobert/dsoxlab#238 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
sublimehq/package_control#1780 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
nwg-piotr/nwg-displays#145 ·