World Climate

2009年1月2日星期五

【Xray】用GrADS处理时间不连续的问题

问题:

Hi, GrADS users,
> >
> > I wonder how to write a ctl file
> > for 10-day composite NDVI files.
> > The file names are, for example,
> >
> > ndvi.yyyymmdd.bin
> >
> > ndvi.20030101.bin
> > ndvi.20030111.bin
> > ndvi.20030121.bin
> > ndvi.20030201.bin
> > ndvi.20030211.bin
> > ndvi.20030221.bin
> > ndvi.20030301.bin
> >
> > As you can see, they are not
> > exactly 10 day in interval.
> >
> > My question is, how to put the time interval
> > in TDEF. I tried 10 dy, but it did not
> > work due to the apparent reason.
> >
> > Thanks.
方法:

tdef 365 linear 01Jan2003 1dy

with everything else as described below

Then use a couple loops and an array of month names to access each day

that
actually has data

mo=1
moname.1=Jan
moname.2=Feb
...

while (mo < 13)
da=1
while (da < 22)
'set time 'da%moname.mo'2003'
'd ndvi'
da=da+10
endwhile
mo=mo+1
endwhile

Something along these lines should work

0 评论: