我正在使用虹吸管制作动画雷达循环,我看到虹吸管没有按时间/文件顺序提取数据。(示例如下)。
from siphon.cdmr import Dataset
from siphon.radarserver import get_radarserver_datasets, RadarServer
from siphon.catalog import TDSCatalog
from datetime import datetime
radar_station = "TWX"
ds = get_radarserver_datasets('http://thredds.ucar.edu/thredds/')
url = ds['NEXRAD Level III Radar from IDD'].follow().catalog_url
rs = RadarServer(url)
query = rs.query()
query.stations(radar_station).time_range(datetime(2021,11,10,22,0,0),
datetime(2021,11,10,23,0,0)).variables('N0Q')
rs.validate_query(query)
catalog = rs.get_catalog(query)
list(catalog.datasets.values())
产量...
[Level3_TWX_N0Q_20211110_2233.nids,
Level3_TWX_N0Q_20211110_2202.nids,
Level3_TWX_N0Q_20211110_2255.nids,
Level3_TWX_N0Q_20211110_2300.nids,
Level3_TWX_N0Q_20211110_2241.nids,
Level3_TWX_N0Q_20211110_2223.nids,
Level3_TWX_N0Q_20211110_2212.nids,
Level3_TWX_N0Q_20211110_2245.nids,
Level3_TWX_N0Q_20211110_2216.nids,
Level3_TWX_N0Q_20211110_2240.nids,
Level3_TWX_N0Q_20211110_2258.nids,
Level3_TWX_N0Q_20211110_2226.nids,
Level3_TWX_N0Q_20211110_2250.nids,
Level3_TWX_N0Q_20211110_2232.nids,
Level3_TWX_N0Q_20211110_2248.nids,
Level3_TWX_N0Q_20211110_2207.nids,
Level3_TWX_N0Q_20211110_2236.nids,
Level3_TWX_N0Q_20211110_2238.nids,
Level3_TWX_N0Q_20211110_2209.nids,
Level3_TWX_N0Q_20211110_2211.nids,
Level3_TWX_N0Q_20211110_2246.nids,
Level3_TWX_N0Q_20211110_2228.nids,
Level3_TWX_N0Q_20211110_2252.nids,
Level3_TWX_N0Q_20211110_2219.nids,
Level3_TWX_N0Q_20211110_2230.nids,
Level3_TWX_N0Q_20211110_2256.nids,
Level3_TWX_N0Q_20211110_2205.nids,
Level3_TWX_N0Q_20211110_2218.nids,
Level3_TWX_N0Q_20211110_2253.nids,
Level3_TWX_N0Q_20211110_2200.nids,
Level3_TWX_N0Q_20211110_2204.nids,
Level3_TWX_N0Q_20211110_2235.nids,
Level3_TWX_N0Q_20211110_2243.nids,
Level3_TWX_N0Q_20211110_2221.nids,
Level3_TWX_N0Q_20211110_2214.nids,
Level3_TWX_N0Q_20211110_2225.nids]
在列表末尾添加 .sort() 会产生以下错误:
TypeError: '<' not supported between instances of 'Dataset' and 'Dataset'
有没有办法对生成的 TDS 目录进行排序以输入 matplotlib.animation.FuncAnimation 等资源?
干杯-n-谢谢,
账单