- 积分
- 62
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2022-7-25
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2023-7-2 22:16:35
|
显示全部楼层
begin
name=(/"vapor flux"/)
g = 9.8
diri = "/"
filq = "1.19-1.27q.nc" ; daily data for current year [366 days]
filu = "1.19-1.27u.nc"
filv = "1.19-1.27v.nc"
filps= "1.19-1.27data.nc"
pthu = diri+filu
pthv = diri+filv
pthq = diri+filq
pthps= diri+filps
fu = addfile(pthu ,"r")
fv = addfile(pthv ,"r")
fq = addfile(pthq ,"r")
fps = addfile(pthps,"r")
u = short2flt(fu->u(:,{500:600},:,:))
v = short2flt(fv->v(:,{500:600},:,:))
qq =short2flt(fq->q(:,{500:600},:,:))
levels= u&level
q = qq
q@unit = "kg/kg"
copy_VarCoords(qq,q)
p = short2flt(fps->sp)
ps = area_hi2lores_Wrap(p&longitude,p&latitude,p,False,1, q&longitude, q&latitude,False)
qu = u*q
qv = v*q
qu@unit = "m.kg/s.kg"
qv@unit = "m.kg/s.kg"
copy_VarCoords(q,qu)
copy_VarCoords(q,qv)
printVarSummary(qu)
;==========================================================
; 积分
;==========================================================
dp = dpres_plevel_Wrap(levels*100, ps, 50000, 0)
dpg = dp/g
dpg@unit = "kg/m2"
copy_VarCoords(qu, dpg)
qn_qu = dim_sum_n(qu*dpg, 1)
qn_qv = dim_sum_n(qv*dpg, 1)
qn_qu@unit = "kg/m.s"
qn_qv@unit = "kg/m.s"
copy_VarCoords(ps,qn_qu)
copy_VarCoords(ps,qn_qv)
printMinMax(dim_avg_n_Wrap(qn_qu,0),False)
printMinMax(dim_avg_n_Wrap(qn_qv,0),False)
;==========================================================
;
;==========================================================
qn_div = (uv2dv_cfd(dim_avg_n_Wrap(qn_qu,0),dim_avg_n_Wrap(qn_qv,0), qn_qu&latitude, qn_qu&longitude, 0))*100000
copy_VarMeta(qu(0,0,:,:), qn_div)
printMinMax(qn_div,False)
dx = 2.5
; 西边界
y1 = qn_qu(:,{30.05:31},{102.54})
; 东边界
y2 = qn_qu(:,{30.05:31},{104.2})
; 南边界
y3 = qn_qv(:,{30.05},{102.54:104.2})
; 北边界
y4 = qn_qv(:,{31},{102.54:104.2})
Q_w = new((/dimsizes(p&time)/),"float")
Q_e = Q_w
Q_s = Q_w
Q_n = Q_w
do i = 0,dimsizes(Q_w)-1
Q_w(i) = simpeq(y1(i,:),dx)*1.11/100
Q_e(i) = simpeq(y2(i,:),dx)*1.11/100
Q_s(i) = simpeq(y3(i,:),dx)*1.11*cos(21*3.14159/180)/100
Q_n(i) = simpeq(y4(i,:),dx)*1.11*cos(35*3.14159/180)/100
end do
Qt = Q_w-Q_e+Q_s-Q_n
print(Q_w)
print(Q_e)
print(Q_s)
print(Q_n)
print(Qt)
wks = gsn_open_wks("pdf","D:/AIXI/6-10.pdf")
res = True ; plot mods desired
res@vpHeightF = 0.35
res@vpWidthF = 0.6
res@trXMinF = 1008192
res@trXMaxF = 1008311
res@trYMinF = -2
res@trYMaxF = 4
res@xyDashPattern = 0
res@xyMarkLineMode =(/"MarkLines"/)
res@xyLineThicknessF=(/"2"/)
res@xyMarker =(/1/)
res@xyMarkerSizeF = 0.01
res@xyLineColor =(/"pink"/)
res@tiXAxisString = "hour"
res@tiYAxisString = "vapor flux"
res@gsnYRefLine = 0
res@gsnYRefLineDashPattern = 16
res@gsnYRefLineThicknessF = 0.5
plot1=gsn_csm_xy(wks,u&time,Qt(:), res)
end |
|