MeteoInfoLab脚本示例:计算涡度、散度
用U/V分量数据计算涡度和散度,计算涡度的函数是hcurl,计算散度的函数是hdivg,参数都是U, V。
脚本程序:
f = addfile('D:/Temp/GrADS/model.ctl') u = f['U'][0,0,:,:] v = f['V'][0,0,:,:] vort = hcurl(u, v) divg = hdivg(u, v) axesm() mlayer = shaperead('D:/Temp/map/country1.shp') geoshow(mlayer) #layer = contourfm(vort, 20) layer = contourfm(divg, 20) #title('Vorticity') title('Divergence') colorbar(layer, orientation='horizontal', aspect=50)