[gradsusr] Query Reg Extracting the data in Vertical Levels
Jeffrey Duda
jdduda at iastate.edu
Mon Oct 25 10:03:19 EDT 2010
Geeta,
The documentation on the tvrh2q function says that it will assume it is at
the pressure level of the current dimension environment. I don't see any
"set lev" commands that are uncommented, so one of the reasons you are not
getting the data is probably because your pressure level is not set
correctly. Nonetheless, I should think the while loop should work just
fine, but you need to be careful how you set your limits. If you want to go
from low levels to upper levels, your while statement should look something
like
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
Try that and see if it works.
Jeff Duda
On Mon, Oct 25, 2010 at 3:53 AM, Geeta Geeta <geeta124 at hotmail.com> wrote:
> Dear All,
> I am trying to extract the SPECIFIC HUMIDITY for all the levels in vertical
> (19 Levels from 1000 to 100hPa) from the Model.
> So I am Using tvrh2q function of Grads. Following is the ctl file.
>
> 'open test.ctl'
> *'set lev 1000 100'
> 'set t 1'
> * while (lev< 100)
> *zlev=1000
> 'set gxout fwrite'
> 'set fwrite test.dat'
> zlev =1000
> 'define tvk=tk(lev='zlev')+0.61*QVAPOR(lev='zlev')*tk(lev='zlev')'
> 'd tvrh2q(tvk(lev='zlev'),rh(lev='zlev'))'
> ************
> zlev =950
> 'define tvk=tk(lev='zlev')+0.61*QVAPOR(lev='zlev')*tk(lev='zlev')'
> 'd tvrh2q(tvk(lev='zlev'),rh(lev='zlev'))'
> *'disable fwrite'
> *****************
> zlev =900
> 'define tvk=tk(lev='zlev')+0.61*QVAPOR(lev='zlev')*tk(lev='zlev')'
> 'd tvrh2q(tvk(lev='zlev'),rh(lev='zlev'))'
> 'disable fwrite'
> ***********************
>
> * endwhile
>
> I am Unable to Extract the data Using the While Statement in Grads, so I am
> defining the Zlev separately .
>
> Kindly Suggest.
> geeta
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
--
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/20101025/d800f45c/attachment-0003.html
More information about the gradsusr
mailing list