Saturday, January 16, 2010

GrADS in LINUX for WRF

Got one problem today while scripting in GrADS, in hand-on training. we are animating and printing streamline and rainfall information.
the script is like this (shorter version):

********************************************************************************
'reinit'
'open test1.ctl'
tt=2

while (tt<74)
'c'
'set t'tt
'set gxout shaded'
'define rain = rainc+rainnc'
'set lev 1000'
'd rain'tt
'set lev 850'
'set gxout stream'
'd u;v'
'printim test'tt'.png white'
tt=tt+1
endwhile
******************************************************************
note that rain and rainnc data are available in level 1000 only.
and u;v data available in several atmospheric level (19 to be exact)

The output data works for t=2, but then the rain data became 'undefined' (for the rest of t)...
After a few time of figuring out how to solve the problem, we came with moving 'set lev 1000'
to above 'define rain=rainc+rainnc' ,

My theory is the 'define rain' data need also to be set to 'set lev 1000' for the 2nd looping, because the second execution bringing the value of level=850 (that being used for wind output) into the 'define rain' calculation..so, the defined 'rain' is now in value at 850 hPa, instead of level 1000...

so, we adjusted >>

********************************************************************************
'reinit'
'open test1.ctl'
tt=2

while (tt<74)
'c'
'set t'tt
'set lev 1000'
'set gxout shaded'
'define rain = rainc+rainnc'
!****!
'd rain'tt
'set lev 850'
'set gxout stream'
'd u;v'
'printim test'tt'.png white'
tt=tt+1
endwhile
******************************************************************


me: GrADS help is so limited especially in simple-easy problem, i'll try to write something more complicated whenever i'm in intermediate-advanced level..hihihi

No comments:

Post a Comment