[gradsusr] Query Reg Extracting the data in Vertical Levels (Geeta Geeta)
Jeffrey Duda
jdduda at iastate.edu
Tue Oct 26 12:32:24 EDT 2010
Geeta,
I have used this block of code in the past with success:
*Need to get list of available pressure levels
i = 1
while (i <= z_levs)
'set z 'i
'q dims'
presline = sublin(result,4)
pres.i = subwrd(presline,6)
i = i + 1
endwhile
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
****************************************************************************
i = 1 ; zlev = 1000
while (zlev > 100)
...
...
...
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)
i = i + 1
endwhile
************************************************************************
do this:
********************************************************************
i = 1
while (i < z_levs)
'set z 'i
...
...
...
i = i + 1
endwhile
**********************************************************************
Jeff
On Tue, Oct 26, 2010 at 4:13 AM, Geeta Geeta <geeta124 at hotmail.com> wrote:
> Hi Jeff,
> thank you. It is working for the dp= constant (50) in my case.
>
> Can you tell me how to go about doing it if I have the pressure levels
> where dp is not constant.
> Thanks again
> geeta
>
>
>
>
--
Jeff Duda
Iowa State University
Meteorology Graduate Student
3134 Agronomy Hall
www.meteor.iastate.edu/~jdduda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101026/819673f4/attachment-0003.html
More information about the gradsusr
mailing list