- 积分
- 294
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2022-7-16
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
报这样的错:
(0) check_for_y_lat_coord: Warning: Data either does not contain
(0) a valid latitude coordinate array or doesn't contain one at all.
(0) A valid latitude coordinate array should have a 'units'
(0) attribute equal to one of the following values:
(0) 'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
(0) check_for_lon_coord: Warning: Data either does not contain
(0) a valid longitude coordinate array or doesn't contain one at all.
(0) A valid longitude coordinate array should have a 'units'
(0) attribute equal to one of the following values:
(0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'
两个变量,hgt2021就能画出BI就不行:
[img]file:///C:\Users\Lenovo\Documents\Tencent Files\2420803507\Image\C2C\76T2[RA%10W8E%6ZDQ[R@]2.png[/img]
真的不理解
代码如下:
BI=new(dimsizes(hgt2021),typeof(hgt2021))
lon=f2021->lon(0:143)
lat = f2021->lat(0:72)
BI!0="lat"
BI!1="lon"
dims=dimsizes(BI)
nlon=dims(1)
nlat=dims(0)
lon@units="Degrees_east"
lat@units = "Degrees_north"
;;计算BI
do lat=24,48,1
do lon=0,142,1
Zu=dim_min_n(hgt2021(lat:lat+24,lon),0)
Zd=dim_min_n(hgt2021(lat-24:lat,lon),0)
Rc=((Zu+hgt2021(lat,lon))/2+(Zd+hgt2021(lat,lon))/2)/2
BI(lat,lon)=100*((hgt2021(lat,lon)/Rc)-1.0)
end do
end do
do lat = 48,72,1
do lon = 0,143,1
Zu=dim_min_n(hgt2021(lat-24:lat,lon),0)
Zd=dim_min_n(hgt2021(lat:72,lon),0)
Rc=((Zu+hgt2021(lat,lon))/2+(Zd+hgt2021(lat,lon))/2)/2
BI(lat,lon)=100*((hgt2021(lat,lon)/Rc)-1.0)
end do
end do
do lat = 0,24,1
do lon = 0,143,1
Zu=dim_min_n(hgt2021(0:lat,lon),0)
Zd=dim_min_n(hgt2021(lat:lat+24,lon),0)
Rc=((Zu+hgt2021(lat,lon))/2+(Zd+hgt2021(lat,lon))/2)/2
BI(lat,lon)=100*((hgt2021(lat,lon)/Rc)-1.0)
end do
end do
wks = gsn_open_wks("png","fig_BI")
gsn_define_colormap(wks,"MPL_YlGnBu")
res2 = True ; Plot mods desired.
res2@gsnPolar = "NH" ;北半球的极射赤面投影
res2@cnFillOn =True;等值线填充
res2@lbLabelBarOn =True;色标打开
res2@cnLinesOn =False;不要等值线怪丑的
res2@cnLineLabelsOn =True;等值线标注数值
res2@cnLevelSpacingF=0.01 ;等值线间隔值
res2@cnMinLevelValF =0 ;等值线最小值
res2@cnMaxLevelValF =5.5 ;等值线最大值
res2@cnLevelSelectionMode = "ExplicitLevels"
res2@tmYLLabelStride=1
res2@tmXBLabelStride=1
res2@tmXBMinorOn=False
res2@tmYLMinorOn=False
res2@tmXBMajorLengthF=0.01
res2@tmYLMajorLengthF=0.01
res2@mpInlandWaterFillColor="white"
res2@mpLandFillColor="white"
res2@mpOceanFillColor="white"
res2@mpNationalLineColor="black"
res2@mpGeophysicalLineColor="black"
res2@mpNationalLineThicknessF=2
plot_BI = gsn_csm_contour_map_polar(wks,BI1,res2)
end
出图只出一半,把格点数当成经纬度了,但是同样条件下hgt2021就不会
|
|