shancx 1.9.33.232__py3-none-any.whl → 1.9.33.234__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- shancx/H/__init__.py +0 -3
- shancx/Read.py +40 -2
- {shancx-1.9.33.232.dist-info → shancx-1.9.33.234.dist-info}/METADATA +1 -1
- {shancx-1.9.33.232.dist-info → shancx-1.9.33.234.dist-info}/RECORD +6 -6
- {shancx-1.9.33.232.dist-info → shancx-1.9.33.234.dist-info}/WHEEL +0 -0
- {shancx-1.9.33.232.dist-info → shancx-1.9.33.234.dist-info}/top_level.txt +0 -0
shancx/H/__init__.py
CHANGED
shancx/Read.py
CHANGED
|
@@ -45,7 +45,8 @@ def getGrib(filepath):
|
|
|
45
45
|
'lons': lons
|
|
46
46
|
}
|
|
47
47
|
finally:
|
|
48
|
-
|
|
48
|
+
if filepath.endswith('.gz'):
|
|
49
|
+
os.unlink(tmp_path)
|
|
49
50
|
|
|
50
51
|
"""
|
|
51
52
|
input_Path = './Composite_00.50_20250701-010044.grib2.gz'
|
|
@@ -107,4 +108,41 @@ if __name__ == "__main__":
|
|
|
107
108
|
print("参数单位:", result['metadata']['units'])
|
|
108
109
|
"""
|
|
109
110
|
|
|
110
|
-
|
|
111
|
+
"""
|
|
112
|
+
# 方法1:查看GRIB文件的元信息
|
|
113
|
+
import xarray as xr
|
|
114
|
+
import cfgrib
|
|
115
|
+
# 尝试用xarray打开GRIB文件查看元数据
|
|
116
|
+
try:
|
|
117
|
+
# 直接打开文件查看
|
|
118
|
+
ds = xr.open_dataset(pathGPH, engine='cfgrib')
|
|
119
|
+
print("=== GRIB文件元数据 ===")
|
|
120
|
+
print(ds)
|
|
121
|
+
# 查看维度信息
|
|
122
|
+
print("\n=== 维度信息 ===")
|
|
123
|
+
for dim in ds.dims:
|
|
124
|
+
print(f"{dim}: {ds.dims[dim]}")
|
|
125
|
+
# 查看坐标信息
|
|
126
|
+
print("\n=== 坐标信息 ===")
|
|
127
|
+
for coord in ds.coords:
|
|
128
|
+
print(f"{coord}: {ds.coords[coord].values[:5]}...")
|
|
129
|
+
|
|
130
|
+
except Exception as e:
|
|
131
|
+
print(f"无法用xarray打开: {e}")
|
|
132
|
+
# 方法2:使用pygrib直接读取
|
|
133
|
+
try:
|
|
134
|
+
import pygrib
|
|
135
|
+
grbs = pygrib.open(pathGPH)
|
|
136
|
+
for grb in grbs[:5]: # 查看前5个消息
|
|
137
|
+
print(f"\n消息 {grb.messagenumber}:")
|
|
138
|
+
print(f" 参数: {grb.parameterName}")
|
|
139
|
+
print(f" 层次: {grb.level}")
|
|
140
|
+
print(f" 层次类型: {grb.typeOfLevel}")
|
|
141
|
+
print(f" 预报时效: {grb.endStep}")
|
|
142
|
+
print(f" 数据形状: {grb.values.shape}")
|
|
143
|
+
grbs.close()
|
|
144
|
+
except ImportError:
|
|
145
|
+
print("pygrib未安装,使用: pip install pygrib")
|
|
146
|
+
except Exception as e:
|
|
147
|
+
print(f"pygrib读取错误: {e}")
|
|
148
|
+
"""
|
|
@@ -5,7 +5,7 @@ shancx/Lib.py,sha256=GUAspllSxk39mvj-F1Q8Ys0EcY_lQfZPRGPE7L3x4SE,977
|
|
|
5
5
|
shancx/Path1.py,sha256=vX4A5RgdwVyIVVNZRocl18rOu1Z8YMLfDb0B92-0bE8,5334
|
|
6
6
|
shancx/Point.py,sha256=gyIomOVbNoz6SOcAhhTS26NHBeJ0TOwB-ljNsBWN1ZE,1909
|
|
7
7
|
shancx/QC.py,sha256=MFxbPMEwrnk5l0sTFMrx13wPlXJ5WI5TovzaiBoEr0E,9848
|
|
8
|
-
shancx/Read.py,sha256=
|
|
8
|
+
shancx/Read.py,sha256=KvW1Uh6niQ0RDyq86TdEqzFhyGo6mPgUcCsfV6T3wDo,5494
|
|
9
9
|
shancx/Resize.py,sha256=uwiOhD-aWPDLvIwOYEX-XXN_suOXv6hPDcaGyr4JLC4,4044
|
|
10
10
|
shancx/ZR.py,sha256=5APchqVoI1G2MkrN9YJSWCwfLUygcSFIsUXSo9aq1Qg,341
|
|
11
11
|
shancx/__init__.py,sha256=6sfiHElECqfy5eEEGqaCAw4YiKxgKfJ5IFFh9yvtewk,11442
|
|
@@ -59,7 +59,7 @@ shancx/Fillmiss/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
59
59
|
shancx/Fillmiss/imgidwJU.py,sha256=CyP4ZlhPpXPqGVzzcLR7lohVl8bWjEceJLo7yvKgtEM,1708
|
|
60
60
|
shancx/Fillmiss/imgidwLatLonJU.py,sha256=ltYZj9CwN8cVs4Kow64oVN1EiBERgW9FceTUBFkCOAs,4314
|
|
61
61
|
shancx/Gpu/__init__.py,sha256=4Ahq04phTGVlFWN9Vih0WAh-IqFrhtwM5hj4G1IU2Dk,1950
|
|
62
|
-
shancx/H/__init__.py,sha256=
|
|
62
|
+
shancx/H/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
63
63
|
shancx/H/optSchler.py,sha256=vlrditYROuWoKX6XnKCslX4XU-fQEaCXMYF-ZHWEaGQ,793
|
|
64
64
|
shancx/H/simple.py,sha256=mndEspQfaUBkBLbPjw8eejr63l6OINSOMQJXDjgi-u0,223
|
|
65
65
|
shancx/H9/__init__.py,sha256=FCarcXfU2tVD2KrCGKNNUuL51zAWZYHV7lrP7gntvaI,4911
|
|
@@ -90,7 +90,7 @@ shancx/Train/multiGpu.py,sha256=D_oZeiSc7VWktpnVDwrFOC1CYZSt9rxOKY5lngE5vFg,820
|
|
|
90
90
|
shancx/Train/prepare.py,sha256=vL_8UOA66oZCBIwCICtihsGibivtNgaVJGulJxfNdn8,6793
|
|
91
91
|
shancx/Train/renet50.py,sha256=wEhYk1X96WE5zuqHqVxWLJa-A5jDNkz4z6edORNufnA,6428
|
|
92
92
|
shancx/tensBoard/__init__.py,sha256=ga2C5YyJITvvQA1ocpxna_KNFnNRJVwkTjLoIglLZUQ,993
|
|
93
|
-
shancx-1.9.33.
|
|
94
|
-
shancx-1.9.33.
|
|
95
|
-
shancx-1.9.33.
|
|
96
|
-
shancx-1.9.33.
|
|
93
|
+
shancx-1.9.33.234.dist-info/METADATA,sha256=OwKA8ujSZ8yQ8MRJM9DGQ42925NGhkB1vuuLcu1ZTkc,850
|
|
94
|
+
shancx-1.9.33.234.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
95
|
+
shancx-1.9.33.234.dist-info/top_level.txt,sha256=akfCS1vKWz3pNmEN_yN9ZiGp-60IQY5ET38mRx_i_-4,7
|
|
96
|
+
shancx-1.9.33.234.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|