- 积分
- 1589
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-9-12
- 最后登录
- 1970-1-1
|

楼主 |
发表于 2014-3-30 23:01:54
|
显示全部楼层
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"
begin
; The WRF ARW input file.
; This needs to have a ".nc" appended, so just do it.
a = addfile("wrfout_d03_2012-01-13_12:00:00.nc","r")
; We generate plots, but what kind do we prefer?
type = "png"
; type = "pdf"
; type = "ps"
; type = "ncgm"
wks = gsn_open_wks(type,"plt_Cloud")
gsn_define_colormap(wks,"WhViBlGrYeOrRe") ; overwrite the .hluresfile color map
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Set some basic resources
res = True
res@MainTitle = "REAL-TIME WRF"
pltres = True ; Plot resources
mpres = True ; Map resources
mpres@mpGeophysicalLineColor = "Black"
mpres@mpNationalLineColor = "Black"
mpres@mpUSStateLineColor = "Black"
mpres@mpGridLineColor = "Black"
mpres@mpLimbLineColor = "Black"
mpres@mpPerimLineColor = "Black"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; First get the variables we will need
if(isfilevar(a,"QCLOUD"))
qc = wrf_user_getvar(a,"QCLOUD",8)
qc = qc*1000.
qc@units = "g/kg"
end if
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
do level = 0,28,1 ; LOOP OVER LEVELS
display_level = level + 1
opts = res
opts@cnFillOn = True
opts@cnLinesOn = True
opts@cnLineLabelsOn = True
;opts@gsnAddCyclic = False
opts@mpDataSetName = "Earth..4"
opts@mpDataBaseVersion = "HighRes"
opts@mpOutlineOn = True
opts@mpOutlineBoundarySets = "AllBoundaries"
opts@cnLineLabelFontColor = "red"
opts@cnLineLabelFontHeightF = 0.012
opts@cnLineLabelBackgroundColor = "white"
opts@PlotLevelID = "Eta Level " + display_level
if (isvar("qc"))
contour = wrf_contour(a,wks,qc(level,:,:),opts)
;opts@ContourParameters = (/ 0.02, 0.4, 0.02/)
plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)
delete(contour)
end if
delete(opts)
end do ; END OF LEVEL LOOP
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
end
|
|