- 积分
- 6350
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-9-26
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2015-5-27 11:13:18
|
显示全部楼层
首先感谢你的帮助!
我已经找到WRFUserARW.ncl 中的调用步骤,但是在你说的相应的lib目录下,没有nfpfort目录,也就没有找到wrf_ctt.f程序,我是用的学校大型机上的ncl,在上面找了好久,还是没有发现。
不好意思,可否麻烦你帮我找下wrf_ctt.f,给我一份这个程序啊,非常感谢!
另外我的脚本,如下,(初学较乱!,且本来是画mdbz,我只是把mdbz改成ctt,出的结果就是如上面一样,全是负值)
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/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
USE_WRF_MAP_PROJECTION = False
dir = "/nuist/scratch/m/wrf/wrfout/2010/"
filename = "wrfout_d02_2010-08-06_18:00:00.nc"
a = addfile(dir+filename,"r")
wks = gsn_open_wks("png","wrf_contour_map") ; "ps", "pdf", "png"
cmap=(/"white","black",\
"(/1.,.294,.0/)",\
"(/.988,.635,.035/)",\
"(/.996,.820,.125/)",\
"(/.992,.976,.075/)",\
"(/.910,.953,.624/)",\
"(/.996,.996,.996/)"/)
gsn_define_colormap(wks,cmap)
times = wrf_user_getvar(a,"times",-1) ; get all times in the file
ntimes = dimsizes(times) ; number of times in the file
do nt = 0, ntimes-1 ; TIME LOOP
print("Working on time: " + times(nt) )
;res@TimeLabel = times(nt) ; Set Valid time to use on plots
;nt = 22 ; first time step
dbz = wrf_user_getvar(a,"ctt",nt)
dbz@lat2d = wrf_user_getvar(a,"XLAT",nt)
dbz@lon2d = wrf_user_getvar(a,"XLONG",nt)
;---Set some resources
res = True
res@gsnMaximize = True ; maximize plot in frame
res@cnFillOn = True ; turn on contour fill
res@cnLinesOn = False ; turn off contour lines
res@cnLineLabelsOn = False ; turn off line labels
res@gsnAddCyclic = False ; set to False if plotting regional data
;res@tiMainString = filename
;---THESE VALUES WILL LIKELY NEED TO BE CHANGED OR COMMENTED
;res@cnLevelSelectionMode = "ManualLevels"
;res@cnMinLevelValF = 220
;res@cnMaxLevelValF = 260
;res@cnLevelSpacingF = 10
;res@mpSpecifiedFillColors = (/"white","transparent","white"/)
;res@mpInlandWaterFillColor = 238
;res@mpLandFillColor = -1
res@mpOutlineOn = True
res@mpDataBaseVersion = "MediumRes"
res@mpDataSetName = "Earth..4"
;res@mpOutlineSpecifiers = (/"China:states","Taiwan"/)
res@mpGeophysicalLineThicknessF= 2.
res@mpNationalLineThicknessF= 2.
res@mpOutlineBoundarySets = "AllBoundaries"
res@pmTickMarkDisplayMode = "Always"
res@lbOrientation="Vertical"
res@vpXF = 0.2
res@vpWidthF = 0.6
res@vpYF = 0.8
res@vpHeightF = 0.8
if(USE_WRF_MAP_PROJECTION) then
;
; This function looks at the global attributes on the WRF output
; file and sets some map resources based on their values.
;
res = wrf_map_resources(a,res)
res@tfDoNDCOverlay = True ; No lat/lon coordinates required
else
dbz@lat2d = a->XLAT(nt,:,:) ; Lat/lon coordinates required
dbz@lon2d = a->XLONG(nt,:,:)
res@mpProjection = "CylindricalEquidistant" ; default for gsn_csm_contour_map
res@mpMinLatF = 30
res@mpMaxLatF = 43
res@mpMinLonF = 90
res@mpMaxLonF = 108
res@mpCenterLonF = (res@mpMinLonF + res@mpMaxLonF) / 2.
;res@mpDataBaseVersion = "MediumRes" ; better map outlines
end if
plot = gsn_csm_contour_map(wks,dbz,res)
end do
end |
|