Re: plot on height levels

From: Dennis Shea (shea AT XXXXXX)
Date: Fri Oct 08 2004 - 16:37:08 MDT


>
> I am thinking to make plots of temperature and wind from CAM on constant
>height levels, say 5000 meter. Is there a function of NCL can do the
>interpolation from CAM hybrid coordiante to the height levels?
>

 The "int2p" might work.
     http://ngwww.ucar.edu/ngdoc/ng/ref/ncl/functions/int2p.html

 It says "pressure" but it is more general than that.
 int2p operates on the rightmost dimension. Thus,
 the data need to be reordered.

 ===

     z = f->Z3 ; read geopotentail at each grid pt
     x = f->X ; variable to be interpolated

     xlvl = (/10000, 5000, 2500 /) ; height levels
     xlvl@units = "gpm"

     linlog = 0 ; or 1
     xHeight = int2p(z(time|:,lat|:,lon|:,lev|:) \
                       ,x(time|:,lat|:,lon|:,lev|:) \
                       ,xlvl,linlog)

     xHeight@long_name = x@long_name
     xHeight@units = x@units
     
     xHeight!0 = "time"
     xHeight!1 = "lat"
     xHeight!2 = "lon"
     xHeight!3 = "lvl"

     xHeight&time = x&time
     xHeight&lat = x&lat
     xHeight&lon = x&lon
     xHeight&lvl = lvl
     printVarSummary(xHeight)
     
You could reorder to the more convential order

     xH = xHeight(time|:,lvl|:,lat|:,lon|:)
     delete(xHeight)
     
D

_______________________________________________
ncl-talk mailing list
ncl-talk AT ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Tue Oct 12 2004 - 17:06:26 MDT