- 积分
- 136
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2018-3-31
- 最后登录
- 1970-1-1
|
3金钱
全国1767个站点的spei插值,插值程序、数据、结果如下。
在插值过程中遇到一写问题。
插值出来的数据出现缺测以及-nan,请问这种情况如何解决。
程序:
begin
dirout = "/home/earth/Lism/program/SPEI/myself_1.0/5_spei/"
f_latlon = addfile("/home/earth/Lism/program/SPEI/myself_1.0/1_LatLon/" + "LatLon.nc", "r")
lat_av = f_latlon->lat
lon_av = f_latlon->lon
f = addfile(dirout + "SPEI_3.nc", "r")
spei = f->spei ; [ncl0 | 154] x [ncl1 | 1767]
spei!0 = "month"
spei!1 = "lat"
spei&lat = lat_av
print(spei)
; print(max(spei))
; print(min(spei))
;-------------------------插值用的经纬度---------------------------------
nlon = 140
olon = new(nlon, "float") ;中国经度范围73°33′E-135°05′E,这里我设置经度70°-140°
olon!0 = "lon"
olon@long_name = "lon"
olon@units = "degrees-east"
olon@_FillValue = -1000000
olon&lon = olon
do j = 0, nlon - 1
olon(j) = 70 + j*0.5
end do
nlat = 120
olat = new(nlat, "float") ;中国纬度范围3°51′N-53°33′N,这里我设置纬度0°-60°
olat!0 = "lat"
olat@long_name = "lat"
olat@units = "degrees_north"
olat@_FillValue = -1000000
olat&lat = olat
do j = 0, nlat - 1
olat(j) = 0 + j*0.5
end do
SPEI = new((/154, nlat, nlon/), "float")
do i = 0, 153
rscan = (/10, 7, 4, 1/)
opt = False
SPEI(i, : , : ) = obj_anal_ic_Wrap(lon_av ,lat_av, spei(i, : ), olon, olat, rscan, opt)
print(i)
end do
SPEI!0 = "month"
SPEI!1 = "lat"
SPEI&lat = olat
SPEI!2 = "lon"
SPEI&lon = olon
printVarSummary(SPEI)
print(max(SPEI))
print(min(SPEI))
end
数据形式:
Variable: spei
Type: float
Total Size: 1088472 bytes
272118 values
Number of Dimensions: 2
Dimensions and sizes: [month | 154] x [lat | 1767]
Coordinates:
lat: [51.71667..16.16667]
Number Of Attributes: 1
_FillValue : 9.96921e+36
(0,0) -0.103644
(0,1) 0.2626499
(0,2) -0.3318069
(0,3) -0.2066187
(0,4) -0.4311405
(0,5) -0.5097452
(0,6) 0.0303055
(0,7) 0.810435
(0,8) 0.5471534
(0,9) 0.3686806
(0,10) 0.06521988
(0,11) 0.8846506
|
-
插值后结果1
-
插值后结果2
|