水平输送水汽通量matlab,分享:水汽通量散度
登錄后查看更多精彩內容~
您需要 登錄 才可以下載或查看,沒有帳號?立即注冊
x
本帖最后由 1649518749 于 2017-6-5 11:49 編輯
;圖形和grads、MI對比了一下,量級都是1e-5,grads大小要比ncl、MI偏大4倍左右,估計是里面函數風速單位的問題。
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/cnmap/cnmap.ncl"
begin
a=addfile("/mnt/d/wrfmodel/2014/air.2014.nc","r")
b=addfile("/mnt/d/wrfmodel/2014/uwnd.2014.nc","r")
c=addfile("/mnt/d/wrfmodel/2014/vwnd.2014.nc","r")
d=addfile("/mnt/d/wrfmodel/2014/rhum.2014.nc","r")
air= short2flt(a->air(0,{700},:,:))
u=short2flt(b->uwnd(0,{700},:,:))
v=short2flt(c->vwnd(0,{700},:,:))
rhum=short2flt(d->rhum(0,{700},:,:))
lat=a->lat
lon=a->lon
es = 6.112*exp(17.67*(air-273.16)/(air-29.65))
qs = 0.62197*es*1000/(700-0.378*es)
q = qs*rhum/100
q = smth9(q, 0.50, -0.25, False)
copy_VarCoords(air,es)
copy_VarCoords(air,qs)
copy_VarCoords(air,q)
qu = new((/73,144/),float)
qv = new((/73,144/),float)
do i=0,72
do j=0,143
qu(i,j) = q(i,j)*u(i,j)/9.8
qv(i,j) = q(i,j)*v(i,j)/9.8
end do
end do
copy_VarCoords(air,qu)
copy_VarCoords(air,qv)
;? ? qu = smth9(qu, 0.50, -0.25, False)
;? ? qv = smth9(qv, 0.50, -0.25, False)
vapord = new((/73,144/),float)
vapord=uv2dv_cfd(qu,qv,lat,lon,2)? ?? ?? ?? ?? ?; u,v ==> divergence
vapord = vapord*100000
copy_VarCoords(air,vapord)
printVarSummary(vapord)
;>=========================================================<
wks? ?? ? = gsn_open_wks("pdf","vaporsandu")
gsn_define_colormap( wks ,"BlWhRe")
res? ?? ?? ?? ?? ?? ?? ?? ? = True
res@tiMainString? ?? ?? ?? ?=""
res@gsnMaximize? ?? ?? ?? ? = False
res@gsnDraw? ?? ?? ?? ?? ???= False
res@gsnFrame? ?? ?? ?? ?? ? = False
;>--------------------------------------------<
;? ?? ?? ?? ?set for the map
;>--------------------------------------------<
res@mpMinLatF? ?? ?? ?? ?? ?= 15.
res@mpMaxLatF? ?? ?? ?? ?? ?= 55.
res@mpMinLonF? ?? ?? ?? ?? ?= 72.
res@mpMaxLonF? ?? ?? ?? ?? ?= 136.
res@pmTickMarkDisplayMode = "Always"
res@mpFillOn? ?? ?? ?? ?? ? = True
res@mpOutlineOn? ?? ?? ?? ? = False??; Use outlines from shapefile
res@mpDataBaseVersion? ?? ? = "MediumRes"
res@mpDataSetName? ?? ?? ???= "Earth..4"
res@mpAreaMaskingOn? ?? ?? ?= True
res@mpMaskAreaSpecifiers? ? = (/"China","Taiwan","Disputed area between India and China","India:Arunachal Pradesh"/)
res@mpLandFillColor? ?? ?? ?= "white"
res@mpInlandWaterFillColor??= "white"
res@mpOceanFillColor? ?? ???= "white"
res@mpOutlineBoundarySets? ?= "NoBoundaries"
;>--------------------------------------------<
; set for the plot
res@cnInfoLabelOn = False
res@gsnLeftString??= ""
res@gsnRightString =""
res@cnFillOn? ?? ?? ?? ?? ? = True
res@cnLinesOn? ?? ?? ?? ?? ?= False
res@cnLineLabelsOn? ?? ?? ?= False
res@cnLineColor = "blue"
res@cnLevelSelectionMode = "ManualLevels"
res@cnMinLevelValF? ?= -2.5 ; set min contour level
res@cnMaxLevelValF=??3. ; set max contour level
res@gsnSpreadColors? ?? ?? ?= True
res@lbLabelAutoStride? ?? ? = True
;res@lbBoxEndCapStyle = "TriangleBothEnds"
;res@cnFillDrawOrder? ?? ?? ?= "PreDraw"
res@cnLevelSpacingF= 0.25
;res@gsnContourPosLineDashPattern=0??;>0
;res@gsnContourNegLineDashPattern=1 ;<0線的種類
;res@gsnContourZeroLineThicknessF=2.
map=gsn_csm_contour_map(wks,vapord,res)
;>============================================================<
;? ?? ?? ?? ?? ?? ?? ? add China map
;>------------------------------------------------------------
cnres? ?? ?? ???= True
cnres@china? ???= True? ?? ? ;draw china map or not
cnres@river? ???= False? ?? ? ;draw changjiang&huanghe or not
cnres@province??= True? ?? ? ;draw province boundary or not
cnres@nanhai? ? = False? ?? ? ;draw nanhai or not
cnres@diqu? ?? ?= False? ?? ? ; draw diqujie or not
chinamap = add_china_map(wks,map,cnres)
;>============================================================<
draw(map)
frame(wks)
end
總結
以上是生活随笔為你收集整理的水平输送水汽通量matlab,分享:水汽通量散度的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 湖南工大11级C语言网上作业,湖南工大1
- 下一篇: matlab人脸追踪,求大神帮助我这个菜