>I was looking the skewt_2.ncl that gives the lifting condensation, 
>temperature at LCL, show alter index. total precip water and the cape. 
>Is there a function I can call to calculate the CIN and get it to output 
>the CIN in the skewt plot?
===========================================
Well as we have found via experience, not all
CAPE codes return the same value. :-(
NCL [a034] has 
http://www.ncl.ucar.edu/Document/Functions/Built-in/rip_cape_3d.shtml
http://www.ncl.ucar.edu/Document/Functions/Built-in/rip_cape_2d.shtml
These cape require 3D or 4D arrays. If you have 1D you'll have to fake
the routine out. EG: say you have T(:), PSFC, ... used for the
skewT then 
  
   load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
   
     klev = dimsizes(T)
     
     t        = new ( (/klev,1,1/) , typeof(T), getFillValue(T) )
     t(:,0,0) = T(::-1)   ; cape*d requires top-to-bottom
     
     psfc     = new ( (/1,1/), typeof(PSFC), getFillValue(PSFC) )
     
             etc
     cinfo= rip_cape_3d(p, t, q, z, zsfc, psfc, True) 
     
     CAPE_RIP= cinfo(0,0,0)
     CIN_RIP = cinfo(1,0,0)
       
---
skewT requires bottom-to-top, cape3d requies top-to-bottom,
hence (::-1) reverses the order.
----
As to plotting it on the skewT diagram, 
[a] 
cp $NCARG_ROOT/lib/ncarg/nclscripts/csm/skewt_func.ncl  my_skewt_func.ncl
[2] modify the following print  in my_skewt_func.ncl
      info = " Plcl="    +floattointeger(plcl+0.5) \
           + " Tlcl[C]=" +floattointeger(tlcl+0.5) \
           + " Shox="    +floattointeger(shox+0.5) \
           + " Pwat[cm]="+floattointeger(pwat+0.5) \
           + " Cape[J]= "+floattointeger(cape)
           + " Cin[j]= "+floattointeger(floattointeger(CIN_RIP)
[3] Calculate CIN_RIP *prior* to invoking my_skewt_func.ncl
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jan 29 2007 - 11:06:53 MST
This archive was generated by hypermail 2.2.0 : Tue Feb 06 2007 - 15:01:34 MST