- 积分
- 8463
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2018-7-3
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
分别用EC和FNL初始场模拟出降水与真实的融水资料做对比画出组图,组图中不显示两个wrfout的降水,单独画两个wrfout降水也不行,求大神帮忙~~
以下是程序:
begin
nlat = 440
nlon = 700
ncrain = 308000
ntim = 25
r = new((/ntim,nlat,nlon/),"float")
;reading files
tim = (/ ... /)
lon = fspan(70.05,139.95,nlon)
lat = fspan(15.05,58.95,nlat)
lat!0 = "lat"
lat@long_name = "latitude"
lat@units = "degrees_north"
lon!0 = "lon"
lon@units = "degrees_east"
lon@long_name = "longitude"
do t = 0, ntim-1
r(t,:,:) = fbindirread(tim(t),0,(/nlat,nlon/),"float")
end do
r!0 = "time"
r!1 = "lat"
r!2 = "lon"
r&time = ispan(1,25,1)
r&lat = lat
r&lon = lon
r@units = "mm/hour"
r@_FillValue = -999.00
res = True
res@mpMinLatF = 23.
res@mpMaxLatF = 30.
res@mpMinLonF = 104.
res@mpMaxLonF = 120.
frain = dim_sum_n_Wrap(r,0)
;WRF fnl
a = addfile("D:/HUANAN/summer/2010.05.31-06.02ok/fnl/wrfout_d01_2010-05-31_00_00_00","r")
slp = wrf_user_getvar(a,"slp",-1) ; slp
wrf_smooth_2d( slp, 3 ) ; smooth slp
rain_exp = wrf_user_getvar(a,"RAINNC",-1)
rain_con = wrf_user_getvar(a,"RAINC",-1)
rain_tot = rain_exp + rain_con
rain_tot@description = "Total Precipitation"
times = wrf_user_getvar(a,"times",-1) ; get all times in the file
ntimes = dimsizes(times) ; number of times in the file
do it = 2,ntimes-1,2 ; TIME LOOP - start at hour 6 as we are only interested in 6hourly tendencies
print("Working on time: " + times(it) )
res@TimeLabel = times(it) ; Set Valid time to use on plots
rain_exp_tend = rain_exp(it,:,:) - rain_exp(it-2,:,:)
rain_con_tend = rain_con(it,:,:) - rain_con(it-2,:,:)
rain_tot_tend = rain_tot(it,:,:) - rain_tot(it-2,:,:)
rain_exp_tend@description = "Explicit Precipitation Tendency"
rain_con_tend@description = "Param Precipitation Tendency"
rain_tot_tend@description = "Precipitation Tendency"
; Plotting options for Sea Level Pressure
opts_psl = res
opts_psl@ContourParameters = (/ 900., 1100., 2. /)
opts_psl@cnLineColor = "Blue"
opts_psl@cnInfoLabelOn = False
opts_psl@cnLineLabelFontHeightF = 0.01
opts_psl@cnLineLabelPerimOn = False
opts_psl@gsnContourLineThicknessesScale = 1.5
end do
pltres = True
mpres = True
mpres@mpGeophysicalLineColor = "Black"
mpres@mpNationalLineColor = "Black"
mpres@mpUSStateLineColor = "Black"
mpres@mpGridLineColor = "Black"
mpres@mpLimbLineColor = "Black"
mpres@mpPerimLineColor = "Black"
;WRF EC
b = addfile("D:/HUANAN/summer/2010.05.31-06.02ok/EC/wrfout_d01_2010-05-31_00_00_00","r")
slp1 = wrf_user_getvar(b,"slp",-1) ; slp
wrf_smooth_2d( slp1, 3 ) ; smooth slp
rain_exp1 = wrf_user_getvar(b,"RAINNC",-1)
rain_con1 = wrf_user_getvar(b,"RAINC",-1)
rain_tot1 = rain_exp1 + rain_con1
rain_tot1@description = "Total Precipitation"
times1 = wrf_user_getvar(a,"times",-1) ; get all times in the file
ntimes1 = dimsizes(times) ; number of times in the fille
res@gsnDraw = False
res@gsnFrame = False
res@gsnMaximize = False
res@gsnSpreadColors = True
res@mpAreaMaskingOn = True
plot = new(3,graphic)
wks = gsn_open_wks("png","201001")
res@mpProjection = "CylindricalEquidistant"
res@mpDataBaseVersion = "Ncarg4_1" ; 地图采用中等分辨率
res@mpDataSetName = "Earth..4"
res@mpMaskAreaSpecifiers = (/"China"/)
res@mpOutlineSpecifiers = (/"China"/)
res@mpLandFillColor = "white"
res@cnFillOn = True
res@cnLinesOn = False
res@cnInfoLabelOn = False
res@cnFillDrawOrder = "Predraw"
res@tmXTOn = False
res@tmYROn = False
res@gsnMajorLonSpacing = 10
res@tmXBOn = True
res@tmXBMajorThicknessF = 2.0 ;default 2
res@tmXBMajorLengthF = 0.01 ;default 0.02
res@tmYLOn = True
res@tmYLMajorThicknessF = 2.0 ;default 2
res@tmYLMajorLengthF = 0.01 ;default 0.02
res@tmYLMinorOn = True
res@tmYLMinorThicknessF = 1.0
res@tmYLMinorLengthF = 0.005 ;default 0.01
res@tmYLMinorPerMajor = 4
res@gsnAddCyclic = False
res@gsnLeftString = " "
res@gsnRightString = " "
res@cnLevelSelectionMode = "ExplicitLevels"
res@cnLevels = (/ 50, 80, 110, 140, 170, 200, 250/)
res@cnFillColors = (/"White","DarkOliveGreen1", \
"DarkOliveGreen3", \
"Green","ForestGreen", \
"Yellow","Orange","Red"/)
res@lbLabelBarOn = True
opts_r = res
opts_r@UnitLabel = "mm"
opts_r@cnInfoLabelOn = False
opts_r@cnConstFLabelOn = False
opts_r@cnFillOn = True
contour_tot = wrf_contour(a,wks, rain_tot(2,:,:), opts_r)
contour_tot1 = wrf_contour(b,wks, rain_tot1(2,:,:), opts_r)
plot(0) = wrf_map_overlays(a,wks,(/contour_tot/),pltres,mpres)
plot(1) = wrf_map_overlays(b,wks,(/contour_tot1/),pltres,mpres)
plot(2) = gsn_csm_contour_map(wks,frain,res)
pres = True
pres@txString = "2016.6.14 00-15 00(fnl,EC,REAL)"
gsn_panel(wks,(/plot/),(/2,2/),pres
end
|
|