Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

wrf.g_slp.get_slp()

Abierto
#97 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
numpy, python
Área
data

Línea de trabajo

Comienza con wrf/g_slp.py y sigue su llamada a util.py, especialmente extract_vars y _extract_var, donde el traceback muestra que se leen datos de netCDF. Compara las reproducciones con timeidx=0 y wrf.ALL_TIMES e inspecciona el acceso a la variable que se queda bloqueado. Se considera terminado cuando get_slp pueda procesar todos los índices temporales sin la ralentización prolongada indicada.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug support

For some reason with this wrf.g_slp.get_slp is having problems reading in the data for all timeidx's. The top one for 1 time index takes 00:00:01 seconds to run. For any of my other variables (T,Td,WS,WDIR, U10, V10, RH) it takes about 5-10 seconds to get the variable for all times. I stopped the code after it seemed to be slowing my computer and was taking more than 10 minutes (on that one command).

I am wondering if there is something wrong in the wrf-python code for this function. I cannot find many other people using this specific function.

ncfile = Dataset(listing[0])
where listing[0] is the wrfout_d03 file.

WORKS
wrf.g_slp.get_slp(ncfile,timeidx=0,method='cat',squeeze=True,cache=None,meta=False,_key=None,units='Pa')

DOES NOT WORK
wrf.g_slp.get_slp(ncfile,timeidx=wrf.ALL_TIMES,method='cat',squeeze=True,cache=None,meta=False,_key=None,units='Pa')

Traceback (most recent call last):

File "", line 1, in
runfile('/Users//Documents//Observational_Data/Python_Programs/model_analysis_V2.py', wdir='/Users//Documents//Observational_Data/Python_Programs')

File "/Users/*/anaconda3/lib/python3.6/site-packages/spyder_kernels/customize/spydercustomize.py", line 827, in runfile
execfile(filename, namespace)

File "/Users/*/anaconda3/lib/python3.6/site-packages/spyder_kernels/customize/spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "/Users//Documents//Observational_Data/Python_Programs/model_analysis_V2.py", line 749, in
elif variable == "Pressure (Pa)": WRF_VAR = wrf.g_slp.get_slp(ncfile,timeidx=wrf.ALL_TIMES, method='cat',squeeze=True,cache=None,meta=False,_key=None,units='Pa')

File "/Users/*/anaconda3/lib/python3.6/site-packages/wrf/metadecorators.py", line 88, in func_wrapper
return wrapped(*args, **kwargs)

File "/Users/*/anaconda3/lib/python3.6/site-packages/wrf/decorators.py", line 44, in func_wrapper
return do_conversion(wrapped(*args, **kwargs), unit_type,

File "/Users/*/anaconda3/lib/python3.6/site-packages/wrf/g_slp.py", line 80, in get_slp
meta=False, _key=_key)

File "/Users/*/anaconda3/lib/python3.6/site-packages/wrf/util.py", line 2280, in extract_vars
for var in varlist}

File "/Users/*/anaconda3/lib/python3.6/site-packages/wrf/util.py", line 2280, in
for var in varlist}

File "/Users/*/anaconda3/lib/python3.6/site-packages/wrf/util.py", line 2212, in _extract_var
result = wrfin.variables[varname][:]

File "netCDF4/_netCDF4.pyx", line 4157, in netCDF4._netCDF4.Variable.getitem

File "netCDF4/_netCDF4.pyx", line 4291, in netCDF4._netCDF4.Variable._toma

File "/Users/*/anaconda3/lib/python3.6/site-packages/numpy/core/_methods.py", line 42, in _any
def _any(a, axis=None, dtype=None, out=None, keepdims=False):

KeyboardInterrupt

Lenguaje dominante
Python
Estrellas
498
Forks
178
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de NCAR/wrf-python

Todos los issues de NCAR/wrf-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.