爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 5623|回复: 0

求助,降水标准差空间分布图结果不对

[复制链接]

新浪微博达人勋

发表于 2020-6-5 16:09:42 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

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

bzc_cru_0605.png
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表