- 积分
- 747
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2017-10-9
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
用cru的降水资料计算每个格点时间的一个标准差,想看一下在中国降水标准差的大小,用的dim_stddev,画出来结果不对,下面是我的程序和画的图,帮忙看下是有什么问题,谢谢
begin
latS = 15
latN = 55
lonL = 73
lonR = 140
f = addfile("D:/ShuJ/topo.nc", "r")
high = f->htopo({latS:latN},{lonL:lonR})
lon2 = f->lon({lonL:lonR})
lat2 = f->lat({latS:latN})
china = addfile("D:/ShuJ/ChinaPoint_05.nc", "r")
clon = china->lon({lonL:lonR})
clat = china->lat({latS:latN})
cn = china->China_Point({latS:latN},{lonL:lonR})
path_precl = "D:/ShuJ/CRU_TS4.03_0.5x0.5/cru_ts4.04.1901.2019.pre.dat.nc"
f2 = addfile(path_precl,"r")
time = f2->time
YYYYMM = cd_calendar(time, -1)
YM = YYYYMM/100
yym=ind(YM.ge.1990.and.YM.le.2019)
lon = f2->lon({lonL:lonR})
lat = f2->lat({latS:latN})
d1 =dimsizes(lat)
d2 = dimsizes(lon)
pr1 = f2->pre(yym,{latS:latN},{lonL:lonR});pre
t1 = onedtond(pr1,(/30,12,d1,d2/))
pre11a = t1(:,5:7,:,:)
xann = dim_sum_n(pre11a,1)
year = ispan(1990, 2019, 1)
xann!0 = "year"
xann&year = year
xann!1 = "lat"
xann&lat = lat
xann!2 = "lon"
xann&lon = lon
ai = linint2(lon1, lat1, ai1, True, lon, lat, 0)
hgt = linint2(lon2, lat2, high, True, lon, lat, 0)
cmap = linint2(clon, clat, cn, True, lon, lat, 0)
pstd = dim_stddev(xann(lat|:, lon|:, year|:))
pre1 = new((/d1,d2/), float)
do i = 0, d1-1
do j = 0,d2-1
pre1(i,j) = pstd(i,j)
pre1(i,j) = where(cmap(i,j).eq.1, pre1(i,j), -32767)
end do
end do
pre1!0 = "lat"
pre1!1 = "lon"
pre1&lat = lat
pre1&lon = lon
di = "D:/ncl/"
wks = gsn_open_wks ("png", di+"bzc" ) ; send graphics to PNG file
gsn_define_colormap(wks,"WhiteBlueGreenYellowRed")
cnres = True
cnres@gsnMaximize = True
cnres@gsnDraw = False
cnres@gsnFrame = False
cnres@cnLinesOn = False
cnres@cnFillOn = True
cnres@mpFillOn = False
cnres@mpGeophysicalLineThicknessF = 1.5
cnres@gsnAddCyclic = False
cnres@tiMainString = ""
cnres@mpMaxLatF = 60
cnres@mpMinLatF = 15
cnres@mpMaxLonF = 140
cnres@mpMinLonF = 60
cnres@mpDataBaseVersion = "MediumRes"
cnres@mpDataSetName = "Earth..4"
cnres@mpAreaMaskingOn = True
cnres@mpMaskAreaSpecifiers = (/"china","Taiwan"/)
cnres@mpOutlineOn = True
cnres@mpOutlineSpecifiers = (/"China","China:Provinces"/)
cnres@lbLabelBarOn = True
cnres@lbAutoManage = True
cnres@lbLabelFontHeightF = 0.009
cnres@cnLevelSelectionMode = "ManualLevels"
cnres@cnMinLevelValF = 0
cnres@cnMaxLevelValF = 150
cnres@cnLevelSpacingF = 10
res = True
res@china = True ;draw china map or not
res@river = True ;draw changjiang&huanghe or not
res@province = True ;draw province boundary or not
res@nanhai = False ;draw nanhai or not
res@diqu = False ; draw diqujie or not
plot1=gsn_csm_contour_map_ce(wks,pre1,cnres)
chinamap = add_china_map(wks,plot1,res)
;gsn_reverse_colormap(wks)
draw(plot1)
frame(wks)
end
|
-
|