登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 紫雨微澜 于 2013-10-13 22:43 编辑
应研究需要wrf模拟结果每小时输出一次,每小时一个文件。 但是在画图的时候发现,wrfout文件的垂直层是有一层(1000), 查看了wrfinput是有27的,是什么问题呀?
'reinit'
'open I:\grads\ARW_08100112.ctl'
'set lon 113.7'
'set lat 24.5 25.5'
*'set lev 1000 100'
*'set t 23'
'set grads off'
'set grid off'
'set csmooth on'
'set parea 1 10.5 1 8'
'set mpdset hires'
'set map 1 1 3'
'set gxout contour'
'set clopts 1 3 0.12'
'set xlopts 1 5 0.2'
'set ylopts 1 5 0.2'
'set ccolor 1'
'set cthick 3'
'd w'
'printim I:\grads\ARW_08100112_W_WRF.png white'
;
描述文件: dset I:\grads\ARW_08100112.dat
options byteswapped
undef 1.e30
title OUTPUT FROM WRF V3.4 MODEL
pdef 288 336 lcc 24.416 111.609 144.500 168.500 60.00000 30.00000 113.83700 5155.556 5155.556
xdef 699 linear 103.24889 0.02322323
ydef 687 linear 16.41221 0.02322323
zdef 27 linear 1 1
tdef 1 linear 12Z01OCT2008 60MN
VARS 90
LU_INDEX 1 0 LAND USE CATEGORY (-)
VAR_SSO 1 0 variance of subgrid-scale orography (m2)
LAP_HGT 1 0 Laplacian of orography (m)
U 27 0 x-wind component (m s-1)
V 27 0 y-wind component (m s-1)
W 27 0 z-wind component (m s-1)
PH 27 0 perturbation geopotential (m2 s-2)
......
正常的话应该是Y轴是纬度的,因为之前画过的。 这个显示是只有一层数据的原因。 (二)尝试用NCL画了下,有出来图,但是间隔调整基本不起任何作用。
; Example script to produce plots for a WRF real-data run,
; with the ARW coordinate dynamics option.
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"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
;
; The WRF ARW input file.
; This needs to have a ".nc" appended, so just do it.
a = addfile("./wrfout_d03_2008-10-02_12:00:00.nc","r")
w = a->W
; w = ww*100 ; demo: convert to hPa
; w@units = "m/s" ; update units attribute
times = chartostring(a->Times) ; convert to type string [plot]
ntim = dimsizes(times) ; # time steps
; We generate plots, but what kind do we prefer?
type = "png"
; type = "pdf"
; type = "ps"
; type = "ncgm"
wks = gsn_open_wks(type,"plt_Precip")
; Set some basic resources
res = True
res@MainTitle = "REAL-TIME WRF"
pltres = True
mpres = True
mpres@mpGeophysicalLineColor = "Black"
mpres@mpNationalLineColor = "Black"
mpres@mpUSStateLineColor = "Black"
mpres@mpGridLineColor = "Black"
mpres@mpLimbLineColor = "Black"
mpres@mpPerimLineColor = "Black"
;****************************************************************************
; Plot one time and level for demo
; . create u and v on a common grid for visualization: nothing fancy
;****************************************************************************
; Plotting options for Sea Level Pressure
opts_psl = res
opts_psl@ContourParameters = (/-2.,2.8,0.4/)
opts_psl@cnLineColor = "Blue"
opts_psl@cnInfoLabelOn = True
opts_psl@cnLineLabelFontHeightF = 0.01
opts_psl@cnLineLabelPerimOn = False
opts_psl@gsnContourLineThicknessesScale = 1.5
opts_psl@cnLineLabelInterval =1
;nt = 12
;do nt=0,ntim-1 ; uncomment to loop
; opts_psl@tiMainString = times(nt)
; plot = wrf_contour(wks,w(nt,7,:,:),res)
contour_w = wrf_contour(a,wks,w(0,7,:,:),opts_psl)
; delete(opts_psl)
; end do
plot = wrf_map_overlays(a,wks,contour_w,pltres,mpres)
end
|