On Wed, Aug 12, 2009 at 6:23 PM, Le Fou Volant<alexaguilla...@gmail.com> wrote:
>
> Hello,
>
> I am opening many netcdf files, getting one variable and closing each
> file in each loop:
> ctt=[]
> for j in fileList1:
>    for f in j:
>        ncfile=netcdf_file(path+f,'r')
>        ctt.append( ncfile.variables['Cloud_Top_Types'][:] )
>        ncfile.close()
>
> However, I get the following error message:
>
> Traceback (most recent call last):            ncfile2=netcdf_file(path
> +f,'r')
>  File "/Users/aguillau/local/sage/sage/local/lib/python2.5/site-
> packages/scipy/io/netcdf.py", line 44, in __init__
>  File "/Users/aguillau/local/sage/sage/local/lib/python2.5/site-
> packages/scipy/io/netcdf.py", line 80, in _parse
>  File "/Users/aguillau/local/sage/sage/local/lib/python2.5/site-
> packages/scipy/io/netcdf.py", line 136, in _var_array
>  File "/Users/aguillau/local/sage/sage/local/lib/python2.5/site-
> packages/scipy/io/netcdf.py", line 188, in _read_var
>  File "/Users/aguillau/local/sage/sage/local/lib/python2.5/site-
> packages/scipy/io/netcdf.py", line 260, in __init__
> EnvironmentError: [Errno 24] Too many open files
>
> This loop works if fileList is smaller than 120 in size and crashes if
> it's larger.
>
> Any help or insight would be appreciated.

I would try a google search for

             Too many open files Os x

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to