Re: how to open files in different folders

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Nov 28 2011 - 14:30:53 MST

You just forgot the "ls" in the "systemfunc" command:

> add_1 = systemfunc("ls /home/lovecheese/DATA/2000/*"+"2000"+imonth(i*3)+"*.hdf")
> add_2 = systemfunc("ls /home/lovecheese/DATA/2000/*"+"2000"+imonth(i*3+1)+"*.hdf")
> add_3 = systemfunc("ls /home/lovecheese/DATA/2000/*"+"2000"+imonth(i*3+2)+"*.hdf")

--Mary

On Nov 28, 2011, at 11:12 AM, yikun liu wrote:

> Hi,
>
> I want to open .hdf data files that are in different folders. Is there any Function or NCL Statement can help me with it?
> another question. I use addfile and systemfunc to open specific files in one folder
>
> imonth=(/"0","00","03","06","09","12","15","18","21","24","27","30","33"/)
> do i =1,4
> if( i.lt.4)
> add_1 = systemfunc("/home/lovecheese/DATA/2000/*"+"2000"+imonth(i*3)+"*.hdf")
> add_2 = systemfunc("/home/lovecheese/DATA/2000/*"+"2000"+imonth(i*3+1)+"*.hdf")
> add_3 = systemfunc("/home/lovecheese/DATA/2000/*"+"2000"+imonth(i*3+2)+"*.hdf")
> f1 =addfile(add_1,"r")
> f2 =addfile(add_2,"r")
> f3 =addfile(add_3,"r")
> else
> end if
> end do
>
> but it said Permission denied. What's the problem?
>
>
>
> Yikun
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

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

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