Export Data
中文版: 导出数据
This page focuses on export workflows. For the public writer and object-method list, see IO API and PRD API.
pycwr 1.0.4 does not limit export to Py-ART anymore.
Recommended object-style export
radar.to_pyart_radar(...)
radar.to_xradar(...)
radar.to_wsr98d(...)
radar.to_nexrad_level2_msg31(...)
radar.to_nexrad_level2_msg1(...)
Function-style writers are also available:
from pycwr.io import (
write_wsr98d,
write_nexrad_level2_msg31,
write_nexrad_level2_msg1,
)
Py-ART / CfRadial
from pycwr.io import read_auto
radar = read_auto("./data/file.bin.bz2")
pyart_radar = radar.to_pyart_radar()
If Py-ART is installed, you can continue and write CfRadial:
import pyart
pyart.io.write_cfradial("./cfradial.nc", pyart_radar)
WSR98D / NEXRAD export
radar.to_wsr98d("./export.bin")
radar.to_nexrad_level2_msg31("./export_msg31.ar2v")
radar.to_nexrad_level2_msg1("./export_msg1.ar2v")
Notes
WSR98Dexport is mainly used for project round-trip and compatibility verificationNEXRADexport is mainly for interoperability with Py-ART and external workflowsCorrected fields and raw fields remain separate variables inside
PRDWhen exporting to standard interfaces,
pycwrchooses a suitable source field according to the current public rules