Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

wrf.g_slp.get_slp()

Aperta
#97 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
numpy, python
Ambito
data

Direzione di ricerca

Inizia con wrf/g_slp.py e segui la sua chiamata a util.py, in particolare extract_vars e _extract_var, dove il traceback mostra che vengono letti dati netCDF. Confronta le riproduzioni con timeidx=0 e wrf.ALL_TIMES e ispeziona l’accesso alla variabile che si blocca. Il lavoro è completato quando get_slp può elaborare tutti gli indici temporali senza il rallentamento prolungato segnalato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Python
Stelle
498
Fork
178
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NCAR/wrf-python

Tutte le issue di NCAR/wrf-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.