NCL--站点数据插值成格点
;读取原始数据及其经纬度
a = asciiread(\"/public/home/ncl/wrfout/pm25-2013-11-china.txt\lat = a(:,1)lon = a(:,2)pm25 = a(:,3)
olon=fspan(72,138,132);设置插值范围及格点数,即空间分辨率olat=fspan(17,57,80)
olon!0 = \"lon\"
olon@long_name = \"lon\"
olon@units = \"degrees-east\"olon&lon = olonolat!0 = \"lat\"
olat@long_name = \"lat\"
olat@units = \"degrees_north\"olat&lat = olat
rscan = (/10,5,3/) ;连续的有效半径⼤⼩,最⼤为10,依次递减
pm25_reshape = obj_anal_ic_deprecated(lon,lat,pm25,olon,olat,rscan, False) ;Creanm插值
Creanm插值会对⾼值有所损耗,但空间分布结果最为合理。
通过调整rsan来控制选取的影响范围,rsacn数值越⼤,影响范围越⼤,选取影响点越多,曲线越平滑,但是相对来说更容易失真。rsacn的选取单位为维度。例如,上述例⼦所使⽤的插值分辨率为0.5deg,影响半径为10,其影响范围为10个纬度,20个格点*20个格点,导致其插值结果失真⽐较严重。
下图为插值前后的对⽐,图1为未插值,直接⽤contour函数画出的图;图⼆rscan为 (/10,5,3/) ;图三rscan为 (/2,1,0.5/) 。