[gradsusr] problem with an extract script
Muhammad Rahiz
muhammad.rahiz at ouce.ox.ac.uk
Tue Jan 4 10:41:47 EST 2011
What is the error message?
I've not tested it but it seems that
1 - tmax is defined but not used in the script
2 - you have defined many objects and specified one output file
for all of them. why don't you try defining one object, write to file,
define another variable, write to file all within a loop and concantenate
the files?
--
Muhammad Rahiz
Researcher & DPhil Candidate (Climate Systems & Policy)
School of Geography & the Environment
University of Oxford
On Tue, 4 Jan 2011, Ismaila Diallo wrote:
> Dear Grads User's
>
> i've daily data for a big region. Now i try to extract since this file the data
> available for an area and this extract data must be only the data average of 4
> months (june july august and september. so that i perform this script:
>
>
> 'reinit'
> 'sdfopen /home/lpaosf/RT.1996-2007_DAY.AVG.NC'
> t=518
> tmax=3926
> 'set fwrite test.dat'
> 'set gxout fwrite'
> while (t<=3926)
> 'set t 't
> 'define jun=ave(rt,t=t+0,t='t+30')'
> 'set t 't+30
> 'define jul=ave(rt,t=t+0,t='t+31')'
> 'set t 't+61
> 'define aug=ave(rt,t=t+0,t='t+31')'
> 'set t 't+92
> 'define sep=ave(rt,t=t+0,t='t=t+30')'
> 'define jjas=(jun+jul+aug+sep)/4'
> 'define aa=ave(jjas,lon='-8.5',lon='8.5')'
> 'define bb=ave(aa,lat='10',lat='16')'
> 'd bb'
> t=t+365
> endwhile
> 'disable fwrite'
>
> but with this script i get some errors and i don't understand what's wrong in my
> script.
> so could someone help me to resolve this difficult.
> Believe in your great Help.
> Sincerely
> Ismaila
>
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
More information about the gradsusr
mailing list