Does anyone see a problem with this segment of code
for computing 200 hPa geopotential heights from a regional
climate model output? The values I get seem a little bit higher
than I expected by say 100 m.
Thanks, Michael
; Assign the topography to zsfc
zsfc=new((/dimsizes(time),148,158/),float)
do it=0,dimsizes(time)-1
zsfc(it,:,:)=topo
end do
copy_VarCoords(ps,zsfc)
; Convert water vapor mixing ratio to specific humidity
q=q/(1.+q) ; mix rat to spec hum
; Use temperature and specific humidity to compute virtual temp
t=t*(1.+0.61*q)
copy_VarCoords(q,t)
sigma=a->sigma
; Get pressure at each sigma
p=pres_sigma(sigma,ps) ; hPa
copy_VarCoords(t,p)
; Compute heights
z=p(time|:,iy|:,jx|:,kz|::-1)
z=hydro(p(time|:,iy|:,jx|:,kz|::-1),t(time|:,iy|:,jx|:,kz|::-1),zsfc)
z=z(:,:,:,::-1)
; Retrieve 200 hPa heights
p1=p(time|:,iy|:,jx|:,kz|:)
h200=int2p(p1,z,200.,2)
h200_less=h200(:,:,:,0)
copy_VarCoords(ps,h200_less)
v=h200_less(iy|:,jx|:,time|:)
ctl(:,:,iy)=dim_avg_Wrap(v)
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jun 22 16:17:30 2011
This archive was generated by hypermail 2.1.8 : Tue Aug 02 2011 - 14:31:37 MDT