Geeta,<br>I have used this block of code in the past with success:<br><br>*Need to get list of available pressure levels<br> i = 1<br> while (i <= z_levs)<br> 'set z 'i<br> 'q dims'<br> presline = sublin(result,4)<br>
pres.i = subwrd(presline,6)<br> i = i + 1 <br> endwhile <br><br>where I got z_levs from the output of 'q file' earlier. Then you have an array called 'pres' filled with pressure. Then go back through the loop before, but instead of <br>
****************************************************************************<br>i = 1 ; zlev = 1000<br>while (zlev > 100)<br>...<br>...<br>...<br>zlev = zlev - dp*i (where dp is your pressure
change between levels...hopefully it is constant. If it isn't
there's another way to do this)<br>i = i + 1<br>endwhile<br>************************************************************************<br><br>do this:<br><br>********************************************************************<br>
i = 1<br>
while (i < z_levs)<br>'set z 'i<br>...<br>
...<br>
...<br>
i = i + 1<br>
endwhile<br>**********************************************************************<br><br>Jeff<br><br><div class="gmail_quote">On Tue, Oct 26, 2010 at 4:13 AM, Geeta Geeta <span dir="ltr"><<a href="mailto:geeta124@hotmail.com">geeta124@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>
Hi Jeff, <br>thank you. It is working for the dp= constant (50) in my case.<br><br>Can you tell me how to go about doing it if I have the pressure levels where dp is not constant. <br>Thanks again<br>geeta<br><br><br><br>
</div></blockquote></div><br clear="all"><br>-- <br>Jeff Duda<br>Iowa State University<br>Meteorology Graduate Student<br>3134 Agronomy Hall<br><a href="http://www.meteor.iastate.edu/~jdduda">www.meteor.iastate.edu/~jdduda</a><br>