GRIB’s parameter name not recognized using pygrib in python

I did not find a solution to my problem so I try to post something about it. If there is an answer somewhere that I did not find I am sorry.

Well, I am using Python 3.10 and Spyder.
I want to work with a GRIB file and I have some difficulties with one of its parameter.

Here is my code :

GRIB_File_Path = r"/Path to my GRIB file/GRIB file name.grb"
    
gribfile = pygrib.open(GRIB_File_Path)
for grb in gribfile:
    print(grb)type here

The output is :

1:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 0 hrs:from 202404291200
2:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 1 hrs:from 202404291200
3:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 2 hrs:from 202404291200
4:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 3 hrs:from 202404291200
5:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 4 hrs:from 202404291200
6:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 5 hrs:from 202404291200
7:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 6 hrs:from 202404291200
8:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 7 hrs:from 202404291200
9:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 8 hrs:from 202404291200
10:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 9 hrs:from 202404291200
11:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 10 hrs:from 202404291200
12:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 11 hrs:from 202404291200
13:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 12 hrs:from 202404291200
14:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 13 hrs:from 202404291200
15:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 14 hrs:from 202404291200
16:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 15 hrs:from 202404291200
17:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 16 hrs:from 202404291200
18:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 17 hrs:from 202404291200
19:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 18 hrs:from 202404291200
20:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 19 hrs:from 202404291200
21:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 20 hrs:from 202404291200
22:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 21 hrs:from 202404291200
23:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 22 hrs:from 202404291200
24:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 23 hrs:from 202404291200
25:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 24 hrs:from 202404291200
26:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 25 hrs:from 202404291200
27:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 26 hrs:from 202404291200
28:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 27 hrs:from 202404291200
29:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 28 hrs:from 202404291200
30:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 29 hrs:from 202404291200
31:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 30 hrs:from 202404291200
32:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 31 hrs:from 202404291200
33:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 32 hrs:from 202404291200
34:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 33 hrs:from 202404291200
35:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 34 hrs:from 202404291200
36:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 35 hrs:from 202404291200
37:10 metre U wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 36 hrs:from 202404291200
38:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 0 hrs:from 202404291200
39:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 1 hrs:from 202404291200
40:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 2 hrs:from 202404291200
41:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 3 hrs:from 202404291200
42:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 4 hrs:from 202404291200
43:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 5 hrs:from 202404291200
44:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 6 hrs:from 202404291200
45:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 7 hrs:from 202404291200
46:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 8 hrs:from 202404291200
47:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 9 hrs:from 202404291200
48:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 10 hrs:from 202404291200
49:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 11 hrs:from 202404291200
50:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 12 hrs:from 202404291200
51:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 13 hrs:from 202404291200
52:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 14 hrs:from 202404291200
53:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 15 hrs:from 202404291200
54:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 16 hrs:from 202404291200
55:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 17 hrs:from 202404291200
56:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 18 hrs:from 202404291200
57:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 19 hrs:from 202404291200
58:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 20 hrs:from 202404291200
59:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 21 hrs:from 202404291200
60:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 22 hrs:from 202404291200
61:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 23 hrs:from 202404291200
62:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 24 hrs:from 202404291200
63:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 25 hrs:from 202404291200
64:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 26 hrs:from 202404291200
65:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 27 hrs:from 202404291200
66:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 28 hrs:from 202404291200
67:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 29 hrs:from 202404291200
68:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 30 hrs:from 202404291200
69:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 31 hrs:from 202404291200
70:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 32 hrs:from 202404291200
71:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 33 hrs:from 202404291200
72:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 34 hrs:from 202404291200
73:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 35 hrs:from 202404291200
74:10 metre V wind component:m s**-1 (instant):regular_ll:heightAboveGround:level 10:fcst time 36 hrs:from 202404291200
75:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 1 hrs:from 202404291200
76:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 2 hrs:from 202404291200
77:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 3 hrs:from 202404291200
78:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 4 hrs:from 202404291200
79:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 5 hrs:from 202404291200
80:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 6 hrs:from 202404291200
81:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 7 hrs:from 202404291200
82:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 8 hrs:from 202404291200
83:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 9 hrs:from 202404291200
84:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 10 hrs:from 202404291200
85:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 11 hrs:from 202404291200
86:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 12 hrs:from 202404291200
87:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 13 hrs:from 202404291200
88:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 14 hrs:from 202404291200
89:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 15 hrs:from 202404291200
90:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 16 hrs:from 202404291200
91:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 17 hrs:from 202404291200
92:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 18 hrs:from 202404291200
93:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 19 hrs:from 202404291200
94:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 20 hrs:from 202404291200
95:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 21 hrs:from 202404291200
96:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 22 hrs:from 202404291200
97:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 23 hrs:from 202404291200
98:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 24 hrs:from 202404291200
99:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 25 hrs:from 202404291200
100:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 26 hrs:from 202404291200
101:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 27 hrs:from 202404291200
102:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 28 hrs:from 202404291200
103:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 29 hrs:from 202404291200
104:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 30 hrs:from 202404291200
105:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 31 hrs:from 202404291200
106:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 32 hrs:from 202404291200
107:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 33 hrs:from 202404291200
108:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 34 hrs:from 202404291200
109:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 35 hrs:from 202404291200
110:180:180 (instant):regular_ll:heightAboveGround:level 10:fcst time 36 hrs:from 202404291200

I want to access to the parameter 180, so my code is :

180_Parameter  = gribfile.select(name='180')[0]

The output is :

Parameter = gribfile.select(name='180')[0]

  File src/pygrib/_pygrib.pyx:575 in pygrib._pygrib.open.select

ValueError: no matches found

So I tried :

Parameter_Name = gribfile[90].parameterName
print(Parameter_Name)

The output is :

180

So I do not understand what I am doing wrong. If someone has an idea I would be happy to listen !

New contributor

PtitBiscuitRaci is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật