- 积分
- 25
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2020-4-14
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2024-4-22 09:36:02
|
显示全部楼层
本帖最后由 活宝贝啦啦啦 于 2024-4-22 09:43 编辑
一、用户手册里面关于读取Phase Array类型数据的有关代码:
1 from pycwr.io import read_auto
2 PRD = read_auto(r"./data/Z_RADR_I_Z9898_20190828181529_O_DOR_SAD_CAP_FMT.bin.bz2")
3 print(PRD.scan_info)
4 print(PRD.fields)
5 PyartRadar = PRD.ToPyartRadar()
二、楼主的代码
import numpy as np
import os
from pycwr.io import read_PA
path=r"./"
files=os.listdir(path)
for i in files:
filename=files
print(filename)
d=read_PA(path+filename)
for j in np.arange(39):
sweep_1=d.PyartRadar.get_slice(j)
lat=d.PyartRadar.gate_latitude['data'][sweep_1]
lon=d.PyartRadar.gate_longitude['data'][sweep_1]
z_obs,zdr_obs,kdp_obs,phi_obs=[d.PyartRadar.fields[_]['data'][sweep_1] for _ in [
'reflectivity','differential_reflectivity','specific_differential_phase','differential_phase']]
|
|