[gradsusr] make time series data in one plot

Jennifer Adams jma at cola.iges.org
Tue Dec 10 09:30:11 EST 2013


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 





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20131210/50dbc967/attachment.html 


More information about the gradsusr mailing list