- 积分
- 340
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2020-4-3
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
begin
ft = addfile("air.2021.nc", "r")
fr = addfile("rhum.2021.nc", "r")
tem = short2flt(ft->air(:,:,:,:))
q = short2flt(fr->rhum(:,:,:,:))
lev=ft->level
ose = new((/365,16,180,360/),float)
;ose = new(dimsizes(tem), float)
;do i = 0, dimsizes(lev) - 1
; ose(i,:,:) = lev(i)
;end do
;;;;;;;;;;;;;;;;;;;计算各个高度层的假相当位温
do i = 0,16
e = lev(i)*q(:,i,:,:)/(0.622+q(:,i,:,:)) ;常数
copy_VarMeta(q(:,0,:,:), e)
tlcl=55.0+2840.0/(3.5*log(tem(:,i,:,:))-log(e)-4.805) ;1*4逆矩阵
copy_VarMeta(e, tlcl)
theta = tem(:,i,:,:)*((1000/lev(i))^(0.2854*(1.0-0.28*q(:,i,:,:)))) ;1行4列
copy_VarMeta(e, theta)
ose(:,i,:,:) = theta*exp(((3376./tlcl)-2.54)*q(:,i,:,:)*(1.0+0.81*q(:,i,:,:)))
copy_VarMeta(q, ose)
;e=0
end do
printVarSummary(ose)
printMinMax(ose, 1)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
delete(tem)
delete(q)
delete(tlcl)
delete(theta)
wks = gsn_open_wks("pdf", "osepou")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;剖面图
gsn_define_colormap(wks,"rainbow+gray")
res = True
res@gsnDraw = False
res@gsnFrame = False
res@gsnLeftString = ""
res@gsnRightString = ""
res@tmXBMode = "Explicit"
res@tmXBValues = (/-90,-60,-30,0,30,60,90/)
res@tmXBLabels = (/"90~S~o~N~S","60~S~o~N~S","30~S~o~N~S","0","30~S~o~N~N","60~S~o~N~N","90~S~o~N~N"/)
res@tmXBLabelFontHeightF = 0.02
res@tmYLLabelFontHeightF = 0.02
res@tiYAxisString = "Level (hPa)"
res@cnFillOn = True ; res@cnFillOn = False
res@cnFillPalette="rainbow+gray"
;res@cnLinesOn = True
;res@cnLineLabelsOn = False
;res@cnLevelSpacingF = 0.05
;res@gsnContourZeroLineThicknessF = 4. ;0 值用 2 倍粗细线
;res@cnInfoLabelOn = False
;res@lbLabelBarOn = False
;res@lbOrientation ="Vertical"
;res@cnFillPalette = "BlAqGrYeOrRe"
;res@lbOrientation = "Vertical"
;res@gsnAddCyclic = False ; data already has cyclic poin
res = True ; plot mods desired
res@tiMainString = ""
res@vcRefMagnitudeF = 50.0 ; add a reference vector
res@vcRefLengthF = 0.2 ; what the ref length is
;res@vcGlyphStyle = "CurlyVector" ; turn on curly vectors
res = True ; plot mods desired
res@gsnMaximize = True ; Make plot fit the frame
res@cnFillOn = True ; turn on color fill
res@cnLinesOn = False ; turn of contour lines
res@cnLevelSpacingF = 0.05 ; contour spacing
res@cnFillPalette = "BlAqGrYeOrRe"
res@lbOrientation = "Vertical"
res@gsnAddCyclic = False ; data already has cyclic poin
; res@cnLevelSelectionMode = "ManualLevels" ; manually set the contour levels with the following 3 resources
;res@cnMinLevelValF = -10.0 ; set the minimum contour level
;res@cnMaxLevelValF = 10. ; set the maximum contour level
;res@cnLevelSpacingF = 0.00025 ; set the interval between contours
;base=gsn_csm_pres_hgt(wks,var_zm,res) ;1 月的纬向平均 u
;base=gsn_csm_contour(wks,var_zm,res)
base = gsn_csm_contour(wks,var_eth(200,:,{-90:90},{112}), vores) ;
;base = ColorNegDashZeroPosContour(base,"blue","black","red")
;小于 0 用蓝色虚线,大于 0 用红色实线,0 值用黑线
draw(base)
frame(wks)
end
fatal:Dimension size mismatch on subscript #2, left-hand and right-hand side dimensions do not match
出错语句:ose(:,i,:,:) = theta*exp(((3376./tlcl)-2.54)*q(:,i,:,:)*(1.0+0.81*q(:,i,:,:)))
|
|