- 积分
- 37
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-10-23
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
一个nc数据画等值线,用gsn_csm_contour可以出来等值线,但是地图坐标是错的,用了gsn_csm_contour_map底图能出来,有没有等值线,好奇怪,求解这个是我的ncl脚本
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" ; Add special wrf functions
begin
f0="/public/users/liulinaacc/netc/"
a = addfile(f0+"wrfchemi_00z_d01.d01.nc","r") ; Open a file
es= wrf_user_getvar(a,"E_SO2",0)
es@units = "mole/s"
times = wrf_user_getvar(a,"Times",0)
; type = "x11"
type = "pdf"
; type = "ps"
; type = "ncgm"
wks = gsn_open_wks(type,"S02_emission") ; Create a plot workstatio
gsn_define_colormap(wks,"WhBlGrYeRe") ; overwrite the .hluresfile color map
; Set some basic resources
res = True
res@gsnSpreadColors = True ; use full range of color map
res@lbLabelStride = 4
res@pmTickMarkDisplayMode = "Always"; use NCL default lat/lon labels
res@gsnAddCyclic = False ; data already has cyclic point
; this must also be set for any zoom
res@mpMaxLatF = 44. ; specify the plot domain
res@mpMinLatF = 18. ;
res@mpMinLonF = 93. ;
res@mpMaxLonF = 132. ;
res@mpOutlineOn = True ; turn the map outline on
; res@cnLevelSelectionMode = "ExplicitLevels" ; use explicit levels
; res@cnLevels = ispan(400,1200,200) ; set the contour levels
res@cnLineLabelsOn = False ; do not use line labels
res@cnFillOn = True ; color fill
res@cnLinesOn = False ; do not draw contour lines
res@gsnSpreadColors = True ; automatically choose the fill colors
res@tiMainString = "emission of SO2" ; set the main title
plot=gsn_csm_contour_map(wks,es(0,:,:),res)
end
提示错误:
check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn't contain one at all.
(0) A valid latitude coordinate array should have a 'units' 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 a valid longitude coordinate array or doesn't contain one at all.
(0) A valid longitude coordinate array should have a 'units' 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'
[img]file:///C:\Users\lenovo\AppData\Roaming\Tencent\Users\523380043\QQ\WinTemp\RichOle\Y)PRLHRN1C0B{6(V7MWMO[0.jpg[/img]
|
|