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

Fix contour plot error highlighted by ORCA2 grid example

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

@sadielbartholomew đang làm issue này rồi.

Từ ngày 20/1/2025.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

bug

Investigate and fix test failure whereby an IndexError can appear to prevent a contour plot being made from code which should work, specifically as per the (just refreeshed) docs example:

======================================================================
ERROR: test_example_unstructured_orca_1 (__main__.UnnumberedExamplesTest.test_example_unstructured_orca_1)
Test example for unstructured grids: ORCA grid example 1.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/slb93/git-repos/cf-plot/cfplot/test/test_examples.py", line 1422, in test_example_unstructured_orca_1
    cfp.con(x=lons, y=lats, f=temp, ptype=1)
  File "/home/slb93/git-repos/cf-plot/cfplot/cfplot.py", line 3303, in con
    _cf_data_assign(f, colorbar_title, verbose=verbose)
  File "/home/slb93/git-repos/cf-plot/cfplot/cfplot.py", line 1379, in _cf_data_assign
    myz = find_z(f)
          ^^^^^^^^^
  File "/home/slb93/git-repos/cf-plot/cfplot/cfplot.py", line 10752, in find_z
    mycoords = find_dim_names(f)
               ^^^^^^^^^^^^^^^^^
  File "/home/slb93/git-repos/cf-plot/cfplot/cfplot.py", line 10724, in find_dim_names
    if field.coord(coords[i]).X:
                   ~~~~~~^^^
IndexError: list index out of range
Ngôn ngữ chính
Python
Star
21
Fork
11
Merge trung bình
7 giờ 11 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

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 NCAS-CMS/cf-plot

Tất cả issue của NCAS-CMS/cf-plot

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.