- 积分
- 32409
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-12-11
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
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/WRF_contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
files = "./wrfout_d02_2001-04-07_00:00:00.nc"
f=addfile(files,"r")
loc = wrf_user_latlon_to_ij(f,31.24,121.0)
print(loc)
i = loc(0)
j = loc(1)
tt=chartostring(f->Times) ;时间给了tt
tn=dimsizes(tt)
lat1d = f->XLAT(0,:,:)
lon1d = f->XLONG(0,:,:)
lc = f->SWDNB(:,:,:) ; o3
xwks = gsn_open_wks("pdf","lc") ; pdf工作站
gsn_define_colormap(xwks,"BlAqGrYeOrReVi200") ; select color map
;颜色
res=True
;************************************************
res@gsnAddCyclic = False
res@mpDataSetName = "Earth..4" ; This new database contains
; divisions for other countries.
res@mpDataBaseVersion = "MediumRes" ; Medium resolution database
res@mpOutlineOn=True ; Turn on map outlines
res@mpOutlineSpecifiers=(/"China","Xinjiang Uygur"/) ;China:states
;***********************************************
res@gsnSpreadColors = True ; use full range of colormap
res@cnFillOn = True ; color plot desired
res@cnLinesOn = False ; turn off contour lines
res@cnLineLabelsOn = False ; turn off contour labels
res@gsnRightString = "W m-2"
WRF_map_c(f, res, 0) ; reads info from file
;************************************************
; if appropriate, set True for native mapping (faster)
; set False otherwise
;************************************************
res@tfDoNDCOverlay = True
;************************************************
; associate the 2-dimensional coordinates to the variable for plotting
; only if non-native plot
;************************************************
if (.not.res@tfDoNDCOverlay) then
x@lat2d = f->XLAT(0,:,:) ; direct assignment
x@lon2d = f->XLONG(0,:,:)
end if
;************************************************
; Turn on lat / lon labeling
;************************************************
res@pmTickMarkDisplayMode = "Always" ; turn on tickmarks
res@tmXTOn = False ; turn off top labels
;res@tmYROn = False ; turn off right labels
;************************************************
nt = 1
do nt=1,tn-1
res@tiMainString = tt(nt)
plot = gsn_csm_contour_map(xwks,lc(nt,:,:),res) ; Draw a contour plot.
end do
delete(plot)
end
画出来的图上的单位被挡住,而且变量名称显示不全
|
|