<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p></p>
<div>Dear NCL's users,<br>
<br>
I'm trying to calculate CAPE from a list of ASCII profiles. In the example below I was trying just in one profile, although the answer is not the same as in the picture. How can I have the CAPE value of my data? Any other suggestion is welcome too.
<br>
<br>
<br>
------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_code.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/skewt_func.ncl"<br>
<br>
begin<br>
<br>
data = asciiread("~/Francisco/<wbr>FEV2014/PTU_e_WIND_00Z/<wbr>RS2014020100.txt",(/429,9/),"<wbr>float")<br>
<br>
<span>P=data(:,2)</span><br>
T=data(:,4)<br>
q=data(:,5)<br>
<span>TD=data(:,6)</span><br>
wsp=data(:,7)<br>
wdr=data(:,8)<br>
<span></span><br>
; --- Read Data ------------;<br>
<br>
p = P<br>
q = q<br>
tc = T <br>
tdc = TD<br>
wspd = wsp<br>
wdir = wdr<br>
<br>
;*************************<br>
; create plot<br>
;*************************<br>
wks = gsn_open_wks ("png", "skewt") ; send graphics to PNG file<br>
<br>
; --- Create background skew-T and plot sounding----------------<br>
<br>
skewtOpts = True<br>
skewtOpts@DrawColAreaFill = True ; default is False<br>
<br>
dataOpts = True ; options describing data and ploting<br>
dataOpts@Wthin = 3 ; plot every n-th wind barb<br>
dataOpts@hemisphere = "SH"<br>
<br>
skewtOpts@tiMainString = "ATS Rawindsonde: degC + Thin wind" <br>
skewtOpts@DrawFahrenheit = False ; default is True<br>
<br>
skewt_bkgd = skewT_BackGround (wks, skewtOpts)<br>
skewt_data = skewT_PlotData (wks, skewt_bkgd, p,tc,tdc,z \<br>
<wbr> , wspd,wdir, dataOpts)<br>
draw (skewt_bkgd)<br>
draw (skewt_data)<br>
frame(wks)<br>
<br>
skewT = True<br>
cape = skewT@Cape<br>
pwat = skewT@Pwat<br>
<br>
print(cape)<br>
print(pwat)<br>
<br>
end<br clear="all">
</div>
<div><br>
------------------------------------------------------------------------------------------------------------------------------------------------------------</div>
<br>
<br>
<p>Thanks in advance,<br>
</p>
<p></p>
<p><br>
</p>
<div id="Signature">
<div>--</div>
Dr. Theomar Trindade de A. T. Neves<br>
UEA Researcher | Pesquisador da UEA<br>
<div>Doutor em meteorologia|Doctor in Meteorology</div>
<div>Phone: 55(83)996255666</div>
email: <a href="mailto:theomar_trindade@hotmail.com" id="LPNoLP">theomar_trindade@hotmail.com</a><br>
<a href="mailto:theomar.neves@cptec.inpe.br" id="LPNoLP">neves.</a><a href="mailto:theomar.neves@cptec.inpe.br" id="LPNoLP">theomar</a><a href="mailto:theomar.neves@cptec.inpe.br" id="LPNoLP">@gmail.com</a>
</div>
</div>
</body>
</html>