<div dir="ltr">Andrew,<div><br></div><div>Thanks for your reply! I knew it had to be forgetting something simple. I'll give it a try and see if that solves my problem. I'll letcha know!</div><div><br></div><div>Again, thank you for the help!</div>
<div><br></div><div>corBy</div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><b style="color:rgb(69,69,69);font-family:'comic sans ms',sans-serif;font-size:large;font-style:italic"><i>C. Corby Dickerson IV</i></b><br>
<div><div style="color:rgb(69,69,69);font-size:12px;font-family:Arial,Helvetica,sans-serif"><font face="'comic sans ms', sans-serif">-General Forecaster-</font></div><div style="color:rgb(69,69,69);font-size:12px;font-family:Arial,Helvetica,sans-serif">
<font face="'comic sans ms', sans-serif">Weather Story Program Manager</font></div><div style="color:rgb(69,69,69);font-size:12px;font-family:Arial,Helvetica,sans-serif"><a rel="nofollow" style="font-family:'comic sans ms',sans-serif;color:rgb(35,71,134);outline:0px"><b>406-329-4840</b></a><br>
</div><div style="color:rgb(69,69,69);font-family:'comic sans ms',sans-serif;font-size:12px"><a href="https://twitter.com/NWSMissoula" style="color:rgb(17,85,204)" target="_blank"><img src="cid:ii_13c873336c4b68e4" alt="Inline image 1" style="font-family:arial;font-size:small;color:rgb(34,34,34)"></a><span style="font-family:arial;font-size:small;color:rgb(34,34,34)"> </span><a href="https://www.facebook.com/#!/US.NationalWeatherService.Missoula.gov" style="color:rgb(17,85,204)" target="_blank"><img src="cid:ii_13c87337e85c84db" alt="Inline image 2" style="font-family:arial;font-size:small;color:rgb(34,34,34)"></a> <a href="https://www.youtube.com/user/NWSMissoula" style="color:rgb(17,85,204)" target="_blank"><img src="cid:ii_13c8735baa9c301e" alt="Inline image 3"></a> <a href="http://www.wrh.noaa.gov/mso/" style="color:rgb(17,85,204)" target="_blank"><img src="cid:ii_13c8735eaaf71ded" alt="Inline image 4"></a> </div>
</div><div style="color:rgb(69,69,69);font-family:'comic sans ms',sans-serif;font-size:12px"><a href="http://www.nssl.noaa.gov/projects/ping/" target="_blank"><img src="http://www.nssl.noaa.gov/projects/ping/display/resources/images/PING-Banner-336x54.png" width="200" height="31"></a><br>
</div></div></div>
<br><br><div class="gmail_quote">On Wed, May 7, 2014 at 6:28 PM, Andrew Friedman <span dir="ltr"><<a href="mailto:andfried@berkeley.edu" target="_blank">andfried@berkeley.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Corby,<br>
Where in your script do you set the vertical levels? It should be done prior to the calculation of level-varying variables.<br>
Andrew<br>
<div><div class="h5"><br>
On May 7, 2014, at 3:57 PM, Corby Dickerson - NOAA Federal <<a href="mailto:corby.dickerson@noaa.gov">corby.dickerson@noaa.gov</a>> wrote:<br>
<br>
> Greetings!<br>
><br>
> I have written the following script to calculate ThetaE from NARR data using a new formula referenced in Volume 137 of AMS's Monthly Weather Review. The script runs successfully and displays data which makes sense. However it plots the same values of ThetaE no matter what level I choose. I am hoping someone out there will be able to provide me with some direction as to what I might be doing wrong.<br>
><br>
> Thanks in advance for the help!<br>
><br>
> ******************************************************************************************************************************************<br>
> *Script to calculate Equivalent Potential Temperature referencing equation 6.5 from<br>
> *Davies-Jones' September 2009 Monthly Weather Review findings On Formulas for Equivalent<br>
> 'open narr.ctl'<br>
> 'set lat 30 55'<br>
> 'set lon -140 -100'<br>
> *First calculate 2m Dew Point Temperature<br>
> *<br>
> 'define tc2m = TMP2m - 273.15'<br>
> 'define B = (log(RH2m/100)+((17.27*tc2m)/(237.3+tc2m)))/17.27'<br>
> 'define TdC2m = (237.3*B)/(1-B)'<br>
> 'define dewp2m = TdC2m + 273.15'<br>
> *<br>
> *Then we can calculate Temperature at LCL [K]<br>
> 'define templcl=(((1/(1/(dewp2m-56)+log((tmp2m/dewp2m))/800))+56))'<br>
> *<br>
> *And calculate the Pressure at LCL<br>
> 'define preslcl=(pressfc*pow(((templcl+273.16)/tmp2m),(7/2)))/1000'<br>
> *<br>
> *With this data in hand we can calculate Potential Temperature at LCL *(K)<br>
> *Saturation Vapor Pressure (mb)=6.112 * exp[17.67(Tk-C)/(Tk-C+243.5)]<br>
> *<br>
> 'define eslcl = 6.112*exp((17.67*(templcl-273.15))/(templcl-273.15+243.5))'<br>
> *<br>
> 'define thetaLCL = templcl*pow(1000/(lev-eslcl),0.2854)'<br>
> *<br>
> *Calculate Equivalent Potential Temperature (ThetaE)<br>
> *Define constants<br>
> *<br>
> 'define L0 = 2501000'<br>
> 'define L1 = 1754'<br>
> 'define L3 = L0 - L1'<br>
> 'define K2 = 1137000'<br>
> 'define cpd = 1105.7'<br>
> 'define C = 273.15'<br>
> 'define mythetae = thetaLCL*exp((L3*(tmpprs-C)+(K2*ICMRprs))*ICMRprs/(cpd*templcl))'<br>
><br>
> C. Corby Dickerson IV<br>
> -General Forecaster-<br>
> Weather Story Program Manager<br>
> 406-329-4840<br>
</div></div>> <image.png> <image.png> <image.png> <image.png><br>
><br>
> _______________________________________________<br>
> gradsusr mailing list<br>
> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote></div><br></div>