still have problem about open files in different subdirectories

From: yikun liu <queenbee0703_at_nyahnyahspammersnyahnyah>
Date: Mon Nov 28 2011 - 21:36:33 MST

hi!

I have a directory "DATA" which contains 11 sub directories
"2000","2001"...."2010".
Each of the 11 sub directories has 12 .hdf files.
I want to open files which name contains "200x06""200x09""200x012" in each
sub directories "2000"-"2010", and then open "200x15","200x18","200x21" in
each sub directories, and so on
my code is like
imonth=(/"0","00","03","06","09","12","15","18","21","24","27","30","33"/)
  iyear=(/"00","01","02","03","04"/)
  do i =1,4
    if( i.lt.4)
      do year =0, 4
        dir = "find /home/lovecheese/DATA/20*"
        add_1 =
systemfunc(dir+iyear(year)+/20+iyear(year)+imonth(i*3)+"*.hdf")
        add_2 =
systemfunc(dir+iyear(year)+/20+iyear(year)+imonth(i*3)+imonth(i*3+1)+"*.hdf")
        add_3 =
systemfunc(dir+iyear(year)+/20+iyear(year)+imonth(i*3)+imonth(i*3+2)+"*.hdf")
        f1 =addfile(add_1,"r")
        f2 =addfile(add_2,"r")
        f3 =addfile(add_3,"r")
      end do
    else
      end if
   end do

but it returns
fatal:syntax error: line 17 in file check before or near
        add_1 = systemfunc(dir+iyear(year)+

what's the problem?

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Nov 28 21:36:41 2011

This archive was generated by hypermail 2.1.8 : Wed Nov 30 2011 - 19:52:47 MST