[gradsusr] make time series data in one plot
wendi harjupa
wendiharjupa at gmail.com
Tue Dec 10 21:29:26 EST 2013
Dear Jennifer
Thank you very much for your help
That is help me much, I succeed to make plots as I want
But I am very sorry, I have to back with another question to you,
I need to put legend and overlaying my figure with topography data
But, I have trouble where should I put the legend and topography scripts??
below is my new script as your recomendation and 2 others script (legend
and topography) :
## looping data and plot ##
'reinit'
'open karajo.ctl'
'set grads off'
'set mproj latlon'
'set mpdset hires'
'set gxout shaded'
'set lon 99.65 101.2'
'set lat -1.075 0.35'
'set z 5'
'set parea 1 7.5 2.8 8.3'
'set clevs 0 5 10 15 20 25 30 35 40 45 50 55 60'
'set ccols 0 9 14 4 11 5 13 3 10 7 12 8 2 6'
t=1
hour=1
while (t<360)
'set t 't
'R2=log10(ave(pow(10,ref/10),t+0,t+15))'
'clear'
'd 10*R2'
'printim hour'hour'.png white'
hour=hour+1
t=t+15
endwhile
'close 1'
## legend and figures information ##
'run /usr/local/lib/grads/cbarn 0.7 0.7 7.4 5.5'
'draw string 7.2 8.1 [dBz]'
'draw title CAPPI of Reflectivity at 3 km'
'draw xlab longitude'
'draw ylab latitude'
'set mproj latlon'
'set mpdset hires'
'set grid off'
## topography ##
'open /usr/local/lib/grads/gtopo.ctl'
'set mproj latlon'
'set mpdset hires'
'set lon 99.65 101.2'
'set lat -1.075 0.35'
'set parea 1 7.5 2.8 8.3'
'set clevs 0 500 1000 1500 2000 2500 3000 3500 4000'
'set clab off'
'set gxout contour'
'draw mark 8 4.25 5.65 0.2'
'draw string 3.9 5.6 XDR'
'draw mark 8 3.9 6.1 0.2'
'draw string 4 6 KT'
'd map'
Thank you very much for your help
Best regards,
wendi
On Tue, Dec 10, 2013 at 11:30 PM, Jennifer Adams <jma at cola.iges.org> wrote:
> Wendi,
> Please see my comments inline...
>
> On Dec 8, 2013, at 11:22 PM, wendi harjupa wrote:
>
> Dear Sir/Madam
>
> I need help in my program...
> I have one set data of radar. I made ctl file as follow :
>
> DSET /media/HD-PVRU2/%y4%m2%d2/%d2%h2.dat
> TITLE RADAR
> OPTIONS TEMPLATE LITTLE_ENDIAN
> UNDEF -1000
> XDEF 321 LINEAR 99.688120996 0.004492369
> YDEF 321 LINEAR -1.083708891 0.004522556
> ZDEF 39 LINEAR 1.0 0.5
> TDEF 15 LINEAR 13:00Z10apr2004 4mn
> VARS 2
> ref 39 99 Reflectivity(dBZ)
> vel 39 99 Doppler Velocity(m/s)
> ENDVARS
>
> As you see, one folder data contain 24 files of data (24 hours)
>
> Your TDEF entry has only 15 4-minute time steps, the equivalent of only
> one hour. Based on your template substitutions, it looks like there is one
> data file for each hour. If you have 24 files, then you need to change your
> TDEF size to 360.
>
>
> I made already script program to plot one hour data as follow :
>
> ### Reflectivity overlayed topography ###
>
> ## Open and Initiating data ##
> 'reinit'
> 'open karajo.ctl'
> 'set grads off'
> 'set mproj latlon'
> 'set mpdset hires'
> 'set gxout shaded'
> 'set lon 99.65 101.2'
> 'set lat -1.075 0.35'
> 'set z 5'
> 'set parea 1 7.5 2.8 8.3'
> 'set clevs 0 5 10 15 20 25 30 35 40 45 50 55 60'
> 'set ccols 0 9 14 4 11 5 13 3 10 7 12 8 2 6'
>
> ## average 60 minute ##
> 'set t 1 15'
>
> 'R=pow(10, ref/10)'
> 'R1=ave(R, t=1, t=15)'
>
> 'set t 1'
> 'R2=log10 (R1)'
>
>
> This could all be combined into one expression:
> 'set t 1'
> R2 = log10(ave(pow(10,ref/10),t=1,t=15))
>
>
>
> ## Plotting ##
> 'd 10*R2'
> 'run /usr/local/lib/grads/cbarn 0.7 0.7 7.4 5.5'
> 'draw string 7.2 8.1 [dBz]'
> 'draw title CAPPI of Reflectivity at 3 km'
> 'draw xlab longitude'
> 'draw ylab latitude'
> 'set mproj latlon'
> 'set mpdset hires'
> 'set grid off'
>
> 'close 1'
>
>
> 'printim 1013.jpg white'
> 'disable print'
>
> You are mixing up your printing commands here. If you want image output,
> remove the 'disable print' command. Please see
> http://iges.org/grads/gadoc/imageoutput.html for details.
>
>
> 'close 1'
>
>
>
> *My question is, how to plot 24 hours data directly??*
> *I mean. when I execute program, I can get 24 figures in one time…*
>
>
> Well, I'm not entirely clear on what it is you want to do, but ...
> If you change your TDEF as I mentioned above, then you build a loop like
> this:
>
> t=1
> day=1
> while (t<360)
> 'set t 't
> 'R2=log10(ave(pow(10,ref/10),t+0,t+15))
> 'clear'
> <put your display commands for drawing R2 here>
> 'printim day'day'.png'
> day=day+1
> t=t+15
> endwhile
> 'close 1'
>
> Then you get 24 images named (day1.png, day2.png, day3.png…) each with an
> average for 15 successive time steps.
> Hope that helps.
> --Jennifer
>
>
> Thank you very much for your help...
>
> Best regards,
> wendi
>
>
>
> --
> -------------
> Wendi Harjupa. ST
> Shimane University Graduate School of Engineering Sciences
> Department of Electronic Control Systems
> Remote Sensing Laboratory
> s119447
> Cellphone : +81-080-4268-6676
> email : wendi at rslab.riko.shimane-u.ac.jp
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
> --
> Jennifer M. Adams
> Center for Ocean-Land-Atmosphere Studies (COLA)
> 111 Research Hall, Mail Stop 2B3
> George Mason University
> 4400 University Drive
> Fairfax, VA 22030
>
>
>
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
--
-------------
Wendi Harjupa. ST
Shimane University Graduate School of Engineering Sciences
Department of Electronic Control Systems
Remote Sensing Laboratory
s119447
Cellphone : +81-080-4268-6676
email : wendi at rslab.riko.shimane-u.ac.jp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20131211/0093bc43/attachment.html
More information about the gradsusr
mailing list