Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

wrf.g_slp.get_slp()

Đang mở
#97 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
numpy, python
Lĩnh vực
data

Hướng nghiên cứu

Bắt đầu với wrf/g_slp.py và lần theo lệnh gọi của nó vào util.py, đặc biệt là extract_vars và _extract_var, nơi traceback cho thấy dữ liệu netCDF được đọc. So sánh các lần tái hiện với timeidx=0 và wrf.ALL_TIMES, đồng thời kiểm tra thao tác truy cập biến bị đình trệ. Được xem là hoàn tất khi get_slp có thể xử lý tất cả các chỉ mục thời gian mà không gặp tình trạng chậm kéo dài như đã báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Python
Star
498
Fork
178
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NCAR/wrf-python

Tất cả issue của NCAR/wrf-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.